<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="referrer" content="strict-origin-when-cross-origin">

	<title>Owltree</title>
	<link href="images/blanc.ico" rel="icon" type="image/x-icon">
	<link rel="stylesheet" href="reset.css">
	<link rel="stylesheet" href="ot-default.css">
	<link rel="stylesheet" href="interaction-model/ot-ui-components/vue-3/ot-hh-layout/v1.0.0/hh-layout.css">

	<meta property="og:title" content="Owltree Engine">
	<meta name="description" content="Owltree application">
	<meta name="author" content="Marco Schriek">

	<!-- CDN hint for esm.sh module imports -->
	<link rel="dns-prefetch" href="https://esm.sh">

	<!--
	  Server-injected access nonce.
	  The .NET frontend server replaces otn_Ojox.7ebiemtted32s.1jo11i5ei with a per-request
	  token before serving this page. Placed in <head> before
	  modulepreload links so it exists when modules evaluate.
	-->
	<input type="hidden" value="otn_Ojox.7ebiemtted32s.1jo11i5ei" id="ot-access-nonce" aria-hidden="true">

	<!--
	  Import map: MUST come before any modulepreload hints.
	  Maps bare specifiers to local capability modules and
	  CDN-hosted dependencies.
	-->
	<script type="importmap">
		{
		  "imports": {
			"module_importer": "./dynamic_importer.js",
			"RECCA": "./RECCA-v1.0.js",
			"RANCID": "./RANCID-v1.0.js",
			"ATLAS": "./ATLAS-v1.0.0.js",
			"ProactiveReactivityLogic": "./ProactiveReactivityLogic-v1.0.0.js",
			"interaction-model": "./interaction-model/interaction-model.js",

			"ot-fetch": "./interaction-model/capabilities/ot-fetch/v1.0.0/index.js",
			"ot-virtual-files": "./interaction-model/capabilities/ot-virtual-files-lordship/v1.0.0/index.js",
			"ot-ui": "./interaction-model/capabilities/ot-ui/default/index.js",
			"vue": "https://esm.sh/vue@3.5.13/dist/vue.esm-browser.js",
			"vue-3-compiler-sfc": "https://esm.sh/@vue/compiler-sfc@3.5.13?bundle",
			"kiro-bridge": "./interaction-model/capabilities/kiro-bridge/v1.0.0/index.js",
			"ot-intent-factory": "./interaction-model/capabilities/ot-intent-factory/v1.0.0/index.js",
			"ot-negotiator": "./interaction-model/capabilities/ot-negotiator/v1.0.0/index.js",
			"ot-client-base": "./interaction-model/capabilities/ot-client-base/v1.0.0/index.js",
			"d3": "https://esm.sh/d3@7.9.0",

			"@codemirror/state": "./codemirror/@codemirror-state.js",
			"@codemirror/view": "./codemirror/@codemirror-view.js",
			"@codemirror/commands": "./codemirror/@codemirror-commands.js",
			"@codemirror/language": "./codemirror/@codemirror-language.js",
			"@codemirror/autocomplete": "./codemirror/@codemirror-autocomplete.js",
			"@codemirror/search": "./codemirror/@codemirror-search.js",
			"@codemirror/lint": "./codemirror/@codemirror-lint.js",
			"@codemirror/lang-javascript": "./codemirror/@codemirror-lang-javascript.js",
			"@codemirror/lang-html": "./codemirror/@codemirror-lang-html.js",
			"@codemirror/lang-css": "./codemirror/@codemirror-lang-css.js",
			"@codemirror/lang-markdown": "./codemirror/lang-markdown.js",
			"@codemirror/language-data": "./codemirror/language-data.js",
			"@lezer/common": "./codemirror/@lezer-common.js",
			"@lezer/lr": "./codemirror/@lezer-lr.js",
			"@lezer/highlight": "./codemirror/@lezer-highlight.js",
			"@lezer/javascript": "./codemirror/@lezer-javascript.js",
			"@lezer/html": "./codemirror/@lezer-html.js",
			"@lezer/css": "./codemirror/@lezer-css.js",
			"@lezer/markdown": "./codemirror/@lezer-markdown.js",
			"style-mod": "./codemirror/style-mod.js",
			"w3c-keyname": "./codemirror/w3c-keyname.js",
			"crelt": "./codemirror/crelt.js",
			"@marijn/find-cluster-break": "./codemirror/@marijn-find-cluster-break.js"
		  }
		}
	</script>

	<!-- Core runtime modules (modulepreload AFTER import map) -->
	<link rel="preload" href="/importmap.json" as="fetch" crossorigin="anonymous">
	<link rel="modulepreload" href="/dynamic_importer.js">
	<link rel="modulepreload" href="/ProactiveReactivityLogic-v1.0.0.js">
	<link rel="modulepreload" href="/RECCA-v1.0.js">
	<link rel="modulepreload" href="/RANCID-v1.0.js">
	<link rel="modulepreload" href="/ATLAS-v1.0.0.js">
	<link rel="modulepreload" href="/interaction-model/interaction-model.js">

	<!-- Core capability modules -->
	<link rel="modulepreload" href="/interaction-model/capabilities/ot-void/v1.0.0/index.js">
	<link rel="modulepreload" href="/interaction-model/capabilities/ot-fetch/v1.0.0/index.js">
	<link rel="modulepreload" href="/interaction-model/capabilities/ot-requests-loop/v1.0.0/index.js">
	<link rel="modulepreload" href="/interaction-model/capabilities/ot-virtual-files-lordship/v1.0.0/index.js">
	<link rel="modulepreload" href="/interaction-model/capabilities/ot-intent-factory/v1.0.0/index.js">
	<link rel="modulepreload" href="/interaction-model/capabilities/kiro-bridge/v1.0.0/index.js">
	<link rel="modulepreload" href="/interaction-model/capabilities/ot-ui/default/index.js">
	<link rel="modulepreload" href="/interaction-model/capabilities/ot-ui/vue/3/index.js">
	<link rel="modulepreload" href="https://esm.sh/d3@7.9.0">

	<!-- Preload non-module assets used during bootstrap -->
	<link rel="preload" href="/interaction-model/capabilities/ot-ui/vue/3/assets/base-template.html" as="fetch" crossorigin="anonymous">
	<link rel="preload" href="/interaction-model/capabilities/ot-requests-loop/v1.0.0/default-workspace-scaffold.json" as="fetch" crossorigin="anonymous">
	<link rel="preload" href="/interaction-model/ot-ui-components/vue-3/ot-continuity-safeguard-controls/v1.0.0/index.vue" as="fetch" crossorigin="anonymous">
	<link rel="preload" href="/interaction-model/ot-ui-components/vue-3/ot-d3-graph/v1.0.0/index.vue" as="fetch" crossorigin="anonymous">
	<link rel="preload" href="/interaction-model/ot-ui-components/vue-3/ot-codemirror/v1.0.0/index.vue" as="fetch" crossorigin="anonymous">
	<link rel="preload" href="/interaction-model/capabilities/ot-requests-loop/v1.0.0/default-workspace-scaffold.json" as="fetch" crossorigin="anonymous">
</head>
<body class="no-interaction">
	<noscript>
		<section class="init-error" role="alert">
			<p class="init-error__message">JavaScript required</p>
			<p class="init-error__message">
				Owltree works exclusively with JavaScript enabled.
				Please enable it to continue.
			</p>
			<p class="init-error__message">
				You may be seeing this message because a script
				on this page was terminated.
			</p>
		</section>
	</noscript>

	<div class="init-loading" role="status" aria-live="polite" aria-label="Loading application">
		loading...
	</div>

	<script type="module">
		import { client } from "interaction-model";
		import { digestTrackers } from "ATLAS";

		/*
		  Read the server-injected nonce and expose it on the client
		  so capabilities can include it in fetch headers.
		  The nonce element is removed from the DOM after reading
		  to prevent client-side scraping.
		*/
		const nonceEl = document.getElementById('ot-access-nonce');
		if (nonceEl) {
			const nonce = nonceEl.value;
			if (nonce && nonce.startsWith('otn_')) {
				client.accessNonce = nonce;
			}
			nonceEl.remove();
		}

		window.client = client;
	</script>
</body>
</html>
