From 718e44cdb5311a868096d16d93842bc2166ccb09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 00:26:10 +0000 Subject: [PATCH 1/2] build(deps): bump the web group in /web with 6 updates Bumps the web group in /web with 6 updates: | Package | From | To | | --- | --- | --- | | [dompurify](https://github.com/cure53/DOMPurify) | `3.4.16` | `3.4.17` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.6.4` | `26.6.5` | | [jsdom](https://github.com/jsdom/jsdom) | `30.1.2` | `30.1.3` | | [lucide](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide) | `1.53.0` | `1.57.0` | | [marked](https://github.com/markedjs/marked) | `18.1.0` | `18.1.1` | | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `4.1.11` | `4.1.12` | Updates `dompurify` from 3.4.16 to 3.4.17 - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/3.4.16...3.4.17) Updates `@types/node` from 26.6.4 to 26.6.5 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `jsdom` from 30.1.2 to 30.1.3 - [Release notes](https://github.com/jsdom/jsdom/releases) - [Commits](https://github.com/jsdom/jsdom/compare/v30.1.2...v30.1.3) Updates `lucide` from 1.53.0 to 1.57.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.57.0/packages/lucide) Updates `marked` from 18.1.0 to 18.1.1 - [Release notes](https://github.com/markedjs/marked/releases) - [Commits](https://github.com/markedjs/marked/compare/v18.1.0...v18.1.1) Updates `vitest` from 4.1.11 to 4.1.12 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.12/packages/vitest) --- updated-dependencies: - dependency-name: dompurify dependency-version: 3.4.17 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: web - dependency-name: "@types/node" dependency-version: 26.6.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: web - dependency-name: jsdom dependency-version: 30.1.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: web - dependency-name: lucide dependency-version: 1.57.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: web - dependency-name: marked dependency-version: 18.1.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: web - dependency-name: vitest dependency-version: 4.1.12 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: web ... Signed-off-by: dependabot[bot] --- web/package-lock.json | 158 +++++++++++++++++++++--------------------- web/package.json | 12 ++-- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 0eb7281f..1c7d4855 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -9,23 +9,23 @@ "version": "0.1.0", "dependencies": { "@noble/ed25519": "^3.2.0", - "dompurify": "^3.4.16", + "dompurify": "^3.4.17", "qrcode": "^1.5.4" }, "devDependencies": { "@sveltejs/adapter-static": "^3.0.6", "@sveltejs/kit": "^2.70.3", "@sveltejs/vite-plugin-svelte": "^7.3.1", - "@types/node": "^26.6.4", + "@types/node": "^26.6.5", "@types/qrcode": "^1.5.6", - "jsdom": "^30.1.2", - "lucide": "^1.53.0", - "marked": "^18.1.0", + "jsdom": "^30.1.3", + "lucide": "^1.57.0", + "marked": "^18.1.1", "svelte": "^5.57.2", "svelte-check": "^4.7.6", "typescript": "^5.6.0", "vite": "^8.3.4", - "vitest": "^4.1.11" + "vitest": "^4.1.12" }, "engines": { "node": "^22.22.2 || ^24.15.0 || >=26.0.0" @@ -49,9 +49,9 @@ } }, "node_modules/@asamuzakjp/dom-selector": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-9.2.4.tgz", - "integrity": "sha512-YnVzxDxLaqL0t7Q4wfcgHZjg55Wm6y5EaO7Bhu3q9J7wq/8iw3PhsnWiOQhYekx4VexnbkgWpTT6n+QIV7kczw==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-10.0.3.tgz", + "integrity": "sha512-3+777rEPsOOjoy5/sRmIzHnoRDaLpm3XWY2dmWn/N7f/XwDG0bcpnFaKL3X9FYJUbNwLmpcJC1bUYexJRxsFlw==", "dev": true, "license": "MIT", "dependencies": { @@ -733,9 +733,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.6.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.4.tgz", - "integrity": "sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg==", + "version": "26.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.5.tgz", + "integrity": "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==", "dev": true, "license": "MIT", "dependencies": { @@ -760,16 +760,16 @@ "optional": true }, "node_modules/@vitest/expect": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", - "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.12.tgz", + "integrity": "sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", + "@vitest/spy": "4.1.12", + "@vitest/utils": "4.1.12", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -778,13 +778,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", - "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.12.tgz", + "integrity": "sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.11", + "@vitest/spy": "4.1.12", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -805,9 +805,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", - "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.12.tgz", + "integrity": "sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==", "dev": true, "license": "MIT", "dependencies": { @@ -818,13 +818,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", - "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.12.tgz", + "integrity": "sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.11", + "@vitest/utils": "4.1.12", "pathe": "^2.0.3" }, "funding": { @@ -832,14 +832,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", - "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.12.tgz", + "integrity": "sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.11", - "@vitest/utils": "4.1.11", + "@vitest/pretty-format": "4.1.12", + "@vitest/utils": "4.1.12", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -848,9 +848,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", - "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.12.tgz", + "integrity": "sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==", "dev": true, "license": "MIT", "funding": { @@ -858,13 +858,13 @@ } }, "node_modules/@vitest/utils": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", - "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.12.tgz", + "integrity": "sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.11", + "@vitest/pretty-format": "4.1.12", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -959,9 +959,9 @@ } }, "node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz", + "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==", "dev": true, "license": "MIT", "engines": { @@ -1118,9 +1118,9 @@ "license": "MIT" }, "node_modules/dompurify": { - "version": "3.4.16", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.16.tgz", - "integrity": "sha512-sqo+pNp3qRhCIpbgRi1y8Tgk27Bo2Ry7w0dC1NBeNTdZChWjz9Xb/KOoZbRP/R6pQZ80Qw8YhXw13hWWBbMRnQ==", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.17.tgz", + "integrity": "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -1292,14 +1292,14 @@ } }, "node_modules/jsdom": { - "version": "30.1.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.2.tgz", - "integrity": "sha512-0FFE/jE1rppmVfUrJUgxqXjcwolZYIGtAgj1pTussMhNZxIxi7W/PvfWaMNroGi2B36X1IKHbexpZ9DhkoOPiQ==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.3.tgz", + "integrity": "sha512-hQMUPvRgN7KxsfIytDQji7bimuJeRQa6Qo5+iuiZQk5CafeRxLIA10/cG5YCBFNpD9RO3oqIiN4CO1Y44kxqXg==", "dev": true, "license": "MIT", "dependencies": { "@asamuzakjp/css-color": "^7.1.3", - "@asamuzakjp/dom-selector": "^9.2.4", + "@asamuzakjp/dom-selector": "^10.0.3", "@bramus/specificity": "^2.4.2", "@csstools/css-syntax-patches-for-csstree": "^1.1.15", "@exodus/bytes": "^1.16.0", @@ -1312,7 +1312,7 @@ "parse5": "^8.0.1", "saxes": "^6.0.0", "tough-cookie": "^6.0.2", - "undici": "^8.11.2", + "undici": "^8.12.1", "w3c-xmlserializer": "^6.0.0", "webidl-conversions": "^8.0.1", "whatwg-mimetype": "^5.0.0", @@ -1632,9 +1632,9 @@ } }, "node_modules/lucide": { - "version": "1.53.0", - "resolved": "https://registry.npmjs.org/lucide/-/lucide-1.53.0.tgz", - "integrity": "sha512-5bBZofL4QmNhY6YIXe3sSJKvO2gMZ1fOMEcOyVsT5/7k6KR8IizWUhWVuQtVnrN/TRLKDKEr4Ln0a7CZ8dQMMA==", + "version": "1.57.0", + "resolved": "https://registry.npmjs.org/lucide/-/lucide-1.57.0.tgz", + "integrity": "sha512-M2BHuzBxnD+5AiJzEXwWxswwz0MXoQPQcehoIJAgi0Lqe0i4/kksKaHx2R+UWRAbQhjTvucCDG6sBg/TqIwa8Q==", "dev": true, "license": "ISC" }, @@ -1649,9 +1649,9 @@ } }, "node_modules/marked": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-18.1.0.tgz", - "integrity": "sha512-PamYXWWWg2nboG3oX5Ffzpy3EFZROqZJK9hSlMmUnekp7TxPs5DcT95vwd46m73/exfKCRVMtgXoPMI4FEJL6w==", + "version": "18.1.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-18.1.1.tgz", + "integrity": "sha512-zEGgrtUG8crk+TrMacJSVABU4DYDDkS8uqgU3ohrn/2fW9C2AEfUrO3m6IhpIpQpl7YcVpiXXC9cSMWDANT3dg==", "dev": true, "license": "MIT", "bin": { @@ -2142,9 +2142,9 @@ } }, "node_modules/tinyrainbow": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", - "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz", + "integrity": "sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==", "dev": true, "license": "MIT", "engines": { @@ -2222,9 +2222,9 @@ } }, "node_modules/undici": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.11.2.tgz", - "integrity": "sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.2.tgz", + "integrity": "sha512-XtuDWVdqTLr3NAxm2ly9/hU6kUsJOgGh1RASzMBbsw6aWCOaQzHdW+QQDfdERjfJ2V5vL5pRPa4RetO9UfivDg==", "dev": true, "license": "MIT", "engines": { @@ -2337,19 +2337,19 @@ } }, "node_modules/vitest": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", - "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.12.tgz", + "integrity": "sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.11", - "@vitest/mocker": "4.1.11", - "@vitest/pretty-format": "4.1.11", - "@vitest/runner": "4.1.11", - "@vitest/snapshot": "4.1.11", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", + "@vitest/expect": "4.1.12", + "@vitest/mocker": "4.1.12", + "@vitest/pretty-format": "4.1.12", + "@vitest/runner": "4.1.12", + "@vitest/snapshot": "4.1.12", + "@vitest/spy": "4.1.12", + "@vitest/utils": "4.1.12", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -2377,12 +2377,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.11", - "@vitest/browser-preview": "4.1.11", - "@vitest/browser-webdriverio": "4.1.11", - "@vitest/coverage-istanbul": "4.1.11", - "@vitest/coverage-v8": "4.1.11", - "@vitest/ui": "4.1.11", + "@vitest/browser-playwright": "4.1.12", + "@vitest/browser-preview": "4.1.12", + "@vitest/browser-webdriverio": "^4.1.11", + "@vitest/coverage-istanbul": "4.1.12", + "@vitest/coverage-v8": "4.1.12", + "@vitest/ui": "4.1.12", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" diff --git a/web/package.json b/web/package.json index 0b8a88ed..4832b240 100644 --- a/web/package.json +++ b/web/package.json @@ -19,20 +19,20 @@ "@sveltejs/adapter-static": "^3.0.6", "@sveltejs/kit": "^2.70.3", "@sveltejs/vite-plugin-svelte": "^7.3.1", - "@types/node": "^26.6.4", + "@types/node": "^26.6.5", "@types/qrcode": "^1.5.6", - "jsdom": "^30.1.2", - "lucide": "^1.53.0", - "marked": "^18.1.0", + "jsdom": "^30.1.3", + "lucide": "^1.57.0", + "marked": "^18.1.1", "svelte": "^5.57.2", "svelte-check": "^4.7.6", "typescript": "^5.6.0", "vite": "^8.3.4", - "vitest": "^4.1.11" + "vitest": "^4.1.12" }, "dependencies": { "@noble/ed25519": "^3.2.0", - "dompurify": "^3.4.16", + "dompurify": "^3.4.17", "qrcode": "^1.5.4" } } From ea29583794c7cb0727e30c40b96cd42ef1ba4e11 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 22:28:43 +0000 Subject: [PATCH 2/2] build(web): rebuild the committed SPA bundle for the dependency bumps CI requires app/smartbrain_3000/web to match a fresh build; the bumped lucide/marked/dompurify change the bundle output. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01HTrCtNm4bChSxqk8q4vP4a --- .../web/_app/immutable/chunks/BB_QGgHe.js | 1 + .../chunks/{w1k7z_2C.js => CHJn7_Ei.js} | 2 +- .../chunks/{TDZ5a5AF.js => CJp6lm4P.js} | 2 +- .../web/_app/immutable/chunks/CdrQoWQa.js | 1 - .../chunks/{BTNiQCll.js => DFmtAuwh.js} | 2 +- .../chunks/{R0i1r70f.js => Dfkr60Ak.js} | 2 +- .../chunks/{BB93KFIn.js => _dzYE-ie.js} | 2 +- .../chunks/{CDw_JV4J.js => wsL2lAx0.js} | 2 +- .../chunks/{p_cNieaP.js => y_OS9RoU.js} | 2 +- .../{app.DqgyTZgC.js => app.PWFMq22P.js} | 4 +- .../_app/immutable/entry/start.BAundLvs.js | 1 + .../_app/immutable/entry/start.qkFiTLLK.js | 1 - .../nodes/{0.CEPNkK8Q.js => 0.Dsmf4qec.js} | 2 +- .../nodes/{1.2CPVuvj-.js => 1.ZzjWEhv4.js} | 2 +- .../nodes/{10.C_n5uciA.js => 10.BLqOix-W.js} | 2 +- .../nodes/{11.DPL-6Zfz.js => 11.rX_RoM4s.js} | 2 +- .../nodes/{13.BoxEyjW4.js => 13.C3E0giz2.js} | 2 +- .../nodes/{14.X5m3F32S.js => 14.CWTG4co9.js} | 2 +- .../nodes/{15.BTmGYDvZ.js => 15.ZKML0Wbc.js} | 2 +- .../nodes/{16.BU76rvvk.js => 16.CH75FQeg.js} | 2 +- .../nodes/{17.h5HwkHlp.js => 17.hYzrqytC.js} | 2 +- .../nodes/{18.pwGRcm6r.js => 18.Og9zqQSf.js} | 2 +- .../nodes/{19.MjWr2ZVb.js => 19.sP6kLl-L.js} | 2 +- .../nodes/{2.C1PbweEe.js => 2.Dw9NXpEc.js} | 2 +- .../nodes/{20.BJVw05M4.js => 20.B6YXtSBg.js} | 2 +- .../nodes/{21.CN-EqAri.js => 21.XoTkvw2A.js} | 2 +- .../nodes/{22.CvRe3Mvm.js => 22.BP22W4Ng.js} | 2 +- .../nodes/{23.CaF5mdk2.js => 23.D5_ReiJY.js} | 2 +- .../nodes/{24.DX8B44wp.js => 24.D2W6Rh_f.js} | 2 +- .../nodes/{25.8J_G9jpa.js => 25.Be_90mPr.js} | 2 +- .../nodes/{26.DTHlqVwp.js => 26.Dk-eStWq.js} | 2 +- .../nodes/{27.DHH-2i24.js => 27.cEFm5ViZ.js} | 2 +- .../nodes/{28.Dl3WFZEd.js => 28.C_NAhpkq.js} | 2 +- .../nodes/{3.Dsv0lSmv.js => 3.CU_xNGYz.js} | 2 +- .../nodes/{4.C_nR6JD_.js => 4.sUggOD9p.js} | 2 +- .../web/_app/immutable/nodes/5.CQg6bilK.js | 76 ------------------- .../web/_app/immutable/nodes/5.D_1GfvA1.js | 74 ++++++++++++++++++ .../nodes/{6.BhPLOFgA.js => 6.DS2y_biy.js} | 2 +- .../nodes/{7.Dudr46h-.js => 7.DT2KwTeB.js} | 2 +- .../nodes/{8.BUkwSJny.js => 8.BCRdaF1j.js} | 2 +- .../nodes/{9.Bm06ksTS.js => 9.DhhPdF9Q.js} | 2 +- app/smartbrain_3000/web/_app/version.json | 2 +- app/smartbrain_3000/web/index.html | 28 +++---- app/smartbrain_3000/web/service-worker.js | 2 +- 44 files changed, 128 insertions(+), 130 deletions(-) create mode 100644 app/smartbrain_3000/web/_app/immutable/chunks/BB_QGgHe.js rename app/smartbrain_3000/web/_app/immutable/chunks/{w1k7z_2C.js => CHJn7_Ei.js} (99%) rename app/smartbrain_3000/web/_app/immutable/chunks/{TDZ5a5AF.js => CJp6lm4P.js} (90%) delete mode 100644 app/smartbrain_3000/web/_app/immutable/chunks/CdrQoWQa.js rename app/smartbrain_3000/web/_app/immutable/chunks/{BTNiQCll.js => DFmtAuwh.js} (84%) rename app/smartbrain_3000/web/_app/immutable/chunks/{R0i1r70f.js => Dfkr60Ak.js} (65%) rename app/smartbrain_3000/web/_app/immutable/chunks/{BB93KFIn.js => _dzYE-ie.js} (78%) rename app/smartbrain_3000/web/_app/immutable/chunks/{CDw_JV4J.js => wsL2lAx0.js} (99%) rename app/smartbrain_3000/web/_app/immutable/chunks/{p_cNieaP.js => y_OS9RoU.js} (65%) rename app/smartbrain_3000/web/_app/immutable/entry/{app.DqgyTZgC.js => app.PWFMq22P.js} (64%) create mode 100644 app/smartbrain_3000/web/_app/immutable/entry/start.BAundLvs.js delete mode 100644 app/smartbrain_3000/web/_app/immutable/entry/start.qkFiTLLK.js rename app/smartbrain_3000/web/_app/immutable/nodes/{0.CEPNkK8Q.js => 0.Dsmf4qec.js} (97%) rename app/smartbrain_3000/web/_app/immutable/nodes/{1.2CPVuvj-.js => 1.ZzjWEhv4.js} (81%) rename app/smartbrain_3000/web/_app/immutable/nodes/{10.C_n5uciA.js => 10.BLqOix-W.js} (99%) rename app/smartbrain_3000/web/_app/immutable/nodes/{11.DPL-6Zfz.js => 11.rX_RoM4s.js} (98%) rename app/smartbrain_3000/web/_app/immutable/nodes/{13.BoxEyjW4.js => 13.C3E0giz2.js} (96%) rename app/smartbrain_3000/web/_app/immutable/nodes/{14.X5m3F32S.js => 14.CWTG4co9.js} (96%) rename app/smartbrain_3000/web/_app/immutable/nodes/{15.BTmGYDvZ.js => 15.ZKML0Wbc.js} (62%) rename app/smartbrain_3000/web/_app/immutable/nodes/{16.BU76rvvk.js => 16.CH75FQeg.js} (98%) rename app/smartbrain_3000/web/_app/immutable/nodes/{17.h5HwkHlp.js => 17.hYzrqytC.js} (99%) rename app/smartbrain_3000/web/_app/immutable/nodes/{18.pwGRcm6r.js => 18.Og9zqQSf.js} (98%) rename app/smartbrain_3000/web/_app/immutable/nodes/{19.MjWr2ZVb.js => 19.sP6kLl-L.js} (98%) rename app/smartbrain_3000/web/_app/immutable/nodes/{2.C1PbweEe.js => 2.Dw9NXpEc.js} (85%) rename app/smartbrain_3000/web/_app/immutable/nodes/{20.BJVw05M4.js => 20.B6YXtSBg.js} (99%) rename app/smartbrain_3000/web/_app/immutable/nodes/{21.CN-EqAri.js => 21.XoTkvw2A.js} (97%) rename app/smartbrain_3000/web/_app/immutable/nodes/{22.CvRe3Mvm.js => 22.BP22W4Ng.js} (97%) rename app/smartbrain_3000/web/_app/immutable/nodes/{23.CaF5mdk2.js => 23.D5_ReiJY.js} (97%) rename app/smartbrain_3000/web/_app/immutable/nodes/{24.DX8B44wp.js => 24.D2W6Rh_f.js} (99%) rename app/smartbrain_3000/web/_app/immutable/nodes/{25.8J_G9jpa.js => 25.Be_90mPr.js} (97%) rename app/smartbrain_3000/web/_app/immutable/nodes/{26.DTHlqVwp.js => 26.Dk-eStWq.js} (94%) rename app/smartbrain_3000/web/_app/immutable/nodes/{27.DHH-2i24.js => 27.cEFm5ViZ.js} (90%) rename app/smartbrain_3000/web/_app/immutable/nodes/{28.Dl3WFZEd.js => 28.C_NAhpkq.js} (92%) rename app/smartbrain_3000/web/_app/immutable/nodes/{3.Dsv0lSmv.js => 3.CU_xNGYz.js} (72%) rename app/smartbrain_3000/web/_app/immutable/nodes/{4.C_nR6JD_.js => 4.sUggOD9p.js} (95%) delete mode 100644 app/smartbrain_3000/web/_app/immutable/nodes/5.CQg6bilK.js create mode 100644 app/smartbrain_3000/web/_app/immutable/nodes/5.D_1GfvA1.js rename app/smartbrain_3000/web/_app/immutable/nodes/{6.BhPLOFgA.js => 6.DS2y_biy.js} (97%) rename app/smartbrain_3000/web/_app/immutable/nodes/{7.Dudr46h-.js => 7.DT2KwTeB.js} (99%) rename app/smartbrain_3000/web/_app/immutable/nodes/{8.BUkwSJny.js => 8.BCRdaF1j.js} (93%) rename app/smartbrain_3000/web/_app/immutable/nodes/{9.Bm06ksTS.js => 9.DhhPdF9Q.js} (99%) diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/BB_QGgHe.js b/app/smartbrain_3000/web/_app/immutable/chunks/BB_QGgHe.js new file mode 100644 index 00000000..247c5184 --- /dev/null +++ b/app/smartbrain_3000/web/_app/immutable/chunks/BB_QGgHe.js @@ -0,0 +1 @@ +import"./wsL2lAx0.js"; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/w1k7z_2C.js b/app/smartbrain_3000/web/_app/immutable/chunks/CHJn7_Ei.js similarity index 99% rename from app/smartbrain_3000/web/_app/immutable/chunks/w1k7z_2C.js rename to app/smartbrain_3000/web/_app/immutable/chunks/CHJn7_Ei.js index 3260ed7b..fb77f0c8 100644 --- a/app/smartbrain_3000/web/_app/immutable/chunks/w1k7z_2C.js +++ b/app/smartbrain_3000/web/_app/immutable/chunks/CHJn7_Ei.js @@ -1 +1 @@ -import{$ as e}from"./BChu7Pos.js";import{t}from"./CDw_JV4J.js";import"./CdrQoWQa.js";import{a as n,c as r,d as i,f as a,g as o,i as s,l as c,m as l,n as u,p as d,r as f,t as p,u as m,v as ee}from"./CQMDLFxa.js";function te(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=``,r=``;for(let e of t)e.type===`candidate-pair`&&(e.nominated||e.state===`succeeded`)&&(n=e.localCandidateId??``,r=e.remoteCandidateId??``);if(!n||!r)return`unknown`;let i=``,a=``;for(let e of t)e.id===n?i=e.candidateType??``:e.id===r&&(a=e.candidateType??``);return i===`relay`||a===`relay`?`relay`:i&&a?`direct`:`unknown`}var h=e({status:`idle`,detail:``,needsPairing:!1});function g(e,t=``){h.status=e,h.detail=t}var _=3e3,v=6e4,y=1e3,b=3e4,x=15e3,S=6,C=2e4,w=45e3,T=800,ne=`Desktop unreachable — it may be off or asleep. If it's on a VPN, turning the VPN off on the Desktop often fixes this — then Retry.`,E=`your Desktop is locked — unlock it there, then this phone reconnects`,re=class{pairing;pc=null;ws=null;channel=null;pending=new Map;ready=null;markReady=null;failReady=null;nonceB64=``;desktopVerified=!1;lockedHint=!1;seq=0;closed=!1;reconnects=0;connectTimer=null;pingTimer=null;verifyTimer=null;lastPong=0;offerSent=!1;iceWaitTimer=null;constructor(e){this.pairing=e}connect(){this.closed=!1,this.offerSent=!1,this.ready=new Promise((e,t)=>{this.markReady=e,this.failReady=t}),this.ready.catch(()=>{}),g(`connecting`),this.connectTimer=setTimeout(()=>this.onConnectFailure(),x),this.pc=new RTCPeerConnection({iceServers:this.pairing.iceServers}),this.pc.onconnectionstatechange=()=>this.onPcState(),this.channel=this.pc.createDataChannel(`sb-api`),this.channel.onopen=()=>this.startHandshake(),this.channel.onmessage=e=>this.onChannelMessage(String(e.data)),this.openSignaling()}openSignaling(){let e=new WebSocket(this.pairing.signalingUrl);this.ws=e,e.onopen=()=>{e.send(JSON.stringify({role:`phone`,desktop_id:this.pairing.desktopId})),this.iceWaitTimer=setTimeout(()=>void this.makeOffer(),T)},e.onerror=()=>g(`offline`,`can't reach the signaling service`),e.onmessage=e=>this.onSignal(String(e.data))}async makeOffer(){if(!this.pc||this.offerSent)return;this.offerSent=!0,this.iceWaitTimer&&=(clearTimeout(this.iceWaitTimer),null),await this.pc.setLocalDescription(await this.pc.createOffer()),await this.iceGatheringDone();let e=this.pc.localDescription?.sdp??``;this.send({type:`offer`,sdp:e})}iceGatheringDone(){let e=this.pc;return!e||e.iceGatheringState===`complete`?Promise.resolve():new Promise(t=>{let n=()=>{e.iceGatheringState===`complete`&&r()},r=()=>{e.removeEventListener(`icegatheringstatechange`,n),clearTimeout(i),t()},i=setTimeout(r,_);e.addEventListener(`icegatheringstatechange`,n)})}async onSignal(e){let t;try{t=JSON.parse(e)}catch{return}if(t.type===`ice`&&Array.isArray(t.iceServers)){if(this.pc&&!this.offerSent)try{this.pc.setConfiguration({iceServers:t.iceServers})}catch{}this.makeOffer()}else t.type===`answer`&&t.sdp&&this.pc?await this.pc.setRemoteDescription({type:`answer`,sdp:t.sdp}):t.type===`error`&&g(`offline`,t.detail||`the Desktop isn't reachable`)}startHandshake(){this.nonceB64=u(),this.send(void 0,c(this.nonceB64))}async onChannelMessage(e){let t;try{t=d(e)}catch{return}let r=t.type;if(r===`hello_ok`)return this.onHelloOk(t);if(r===`locked_challenge`&&!this.desktopVerified)this.send({type:`whoami`,device_id:this.pairing.deviceId});else if(r===`auth_error`&&t.reason===`locked`&&!this.desktopVerified)this.lockedHint=!0,this.onConnectFailure();else if(this.desktopVerified){if(r===`auth_ok`)return this.onAuthOk();if(r===`pong`)this.lastPong=Date.now();else if(r===`auth_error`)g(`offline`,t.reason===`locked`?E:`this device isn't authorized — re-pair`),this.failReady?.(Error(`auth_error`)),this.close();else{if(a(t))return this.onChunkFrame(t);typeof t.status==`number`&&this.resolvePending(n(t))}}}async onHelloOk(e){g(`verifying`);let t=this.pc?.localDescription?.sdp??``,n=this.pc?.remoteDescription?.sdp??``,i=!1;try{let r=await p(t,n);i=await f(this.pairing.desktopPubkey,this.nonceB64,r,String(e.signature??``))}catch{i=!1}!i||e.pubkey!==this.pairing.desktopPubkey?(g(`untrusted`,`couldn't verify your Desktop — connection blocked`),this.failReady?.(Error(`untrusted`)),this.close()):(this.desktopVerified=!0,this.send(void 0,r(this.pairing.deviceId,this.pairing.credential)))}async onAuthOk(){this.connectTimer&&=(clearTimeout(this.connectTimer),null),this.lastPong=Date.now(),this.pingTimer=setInterval(()=>this.pingTick(),C);let e=await this.connectionKind();g(e===`relay`?`connected-relay`:e===`direct`?`connected-direct`:`connected`),this.markReady?.()}async connectionKind(){if(!this.pc)return`unknown`;try{return te(await this.pc.getStats())}catch{return`unknown`}}pingTick(){this.closed||this.channel?.readyState!==`open`||(l(this.lastPong,Date.now(),w)?this.onConnectFailure():this.send(void 0,m(Date.now())))}onPcState(){let e=this.pc?.connectionState;this.closed||(e===`connected`&&(this.reconnects=0),e===`connected`&&(this.lockedHint=!1),(e===`failed`||e===`disconnected`)&&this.onConnectFailure())}onConnectFailure(){if(this.closed)return;if(this.teardown(),this.reconnects>=S){this.failTerminal();return}g(`reconnecting`,this.lockedHint?E:``);let e=Math.min(b,y*2**this.reconnects),t=e/2+e/2*Math.random();this.reconnects+=1,setTimeout(()=>{this.closed||this.connect()},t)}failTerminal(){this.closed=!0,this.teardown(),g(`offline`,this.lockedHint?E:ne)}async request(e,t,n,r){if(!this.ready)throw Error(`not connecting`);await this.ready;let a=String(++this.seq),o=i(a,e,t,n,r);return new Promise((e,t)=>{let n=setTimeout(()=>{this.pending.delete(a),t(Error(`remote request timed out`))},v);this.pending.set(a,{resolve:e,reject:t,timer:n,chunks:null});try{for(let e of o)this.channel?.send(e)}catch(e){clearTimeout(n),this.pending.delete(a),t(e instanceof Error?e:Error(`send failed`))}})}isLive(){let e=this.pc?.connectionState;return e===`new`||e===`connecting`||e===`connected`}verify(e=2500){if(this.closed)return;if(!this.isLive()||this.channel?.readyState!==`open`){this.onConnectFailure();return}if(this.lastPong===0)return;let t=this.lastPong;try{this.send(void 0,m(Date.now()))}catch{this.onConnectFailure();return}this.verifyTimer&&clearTimeout(this.verifyTimer),this.verifyTimer=setTimeout(()=>{this.verifyTimer=null,!this.closed&&this.lastPong===t&&this.onConnectFailure()},e)}onChunkFrame(e){let t=String(e.id??``),n=this.pending.get(t);if(!n)return;let r=s(n.chunks,e);r.error?(clearTimeout(n.timer),this.pending.delete(t),n.reject(Error(r.error))):r.done?this.resolvePending(r.done):(n.chunks=r.state??null,clearTimeout(n.timer),n.timer=setTimeout(()=>{this.pending.delete(t),n.reject(Error(`remote request timed out`))},v))}resolvePending(e){let t=this.pending.get(e.id);t&&(clearTimeout(t.timer),this.pending.delete(e.id),t.resolve(e))}send(e,t){let n=t??JSON.stringify(e);t&&this.channel?.readyState===`open`?this.channel.send(t):e&&this.ws?.send(n)}teardown(){this.connectTimer&&=(clearTimeout(this.connectTimer),null),this.iceWaitTimer&&=(clearTimeout(this.iceWaitTimer),null),this.pingTimer&&=(clearInterval(this.pingTimer),null),this.verifyTimer&&=(clearTimeout(this.verifyTimer),null),this.lastPong=0,this.desktopVerified=!1;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(Error(`connection dropped`));this.pending.clear();try{this.ws?.close()}catch{}try{this.pc?.close()}catch{}this.ws=this.pc=this.channel=null}close(){this.closed=!0,this.teardown()}},D=null;function O(e){return D?.close(),D=new re(e),D.connect(),D}function k(){D?.close(),D=null}function A(){return D}var j={"content-type":`application/json`};async function M(){try{return(await fetch(`/api/health?${ee}=1`,{cache:`no-store`,signal:AbortSignal.timeout(2e3)})).ok}catch{return!1}}async function N(){for(let e=0;e<3;e++)if(await new Promise(e=>setTimeout(e,700)),await M())return!0;return!1}async function P(e,t,n,r,i){let a=typeof e==`string`?e:e instanceof URL?e.href:e.url,o=new URL(a,i),s=o.pathname.startsWith(`/api`)||o.pathname.startsWith(`/mcp`);if(!n||!s||o.searchParams.has(`__direct`))return r(e,t);let c=new Request(e,t),l={};c.headers.forEach((e,t)=>l[t]=e);let u=[`GET`,`HEAD`].includes(c.method)?new Uint8Array:new Uint8Array(await c.arrayBuffer());try{let e=await n.request(c.method,o.pathname+o.search,l,u);return new Response(e.body,{status:e.status,headers:e.headers})}catch{return new Response(JSON.stringify({detail:`remote request failed`}),{status:503,headers:j})}}function F(e){let t=window.fetch.bind(window);window.fetch=(n,r)=>{if(h.status===`offline`){let t=typeof n==`string`?n:n instanceof URL?n.href:n.url,r=new URL(t,window.location.origin).pathname;(r.startsWith(`/api`)||r.startsWith(`/mcp`))&&O(e)}return P(n,r,A(),t,window.location.origin)}}var I=()=>{},L=new Promise(e=>{I=e});async function R(){try{await z()}finally{I()}}async function z(){if(typeof navigator>`u`||!(`serviceWorker`in navigator))return;let e=await o().catch(()=>null);if(!e){h.needsPairing=!(await M()||await N());return}if(await M())return;O(e),F(e);let t,n=()=>{t&&clearTimeout(t),t=void 0},r=()=>{n();let t=A();!t||h.status===`offline`||h.status===`reconnecting`||!t.isLive()?O(e):t.verify()};window.addEventListener(`pagehide`,()=>{n(),k()}),window.addEventListener(`pageshow`,r),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?(n(),t=setTimeout(()=>{t=void 0,k()},18e4)):r()})}function B(){typeof navigator<`u`&&`serviceWorker`in navigator&&navigator.serviceWorker.ready.then(e=>e.update()).catch(()=>{})}var V=null;function H(e){V=e}function U(){V?.(),q()}var W=null;function G(e){W=e}function K(){W?.(),q()}function q(){typeof window<`u`&&window.location.pathname.startsWith(`/unlock`)||t(`/unlock`)}function J(e,t){e===423?U():e===401&&t?.code===`no_session`&&K()}var Y=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),X=class extends Error{status;code;constructor(e,t,n){super(t),this.status=e,this.code=n,this.name=`ApiError`}};async function Z(e,t={}){await L;let n=await fetch(e,{...t,headers:{"content-type":`application/json`,...t.headers??{}}}),r=n.status===204?null:await n.json().catch(()=>null);if(!n.ok){let e=r&&r.detail||`request failed (${n.status})`;throw J(n.status,r),new X(n.status,e,r?.code)}return r}function ie(e){return!!e&&e.unlocked&&e.session!==!1}function Q(e){console.assert(e instanceof Headers,`parseExportHeaders: real Headers instance required`),console.assert(typeof e.get==`function`,`parseExportHeaders: h.get missing`);let t=e.get(`x-sb-export-seq`),n=t===null?NaN:Number.parseInt(t,10),r=e.get(`x-sb-export-mode`);return{seq:Number.isFinite(n)?n:null,mode:r===`sealed`||r===`open`?r:null,unchanged:e.get(`x-sb-export-unchanged`)===`1`,rotatedKey:e.get(`x-sb-export-rotated-key`)===`1`,retired:e.get(`x-sb-export-retired`)===`1`}}function $(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??``}catch{return``}}var ae={health:()=>Z(`/api/health`,{headers:$()?{"x-smartbrain-timezone":$()}:{}}),accountStatus:()=>Z(`/api/account/status`),installUpdate:()=>Z(`/api/update/install`,{method:`POST`,body:JSON.stringify({})}),setup:e=>Z(`/api/account/setup`,{method:`POST`,body:JSON.stringify({passphrase:e})}),unlock:e=>Z(`/api/account/unlock`,{method:`POST`,body:JSON.stringify(e)}),lock:()=>Z(`/api/account/lock`,{method:`POST`}),changePassphrase:(e,t)=>Z(`/api/account/passphrase`,{method:`POST`,body:JSON.stringify({current_passphrase:e,new_passphrase:t})}),resetPassphrase:(e,t)=>Z(`/api/account/passphrase/reset`,{method:`POST`,body:JSON.stringify({new_passphrase:e,recovery_key:t})}),exportData:e=>Z(`/api/export`,{method:`POST`,body:JSON.stringify({passphrase:e})}),backup:async e=>{await L;let t=await fetch(`/api/backup`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:e})});if(!t.ok){let e=await t.json().catch(()=>null);throw new X(t.status,e?.detail||`backup failed (${t.status})`)}return t.blob()},restore:async e=>{await L;let t=await fetch(`/api/restore`,{method:`POST`,body:e}),n=await t.json().catch(()=>null);if(!t.ok)throw new X(t.status,n?.detail||`restore failed (${t.status})`);return n},listSecrets:()=>Z(`/api/secrets`),putSecret:(e,t)=>Z(`/api/secrets/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify({value:t})}),deleteSecret:e=>Z(`/api/secrets/${encodeURIComponent(e)}`,{method:`DELETE`}),localModels:(e=!1)=>Z(`/api/local-models${e?`?fresh=1`:``}`),listModels:()=>Z(`/api/models`),getRoutes:()=>Z(`/api/routes`),putRoutes:e=>Z(`/api/routes`,{method:`PUT`,body:JSON.stringify({routes:e})}),getContextLengths:()=>Z(`/api/model-context-lengths`),putContextLengths:e=>Z(`/api/model-context-lengths`,{method:`PUT`,body:JSON.stringify({lengths:e})}),getUsage:e=>{let t=new URLSearchParams;e?.since&&t.set(`since`,e.since),e?.until&&t.set(`until`,e.until);let n=t.toString();return Z(`/api/usage${n?`?${n}`:``}`)},putOllama:e=>Z(`/api/local-models/ollama`,{method:`PUT`,body:JSON.stringify({url:e})}),putMlx:(e,t)=>Z(`/api/local-models/mlx`,{method:`PUT`,body:JSON.stringify({url:e,api_key:t})}),putMlxe:(e,t)=>Z(`/api/local-models/mlxe`,{method:`PUT`,body:JSON.stringify({url:e,api_key:t})}),putClaudeCode:()=>Z(`/api/local-models/claudecode`,{method:`PUT`}),updateClaudeCode:()=>Z(`/api/local-models/claudecode/update`,{method:`POST`}),deleteLocalModel:e=>Z(`/api/local-models/${e}`,{method:`DELETE`}),chat:e=>Z(`/api/chat`,{method:`POST`,body:JSON.stringify(e)}),agentTurn:e=>Z(`/api/agent/turn`,{method:`POST`,body:JSON.stringify(e)}),feedback:(e,t)=>Z(`/api/feedback`,{method:`POST`,body:JSON.stringify({kind:e,conversation_id:t})}).catch(()=>void 0),agentResume:e=>Z(`/api/agent/resume/${encodeURIComponent(e)}`,{method:`POST`}),agentTurnStream:async(e,t)=>{await L;let n=await fetch(`/api/agent/turn/stream`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t});if(!n.ok){let e=await n.json().catch(()=>null);throw J(n.status,e),new X(n.status,e?.detail||`stream failed (${n.status})`)}return n},agentTurnEvents:async e=>{await L;let t=await fetch(`/api/agent/turn/events`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>null);throw J(t.status,e),new X(t.status,e?.detail||`turn failed (${t.status})`)}return t},getWebSearch:()=>Z(`/api/websearch`),putWebSearch:e=>Z(`/api/websearch`,{method:`PUT`,body:JSON.stringify(e)}),getSelfImprove:()=>Z(`/api/selfimprove`),putSelfImprove:e=>Z(`/api/selfimprove`,{method:`PUT`,body:JSON.stringify(e)}),getOptimizer:()=>Z(`/api/selfimprove/optimizer`),putOptimizer:e=>Z(`/api/selfimprove/optimizer`,{method:`PUT`,body:JSON.stringify({enabled:e})}),listImprovements:()=>Z(`/api/selfimprove/improvements`),listConversations:(e={})=>{let t=new URLSearchParams;e.before&&t.set(`before`,e.before),e.limit&&t.set(`limit`,String(e.limit));let n=t.toString();return Z(`/api/conversations${n?`?${n}`:``}`)},createConversation:e=>Z(`/api/conversations`,{method:`POST`,body:JSON.stringify({title:e})}),getConversation:(e,t={})=>{let n=new URLSearchParams;t.before&&n.set(`before`,t.before),t.limit&&n.set(`limit`,String(t.limit));let r=n.toString();return Z(`/api/conversations/${encodeURIComponent(e)}${r?`?${r}`:``}`)},renameConversation:(e,t)=>Z(`/api/conversations/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({title:t})}),deleteConversation:e=>Z(`/api/conversations/${encodeURIComponent(e)}`,{method:`DELETE`}),deleteAllConversations:()=>Z(`/api/conversations`,{method:`DELETE`}),listTrash:()=>Z(`/api/conversations/trash`),emptyTrash:()=>Z(`/api/conversations/trash`,{method:`DELETE`}),restoreConversation:e=>Z(`/api/conversations/${encodeURIComponent(e)}/restore`,{method:`POST`}),addMessage:(e,t,n,r)=>Z(`/api/conversations/${encodeURIComponent(e)}/messages`,{method:`POST`,body:JSON.stringify(r?.length?{role:t,content:n,sources:r}:{role:t,content:n})}),listToolDefs:()=>Z(`/api/tools`),invokeTool:(e,t)=>Z(`/api/tools/invoke`,{method:`POST`,body:JSON.stringify({name:e,args:t})}),getAudit:(e=100)=>Z(`/api/audit?limit=${e}`),voiceStatus:(e=!1,t=!1)=>{let n=[e?`probe=1`:``,t?`prepare=1`:``].filter(Boolean).join(`&`);return Z(`/api/voice/status${n?`?${n}`:``}`)},appStatus:()=>Z(`/api/status/overview`),voiceTranscribe:async(e,t={})=>{await L;let n=new AbortController,r=setTimeout(()=>n.abort(),45e3),i;try{i=await fetch(t.partial?`/api/voice/transcribe?partial=1`:`/api/voice/transcribe`,{method:`POST`,headers:{"content-type":`audio/wav`,...t.keep?{"x-sb-voice-keep":`1`}:{}},body:e,signal:n.signal})}catch(e){throw n.signal.aborted?new X(504,`transcription timed out — try again`):e}finally{clearTimeout(r)}let a=await i.json().catch(()=>null);if(!i.ok)throw J(i.status,a),new X(i.status,a?.detail||`transcription failed (${i.status})`);return a},voiceSpeak:async e=>{await L;let t=await fetch(`/api/voice/speak`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:e})});return t.ok?t.blob():null},putVoiceConfig:e=>Z(`/api/local-models/voice`,{method:`PUT`,body:JSON.stringify(e)}),deleteVoiceConfig:()=>Z(`/api/local-models/voice`,{method:`DELETE`}),listPending:()=>Z(`/api/agent/pending`),approveAction:(e,t=null,n=!1)=>Z(`/api/agent/pending/${encodeURIComponent(e)}/approve`,{method:`POST`,body:JSON.stringify({confirm_tool:t,remember:n})}),denyAction:e=>Z(`/api/agent/pending/${encodeURIComponent(e)}/deny`,{method:`POST`}),listRemembered:()=>Z(`/api/agent/remembered`),forgetRemembered:(e,t=null)=>{let n=t?`?host=${encodeURIComponent(t)}`:``;return Z(`/api/agent/remembered/${encodeURIComponent(e)}${n}`,{method:`DELETE`})},listTasks:()=>Z(`/api/tasks`),addTask:e=>Z(`/api/tasks`,{method:`POST`,body:JSON.stringify(e)}),updateTask:(e,t)=>Z(`/api/tasks/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)}),setTaskStatus:(e,t)=>Z(`/api/tasks/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({status:t})}),deleteTask:e=>Z(`/api/tasks/${encodeURIComponent(e)}`,{method:`DELETE`}),listSchedules:()=>Z(`/api/schedules`),addSchedule:e=>Z(`/api/schedules`,{method:`POST`,body:JSON.stringify(e)}),updateSchedule:(e,t)=>Z(`/api/schedules/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)}),setScheduleEnabled:(e,t)=>Z(`/api/schedules/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({enabled:t})}),deleteSchedule:e=>Z(`/api/schedules/${encodeURIComponent(e)}`,{method:`DELETE`}),runSchedule:e=>Z(`/api/schedules/${encodeURIComponent(e)}/run`,{method:`POST`}),listScheduleRuns:e=>Z(`/api/schedules/${encodeURIComponent(e)}/runs`),recentScheduleRuns:()=>Z(`/api/schedules/runs/recent`),unseenScheduleUpdates:()=>Z(`/api/schedules/updates/unseen-count`),markScheduleUpdatesSeen:()=>Z(`/api/schedules/updates/seen`,{method:`POST`}),listMemories:()=>Z(`/api/memories`),addMemory:e=>Z(`/api/memories`,{method:`POST`,body:JSON.stringify({text:e})}),deleteMemory:e=>Z(`/api/memories/${encodeURIComponent(e)}`,{method:`DELETE`}),getProfile:()=>Z(`/api/profile`),setProfile:e=>Z(`/api/profile`,{method:`PUT`,body:JSON.stringify(e)}),listDocs:()=>Z(`/api/kb`),addDoc:(e,t)=>Z(`/api/kb`,{method:`POST`,body:JSON.stringify({title:e,content:t})}),ingestUrl:e=>Z(`/api/kb/ingest-url`,{method:`POST`,body:JSON.stringify({url:e})}),uploadDoc:e=>Z(`/api/kb/upload?filename=${encodeURIComponent(e.name)}`,{method:`POST`,body:e,headers:{"content-type":`application/octet-stream`}}),indexStatus:()=>Z(`/api/kb/index-status`),getDoc:e=>Z(`/api/kb/${encodeURIComponent(e)}`),renameDoc:(e,t)=>Z(`/api/kb/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({title:t})}),setDocTags:(e,t)=>Z(`/api/kb/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({tags:t})}),deleteDoc:e=>Z(`/api/kb/${encodeURIComponent(e)}`,{method:`DELETE`}),searchKb:(e,t=`hybrid`,n=10,r=``)=>Z(`/api/kb/search?${new URLSearchParams({q:e,mode:t,limit:String(n),...r?{vault:r}:{}}).toString()}`),reindexKb:()=>Z(`/api/kb/reindex`,{method:`POST`}),listVaults:()=>Z(`/api/vaults`),createVault:(e,t=``)=>Z(`/api/vaults`,{method:`POST`,body:JSON.stringify({name:e,description:t})}),updateVaultMeta:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)}),deleteVault:(e,t={})=>{let n=t.remove_docs?`?remove_docs=1`:``;return Z(`/api/vaults/${encodeURIComponent(e)}${n}`,{method:`DELETE`})},getVault:e=>Z(`/api/vaults/${encodeURIComponent(e)}`),removeFromVault:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/documents/${encodeURIComponent(t)}`,{method:`DELETE`}),detachFromVault:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/documents/${encodeURIComponent(t)}/detach`,{method:`POST`}),addToVault:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/documents`,{method:`POST`,body:JSON.stringify({doc_ids:t})}),listFeeds:()=>Z(`/api/feeds`),addFeed:(e,t=[])=>Z(`/api/feeds`,{method:`POST`,body:JSON.stringify(t.length?{url:e,tags:t}:{url:e})}),refreshFeed:e=>Z(`/api/feeds/${encodeURIComponent(e)}/refresh`,{method:`POST`}),deleteFeed:(e,t={})=>Z(`/api/feeds/${encodeURIComponent(e)}${t.remove_docs?`?remove_docs=1`:``}`,{method:`DELETE`}),exportVault:async(e,t,n=`sealed`)=>{await L;let r=await fetch(`/api/vaults/${encodeURIComponent(e)}/export`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:t,mode:n})});if(!r.ok){let e=await r.json().catch(()=>null);throw new X(r.status,e?.detail||`export failed (${r.status})`)}let i=Q(r.headers);return{blob:await r.blob(),headers:i}},retireVault:async(e,t)=>{await L;let n=await fetch(`/api/vaults/${encodeURIComponent(e)}/retire`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:t})});if(!n.ok){let e=await n.json().catch(()=>null);throw new X(n.status,e?.detail||`retire failed (${n.status})`)}let r=Q(n.headers);return{blob:await n.blob(),headers:r}},verifyHostedVault:e=>Z(`/api/vaults/${encodeURIComponent(e)}/verify-hosted`,{method:`POST`}),vaultKey:async(e,t)=>{await L;let n=await fetch(`/api/vaults/${encodeURIComponent(e)}/key`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:t})}),r=await n.json().catch(()=>null);if(!n.ok)throw new X(n.status,r?.detail||`could not read the key`);return r.key},subscribeVault:e=>Z(`/api/vaults/subscribe`,{method:`POST`,body:JSON.stringify({url:e})}),importVault:async(e,t)=>{await L;let n=await fetch(`/api/vaults/import?key=${encodeURIComponent(t)}`,{method:`POST`,body:e,headers:{"content-type":`application/octet-stream`}}),r=await n.json().catch(()=>null);if(!n.ok)throw new X(n.status,r?.detail||`import failed`);return r},checkVaultUpdates:e=>Z(`/api/vaults/${encodeURIComponent(e)}/check-updates`,{method:`POST`}),updateVault:e=>Z(`/api/vaults/${encodeURIComponent(e)}/update`,{method:`POST`}),setSubscription:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/subscription`,{method:`PATCH`,body:JSON.stringify(t)}),trustVaultPublisher:(e,t,n)=>Z(`/api/vaults/${encodeURIComponent(e)}/trust-publisher`,{method:`POST`,body:JSON.stringify({offered_pubkey:t,passphrase:n})}),emailStatus:()=>Z(`/api/email/status`),emailConnect:(e,t)=>Z(`/api/email/connect`,{method:`POST`,body:JSON.stringify({client_id:e,client_secret:t})}),emailReconnect:()=>Z(`/api/email/reconnect`,{method:`POST`}),emailDisconnect:()=>Z(`/api/email/disconnect`,{method:`DELETE`}),emailMessages:(e=10)=>Z(`/api/email/messages?limit=${e}`),emailMessage:e=>Z(`/api/email/messages/${encodeURIComponent(e)}`),emailSend:(e,t,n)=>Z(`/api/email/send`,{method:`POST`,body:JSON.stringify({to:e,subject:t,body:n})}),mcpInfo:()=>Z(`/api/mcp`),mcpToken:()=>Z(`/api/mcp/token`),mcpNewToken:()=>Z(`/api/mcp/token`,{method:`POST`}),mcpRevokeToken:()=>Z(`/api/mcp/token`,{method:`DELETE`}),niMcpServers:()=>Z(`/api/ni/mcp-servers`),niMcpAdd:e=>Z(`/api/ni/mcp-servers`,{method:`POST`,body:JSON.stringify(e)}),niMcpUpdate:(e,t)=>Z(`/api/ni/mcp-servers/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)}),niMcpDelete:e=>Z(`/api/ni/mcp-servers/${encodeURIComponent(e)}`,{method:`DELETE`}),niBoard:()=>Z(`/api/ni/board`),niImageDataUrl:async e=>{await L;let t=await fetch(e);if(!t.ok)throw new X(t.status,`image failed (${t.status})`);let n=(t.headers.get(`content-type`)||``).split(`;`)[0].trim();if(!Y.has(n))throw new X(415,`unexpected image type ${n||`(none)`}`);let r=new Uint8Array(await t.arrayBuffer()),i=``;for(let e=0;eZ(`/api/ni/items/${encodeURIComponent(e)}`),niValidate:(e,t,n,r)=>Z(`/api/ni/items/${encodeURIComponent(e)}/validate`,{method:`POST`,body:JSON.stringify({ok:t,...n?{note:n}:{},...r?{presentation_id:r}:{}})}),niRun:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/run`,{method:`POST`}),niCommission:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/commission`,{method:`POST`}),niActivate:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/activate`,{method:`POST`}),niSwitchFeed:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}/switch-feed`,{method:`POST`,body:JSON.stringify({url:t})}),niPatch:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)}),niDelete:e=>Z(`/api/ni/items/${encodeURIComponent(e)}`,{method:`DELETE`}),niPutCredential:(e,t,n,r)=>Z(`/api/ni/items/${encodeURIComponent(e)}/credential`,{method:`PUT`,body:JSON.stringify({name:t,value:n,host:r})}),niIntake:(e,t)=>Z(`/api/ni/intake`,{method:`POST`,body:JSON.stringify(t?{request:e,source_url:t}:{request:e})}),niFlowPickSource:(e,t,n=!1)=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/pick-source`,{method:`POST`,body:JSON.stringify(n?{url:t,pasted:n}:{url:t})}),niFlowAccess:(e,t,n)=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/access`,{method:`POST`,body:JSON.stringify({...t===void 0?{}:{key:t},...n===void 0?{}:{email:n}})}),niFlowFix:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/fix`,{method:`POST`}),niRefine:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}/refine`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({note:t})}),niFlowAnswer:(e,t,n)=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/answer`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t,value:n})}),niFlowReopen:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/reopen`,{method:`POST`}),niFindings:()=>Z(`/api/ni/findings`),niResolveFinding:e=>Z(`/api/ni/findings/${encodeURIComponent(e)}/resolve`,{method:`POST`}),niFlowRetry:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/retry`,{method:`POST`}),niPutParam:(e,t,n)=>Z(`/api/ni/items/${encodeURIComponent(e)}/param`,{method:`PUT`,body:JSON.stringify({name:t,value:n})}),niLibrary:()=>Z(`/api/ni/library`),niLibraryConnect:e=>Z(`/api/ni/library/connect`,{method:`POST`,body:JSON.stringify({url:e})}),niLibraryCheck:()=>Z(`/api/ni/library/check`,{method:`POST`}),niLibraryDisconnect:()=>Z(`/api/ni/library`,{method:`DELETE`}),niLibraryTrustKey:(e,t)=>Z(`/api/ni/library/trust-key`,{method:`POST`,body:JSON.stringify({offered_fingerprint:e,passphrase:t})}),niLibraryInstall:(e,t)=>Z(`/api/ni/library/install`,{method:`POST`,body:JSON.stringify({template_id:e,params:t})}),niApplyTemplateUpdate:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/apply-template-update`,{method:`POST`}),niL2Apply:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/l2-proposal/apply`,{method:`POST`}),niL2Dismiss:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/l2-proposal/dismiss`,{method:`POST`}),niRepairPolicy:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}/repair-policy`,{method:`POST`,body:JSON.stringify(t)}),libraryStatus:()=>Z(`/api/library/status`),libraryInstall:()=>Z(`/api/library/install`,{method:`POST`}),libraryTaxonomy:()=>Z(`/api/library/taxonomy`),librarySources:(e={})=>{let t=new URLSearchParams;e.q&&t.set(`q`,e.q),e.category&&t.set(`category`,e.category),e.subcategory&&t.set(`subcategory`,e.subcategory),e.tier&&t.set(`tier`,e.tier),e.status&&t.set(`status`,e.status),e.offset!==void 0&&t.set(`offset`,String(e.offset)),e.limit!==void 0&&t.set(`limit`,String(e.limit));let n=t.toString();return Z(`/api/library/sources${n?`?${n}`:``}`)},librarySource:e=>Z(`/api/library/sources/${encodeURIComponent(e)}`),libraryLocal:()=>Z(`/api/library/local`),libraryLocalAdd:e=>Z(`/api/library/local`,{method:`POST`,body:JSON.stringify(e)}),libraryLocalDelete:e=>Z(`/api/library/local/${encodeURIComponent(e)}`,{method:`DELETE`}),listDevices:()=>Z(`/api/devices`),createDevice:e=>Z(`/api/devices`,{method:`POST`,body:JSON.stringify({label:e})}),deleteDevice:e=>Z(`/api/devices/${encodeURIComponent(e)}`,{method:`DELETE`}),startPairCode:e=>Z(`/api/devices/pair-code`,{method:`POST`,body:JSON.stringify({label:e})}),cancelPairCode:()=>Z(`/api/devices/pair-code`,{method:`DELETE`}),pairCodeStatus:()=>Z(`/api/devices/pair-code`)};export{G as a,h as c,H as i,ae as n,R as o,ie as r,B as s,X as t}; \ No newline at end of file +import{$ as e}from"./BChu7Pos.js";import{t}from"./wsL2lAx0.js";import"./BB_QGgHe.js";import{a as n,c as r,d as i,f as a,g as o,i as s,l as c,m as l,n as u,p as d,r as f,t as p,u as m,v as ee}from"./CQMDLFxa.js";function te(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=``,r=``;for(let e of t)e.type===`candidate-pair`&&(e.nominated||e.state===`succeeded`)&&(n=e.localCandidateId??``,r=e.remoteCandidateId??``);if(!n||!r)return`unknown`;let i=``,a=``;for(let e of t)e.id===n?i=e.candidateType??``:e.id===r&&(a=e.candidateType??``);return i===`relay`||a===`relay`?`relay`:i&&a?`direct`:`unknown`}var h=e({status:`idle`,detail:``,needsPairing:!1});function g(e,t=``){h.status=e,h.detail=t}var _=3e3,v=6e4,y=1e3,b=3e4,x=15e3,S=6,C=2e4,w=45e3,T=800,ne=`Desktop unreachable — it may be off or asleep. If it's on a VPN, turning the VPN off on the Desktop often fixes this — then Retry.`,E=`your Desktop is locked — unlock it there, then this phone reconnects`,re=class{pairing;pc=null;ws=null;channel=null;pending=new Map;ready=null;markReady=null;failReady=null;nonceB64=``;desktopVerified=!1;lockedHint=!1;seq=0;closed=!1;reconnects=0;connectTimer=null;pingTimer=null;verifyTimer=null;lastPong=0;offerSent=!1;iceWaitTimer=null;constructor(e){this.pairing=e}connect(){this.closed=!1,this.offerSent=!1,this.ready=new Promise((e,t)=>{this.markReady=e,this.failReady=t}),this.ready.catch(()=>{}),g(`connecting`),this.connectTimer=setTimeout(()=>this.onConnectFailure(),x),this.pc=new RTCPeerConnection({iceServers:this.pairing.iceServers}),this.pc.onconnectionstatechange=()=>this.onPcState(),this.channel=this.pc.createDataChannel(`sb-api`),this.channel.onopen=()=>this.startHandshake(),this.channel.onmessage=e=>this.onChannelMessage(String(e.data)),this.openSignaling()}openSignaling(){let e=new WebSocket(this.pairing.signalingUrl);this.ws=e,e.onopen=()=>{e.send(JSON.stringify({role:`phone`,desktop_id:this.pairing.desktopId})),this.iceWaitTimer=setTimeout(()=>void this.makeOffer(),T)},e.onerror=()=>g(`offline`,`can't reach the signaling service`),e.onmessage=e=>this.onSignal(String(e.data))}async makeOffer(){if(!this.pc||this.offerSent)return;this.offerSent=!0,this.iceWaitTimer&&=(clearTimeout(this.iceWaitTimer),null),await this.pc.setLocalDescription(await this.pc.createOffer()),await this.iceGatheringDone();let e=this.pc.localDescription?.sdp??``;this.send({type:`offer`,sdp:e})}iceGatheringDone(){let e=this.pc;return!e||e.iceGatheringState===`complete`?Promise.resolve():new Promise(t=>{let n=()=>{e.iceGatheringState===`complete`&&r()},r=()=>{e.removeEventListener(`icegatheringstatechange`,n),clearTimeout(i),t()},i=setTimeout(r,_);e.addEventListener(`icegatheringstatechange`,n)})}async onSignal(e){let t;try{t=JSON.parse(e)}catch{return}if(t.type===`ice`&&Array.isArray(t.iceServers)){if(this.pc&&!this.offerSent)try{this.pc.setConfiguration({iceServers:t.iceServers})}catch{}this.makeOffer()}else t.type===`answer`&&t.sdp&&this.pc?await this.pc.setRemoteDescription({type:`answer`,sdp:t.sdp}):t.type===`error`&&g(`offline`,t.detail||`the Desktop isn't reachable`)}startHandshake(){this.nonceB64=u(),this.send(void 0,c(this.nonceB64))}async onChannelMessage(e){let t;try{t=d(e)}catch{return}let r=t.type;if(r===`hello_ok`)return this.onHelloOk(t);if(r===`locked_challenge`&&!this.desktopVerified)this.send({type:`whoami`,device_id:this.pairing.deviceId});else if(r===`auth_error`&&t.reason===`locked`&&!this.desktopVerified)this.lockedHint=!0,this.onConnectFailure();else if(this.desktopVerified){if(r===`auth_ok`)return this.onAuthOk();if(r===`pong`)this.lastPong=Date.now();else if(r===`auth_error`)g(`offline`,t.reason===`locked`?E:`this device isn't authorized — re-pair`),this.failReady?.(Error(`auth_error`)),this.close();else{if(a(t))return this.onChunkFrame(t);typeof t.status==`number`&&this.resolvePending(n(t))}}}async onHelloOk(e){g(`verifying`);let t=this.pc?.localDescription?.sdp??``,n=this.pc?.remoteDescription?.sdp??``,i=!1;try{let r=await p(t,n);i=await f(this.pairing.desktopPubkey,this.nonceB64,r,String(e.signature??``))}catch{i=!1}!i||e.pubkey!==this.pairing.desktopPubkey?(g(`untrusted`,`couldn't verify your Desktop — connection blocked`),this.failReady?.(Error(`untrusted`)),this.close()):(this.desktopVerified=!0,this.send(void 0,r(this.pairing.deviceId,this.pairing.credential)))}async onAuthOk(){this.connectTimer&&=(clearTimeout(this.connectTimer),null),this.lastPong=Date.now(),this.pingTimer=setInterval(()=>this.pingTick(),C);let e=await this.connectionKind();g(e===`relay`?`connected-relay`:e===`direct`?`connected-direct`:`connected`),this.markReady?.()}async connectionKind(){if(!this.pc)return`unknown`;try{return te(await this.pc.getStats())}catch{return`unknown`}}pingTick(){this.closed||this.channel?.readyState!==`open`||(l(this.lastPong,Date.now(),w)?this.onConnectFailure():this.send(void 0,m(Date.now())))}onPcState(){let e=this.pc?.connectionState;this.closed||(e===`connected`&&(this.reconnects=0),e===`connected`&&(this.lockedHint=!1),(e===`failed`||e===`disconnected`)&&this.onConnectFailure())}onConnectFailure(){if(this.closed)return;if(this.teardown(),this.reconnects>=S){this.failTerminal();return}g(`reconnecting`,this.lockedHint?E:``);let e=Math.min(b,y*2**this.reconnects),t=e/2+e/2*Math.random();this.reconnects+=1,setTimeout(()=>{this.closed||this.connect()},t)}failTerminal(){this.closed=!0,this.teardown(),g(`offline`,this.lockedHint?E:ne)}async request(e,t,n,r){if(!this.ready)throw Error(`not connecting`);await this.ready;let a=String(++this.seq),o=i(a,e,t,n,r);return new Promise((e,t)=>{let n=setTimeout(()=>{this.pending.delete(a),t(Error(`remote request timed out`))},v);this.pending.set(a,{resolve:e,reject:t,timer:n,chunks:null});try{for(let e of o)this.channel?.send(e)}catch(e){clearTimeout(n),this.pending.delete(a),t(e instanceof Error?e:Error(`send failed`))}})}isLive(){let e=this.pc?.connectionState;return e===`new`||e===`connecting`||e===`connected`}verify(e=2500){if(this.closed)return;if(!this.isLive()||this.channel?.readyState!==`open`){this.onConnectFailure();return}if(this.lastPong===0)return;let t=this.lastPong;try{this.send(void 0,m(Date.now()))}catch{this.onConnectFailure();return}this.verifyTimer&&clearTimeout(this.verifyTimer),this.verifyTimer=setTimeout(()=>{this.verifyTimer=null,!this.closed&&this.lastPong===t&&this.onConnectFailure()},e)}onChunkFrame(e){let t=String(e.id??``),n=this.pending.get(t);if(!n)return;let r=s(n.chunks,e);r.error?(clearTimeout(n.timer),this.pending.delete(t),n.reject(Error(r.error))):r.done?this.resolvePending(r.done):(n.chunks=r.state??null,clearTimeout(n.timer),n.timer=setTimeout(()=>{this.pending.delete(t),n.reject(Error(`remote request timed out`))},v))}resolvePending(e){let t=this.pending.get(e.id);t&&(clearTimeout(t.timer),this.pending.delete(e.id),t.resolve(e))}send(e,t){let n=t??JSON.stringify(e);t&&this.channel?.readyState===`open`?this.channel.send(t):e&&this.ws?.send(n)}teardown(){this.connectTimer&&=(clearTimeout(this.connectTimer),null),this.iceWaitTimer&&=(clearTimeout(this.iceWaitTimer),null),this.pingTimer&&=(clearInterval(this.pingTimer),null),this.verifyTimer&&=(clearTimeout(this.verifyTimer),null),this.lastPong=0,this.desktopVerified=!1;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(Error(`connection dropped`));this.pending.clear();try{this.ws?.close()}catch{}try{this.pc?.close()}catch{}this.ws=this.pc=this.channel=null}close(){this.closed=!0,this.teardown()}},D=null;function O(e){return D?.close(),D=new re(e),D.connect(),D}function k(){D?.close(),D=null}function A(){return D}var j={"content-type":`application/json`};async function M(){try{return(await fetch(`/api/health?${ee}=1`,{cache:`no-store`,signal:AbortSignal.timeout(2e3)})).ok}catch{return!1}}async function N(){for(let e=0;e<3;e++)if(await new Promise(e=>setTimeout(e,700)),await M())return!0;return!1}async function P(e,t,n,r,i){let a=typeof e==`string`?e:e instanceof URL?e.href:e.url,o=new URL(a,i),s=o.pathname.startsWith(`/api`)||o.pathname.startsWith(`/mcp`);if(!n||!s||o.searchParams.has(`__direct`))return r(e,t);let c=new Request(e,t),l={};c.headers.forEach((e,t)=>l[t]=e);let u=[`GET`,`HEAD`].includes(c.method)?new Uint8Array:new Uint8Array(await c.arrayBuffer());try{let e=await n.request(c.method,o.pathname+o.search,l,u);return new Response(e.body,{status:e.status,headers:e.headers})}catch{return new Response(JSON.stringify({detail:`remote request failed`}),{status:503,headers:j})}}function F(e){let t=window.fetch.bind(window);window.fetch=(n,r)=>{if(h.status===`offline`){let t=typeof n==`string`?n:n instanceof URL?n.href:n.url,r=new URL(t,window.location.origin).pathname;(r.startsWith(`/api`)||r.startsWith(`/mcp`))&&O(e)}return P(n,r,A(),t,window.location.origin)}}var I=()=>{},L=new Promise(e=>{I=e});async function R(){try{await z()}finally{I()}}async function z(){if(typeof navigator>`u`||!(`serviceWorker`in navigator))return;let e=await o().catch(()=>null);if(!e){h.needsPairing=!(await M()||await N());return}if(await M())return;O(e),F(e);let t,n=()=>{t&&clearTimeout(t),t=void 0},r=()=>{n();let t=A();!t||h.status===`offline`||h.status===`reconnecting`||!t.isLive()?O(e):t.verify()};window.addEventListener(`pagehide`,()=>{n(),k()}),window.addEventListener(`pageshow`,r),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?(n(),t=setTimeout(()=>{t=void 0,k()},18e4)):r()})}function B(){typeof navigator<`u`&&`serviceWorker`in navigator&&navigator.serviceWorker.ready.then(e=>e.update()).catch(()=>{})}var V=null;function H(e){V=e}function U(){V?.(),q()}var W=null;function G(e){W=e}function K(){W?.(),q()}function q(){typeof window<`u`&&window.location.pathname.startsWith(`/unlock`)||t(`/unlock`)}function J(e,t){e===423?U():e===401&&t?.code===`no_session`&&K()}var Y=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),X=class extends Error{status;code;constructor(e,t,n){super(t),this.status=e,this.code=n,this.name=`ApiError`}};async function Z(e,t={}){await L;let n=await fetch(e,{...t,headers:{"content-type":`application/json`,...t.headers??{}}}),r=n.status===204?null:await n.json().catch(()=>null);if(!n.ok){let e=r&&r.detail||`request failed (${n.status})`;throw J(n.status,r),new X(n.status,e,r?.code)}return r}function ie(e){return!!e&&e.unlocked&&e.session!==!1}function Q(e){console.assert(e instanceof Headers,`parseExportHeaders: real Headers instance required`),console.assert(typeof e.get==`function`,`parseExportHeaders: h.get missing`);let t=e.get(`x-sb-export-seq`),n=t===null?NaN:Number.parseInt(t,10),r=e.get(`x-sb-export-mode`);return{seq:Number.isFinite(n)?n:null,mode:r===`sealed`||r===`open`?r:null,unchanged:e.get(`x-sb-export-unchanged`)===`1`,rotatedKey:e.get(`x-sb-export-rotated-key`)===`1`,retired:e.get(`x-sb-export-retired`)===`1`}}function $(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??``}catch{return``}}var ae={health:()=>Z(`/api/health`,{headers:$()?{"x-smartbrain-timezone":$()}:{}}),accountStatus:()=>Z(`/api/account/status`),installUpdate:()=>Z(`/api/update/install`,{method:`POST`,body:JSON.stringify({})}),setup:e=>Z(`/api/account/setup`,{method:`POST`,body:JSON.stringify({passphrase:e})}),unlock:e=>Z(`/api/account/unlock`,{method:`POST`,body:JSON.stringify(e)}),lock:()=>Z(`/api/account/lock`,{method:`POST`}),changePassphrase:(e,t)=>Z(`/api/account/passphrase`,{method:`POST`,body:JSON.stringify({current_passphrase:e,new_passphrase:t})}),resetPassphrase:(e,t)=>Z(`/api/account/passphrase/reset`,{method:`POST`,body:JSON.stringify({new_passphrase:e,recovery_key:t})}),exportData:e=>Z(`/api/export`,{method:`POST`,body:JSON.stringify({passphrase:e})}),backup:async e=>{await L;let t=await fetch(`/api/backup`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:e})});if(!t.ok){let e=await t.json().catch(()=>null);throw new X(t.status,e?.detail||`backup failed (${t.status})`)}return t.blob()},restore:async e=>{await L;let t=await fetch(`/api/restore`,{method:`POST`,body:e}),n=await t.json().catch(()=>null);if(!t.ok)throw new X(t.status,n?.detail||`restore failed (${t.status})`);return n},listSecrets:()=>Z(`/api/secrets`),putSecret:(e,t)=>Z(`/api/secrets/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify({value:t})}),deleteSecret:e=>Z(`/api/secrets/${encodeURIComponent(e)}`,{method:`DELETE`}),localModels:(e=!1)=>Z(`/api/local-models${e?`?fresh=1`:``}`),listModels:()=>Z(`/api/models`),getRoutes:()=>Z(`/api/routes`),putRoutes:e=>Z(`/api/routes`,{method:`PUT`,body:JSON.stringify({routes:e})}),getContextLengths:()=>Z(`/api/model-context-lengths`),putContextLengths:e=>Z(`/api/model-context-lengths`,{method:`PUT`,body:JSON.stringify({lengths:e})}),getUsage:e=>{let t=new URLSearchParams;e?.since&&t.set(`since`,e.since),e?.until&&t.set(`until`,e.until);let n=t.toString();return Z(`/api/usage${n?`?${n}`:``}`)},putOllama:e=>Z(`/api/local-models/ollama`,{method:`PUT`,body:JSON.stringify({url:e})}),putMlx:(e,t)=>Z(`/api/local-models/mlx`,{method:`PUT`,body:JSON.stringify({url:e,api_key:t})}),putMlxe:(e,t)=>Z(`/api/local-models/mlxe`,{method:`PUT`,body:JSON.stringify({url:e,api_key:t})}),putClaudeCode:()=>Z(`/api/local-models/claudecode`,{method:`PUT`}),updateClaudeCode:()=>Z(`/api/local-models/claudecode/update`,{method:`POST`}),deleteLocalModel:e=>Z(`/api/local-models/${e}`,{method:`DELETE`}),chat:e=>Z(`/api/chat`,{method:`POST`,body:JSON.stringify(e)}),agentTurn:e=>Z(`/api/agent/turn`,{method:`POST`,body:JSON.stringify(e)}),feedback:(e,t)=>Z(`/api/feedback`,{method:`POST`,body:JSON.stringify({kind:e,conversation_id:t})}).catch(()=>void 0),agentResume:e=>Z(`/api/agent/resume/${encodeURIComponent(e)}`,{method:`POST`}),agentTurnStream:async(e,t)=>{await L;let n=await fetch(`/api/agent/turn/stream`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t});if(!n.ok){let e=await n.json().catch(()=>null);throw J(n.status,e),new X(n.status,e?.detail||`stream failed (${n.status})`)}return n},agentTurnEvents:async e=>{await L;let t=await fetch(`/api/agent/turn/events`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>null);throw J(t.status,e),new X(t.status,e?.detail||`turn failed (${t.status})`)}return t},getWebSearch:()=>Z(`/api/websearch`),putWebSearch:e=>Z(`/api/websearch`,{method:`PUT`,body:JSON.stringify(e)}),getSelfImprove:()=>Z(`/api/selfimprove`),putSelfImprove:e=>Z(`/api/selfimprove`,{method:`PUT`,body:JSON.stringify(e)}),getOptimizer:()=>Z(`/api/selfimprove/optimizer`),putOptimizer:e=>Z(`/api/selfimprove/optimizer`,{method:`PUT`,body:JSON.stringify({enabled:e})}),listImprovements:()=>Z(`/api/selfimprove/improvements`),listConversations:(e={})=>{let t=new URLSearchParams;e.before&&t.set(`before`,e.before),e.limit&&t.set(`limit`,String(e.limit));let n=t.toString();return Z(`/api/conversations${n?`?${n}`:``}`)},createConversation:e=>Z(`/api/conversations`,{method:`POST`,body:JSON.stringify({title:e})}),getConversation:(e,t={})=>{let n=new URLSearchParams;t.before&&n.set(`before`,t.before),t.limit&&n.set(`limit`,String(t.limit));let r=n.toString();return Z(`/api/conversations/${encodeURIComponent(e)}${r?`?${r}`:``}`)},renameConversation:(e,t)=>Z(`/api/conversations/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({title:t})}),deleteConversation:e=>Z(`/api/conversations/${encodeURIComponent(e)}`,{method:`DELETE`}),deleteAllConversations:()=>Z(`/api/conversations`,{method:`DELETE`}),listTrash:()=>Z(`/api/conversations/trash`),emptyTrash:()=>Z(`/api/conversations/trash`,{method:`DELETE`}),restoreConversation:e=>Z(`/api/conversations/${encodeURIComponent(e)}/restore`,{method:`POST`}),addMessage:(e,t,n,r)=>Z(`/api/conversations/${encodeURIComponent(e)}/messages`,{method:`POST`,body:JSON.stringify(r?.length?{role:t,content:n,sources:r}:{role:t,content:n})}),listToolDefs:()=>Z(`/api/tools`),invokeTool:(e,t)=>Z(`/api/tools/invoke`,{method:`POST`,body:JSON.stringify({name:e,args:t})}),getAudit:(e=100)=>Z(`/api/audit?limit=${e}`),voiceStatus:(e=!1,t=!1)=>{let n=[e?`probe=1`:``,t?`prepare=1`:``].filter(Boolean).join(`&`);return Z(`/api/voice/status${n?`?${n}`:``}`)},appStatus:()=>Z(`/api/status/overview`),voiceTranscribe:async(e,t={})=>{await L;let n=new AbortController,r=setTimeout(()=>n.abort(),45e3),i;try{i=await fetch(t.partial?`/api/voice/transcribe?partial=1`:`/api/voice/transcribe`,{method:`POST`,headers:{"content-type":`audio/wav`,...t.keep?{"x-sb-voice-keep":`1`}:{}},body:e,signal:n.signal})}catch(e){throw n.signal.aborted?new X(504,`transcription timed out — try again`):e}finally{clearTimeout(r)}let a=await i.json().catch(()=>null);if(!i.ok)throw J(i.status,a),new X(i.status,a?.detail||`transcription failed (${i.status})`);return a},voiceSpeak:async e=>{await L;let t=await fetch(`/api/voice/speak`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:e})});return t.ok?t.blob():null},putVoiceConfig:e=>Z(`/api/local-models/voice`,{method:`PUT`,body:JSON.stringify(e)}),deleteVoiceConfig:()=>Z(`/api/local-models/voice`,{method:`DELETE`}),listPending:()=>Z(`/api/agent/pending`),approveAction:(e,t=null,n=!1)=>Z(`/api/agent/pending/${encodeURIComponent(e)}/approve`,{method:`POST`,body:JSON.stringify({confirm_tool:t,remember:n})}),denyAction:e=>Z(`/api/agent/pending/${encodeURIComponent(e)}/deny`,{method:`POST`}),listRemembered:()=>Z(`/api/agent/remembered`),forgetRemembered:(e,t=null)=>{let n=t?`?host=${encodeURIComponent(t)}`:``;return Z(`/api/agent/remembered/${encodeURIComponent(e)}${n}`,{method:`DELETE`})},listTasks:()=>Z(`/api/tasks`),addTask:e=>Z(`/api/tasks`,{method:`POST`,body:JSON.stringify(e)}),updateTask:(e,t)=>Z(`/api/tasks/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)}),setTaskStatus:(e,t)=>Z(`/api/tasks/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({status:t})}),deleteTask:e=>Z(`/api/tasks/${encodeURIComponent(e)}`,{method:`DELETE`}),listSchedules:()=>Z(`/api/schedules`),addSchedule:e=>Z(`/api/schedules`,{method:`POST`,body:JSON.stringify(e)}),updateSchedule:(e,t)=>Z(`/api/schedules/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)}),setScheduleEnabled:(e,t)=>Z(`/api/schedules/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({enabled:t})}),deleteSchedule:e=>Z(`/api/schedules/${encodeURIComponent(e)}`,{method:`DELETE`}),runSchedule:e=>Z(`/api/schedules/${encodeURIComponent(e)}/run`,{method:`POST`}),listScheduleRuns:e=>Z(`/api/schedules/${encodeURIComponent(e)}/runs`),recentScheduleRuns:()=>Z(`/api/schedules/runs/recent`),unseenScheduleUpdates:()=>Z(`/api/schedules/updates/unseen-count`),markScheduleUpdatesSeen:()=>Z(`/api/schedules/updates/seen`,{method:`POST`}),listMemories:()=>Z(`/api/memories`),addMemory:e=>Z(`/api/memories`,{method:`POST`,body:JSON.stringify({text:e})}),deleteMemory:e=>Z(`/api/memories/${encodeURIComponent(e)}`,{method:`DELETE`}),getProfile:()=>Z(`/api/profile`),setProfile:e=>Z(`/api/profile`,{method:`PUT`,body:JSON.stringify(e)}),listDocs:()=>Z(`/api/kb`),addDoc:(e,t)=>Z(`/api/kb`,{method:`POST`,body:JSON.stringify({title:e,content:t})}),ingestUrl:e=>Z(`/api/kb/ingest-url`,{method:`POST`,body:JSON.stringify({url:e})}),uploadDoc:e=>Z(`/api/kb/upload?filename=${encodeURIComponent(e.name)}`,{method:`POST`,body:e,headers:{"content-type":`application/octet-stream`}}),indexStatus:()=>Z(`/api/kb/index-status`),getDoc:e=>Z(`/api/kb/${encodeURIComponent(e)}`),renameDoc:(e,t)=>Z(`/api/kb/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({title:t})}),setDocTags:(e,t)=>Z(`/api/kb/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify({tags:t})}),deleteDoc:e=>Z(`/api/kb/${encodeURIComponent(e)}`,{method:`DELETE`}),searchKb:(e,t=`hybrid`,n=10,r=``)=>Z(`/api/kb/search?${new URLSearchParams({q:e,mode:t,limit:String(n),...r?{vault:r}:{}}).toString()}`),reindexKb:()=>Z(`/api/kb/reindex`,{method:`POST`}),listVaults:()=>Z(`/api/vaults`),createVault:(e,t=``)=>Z(`/api/vaults`,{method:`POST`,body:JSON.stringify({name:e,description:t})}),updateVaultMeta:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)}),deleteVault:(e,t={})=>{let n=t.remove_docs?`?remove_docs=1`:``;return Z(`/api/vaults/${encodeURIComponent(e)}${n}`,{method:`DELETE`})},getVault:e=>Z(`/api/vaults/${encodeURIComponent(e)}`),removeFromVault:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/documents/${encodeURIComponent(t)}`,{method:`DELETE`}),detachFromVault:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/documents/${encodeURIComponent(t)}/detach`,{method:`POST`}),addToVault:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/documents`,{method:`POST`,body:JSON.stringify({doc_ids:t})}),listFeeds:()=>Z(`/api/feeds`),addFeed:(e,t=[])=>Z(`/api/feeds`,{method:`POST`,body:JSON.stringify(t.length?{url:e,tags:t}:{url:e})}),refreshFeed:e=>Z(`/api/feeds/${encodeURIComponent(e)}/refresh`,{method:`POST`}),deleteFeed:(e,t={})=>Z(`/api/feeds/${encodeURIComponent(e)}${t.remove_docs?`?remove_docs=1`:``}`,{method:`DELETE`}),exportVault:async(e,t,n=`sealed`)=>{await L;let r=await fetch(`/api/vaults/${encodeURIComponent(e)}/export`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:t,mode:n})});if(!r.ok){let e=await r.json().catch(()=>null);throw new X(r.status,e?.detail||`export failed (${r.status})`)}let i=Q(r.headers);return{blob:await r.blob(),headers:i}},retireVault:async(e,t)=>{await L;let n=await fetch(`/api/vaults/${encodeURIComponent(e)}/retire`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:t})});if(!n.ok){let e=await n.json().catch(()=>null);throw new X(n.status,e?.detail||`retire failed (${n.status})`)}let r=Q(n.headers);return{blob:await n.blob(),headers:r}},verifyHostedVault:e=>Z(`/api/vaults/${encodeURIComponent(e)}/verify-hosted`,{method:`POST`}),vaultKey:async(e,t)=>{await L;let n=await fetch(`/api/vaults/${encodeURIComponent(e)}/key`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({passphrase:t})}),r=await n.json().catch(()=>null);if(!n.ok)throw new X(n.status,r?.detail||`could not read the key`);return r.key},subscribeVault:e=>Z(`/api/vaults/subscribe`,{method:`POST`,body:JSON.stringify({url:e})}),importVault:async(e,t)=>{await L;let n=await fetch(`/api/vaults/import?key=${encodeURIComponent(t)}`,{method:`POST`,body:e,headers:{"content-type":`application/octet-stream`}}),r=await n.json().catch(()=>null);if(!n.ok)throw new X(n.status,r?.detail||`import failed`);return r},checkVaultUpdates:e=>Z(`/api/vaults/${encodeURIComponent(e)}/check-updates`,{method:`POST`}),updateVault:e=>Z(`/api/vaults/${encodeURIComponent(e)}/update`,{method:`POST`}),setSubscription:(e,t)=>Z(`/api/vaults/${encodeURIComponent(e)}/subscription`,{method:`PATCH`,body:JSON.stringify(t)}),trustVaultPublisher:(e,t,n)=>Z(`/api/vaults/${encodeURIComponent(e)}/trust-publisher`,{method:`POST`,body:JSON.stringify({offered_pubkey:t,passphrase:n})}),emailStatus:()=>Z(`/api/email/status`),emailConnect:(e,t)=>Z(`/api/email/connect`,{method:`POST`,body:JSON.stringify({client_id:e,client_secret:t})}),emailReconnect:()=>Z(`/api/email/reconnect`,{method:`POST`}),emailDisconnect:()=>Z(`/api/email/disconnect`,{method:`DELETE`}),emailMessages:(e=10)=>Z(`/api/email/messages?limit=${e}`),emailMessage:e=>Z(`/api/email/messages/${encodeURIComponent(e)}`),emailSend:(e,t,n)=>Z(`/api/email/send`,{method:`POST`,body:JSON.stringify({to:e,subject:t,body:n})}),mcpInfo:()=>Z(`/api/mcp`),mcpToken:()=>Z(`/api/mcp/token`),mcpNewToken:()=>Z(`/api/mcp/token`,{method:`POST`}),mcpRevokeToken:()=>Z(`/api/mcp/token`,{method:`DELETE`}),niMcpServers:()=>Z(`/api/ni/mcp-servers`),niMcpAdd:e=>Z(`/api/ni/mcp-servers`,{method:`POST`,body:JSON.stringify(e)}),niMcpUpdate:(e,t)=>Z(`/api/ni/mcp-servers/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)}),niMcpDelete:e=>Z(`/api/ni/mcp-servers/${encodeURIComponent(e)}`,{method:`DELETE`}),niBoard:()=>Z(`/api/ni/board`),niImageDataUrl:async e=>{await L;let t=await fetch(e);if(!t.ok)throw new X(t.status,`image failed (${t.status})`);let n=(t.headers.get(`content-type`)||``).split(`;`)[0].trim();if(!Y.has(n))throw new X(415,`unexpected image type ${n||`(none)`}`);let r=new Uint8Array(await t.arrayBuffer()),i=``;for(let e=0;eZ(`/api/ni/items/${encodeURIComponent(e)}`),niValidate:(e,t,n,r)=>Z(`/api/ni/items/${encodeURIComponent(e)}/validate`,{method:`POST`,body:JSON.stringify({ok:t,...n?{note:n}:{},...r?{presentation_id:r}:{}})}),niRun:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/run`,{method:`POST`}),niCommission:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/commission`,{method:`POST`}),niActivate:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/activate`,{method:`POST`}),niSwitchFeed:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}/switch-feed`,{method:`POST`,body:JSON.stringify({url:t})}),niPatch:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)}),niDelete:e=>Z(`/api/ni/items/${encodeURIComponent(e)}`,{method:`DELETE`}),niPutCredential:(e,t,n,r)=>Z(`/api/ni/items/${encodeURIComponent(e)}/credential`,{method:`PUT`,body:JSON.stringify({name:t,value:n,host:r})}),niIntake:(e,t)=>Z(`/api/ni/intake`,{method:`POST`,body:JSON.stringify(t?{request:e,source_url:t}:{request:e})}),niFlowPickSource:(e,t,n=!1)=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/pick-source`,{method:`POST`,body:JSON.stringify(n?{url:t,pasted:n}:{url:t})}),niFlowAccess:(e,t,n)=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/access`,{method:`POST`,body:JSON.stringify({...t===void 0?{}:{key:t},...n===void 0?{}:{email:n}})}),niFlowFix:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/fix`,{method:`POST`}),niRefine:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}/refine`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({note:t})}),niFlowAnswer:(e,t,n)=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/answer`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t,value:n})}),niFlowReopen:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/reopen`,{method:`POST`}),niFindings:()=>Z(`/api/ni/findings`),niResolveFinding:e=>Z(`/api/ni/findings/${encodeURIComponent(e)}/resolve`,{method:`POST`}),niFlowRetry:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/flow/retry`,{method:`POST`}),niPutParam:(e,t,n)=>Z(`/api/ni/items/${encodeURIComponent(e)}/param`,{method:`PUT`,body:JSON.stringify({name:t,value:n})}),niLibrary:()=>Z(`/api/ni/library`),niLibraryConnect:e=>Z(`/api/ni/library/connect`,{method:`POST`,body:JSON.stringify({url:e})}),niLibraryCheck:()=>Z(`/api/ni/library/check`,{method:`POST`}),niLibraryDisconnect:()=>Z(`/api/ni/library`,{method:`DELETE`}),niLibraryTrustKey:(e,t)=>Z(`/api/ni/library/trust-key`,{method:`POST`,body:JSON.stringify({offered_fingerprint:e,passphrase:t})}),niLibraryInstall:(e,t)=>Z(`/api/ni/library/install`,{method:`POST`,body:JSON.stringify({template_id:e,params:t})}),niApplyTemplateUpdate:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/apply-template-update`,{method:`POST`}),niL2Apply:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/l2-proposal/apply`,{method:`POST`}),niL2Dismiss:e=>Z(`/api/ni/items/${encodeURIComponent(e)}/l2-proposal/dismiss`,{method:`POST`}),niRepairPolicy:(e,t)=>Z(`/api/ni/items/${encodeURIComponent(e)}/repair-policy`,{method:`POST`,body:JSON.stringify(t)}),libraryStatus:()=>Z(`/api/library/status`),libraryInstall:()=>Z(`/api/library/install`,{method:`POST`}),libraryTaxonomy:()=>Z(`/api/library/taxonomy`),librarySources:(e={})=>{let t=new URLSearchParams;e.q&&t.set(`q`,e.q),e.category&&t.set(`category`,e.category),e.subcategory&&t.set(`subcategory`,e.subcategory),e.tier&&t.set(`tier`,e.tier),e.status&&t.set(`status`,e.status),e.offset!==void 0&&t.set(`offset`,String(e.offset)),e.limit!==void 0&&t.set(`limit`,String(e.limit));let n=t.toString();return Z(`/api/library/sources${n?`?${n}`:``}`)},librarySource:e=>Z(`/api/library/sources/${encodeURIComponent(e)}`),libraryLocal:()=>Z(`/api/library/local`),libraryLocalAdd:e=>Z(`/api/library/local`,{method:`POST`,body:JSON.stringify(e)}),libraryLocalDelete:e=>Z(`/api/library/local/${encodeURIComponent(e)}`,{method:`DELETE`}),listDevices:()=>Z(`/api/devices`),createDevice:e=>Z(`/api/devices`,{method:`POST`,body:JSON.stringify({label:e})}),deleteDevice:e=>Z(`/api/devices/${encodeURIComponent(e)}`,{method:`DELETE`}),startPairCode:e=>Z(`/api/devices/pair-code`,{method:`POST`,body:JSON.stringify({label:e})}),cancelPairCode:()=>Z(`/api/devices/pair-code`,{method:`DELETE`}),pairCodeStatus:()=>Z(`/api/devices/pair-code`)};export{G as a,h as c,H as i,ae as n,R as o,ie as r,B as s,X as t}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/TDZ5a5AF.js b/app/smartbrain_3000/web/_app/immutable/chunks/CJp6lm4P.js similarity index 90% rename from app/smartbrain_3000/web/_app/immutable/chunks/TDZ5a5AF.js rename to app/smartbrain_3000/web/_app/immutable/chunks/CJp6lm4P.js index f5ce8cd6..df4b474e 100644 --- a/app/smartbrain_3000/web/_app/immutable/chunks/TDZ5a5AF.js +++ b/app/smartbrain_3000/web/_app/immutable/chunks/CJp6lm4P.js @@ -1 +1 @@ -import{V as e,et as t,tt as n}from"./BChu7Pos.js";import{a as r,i,n as a,t as o}from"./w1k7z_2C.js";var s=new class{#e=n(null);get status(){return e(this.#e)}set status(e){t(this.#e,e,!0)}#t=n(!1);get loading(){return e(this.#t)}set loading(e){t(this.#t,e,!0)}#n=n(``);get error(){return e(this.#n)}set error(e){t(this.#n,e,!0)}#r=null;load(){return this.#r||=this.#i(),this.#r}async#i(){this.loading=!0,this.error=``;try{this.status=await a.accountStatus()}catch(e){this.error=e instanceof o?e.message:`Cannot reach the backend.`}finally{this.loading=!1,this.#r=null}}};i(()=>{s.status&&(s.status.unlocked=!1)}),r(()=>{s.status&&(s.status.session=!1)});export{s as t}; \ No newline at end of file +import{V as e,et as t,tt as n}from"./BChu7Pos.js";import{a as r,i,n as a,t as o}from"./CHJn7_Ei.js";var s=new class{#e=n(null);get status(){return e(this.#e)}set status(e){t(this.#e,e,!0)}#t=n(!1);get loading(){return e(this.#t)}set loading(e){t(this.#t,e,!0)}#n=n(``);get error(){return e(this.#n)}set error(e){t(this.#n,e,!0)}#r=null;load(){return this.#r||=this.#i(),this.#r}async#i(){this.loading=!0,this.error=``;try{this.status=await a.accountStatus()}catch(e){this.error=e instanceof o?e.message:`Cannot reach the backend.`}finally{this.loading=!1,this.#r=null}}};i(()=>{s.status&&(s.status.unlocked=!1)}),r(()=>{s.status&&(s.status.session=!1)});export{s as t}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/CdrQoWQa.js b/app/smartbrain_3000/web/_app/immutable/chunks/CdrQoWQa.js deleted file mode 100644 index 456aea79..00000000 --- a/app/smartbrain_3000/web/_app/immutable/chunks/CdrQoWQa.js +++ /dev/null @@ -1 +0,0 @@ -import"./CDw_JV4J.js"; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/BTNiQCll.js b/app/smartbrain_3000/web/_app/immutable/chunks/DFmtAuwh.js similarity index 84% rename from app/smartbrain_3000/web/_app/immutable/chunks/BTNiQCll.js rename to app/smartbrain_3000/web/_app/immutable/chunks/DFmtAuwh.js index 7557da05..7c5665fa 100644 --- a/app/smartbrain_3000/web/_app/immutable/chunks/BTNiQCll.js +++ b/app/smartbrain_3000/web/_app/immutable/chunks/DFmtAuwh.js @@ -1 +1 @@ -import{t as e}from"./w1k7z_2C.js";function t(t){if(!(t instanceof e))return`Couldn't reach SmartBrain — check your connection and try again.`;let n=t.status;return n===423||t.code===`no_session`?``:n===502||n===503||n===504?`I couldn't reach the model just now — try again in a moment.`:n>=500?`Something went wrong on my end — please try again.`:t.message||`That didn't work — please try again.`}export{t}; \ No newline at end of file +import{t as e}from"./CHJn7_Ei.js";function t(t){if(!(t instanceof e))return`Couldn't reach SmartBrain — check your connection and try again.`;let n=t.status;return n===423||t.code===`no_session`?``:n===502||n===503||n===504?`I couldn't reach the model just now — try again in a moment.`:n>=500?`Something went wrong on my end — please try again.`:t.message||`That didn't work — please try again.`}export{t}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/R0i1r70f.js b/app/smartbrain_3000/web/_app/immutable/chunks/Dfkr60Ak.js similarity index 65% rename from app/smartbrain_3000/web/_app/immutable/chunks/R0i1r70f.js rename to app/smartbrain_3000/web/_app/immutable/chunks/Dfkr60Ak.js index 3471ad8c..f19eede0 100644 --- a/app/smartbrain_3000/web/_app/immutable/chunks/R0i1r70f.js +++ b/app/smartbrain_3000/web/_app/immutable/chunks/Dfkr60Ak.js @@ -1 +1 @@ -import{$ as e}from"./BChu7Pos.js";import{n as t}from"./w1k7z_2C.js";var n=e({count:0});async function r(){try{n.count=(await t.unseenScheduleUpdates()).count}catch{}}export{n,r as t}; \ No newline at end of file +import{$ as e}from"./BChu7Pos.js";import{n as t}from"./CHJn7_Ei.js";var n=e({count:0});async function r(){try{n.count=(await t.unseenScheduleUpdates()).count}catch{}}export{n,r as t}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/BB93KFIn.js b/app/smartbrain_3000/web/_app/immutable/chunks/_dzYE-ie.js similarity index 78% rename from app/smartbrain_3000/web/_app/immutable/chunks/BB93KFIn.js rename to app/smartbrain_3000/web/_app/immutable/chunks/_dzYE-ie.js index 2777d97e..7ac1487c 100644 --- a/app/smartbrain_3000/web/_app/immutable/chunks/BB93KFIn.js +++ b/app/smartbrain_3000/web/_app/immutable/chunks/_dzYE-ie.js @@ -1 +1 @@ -import"./BChu7Pos.js";import{i as e}from"./CDw_JV4J.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t}; \ No newline at end of file +import"./BChu7Pos.js";import{i as e}from"./wsL2lAx0.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/CDw_JV4J.js b/app/smartbrain_3000/web/_app/immutable/chunks/wsL2lAx0.js similarity index 99% rename from app/smartbrain_3000/web/_app/immutable/chunks/CDw_JV4J.js rename to app/smartbrain_3000/web/_app/immutable/chunks/wsL2lAx0.js index 3a2f6dc7..ba6a8b67 100644 --- a/app/smartbrain_3000/web/_app/immutable/chunks/CDw_JV4J.js +++ b/app/smartbrain_3000/web/_app/immutable/chunks/wsL2lAx0.js @@ -1 +1 @@ -import{H as e,U as t,V as n,et as r,o as i,r as a,t as o,tt as s}from"./BChu7Pos.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&y.delete(x(e)),v(e,t));var y=new Map;function ee(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&y.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(y.size>0){let t=x(e,n),r=y.get(t);if(r){if(performance.now(){let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=te.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;ee).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0)}else if(s.optional&&s.chained)o++;else return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ce({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function le(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ue(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var S=globalThis.__sveltekit_81cj0q?.base??``,de=globalThis.__sveltekit_81cj0q?.assets??S??``,fe=`a36e620f0c9b667c`,pe=`sveltekit:snapshot`,me=`sveltekit:scroll`,he=`sveltekit:states`,C=`sveltekit:history`,w=`sveltekit:navigation`,T={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ge=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function E(){return{x:pageXOffset,y:pageYOffset}}function D(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...T,"":T.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||k(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ge&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function O(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=D(s,`preload-code`)),i===null&&(i=D(s,`preload-data`)),t===null&&(t=D(s,`keepfocus`)),n===null&&(n=D(s,`noscroll`)),a===null&&(a=D(s,`reload`)),o===null&&(o=D(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Se(e){let t=i(e),n=!0;function r(){n=!0,t.update(e=>e)}function a(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:a,subscribe:o}}var Ce={v:h};function we(){let{set:e,subscribe:t}=i(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${de}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==fe;return r&&(e(!0),Ce.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function k(e,t,n){return e.origin!==ge||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Te(e){}var Ee=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ee],[...new Set([...Ee])];function De(e){return e.filter(e=>e!=null)}function A(e,t){return e+`/`+t}function Oe(e){return e instanceof c||e instanceof u?e.status:500}function ke(e){return e instanceof u?e.text:`Internal Error`}var j,M,Ae,je=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Me=`a:`;je?(j={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},M={current:null},Ae={current:!1}):(j=new class{#e=s({});get data(){return n(this.#e)}set data(e){r(this.#e,e)}#t=s(null);get form(){return n(this.#t)}set form(e){r(this.#t,e)}#n=s(null);get error(){return n(this.#n)}set error(e){r(this.#n,e)}#r=s({});get params(){return n(this.#r)}set params(e){r(this.#r,e)}#i=s({id:null});get route(){return n(this.#i)}set route(e){r(this.#i,e)}#a=s({});get state(){return n(this.#a)}set state(e){r(this.#a,e)}#o=s(-1);get status(){return n(this.#o)}set status(e){r(this.#o,e)}#s=s(new URL(Me));get url(){return n(this.#s)}set url(e){r(this.#s,e)}},M=new class{#e=s(null);get current(){return n(this.#e)}set current(e){r(this.#e,e)}},Ae=new class{#e=s(!1);get current(){return n(this.#e)}set current(e){r(this.#e,e)}},Ce.v=()=>Ae.current=!0);function Ne(e){Object.assign(j,e)}var{onMount:Pe,tick:Fe}=o,Ie=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),N=null,P=le(`sveltekit:scroll`)??{},F=le(`sveltekit:snapshot`)??{},I={url:Se({}),page:Se({}),navigating:i(null),updated:we()};function Le(e){P[e]=E()}function Re(e,t){let n=e+1;for(;P[n];)delete P[n],n+=1;for(n=t+1;F[n];)delete F[n],n+=1}function L(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function ze(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(S||`/`);e&&await e.update()}}var Be,Ve,R,z,He,B,Ue={},We={},V=[],H=[],U=null;function Ge(){U?.fork?.then(e=>e?.discard()),U=null,Q={element:void 0,href:void 0}}var Ke=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,Xe=!1,Ze=!0,K=!1,q=!1,Qe=!1,$e=!1,et,J,Y,X,tt=new Set,nt=new Map,rt=new Map;async function it(e,t,n){if(globalThis.__sveltekit_81cj0q.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_81cj0q.data;for(let t in e)Ue[t]=e[t];for(let e in n)Ue[e]=n[e];for(let e in r)Ue[e]=r[e];for(let e in t)We[e]=t[e]}document.URL!==location.href&&(location.href=location.href),B=e,await e.hooks.init?.(),Be=ce(e),z=document.documentElement,He=t,Ve=e.nodes[0],R=e.nodes[1],Ve(),R(),J=history.state?.[C],Y=history.state?.[w],J||(J=Y=Date.now(),history.replaceState({...history.state,[C]:J,[w]:Y},``));let r=P[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Nt(He,n)):(await Z({type:`enter`,url:_e(B.hash?zt(new URL(location.href)):location.href),replace_state:!0}),i()),Mt()}function at(){V.length=0,$e=!1}function ot(e){H.some(e=>e?.snapshot)&&(F[e]=H.map(e=>e?.snapshot?.capture()))}function st(e){F[e]?.forEach((e,t)=>{H[t]?.snapshot?.restore(e)})}function ct(){Le(J),ue(me,P),ot(Y),ue(pe,F)}async function lt(e,n,r,i){let a,o;n.invalidateAll&&Ge(),await Z({type:`goto`,url:_e(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){$e=!0,a=new Set;for(let[e,t]of nt)for(let[n,r]of t)r.resource?.reset(),a.add(A(e,n));o=new Set;for(let[e,t]of rt)for(let n of t.keys())o.add(A(e,n))}n.invalidate&&n.invalidate.forEach(jt)}}),n.invalidateAll&&t().then(t).then(()=>{for(let[e,t]of nt)for(let[n,{resource:r}]of t)a?.has(A(e,n))&&r.start();for(let[e,t]of rt)for(let[n,{resource:r}]of t)o?.has(A(e,n))&&r.reconnect()})}async function ut(e){if(e.id!==U?.id){Ge();let t={};tt.add(t),U={id:e.id,token:t,promise:bt({...e,preload:t}).then(e=>(tt.delete(t),e.type===`loaded`&&e.state.error&&Ge(),e)),fork:null}}return U.promise}async function dt(e){let t=(await wt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ft(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},Ne(e.props.page),et=new B.root({target:t,props:{...e.props,stores:I,components:H},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:P[J]??E()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}st(Y),Xe=!0}async function pt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(S&&(e.pathname===S||e.pathname===S+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:De(n).map(e=>e.node.component),page:Rt(j)}};s!==void 0&&(l.props.form=s);let u={},f=!j,p=0;for(let e=0;et(new URL(e))))return!0;return!1}function _t(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function vt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function yt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Rt(j),constructors:[]}}}async function bt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(U?.id===e)return tt.delete(U.token),U.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=G.url?e!==Et(G.url):!1,p=G.route?i.id!==G.route.id:!1,m=vt(G.url,n),g=!1,_=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!gt(g,p,f,m,a.universal?.uses,r)?a:(g=!0,mt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;nPromise.resolve({}),server_data_node:_t(null)}),{node:await R(),loader:R,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await lt(new URL(t.location,location.href),{},0);return}let a=await B.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&`).replace(//g,`>`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function Ct(e){let t=e.href;if(Ke.has(t))return Ke.get(t);let n;try{let r=(async()=>{let t=await B.hooks.reroute({url:new URL(e),fetch:async(t,n)=>ht(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);B.hash?n.hash=t:n.pathname=t,t=n}return t})();Ke.set(t,r),n=await r}catch{Ke.delete(t);return}return n}async function wt(e,t){if(e&&!k(e,S,B.hash)){let n=await Ct(e);if(!n)return;let r=Tt(n);for(let n of Be){let i=n.exec(r);if(i)return{id:Et(e),invalidating:t,route:n,params:p(i),url:e}}}}function Tt(e){return f(B.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(S.length))||`/`}function Et(e){return(B.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Dt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Lt(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||qe.forEach(e=>e(c)),o?null:s}async function Z({type:n,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let g=X;X=d;let _=await wt(r,!1),v=n===`enter`?Lt(G,_,r,n):Dt({url:r,type:n,delta:i?.delta,intent:_,scroll:i?.scroll,event:m});if(!v){p(),X===d&&(X=g);return}let y=J,ee=Y;f(),K=!0,Xe&&v.navigation.type!==`enter`&&I.navigating.set(M.current=v.navigation);let b=_&&await bt(_);if(!b){if(k(r,S,B.hash))return await L(r,s);b=await Ot(r,{id:null},await $(new u(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=_?.url||r,X!==d){v.reject(Error(`navigation aborted`));return}if(!b)return;if(b.type===`redirect`){if(l<20){await Z({type:n,url:new URL(b.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),v.fulfil(void 0);return}if(b=await St({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!b)return}else if(b.props.page.status>=400&&await I.updated.check())return await ze(),await L(r,s);if(at(),Le(y),ot(ee),b.props.page.url.pathname!==r.pathname&&(r.pathname=b.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[C]:J+=e,[w]:Y+=e,[he]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||Re(J,Y)}let x=_&&U?.id===_.id?U.fork:null;U?.fork&&!x?Ge():(U=null,Q={element:void 0,href:void 0}),b.props.page.state=c;let te;if(Xe){let t=(await Promise.all(Array.from(Je,e=>e(v.navigation)))).filter(e=>typeof e==`function`);if(t.length>0){function e(){t.forEach(e=>{W.delete(e)})}t.push(e),t.forEach(e=>{W.add(e)})}let n=v.navigation.to;G={...b.state,nav:{params:n.params,route:n.route,url:n.url}},b.props.page&&(b.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=x&&await x;i?te=i.commit():(N=null,et.$set(b.props),N&&Object.assign(b.props.page,N),Ne(b.props.page),te=e?.()),Qe=!0}else await ft(b,He,!1);let{activeElement:ne}=document;if(await te,await t(),await t(),X!==d){v.reject(Error(`navigation aborted`));return}b.props.page&&N&&Object.assign(b.props.page,N);let re=null;if(Ze){let e=i?i.scroll:o?E():null;e?scrollTo(e.x,e.y):(re=r.hash&&document.getElementById(Bt(r)))?re.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==ne&&document.activeElement!==document.body;!a&&!ie&&It(r,!re),Ze=!0,K=!1,v.fulfil(void 0),v.navigation.to&&(v.navigation.to.scroll=E()),W.forEach(e=>e(v.navigation)),n===`popstate`&&st(Y),I.navigating.set(M.current=null)}async function Ot(e,t,n,r,i){return e.origin===ge&&e.pathname===location.pathname&&!Ye?await St({status:r,error:n,url:e,route:t}):await L(e,i)}var Q={element:void 0,href:void 0};function kt(){let e,t;z.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,T.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],T.tap)}z.addEventListener(`mousedown`,n),z.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(dt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=be(e,z),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=xe(r,S,B.hash);if(o||s)return;let c=O(r),l=a&&Et(G.url)===Et(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=T.tap;let e=await wt(a,!1);if(!e)return;ut(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,dt(a))}}function a(){r.disconnect();for(let e of z.querySelectorAll(`a`)){let{url:t,external:n,download:i}=xe(e,S,B.hash);if(n||i)continue;let a=O(e);a.reload||(a.preload_code===T.viewport&&r.observe(e),a.preload_code===T.eager&&dt(t))}}W.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Oe(e),r=ke(e);return B.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function At(e,t={}){return e=new URL(_e(e)),e.origin===ge?lt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function jt(e){if(typeof e==`function`)V.push(e);else{let{href:t}=new URL(e,location.href);V.push(e=>e.href===t)}}function Mt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ct(),!K){let e=Lt(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ct()}),navigator.connection?.saveData||kt(),z.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],z);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,S,B.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=O(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(B.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l))Dt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();else{if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Le(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}}),z.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(k(r,S,!1))return;let i=e.target,a=O(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ft){if(t.state?.[`sveltekit:history`]){let n=t.state[C];if(X={},n===J)return;let r=P[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[w],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(Qe||s)){i!==j.state&&(j.state=i),e(a),P[J]=E(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),B.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[C]:++J,[w]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ie.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&I.navigating.set(M.current=null)});function e(e){G.url=j.url=e,I.page.set(Rt(j)),I.page.notify()}}async function Nt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await wt(u,!1)||{}),d=Be.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Pt(r.uses)),mt({loader:B.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r{let a=history.state;Ft=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ft=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t{if(r.rangeCount===e.length){for(let t=0;t{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:E()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Rt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function zt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Bt(e){let t;if(B.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Te as a,j as i,it as n,M as r,At as t}; \ No newline at end of file +import{H as e,U as t,V as n,et as r,o as i,r as a,t as o,tt as s}from"./BChu7Pos.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&y.delete(x(e)),v(e,t));var y=new Map;function ee(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&y.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(y.size>0){let t=x(e,n),r=y.get(t);if(r){if(performance.now(){let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=te.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;ee).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0)}else if(s.optional&&s.chained)o++;else return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ce({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function le(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ue(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var S=globalThis.__sveltekit_rxrgas?.base??``,de=globalThis.__sveltekit_rxrgas?.assets??S??``,fe=`b398055107baa2be`,pe=`sveltekit:snapshot`,me=`sveltekit:scroll`,he=`sveltekit:states`,C=`sveltekit:history`,w=`sveltekit:navigation`,T={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ge=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function E(){return{x:pageXOffset,y:pageYOffset}}function D(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...T,"":T.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||k(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ge&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function O(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=D(s,`preload-code`)),i===null&&(i=D(s,`preload-data`)),t===null&&(t=D(s,`keepfocus`)),n===null&&(n=D(s,`noscroll`)),a===null&&(a=D(s,`reload`)),o===null&&(o=D(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Se(e){let t=i(e),n=!0;function r(){n=!0,t.update(e=>e)}function a(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:a,subscribe:o}}var Ce={v:h};function we(){let{set:e,subscribe:t}=i(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${de}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==fe;return r&&(e(!0),Ce.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function k(e,t,n){return e.origin!==ge||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Te(e){}var Ee=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ee],[...new Set([...Ee])];function De(e){return e.filter(e=>e!=null)}function A(e,t){return e+`/`+t}function Oe(e){return e instanceof c||e instanceof u?e.status:500}function ke(e){return e instanceof u?e.text:`Internal Error`}var j,M,Ae,je=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Me=`a:`;je?(j={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},M={current:null},Ae={current:!1}):(j=new class{#e=s({});get data(){return n(this.#e)}set data(e){r(this.#e,e)}#t=s(null);get form(){return n(this.#t)}set form(e){r(this.#t,e)}#n=s(null);get error(){return n(this.#n)}set error(e){r(this.#n,e)}#r=s({});get params(){return n(this.#r)}set params(e){r(this.#r,e)}#i=s({id:null});get route(){return n(this.#i)}set route(e){r(this.#i,e)}#a=s({});get state(){return n(this.#a)}set state(e){r(this.#a,e)}#o=s(-1);get status(){return n(this.#o)}set status(e){r(this.#o,e)}#s=s(new URL(Me));get url(){return n(this.#s)}set url(e){r(this.#s,e)}},M=new class{#e=s(null);get current(){return n(this.#e)}set current(e){r(this.#e,e)}},Ae=new class{#e=s(!1);get current(){return n(this.#e)}set current(e){r(this.#e,e)}},Ce.v=()=>Ae.current=!0);function Ne(e){Object.assign(j,e)}var{onMount:Pe,tick:Fe}=o,Ie=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),N=null,P=le(`sveltekit:scroll`)??{},F=le(`sveltekit:snapshot`)??{},I={url:Se({}),page:Se({}),navigating:i(null),updated:we()};function Le(e){P[e]=E()}function Re(e,t){let n=e+1;for(;P[n];)delete P[n],n+=1;for(n=t+1;F[n];)delete F[n],n+=1}function L(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function ze(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(S||`/`);e&&await e.update()}}var Be,Ve,R,z,He,B,Ue={},We={},V=[],H=[],U=null;function Ge(){U?.fork?.then(e=>e?.discard()),U=null,Q={element:void 0,href:void 0}}var Ke=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,Xe=!1,Ze=!0,K=!1,q=!1,Qe=!1,$e=!1,et,J,Y,X,tt=new Set,nt=new Map,rt=new Map;async function it(e,t,n){if(globalThis.__sveltekit_rxrgas.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_rxrgas.data;for(let t in e)Ue[t]=e[t];for(let e in n)Ue[e]=n[e];for(let e in r)Ue[e]=r[e];for(let e in t)We[e]=t[e]}document.URL!==location.href&&(location.href=location.href),B=e,await e.hooks.init?.(),Be=ce(e),z=document.documentElement,He=t,Ve=e.nodes[0],R=e.nodes[1],Ve(),R(),J=history.state?.[C],Y=history.state?.[w],J||(J=Y=Date.now(),history.replaceState({...history.state,[C]:J,[w]:Y},``));let r=P[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Nt(He,n)):(await Z({type:`enter`,url:_e(B.hash?zt(new URL(location.href)):location.href),replace_state:!0}),i()),Mt()}function at(){V.length=0,$e=!1}function ot(e){H.some(e=>e?.snapshot)&&(F[e]=H.map(e=>e?.snapshot?.capture()))}function st(e){F[e]?.forEach((e,t)=>{H[t]?.snapshot?.restore(e)})}function ct(){Le(J),ue(me,P),ot(Y),ue(pe,F)}async function lt(e,n,r,i){let a,o;n.invalidateAll&&Ge(),await Z({type:`goto`,url:_e(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){$e=!0,a=new Set;for(let[e,t]of nt)for(let[n,r]of t)r.resource?.reset(),a.add(A(e,n));o=new Set;for(let[e,t]of rt)for(let n of t.keys())o.add(A(e,n))}n.invalidate&&n.invalidate.forEach(jt)}}),n.invalidateAll&&t().then(t).then(()=>{for(let[e,t]of nt)for(let[n,{resource:r}]of t)a?.has(A(e,n))&&r.start();for(let[e,t]of rt)for(let[n,{resource:r}]of t)o?.has(A(e,n))&&r.reconnect()})}async function ut(e){if(e.id!==U?.id){Ge();let t={};tt.add(t),U={id:e.id,token:t,promise:bt({...e,preload:t}).then(e=>(tt.delete(t),e.type===`loaded`&&e.state.error&&Ge(),e)),fork:null}}return U.promise}async function dt(e){let t=(await wt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ft(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},Ne(e.props.page),et=new B.root({target:t,props:{...e.props,stores:I,components:H},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:P[J]??E()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}st(Y),Xe=!0}async function pt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(S&&(e.pathname===S||e.pathname===S+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:De(n).map(e=>e.node.component),page:Rt(j)}};s!==void 0&&(l.props.form=s);let u={},f=!j,p=0;for(let e=0;et(new URL(e))))return!0;return!1}function _t(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function vt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function yt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Rt(j),constructors:[]}}}async function bt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(U?.id===e)return tt.delete(U.token),U.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=G.url?e!==Et(G.url):!1,p=G.route?i.id!==G.route.id:!1,m=vt(G.url,n),g=!1,_=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!gt(g,p,f,m,a.universal?.uses,r)?a:(g=!0,mt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;nPromise.resolve({}),server_data_node:_t(null)}),{node:await R(),loader:R,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await lt(new URL(t.location,location.href),{},0);return}let a=await B.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&`).replace(//g,`>`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function Ct(e){let t=e.href;if(Ke.has(t))return Ke.get(t);let n;try{let r=(async()=>{let t=await B.hooks.reroute({url:new URL(e),fetch:async(t,n)=>ht(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);B.hash?n.hash=t:n.pathname=t,t=n}return t})();Ke.set(t,r),n=await r}catch{Ke.delete(t);return}return n}async function wt(e,t){if(e&&!k(e,S,B.hash)){let n=await Ct(e);if(!n)return;let r=Tt(n);for(let n of Be){let i=n.exec(r);if(i)return{id:Et(e),invalidating:t,route:n,params:p(i),url:e}}}}function Tt(e){return f(B.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(S.length))||`/`}function Et(e){return(B.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Dt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Lt(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||qe.forEach(e=>e(c)),o?null:s}async function Z({type:n,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let g=X;X=d;let _=await wt(r,!1),v=n===`enter`?Lt(G,_,r,n):Dt({url:r,type:n,delta:i?.delta,intent:_,scroll:i?.scroll,event:m});if(!v){p(),X===d&&(X=g);return}let y=J,ee=Y;f(),K=!0,Xe&&v.navigation.type!==`enter`&&I.navigating.set(M.current=v.navigation);let b=_&&await bt(_);if(!b){if(k(r,S,B.hash))return await L(r,s);b=await Ot(r,{id:null},await $(new u(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=_?.url||r,X!==d){v.reject(Error(`navigation aborted`));return}if(!b)return;if(b.type===`redirect`){if(l<20){await Z({type:n,url:new URL(b.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),v.fulfil(void 0);return}if(b=await St({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!b)return}else if(b.props.page.status>=400&&await I.updated.check())return await ze(),await L(r,s);if(at(),Le(y),ot(ee),b.props.page.url.pathname!==r.pathname&&(r.pathname=b.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[C]:J+=e,[w]:Y+=e,[he]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||Re(J,Y)}let x=_&&U?.id===_.id?U.fork:null;U?.fork&&!x?Ge():(U=null,Q={element:void 0,href:void 0}),b.props.page.state=c;let te;if(Xe){let t=(await Promise.all(Array.from(Je,e=>e(v.navigation)))).filter(e=>typeof e==`function`);if(t.length>0){function e(){t.forEach(e=>{W.delete(e)})}t.push(e),t.forEach(e=>{W.add(e)})}let n=v.navigation.to;G={...b.state,nav:{params:n.params,route:n.route,url:n.url}},b.props.page&&(b.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=x&&await x;i?te=i.commit():(N=null,et.$set(b.props),N&&Object.assign(b.props.page,N),Ne(b.props.page),te=e?.()),Qe=!0}else await ft(b,He,!1);let{activeElement:ne}=document;if(await te,await t(),await t(),X!==d){v.reject(Error(`navigation aborted`));return}b.props.page&&N&&Object.assign(b.props.page,N);let re=null;if(Ze){let e=i?i.scroll:o?E():null;e?scrollTo(e.x,e.y):(re=r.hash&&document.getElementById(Bt(r)))?re.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==ne&&document.activeElement!==document.body;!a&&!ie&&It(r,!re),Ze=!0,K=!1,v.fulfil(void 0),v.navigation.to&&(v.navigation.to.scroll=E()),W.forEach(e=>e(v.navigation)),n===`popstate`&&st(Y),I.navigating.set(M.current=null)}async function Ot(e,t,n,r,i){return e.origin===ge&&e.pathname===location.pathname&&!Ye?await St({status:r,error:n,url:e,route:t}):await L(e,i)}var Q={element:void 0,href:void 0};function kt(){let e,t;z.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,T.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],T.tap)}z.addEventListener(`mousedown`,n),z.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(dt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=be(e,z),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=xe(r,S,B.hash);if(o||s)return;let c=O(r),l=a&&Et(G.url)===Et(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=T.tap;let e=await wt(a,!1);if(!e)return;ut(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,dt(a))}}function a(){r.disconnect();for(let e of z.querySelectorAll(`a`)){let{url:t,external:n,download:i}=xe(e,S,B.hash);if(n||i)continue;let a=O(e);a.reload||(a.preload_code===T.viewport&&r.observe(e),a.preload_code===T.eager&&dt(t))}}W.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Oe(e),r=ke(e);return B.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function At(e,t={}){return e=new URL(_e(e)),e.origin===ge?lt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function jt(e){if(typeof e==`function`)V.push(e);else{let{href:t}=new URL(e,location.href);V.push(e=>e.href===t)}}function Mt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ct(),!K){let e=Lt(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ct()}),navigator.connection?.saveData||kt(),z.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],z);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,S,B.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=O(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(B.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l))Dt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();else{if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Le(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}}),z.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(k(r,S,!1))return;let i=e.target,a=O(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ft){if(t.state?.[`sveltekit:history`]){let n=t.state[C];if(X={},n===J)return;let r=P[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[w],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(Qe||s)){i!==j.state&&(j.state=i),e(a),P[J]=E(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),B.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[C]:++J,[w]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ie.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&I.navigating.set(M.current=null)});function e(e){G.url=j.url=e,I.page.set(Rt(j)),I.page.notify()}}async function Nt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await wt(u,!1)||{}),d=Be.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Pt(r.uses)),mt({loader:B.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r{let a=history.state;Ft=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ft=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t{if(r.rangeCount===e.length){for(let t=0;t{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:E()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Rt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function zt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Bt(e){let t;if(B.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Te as a,j as i,it as n,M as r,At as t}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/chunks/p_cNieaP.js b/app/smartbrain_3000/web/_app/immutable/chunks/y_OS9RoU.js similarity index 65% rename from app/smartbrain_3000/web/_app/immutable/chunks/p_cNieaP.js rename to app/smartbrain_3000/web/_app/immutable/chunks/y_OS9RoU.js index a91fec25..db38e2bb 100644 --- a/app/smartbrain_3000/web/_app/immutable/chunks/p_cNieaP.js +++ b/app/smartbrain_3000/web/_app/immutable/chunks/y_OS9RoU.js @@ -1 +1 @@ -import{$ as e}from"./BChu7Pos.js";import{n as t}from"./w1k7z_2C.js";var n=e({count:0});async function r(){try{n.count=(await t.listPending()).pending.length}catch{}}export{r as n,n as t}; \ No newline at end of file +import{$ as e}from"./BChu7Pos.js";import{n as t}from"./CHJn7_Ei.js";var n=e({count:0});async function r(){try{n.count=(await t.listPending()).pending.length}catch{}}export{r as n,n as t}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/entry/app.DqgyTZgC.js b/app/smartbrain_3000/web/_app/immutable/entry/app.PWFMq22P.js similarity index 64% rename from app/smartbrain_3000/web/_app/immutable/entry/app.DqgyTZgC.js rename to app/smartbrain_3000/web/_app/immutable/entry/app.PWFMq22P.js index d104bc42..423067ca 100644 --- a/app/smartbrain_3000/web/_app/immutable/entry/app.DqgyTZgC.js +++ b/app/smartbrain_3000/web/_app/immutable/entry/app.PWFMq22P.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CEPNkK8Q.js","../chunks/BChu7Pos.js","../chunks/CDw_JV4J.js","../chunks/xihTtKlq.js","../chunks/CdrQoWQa.js","../chunks/BB93KFIn.js","../chunks/CQMDLFxa.js","../chunks/w1k7z_2C.js","../chunks/TDZ5a5AF.js","../chunks/p_cNieaP.js","../chunks/R0i1r70f.js","../chunks/Be3BkmPa.js","../chunks/nF02aZGo.js","../chunks/CDAAYzUu.js","../chunks/aIySO2My.js","../chunks/DQSrham4.js","../assets/Modal.BsseWW9a.css","../chunks/CcVP_dcS.js","../chunks/UDuC8ICI.js","../assets/Chip.GYL4hQJn.css","../assets/0.B-xUN8PJ.css","../nodes/1.2CPVuvj-.js","../nodes/2.C1PbweEe.js","../chunks/CeaAcbO3.js","../assets/Tabs.C-bXfTKf.css","../chunks/Bmlx8Ynu.js","../assets/Spinner.sZVMC3-s.css","../nodes/3.Dsv0lSmv.js","../nodes/4.C_nR6JD_.js","../chunks/BTNiQCll.js","../chunks/x-QSRA-u.js","../assets/pendingCards.bTkY8p7D.css","../chunks/itGxqfLQ.js","../assets/EmptyState.BPkuzyS8.css","../assets/4.hNlXlqzt.css","../nodes/5.CQg6bilK.js","../chunks/jV_dy7U_.js","../chunks/Ce4TvoH5.js","../assets/5.D4p1wr8Z.css","../nodes/6.BhPLOFgA.js","../assets/6.5V9gTAey.css","../nodes/7.Dudr46h-.js","../assets/7.CfVVSiDA.css","../nodes/8.BUkwSJny.js","../assets/8.G9r3aFQF.css","../nodes/9.Bm06ksTS.js","../chunks/DVFSua2J.js","../assets/9.Q4U0lmP1.css","../nodes/10.C_n5uciA.js","../assets/10.XHcxur0F.css","../nodes/11.DPL-6Zfz.js","../assets/11.BvDUnXGQ.css","../nodes/12.Cyl0pmDa.js","../nodes/13.BoxEyjW4.js","../assets/13.B-o8L9be.css","../nodes/14.X5m3F32S.js","../nodes/15.BTmGYDvZ.js","../nodes/16.BU76rvvk.js","../nodes/17.h5HwkHlp.js","../nodes/18.pwGRcm6r.js","../assets/18.DXKM_sCu.css","../nodes/19.MjWr2ZVb.js","../nodes/20.BJVw05M4.js","../assets/20.DcpVa2mn.css","../nodes/21.CN-EqAri.js","../nodes/22.CvRe3Mvm.js","../nodes/23.CaF5mdk2.js","../assets/23.BzfJDnUp.css","../nodes/24.DX8B44wp.js","../assets/24.CpyRSDLr.css","../nodes/25.8J_G9jpa.js","../nodes/26.DTHlqVwp.js","../assets/26.MD5KWOLB.css","../nodes/27.DHH-2i24.js","../nodes/28.Dl3WFZEd.js","../assets/28.CiTAHA42.css"])))=>i.map(i=>d[i]); -import{A as e,G as t,K as n,L as r,M as i,N as a,P as o,Q as s,T as c,U as l,V as u,X as d,Y as f,a as p,ct as m,et as h,ft as g,i as _,it as v,j as y,l as b,q as x,r as S,st as C,tt as w}from"../chunks/BChu7Pos.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e){return e.pathname.endsWith(`.css`)},k=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},A=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=E(t,n);let r=s(t),i=O(r);return k(D,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:T,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},j={},M=o(`
`),N=o(` `,1);function P(o,_){m(_,!0);let T=p(_,`components`,23,()=>[]),E=p(_,`data_0`,3,null),D=p(_,`data_1`,3,null),O=p(_,`data_2`,3,null);x(()=>_.stores.page.set(_.page)),n(()=>{_.stores,_.page,_.constructors,T(),_.form,E(),D(),O(),_.stores.page.notify()});let k=w(!1),A=w(!1),j=w(null);S(()=>{let e=_.stores.page.subscribe(()=>{u(k)&&(h(A,!0),l().then(()=>{h(j,document.title||`untitled page`,!0)}))});return h(k,!0),e});let P=v(()=>_.constructors[2]);var F=N(),I=d(F),L=t=>{let n=v(()=>_.constructors[0]);var r=a(),o=d(r);c(o,()=>u(n),(t,n)=>{b(n(t,{get data(){return E()},get form(){return _.form},get params(){return _.page.params},children:(t,n)=>{var r=a(),o=d(r),s=e=>{let t=v(()=>_.constructors[1]);var n=a(),r=d(n);c(r,()=>u(t),(e,t)=>{b(t(e,{get data(){return D()},get form(){return _.form},get params(){return _.page.params},children:(e,t)=>{var n=a(),r=d(n);c(r,()=>u(P),(e,t)=>{b(t(e,{get data(){return O()},get form(){return _.form},get params(){return _.page.params}}),e=>T()[2]=e,()=>T()?.[2])}),i(e,n)},$$slots:{default:!0}}),e=>T()[1]=e,()=>T()?.[1])}),i(e,n)},l=e=>{let t=v(()=>_.constructors[1]);var n=a(),r=d(n);c(r,()=>u(t),(e,t)=>{b(t(e,{get data(){return D()},get form(){return _.form},get params(){return _.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),i(e,n)};e(o,e=>{_.constructors[2]?e(s):e(l,-1)}),i(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),i(t,r)},R=e=>{let t=v(()=>_.constructors[0]);var n=a(),r=d(n);c(r,()=>u(t),(e,t)=>{b(t(e,{get data(){return E()},get form(){return _.form},get params(){return _.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),i(e,n)};e(I,e=>{_.constructors[1]?e(L):e(R,-1)});var z=s(I,2),B=n=>{var a=M(),o=f(a),s=e=>{var n=r();t(()=>y(n,u(j))),i(e,n)};e(o,e=>{u(A)&&e(s)}),g(a),i(n,a)};e(z,e=>{u(k)&&e(B)}),i(o,F),C()}var F=_(P),I=[()=>A(()=>import(`../nodes/0.CEPNkK8Q.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),()=>A(()=>import(`../nodes/1.2CPVuvj-.js`),__vite__mapDeps([21,1,3,5,2]),import.meta.url),()=>A(()=>import(`../nodes/2.C1PbweEe.js`),__vite__mapDeps([22,1,2,3,4,5,7,6,8,23,24,25,26]),import.meta.url),()=>A(()=>import(`../nodes/3.Dsv0lSmv.js`),__vite__mapDeps([27,1,2,3,4,7,6,8,13,25,26]),import.meta.url),()=>A(()=>import(`../nodes/4.C_nR6JD_.js`),__vite__mapDeps([28,1,2,3,4,7,6,8,9,11,14,18,19,25,26,29,30,31,32,33,34]),import.meta.url),()=>A(()=>import(`../nodes/5.CQg6bilK.js`),__vite__mapDeps([35,1,2,3,4,7,6,8,9,10,11,14,18,19,25,26,29,30,31,32,33,36,37,38]),import.meta.url),()=>A(()=>import(`../nodes/6.BhPLOFgA.js`),__vite__mapDeps([39,1,2,3,4,7,6,8,14,15,16,25,26,29,40]),import.meta.url),()=>A(()=>import(`../nodes/7.Dudr46h-.js`),__vite__mapDeps([41,1,3,5,2,42]),import.meta.url),()=>A(()=>import(`../nodes/8.BUkwSJny.js`),__vite__mapDeps([43,1,2,3,4,7,6,8,23,24,25,26,29,32,11,33,36,44]),import.meta.url),()=>A(()=>import(`../nodes/9.Bm06ksTS.js`),__vite__mapDeps([45,1,2,3,4,7,6,8,11,14,15,16,18,19,25,26,29,32,33,36,46,47]),import.meta.url),()=>A(()=>import(`../nodes/10.C_n5uciA.js`),__vite__mapDeps([48,1,2,3,4,7,6,8,11,14,15,16,17,18,19,25,26,29,32,33,36,49]),import.meta.url),()=>A(()=>import(`../nodes/11.DPL-6Zfz.js`),__vite__mapDeps([50,1,2,3,4,7,6,8,11,14,15,16,17,18,19,25,26,29,32,33,51]),import.meta.url),()=>A(()=>import(`../nodes/12.Cyl0pmDa.js`),__vite__mapDeps([52,1,3,6,12]),import.meta.url),()=>A(()=>import(`../nodes/13.BoxEyjW4.js`),__vite__mapDeps([53,1,2,3,4,7,6,8,11,14,25,26,29,32,33,46,54]),import.meta.url),()=>A(()=>import(`../nodes/14.X5m3F32S.js`),__vite__mapDeps([55,1,2,3,4,7,6,8,11,14,23,24,25,26,29,36]),import.meta.url),()=>A(()=>import(`../nodes/15.BTmGYDvZ.js`),__vite__mapDeps([56,1,2,3,4,13,25,26]),import.meta.url),()=>A(()=>import(`../nodes/16.BU76rvvk.js`),__vite__mapDeps([57,1,3,7,2,4,6,14,29,36]),import.meta.url),()=>A(()=>import(`../nodes/17.h5HwkHlp.js`),__vite__mapDeps([58,1,3,7,2,4,6,14,29,36]),import.meta.url),()=>A(()=>import(`../nodes/18.pwGRcm6r.js`),__vite__mapDeps([59,1,3,7,2,4,6,14,29,60]),import.meta.url),()=>A(()=>import(`../nodes/19.MjWr2ZVb.js`),__vite__mapDeps([61,1,3,7,2,4,6,29]),import.meta.url),()=>A(()=>import(`../nodes/20.BJVw05M4.js`),__vite__mapDeps([62,1,3,7,2,4,6,18,11,19,29,63]),import.meta.url),()=>A(()=>import(`../nodes/21.CN-EqAri.js`),__vite__mapDeps([64,1,3,7,2,4,6,29]),import.meta.url),()=>A(()=>import(`../nodes/22.CvRe3Mvm.js`),__vite__mapDeps([65,1,3,7,2,4,6,29]),import.meta.url),()=>A(()=>import(`../nodes/23.CaF5mdk2.js`),__vite__mapDeps([66,1,3,7,2,4,6,25,26,29,67]),import.meta.url),()=>A(()=>import(`../nodes/24.DX8B44wp.js`),__vite__mapDeps([68,1,3,7,2,4,6,8,18,11,19,25,26,29,36,37,69]),import.meta.url),()=>A(()=>import(`../nodes/25.8J_G9jpa.js`),__vite__mapDeps([70,1,3,7,2,4,6,18,11,19,25,26,29]),import.meta.url),()=>A(()=>import(`../nodes/26.DTHlqVwp.js`),__vite__mapDeps([71,1,2,3,4,7,6,8,25,26,72]),import.meta.url),()=>A(()=>import(`../nodes/27.DHH-2i24.js`),__vite__mapDeps([73,1,2,3,4,7,6,8]),import.meta.url),()=>A(()=>import(`../nodes/28.Dl3WFZEd.js`),__vite__mapDeps([74,1,2,3,4,7,6,8,25,26,29,75]),import.meta.url)],L=[],R={"/":[3],"/activity":[4],"/chat":[5],"/email":[6],"/help":[7],"/info":[8],"/knowledge":[9],"/ni":[10],"/ni/library":[11],"/pair":[12],"/planner":[13],"/schedules":[14],"/settings":[15,[2]],"/settings/account":[16,[2]],"/settings/devices":[17,[2]],"/settings/mcp":[18,[2]],"/settings/memory":[19,[2]],"/settings/models":[20,[2]],"/settings/providers":[21,[2]],"/settings/router":[22,[2]],"/settings/selfimprove":[23,[2]],"/settings/status":[24,[2]],"/settings/web":[25,[2]],"/setup":[26],"/unlock":[27],"/usage":[28]},z={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},B=Object.fromEntries(Object.entries(z.transport).map(([e,t])=>[e,t.decode])),V=Object.fromEntries(Object.entries(z.transport).map(([e,t])=>[e,t.encode])),H=!1,U=(e,t)=>B[e](t),W=()=>A(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{U as decode,B as decoders,R as dictionary,V as encoders,W as get_error_template,H as hash,z as hooks,j as matchers,I as nodes,F as root,L as server_loads}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Dsmf4qec.js","../chunks/BChu7Pos.js","../chunks/wsL2lAx0.js","../chunks/xihTtKlq.js","../chunks/BB_QGgHe.js","../chunks/_dzYE-ie.js","../chunks/CQMDLFxa.js","../chunks/CHJn7_Ei.js","../chunks/CJp6lm4P.js","../chunks/y_OS9RoU.js","../chunks/Dfkr60Ak.js","../chunks/Be3BkmPa.js","../chunks/nF02aZGo.js","../chunks/CDAAYzUu.js","../chunks/aIySO2My.js","../chunks/DQSrham4.js","../assets/Modal.BsseWW9a.css","../chunks/CcVP_dcS.js","../chunks/UDuC8ICI.js","../assets/Chip.GYL4hQJn.css","../assets/0.B-xUN8PJ.css","../nodes/1.ZzjWEhv4.js","../nodes/2.Dw9NXpEc.js","../chunks/CeaAcbO3.js","../assets/Tabs.C-bXfTKf.css","../chunks/Bmlx8Ynu.js","../assets/Spinner.sZVMC3-s.css","../nodes/3.CU_xNGYz.js","../nodes/4.sUggOD9p.js","../chunks/DFmtAuwh.js","../chunks/x-QSRA-u.js","../assets/pendingCards.bTkY8p7D.css","../chunks/itGxqfLQ.js","../assets/EmptyState.BPkuzyS8.css","../assets/4.hNlXlqzt.css","../nodes/5.D_1GfvA1.js","../chunks/jV_dy7U_.js","../chunks/Ce4TvoH5.js","../assets/5.D4p1wr8Z.css","../nodes/6.DS2y_biy.js","../assets/6.5V9gTAey.css","../nodes/7.DT2KwTeB.js","../assets/7.CfVVSiDA.css","../nodes/8.BCRdaF1j.js","../assets/8.G9r3aFQF.css","../nodes/9.DhhPdF9Q.js","../chunks/DVFSua2J.js","../assets/9.Q4U0lmP1.css","../nodes/10.BLqOix-W.js","../assets/10.XHcxur0F.css","../nodes/11.rX_RoM4s.js","../assets/11.BvDUnXGQ.css","../nodes/12.Cyl0pmDa.js","../nodes/13.C3E0giz2.js","../assets/13.B-o8L9be.css","../nodes/14.CWTG4co9.js","../nodes/15.ZKML0Wbc.js","../nodes/16.CH75FQeg.js","../nodes/17.hYzrqytC.js","../nodes/18.Og9zqQSf.js","../assets/18.DXKM_sCu.css","../nodes/19.sP6kLl-L.js","../nodes/20.B6YXtSBg.js","../assets/20.DcpVa2mn.css","../nodes/21.XoTkvw2A.js","../nodes/22.BP22W4Ng.js","../nodes/23.D5_ReiJY.js","../assets/23.BzfJDnUp.css","../nodes/24.D2W6Rh_f.js","../assets/24.CpyRSDLr.css","../nodes/25.Be_90mPr.js","../nodes/26.Dk-eStWq.js","../assets/26.MD5KWOLB.css","../nodes/27.cEFm5ViZ.js","../nodes/28.C_NAhpkq.js","../assets/28.CiTAHA42.css"])))=>i.map(i=>d[i]); +import{A as e,G as t,K as n,L as r,M as i,N as a,P as o,Q as s,T as c,U as l,V as u,X as d,Y as f,a as p,ct as m,et as h,ft as g,i as _,it as v,j as y,l as b,q as x,r as S,st as C,tt as w}from"../chunks/BChu7Pos.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e){return e.pathname.endsWith(`.css`)},k=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},A=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=E(t,n);let r=s(t),i=O(r);return k(D,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:T,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},j={},M=o(`
`),N=o(` `,1);function P(o,_){m(_,!0);let T=p(_,`components`,23,()=>[]),E=p(_,`data_0`,3,null),D=p(_,`data_1`,3,null),O=p(_,`data_2`,3,null);x(()=>_.stores.page.set(_.page)),n(()=>{_.stores,_.page,_.constructors,T(),_.form,E(),D(),O(),_.stores.page.notify()});let k=w(!1),A=w(!1),j=w(null);S(()=>{let e=_.stores.page.subscribe(()=>{u(k)&&(h(A,!0),l().then(()=>{h(j,document.title||`untitled page`,!0)}))});return h(k,!0),e});let P=v(()=>_.constructors[2]);var F=N(),I=d(F),L=t=>{let n=v(()=>_.constructors[0]);var r=a(),o=d(r);c(o,()=>u(n),(t,n)=>{b(n(t,{get data(){return E()},get form(){return _.form},get params(){return _.page.params},children:(t,n)=>{var r=a(),o=d(r),s=e=>{let t=v(()=>_.constructors[1]);var n=a(),r=d(n);c(r,()=>u(t),(e,t)=>{b(t(e,{get data(){return D()},get form(){return _.form},get params(){return _.page.params},children:(e,t)=>{var n=a(),r=d(n);c(r,()=>u(P),(e,t)=>{b(t(e,{get data(){return O()},get form(){return _.form},get params(){return _.page.params}}),e=>T()[2]=e,()=>T()?.[2])}),i(e,n)},$$slots:{default:!0}}),e=>T()[1]=e,()=>T()?.[1])}),i(e,n)},l=e=>{let t=v(()=>_.constructors[1]);var n=a(),r=d(n);c(r,()=>u(t),(e,t)=>{b(t(e,{get data(){return D()},get form(){return _.form},get params(){return _.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),i(e,n)};e(o,e=>{_.constructors[2]?e(s):e(l,-1)}),i(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),i(t,r)},R=e=>{let t=v(()=>_.constructors[0]);var n=a(),r=d(n);c(r,()=>u(t),(e,t)=>{b(t(e,{get data(){return E()},get form(){return _.form},get params(){return _.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),i(e,n)};e(I,e=>{_.constructors[1]?e(L):e(R,-1)});var z=s(I,2),B=n=>{var a=M(),o=f(a),s=e=>{var n=r();t(()=>y(n,u(j))),i(e,n)};e(o,e=>{u(A)&&e(s)}),g(a),i(n,a)};e(z,e=>{u(k)&&e(B)}),i(o,F),C()}var F=_(P),I=[()=>A(()=>import(`../nodes/0.Dsmf4qec.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),()=>A(()=>import(`../nodes/1.ZzjWEhv4.js`),__vite__mapDeps([21,1,3,5,2]),import.meta.url),()=>A(()=>import(`../nodes/2.Dw9NXpEc.js`),__vite__mapDeps([22,1,2,3,4,5,7,6,8,23,24,25,26]),import.meta.url),()=>A(()=>import(`../nodes/3.CU_xNGYz.js`),__vite__mapDeps([27,1,2,3,4,7,6,8,13,25,26]),import.meta.url),()=>A(()=>import(`../nodes/4.sUggOD9p.js`),__vite__mapDeps([28,1,2,3,4,7,6,8,9,11,14,18,19,25,26,29,30,31,32,33,34]),import.meta.url),()=>A(()=>import(`../nodes/5.D_1GfvA1.js`),__vite__mapDeps([35,1,2,3,4,7,6,8,9,10,11,14,18,19,25,26,29,30,31,32,33,36,37,38]),import.meta.url),()=>A(()=>import(`../nodes/6.DS2y_biy.js`),__vite__mapDeps([39,1,2,3,4,7,6,8,14,15,16,25,26,29,40]),import.meta.url),()=>A(()=>import(`../nodes/7.DT2KwTeB.js`),__vite__mapDeps([41,1,3,5,2,42]),import.meta.url),()=>A(()=>import(`../nodes/8.BCRdaF1j.js`),__vite__mapDeps([43,1,2,3,4,7,6,8,23,24,25,26,29,32,11,33,36,44]),import.meta.url),()=>A(()=>import(`../nodes/9.DhhPdF9Q.js`),__vite__mapDeps([45,1,2,3,4,7,6,8,11,14,15,16,18,19,25,26,29,32,33,36,46,47]),import.meta.url),()=>A(()=>import(`../nodes/10.BLqOix-W.js`),__vite__mapDeps([48,1,2,3,4,7,6,8,11,14,15,16,17,18,19,25,26,29,32,33,36,49]),import.meta.url),()=>A(()=>import(`../nodes/11.rX_RoM4s.js`),__vite__mapDeps([50,1,2,3,4,7,6,8,11,14,15,16,17,18,19,25,26,29,32,33,51]),import.meta.url),()=>A(()=>import(`../nodes/12.Cyl0pmDa.js`),__vite__mapDeps([52,1,3,6,12]),import.meta.url),()=>A(()=>import(`../nodes/13.C3E0giz2.js`),__vite__mapDeps([53,1,2,3,4,7,6,8,11,14,25,26,29,32,33,46,54]),import.meta.url),()=>A(()=>import(`../nodes/14.CWTG4co9.js`),__vite__mapDeps([55,1,2,3,4,7,6,8,11,14,23,24,25,26,29,36]),import.meta.url),()=>A(()=>import(`../nodes/15.ZKML0Wbc.js`),__vite__mapDeps([56,1,2,3,4,13,25,26]),import.meta.url),()=>A(()=>import(`../nodes/16.CH75FQeg.js`),__vite__mapDeps([57,1,3,7,2,4,6,14,29,36]),import.meta.url),()=>A(()=>import(`../nodes/17.hYzrqytC.js`),__vite__mapDeps([58,1,3,7,2,4,6,14,29,36]),import.meta.url),()=>A(()=>import(`../nodes/18.Og9zqQSf.js`),__vite__mapDeps([59,1,3,7,2,4,6,14,29,60]),import.meta.url),()=>A(()=>import(`../nodes/19.sP6kLl-L.js`),__vite__mapDeps([61,1,3,7,2,4,6,29]),import.meta.url),()=>A(()=>import(`../nodes/20.B6YXtSBg.js`),__vite__mapDeps([62,1,3,7,2,4,6,18,11,19,29,63]),import.meta.url),()=>A(()=>import(`../nodes/21.XoTkvw2A.js`),__vite__mapDeps([64,1,3,7,2,4,6,29]),import.meta.url),()=>A(()=>import(`../nodes/22.BP22W4Ng.js`),__vite__mapDeps([65,1,3,7,2,4,6,29]),import.meta.url),()=>A(()=>import(`../nodes/23.D5_ReiJY.js`),__vite__mapDeps([66,1,3,7,2,4,6,25,26,29,67]),import.meta.url),()=>A(()=>import(`../nodes/24.D2W6Rh_f.js`),__vite__mapDeps([68,1,3,7,2,4,6,8,18,11,19,25,26,29,36,37,69]),import.meta.url),()=>A(()=>import(`../nodes/25.Be_90mPr.js`),__vite__mapDeps([70,1,3,7,2,4,6,18,11,19,25,26,29]),import.meta.url),()=>A(()=>import(`../nodes/26.Dk-eStWq.js`),__vite__mapDeps([71,1,2,3,4,7,6,8,25,26,72]),import.meta.url),()=>A(()=>import(`../nodes/27.cEFm5ViZ.js`),__vite__mapDeps([73,1,2,3,4,7,6,8]),import.meta.url),()=>A(()=>import(`../nodes/28.C_NAhpkq.js`),__vite__mapDeps([74,1,2,3,4,7,6,8,25,26,29,75]),import.meta.url)],L=[],R={"/":[3],"/activity":[4],"/chat":[5],"/email":[6],"/help":[7],"/info":[8],"/knowledge":[9],"/ni":[10],"/ni/library":[11],"/pair":[12],"/planner":[13],"/schedules":[14],"/settings":[15,[2]],"/settings/account":[16,[2]],"/settings/devices":[17,[2]],"/settings/mcp":[18,[2]],"/settings/memory":[19,[2]],"/settings/models":[20,[2]],"/settings/providers":[21,[2]],"/settings/router":[22,[2]],"/settings/selfimprove":[23,[2]],"/settings/status":[24,[2]],"/settings/web":[25,[2]],"/setup":[26],"/unlock":[27],"/usage":[28]},z={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},B=Object.fromEntries(Object.entries(z.transport).map(([e,t])=>[e,t.decode])),V=Object.fromEntries(Object.entries(z.transport).map(([e,t])=>[e,t.encode])),H=!1,U=(e,t)=>B[e](t),W=()=>A(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{U as decode,B as decoders,R as dictionary,V as encoders,W as get_error_template,H as hash,z as hooks,j as matchers,I as nodes,F as root,L as server_loads}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/entry/start.BAundLvs.js b/app/smartbrain_3000/web/_app/immutable/entry/start.BAundLvs.js new file mode 100644 index 00000000..3bcd148a --- /dev/null +++ b/app/smartbrain_3000/web/_app/immutable/entry/start.BAundLvs.js @@ -0,0 +1 @@ +export{a as load_css,n as start}from"../chunks/wsL2lAx0.js"; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/entry/start.qkFiTLLK.js b/app/smartbrain_3000/web/_app/immutable/entry/start.qkFiTLLK.js deleted file mode 100644 index 628474f6..00000000 --- a/app/smartbrain_3000/web/_app/immutable/entry/start.qkFiTLLK.js +++ /dev/null @@ -1 +0,0 @@ -export{a as load_css,n as start}from"../chunks/CDw_JV4J.js"; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/nodes/0.CEPNkK8Q.js b/app/smartbrain_3000/web/_app/immutable/nodes/0.Dsmf4qec.js similarity index 97% rename from app/smartbrain_3000/web/_app/immutable/nodes/0.CEPNkK8Q.js rename to app/smartbrain_3000/web/_app/immutable/nodes/0.Dsmf4qec.js index e5b084da..9b30f9a7 100644 --- a/app/smartbrain_3000/web/_app/immutable/nodes/0.CEPNkK8Q.js +++ b/app/smartbrain_3000/web/_app/immutable/nodes/0.Dsmf4qec.js @@ -1,4 +1,4 @@ -import{$ as e,A as t,B as n,C as r,E as i,G as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,Q as p,R as m,V as h,X as g,Y as _,Z as v,ct as y,dt as b,et as x,ft as S,g as C,h as ee,ht as w,it as T,j as E,m as te,n as ne,r as re,rt as D,s as O,st as k,tt as A,z as j}from"../chunks/BChu7Pos.js";import{t as ie}from"../chunks/CDw_JV4J.js";import"../chunks/xihTtKlq.js";import"../chunks/CdrQoWQa.js";import{t as M}from"../chunks/BB93KFIn.js";import{_ as N,h as ae}from"../chunks/CQMDLFxa.js";import{c as P,n as F,o as oe,r as I,s as se}from"../chunks/w1k7z_2C.js";import{t as L}from"../chunks/TDZ5a5AF.js";import{n as ce,t as le}from"../chunks/p_cNieaP.js";import{n as ue,t as de}from"../chunks/R0i1r70f.js";import{t as R}from"../chunks/Be3BkmPa.js";import{t as fe}from"../chunks/nF02aZGo.js";import"../chunks/CDAAYzUu.js";import{n as z,r as B,t as pe}from"../chunks/aIySO2My.js";import{t as V}from"../chunks/DQSrham4.js";import{r as me,t as he}from"../chunks/CcVP_dcS.js";import{t as ge}from"../chunks/UDuC8ICI.js";var _e=w({prerender:()=>!1,ssr:()=>!1});function ve(e,t,n){return!e||!t||e===t?`none`:n?`banner`:`reload`}function H(e){return e?`v${e}`:``}var U=e({mode:`system`});function W(){try{let e=localStorage.getItem(`theme`);return e===`light`||e===`dark`?e:`system`}catch{return`system`}}function ye(e){let t=document.documentElement;e===`system`?t.removeAttribute(`data-theme`):t.dataset.theme=e}function be(){U.mode=W()}function xe(){U.mode=U.mode===`system`?`light`:U.mode===`light`?`dark`:`system`;try{U.mode===`system`?localStorage.removeItem(`theme`):localStorage.setItem(`theme`,U.mode)}catch{}ye(U.mode)}function G(e,t){return console.assert(typeof e==`string`&&e.length>0,`chipState requires a RemoteStatus`),console.assert(t===null||typeof t==`boolean`,`unlocked must be boolean | null`),(e===`connected`||e===`connected-direct`||e===`connected-relay`)&&t===!1?`locked`:e}var Se=f(` `),K=f(` `);function Ce(e,n){y(n,!0);let i=T(()=>G(P.status,L.status?.unlocked??null)),o={connecting:`Remote · connecting…`,verifying:`Remote · verifying Desktop…`,connected:`Remote · connected`,"connected-direct":`Remote · direct (P2P)`,"connected-relay":`Remote · relayed`,reconnecting:`Remote · reconnecting…`,untrusted:`Remote · BLOCKED`,offline:`Remote · unreachable`,locked:`Desktop locked`},s=T(()=>h(i)===`connected-direct`?`ok`:h(i)===`connected-relay`||h(i)===`locked`?`warn`:h(i)===`untrusted`?`bad`:`muted`),c=T(()=>h(i)===`connected-relay`?`Direct wasn't possible, so traffic goes through an encrypted relay that can't read it.`:h(i)===`untrusted`?`Couldn't verify your Desktop's identity — connection blocked. Re-pair if you reinstalled.`:h(i)===`locked`?`Your Desktop is locked. Tap to unlock — the bridge is up, but nothing here works until it's unlocked.`:P.detail);var d=u(),f=g(d),m=e=>{var n=u(),d=g(n),f=e=>{var t=Se(),n=_(t);R(n,{name:`lock`});var u=p(n);S(t),a(()=>{r(t,1,`remote-chip ${h(s)??``}`,`svelte-8oyh7k`),C(t,`title`,h(c)),E(u,` ${o[h(i)]??``}`)}),l(e,t)},m=e=>{var t=K(),n=v(t,!0);a(()=>{r(t,1,`remote-chip ${h(s)??``}`,`svelte-8oyh7k`),C(t,`title`,h(c)),E(n,o[h(i)]??h(i))}),l(e,t)};t(d,e=>{h(i)===`locked`?e(f):e(m,-1)}),l(e,n)};t(f,e=>{h(i)!==`idle`&&h(i)!==`untrusted`&&e(m)}),l(e,d),k()}function q(){return typeof window>`u`?!1:(window.matchMedia?.(`(display-mode: standalone)`)?.matches??!1)||window.navigator.standalone===!0}function J(){return typeof navigator>`u`?!1:/iphone|ipad|ipod|android/i.test(navigator.userAgent)}var we=f(`

`),Te=f(`

Pair this device

On your Desktop: Settings → Remote access → Pair a new phone, then enter the +import{$ as e,A as t,B as n,C as r,E as i,G as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,Q as p,R as m,V as h,X as g,Y as _,Z as v,ct as y,dt as b,et as x,ft as S,g as C,h as ee,ht as w,it as T,j as E,m as te,n as ne,r as re,rt as D,s as O,st as k,tt as A,z as j}from"../chunks/BChu7Pos.js";import{t as ie}from"../chunks/wsL2lAx0.js";import"../chunks/xihTtKlq.js";import"../chunks/BB_QGgHe.js";import{t as M}from"../chunks/_dzYE-ie.js";import{_ as N,h as ae}from"../chunks/CQMDLFxa.js";import{c as P,n as F,o as oe,r as I,s as se}from"../chunks/CHJn7_Ei.js";import{t as L}from"../chunks/CJp6lm4P.js";import{n as ce,t as le}from"../chunks/y_OS9RoU.js";import{n as ue,t as de}from"../chunks/Dfkr60Ak.js";import{t as R}from"../chunks/Be3BkmPa.js";import{t as fe}from"../chunks/nF02aZGo.js";import"../chunks/CDAAYzUu.js";import{n as z,r as B,t as pe}from"../chunks/aIySO2My.js";import{t as V}from"../chunks/DQSrham4.js";import{r as me,t as he}from"../chunks/CcVP_dcS.js";import{t as ge}from"../chunks/UDuC8ICI.js";var _e=w({prerender:()=>!1,ssr:()=>!1});function ve(e,t,n){return!e||!t||e===t?`none`:n?`banner`:`reload`}function H(e){return e?`v${e}`:``}var U=e({mode:`system`});function W(){try{let e=localStorage.getItem(`theme`);return e===`light`||e===`dark`?e:`system`}catch{return`system`}}function ye(e){let t=document.documentElement;e===`system`?t.removeAttribute(`data-theme`):t.dataset.theme=e}function be(){U.mode=W()}function xe(){U.mode=U.mode===`system`?`light`:U.mode===`light`?`dark`:`system`;try{U.mode===`system`?localStorage.removeItem(`theme`):localStorage.setItem(`theme`,U.mode)}catch{}ye(U.mode)}function G(e,t){return console.assert(typeof e==`string`&&e.length>0,`chipState requires a RemoteStatus`),console.assert(t===null||typeof t==`boolean`,`unlocked must be boolean | null`),(e===`connected`||e===`connected-direct`||e===`connected-relay`)&&t===!1?`locked`:e}var Se=f(` `),K=f(` `);function Ce(e,n){y(n,!0);let i=T(()=>G(P.status,L.status?.unlocked??null)),o={connecting:`Remote · connecting…`,verifying:`Remote · verifying Desktop…`,connected:`Remote · connected`,"connected-direct":`Remote · direct (P2P)`,"connected-relay":`Remote · relayed`,reconnecting:`Remote · reconnecting…`,untrusted:`Remote · BLOCKED`,offline:`Remote · unreachable`,locked:`Desktop locked`},s=T(()=>h(i)===`connected-direct`?`ok`:h(i)===`connected-relay`||h(i)===`locked`?`warn`:h(i)===`untrusted`?`bad`:`muted`),c=T(()=>h(i)===`connected-relay`?`Direct wasn't possible, so traffic goes through an encrypted relay that can't read it.`:h(i)===`untrusted`?`Couldn't verify your Desktop's identity — connection blocked. Re-pair if you reinstalled.`:h(i)===`locked`?`Your Desktop is locked. Tap to unlock — the bridge is up, but nothing here works until it's unlocked.`:P.detail);var d=u(),f=g(d),m=e=>{var n=u(),d=g(n),f=e=>{var t=Se(),n=_(t);R(n,{name:`lock`});var u=p(n);S(t),a(()=>{r(t,1,`remote-chip ${h(s)??``}`,`svelte-8oyh7k`),C(t,`title`,h(c)),E(u,` ${o[h(i)]??``}`)}),l(e,t)},m=e=>{var t=K(),n=v(t,!0);a(()=>{r(t,1,`remote-chip ${h(s)??``}`,`svelte-8oyh7k`),C(t,`title`,h(c)),E(n,o[h(i)]??h(i))}),l(e,t)};t(d,e=>{h(i)===`locked`?e(f):e(m,-1)}),l(e,n)};t(f,e=>{h(i)!==`idle`&&h(i)!==`untrusted`&&e(m)}),l(e,d),k()}function q(){return typeof window>`u`?!1:(window.matchMedia?.(`(display-mode: standalone)`)?.matches??!1)||window.navigator.standalone===!0}function J(){return typeof navigator>`u`?!1:/iphone|ipad|ipod|android/i.test(navigator.userAgent)}var we=f(`

`),Te=f(`

Pair this device

On your Desktop: Settings → Remote access → Pair a new phone, then enter the 6-character code here.

`,1),Ee=f(`

Set up SmartBrain on your phone

For a reliable, one-tap app that works from anywhere, add SmartBrain to your Home Screen first:

  • iOS: tap the Share button → Add to Home Screen.
  • Android: tap the ⋮ menu → Install app (or Add to Home screen).

`,1),De=f(`

Almost there

Open the SmartBrain icon from your Home Screen to finish setting up — you’ll enter a code there.

Don’t see it?

`,1),Y=f(`
`);function Oe(n,r){y(r,!0);let i=q(),o=A(e(typeof localStorage<`u`&&localStorage.getItem(`sb-installed`)===`1`)),s=A(``),c=A(!1),u=A(``);function d(){try{localStorage.setItem(`sb-installed`,`1`)}catch{}x(o,!0)}let f=T(()=>i||!J());async function m(){if(!h(c)){x(c,!0),x(u,``);try{await N(await fe(h(s))),window.location.assign(`/`)}catch(e){x(u,e instanceof Error?e.message:`pairing failed`,!0)}finally{x(c,!1)}}}var b=Y(),C=_(b),w=e=>{var n=Te(),r=p(g(n),4),i=_(r);ee(i),S(r);var o=p(r,2),d=_(o),f=v(d,!0);S(o);var y=p(o,2),b=e=>{var t=we(),n=v(t,!0);a(()=>E(n,h(u))),l(e,t)};t(y,e=>{h(u)&&e(b)}),a(()=>{d.disabled=h(c),E(f,h(c)?`Pairing…`:`Pair`)}),te(i,()=>h(s),e=>x(s,e)),j(`click`,d,m),l(e,n)},ne=e=>{var t=Ee(),n=p(g(t),6),r=v(n);j(`click`,r,d),l(e,t)},re=e=>{var t=De(),n=p(g(t),4),r=p(_(n));S(n),j(`click`,r,()=>x(o,!1)),l(e,t)};t(C,e=>{h(f)?e(w):h(o)?e(re,-1):e(ne,1)}),S(b),l(n,b),k()}m([`click`]);var X=f(` `,1);function ke(e,n){y(n,!1),O();var i=u(),o=g(i),s=e=>{V(e,{open:!0,alert:!0,get label(){return z.current.title},onclose:()=>B(!1),onkeydown:e=>{e.key===`Enter`&&B(!0)},children:(e,t)=>{var n=X(),i=g(n),o=v(i,!0),s=p(i,2),c=v(s,!0),u=p(s,2),d=_(u),f=p(d,2);let m;var h=v(f,!0);S(u),a(()=>{E(o,z.current.title),E(c,z.current.body),m=r(f,1,``,null,m,{danger:z.current.danger}),E(h,z.current.confirmLabel)}),j(`click`,d,()=>B(!1)),j(`click`,f,()=>B(!0)),l(e,n)},$$slots:{default:!0}})};t(o,e=>{z.current&&e(s)}),l(e,i),k()}m([`click`]);var Z=f(``),Q=f(`
`);function Ae(e,n){y(n,!1),O();var i=u(),o=g(i),s=e=>{var t=Q();d(t,5,()=>me.items,e=>e.id,(e,t)=>{var n=Z(),i=_(n);{let e=D(()=>h(t).kind===`ok`?`check`:`warn`);R(i,{get name(){return h(e)},size:14})}var o=p(i);S(n),a(()=>{r(n,1,`toast ${h(t).kind??``}`,`svelte-1cpok13`),E(o,` ${h(t).msg??``}`)}),j(`click`,n,()=>he(h(t).id)),l(e,n)}),S(t),l(e,t)};t(o,e=>{me.items.length>0&&e(s)}),l(e,i),k()}m([`click`]);var je=f(` `),Me=f(` SmartBrain_3000 `),Ne=f(``),Pe=f(``),Fe=f(` Help `,1),Ie=f(``),Le=f(` `),Re=f(` `),ze=f(``),Be=f(` Help`),Ve=f(` `),He=f(`Couldn’t reach the desktop app to start the install. Open the SmartBrain icon in your menu bar and choose Install update now. `,1),Ue=f(`SmartBrain is ready to install. Installing restarts it — under a minute, and you’ll unlock again afterwards. `,1),We=f(`
`),Ge=f(`
SmartBrain updated to while this page was diff --git a/app/smartbrain_3000/web/_app/immutable/nodes/1.2CPVuvj-.js b/app/smartbrain_3000/web/_app/immutable/nodes/1.ZzjWEhv4.js similarity index 81% rename from app/smartbrain_3000/web/_app/immutable/nodes/1.2CPVuvj-.js rename to app/smartbrain_3000/web/_app/immutable/nodes/1.ZzjWEhv4.js index 49fb9ea5..050e0ffa 100644 --- a/app/smartbrain_3000/web/_app/immutable/nodes/1.2CPVuvj-.js +++ b/app/smartbrain_3000/web/_app/immutable/nodes/1.ZzjWEhv4.js @@ -1 +1 @@ -import{G as e,M as t,P as n,Q as r,X as i,Z as a,ct as o,j as s,st as c}from"../chunks/BChu7Pos.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/BB93KFIn.js";var u=n(`

`,1);function d(n,d){o(d,!0);var f=u(),p=i(f),m=a(p,!0),h=r(p,2),g=a(h,!0);e(()=>{s(m,l.status),s(g,l.error?.message)}),t(n,f),c()}export{d as component}; \ No newline at end of file +import{G as e,M as t,P as n,Q as r,X as i,Z as a,ct as o,j as s,st as c}from"../chunks/BChu7Pos.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/_dzYE-ie.js";var u=n(`

`,1);function d(n,d){o(d,!0);var f=u(),p=i(f),m=a(p,!0),h=r(p,2),g=a(h,!0);e(()=>{s(m,l.status),s(g,l.error?.message)}),t(n,f),c()}export{d as component}; \ No newline at end of file diff --git a/app/smartbrain_3000/web/_app/immutable/nodes/10.C_n5uciA.js b/app/smartbrain_3000/web/_app/immutable/nodes/10.BLqOix-W.js similarity index 99% rename from app/smartbrain_3000/web/_app/immutable/nodes/10.C_n5uciA.js rename to app/smartbrain_3000/web/_app/immutable/nodes/10.BLqOix-W.js index 8ca16ed9..0d2d91c2 100644 --- a/app/smartbrain_3000/web/_app/immutable/nodes/10.C_n5uciA.js +++ b/app/smartbrain_3000/web/_app/immutable/nodes/10.BLqOix-W.js @@ -1,4 +1,4 @@ -import{$ as e,A as t,B as n,C as r,E as i,F as a,G as o,I as s,J as c,K as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,V as v,W as y,X as b,Y as x,Z as S,a as C,at as w,b as T,ct as E,d as D,dt as O,et as k,ft as A,g as j,h as M,it as N,j as P,k as F,l as ee,m as I,n as te,pt as L,r as R,st as ne,tt as z,u as re,w as ie,y as ae,z as B}from"../chunks/BChu7Pos.js";import{t as oe}from"../chunks/CDw_JV4J.js";import"../chunks/xihTtKlq.js";import"../chunks/CdrQoWQa.js";import{n as V}from"../chunks/w1k7z_2C.js";import{t as H}from"../chunks/TDZ5a5AF.js";import{n as se,t as ce}from"../chunks/Be3BkmPa.js";import{t as le}from"../chunks/aIySO2My.js";import{t as ue}from"../chunks/DQSrham4.js";import{n as U}from"../chunks/CcVP_dcS.js";import{t as de}from"../chunks/UDuC8ICI.js";import{t as fe}from"../chunks/Bmlx8Ynu.js";import{t as W}from"../chunks/BTNiQCll.js";import{t as pe}from"../chunks/itGxqfLQ.js";import{i as me,r as he}from"../chunks/jV_dy7U_.js";var ge=6e4,_e=60*ge,G=24*_e;function ve(e,t=new Date){console.assert(e===null||typeof e==`string`,`relTime: ts is string|null`),console.assert(t instanceof Date,`relTime: now must be a Date`);let n=he(e);if(!n)return`—`;let r=t.getTime()-n.getTime();return r<0||r<45e3?`just now`:r<_e?`${Math.floor(r/ge)}m ago`:r2*i}function be(e){if(console.assert(typeof e.state==`string`,`cardState: state is string`),console.assert(typeof e.enabled==`boolean`,`cardState: enabled is boolean`),e.flow||e.state===`draft`)return`designing`;if(!e.enabled||e.state===`paused`)return`paused`;if(e.state===`broken`)return`broken`;if(e.state===`commissioning`){let t=e.awaiting_yes!=null||e.payload_slot!==`preview`;return e.payload!==null&&t?`verifying`:`empty`}return e.payload===null?`empty`:e.state===`failing`||e.state===`degraded`?`failing`:ye(e.payload_at,e.interval_minutes)?`stale`:`fresh`}function xe(e){console.assert(typeof e.interval_minutes==`number`,`footerText: interval is number`),console.assert(e.payload_at===null||typeof e.payload_at==`string`,`footerText: payload_at shape`);let t=he(e.payload_at);return[t?`as of ${new Intl.DateTimeFormat(void 0,{timeStyle:`short`}).format(t)}`:`as of —`,e.awaiting_yes?.host??``,`every ${Math.max(1,e.interval_minutes)}m`].filter(e=>e.length>0).join(` · `)}function Se(e){console.assert(typeof e.id==`string`,`interpretationOf: a board row`);let t=e.interpretation,n=typeof t==`string`&&t.trim().length>0?t:``;return console.assert(n===``||n===t,`interpretationOf: verbatim or empty`),n}function Ce(e,t){console.assert(e===void 0||typeof e==`string`,`cardSpan: size is a string or undefined`),console.assert(t==null||typeof t==`object`,`cardSpan: clir is an object or null`);let n=t&&typeof t==`object`?t.span:void 0,r=typeof n==`string`?/^[dp]([1-4])x([1-3])$/.exec(n):null;if(r)return{cols:Number(r[1])>=2?2:1,rows:Number(r[2])};switch(e){case`wide`:return{cols:2,rows:1};case`large`:return{cols:2,rows:2};case`tall`:return{cols:1,rows:2};default:return{cols:1,rows:1}}}function we(e,t){return console.assert(typeof e.state==`string`,`bodyShowsPanel: state is string`),console.assert(typeof t==`boolean`,`bodyShowsPanel: hasForm is boolean`),!t||e.flow||e.awaiting_yes&&e.payload||e.state!==`commissioning`||e.c2_ok?!1:e.payload!==null&&e.payload_slot!==`preview`}function Te(e,t,n=``){return console.assert(typeof t==`boolean`,`formBoxChrome: hasForm is boolean`),console.assert(typeof e==`string`,`formBoxChrome: state is string`),t&&n===``&&(e===`fresh`||e===`stale`||e===`paused`)}var Ee=m(``),De=m(` `),Oe=m(` `),K=m(``),ke=m(`

`),Ae=m(`

`),je=m(` `),Me=m(` `),Ne=m(` `,1),Pe=m(``),Fe=m(` `),Ie=m(`
`);function Le(e,n){E(n,!0);let a=C(n,`cols`,3,1),s=C(n,`rows`,3,1),c=C(n,`preview`,3,!1),l=C(n,`footerText`,3,``),p=C(n,`interpretation`,3,``),m=C(n,`reason`,3,``),g=C(n,`rendered`,3,!1),_=C(n,`notice`,3,``),y=C(n,`fit`,3,null),w=N(()=>Te(n.state,n.hasForm,_())),T=N(()=>y()?y().detail?`${y().chip}. ${y().detail}`:y().chip:``),D=N(()=>y()?y().detail?`${y().chip} · ${y().detail}`:y().chip:``);var k=Ie();let M;var F=x(k);let ee;var I=x(F),te=e=>{var t=Ee();d(e,t)},R=e=>{var t=De(),r=S(t,!0);o(()=>P(r,n.title)),d(e,t)};t(I,e=>{n.hasForm?e(te):e(R,-1)});var z=h(I,2),re=x(z),ie=e=>{var t=K(),n=x(t);de(n,{kind:`warn`,get title(){return v(T)},children:(e,t)=>{var n=Oe(),r=S(n,!0);o(()=>P(r,y().chip)),d(e,n)},$$slots:{default:!0}}),A(t),d(e,t)};t(re,e=>{y()&&!v(w)&&e(ie)});var ae=h(re,2);i(ae,()=>n.chips??L);var B=h(ae,2),oe=e=>{de(e,{title:`This card reads its page in SmartBrain's own local page browser`,children:(e,t)=>{O();var n=u(`page browser`);d(e,n)},$$slots:{default:!0}})};t(B,e=>{g()&&e(oe)}),A(z),A(F);var V=h(F,2);let H;var se=x(V);i(se,()=>n.children??L),A(V);var ce=h(V,2),le=e=>{var t=ke(),n=S(t,!0);o(()=>P(n,_())),d(e,t)},ue=e=>{var t=Ae(),n=S(t,!0);o(()=>P(n,m())),d(e,t)};t(ce,e=>{_()?e(le):n.state===`failing`&&m()&&e(ue,1)});var U=h(ce,2);i(U,()=>n.below??L);var fe=h(U,2);let W;var pe=x(fe),me=e=>{var n=f(),r=b(n),i=e=>{var t=je(),n=x(t),r=S(n,!0),i=h(n,2),a=S(i);A(t),o(()=>{j(n,`title`,p()),P(r,p()),P(a,`· ${l()??``}`)}),d(e,t)},a=e=>{var t=Me(),n=S(t,!0);o(()=>P(n,l())),d(e,t)};t(r,e=>{p()?e(i):e(a,-1)}),d(e,n)};t(pe,e=>{!n.hasForm&&l()&&e(me)});var he=h(pe,2),ge=e=>{var t=Pe(),n=x(t);de(n,{kind:`warn`,get title(){return v(T)},children:(e,t)=>{var n=Ne(),r=b(n),i=S(r,!0),a=h(r,2),s=S(a,!0);o(()=>{P(i,y().chip),P(s,v(D))}),d(e,n)},$$slots:{default:!0}}),A(t),d(e,t)};t(he,e=>{y()&&v(w)&&e(ge)});var _e=h(he,2);i(_e,()=>n.actions??L);var G=h(_e,2),ve=e=>{var t=Fe(),n=S(t,!0);o(()=>P(n,y().detail)),d(e,t)};t(G,e=>{y()?.detail&&!v(w)&&e(ve)}),A(fe),A(k),o(()=>{M=r(k,1,`card ni-card svelte-hyum9g`,null,M,{"cols-2":a()>=2,"rows-2":s()===2,"rows-3":s()>=3,form:v(w),preview:c()}),j(k,`data-state`,n.state),ee=r(F,1,`ni-head svelte-hyum9g`,null,ee,{"has-fit":!!y()&&!v(w)}),H=r(V,1,`ni-body svelte-hyum9g`,null,H,{"ni-body-dim":n.state===`failing`}),W=r(fe,1,`ni-foot svelte-hyum9g`,null,W,{"has-fit-line":!!y()?.detail&&!v(w),"has-fit-strip":!!y()&&v(w)})}),d(e,k),ne()}var Re=m(`
  • `),ze=m(`

    `),Be=m(`

    This page gets its data from a feed

      `);function Ve(e,n){E(n,!0);let r=C(n,`busy`,3,!1),i=C(n,`error`,3,``);var a=Be(),s=h(x(a),2);p(s,21,()=>n.candidates,e=>e.url,(e,t)=>{var i=Re(),a=x(i),s=S(a,!0),c=h(a,2);A(i),o(()=>{j(a,`title`,v(t).url),P(s,v(t).url),c.disabled=r()}),B(`click`,c,()=>n.onSwitch(v(t).url)),d(e,i)}),A(s);var c=h(s,2),l=e=>{var t=ze(),n=S(t,!0);o(()=>P(n,i())),d(e,t)};t(c,e=>{i()&&e(l)}),A(a),d(e,a),ne()}g([`click`]);var He=new Set(`accent.accent-tint.badge-line.bg.border.border-strong.danger.elevated.faint.map-land.map-stroke.muted.ok.panel.row-hi.text.viz-axis.viz-band.viz-cat-1.viz-cat-2.viz-cat-3.viz-cat-4.viz-cat-5.viz-cat-6.viz-cat-other.viz-div-mid.viz-div-neg.viz-div-pos.viz-dot-ring.viz-fill.viz-grid.viz-interp.viz-line.viz-neg.viz-now.viz-now-line.viz-pos.viz-seq-1.viz-seq-2.viz-seq-3.viz-seq-4.viz-seq-5.viz-track.warn`.split(`.`));function Ue(e){return console.assert(He.size>0,`isTokenName: token set loaded`),typeof e==`string`&&He.has(e)}var We={hero:{px:31,wt:600,lh:38,tnum:!0,ladder:[31,28,24,20]},headline:{px:25,wt:600,lh:32,tnum:!0,ladder:[25,22,20,18]},display:{px:20,wt:600,lh:26,tnum:!0,ladder:[20,18,16]},name:{px:16,wt:600,lh:22,tnum:!1},row:{px:16,wt:400,lh:22,tnum:!0},"row-strong":{px:16,wt:600,lh:22,tnum:!0},title:{px:14,wt:600,lh:18,tnum:!1,max_lines:2},body:{px:14,wt:400,lh:19,tnum:!1},item:{px:14,wt:500,lh:19,tnum:!1},sub:{px:14,wt:400,lh:19,tnum:!0},delta:{px:14,wt:500,lh:19,tnum:!0},index:{px:14,wt:500,lh:19,tnum:!0},meta:{px:12,wt:400,lh:16,tnum:!0},badge:{px:12,wt:600,lh:16,tnum:!1},footer:{px:12,wt:400,lh:16,tnum:!0},label:{px:11,wt:500,lh:14,tnum:!0},tick:{px:11,wt:400,lh:14,tnum:!0}},Ge={line_w:2,interp_w:1.5,grid_w:1,now_w:1,dot_r:4,dot_ring:2,now_dot_r:4.5,now_dot_ring:2,track_h:4,ref_tick_h:14,ref_tick_w:1.5,label_offset:7,plot_min_share:.45,amplitude_min:{desktop:48,phone:36},past_alpha:.45,bar_gap:2,bar_end_r:4},Ke=.96875,qe=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`ClirError`}},Je=new Set([`stat`,`conditions`,`kv_grid`,`compare`,`bars`,`series_line`,`heatmap`,`event_curve`,`next_event`,`agenda`,`day_table`,`entity_list`,`ranked_list`,`table`,`text_brief`,`image`,`progress`,`map_lite`]),Ye=new Set(Object.keys(We)),Xe=new Set([`data`,`lexicon`,`ask`,`title`,`key`,`code`]),Ze=new Set([`h:mm a`,`h a`,`ha_short`,`EEE`,`EEE d`,`MMM d`,`EEE MMM d`,`yyyy`,`MMM yyyy`,`MMM d, yyyy`,`MMM d, h:mm a`,`HH:mm`]),Qe=new Set([`sun`,`moon`,`cloud`,`cloud_sun`,`cloud_moon`,`rain`,`drizzle`,`snow`,`storm`,`fog`,`wind`,`alert`,`check`,`cross`,`clock`,`link_out`,`lock`,`unlock`,`pin`,`up`,`down`]),$e=new Set([`text`,`time`,`rect`,`line`,`tri`,`dot`,`path`,`cells`,`image`,`basemap`,`icon`]),et=new Set([`start`,`middle`,`end`]),tt=new Set([`up`,`down`,`left`,`right`]);function q(e,t){throw new qe(e,t)}function J(e,t,n=-1/0){return console.assert(typeof t==`string`,`requireNumber: where is string`),console.assert(typeof n==`number`,`requireNumber: min is number`),(typeof e!=`number`||!Number.isFinite(e)||e= ${n}, got ${String(e)}`),e}function nt(e){if(!Array.isArray(e)||e.length<2)return!1;let t=e[0];return t===`l`||t===`r`||t===`c`||t===`f`?e.length===2&&typeof e[1]==`number`&&Number.isFinite(e[1]):t===`m`&&e.length===4&&nt(e[1])&&nt(e[2])&&typeof e[3]==`number`&&Number.isFinite(e[3])}function Y(e,t){return console.assert(typeof t==`string`,`requireAnchor: where is string`),console.assert(t.length>0,`requireAnchor: where non-empty`),nt(e)||q(`bad_anchor`,`${t}: not a valid X anchor`),e}function X(e,t){return console.assert(typeof t==`string`,`requireTok: where is string`),console.assert(t.length>0,`requireTok: where non-empty`),Ue(e)||q(`bad_token`,`${t}: unknown token ${String(e)}`),e}function rt(e,t){return e==null?null:X(e,t)}function Z(e,t,n){return console.assert(typeof n==`string`,`requireEnum: where is string`),console.assert(t.size>0,`requireEnum: allowed non-empty`),(typeof e!=`string`||!t.has(e))&&q(`bad_enum`,`${n}: value ${String(e)} not allowed`),e}function it(e,t){let n=Z(e.role,Ye,`${t}.role`),r=J(e.px,`${t}.px`,11),i=Z(e.anchor??`start`,et,`${t}.anchor`),a=Z(e.src??`data`,Xe,`${t}.src`),o=e.dir===`rtl`?`rtl`:`ltr`,s=Array.isArray(e.lines)?e.lines.map(String):[];return{k:`text`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),max_w:J(e.max_w,`${t}.max_w`,0),lines:s,role:n,px:r,tok:X(e.tok,`${t}.tok`),anchor:i,dir:o,src:a}}function at(e,t){let n=Z(e.role,Ye,`${t}.role`),r=J(e.px,`${t}.px`,11),i=Z(e.anchor??`start`,et,`${t}.anchor`),a=Z(e.fmt,Ze,`${t}.fmt`),o=e.tz===`viewer`?`viewer`:`card`;return{k:`time`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),max_w:J(e.max_w,`${t}.max_w`,0),t:String(e.t),fmt:a,tz:o,zone:String(e.zone),role:n,px:r,tok:X(e.tok,`${t}.tok`),anchor:i,show_zone:!!e.show_zone}}function ot(e,t){return{k:`rect`,id:J(e.id,`${t}.id`),x0:Y(e.x0,`${t}.x0`),x1:Y(e.x1,`${t}.x1`),y0:J(e.y0,`${t}.y0`),y1:J(e.y1,`${t}.y1`),tok:X(e.tok,`${t}.tok`),r:typeof e.r==`number`?e.r:0,stroke:rt(e.stroke??null,`${t}.stroke`)}}function st(e,t){return{k:`line`,id:J(e.id,`${t}.id`),x0:Y(e.x0,`${t}.x0`),y0:J(e.y0,`${t}.y0`),x1:Y(e.x1,`${t}.x1`),y1:J(e.y1,`${t}.y1`),tok:X(e.tok,`${t}.tok`),w:typeof e.w==`number`?e.w:1,dash:Array.isArray(e.dash)?e.dash.map(e=>Number(e)):null,gaps:Array.isArray(e.gaps)?e.gaps.map(e=>Number(e)):void 0}}function ct(e,t){return{k:`tri`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),size:J(e.size,`${t}.size`,0),dir:Z(e.dir,tt,`${t}.dir`),tok:X(e.tok,`${t}.tok`)}}function lt(e,t){return{k:`dot`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),r:J(e.r,`${t}.r`,0),tok:X(e.tok,`${t}.tok`),ring:rt(e.ring??null,`${t}.ring`),ring_w:typeof e.ring_w==`number`?e.ring_w:0}}function ut(e,t){(!e||typeof e!=`object`)&&q(`bad_box`,`${t}: missing`);let n=e;return{x0:Y(n.x0,`${t}.x0`),x1:Y(n.x1,`${t}.x1`),y0:J(n.y0,`${t}.y0`),y1:J(n.y1,`${t}.y1`)}}function dt(e,t){let n=Array.isArray(e.pts)?e.pts:[];n.length>400&&q(`too_many_points`,`${t}.pts > 400`);let r=Z(e.style??`solid`,new Set([`solid`,`interp`]),`${t}.style`);return{k:`path`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),pts:n.map(e=>((!Array.isArray(e)||e.length!==2)&&q(`bad_point`,`${t}.pts`),[Number(e[0]),Number(e[1])])),tok:X(e.tok,`${t}.tok`),w:typeof e.w==`number`?e.w:2,style:r,fill:rt(e.fill??null,`${t}.fill`)}}function ft(e,t){let n=Z(e.ramp??`seq`,new Set([`seq`,`div`]),`${t}.ramp`);return{k:`cells`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),cols:J(e.cols,`${t}.cols`,1),rows:J(e.rows,`${t}.rows`,1),v:Array.isArray(e.v)?e.v.map(e=>e==null?-1:Number(e)):[],ramp:n,steps:typeof e.steps==`number`?e.steps:5,gap:typeof e.gap==`number`?e.gap:1}}function pt(e,t){let n=Z(e.fit??`contain`,new Set([`cover`,`contain`]),`${t}.fit`),r=Array.isArray(e.crop)&&e.crop.length===4?[Number(e.crop[0]),Number(e.crop[1]),Number(e.crop[2]),Number(e.crop[3])]:null;return{k:`image`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),ref:String(e.ref??``),fit:n,crop:r}}function mt(e,t){let n=Array.isArray(e.bbox)&&e.bbox.length===4?[Number(e.bbox[0]),Number(e.bbox[1]),Number(e.bbox[2]),Number(e.bbox[3])]:[0,0,0,0];return{k:`basemap`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),asset:String(e.asset??`world110m`),bbox:n,land:X(e.land??`map-land`,`${t}.land`),stroke:X(e.stroke??`map-stroke`,`${t}.stroke`)}}function ht(e,t){return{k:`icon`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),size:J(e.size,`${t}.size`,0),name:Z(e.name,Qe,`${t}.name`),tok:X(e.tok,`${t}.tok`)}}var gt={text:it,time:at,rect:ot,line:st,tri:ct,dot:lt,path:dt,cells:ft,image:pt,basemap:mt,icon:ht};function _t(e,t){(!e||typeof e!=`object`)&&q(`bad_prim`,`${t}: not an object`);let n=e,r=n.k;return(typeof r!=`string`||!$e.has(r))&&q(`bad_prim_kind`,`${t}.k: unknown kind ${String(r)}`),gt[r](n,t)}function Q(e){(!e||typeof e!=`object`)&&q(`bad_clir`,`clir: not an object`);let t=e;t.v!==1&&q(`bad_version`,`clir.v must be 1`);let n=Z(t.form,Je,`clir.form`),r=Array.isArray(t.prims)?t.prims:[];r.length>2e3&&q(`too_many_prims`,`clir.prims > 2000`);let i=new Set,a=[];r.forEach((e,t)=>{let n=_t(e,`clir.prims[${t}]`);i.has(n.id)&&q(`dup_prim_id`,`clir.prims[${t}]: dup id ${n.id}`),i.add(n.id),a.push(n)}),(typeof t.summary!=`string`||!t.summary)&&q(`bad_summary`,`clir.summary missing`);let o=t.bucket&&typeof t.bucket==`object`?t.bucket:{};return{v:1,form:n,variant:String(t.variant??``),cand:String(t.cand??``),plan:String(t.plan??``),span:String(t.span??``),bucket:{min_w:Number(o.min_w??0),max_w:Number(o.max_w??0),h:Number(o.h??0)},state:String(t.state??`ok`),prims:a,reading_order:Array.isArray(t.reading_order)?t.reading_order.map(Number):[],summary:t.summary,live:Array.isArray(t.live)?t.live.map(e=>({k:String(e.k??``),args:e.args??{}})):[],hitmap:Array.isArray(t.hitmap)?t.hitmap.map(e=>({prim:Number(e.prim??-1),label:String(e.label??``)})):[],dropped:Array.isArray(t.dropped)?t.dropped.map(String):[],ladder:Array.isArray(t.ladder)?t.ladder.map(String):[]}}function vt(e,t,n){if(console.assert(typeof t==`number`,`resolveX: left is number`),console.assert(typeof n==`number`,`resolveX: width is number`),e[0]===`l`)return t+e[1];if(e[0]===`r`)return t+n-e[1];if(e[0]===`c`)return t+n/2+e[1];if(e[0]===`f`)return t+e[1]*n;let r=vt(e[1],t,n);return r+(vt(e[2],t,n)-r)*e[3]}function yt(e,t,n){console.assert(Number.isFinite(n),`lerpAnchor: frac finite`),console.assert(Array.isArray(e)&&Array.isArray(t),`lerpAnchor: anchors arrays`);let r=e=>e===`l`||e===`r`||e===`c`||e===`f`;if(r(e[0])&&r(t[0])&&e[0]===t[0]&&e[0]!==`r`){let r=e[1],i=t[1];return[e[0],r+(i-r)*n]}if(e[0]===`r`&&t[0]===`r`){let r=e[1];return[`r`,r+(t[1]-r)*n]}return e[0]===`l`&&t[0]===`r`&&e[1]===0&&t[1]===0?[`f`,n]:[`m`,e,t,n]}function bt(e){if(console.assert(typeof e==`string`,`parseT: t is string`),console.assert(e.length>0,`parseT: t non-empty`),e.length===10){let[t,n,r]=e.split(`-`).map(Number);return{date:!0,y:t,m:n-1,d:r}}return Date.parse(e)}function xt(e){return typeof e==`number`?e:Date.UTC(e.y,e.m,e.d)}var St=e=>new Intl.DateTimeFormat(`en-US`,{timeZone:e,hour:`numeric`,minute:`2-digit`,second:`2-digit`,weekday:`short`,month:`short`,day:`numeric`,year:`numeric`,hour12:!1,hourCycle:`h23`});function Ct(e,t){let n=St(t).formatToParts(new Date(e)),r={};for(let e of n)e.type!==`literal`&&(r[e.type]=e.value);return r}function wt(e,t){let n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,timeZoneName:`short`,year:`numeric`}).formatToParts(new Date(e)).find(e=>e.type===`timeZoneName`)?.value??``;return n.startsWith(`GMT`)||n.startsWith(`UTC`)?n.replace(`GMT`,`UTC`).replace(`UTC+0`,`UTC`).replace(`UTC-0`,`UTC`):n}function Tt(e,t,n,r){let i=bt(e),a=typeof i!=`number`,o=xt(i),s=Ct(o,a?`UTC`:n),c=Number(s.hour),l=c%12||12,u=c<12?`am`:`pm`,d=s.minute,f=c.toString().padStart(2,`0`),p=Number(s.day),m={"h:mm a":`${l}:${d} ${u}`,"h a":`${l} ${u}`,ha_short:`${l}${u[0]}`,EEE:s.weekday,"EEE d":`${s.weekday} ${p}`,"MMM d":`${s.month} ${p}`,"EEE MMM d":`${s.weekday} ${s.month} ${p}`,yyyy:s.year,"MMM yyyy":`${s.month} ${s.year}`,"MMM d, yyyy":`${s.month} ${p}, ${s.year}`,"MMM d, h:mm a":`${s.month} ${p}, ${l}:${d} ${u}`,"HH:mm":`${f}:${d}`}[t];if(m===void 0)throw new qe(`bad_fmt`,`formatTime: unknown fmt ${t}`);return r&&!a?`${m} ${wt(o,n)}`:m}function Et(e,t){console.assert(typeof t==`string`,`timePrimText: viewerTz is string`),console.assert(e.k===`time`,`timePrimText: prim is time`);let n=e.tz===`card`?e.zone:t,r=e.show_zone&&n!==t;return Tt(e.t,e.fmt,n,r)}function Dt(e,t=`in_hm`){console.assert(Number.isFinite(e),`countdownText: seconds finite`),console.assert(typeof t==`string`,`countdownText: fmt is string`);let n=Math.trunc(e);if(n<=0)return`now`;let r=Math.floor((n+59)/60),i=Math.floor(r/1440),a=r%1440,o=Math.floor(a/60),s=a%60;if(t===`rel`||t===`in_dhm`&&i>=2){if(i>=2)return`in ${i} days`;if(i===1)return o===0?`in 1 day`:`in 1 d ${o} h`}o+=i*24;let c=o&&s?`${o} h ${s} m`:o?`${o} h`:`${s} min`;return t===`hm`?c:`in ${c}`}function Ot(e,t=`auto`){console.assert(Number.isFinite(e),`countUpText: seconds finite`),console.assert(typeof t==`string`,`countUpText: unit is string`);let n=Math.max(0,Math.trunc(e)),r=t===`auto`?n>=172800?`day`:n>=7200?`hour`:`minute`:t,i=Math.floor(n/{day:86400,hour:3600,minute:60}[r]),a={day:`day`,hour:`hour`,minute:`minute`}[r];return`${i.toLocaleString(`en-US`)} ${a}${i===1?``:`s`}`}function kt(e){console.assert(Number.isFinite(e),`ageText: seconds finite`),console.assert(typeof e==`number`,`ageText: seconds number`);let t=Math.max(0,Math.trunc(e));return t<3600?`${Math.max(1,Math.floor(t/60))} min old`:t<172800?`${Math.floor(t/3600)} h old`:`${Math.floor(t/86400)} d old`}var At=/^(,?)(?:\.(\d)([f%])|(d))$/;function jt(e,t){console.assert(Number.isFinite(e),`numberText: v finite`),console.assert(typeof t==`string`,`numberText: fmt is string`);let n=At.exec(t)??[null,`,`,`0`,`f`],r=n[1]===`,`,i=n[3]===`%`,a=n[4]===`d`||n[2]===void 0?0:Number(n[2]),o=(i?e*100:e).toLocaleString(`en-US`,{useGrouping:r,minimumFractionDigits:a,maximumFractionDigits:a});return i?`${o}%`:o}function Mt(e,t){console.assert(Array.isArray(e),`activeVariant: variants array`),console.assert(Number.isFinite(t),`activeVariant: now finite`);let n=-1;for(let r=0;r=i)&&(a===null||t=i)&&(n=r)}return n<0?0:n}function Nt(e,t){let n=e.pts;if(!n.length)return null;let r=e.box,i=n[0][1];if(t>=n[n.length-1][0])i=n[n.length-1][1];else if(t>n[0][0])for(let e=1;e=r&&t<=o){i=o===r?a:a+(s-a)*(t-r)/(o-r);break}}return r.y0+i*(r.y1-r.y0)}function Pt(e,t){console.assert(Number.isFinite(t),`applyLive: now finite`),console.assert(e.v===1,`applyLive: clir v=1`);let n=JSON.parse(JSON.stringify(e)),r=new Map(n.prims.map(e=>[e.id,e])),i=new Set;for(let e of n.live)Ft(e,r,i,t);return n.prims=n.prims.filter(e=>!i.has(e.id)),n.reading_order=n.reading_order.filter(e=>!i.has(e)),n.live=[],n}function Ft(e,t,n,r){console.assert(typeof e.k==`string`,`runBinding: k is string`),console.assert(t instanceof Map,`runBinding: by is Map`);let i=e.args;if(e.k===`now_marker`)return It(i,t,n,r);if(e.k===`countdown`)return Lt(i,t,r);if(e.k===`count_up`)return Rt(i,t,r);if(e.k===`age`)return zt(i,t,r);if(e.k===`extrapolate`)return Bt(i,t,r);if(e.k===`timed_variants`)return Vt(i,n,r);if(e.k===`past_dim`)return Ht(i,t,r)}function It(e,t,n,r){let i=e.box,a=xt(bt(e.t0)),o=xt(bt(e.t1))-a,s=o>0?(r-a)/o:-1,c=e.prims??[];if(!(s>=0&&s<=1)){for(let e of c)n.add(e);return}let l=yt(i.x0,i.x1,s),u=typeof e.path==`number`?t.get(e.path):void 0,d=u&&u.k===`path`?Nt(u,s):null;for(let n of c){let r=t.get(n);r&&(r.k===`line`?(r.x0=l,r.x1=l,Array.isArray(e.gaps)&&(r.gaps=e.gaps)):r.k===`dot`||r.k===`tri`||r.k===`icon`?(r.x=l,d!==null&&r.k===`dot`&&(r.y=d)):(r.k===`text`||r.k===`time`)&&(r.x=l))}}function Lt(e,t,n){let r=t.get(e.prim);!r||r.k!==`text`&&r.k!==`time`||(r.lines=[Dt((xt(bt(e.t))-n)/1e3,e.fmt||`in_hm`)])}function Rt(e,t,n){let r=t.get(e.prim);if(!r||r.k!==`text`&&r.k!==`time`)return;let i=xt(bt(e.t0)),a=e.unit||`auto`;r.lines=[Ot((n-i)/1e3,a)]}function zt(e,t,n){let r=t.get(e.prim);!r||r.k!==`text`&&r.k!==`time`||(r.lines=[kt((n-xt(bt(e.t)))/1e3)])}function Bt(e,t,n){let r=t.get(e.prim);if(!r||r.k!==`text`&&r.k!==`time`)return;let i=xt(bt(e.t0));r.lines=[jt(e.v0+e.rate_per_s*(n-i)/1e3,e.fmt||`,.0f`)]}function Vt(e,t,n){let r=e.variants??[];if(!r.length)return;let i=Mt(r,n);for(let e=0;ee[0]-t[0]);let c=[[a,o]];for(let[e,t]of s){let n=[];for(let[r,i]of c)t<=r||e>=i?n.push([r,i]):(e>r&&n.push([r,e]),tt-e>1)}function qt(e,t){console.assert(t.width>0,`renderModel: width > 0`),console.assert(Number.isFinite(t.now),`renderModel: now finite`);let n=Pt(e,t.now),r=new Map(n.prims.map(e=>[e.id,e])),i=[];for(let e of n.prims)if(e.k===`text`)i.push(Wt(e,t.width));else if(e.k===`time`){let n=e.lines??[Et(e,t.viewerTz)],r={...e,lines:n};i.push(Wt(r,t.width))}else i.push({kind:`svg`,id:e.id,prim:e});for(let e of n.prims)e.k===`line`&&e.gaps&&e.gaps.length&&(e._segs=Kt(e,r,t.width));return{width:t.width,height:e.bucket.h,summary:n.summary,readingOrder:n.reading_order,hitmap:n.hitmap,ops:i}}var Jt=`/ni/world110m.json`,Yt=null;function Xt(){if(console.assert(Jt.startsWith(`/`),`loadWorld: same-origin asset`),console.assert(typeof fetch==`function`,`loadWorld: fetch available`),Yt)return Yt;let e=Zt().then(e=>(e.length===0&&(Yt=null),e));return Yt=e,e}async function Zt(){console.assert(Jt.endsWith(`.json`),`fetchWorld: json asset`);try{let e=await fetch(Jt);return console.assert(typeof e.ok==`boolean`,`fetchWorld: a response`),e.ok?Qt(await e.json()):[]}catch{return[]}}function Qt(e){console.assert(e!==void 0,`parseWorld: payload present`);let t=typeof e==`object`&&e&&`polys`in e?e.polys:null;if(!Array.isArray(t))return[];let n=t,r=[];for(let e of n){let t=$t(e);if(t===null)return[];r.push(t)}return console.assert(r.length===n.length,`parseWorld: every ring kept`),r}function $t(e){if(console.assert(e!==void 0,`ringPoints: ring present`),!Array.isArray(e)||e.length===0)return null;let t=e,n=[];for(let e of t){if(!Array.isArray(e)||e.length!==2)return null;let t=e[0],r=e[1];if(typeof t!=`number`||typeof r!=`number`||!Number.isFinite(t)||!Number.isFinite(r))return null;n.push([t,r])}return console.assert(n.length===t.length,`ringPoints: every point kept`),n}function en(e,t,n){console.assert(e.k===`basemap`,`mapPaths: basemap prim`),console.assert(t>=0,`mapPaths: width non-negative`);let r=e.box,i=vt(r.x0,0,t),a=vt(r.x1,0,t),[o,s,c,l]=e.bbox;if(!(c>o)||!(l>s))return[];let u=a-i,d=r.y1-r.y0,f=[];for(let e of n){if(tn(e,o,s,c,l))continue;let t=e.map(([e,t])=>`${nn(i+(e-o)/(c-o)*u)},${nn(r.y0+(l-t)/(l-s)*d)}`);f.push(`M${t.join(` L`)}Z`)}return f}function tn(e,t,n,r,i){console.assert(e.length>0,`missesBbox: non-empty ring`),console.assert(r>t&&i>n,`missesBbox: ordered bbox`);let a=1/0,o=-1/0,s=1/0,c=-1/0;for(let[t,n]of e)to&&(o=t),nc&&(c=n);return or||ci}function nn(e){console.assert(typeof e==`number`,`fmt: number`),console.assert(Number.isFinite(e),`fmt: finite number`);let t=e.toFixed(2).replace(/\.?0+$/,``);return t===`-0`||t===``?`0`:t}var rn={box:24,stroke:1.75,icons:{sun:[{t:`circle`,c:[12,12],r:4,fill:!1},{t:`poly`,pts:[[18.8,12],[21.2,12]],closed:!1,fill:!1},{t:`poly`,pts:[[16.808,16.808],[18.505,18.505]],closed:!1,fill:!1},{t:`poly`,pts:[[12,18.8],[12,21.2]],closed:!1,fill:!1},{t:`poly`,pts:[[7.192,16.808],[5.495,18.505]],closed:!1,fill:!1},{t:`poly`,pts:[[5.2,12],[2.8,12]],closed:!1,fill:!1},{t:`poly`,pts:[[7.192,7.192],[5.495,5.495]],closed:!1,fill:!1},{t:`poly`,pts:[[12,5.2],[12,2.8]],closed:!1,fill:!1},{t:`poly`,pts:[[16.808,7.192],[18.505,5.495]],closed:!1,fill:!1}],moon:[{t:`poly`,pts:[[4.122,13.389],[4.078,13.113],[4.044,12.836],[4.019,12.558],[4.005,12.279],[4,12],[4.005,11.721],[4.019,11.442],[4.044,11.164],[4.078,10.887],[4.122,10.611],[4.175,10.337],[4.238,10.065],[4.31,9.795],[4.392,9.528],[4.482,9.264],[4.583,9.003],[4.692,8.746],[4.81,8.493],[4.936,8.244],[5.072,8],[5.216,7.761],[5.368,7.526],[5.528,7.298],[5.696,7.075],[5.872,6.858],[6.055,6.647],[6.245,6.443],[6.443,6.245],[6.647,6.055],[6.858,5.872],[7.075,5.696],[7.298,5.528],[7.526,5.368],[7.761,5.216],[8,5.072],[8.244,4.936],[8.493,4.81],[8.746,4.692],[9.217,9.288],[9.204,9.044],[9.238,9.532],[9.2,8.8],[9.268,9.774],[9.204,8.556],[9.003,4.583],[9.306,10.016],[9.217,8.312],[9.238,8.068],[9.353,10.255],[9.268,7.826],[9.306,7.584],[9.408,10.493],[9.264,4.482],[9.353,7.345],[9.408,7.107],[9.471,10.729],[9.471,6.871],[9.528,4.392],[9.543,6.637],[9.543,10.963],[9.622,6.406],[9.71,6.178],[9.795,4.31],[9.805,5.953],[9.908,5.731],[9.622,11.194],[10.065,4.238],[10.019,5.514],[10.138,5.3],[10.337,4.175],[10.264,5.091],[9.71,11.422],[10.397,4.886],[10.537,4.686],[10.611,4.122],[10.684,4.49],[10.838,4.3],[10.887,4.078],[10.998,4.116],[9.805,11.647],[9.908,11.869],[10.019,12.086],[10.138,12.3],[10.264,12.509],[10.397,12.714],[10.537,12.914],[10.684,13.11],[10.838,13.3],[10.998,13.484],[11.165,13.663],[19.269,15.092],[19.047,15.195],[19.308,15.254],[11.337,13.835],[18.822,15.29],[18.594,15.378],[19.19,15.507],[18.363,15.457],[18.129,15.529],[19.064,15.756],[11.516,14.002],[17.893,15.592],[17.655,15.647],[18.928,16],[17.416,15.694],[17.174,15.732],[18.784,16.239],[11.7,14.162],[16.932,15.762],[16.688,15.783],[18.632,16.474],[16.444,15.796],[11.89,14.316],[16.2,15.8],[15.956,15.796],[18.472,16.702],[15.712,15.783],[12.086,14.463],[15.468,15.762],[18.304,16.925],[15.226,15.732],[12.286,14.603],[14.984,15.694],[14.745,15.647],[12.491,14.736],[14.507,15.592],[18.128,17.142],[14.271,15.529],[12.7,14.862],[14.037,15.457],[12.914,14.981],[13.806,15.378],[13.131,15.092],[13.578,15.29],[13.353,15.195],[17.945,17.353],[17.755,17.557],[17.557,17.755],[17.353,17.945],[17.142,18.128],[16.925,18.304],[16.702,18.472],[16.474,18.632],[16.239,18.784],[16,18.928],[15.756,19.064],[15.507,19.19],[15.254,19.308],[14.997,19.417],[14.736,19.518],[14.472,19.608],[14.205,19.69],[13.935,19.762],[13.663,19.825],[13.389,19.878],[13.113,19.922],[12.836,19.956],[12.558,19.981],[12.279,19.995],[12,20],[11.721,19.995],[11.442,19.981],[11.164,19.956],[10.887,19.922],[10.611,19.878],[10.337,19.825],[10.065,19.762],[9.795,19.69],[9.528,19.608],[9.264,19.518],[9.003,19.417],[8.746,19.308],[8.493,19.19],[8.244,19.064],[8,18.928],[7.761,18.784],[7.526,18.632],[7.298,18.472],[7.075,18.304],[6.858,18.128],[6.647,17.945],[6.443,17.755],[6.245,17.557],[6.055,17.353],[5.872,17.142],[5.696,16.925],[5.528,16.702],[5.368,16.474],[5.216,16.239],[5.072,16],[4.936,15.756],[4.81,15.507],[4.692,15.254],[4.583,14.997],[4.482,14.736],[4.392,14.472],[4.31,14.205],[4.238,13.935],[4.175,13.663]],closed:!0,fill:!1}],cloud:[{t:`poly`,pts:[[3.709,14.235],[3.737,13.971],[3.783,13.71],[3.847,13.453],[3.929,13.2],[4.029,12.954],[4.145,12.716],[4.277,12.486],[4.426,12.266],[4.589,12.057],[4.767,11.86],[4.957,11.676],[5.16,11.506],[5.375,11.35],[5.6,11.209],[5.834,11.085],[6.076,10.977],[6.326,10.886],[6.581,10.813],[6.84,10.758],[7.103,10.721],[7.367,10.702],[7.512,10.651],[7.549,10.304],[7.609,9.96],[7.694,9.622],[7.802,9.29],[7.932,8.966],[8.085,8.653],[8.26,8.35],[8.455,8.061],[8.67,7.786],[8.903,7.527],[9.154,7.284],[9.422,7.06],[9.704,6.855],[10,6.67],[10.308,6.506],[10.627,6.364],[10.955,6.245],[11.29,6.149],[11.632,6.076],[11.977,6.027],[12.326,6.003],[12.674,6.003],[13.023,6.027],[13.368,6.076],[13.71,6.149],[14.045,6.245],[14.373,6.364],[14.692,6.506],[15,6.67],[15.296,6.855],[15.578,7.06],[15.846,7.284],[16.097,7.527],[16.33,7.786],[16.545,8.061],[16.74,8.35],[16.915,8.653],[17.068,8.966],[17.198,9.29],[17.306,9.622],[17.391,9.96],[17.451,10.304],[17.576,10.62],[17.825,10.655],[18.071,10.707],[18.312,10.776],[18.549,10.862],[18.778,10.964],[19,11.082],[19.213,11.215],[19.416,11.363],[19.609,11.525],[19.79,11.699],[19.958,11.886],[20.112,12.084],[20.253,12.292],[20.379,12.51],[20.489,12.736],[20.583,12.969],[20.661,13.208],[20.721,13.452],[20.765,13.699],[20.791,13.949],[20.8,14.2],[20.791,14.451],[20.765,14.701],[20.721,14.948],[20.661,15.192],[20.583,15.431],[20.489,15.664],[20.379,15.89],[20.253,16.108],[20.112,16.316],[19.958,16.514],[19.79,16.701],[19.609,16.875],[19.416,17.037],[19.213,17.185],[19,17.318],[20.8,18.2],[18.778,17.436],[18.549,17.538],[18.312,17.624],[18.071,17.693],[17.825,17.745],[17.576,17.78],[17.326,17.798],[17.074,17.798],[16.824,17.78],[16.575,17.745],[16.329,17.693],[16.088,17.624],[15.851,17.538],[14.021,15.89],[15.622,17.436],[15.4,17.318],[14.147,16.108],[15.187,17.185],[14.288,16.316],[14.984,17.037],[14.791,16.875],[14.442,16.514],[14.61,16.701],[13.71,15.851],[13.368,15.924],[13.023,15.973],[12.674,15.997],[12.326,15.997],[11.977,15.973],[11.632,15.924],[10.411,16.943],[10.233,17.14],[10.574,16.734],[10.043,17.324],[10.723,16.514],[9.84,17.494],[11.29,15.851],[9.625,17.65],[10.855,16.284],[9.4,17.791],[9.166,17.915],[10.971,16.046],[8.924,18.023],[8.674,18.114],[11.071,15.8],[8.419,18.187],[6.581,18.187],[6.326,18.114],[6.076,18.023],[5.834,17.915],[5.6,17.791],[5.375,17.65],[3.7,18.2],[5.16,17.494],[4.957,17.324],[4.767,17.14],[4.589,16.943],[4.426,16.734],[4.277,16.514],[4.145,16.284],[4.029,16.046],[3.929,15.8],[3.847,15.547],[3.783,15.29],[3.737,15.029],[3.709,14.765],[3.7,14.5]],closed:!0,fill:!1}],cloud_sun:[{t:`circle`,c:[8.5,8.5],r:3,fill:!1},{t:`poly`,pts:[[4.964,12.036],[3.692,13.308]],closed:!1,fill:!1},{t:`poly`,pts:[[3.5,8.5],[1.7,8.5]],closed:!1,fill:!1},{t:`poly`,pts:[[4.964,4.964],[3.692,3.692]],closed:!1,fill:!1},{t:`poly`,pts:[[8.5,3.5],[8.5,1.7]],closed:!1,fill:!1},{t:`poly`,pts:[[12.036,4.964],[13.308,3.692]],closed:!1,fill:!1},{t:`poly`,pts:[[7.402,16.233],[7.424,16.016],[7.462,15.802],[7.515,15.591],[7.582,15.384],[7.663,15.183],[7.759,14.987],[7.867,14.799],[7.989,14.618],[8.123,14.447],[8.269,14.285],[8.425,14.134],[8.592,13.995],[8.768,13.867],[8.952,13.751],[9.144,13.649],[9.343,13.561],[9.547,13.487],[9.756,13.427],[9.969,13.381],[10.184,13.351],[10.401,13.336],[10.52,13.294],[10.55,13.009],[10.6,12.728],[10.669,12.45],[10.757,12.178],[10.864,11.912],[10.99,11.655],[11.133,11.407],[11.293,11.17],[11.469,10.945],[11.661,10.732],[11.867,10.533],[12.086,10.349],[12.317,10.181],[12.56,10.029],[12.813,9.895],[13.074,9.779],[13.343,9.681],[13.618,9.602],[13.898,9.542],[14.181,9.502],[14.467,9.482],[14.753,9.482],[15.039,9.502],[15.322,9.542],[15.602,9.602],[15.877,9.681],[16.146,9.779],[16.407,9.895],[16.66,10.029],[16.903,10.181],[17.134,10.349],[17.353,10.533],[17.559,10.732],[17.751,10.945],[17.927,11.17],[18.087,11.407],[18.23,11.655],[18.356,11.912],[18.463,12.178],[18.551,12.45],[18.62,12.728],[18.67,13.009],[18.773,13.268],[18.977,13.297],[19.178,13.34],[19.376,13.396],[19.57,13.467],[19.758,13.551],[19.94,13.647],[20.115,13.757],[20.281,13.878],[20.439,14.01],[20.587,14.153],[20.725,14.306],[20.852,14.469],[20.967,14.64],[21.07,14.818],[21.161,15.003],[21.238,15.194],[21.302,15.39],[21.351,15.59],[21.387,15.793],[21.409,15.998],[21.416,16.204],[21.409,16.41],[21.387,16.615],[21.351,16.818],[21.302,17.018],[21.238,17.214],[21.161,17.405],[21.07,17.59],[20.967,17.768],[20.852,17.939],[20.725,18.102],[20.587,18.255],[20.439,18.398],[20.281,18.53],[20.115,18.651],[19.94,18.761],[21.416,19.484],[19.758,18.857],[19.57,18.941],[19.376,19.012],[19.178,19.068],[18.977,19.111],[18.773,19.14],[18.567,19.154],[18.361,19.154],[18.155,19.14],[17.951,19.111],[17.75,19.068],[17.552,19.012],[17.358,18.941],[15.858,17.59],[17.17,18.857],[16.988,18.761],[15.961,17.768],[16.813,18.651],[16.076,17.939],[16.647,18.53],[16.489,18.398],[16.203,18.102],[16.341,18.255],[15.602,17.558],[15.322,17.618],[15.039,17.658],[14.753,17.678],[14.467,17.678],[14.181,17.658],[13.898,17.618],[12.897,18.453],[12.751,18.615],[13.031,18.282],[12.595,18.766],[13.153,18.101],[12.428,18.905],[13.618,17.558],[12.252,19.033],[13.261,17.913],[12.068,19.149],[11.876,19.251],[13.357,17.717],[11.677,19.339],[11.473,19.413],[13.438,17.516],[11.264,19.473],[9.756,19.473],[9.547,19.413],[9.343,19.339],[9.144,19.251],[8.952,19.149],[8.768,19.033],[7.394,19.484],[8.592,18.905],[8.425,18.766],[8.269,18.615],[8.123,18.453],[7.989,18.282],[7.867,18.101],[7.759,17.913],[7.663,17.717],[7.582,17.516],[7.515,17.309],[7.462,17.098],[7.424,16.884],[7.402,16.667],[7.394,16.45]],closed:!0,fill:!1}],cloud_moon:[{t:`poly`,pts:[[3.501,9.433],[3.454,9.258],[3.414,9.081],[3.379,8.903],[3.351,8.724],[3.328,8.544],[3.313,8.363],[3.303,8.181],[3.3,8],[3.303,7.819],[3.313,7.637],[3.328,7.456],[3.351,7.276],[3.379,7.097],[3.414,6.919],[3.454,6.742],[3.501,6.567],[3.555,6.393],[3.614,6.221],[3.679,6.052],[3.75,5.885],[3.826,5.72],[3.909,5.559],[3.997,5.4],[4.09,5.244],[4.189,5.092],[4.293,4.944],[4.402,4.799],[4.517,4.658],[4.636,4.521],[4.759,4.388],[4.888,4.259],[5.021,4.136],[5.158,4.017],[5.299,3.902],[5.444,3.793],[5.592,3.689],[5.744,3.59],[5.9,3.497],[6.059,3.409],[6.22,3.326],[6.385,3.25],[6.552,3.179],[6.721,3.114],[6.893,3.055],[7.067,3.001],[6.77,5.101],[6.745,5.26],[6.801,4.944],[6.837,4.787],[6.725,5.419],[6.878,4.632],[6.711,5.579],[6.925,4.479],[6.703,5.739],[6.977,4.327],[7.242,2.954],[7.035,4.177],[6.7,5.9],[7.098,4.029],[6.703,6.061],[7.166,3.883],[7.238,3.74],[7.419,2.914],[6.711,6.221],[7.316,3.6],[7.399,3.462],[6.725,6.381],[7.486,3.328],[7.597,2.879],[7.579,3.196],[6.745,6.54],[7.675,3.068],[7.776,2.851],[7.776,2.943],[6.77,6.699],[6.801,6.856],[6.837,7.013],[6.878,7.168],[6.925,7.321],[6.977,7.473],[7.035,7.623],[7.098,7.771],[7.166,7.917],[7.238,8.06],[7.316,8.2],[7.399,8.338],[7.486,8.472],[7.579,8.604],[7.675,8.732],[7.776,8.857],[7.882,8.978],[7.991,9.095],[8.105,9.209],[8.222,9.318],[8.343,9.424],[8.468,9.525],[8.596,9.621],[8.728,9.714],[13.171,10.102],[13.25,10.115],[13.023,10.165],[12.873,10.223],[8.862,9.801],[13.174,10.28],[12.721,10.275],[12.568,10.322],[9,9.884],[13.091,10.441],[12.413,10.363],[12.256,10.399],[9.14,9.962],[12.099,10.43],[13.003,10.6],[11.94,10.455],[9.283,10.034],[11.781,10.475],[9.429,10.102],[11.621,10.489],[12.91,10.756],[11.461,10.497],[9.577,10.165],[11.3,10.5],[9.727,10.223],[11.139,10.497],[10.979,10.489],[9.879,10.275],[10.819,10.475],[10.032,10.322],[10.66,10.455],[10.187,10.363],[10.501,10.43],[12.811,10.908],[10.344,10.399],[12.707,11.056],[12.598,11.201],[12.483,11.342],[12.364,11.479],[12.241,11.612],[12.112,11.741],[11.979,11.864],[11.842,11.983],[11.701,12.098],[11.556,12.207],[11.408,12.311],[11.256,12.41],[11.1,12.503],[10.941,12.591],[10.78,12.674],[10.615,12.75],[10.448,12.821],[10.279,12.886],[10.107,12.945],[9.933,12.999],[9.758,13.046],[9.581,13.086],[9.403,13.121],[9.224,13.149],[9.044,13.172],[8.863,13.187],[8.681,13.197],[8.5,13.2],[8.319,13.197],[8.137,13.187],[7.956,13.172],[7.776,13.149],[7.597,13.121],[7.419,13.086],[7.242,13.046],[7.067,12.999],[6.893,12.945],[6.721,12.886],[6.552,12.821],[6.385,12.75],[6.22,12.674],[6.059,12.591],[5.9,12.503],[5.744,12.41],[5.592,12.311],[5.444,12.207],[5.299,12.098],[5.158,11.983],[5.021,11.864],[4.888,11.741],[4.759,11.612],[4.636,11.479],[4.517,11.342],[4.402,11.201],[4.293,11.056],[4.189,10.908],[4.09,10.756],[3.997,10.6],[3.909,10.441],[3.826,10.28],[3.75,10.115],[3.679,9.948],[3.614,9.779],[3.555,9.607]],closed:!0,fill:!1},{t:`poly`,pts:[[7.402,16.233],[7.424,16.016],[7.462,15.802],[7.515,15.591],[7.582,15.384],[7.663,15.183],[7.759,14.987],[7.867,14.799],[7.989,14.618],[8.123,14.447],[8.269,14.285],[8.425,14.134],[8.592,13.995],[8.768,13.867],[8.952,13.751],[9.144,13.649],[9.343,13.561],[9.547,13.487],[9.756,13.427],[9.969,13.381],[10.184,13.351],[10.401,13.336],[10.52,13.294],[10.55,13.009],[10.6,12.728],[10.669,12.45],[10.757,12.178],[10.864,11.912],[10.99,11.655],[11.133,11.407],[11.293,11.17],[11.469,10.945],[11.661,10.732],[11.867,10.533],[12.086,10.349],[12.317,10.181],[12.56,10.029],[12.813,9.895],[13.074,9.779],[13.343,9.681],[13.618,9.602],[13.898,9.542],[14.181,9.502],[14.467,9.482],[14.753,9.482],[15.039,9.502],[15.322,9.542],[15.602,9.602],[15.877,9.681],[16.146,9.779],[16.407,9.895],[16.66,10.029],[16.903,10.181],[17.134,10.349],[17.353,10.533],[17.559,10.732],[17.751,10.945],[17.927,11.17],[18.087,11.407],[18.23,11.655],[18.356,11.912],[18.463,12.178],[18.551,12.45],[18.62,12.728],[18.67,13.009],[18.773,13.268],[18.977,13.297],[19.178,13.34],[19.376,13.396],[19.57,13.467],[19.758,13.551],[19.94,13.647],[20.115,13.757],[20.281,13.878],[20.439,14.01],[20.587,14.153],[20.725,14.306],[20.852,14.469],[20.967,14.64],[21.07,14.818],[21.161,15.003],[21.238,15.194],[21.302,15.39],[21.351,15.59],[21.387,15.793],[21.409,15.998],[21.416,16.204],[21.409,16.41],[21.387,16.615],[21.351,16.818],[21.302,17.018],[21.238,17.214],[21.161,17.405],[21.07,17.59],[20.967,17.768],[20.852,17.939],[20.725,18.102],[20.587,18.255],[20.439,18.398],[20.281,18.53],[20.115,18.651],[19.94,18.761],[21.416,19.484],[19.758,18.857],[19.57,18.941],[19.376,19.012],[19.178,19.068],[18.977,19.111],[18.773,19.14],[18.567,19.154],[18.361,19.154],[18.155,19.14],[17.951,19.111],[17.75,19.068],[17.552,19.012],[17.358,18.941],[15.858,17.59],[17.17,18.857],[16.988,18.761],[15.961,17.768],[16.813,18.651],[16.076,17.939],[16.647,18.53],[16.489,18.398],[16.203,18.102],[16.341,18.255],[15.602,17.558],[15.322,17.618],[15.039,17.658],[14.753,17.678],[14.467,17.678],[14.181,17.658],[13.898,17.618],[12.897,18.453],[12.751,18.615],[13.031,18.282],[12.595,18.766],[13.153,18.101],[12.428,18.905],[13.618,17.558],[12.252,19.033],[13.261,17.913],[12.068,19.149],[11.876,19.251],[13.357,17.717],[11.677,19.339],[11.473,19.413],[13.438,17.516],[11.264,19.473],[9.756,19.473],[9.547,19.413],[9.343,19.339],[9.144,19.251],[8.952,19.149],[8.768,19.033],[7.394,19.484],[8.592,18.905],[8.425,18.766],[8.269,18.615],[8.123,18.453],[7.989,18.282],[7.867,18.101],[7.759,17.913],[7.663,17.717],[7.582,17.516],[7.515,17.309],[7.462,17.098],[7.424,16.884],[7.402,16.667],[7.394,16.45]],closed:!0,fill:!1}],rain:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`poly`,pts:[[8.5,17.6],[6.9,21.6]],closed:!1,fill:!1},{t:`poly`,pts:[[12.5,17.6],[10.9,21.6]],closed:!1,fill:!1},{t:`poly`,pts:[[16.5,17.6],[14.9,21.6]],closed:!1,fill:!1}],drizzle:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`poly`,pts:[[8.5,18.4],[7.9,20]],closed:!1,fill:!1},{t:`poly`,pts:[[12.5,18.4],[11.9,20]],closed:!1,fill:!1},{t:`poly`,pts:[[16.5,18.4],[15.9,20]],closed:!1,fill:!1}],snow:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`circle`,c:[8.5,19.2],r:.9,fill:!0},{t:`circle`,c:[12.5,21],r:.9,fill:!0},{t:`circle`,c:[16.5,19.2],r:.9,fill:!0}],storm:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`poly`,pts:[[13.2,16],[10.6,19.6],[13.4,19.6],[11.2,23]],closed:!1,fill:!1}],fog:[{t:`poly`,pts:[[4,8],[20,8]],closed:!1,fill:!1},{t:`poly`,pts:[[3,12],[17,12]],closed:!1,fill:!1},{t:`poly`,pts:[[6,16],[21,16]],closed:!1,fill:!1},{t:`poly`,pts:[[5,20],[15,20]],closed:!1,fill:!1}],wind:[{t:`poly`,pts:[[3,9],[16.5,9],[16.5,9],[17.75,8.665],[18.665,7.75],[19,6.5],[18.665,5.25],[17.75,4.335],[16.5,4],[15.25,4.335],[14.335,5.25],[14,6.5]],closed:!1,fill:!1},{t:`poly`,pts:[[3,13],[19,13],[19,13],[20.25,13.335],[21.165,14.25],[21.5,15.5],[21.165,16.75],[20.25,17.665],[19,18],[17.75,17.665],[16.835,16.75],[16.5,15.5]],closed:!1,fill:!1},{t:`poly`,pts:[[3,17],[11,17]],closed:!1,fill:!1}],alert:[{t:`poly`,pts:[[12,3.5],[21.5,20],[2.5,20]],closed:!0,fill:!1},{t:`poly`,pts:[[12,9.5],[12,14.2]],closed:!1,fill:!1},{t:`circle`,c:[12,17.2],r:1,fill:!0}],check:[{t:`poly`,pts:[[4.5,12.5],[9.5,17.5],[19.5,6.5]],closed:!1,fill:!1}],cross:[{t:`poly`,pts:[[6,6],[18,18]],closed:!1,fill:!1},{t:`poly`,pts:[[18,6],[6,18]],closed:!1,fill:!1}],clock:[{t:`circle`,c:[12,12],r:9,fill:!1},{t:`poly`,pts:[[12,6.5],[12,12],[15.8,14.2]],closed:!1,fill:!1}],link_out:[{t:`poly`,pts:[[10,5],[5,5],[5,19],[19,19],[19,14]],closed:!1,fill:!1},{t:`poly`,pts:[[12,12],[19.5,4.5]],closed:!1,fill:!1},{t:`poly`,pts:[[14,4.5],[19.5,4.5],[19.5,10]],closed:!1,fill:!1}],lock:[{t:`poly`,pts:[[5,11],[19,11],[19,20.5],[5,20.5]],closed:!0,fill:!1},{t:`poly`,pts:[[8,11],[8,8],[8,8],[8.136,6.965],[8.536,6],[9.172,5.172],[10,4.536],[10.965,4.136],[12,4],[13.035,4.136],[14,4.536],[14.828,5.172],[15.464,6],[15.864,6.965],[16,8],[16,11]],closed:!1,fill:!1}],unlock:[{t:`poly`,pts:[[5,11],[19,11],[19,20.5],[5,20.5]],closed:!0,fill:!1},{t:`poly`,pts:[[8,11],[8,8],[8,8],[8.136,6.965],[8.536,6],[9.172,5.172],[10,4.536],[10.965,4.136],[12,4],[13.035,4.136],[14,4.536],[14.828,5.172],[15.464,6],[15.864,6.965],[16,8],[16,9]],closed:!1,fill:!1}],pin:[{t:`poly`,pts:[[6.371,12.75],[5.892,11.723],[5.599,10.629],[5.5,9.5],[5.599,8.371],[5.892,7.277],[6.371,6.25],[7.021,5.322],[7.822,4.521],[8.75,3.871],[9.777,3.392],[10.871,3.099],[12,3],[13.129,3.099],[14.223,3.392],[15.25,3.871],[16.178,4.521],[16.979,5.322],[17.629,6.25],[18.108,7.277],[18.401,8.371],[18.5,9.5],[18.401,10.629],[18.108,11.723],[17.629,12.75],[12,21.5]],closed:!0,fill:!1},{t:`circle`,c:[12,9.5],r:2.3,fill:!1}],up:[{t:`poly`,pts:[[12,19],[12,5]],closed:!1,fill:!1},{t:`poly`,pts:[[6,11],[12,5],[18,11]],closed:!1,fill:!1}],down:[{t:`poly`,pts:[[12,5],[12,19]],closed:!1,fill:!1},{t:`poly`,pts:[[6,13],[12,19],[18,13]],closed:!1,fill:!1}]}},an=0;function on(e){console.assert(e!=null,`detectOverflows: root required`),console.assert(typeof e.querySelectorAll==`function`,`detectOverflows: root is an element`);let t=e.querySelectorAll(`.ni-t[data-max-w]`),n=0;for(let e of t){let t=Number(e.getAttribute(`data-max-w`));!Number.isFinite(t)||t<=0||e.scrollWidth>t+.5&&!e.hasAttribute(`data-ellipsis`)&&(e.setAttribute(`data-ellipsis`,``),n+=1,an+=1)}return n}var sn=m(`unrenderable`),cn=a(``),ln=a(``),un=a(``),dn=a(``),fn=a(``),pn=a(``),mn=a(``),hn=a(``),gn=a(``),_n=a(``),vn=a(``),yn=m(``),bn=m(` `),xn=m(`
      `),Sn=m(`
      `);function Cn(n,r){let i=s();E(r,!0);function a(){let e=typeof window>`u`?null:window;return typeof e?.NI_NOW==`number`?e.NI_NOW:Date.now()}let c=z(e(a())),u=typeof window>`u`?null:window.setInterval(()=>{k(c,a(),!0)},15e3);te(()=>{u!==null&&window.clearInterval(u)});let m=N(()=>{try{return{ok:!0,clir:Q(r.clir)}}catch(e){return{ok:!1,why:e instanceof qe?e.message:String(e)}}}),g=z(0),y=N(()=>v(m).ok?v(m).clir.bucket.min_w:0),C=N(()=>v(g)>v(y)?v(g):v(y)),w=N(()=>v(g)>0&&v(g)v(m).ok&&v(C)>0?qt(v(m).clir,{width:v(C),now:v(c),viewerTz:r.viewerTz}):null),D=z(null);l(()=>{if(!v(D)||!v(T))return;let e=v(D),t=()=>{on(e)},n=typeof document>`u`?null:document.fonts;n&&typeof n.ready?.then==`function`?n.ready.then(t,t):t()});let O=z(null),M=N(()=>v(T)!==null&&v(T).ops.some(e=>ae(e)?.k===`basemap`));l(()=>{if(!v(M))return;let e=!0;return Xt().then(t=>{e&&k(O,t)},()=>{e&&k(O,[])}),()=>{e=!1}});function I(e){console.assert(Number.isFinite(e),`fmt: finite number`);let t=e.toFixed(2).replace(/\.?0+$/,``);return t===`-0`||t===``?`0`:t}function L(e,t){return console.assert(t>=0,`rx: width non-negative`),vt(e,0,t)}function R(e){return console.assert(e.length>0,`tokVar: token required`),`var(--ni-${e})`}function ie(e){return e.kind===`text`}function ae(e){return e.kind===`svg`?e.prim:null}function B(e,t){console.assert(e.y1>=e.y0,`boxRect: ordered box`),console.assert(t>=0,`boxRect: width non-negative`);let n=L(e.x0,t),r=L(e.x1,t);return{x:n,y:e.y0,w:Math.max(0,r-n),h:Math.max(0,e.y1-e.y0)}}function oe(e,t){console.assert(e.k===`tri`,`triPoints: tri prim`),console.assert(e.size>0,`triPoints: size positive`);let n=e.size*.866,r=L(e.x,t),i=e.y,a=e.size;return(e.dir===`up`?[[r-a/2,i+n/2],[r+a/2,i+n/2],[r,i-n/2]]:e.dir===`down`?[[r-a/2,i-n/2],[r+a/2,i-n/2],[r,i+n/2]]:e.dir===`left`?[[r+n/2,i-a/2],[r+n/2,i+a/2],[r-n/2,i]]:[[r-n/2,i-a/2],[r-n/2,i+a/2],[r+n/2,i]]).map(([e,t])=>`${I(e)},${I(t)}`).join(` `)}function V(e,t){console.assert(e.k===`path`,`pathD: path prim`),console.assert(Array.isArray(e.pts),`pathD: points array`);let n=e.box,r=L(n.x0,t),i=L(n.x1,t),a=e.pts.map(([e,t])=>[r+e*(i-r),n.y0+t*(n.y1-n.y0)]);if(a.length<2)return{line:``,fill:null};let o=`M`+a.map(([e,t])=>`${I(e)},${I(t)}`).join(` L`),s=a[0],c=a[a.length-1];return{line:o,fill:e.fill?`${o} L${I(c[0])},${I(n.y1)} L${I(s[0])},${I(n.y1)} Z`:null}}function H(e,t,n){console.assert(e.length>0,`gapDash: segments required`),console.assert(t<=n,`gapDash: ordered ends`);let r=[0],i=t;for(let[t,n]of e)r.push(t-i,n-t),i=n;return r.push(n-i+1e3),r.map(I).join(` `)}function se(e,t,n){if(console.assert(n>0,`cellFill: steps positive`),console.assert(e>=0,`cellFill: value non-negative`),t===`seq`)return R(`viz-seq-${1+Math.round(e*4/Math.max(1,n-1))}`);let r=e/Math.max(1,n-1);return r<=.5?`color-mix(in srgb, ${R(`viz-div-mid`)} ${I(r*200)}%, ${R(`viz-div-neg`)})`:`color-mix(in srgb, ${R(`viz-div-pos`)} ${I((r-.5)*200)}%, ${R(`viz-div-mid`)})`}function ce(e,t){console.assert(e.k===`cells`,`cellsFor: cells prim`),console.assert(e.cols>0&&e.rows>0,`cellsFor: grid shape`);let n=e.box,r=L(n.x0,t),i=(L(n.x1,t)-r-e.gap*(e.cols-1))/e.cols,a=(n.y1-n.y0-e.gap*(e.rows-1))/e.rows,o=[];for(let t=0;t0,`iconScale: size positive`),console.assert(rn.box>0,`iconScale: icon box`),e.size/rn.box}function ue(e){return console.assert(Array.isArray(e),`pointList: points array`),e.map(e=>`${I(e[0])},${I(e[1])}`).join(` `)}var U=f(),de=b(U),fe=e=>{var t=sn();o(()=>j(t,`title`,v(m).ok?`render failed`:v(m).why)),d(e,t)},W=e=>{var n=Sn();let r;var a=x(n);let s;var c=x(a);p(c,21,()=>v(T).ops,F,(e,n)=>{let r=N(()=>ae(v(n)));var a=f(),s=b(a),c=e=>{var n=f(),a=b(n),s=e=>{let t=N(()=>v(r)),n=N(()=>B({x0:v(t).x0,x1:v(t).x1,y0:v(t).y0,y1:v(t).y1},v(T).width));var i=cn();let a;o((e,n,r,o,s,c,l)=>{j(i,`x`,e),j(i,`y`,n),j(i,`width`,r),j(i,`height`,o),j(i,`rx`,s),a=_(i,``,a,{fill:c,stroke:l,opacity:v(t).alpha??1})},[()=>I(v(n).x),()=>I(v(n).y),()=>I(v(n).w),()=>I(v(n).h),()=>I(v(t).r),()=>R(v(t).tok),()=>v(t).stroke?R(v(t).stroke):`none`]),d(e,i)},c=e=>{let t=N(()=>v(r));var n=ln();let i;o((e,r,a,o,s,c,l)=>{j(n,`x1`,e),j(n,`y1`,r),j(n,`x2`,a),j(n,`y2`,o),i=_(n,``,i,{stroke:s,"stroke-width":c,"stroke-dasharray":l,opacity:v(t).alpha??1})},[()=>I(L(v(t).x0,v(T).width)),()=>I(v(t).y0),()=>I(L(v(t).x1,v(T).width)),()=>I(v(t).y1),()=>R(v(t).tok),()=>I(v(t).w),()=>v(t)._segs?H(v(t)._segs,Math.min(v(t).y0,v(t).y1),Math.max(v(t).y0,v(t).y1)):v(t).dash?v(t).dash.map(I).join(` `):`none`]),d(e,n)},l=e=>{let t=N(()=>v(r));var n=un();let i;o((e,r)=>{j(n,`points`,e),i=_(n,``,i,{fill:r,opacity:v(t).alpha??1})},[()=>oe(v(t),v(T).width),()=>R(v(t).tok)]),d(e,n)},u=e=>{let n=N(()=>v(r));var i=fn();let a;var s=x(i),c=e=>{var t=dn();let r;o((e,n,i,a)=>{j(t,`cx`,e),j(t,`cy`,n),j(t,`r`,i),r=_(t,``,r,{fill:a})},[()=>I(L(v(n).x,v(T).width)),()=>I(v(n).y),()=>I(v(n).r+v(n).ring_w),()=>R(v(n).ring)]),d(e,t)};t(s,e=>{v(n).ring&&e(c)});var l=h(s);let u;A(i),o((e,t,r,o)=>{a=_(i,``,a,{opacity:v(n).alpha??1}),j(l,`cx`,e),j(l,`cy`,t),j(l,`r`,r),u=_(l,``,u,{fill:o})},[()=>I(L(v(n).x,v(T).width)),()=>I(v(n).y),()=>I(v(n).r),()=>R(v(n).tok)]),d(e,i)},m=e=>{let n=N(()=>v(r)),i=N(()=>V(v(n),v(T).width));var a=mn();let s;var c=x(a),l=e=>{var t=pn();let r;o(e=>{j(t,`d`,v(i).fill),r=_(t,``,r,{fill:e,stroke:`none`})},[()=>R(v(n).fill)]),d(e,t)};t(c,e=>{v(i).fill&&v(n).fill&&e(l)});var u=h(c);let f;A(a),o((e,t)=>{s=_(a,``,s,{opacity:v(n).alpha??1}),j(u,`d`,v(i).line),f=_(u,``,f,{fill:`none`,stroke:e,"stroke-width":t,"stroke-dasharray":v(n).style===`interp`?`4 3`:`none`,"stroke-linejoin":`round`,"stroke-linecap":`round`})},[()=>R(v(n).tok),()=>I(v(n).w)]),d(e,a)},g=e=>{let t=N(()=>v(r));var n=gn();let i;p(n,21,()=>ce(v(t),v(T).width),F,(e,t)=>{var n=hn();o((e,r,i,a)=>{j(n,`x`,e),j(n,`y`,r),j(n,`width`,i),j(n,`height`,a),_(n,v(t).style)},[()=>I(v(t).x),()=>I(v(t).y),()=>I(v(t).w),()=>I(v(t).h)]),d(e,n)}),A(n),o(()=>i=_(n,``,i,{opacity:v(t).alpha??1})),d(e,n)},y=e=>{let n=N(()=>v(r)),a=N(()=>B(v(n).box,v(T).width));var s=f(),c=b(s),l=e=>{var t=_n();let r;var s=x(t),c=S(s),l=h(s);let u;A(t),o((e,a,o,d,f,p,m)=>{r=_(t,``,r,{opacity:v(n).alpha??1}),j(s,`id`,`${i}-map-${v(n).id??``}`),j(c,`x`,e),j(c,`y`,a),j(c,`width`,o),j(c,`height`,d),j(l,`d`,f),j(l,`clip-path`,`url(#${i}-map-${v(n).id??``})`),u=_(l,``,u,{fill:p,stroke:m,"stroke-width":`0.75`,"stroke-linejoin":`round`})},[()=>I(v(a).x),()=>I(v(a).y),()=>I(v(a).w),()=>I(v(a).h),()=>en(v(n),v(T).width,v(O)).join(` `),()=>R(v(n).land),()=>R(v(n).stroke)]),d(e,t)},u=e=>{var t=cn();let r;o((e,i,a,o,s,c)=>{j(t,`x`,e),j(t,`y`,i),j(t,`width`,a),j(t,`height`,o),r=_(t,``,r,{fill:s,stroke:c,"stroke-width":`0.75`,opacity:v(n).alpha??1})},[()=>I(v(a).x),()=>I(v(a).y),()=>I(v(a).w),()=>I(v(a).h),()=>R(v(n).land),()=>R(v(n).stroke)]),d(e,t)};t(c,e=>{v(O)&&v(O).length>0?e(l):e(u,-1)}),d(e,s)},C=e=>{let n=N(()=>v(r)),i=N(()=>le(v(n)));var a=gn();let s;p(a,21,()=>rn.icons[v(n).name]??[],F,(e,r)=>{var i=f(),a=b(i),s=e=>{var t=dn();let i;o((e,n,r,a,o)=>{j(t,`cx`,e),j(t,`cy`,n),j(t,`r`,r),i=_(t,``,i,{fill:a,stroke:o})},[()=>I(v(r).c[0]),()=>I(v(r).c[1]),()=>I(v(r).r),()=>v(r).fill?R(v(n).tok):`none`,()=>v(r).fill?`none`:R(v(n).tok)]),d(e,t)},c=e=>{var t=un();let i;o((e,n,r)=>{j(t,`points`,e),i=_(t,``,i,{fill:n,stroke:r})},[()=>ue(v(r).pts),()=>v(r).fill?R(v(n).tok):`none`,()=>v(r).fill?`none`:R(v(n).tok)]),d(e,t)},l=e=>{var t=vn();let i;o((e,n)=>{j(t,`points`,e),i=_(t,``,i,{fill:`none`,stroke:n})},[()=>ue(v(r).pts),()=>R(v(n).tok)]),d(e,t)};t(a,e=>{v(r).t===`circle`?e(s):v(r).closed?e(c,1):e(l,-1)}),d(e,i)}),A(a),o((e,t,r,i)=>{j(a,`transform`,`translate(${e??``},${t??``}) scale(${r??``})`),s=_(a,``,s,{fill:`none`,"stroke-width":i,"stroke-linecap":`round`,"stroke-linejoin":`round`,opacity:v(n).alpha??1})},[()=>I(L(v(n).x,v(T).width)-12*v(i)),()=>I(v(n).y-12*v(i)),()=>I(v(i)),()=>I(rn.stroke)]),d(e,a)};t(a,e=>{v(r).k===`rect`?e(s):v(r).k===`line`?e(c,1):v(r).k===`tri`?e(l,2):v(r).k===`dot`?e(u,3):v(r).k===`path`?e(m,4):v(r).k===`cells`?e(g,5):v(r).k===`basemap`?e(y,6):v(r).k===`icon`&&e(C,7)}),d(e,n)};t(s,e=>{v(r)&&e(c)}),d(e,a)}),A(c);var l=h(c,2);p(l,17,()=>v(T).ops,F,(e,n)=>{let r=N(()=>ae(v(n)));var i=f(),a=b(i),s=e=>{let t=N(()=>v(r)),n=N(()=>B(v(t).box,v(T).width));var i=yn();let a;o((e,n,r,o)=>a=_(i,``,a,{left:e,top:n,width:r,height:o,opacity:v(t).alpha??1}),[()=>`${I(v(n).x)??``}px`,()=>`${I(v(n).y)??``}px`,()=>`${I(v(n).w)??``}px`,()=>`${I(v(n).h)??``}px`]),d(e,i)};t(a,e=>{v(r)&&v(r).k===`image`&&e(s)}),d(e,i)});var u=h(l,2);p(u,17,()=>v(T).ops,F,(e,n)=>{var r=f(),i=b(r),a=e=>{var t=xn();let r;p(t,21,()=>v(n).lines,F,(e,t)=>{var n=bn(),r=S(n,!0);o(()=>P(r,v(t))),d(e,n)}),A(t),o((e,i,a,o,s,c,l)=>{j(t,`data-p`,v(n).id),j(t,`data-role`,v(n).role),j(t,`data-max-w`,e),j(t,`dir`,v(n).direction),r=_(t,``,r,{left:i,top:a,width:o,"font-size":s,"font-weight":v(n).wt,"line-height":c,color:l,"text-align":v(n).align,"font-variant-numeric":v(n).tnum?`tabular-nums`:`normal`,opacity:v(n).alpha}),t.dir=t.dir},[()=>I(v(n).width),()=>`${I(v(n).left)??``}px`,()=>`${I(v(n).top)??``}px`,()=>`${I(v(n).width)??``}px`,()=>`${I(v(n).px)??``}px`,()=>`${I(v(n).lh)??``}px`,()=>R(v(n).color)]),d(e,t)},s=N(()=>ie(v(n)));t(i,e=>{v(s)&&e(a)}),d(e,r)}),A(a),ee(a,e=>k(D,e),()=>v(D)),A(n),o((e,t,i,o,l,u,d,f)=>{r=_(n,``,r,{height:e}),j(a,`aria-label`,v(T).summary),j(a,`data-form`,v(m).clir.form),j(a,`data-span`,v(m).clir.span),s=_(a,``,s,{width:t,height:i,transform:o}),j(c,`width`,l),j(c,`height`,u),j(c,`viewBox`,`0 0 ${d??``} ${f??``}`)},[()=>`${I(v(T).height*v(w))??``}px`,()=>`${I(v(T).width)??``}px`,()=>`${I(v(T).height)??``}px`,()=>v(w)===1?null:`scale(${I(v(w))})`,()=>I(v(T).width),()=>I(v(T).height),()=>I(v(T).width),()=>I(v(T).height)]),re(n,`clientWidth`,e=>k(g,e)),d(e,n)};t(de,e=>{!v(m).ok||!v(T)?e(fe):e(W,-1)}),d(n,U),ne()}var wn=m(``),Tn=m(` `),$=m(``);function En(e,n){E(n,!0);let r=z(null),i=z(!1);l(()=>{let e=n.src,t=!0;return k(r,null),k(i,!1),V.niImageDataUrl(e).then(e=>{t&&k(r,e,!0)},()=>{t&&k(i,!0)}),()=>{t=!1}});var a=f(),s=b(a),c=e=>{var t=wn();o(()=>{j(t,`src`,v(r)),j(t,`alt`,n.alt)}),d(e,t)},u=e=>{var t=Tn(),r=S(t,!0);o(()=>P(r,n.alt)),d(e,t)},p=e=>{var t=$();o(()=>j(t,`aria-label`,n.alt)),d(e,t)};t(s,e=>{v(r)?e(c):v(i)?e(u,1):e(p,-1)}),d(e,a),ne()}var Dn=100,On=8,kn=2e3,An=500,jn=200,Mn=200,Nn=/^\/api\/ni\/items\/[A-Za-z0-9-]+\/image(\?v=[\w.:+-]*)?$/,Pn=[`title`,`label`,`value`,`caption`],Fn=[`default`,`muted`,`accent`,`ok`,`warn`,`danger`],In=[`sm`,`md`,`lg`],Ln=[``,`accent`,`ok`,`warn`,`danger`],Rn=[`v`,`h`],zn=[`sm`,`md`],Bn=[`plain`,`compact`,`percent`,`currency`],Vn=[`line`,`bars`],Hn=new Set([`when`,`on_tap`]);function Un(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wn(e){return console.assert(e.type===`text`,`checkText: type must be text`),console.assert(typeof e==`object`,`checkText: node must be an object`),typeof e.value==`string`?e.value.length>kn?`text.value exceeds 2000 chars`:Pn.includes(e.role)?Fn.includes(e.tone)?In.includes(e.size)?null:`text.size invalid`:`text.tone invalid`:`text.role invalid`:`text.value must be string`}function Gn(e){return console.assert(e.type===`number`,`checkNumber: type must be number`),console.assert(typeof e==`object`,`checkNumber: node must be an object`),typeof e.value!=`number`||!Number.isFinite(e.value)?`number.value must be finite`:Bn.includes(e.format)?Fn.includes(e.tone)?In.includes(e.size)?e.unit!==void 0&&typeof e.unit!=`string`?`number.unit must be string`:null:`number.size invalid`:`number.tone invalid`:`number.format invalid`}function Kn(e){return console.assert(e.type===`chip`,`checkChip: type must be chip`),console.assert(typeof e==`object`,`checkChip: node must be an object`),typeof e.value==`string`?e.value.length>kn?`chip.value exceeds 2000 chars`:Ln.includes(e.kind)?null:`chip.kind invalid`:`chip.value must be string`}function qn(e){return console.assert(e.type===`bar`,`checkBar: type must be bar`),console.assert(typeof e==`object`,`checkBar: node must be an object`),typeof e.value!=`number`||!Number.isFinite(e.value)?`bar.value must be finite`:typeof e.max!=`number`||!Number.isFinite(e.max)||e.max<=0?`bar.max must be > 0`:Fn.includes(e.tone)?null:`bar.tone invalid`}function Jn(e){return console.assert(e.type===`icon`,`checkIcon: type must be icon`),console.assert(typeof e==`object`,`checkIcon: node must be an object`),typeof e.name!=`string`||e.name.length===0?`icon.name must be non-empty string`:Fn.includes(e.tone)?null:`icon.tone invalid`}function Yn(e){console.assert(e.type===`spark`,`checkSpark: type must be spark`),console.assert(typeof e==`object`,`checkSpark: node must be an object`);let t=e.points;if(!Array.isArray(t))return`spark.points must be array`;if(t.length>An)return`spark.points exceeds 500`;for(let e of t)if(typeof e==`number`){if(!Number.isFinite(e))return`spark.points value must be finite`}else{if(!Un(e))return`spark.points entry must be number or {t, v}`;if(typeof e.v!=`number`||!Number.isFinite(e.v))return`spark.points.v must be finite`;if(e.t!==void 0&&typeof e.t!=`string`)return`spark.points.t must be string`}return Vn.includes(e.kind)?e.tone!==void 0&&!Fn.includes(e.tone)?`spark.tone invalid`:null:`spark.kind invalid`}function Xn(e){return console.assert(e.type===`image`,`checkImage: type must be image`),console.assert(typeof e==`object`,`checkImage: node must be an object`),typeof e.src==`string`?Nn.test(e.src)?typeof e.alt==`string`?e.alt.length>Mn?`image.alt exceeds 200 chars`:null:`image.alt must be string`:`image.src must be /api/ni/items//image`:`image.src must be string`}function Zn(e){if(console.assert(e.type===`gauge`,`checkGauge: type must be gauge`),console.assert(typeof e==`object`,`checkGauge: node must be an object`),typeof e.value!=`number`||!Number.isFinite(e.value))return`gauge.value must be finite`;if(typeof e.min!=`number`||!Number.isFinite(e.min))return`gauge.min must be finite`;if(typeof e.max!=`number`||!Number.isFinite(e.max))return`gauge.max must be finite`;if(e.max<=e.min)return`gauge.max must be > gauge.min`;if(e.tone!==void 0&&!Fn.includes(e.tone))return`gauge.tone invalid`;if(e.label!==void 0){if(typeof e.label!=`string`)return`gauge.label must be string`;if(e.label.length>jn)return`gauge.label exceeds 200 chars`}return null}function Qn(e){if(console.assert(typeof e==`object`&&!!e,`checkLeaf: object required`),console.assert(typeof e.type==`string`,`checkLeaf: type must be string`),`when`in e)return`when key must be stripped server-side`;let t=e.type;if(Hn.has(t))return`reserved type refused: ${t}`;if(t===`repeat`)return`repeat must be expanded server-side before rendering`;if(t===`divider`)return null;if(t===`text`)return Wn(e);if(t===`number`)return Gn(e);if(t===`chip`)return Kn(e);if(t===`bar`)return qn(e);if(t===`icon`)return Jn(e);if(t===`image`)return Xn(e);if(t===`spark`)return Yn(e);if(t===`gauge`)return Zn(e);if(t===`stack`)return Rn.includes(e.dir)?zn.includes(e.gap)?Array.isArray(e.children)?null:`stack.children must be array`:`stack.gap invalid`:`stack.dir invalid`;if(t===`grid`){let t=e.cols;return typeof t!=`number`||t<2||t>4||!Number.isInteger(t)?`grid.cols must be 2..4`:Array.isArray(e.children)?null:`grid.children must be array`}return`unknown node type: ${t}`}function $n(e){if(console.assert(e!==void 0,`validateBoundScene: root defined`),console.assert(arguments.length===1,`validateBoundScene: one arg`),!Un(e))return`scene must be an object`;let t=[{node:e,depth:1}],n=0;for(;t.length>0;){let e=t.pop();if(!e)break;let{node:r,depth:i}=e;if(n+=1,n>Dn)return`scene exceeds 100 nodes`;if(i>On)return`scene exceeds depth 8`;if(!Un(r))return`child must be an object`;let a=Qn(r);if(a)return a;let o=r.type===`stack`||r.type===`grid`?r.children:null;if(Array.isArray(o))for(let e of o){if(!Un(e))return`child must be an object`;t.push({node:e,depth:i+1})}}return null}var er=new Intl.NumberFormat(void 0,{notation:`compact`,maximumFractionDigits:1}),tr=new Intl.NumberFormat(void 0,{style:`percent`,maximumFractionDigits:1}),nr=new Intl.NumberFormat(void 0,{style:`currency`,currency:`USD`}),rr=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),ir=new Intl.NumberFormat(void 0,{maximumSignificantDigits:3});function ar(e,t,n){if(console.assert(typeof e==`number`,`formatNumber: value must be number`),console.assert(Bn.includes(t),`formatNumber: format in enum`),!Number.isFinite(e))return`—`;if(t===`percent`)return tr.format(e);if(t===`currency`)return nr.format(e);let r=t===`compact`?er.format(e):(e!==0&&Math.abs(e)<1?ir:rr).format(e),i=typeof n==`string`?n.trim():``;return i?`${r} ${i}`:r}var or=150,sr=240;function cr(e){return console.assert(e!=null,`extractV: point defined`),console.assert(typeof e==`number`||typeof e==`object`,`extractV: number or object`),typeof e==`number`?e:e.v}function lr(e){console.assert(Array.isArray(e),`seriesRange: array required`),console.assert(e.length>0,`seriesRange: non-empty`);let t=1/0,n=-1/0;for(let r of e){let e=cr(r);en&&(n=e)}return{vmin:t,vmax:n}}function ur(e,t,n){return console.assert(Number.isFinite(e),`normalized: v finite`),console.assert(n>=t,`normalized: max >= min`),n===t?.5:(e-t)/(n-t)}function dr(e,t,n){console.assert(Array.isArray(e),`sparkPath: array required`),console.assert(t>0&&n>0,`sparkPath: positive dims`);let r=e.length;if(r===0)return``;let{vmin:i,vmax:a}=lr(e),o=[],s=r===1?1:r-1;for(let c=0;c0&&n>0,`sparkBars: positive dims`);let r=e.length;if(r===0)return[];let{vmin:i,vmax:a}=lr(e),o=t/r,s=[];for(let t=0;t0,`polar: r > 0`),console.assert(Number.isFinite(t),`polar: degrees finite`);let n=t*Math.PI/180;return{x:e*Math.cos(n),y:e*Math.sin(n)}}function mr(e,t,n,r){console.assert(Number.isFinite(e),`gaugeArc: value finite`),console.assert(n>t,`gaugeArc: max > min`);let i=(Math.min(n,Math.max(t,e))-t)/(n-t),a=i*sr,o=pr(r,or),s=pr(r,or+a);if(i===0)return{d:`M ${o.x.toFixed(2)} ${o.y.toFixed(2)}`,pct:i};let c=+(a>180);return{d:`M ${o.x.toFixed(2)} ${o.y.toFixed(2)} A ${r} ${r} 0 ${c} 1 ${s.x.toFixed(2)} ${s.y.toFixed(2)}`,pct:i}}var hr=m(`unrenderable`),gr=m(`
      `),_r=m(`
      `),vr=m(`
      `),yr=m(` `),br=m(` `),xr=m(`
      `),Sr=m(``),Cr=m(`·`),wr=m(`—`),Tr=a(``),Er=a(``),Dr=a(``),Or=a(``),kr=m(`
      `),Ar=m(`
      `);function jr(e,n){E(n,!0);let r=N(()=>$n(n.node)),i={default:`var(--text)`,muted:`var(--muted)`,accent:`var(--accent)`,ok:`var(--ok)`,warn:`var(--warn)`,danger:`var(--danger)`},a={title:`font-size: var(--f-section); font-weight: 650`,label:`font-size: var(--f-label); color: var(--muted)`,value:`font-size: var(--f-h2); font-variant-numeric: tabular-nums`,caption:`font-size: var(--f-meta); color: var(--muted)`},s={sm:`var(--f-label)`,md:`var(--f-h2)`,lg:`var(--f-h1)`},c={sm:`var(--s-2)`,md:`var(--s-4)`};function l(e){return console.assert(typeof e==`string`,`toneStyle: tone is string`),console.assert(e in i,`toneStyle: tone in enum`),e==="default"?``:`color: ${i[e]}`}function m(e,t){console.assert(e in a,`textStyle: role in enum`),console.assert(t in i,`textStyle: tone in enum`);let n=a[e];return t==="default"?n:`${n}; color: ${i[t]}`}function g(e,t){return console.assert(typeof e==`number`,`barPct: value is number`),console.assert(typeof t==`number`&&t>0,`barPct: max > 0`),Math.min(100,Math.max(0,e/t*100))}let y=mr(1,0,1,40).d;function C(e){return console.assert(e===void 0||e in i,`sparkColor: tone in enum`),console.assert(typeof i==`object`,`sparkColor: TONE_VAR present`),i[e&&e!=="default"?e:`accent`]}function w(e,t,n){return console.assert(typeof e==`number`,`clampValue: v is number`),console.assert(n>t,`clampValue: hi > lo`),Math.min(n,Math.max(t,e))}var T=f(),D=b(T),k=e=>{var t=hr();o(()=>j(t,`title`,v(r))),d(e,t)},M=e=>{var t=gr();let r;p(t,21,()=>n.node.children,F,(e,t)=>{jr(e,{get node(){return v(t)}})}),A(t),o(()=>r=_(t,``,r,{"flex-direction":n.node.dir===`v`?`column`:`row`,gap:c[n.node.gap]})),d(e,t)},ee=e=>{var t=_r();let r;p(t,21,()=>n.node.children,F,(e,t)=>{jr(e,{get node(){return v(t)}})}),A(t),o(()=>r=_(t,``,r,{"grid-template-columns":`repeat(${n.node.cols}, minmax(0, 1fr))`})),d(e,t)},I=e=>{var t=vr();d(e,t)},te=e=>{var t=yr(),r=S(t,!0);o(e=>{_(t,e),P(r,n.node.value)},[()=>m(n.node.role,n.node.tone)]),d(e,t)},L=e=>{var t=br(),r=S(t,!0);o((e,n)=>{_(t,e),P(r,n)},[()=>`font-size: ${s[n.node.size]}; font-variant-numeric: tabular-nums; ${l(n.node.tone)}`,()=>ar(n.node.value,n.node.format,n.node.unit)]),d(e,t)},R=e=>{de(e,{get kind(){return n.node.kind},children:(e,t)=>{O();var r=u();o(()=>P(r,n.node.value)),d(e,r)},$$slots:{default:!0}})},z=e=>{var t=xr();j(t,`aria-valuemin`,0);var r=S(t);o((e,i)=>{j(t,`aria-valuenow`,e),j(t,`aria-valuemax`,n.node.max),_(r,i)},[()=>Math.min(n.node.max,Math.max(0,n.node.value)),()=>`width: ${g(n.node.value,n.node.max)}%; background: ${i[n.node.tone==="default"?`accent`:n.node.tone]}`]),d(e,t)},re=e=>{var r=f(),i=b(r),a=e=>{var t=Sr(),r=x(t);ce(r,{get name(){return n.node.name}}),A(t),o(e=>_(t,e),[()=>l(n.node.tone)]),d(e,t)},s=N(()=>Object.hasOwn(se,n.node.name)),c=e=>{var t=Cr();o(()=>j(t,`title`,`unknown icon: ${n.node.name}`)),d(e,t)};t(i,e=>{v(s)?e(a):e(c,-1)}),d(e,r)},ie=e=>{En(e,{get src(){return n.node.src},get alt(){return n.node.alt}})},ae=e=>{var r=f(),i=b(r),a=e=>{var t=wr();d(e,t)},s=e=>{var r=Dr();j(r,`viewBox`,`0 0 200 30`);var i=x(r),a=e=>{var t=Tr();o(e=>j(t,`points`,e),[()=>dr(n.node.points,200,30)]),d(e,t)},s=e=>{var t=f(),r=b(t);p(r,17,()=>fr(n.node.points,200,30),F,(e,t)=>{var n=Er();o(()=>{j(n,`x`,v(t).x),j(n,`y`,v(t).y),j(n,`width`,v(t).w),j(n,`height`,v(t).h)}),d(e,n)}),d(e,t)};t(i,e=>{n.node.kind===`line`?e(a):e(s,-1)}),A(r),o(e=>_(r,e),[()=>`color: ${C(n.node.tone)}`]),d(e,r)};t(i,e=>{n.node.points.length===0?e(a):e(s,-1)}),d(e,r)},B=e=>{var r=Ar(),i=x(r),a=x(i),s=h(a),c=e=>{var t=Or();o(e=>j(t,`d`,e),[()=>mr(n.node.value,n.node.min,n.node.max,40).d]),d(e,t)},l=N(()=>mr(n.node.value,n.node.min,n.node.max,40).pct>0);t(s,e=>{v(l)&&e(c)}),A(i);var u=h(i,2),f=S(u,!0),p=h(u,2),m=e=>{var t=kr(),r=S(t,!0);o(()=>P(r,n.node.label)),d(e,t)};t(p,e=>{n.node.label&&e(m)}),A(r),o((e,t,r)=>{j(i,`aria-label`,n.node.label??`gauge`),j(i,`aria-valuenow`,e),j(i,`aria-valuemin`,n.node.min),j(i,`aria-valuemax`,n.node.max),_(i,t),j(a,`d`,y),P(f,r)},[()=>w(n.node.value,n.node.min,n.node.max),()=>`color: ${C(n.node.tone)}`,()=>ar(n.node.value,`plain`)]),d(e,r)};t(D,e=>{v(r)?e(k):n.node.type===`stack`?e(M,1):n.node.type===`grid`?e(ee,2):n.node.type===`divider`?e(I,3):n.node.type===`text`?e(te,4):n.node.type===`number`?e(L,5):n.node.type===`chip`?e(R,6):n.node.type===`bar`?e(z,7):n.node.type===`icon`?e(re,8):n.node.type===`image`?e(ie,9):n.node.type===`spark`?e(ae,10):n.node.type===`gauge`&&e(B,11)}),d(e,T),ne()}var Mr=new Set([`downloading`,`verifying`,`unpacking`,`self-testing`]),Nr=12,Pr=5,Fr=`page browser is busy`,Ir=`The page browser is unavailable on this machine, so this card can't update here. This isn't a failure — Settings → Status shows why.`,Lr=`The page browser is busy — try again in a moment.`;function Rr(e){console.assert(e==null||typeof e==`object`,`browserWaitLabel: flow shape`);let t=e?.browser;if(!t||typeof t!=`object`||!Mr.has(t.phase))return``;let n=Number.isFinite(t.pct)?Math.min(100,Math.max(0,Math.round(t.pct))):0;return console.assert(n>=0&&n<=100,`browserWaitLabel: pct clamped`),`Preparing the page browser (${n}%)…`}function zr(e){console.assert(e==null||typeof e==`object`,`tapClause: flow shape`);let t=e?.tap;if(!t||typeof t!=`object`||t.render_notice!==!0)return``;let n=Number.isInteger(t.site_cap)&&t.site_cap>0?` (up to ${t.site_cap})`:``;return console.assert(n===``||n.startsWith(` (up to `),`tapClause: the cap reads as a parenthesis`),`If the page needs SmartBrain's page browser, that one visit may also load the sites it depends on${n}.`}function Br(e){console.assert(typeof e.id==`string`,`renderDraftSites: a board row`);let t=e.draft;if(!t||t.reason!==`render_sites`||!Array.isArray(t.sites))return null;let n=[];for(let e of t.sites.slice(1,13))typeof e==`string`&&e.trim()!==``&&!n.includes(e)&&n.push(e);return console.assert(n.length<=Nr,`renderDraftSites: capped`),n.length>0?n:null}function Vr(e){console.assert(Number.isInteger(e),`alsoLoadsLine: a whole count`);let t=Math.max(0,Math.trunc(e));return console.assert(t>=0,`alsoLoadsLine: never negative`),`This page also loads ${t} other site${t===1?``:`s`}`}function Hr(e){console.assert(typeof e.id==`string`,`renderNotice: a board row`);let t=e.rendered===!0&&e.render?.unavailable===!0;return console.assert(typeof t==`boolean`,`renderNotice: a verdict`),t?Ir:``}function Ur(e){console.assert(typeof e.id==`string`,`feedCandidates: a board row`);let t=e.preview?.feed_candidates;if(!Array.isArray(t))return[];let n=[];for(let e of t.slice(0,Pr))e&&typeof e.url==`string`&&e.url.startsWith(`https://`)&&typeof e.site==`string`&&!n.some(t=>t.url===e.url)&&n.push({url:e.url,site:e.site});return console.assert(n.length<=Pr,`feedCandidates: capped`),n}var Wr={render_busy:`busy`,render_unavailable:`unavailable`};function Gr(e){console.assert(e.length>0,`capacityOfCode: a code`);let t=Object.hasOwn(Wr,e)?Wr[e]:``;return console.assert(t===``||t===`busy`||t===`unavailable`,`capacityOfCode: closed answer`),t}function Kr(e){if(console.assert(!0,`errorCapacity: the fallback sentence`),!(e instanceof Error))return``;let{status:t,code:n}=e,r=typeof n==`string`&&n!==``?Gr(n):t===409&&e.message.includes(Fr)?`busy`:``;return console.assert(r===``||r===`busy`||r===`unavailable`,`errorCapacity: closed answer`),r}function qr(e){if(console.assert(e==null||typeof e==`object`,`replyCapacity: reply shape`),!e)return``;let t=e.code,n=typeof t==`string`&&t!==``?Gr(t):e.run===`busy`?`busy`:e.kind===`render_unavailable`?`unavailable`:``;return console.assert(n===``||n===`busy`||n===`unavailable`,`replyCapacity: closed answer`),n}function Jr(e){console.assert(e===``||e===`busy`||e===`unavailable`,`capacityNote: closed input`);let t=e===`busy`?Lr:e===`unavailable`?Ir:``;return console.assert(t!==``||e===``,`capacityNote: every answer has its note`),t}function Yr(e){console.assert(e===``||e===`busy`||e===`unavailable`,`confirmedNote: closed input`);let t=e===`busy`?`Confirmed — the page browser is busy, so the card checks its data on its next update.`:e===`unavailable`?`Confirmed — the page browser is unavailable on this machine, so the card can't check its data yet. Settings → Status shows why.`:``;return console.assert(t!==``||e===``,`confirmedNote: every answer has its note`),t}var Xr=m(`
    • `),Zr=m(`

      `),Qr=m(`

        Activate is your OK for every update of this card to load exactly these sites.

        `);function $r(e,n){E(n,!0);let r=C(n,`busy`,3,!1),i=C(n,`error`,3,``);var a=Qr(),s=x(a),c=S(s),l=h(s,2);p(l,20,()=>n.sites,e=>e,(e,t)=>{var n=Xr(),r=S(n,!0);o(()=>P(r,t)),d(e,n)}),A(l);var u=h(l,4),f=x(u),m=S(f,!0);A(u);var g=h(u,2),_=e=>{var t=Zr(),n=S(t,!0);o(()=>P(n,i())),d(e,t)};t(g,e=>{i()&&e(_)}),A(a),o(e=>{P(c,`${e??``}:`),f.disabled=r(),P(m,r()?`Activating…`:`Activate`)},[()=>Vr(n.sites.length)]),B(`click`,f,function(...e){n.onActivate?.apply(this,e)}),d(e,a),ne()}g([`click`]);var ei={no:`May not answer your question`,partly:`May not fully answer your question`},ti={no:`This card may not answer your question.`,partly:`This card may not fully answer your question.`};function ni(e){if(console.assert(!0,`readFit: a positive label cap`),!e||typeof e!=`object`||Array.isArray(e))return null;let{verdict:t,missing:n}=e;if(t!==`no`&&t!==`partly`||!Array.isArray(n))return null;let r=n.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>e.trim()).slice(0,3);return console.assert(r.length<=3,`readFit: at most FIT_MAX_MISSING labels`),{verdict:t,missing:r}}function ri(e){let t=ni(e);if(!t)return null;let n=t.missing.length>0?`Missing: ${t.missing.join(`, `)}`:null;return console.assert(ei[t.verdict].length>0,`fitText: a chip for every verdict`),console.assert(n===null||n.startsWith(`Missing: `),`fitText: the detail names what is missing`),{chip:ei[t.verdict],detail:n}}function ii(e){let t=ni(e);if(!t)return``;let n=t.missing.length>0?` It lacks: ${t.missing.join(`, `)}.`:``;return console.assert(ti[t.verdict].endsWith(`.`),`fitLine: a whole sentence for every verdict`),console.assert(n===``||n.endsWith(`.`),`fitLine: the lacks clause is a sentence`),`${ti[t.verdict]}${n}`}function ai(e){return console.assert(e===void 0||typeof e==`object`,`asClirFaces: shape is object|undefined`),!e||typeof e!=`object`||e.desktop===void 0&&e.phone===void 0?null:{desktop:e.desktop,phone:e.phone}}function oi(e){if(console.assert(e!==void 0,`verifyOptions: payload defined`),console.assert(!Array.isArray(e),`verifyOptions: payload is the board's one bound node, not a list`),!e||typeof e!=`object`)return[];let t=e,n=t.type===`form`?ai(t.clir):null;if(!n)return[];let r={id:`pick`,clir:n,summary:typeof t.summary==`string`?t.summary:``,why:``},i=(Array.isArray(t.alternatives)?t.alternatives.slice(0,1):[])[0],a=i?ai(i.clir):null;if(!i||!a)return[r];let o=typeof i.summary==`string`?i.summary:``;return[r,{id:`second`,clir:a,summary:o,why:o?`Shown differently: ${o}`:`A different design of the same data.`}]}var si=[[`answer`,`answer`],[`select`,`quantity`],[`where`,`filter`],[`time`,`time`],[`order`,`order`],[`limit`,`limit`],[`agg`,`count`]];function ci(e){if(console.assert(si.length>0,`coverageChips: the closed clause table`),console.assert(!Array.isArray(e),`coverageChips: coverage is a clause map, not a list`),!e||typeof e!=`object`)return[];let t=e,n=[];for(let[e,r]of si){let i=t[e];i===`approximated`?n.push(`${r} approximated`):i===`unbound`&&n.push(`${r} not found`)}return console.assert(n.length<=si.length,`coverageChips: at most one chip per clause`),n}function li(e){console.assert(e==null||typeof e==`object`,`optionMaxWidth: clir is an object or null`);let t=e&&typeof e==`object`?e.span:void 0,n=typeof t==`string`?/^([dp])([1-4])x([1-3])$/.exec(t):null;return console.assert(n===null||n[1]===`d`||n[1]===`p`,`optionMaxWidth: device is d or p`),n?n[1]===`p`?n[2]===`1`?`160px`:`398px`:n[2]===`1`?`calc(50% - var(--s-2))`:null:null}var ui=m(`
        `),di=m(`

        `),fi=m(`

        `),pi=m(``),mi=m(`

        Reads as

        `),hi=m(``),gi=m(`
        `),_i=m(`

        This is live data — is it right?

        `);function vi(e,n){E(n,!0);let r=C(n,`busy`,3,!1),i=C(n,`interpretation`,3,``),a=C(n,`coverage`,3,void 0),s=C(n,`fit`,3,null),c=N(()=>oi(n.payload)),l=N(()=>v(c).find(e=>e.id===`pick`)??null),f=N(()=>v(c).find(e=>e.id===`second`)??null),m=N(()=>ci(a())),g=N(()=>ii(s())),y=z(`desktop`);R(()=>{k(y,window.matchMedia?.(`(max-width: 560px)`)?.matches?`phone`:`desktop`,!0)});function b(){console.assert(v(y)===`desktop`||v(y)===`phone`,`toggleFace: known face before flip`);let e=v(y)===`desktop`?`phone`:`desktop`;console.assert(e!==v(y),`toggleFace: flips to the other face`),k(y,e,!0)}function w(e){return console.assert(e.id===`pick`||e.id===`second`,`faceOf: known option id`),console.assert(v(y)===`desktop`||v(y)===`phone`,`faceOf: known face`),v(y)===`phone`?e.clir.phone:e.clir.desktop}function T(){console.assert(typeof document<`u`,`isLightNow: DOM available`);let e=document.documentElement.dataset.theme;return e===`light`||e!==`dark`&&(typeof window>`u`?null:window.matchMedia?.(`(prefers-color-scheme: light)`))?.matches===!0}let D=z(!1),j,M=!1;R(()=>{k(D,T(),!0)});function F(){console.assert(typeof v(D)==`boolean`,`toggleTheme: light is boolean`),console.assert(typeof document<`u`,`toggleTheme: DOM available`),M||=(j=document.documentElement.dataset.theme,!0),k(D,!v(D)),document.documentElement.dataset.theme=v(D)?`light`:`dark`}te(()=>{M&&typeof document<`u`&&(j===void 0?document.documentElement.removeAttribute(`data-theme`):document.documentElement.dataset.theme=j)});var ee=_i(),I=h(x(ee),2),L=x(I),re=S(L,!0),ie=h(L,2),ae=S(ie,!0);A(I);var oe=h(I,2),V=e=>{let t=N(()=>w(v(l)));var r=ui();let i;Cn(x(r),{get clir(){return v(t)},get viewerTz(){return n.viewerTz}}),A(r),o(e=>i=_(r,``,i,{"max-width":e}),[()=>li(v(t))]),d(e,r)};t(oe,e=>{v(l)&&e(V)});var H=h(oe,2),se=e=>{let t=N(()=>w(v(f)));var r=di();let i;var a=x(r),s=S(a,!0);Cn(h(a,2),{get clir(){return v(t)},get viewerTz(){return n.viewerTz}}),A(r),o(e=>{i=_(r,``,i,{"max-width":e}),P(s,v(f).why)},[()=>li(v(t))]),d(e,r)};t(H,e=>{v(f)&&e(se)});var ce=h(H,2),le=e=>{var t=fi(),n=S(t,!0);o(()=>P(n,v(g))),d(e,t)};t(ce,e=>{v(g)&&e(le)});var ue=h(ce,2),U=e=>{var n=mi(),r=h(x(n),2),a=S(r,!0),s=h(r,2),c=e=>{var t=pi();p(t,20,()=>v(m),e=>e,(e,t)=>{de(e,{children:(e,n)=>{O();var r=u();o(()=>P(r,t)),d(e,r)},$$slots:{default:!0}})}),A(t),d(e,t)};t(s,e=>{v(m).length>0&&e(c)}),A(n),o(()=>P(a,i())),d(e,n)};t(ue,e=>{i()&&e(U)});var fe=h(ue,2),W=e=>{var i=gi(),a=x(i),s=S(a,!0),c=h(a,2),l=e=>{var t=hi();o(()=>t.disabled=r()),B(`click`,t,()=>n.onUse(`second`)),d(e,t)};t(c,e=>{v(f)&&e(l)});var u=h(c,2);A(i),o(()=>{a.disabled=r(),P(s,r()?`Checking…`:`Use this`),u.disabled=r()}),B(`click`,a,()=>n.onUse(`pick`)),B(`click`,u,function(...e){n.onWrong?.apply(this,e)}),d(e,i)};t(fe,e=>{v(l)&&e(W)}),A(ee),o(()=>{L.disabled=r(),P(re,v(y)===`desktop`?`Desktop`:`Phone`),ie.disabled=r(),P(ae,v(D)?`Light`:`Dark`)}),B(`click`,L,b),B(`click`,ie,F),d(e,ee),ne()}g([`click`]);var yi={extract_miss:`couldn't find the expected data`,fetch_failed:`couldn't reach the source`,image_type:`not a supported image`,llm_requires_local:`needs a local model`,mcp_unavailable:`your MCP server didn't answer`,secret_missing:`credential problem`,secret_host_mismatch:`credential problem`,render_refused:`the page browser wouldn't open this address`,render_timeout:`the page took too long in the page browser`,render_blocked:`the site turned the page browser away`,render_offsite:`the page moved to a site this card doesn't allow`,render_confinement:`the page browser's safety checks stopped the read`,render_oversize:`the page was too big for the page browser`,render_engine:`the page browser couldn't read the page`};function bi(e){console.assert(e==null||typeof e==`string`,`friendlyErrorClass: cls is string|null|undefined`),console.assert(typeof yi==`object`,`friendlyErrorClass: map present`);let t=typeof e==`string`?e.trim():``;return t?yi[t]??t:``}function xi(e){if(console.assert(e==null||typeof e==`object`,`flowStageLabel: flow is object|null|undefined`),console.assert(e==null||typeof e.state==`string`,`flowStageLabel: state is string when flow present`),!e)return``;let t=e.state;return(t===`failed`||t===`unsupported`?``:Rr(e))||(t===`intent`?`Understanding your request…`:t===`source`?e.error===`awaiting_pick`?`Waiting for you to pick a source on the card`:`Finding the source…`:t===`awaiting_access`?`Needs your key or contact email`:t===`sampling`?`Reading a sample…`:t===`mapping`?`Choosing the data fields…`:t===`assembling`?`Building the card…`:t===`awaiting_credential`?`Needs your API key`:t===`awaiting_params`?`Needs a detail from you`:t===`ready`?`Building the card…`:``)}function Si(e){return console.assert(e==null||typeof e==`object`,`isFlowActive: flow is object|null|undefined`),console.assert(e==null||typeof e.state==`string`,`isFlowActive: state is string when flow present`),e?e.state!==`failed`&&e.state!==`unsupported`:!1}function Ci(e){console.assert(typeof e==`object`&&!!e,`awaitingYesSource: a is object`),console.assert(typeof e.host==`string`&&typeof e.title==`string`,`awaitingYesSource: strings`);let t=e.from===`page`?`web page`:`dataset`,n=e.host.trim(),r=e.title.trim(),i=r!==``&&r.toLowerCase()!==n.toLowerCase();return n?i?`From the ${t} ${n} — ${r}`:`From the ${t} at ${n}`:i?`From the ${t} “${r}”`:`From a ${t}`}function wi(e){console.assert(e===void 0||Array.isArray(e),`pickRows: array or undefined`);let t=e??[],n=new Set,r=e=>!n.has(e.url)&&(n.add(e.url),!0),i=t.filter(e=>e.kind===`library`&&r(e)),a=t.filter(e=>e.kind===`link`&&/^https:\/\//.test(e.url)&&r(e));return{sources:i,links:a,heading:i.length>0?`From the SmartBrain Library — tap the one that fits:`:a.length>0?`No SmartBrain Library source answers this yet.`:`No SmartBrain Library source answers this yet — paste a link to the data:`}}function Ti(e){console.assert(typeof e.host==`string`,`linkWhat: host is string`);let t=e.found===`dataset`?`dataset`:`web page`;return e.host.trim()?`${e.host.trim()} · ${t}`:t}function Ei(e,t,n){console.assert(Array.isArray(e),`filterTemplates: templates is array`),console.assert(typeof t==`string`,`filterTemplates: query is string`);let r=t.trim().toLowerCase(),i=n.trim();return!r&&!i?e:e.filter(e=>{if(i&&e.category!==i)return!1;if(!r||e.title.toLowerCase().includes(r)||e.goal.toLowerCase().includes(r)||e.category.toLowerCase().includes(r))return!0;for(let t of e.tags)if(t.toLowerCase().includes(r))return!0;return!1})}function Di(e){console.assert(Array.isArray(e),`templateCategories: templates is array`),console.assert(e.every(e=>typeof e==`object`),`templateCategories: entries are objects`);let t=new Set;for(let n of e){let e=n.category?.trim();e&&t.add(e)}return[...t].sort((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase()))}function Oi(e,t){console.assert(Array.isArray(e),`validateParamForm: params is array`),console.assert(typeof t==`object`&&!!t,`validateParamForm: values is object`);for(let n of e){if(n.kind===`secret`)continue;let e=t[n.name],r=typeof e==`string`?e.trim():``;if(r.length===0)return{name:n.name,message:`${n.label} is required.`};if(n.kind===`number`&&!Number.isFinite(Number(r)))return{name:n.name,message:`${n.label} must be a number.`}}return null}function ki(e,t){console.assert(Array.isArray(e),`paramValuesForInstall: params is array`),console.assert(typeof t==`object`&&!!t,`paramValuesForInstall: values is object`);let n={};for(let r of e){if(r.kind===`secret`)continue;let e=t[r.name],i=typeof e==`string`?e.trim():``;i.length!==0&&(n[r.name]=r.kind===`number`?Number(i):i)}return n}function Ai(e){console.assert(e==null||typeof e==`string`,`formatFingerprint: fp is string|null|undefined`),console.assert(!0,`formatFingerprint: total`);let t=typeof e==`string`?e.trim():``;return t?`Publisher ${t}`:`Unknown publisher`}function ji(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Mi(e){console.assert(e==null||typeof e==`object`,`stagesFromSpec: spec is object|null|undefined`),console.assert(!Array.isArray(e),`stagesFromSpec: spec is not an array`);let t={extract:null,transform:null};if(!ji(e))return t;let n=e.pipeline;if(!Array.isArray(n))return t;for(let e of n)ji(e)&&(e.op===`extract`&&ji(e.paths)?t.extract===null&&(t.extract=e.paths):e.op===`transform`&&Array.isArray(e.apply)&&t.transform===null&&(t.transform=e.apply));return t}function Ni(e){if(console.assert(e===null||typeof e==`object`||e===void 0,`formatStageJson: value is object|null|undefined`),console.assert(!0,`formatStageJson: total`),e==null)return`(none)`;try{return JSON.stringify(e,null,2)}catch{return`(unserializable)`}}var Pi=m(`

        `),Fi=m(``),Ii=m(` `,1),Li=m(`
        `),Ri=m(`
        Needs your
        `),zi=m(`
        `),Bi=m(`
        Needs
        `),Vi=m(`

        Creation didn’t finish. Delete this card, or start again above.

        `),Hi=m(`
        `),Ui=m(`

        Is this what you asked for?

        `),Wi=m(`

        Confirmed — verifying, this card goes live after the next successful refresh.

        `),Gi=m(`

        This is live data — is it right?

        `),Ki=m(` `,1),qi=m(` `,1),Ji=m(``),Yi=m(`
        ⋯
        `),Xi=m(`
        `),Zi=m(`

        `),Qi=m(``),$i=m(`
        `,1),ea=m(`
        `,1),ta=m(` `,1),na=m(``),ra=m(``),ia=m(`
        `),aa=m(`

        `),oa=m(`

        `,1),sa=m(`

        Finding a source for this…

        `),ca=m(`

        `),la=m(`

        Needs your own free key — you'll paste it next

        `),ua=m(`

        Asks for your contact email once

        `),da=m(`
        `),fa=m(`
        `),pa=m(`
      • `),ma=m(` `,1),ha=m(`

        `),ga=m(`

        `),_a=m(`Get one here, +import{$ as e,A as t,B as n,C as r,E as i,F as a,G as o,I as s,J as c,K as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,V as v,W as y,X as b,Y as x,Z as S,a as C,at as w,b as T,ct as E,d as D,dt as O,et as k,ft as A,g as j,h as M,it as N,j as P,k as F,l as ee,m as I,n as te,pt as L,r as R,st as ne,tt as z,u as re,w as ie,y as ae,z as B}from"../chunks/BChu7Pos.js";import{t as oe}from"../chunks/wsL2lAx0.js";import"../chunks/xihTtKlq.js";import"../chunks/BB_QGgHe.js";import{n as V}from"../chunks/CHJn7_Ei.js";import{t as H}from"../chunks/CJp6lm4P.js";import{n as se,t as ce}from"../chunks/Be3BkmPa.js";import{t as le}from"../chunks/aIySO2My.js";import{t as ue}from"../chunks/DQSrham4.js";import{n as U}from"../chunks/CcVP_dcS.js";import{t as de}from"../chunks/UDuC8ICI.js";import{t as fe}from"../chunks/Bmlx8Ynu.js";import{t as W}from"../chunks/DFmtAuwh.js";import{t as pe}from"../chunks/itGxqfLQ.js";import{i as me,r as he}from"../chunks/jV_dy7U_.js";var ge=6e4,_e=60*ge,G=24*_e;function ve(e,t=new Date){console.assert(e===null||typeof e==`string`,`relTime: ts is string|null`),console.assert(t instanceof Date,`relTime: now must be a Date`);let n=he(e);if(!n)return`—`;let r=t.getTime()-n.getTime();return r<0||r<45e3?`just now`:r<_e?`${Math.floor(r/ge)}m ago`:r2*i}function be(e){if(console.assert(typeof e.state==`string`,`cardState: state is string`),console.assert(typeof e.enabled==`boolean`,`cardState: enabled is boolean`),e.flow||e.state===`draft`)return`designing`;if(!e.enabled||e.state===`paused`)return`paused`;if(e.state===`broken`)return`broken`;if(e.state===`commissioning`){let t=e.awaiting_yes!=null||e.payload_slot!==`preview`;return e.payload!==null&&t?`verifying`:`empty`}return e.payload===null?`empty`:e.state===`failing`||e.state===`degraded`?`failing`:ye(e.payload_at,e.interval_minutes)?`stale`:`fresh`}function xe(e){console.assert(typeof e.interval_minutes==`number`,`footerText: interval is number`),console.assert(e.payload_at===null||typeof e.payload_at==`string`,`footerText: payload_at shape`);let t=he(e.payload_at);return[t?`as of ${new Intl.DateTimeFormat(void 0,{timeStyle:`short`}).format(t)}`:`as of —`,e.awaiting_yes?.host??``,`every ${Math.max(1,e.interval_minutes)}m`].filter(e=>e.length>0).join(` · `)}function Se(e){console.assert(typeof e.id==`string`,`interpretationOf: a board row`);let t=e.interpretation,n=typeof t==`string`&&t.trim().length>0?t:``;return console.assert(n===``||n===t,`interpretationOf: verbatim or empty`),n}function Ce(e,t){console.assert(e===void 0||typeof e==`string`,`cardSpan: size is a string or undefined`),console.assert(t==null||typeof t==`object`,`cardSpan: clir is an object or null`);let n=t&&typeof t==`object`?t.span:void 0,r=typeof n==`string`?/^[dp]([1-4])x([1-3])$/.exec(n):null;if(r)return{cols:Number(r[1])>=2?2:1,rows:Number(r[2])};switch(e){case`wide`:return{cols:2,rows:1};case`large`:return{cols:2,rows:2};case`tall`:return{cols:1,rows:2};default:return{cols:1,rows:1}}}function we(e,t){return console.assert(typeof e.state==`string`,`bodyShowsPanel: state is string`),console.assert(typeof t==`boolean`,`bodyShowsPanel: hasForm is boolean`),!t||e.flow||e.awaiting_yes&&e.payload||e.state!==`commissioning`||e.c2_ok?!1:e.payload!==null&&e.payload_slot!==`preview`}function Te(e,t,n=``){return console.assert(typeof t==`boolean`,`formBoxChrome: hasForm is boolean`),console.assert(typeof e==`string`,`formBoxChrome: state is string`),t&&n===``&&(e===`fresh`||e===`stale`||e===`paused`)}var Ee=m(``),De=m(` `),Oe=m(` `),K=m(``),ke=m(`

        `),Ae=m(`

        `),je=m(` `),Me=m(` `),Ne=m(` `,1),Pe=m(``),Fe=m(` `),Ie=m(`
        `);function Le(e,n){E(n,!0);let a=C(n,`cols`,3,1),s=C(n,`rows`,3,1),c=C(n,`preview`,3,!1),l=C(n,`footerText`,3,``),p=C(n,`interpretation`,3,``),m=C(n,`reason`,3,``),g=C(n,`rendered`,3,!1),_=C(n,`notice`,3,``),y=C(n,`fit`,3,null),w=N(()=>Te(n.state,n.hasForm,_())),T=N(()=>y()?y().detail?`${y().chip}. ${y().detail}`:y().chip:``),D=N(()=>y()?y().detail?`${y().chip} · ${y().detail}`:y().chip:``);var k=Ie();let M;var F=x(k);let ee;var I=x(F),te=e=>{var t=Ee();d(e,t)},R=e=>{var t=De(),r=S(t,!0);o(()=>P(r,n.title)),d(e,t)};t(I,e=>{n.hasForm?e(te):e(R,-1)});var z=h(I,2),re=x(z),ie=e=>{var t=K(),n=x(t);de(n,{kind:`warn`,get title(){return v(T)},children:(e,t)=>{var n=Oe(),r=S(n,!0);o(()=>P(r,y().chip)),d(e,n)},$$slots:{default:!0}}),A(t),d(e,t)};t(re,e=>{y()&&!v(w)&&e(ie)});var ae=h(re,2);i(ae,()=>n.chips??L);var B=h(ae,2),oe=e=>{de(e,{title:`This card reads its page in SmartBrain's own local page browser`,children:(e,t)=>{O();var n=u(`page browser`);d(e,n)},$$slots:{default:!0}})};t(B,e=>{g()&&e(oe)}),A(z),A(F);var V=h(F,2);let H;var se=x(V);i(se,()=>n.children??L),A(V);var ce=h(V,2),le=e=>{var t=ke(),n=S(t,!0);o(()=>P(n,_())),d(e,t)},ue=e=>{var t=Ae(),n=S(t,!0);o(()=>P(n,m())),d(e,t)};t(ce,e=>{_()?e(le):n.state===`failing`&&m()&&e(ue,1)});var U=h(ce,2);i(U,()=>n.below??L);var fe=h(U,2);let W;var pe=x(fe),me=e=>{var n=f(),r=b(n),i=e=>{var t=je(),n=x(t),r=S(n,!0),i=h(n,2),a=S(i);A(t),o(()=>{j(n,`title`,p()),P(r,p()),P(a,`· ${l()??``}`)}),d(e,t)},a=e=>{var t=Me(),n=S(t,!0);o(()=>P(n,l())),d(e,t)};t(r,e=>{p()?e(i):e(a,-1)}),d(e,n)};t(pe,e=>{!n.hasForm&&l()&&e(me)});var he=h(pe,2),ge=e=>{var t=Pe(),n=x(t);de(n,{kind:`warn`,get title(){return v(T)},children:(e,t)=>{var n=Ne(),r=b(n),i=S(r,!0),a=h(r,2),s=S(a,!0);o(()=>{P(i,y().chip),P(s,v(D))}),d(e,n)},$$slots:{default:!0}}),A(t),d(e,t)};t(he,e=>{y()&&v(w)&&e(ge)});var _e=h(he,2);i(_e,()=>n.actions??L);var G=h(_e,2),ve=e=>{var t=Fe(),n=S(t,!0);o(()=>P(n,y().detail)),d(e,t)};t(G,e=>{y()?.detail&&!v(w)&&e(ve)}),A(fe),A(k),o(()=>{M=r(k,1,`card ni-card svelte-hyum9g`,null,M,{"cols-2":a()>=2,"rows-2":s()===2,"rows-3":s()>=3,form:v(w),preview:c()}),j(k,`data-state`,n.state),ee=r(F,1,`ni-head svelte-hyum9g`,null,ee,{"has-fit":!!y()&&!v(w)}),H=r(V,1,`ni-body svelte-hyum9g`,null,H,{"ni-body-dim":n.state===`failing`}),W=r(fe,1,`ni-foot svelte-hyum9g`,null,W,{"has-fit-line":!!y()?.detail&&!v(w),"has-fit-strip":!!y()&&v(w)})}),d(e,k),ne()}var Re=m(`
      • `),ze=m(`

        `),Be=m(`

        This page gets its data from a feed

          `);function Ve(e,n){E(n,!0);let r=C(n,`busy`,3,!1),i=C(n,`error`,3,``);var a=Be(),s=h(x(a),2);p(s,21,()=>n.candidates,e=>e.url,(e,t)=>{var i=Re(),a=x(i),s=S(a,!0),c=h(a,2);A(i),o(()=>{j(a,`title`,v(t).url),P(s,v(t).url),c.disabled=r()}),B(`click`,c,()=>n.onSwitch(v(t).url)),d(e,i)}),A(s);var c=h(s,2),l=e=>{var t=ze(),n=S(t,!0);o(()=>P(n,i())),d(e,t)};t(c,e=>{i()&&e(l)}),A(a),d(e,a),ne()}g([`click`]);var He=new Set(`accent.accent-tint.badge-line.bg.border.border-strong.danger.elevated.faint.map-land.map-stroke.muted.ok.panel.row-hi.text.viz-axis.viz-band.viz-cat-1.viz-cat-2.viz-cat-3.viz-cat-4.viz-cat-5.viz-cat-6.viz-cat-other.viz-div-mid.viz-div-neg.viz-div-pos.viz-dot-ring.viz-fill.viz-grid.viz-interp.viz-line.viz-neg.viz-now.viz-now-line.viz-pos.viz-seq-1.viz-seq-2.viz-seq-3.viz-seq-4.viz-seq-5.viz-track.warn`.split(`.`));function Ue(e){return console.assert(He.size>0,`isTokenName: token set loaded`),typeof e==`string`&&He.has(e)}var We={hero:{px:31,wt:600,lh:38,tnum:!0,ladder:[31,28,24,20]},headline:{px:25,wt:600,lh:32,tnum:!0,ladder:[25,22,20,18]},display:{px:20,wt:600,lh:26,tnum:!0,ladder:[20,18,16]},name:{px:16,wt:600,lh:22,tnum:!1},row:{px:16,wt:400,lh:22,tnum:!0},"row-strong":{px:16,wt:600,lh:22,tnum:!0},title:{px:14,wt:600,lh:18,tnum:!1,max_lines:2},body:{px:14,wt:400,lh:19,tnum:!1},item:{px:14,wt:500,lh:19,tnum:!1},sub:{px:14,wt:400,lh:19,tnum:!0},delta:{px:14,wt:500,lh:19,tnum:!0},index:{px:14,wt:500,lh:19,tnum:!0},meta:{px:12,wt:400,lh:16,tnum:!0},badge:{px:12,wt:600,lh:16,tnum:!1},footer:{px:12,wt:400,lh:16,tnum:!0},label:{px:11,wt:500,lh:14,tnum:!0},tick:{px:11,wt:400,lh:14,tnum:!0}},Ge={line_w:2,interp_w:1.5,grid_w:1,now_w:1,dot_r:4,dot_ring:2,now_dot_r:4.5,now_dot_ring:2,track_h:4,ref_tick_h:14,ref_tick_w:1.5,label_offset:7,plot_min_share:.45,amplitude_min:{desktop:48,phone:36},past_alpha:.45,bar_gap:2,bar_end_r:4},Ke=.96875,qe=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`ClirError`}},Je=new Set([`stat`,`conditions`,`kv_grid`,`compare`,`bars`,`series_line`,`heatmap`,`event_curve`,`next_event`,`agenda`,`day_table`,`entity_list`,`ranked_list`,`table`,`text_brief`,`image`,`progress`,`map_lite`]),Ye=new Set(Object.keys(We)),Xe=new Set([`data`,`lexicon`,`ask`,`title`,`key`,`code`]),Ze=new Set([`h:mm a`,`h a`,`ha_short`,`EEE`,`EEE d`,`MMM d`,`EEE MMM d`,`yyyy`,`MMM yyyy`,`MMM d, yyyy`,`MMM d, h:mm a`,`HH:mm`]),Qe=new Set([`sun`,`moon`,`cloud`,`cloud_sun`,`cloud_moon`,`rain`,`drizzle`,`snow`,`storm`,`fog`,`wind`,`alert`,`check`,`cross`,`clock`,`link_out`,`lock`,`unlock`,`pin`,`up`,`down`]),$e=new Set([`text`,`time`,`rect`,`line`,`tri`,`dot`,`path`,`cells`,`image`,`basemap`,`icon`]),et=new Set([`start`,`middle`,`end`]),tt=new Set([`up`,`down`,`left`,`right`]);function q(e,t){throw new qe(e,t)}function J(e,t,n=-1/0){return console.assert(typeof t==`string`,`requireNumber: where is string`),console.assert(typeof n==`number`,`requireNumber: min is number`),(typeof e!=`number`||!Number.isFinite(e)||e= ${n}, got ${String(e)}`),e}function nt(e){if(!Array.isArray(e)||e.length<2)return!1;let t=e[0];return t===`l`||t===`r`||t===`c`||t===`f`?e.length===2&&typeof e[1]==`number`&&Number.isFinite(e[1]):t===`m`&&e.length===4&&nt(e[1])&&nt(e[2])&&typeof e[3]==`number`&&Number.isFinite(e[3])}function Y(e,t){return console.assert(typeof t==`string`,`requireAnchor: where is string`),console.assert(t.length>0,`requireAnchor: where non-empty`),nt(e)||q(`bad_anchor`,`${t}: not a valid X anchor`),e}function X(e,t){return console.assert(typeof t==`string`,`requireTok: where is string`),console.assert(t.length>0,`requireTok: where non-empty`),Ue(e)||q(`bad_token`,`${t}: unknown token ${String(e)}`),e}function rt(e,t){return e==null?null:X(e,t)}function Z(e,t,n){return console.assert(typeof n==`string`,`requireEnum: where is string`),console.assert(t.size>0,`requireEnum: allowed non-empty`),(typeof e!=`string`||!t.has(e))&&q(`bad_enum`,`${n}: value ${String(e)} not allowed`),e}function it(e,t){let n=Z(e.role,Ye,`${t}.role`),r=J(e.px,`${t}.px`,11),i=Z(e.anchor??`start`,et,`${t}.anchor`),a=Z(e.src??`data`,Xe,`${t}.src`),o=e.dir===`rtl`?`rtl`:`ltr`,s=Array.isArray(e.lines)?e.lines.map(String):[];return{k:`text`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),max_w:J(e.max_w,`${t}.max_w`,0),lines:s,role:n,px:r,tok:X(e.tok,`${t}.tok`),anchor:i,dir:o,src:a}}function at(e,t){let n=Z(e.role,Ye,`${t}.role`),r=J(e.px,`${t}.px`,11),i=Z(e.anchor??`start`,et,`${t}.anchor`),a=Z(e.fmt,Ze,`${t}.fmt`),o=e.tz===`viewer`?`viewer`:`card`;return{k:`time`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),max_w:J(e.max_w,`${t}.max_w`,0),t:String(e.t),fmt:a,tz:o,zone:String(e.zone),role:n,px:r,tok:X(e.tok,`${t}.tok`),anchor:i,show_zone:!!e.show_zone}}function ot(e,t){return{k:`rect`,id:J(e.id,`${t}.id`),x0:Y(e.x0,`${t}.x0`),x1:Y(e.x1,`${t}.x1`),y0:J(e.y0,`${t}.y0`),y1:J(e.y1,`${t}.y1`),tok:X(e.tok,`${t}.tok`),r:typeof e.r==`number`?e.r:0,stroke:rt(e.stroke??null,`${t}.stroke`)}}function st(e,t){return{k:`line`,id:J(e.id,`${t}.id`),x0:Y(e.x0,`${t}.x0`),y0:J(e.y0,`${t}.y0`),x1:Y(e.x1,`${t}.x1`),y1:J(e.y1,`${t}.y1`),tok:X(e.tok,`${t}.tok`),w:typeof e.w==`number`?e.w:1,dash:Array.isArray(e.dash)?e.dash.map(e=>Number(e)):null,gaps:Array.isArray(e.gaps)?e.gaps.map(e=>Number(e)):void 0}}function ct(e,t){return{k:`tri`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),size:J(e.size,`${t}.size`,0),dir:Z(e.dir,tt,`${t}.dir`),tok:X(e.tok,`${t}.tok`)}}function lt(e,t){return{k:`dot`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),r:J(e.r,`${t}.r`,0),tok:X(e.tok,`${t}.tok`),ring:rt(e.ring??null,`${t}.ring`),ring_w:typeof e.ring_w==`number`?e.ring_w:0}}function ut(e,t){(!e||typeof e!=`object`)&&q(`bad_box`,`${t}: missing`);let n=e;return{x0:Y(n.x0,`${t}.x0`),x1:Y(n.x1,`${t}.x1`),y0:J(n.y0,`${t}.y0`),y1:J(n.y1,`${t}.y1`)}}function dt(e,t){let n=Array.isArray(e.pts)?e.pts:[];n.length>400&&q(`too_many_points`,`${t}.pts > 400`);let r=Z(e.style??`solid`,new Set([`solid`,`interp`]),`${t}.style`);return{k:`path`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),pts:n.map(e=>((!Array.isArray(e)||e.length!==2)&&q(`bad_point`,`${t}.pts`),[Number(e[0]),Number(e[1])])),tok:X(e.tok,`${t}.tok`),w:typeof e.w==`number`?e.w:2,style:r,fill:rt(e.fill??null,`${t}.fill`)}}function ft(e,t){let n=Z(e.ramp??`seq`,new Set([`seq`,`div`]),`${t}.ramp`);return{k:`cells`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),cols:J(e.cols,`${t}.cols`,1),rows:J(e.rows,`${t}.rows`,1),v:Array.isArray(e.v)?e.v.map(e=>e==null?-1:Number(e)):[],ramp:n,steps:typeof e.steps==`number`?e.steps:5,gap:typeof e.gap==`number`?e.gap:1}}function pt(e,t){let n=Z(e.fit??`contain`,new Set([`cover`,`contain`]),`${t}.fit`),r=Array.isArray(e.crop)&&e.crop.length===4?[Number(e.crop[0]),Number(e.crop[1]),Number(e.crop[2]),Number(e.crop[3])]:null;return{k:`image`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),ref:String(e.ref??``),fit:n,crop:r}}function mt(e,t){let n=Array.isArray(e.bbox)&&e.bbox.length===4?[Number(e.bbox[0]),Number(e.bbox[1]),Number(e.bbox[2]),Number(e.bbox[3])]:[0,0,0,0];return{k:`basemap`,id:J(e.id,`${t}.id`),box:ut(e.box,`${t}.box`),asset:String(e.asset??`world110m`),bbox:n,land:X(e.land??`map-land`,`${t}.land`),stroke:X(e.stroke??`map-stroke`,`${t}.stroke`)}}function ht(e,t){return{k:`icon`,id:J(e.id,`${t}.id`),x:Y(e.x,`${t}.x`),y:J(e.y,`${t}.y`),size:J(e.size,`${t}.size`,0),name:Z(e.name,Qe,`${t}.name`),tok:X(e.tok,`${t}.tok`)}}var gt={text:it,time:at,rect:ot,line:st,tri:ct,dot:lt,path:dt,cells:ft,image:pt,basemap:mt,icon:ht};function _t(e,t){(!e||typeof e!=`object`)&&q(`bad_prim`,`${t}: not an object`);let n=e,r=n.k;return(typeof r!=`string`||!$e.has(r))&&q(`bad_prim_kind`,`${t}.k: unknown kind ${String(r)}`),gt[r](n,t)}function Q(e){(!e||typeof e!=`object`)&&q(`bad_clir`,`clir: not an object`);let t=e;t.v!==1&&q(`bad_version`,`clir.v must be 1`);let n=Z(t.form,Je,`clir.form`),r=Array.isArray(t.prims)?t.prims:[];r.length>2e3&&q(`too_many_prims`,`clir.prims > 2000`);let i=new Set,a=[];r.forEach((e,t)=>{let n=_t(e,`clir.prims[${t}]`);i.has(n.id)&&q(`dup_prim_id`,`clir.prims[${t}]: dup id ${n.id}`),i.add(n.id),a.push(n)}),(typeof t.summary!=`string`||!t.summary)&&q(`bad_summary`,`clir.summary missing`);let o=t.bucket&&typeof t.bucket==`object`?t.bucket:{};return{v:1,form:n,variant:String(t.variant??``),cand:String(t.cand??``),plan:String(t.plan??``),span:String(t.span??``),bucket:{min_w:Number(o.min_w??0),max_w:Number(o.max_w??0),h:Number(o.h??0)},state:String(t.state??`ok`),prims:a,reading_order:Array.isArray(t.reading_order)?t.reading_order.map(Number):[],summary:t.summary,live:Array.isArray(t.live)?t.live.map(e=>({k:String(e.k??``),args:e.args??{}})):[],hitmap:Array.isArray(t.hitmap)?t.hitmap.map(e=>({prim:Number(e.prim??-1),label:String(e.label??``)})):[],dropped:Array.isArray(t.dropped)?t.dropped.map(String):[],ladder:Array.isArray(t.ladder)?t.ladder.map(String):[]}}function vt(e,t,n){if(console.assert(typeof t==`number`,`resolveX: left is number`),console.assert(typeof n==`number`,`resolveX: width is number`),e[0]===`l`)return t+e[1];if(e[0]===`r`)return t+n-e[1];if(e[0]===`c`)return t+n/2+e[1];if(e[0]===`f`)return t+e[1]*n;let r=vt(e[1],t,n);return r+(vt(e[2],t,n)-r)*e[3]}function yt(e,t,n){console.assert(Number.isFinite(n),`lerpAnchor: frac finite`),console.assert(Array.isArray(e)&&Array.isArray(t),`lerpAnchor: anchors arrays`);let r=e=>e===`l`||e===`r`||e===`c`||e===`f`;if(r(e[0])&&r(t[0])&&e[0]===t[0]&&e[0]!==`r`){let r=e[1],i=t[1];return[e[0],r+(i-r)*n]}if(e[0]===`r`&&t[0]===`r`){let r=e[1];return[`r`,r+(t[1]-r)*n]}return e[0]===`l`&&t[0]===`r`&&e[1]===0&&t[1]===0?[`f`,n]:[`m`,e,t,n]}function bt(e){if(console.assert(typeof e==`string`,`parseT: t is string`),console.assert(e.length>0,`parseT: t non-empty`),e.length===10){let[t,n,r]=e.split(`-`).map(Number);return{date:!0,y:t,m:n-1,d:r}}return Date.parse(e)}function xt(e){return typeof e==`number`?e:Date.UTC(e.y,e.m,e.d)}var St=e=>new Intl.DateTimeFormat(`en-US`,{timeZone:e,hour:`numeric`,minute:`2-digit`,second:`2-digit`,weekday:`short`,month:`short`,day:`numeric`,year:`numeric`,hour12:!1,hourCycle:`h23`});function Ct(e,t){let n=St(t).formatToParts(new Date(e)),r={};for(let e of n)e.type!==`literal`&&(r[e.type]=e.value);return r}function wt(e,t){let n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,timeZoneName:`short`,year:`numeric`}).formatToParts(new Date(e)).find(e=>e.type===`timeZoneName`)?.value??``;return n.startsWith(`GMT`)||n.startsWith(`UTC`)?n.replace(`GMT`,`UTC`).replace(`UTC+0`,`UTC`).replace(`UTC-0`,`UTC`):n}function Tt(e,t,n,r){let i=bt(e),a=typeof i!=`number`,o=xt(i),s=Ct(o,a?`UTC`:n),c=Number(s.hour),l=c%12||12,u=c<12?`am`:`pm`,d=s.minute,f=c.toString().padStart(2,`0`),p=Number(s.day),m={"h:mm a":`${l}:${d} ${u}`,"h a":`${l} ${u}`,ha_short:`${l}${u[0]}`,EEE:s.weekday,"EEE d":`${s.weekday} ${p}`,"MMM d":`${s.month} ${p}`,"EEE MMM d":`${s.weekday} ${s.month} ${p}`,yyyy:s.year,"MMM yyyy":`${s.month} ${s.year}`,"MMM d, yyyy":`${s.month} ${p}, ${s.year}`,"MMM d, h:mm a":`${s.month} ${p}, ${l}:${d} ${u}`,"HH:mm":`${f}:${d}`}[t];if(m===void 0)throw new qe(`bad_fmt`,`formatTime: unknown fmt ${t}`);return r&&!a?`${m} ${wt(o,n)}`:m}function Et(e,t){console.assert(typeof t==`string`,`timePrimText: viewerTz is string`),console.assert(e.k===`time`,`timePrimText: prim is time`);let n=e.tz===`card`?e.zone:t,r=e.show_zone&&n!==t;return Tt(e.t,e.fmt,n,r)}function Dt(e,t=`in_hm`){console.assert(Number.isFinite(e),`countdownText: seconds finite`),console.assert(typeof t==`string`,`countdownText: fmt is string`);let n=Math.trunc(e);if(n<=0)return`now`;let r=Math.floor((n+59)/60),i=Math.floor(r/1440),a=r%1440,o=Math.floor(a/60),s=a%60;if(t===`rel`||t===`in_dhm`&&i>=2){if(i>=2)return`in ${i} days`;if(i===1)return o===0?`in 1 day`:`in 1 d ${o} h`}o+=i*24;let c=o&&s?`${o} h ${s} m`:o?`${o} h`:`${s} min`;return t===`hm`?c:`in ${c}`}function Ot(e,t=`auto`){console.assert(Number.isFinite(e),`countUpText: seconds finite`),console.assert(typeof t==`string`,`countUpText: unit is string`);let n=Math.max(0,Math.trunc(e)),r=t===`auto`?n>=172800?`day`:n>=7200?`hour`:`minute`:t,i=Math.floor(n/{day:86400,hour:3600,minute:60}[r]),a={day:`day`,hour:`hour`,minute:`minute`}[r];return`${i.toLocaleString(`en-US`)} ${a}${i===1?``:`s`}`}function kt(e){console.assert(Number.isFinite(e),`ageText: seconds finite`),console.assert(typeof e==`number`,`ageText: seconds number`);let t=Math.max(0,Math.trunc(e));return t<3600?`${Math.max(1,Math.floor(t/60))} min old`:t<172800?`${Math.floor(t/3600)} h old`:`${Math.floor(t/86400)} d old`}var At=/^(,?)(?:\.(\d)([f%])|(d))$/;function jt(e,t){console.assert(Number.isFinite(e),`numberText: v finite`),console.assert(typeof t==`string`,`numberText: fmt is string`);let n=At.exec(t)??[null,`,`,`0`,`f`],r=n[1]===`,`,i=n[3]===`%`,a=n[4]===`d`||n[2]===void 0?0:Number(n[2]),o=(i?e*100:e).toLocaleString(`en-US`,{useGrouping:r,minimumFractionDigits:a,maximumFractionDigits:a});return i?`${o}%`:o}function Mt(e,t){console.assert(Array.isArray(e),`activeVariant: variants array`),console.assert(Number.isFinite(t),`activeVariant: now finite`);let n=-1;for(let r=0;r=i)&&(a===null||t=i)&&(n=r)}return n<0?0:n}function Nt(e,t){let n=e.pts;if(!n.length)return null;let r=e.box,i=n[0][1];if(t>=n[n.length-1][0])i=n[n.length-1][1];else if(t>n[0][0])for(let e=1;e=r&&t<=o){i=o===r?a:a+(s-a)*(t-r)/(o-r);break}}return r.y0+i*(r.y1-r.y0)}function Pt(e,t){console.assert(Number.isFinite(t),`applyLive: now finite`),console.assert(e.v===1,`applyLive: clir v=1`);let n=JSON.parse(JSON.stringify(e)),r=new Map(n.prims.map(e=>[e.id,e])),i=new Set;for(let e of n.live)Ft(e,r,i,t);return n.prims=n.prims.filter(e=>!i.has(e.id)),n.reading_order=n.reading_order.filter(e=>!i.has(e)),n.live=[],n}function Ft(e,t,n,r){console.assert(typeof e.k==`string`,`runBinding: k is string`),console.assert(t instanceof Map,`runBinding: by is Map`);let i=e.args;if(e.k===`now_marker`)return It(i,t,n,r);if(e.k===`countdown`)return Lt(i,t,r);if(e.k===`count_up`)return Rt(i,t,r);if(e.k===`age`)return zt(i,t,r);if(e.k===`extrapolate`)return Bt(i,t,r);if(e.k===`timed_variants`)return Vt(i,n,r);if(e.k===`past_dim`)return Ht(i,t,r)}function It(e,t,n,r){let i=e.box,a=xt(bt(e.t0)),o=xt(bt(e.t1))-a,s=o>0?(r-a)/o:-1,c=e.prims??[];if(!(s>=0&&s<=1)){for(let e of c)n.add(e);return}let l=yt(i.x0,i.x1,s),u=typeof e.path==`number`?t.get(e.path):void 0,d=u&&u.k===`path`?Nt(u,s):null;for(let n of c){let r=t.get(n);r&&(r.k===`line`?(r.x0=l,r.x1=l,Array.isArray(e.gaps)&&(r.gaps=e.gaps)):r.k===`dot`||r.k===`tri`||r.k===`icon`?(r.x=l,d!==null&&r.k===`dot`&&(r.y=d)):(r.k===`text`||r.k===`time`)&&(r.x=l))}}function Lt(e,t,n){let r=t.get(e.prim);!r||r.k!==`text`&&r.k!==`time`||(r.lines=[Dt((xt(bt(e.t))-n)/1e3,e.fmt||`in_hm`)])}function Rt(e,t,n){let r=t.get(e.prim);if(!r||r.k!==`text`&&r.k!==`time`)return;let i=xt(bt(e.t0)),a=e.unit||`auto`;r.lines=[Ot((n-i)/1e3,a)]}function zt(e,t,n){let r=t.get(e.prim);!r||r.k!==`text`&&r.k!==`time`||(r.lines=[kt((n-xt(bt(e.t)))/1e3)])}function Bt(e,t,n){let r=t.get(e.prim);if(!r||r.k!==`text`&&r.k!==`time`)return;let i=xt(bt(e.t0));r.lines=[jt(e.v0+e.rate_per_s*(n-i)/1e3,e.fmt||`,.0f`)]}function Vt(e,t,n){let r=e.variants??[];if(!r.length)return;let i=Mt(r,n);for(let e=0;ee[0]-t[0]);let c=[[a,o]];for(let[e,t]of s){let n=[];for(let[r,i]of c)t<=r||e>=i?n.push([r,i]):(e>r&&n.push([r,e]),tt-e>1)}function qt(e,t){console.assert(t.width>0,`renderModel: width > 0`),console.assert(Number.isFinite(t.now),`renderModel: now finite`);let n=Pt(e,t.now),r=new Map(n.prims.map(e=>[e.id,e])),i=[];for(let e of n.prims)if(e.k===`text`)i.push(Wt(e,t.width));else if(e.k===`time`){let n=e.lines??[Et(e,t.viewerTz)],r={...e,lines:n};i.push(Wt(r,t.width))}else i.push({kind:`svg`,id:e.id,prim:e});for(let e of n.prims)e.k===`line`&&e.gaps&&e.gaps.length&&(e._segs=Kt(e,r,t.width));return{width:t.width,height:e.bucket.h,summary:n.summary,readingOrder:n.reading_order,hitmap:n.hitmap,ops:i}}var Jt=`/ni/world110m.json`,Yt=null;function Xt(){if(console.assert(Jt.startsWith(`/`),`loadWorld: same-origin asset`),console.assert(typeof fetch==`function`,`loadWorld: fetch available`),Yt)return Yt;let e=Zt().then(e=>(e.length===0&&(Yt=null),e));return Yt=e,e}async function Zt(){console.assert(Jt.endsWith(`.json`),`fetchWorld: json asset`);try{let e=await fetch(Jt);return console.assert(typeof e.ok==`boolean`,`fetchWorld: a response`),e.ok?Qt(await e.json()):[]}catch{return[]}}function Qt(e){console.assert(e!==void 0,`parseWorld: payload present`);let t=typeof e==`object`&&e&&`polys`in e?e.polys:null;if(!Array.isArray(t))return[];let n=t,r=[];for(let e of n){let t=$t(e);if(t===null)return[];r.push(t)}return console.assert(r.length===n.length,`parseWorld: every ring kept`),r}function $t(e){if(console.assert(e!==void 0,`ringPoints: ring present`),!Array.isArray(e)||e.length===0)return null;let t=e,n=[];for(let e of t){if(!Array.isArray(e)||e.length!==2)return null;let t=e[0],r=e[1];if(typeof t!=`number`||typeof r!=`number`||!Number.isFinite(t)||!Number.isFinite(r))return null;n.push([t,r])}return console.assert(n.length===t.length,`ringPoints: every point kept`),n}function en(e,t,n){console.assert(e.k===`basemap`,`mapPaths: basemap prim`),console.assert(t>=0,`mapPaths: width non-negative`);let r=e.box,i=vt(r.x0,0,t),a=vt(r.x1,0,t),[o,s,c,l]=e.bbox;if(!(c>o)||!(l>s))return[];let u=a-i,d=r.y1-r.y0,f=[];for(let e of n){if(tn(e,o,s,c,l))continue;let t=e.map(([e,t])=>`${nn(i+(e-o)/(c-o)*u)},${nn(r.y0+(l-t)/(l-s)*d)}`);f.push(`M${t.join(` L`)}Z`)}return f}function tn(e,t,n,r,i){console.assert(e.length>0,`missesBbox: non-empty ring`),console.assert(r>t&&i>n,`missesBbox: ordered bbox`);let a=1/0,o=-1/0,s=1/0,c=-1/0;for(let[t,n]of e)to&&(o=t),nc&&(c=n);return or||ci}function nn(e){console.assert(typeof e==`number`,`fmt: number`),console.assert(Number.isFinite(e),`fmt: finite number`);let t=e.toFixed(2).replace(/\.?0+$/,``);return t===`-0`||t===``?`0`:t}var rn={box:24,stroke:1.75,icons:{sun:[{t:`circle`,c:[12,12],r:4,fill:!1},{t:`poly`,pts:[[18.8,12],[21.2,12]],closed:!1,fill:!1},{t:`poly`,pts:[[16.808,16.808],[18.505,18.505]],closed:!1,fill:!1},{t:`poly`,pts:[[12,18.8],[12,21.2]],closed:!1,fill:!1},{t:`poly`,pts:[[7.192,16.808],[5.495,18.505]],closed:!1,fill:!1},{t:`poly`,pts:[[5.2,12],[2.8,12]],closed:!1,fill:!1},{t:`poly`,pts:[[7.192,7.192],[5.495,5.495]],closed:!1,fill:!1},{t:`poly`,pts:[[12,5.2],[12,2.8]],closed:!1,fill:!1},{t:`poly`,pts:[[16.808,7.192],[18.505,5.495]],closed:!1,fill:!1}],moon:[{t:`poly`,pts:[[4.122,13.389],[4.078,13.113],[4.044,12.836],[4.019,12.558],[4.005,12.279],[4,12],[4.005,11.721],[4.019,11.442],[4.044,11.164],[4.078,10.887],[4.122,10.611],[4.175,10.337],[4.238,10.065],[4.31,9.795],[4.392,9.528],[4.482,9.264],[4.583,9.003],[4.692,8.746],[4.81,8.493],[4.936,8.244],[5.072,8],[5.216,7.761],[5.368,7.526],[5.528,7.298],[5.696,7.075],[5.872,6.858],[6.055,6.647],[6.245,6.443],[6.443,6.245],[6.647,6.055],[6.858,5.872],[7.075,5.696],[7.298,5.528],[7.526,5.368],[7.761,5.216],[8,5.072],[8.244,4.936],[8.493,4.81],[8.746,4.692],[9.217,9.288],[9.204,9.044],[9.238,9.532],[9.2,8.8],[9.268,9.774],[9.204,8.556],[9.003,4.583],[9.306,10.016],[9.217,8.312],[9.238,8.068],[9.353,10.255],[9.268,7.826],[9.306,7.584],[9.408,10.493],[9.264,4.482],[9.353,7.345],[9.408,7.107],[9.471,10.729],[9.471,6.871],[9.528,4.392],[9.543,6.637],[9.543,10.963],[9.622,6.406],[9.71,6.178],[9.795,4.31],[9.805,5.953],[9.908,5.731],[9.622,11.194],[10.065,4.238],[10.019,5.514],[10.138,5.3],[10.337,4.175],[10.264,5.091],[9.71,11.422],[10.397,4.886],[10.537,4.686],[10.611,4.122],[10.684,4.49],[10.838,4.3],[10.887,4.078],[10.998,4.116],[9.805,11.647],[9.908,11.869],[10.019,12.086],[10.138,12.3],[10.264,12.509],[10.397,12.714],[10.537,12.914],[10.684,13.11],[10.838,13.3],[10.998,13.484],[11.165,13.663],[19.269,15.092],[19.047,15.195],[19.308,15.254],[11.337,13.835],[18.822,15.29],[18.594,15.378],[19.19,15.507],[18.363,15.457],[18.129,15.529],[19.064,15.756],[11.516,14.002],[17.893,15.592],[17.655,15.647],[18.928,16],[17.416,15.694],[17.174,15.732],[18.784,16.239],[11.7,14.162],[16.932,15.762],[16.688,15.783],[18.632,16.474],[16.444,15.796],[11.89,14.316],[16.2,15.8],[15.956,15.796],[18.472,16.702],[15.712,15.783],[12.086,14.463],[15.468,15.762],[18.304,16.925],[15.226,15.732],[12.286,14.603],[14.984,15.694],[14.745,15.647],[12.491,14.736],[14.507,15.592],[18.128,17.142],[14.271,15.529],[12.7,14.862],[14.037,15.457],[12.914,14.981],[13.806,15.378],[13.131,15.092],[13.578,15.29],[13.353,15.195],[17.945,17.353],[17.755,17.557],[17.557,17.755],[17.353,17.945],[17.142,18.128],[16.925,18.304],[16.702,18.472],[16.474,18.632],[16.239,18.784],[16,18.928],[15.756,19.064],[15.507,19.19],[15.254,19.308],[14.997,19.417],[14.736,19.518],[14.472,19.608],[14.205,19.69],[13.935,19.762],[13.663,19.825],[13.389,19.878],[13.113,19.922],[12.836,19.956],[12.558,19.981],[12.279,19.995],[12,20],[11.721,19.995],[11.442,19.981],[11.164,19.956],[10.887,19.922],[10.611,19.878],[10.337,19.825],[10.065,19.762],[9.795,19.69],[9.528,19.608],[9.264,19.518],[9.003,19.417],[8.746,19.308],[8.493,19.19],[8.244,19.064],[8,18.928],[7.761,18.784],[7.526,18.632],[7.298,18.472],[7.075,18.304],[6.858,18.128],[6.647,17.945],[6.443,17.755],[6.245,17.557],[6.055,17.353],[5.872,17.142],[5.696,16.925],[5.528,16.702],[5.368,16.474],[5.216,16.239],[5.072,16],[4.936,15.756],[4.81,15.507],[4.692,15.254],[4.583,14.997],[4.482,14.736],[4.392,14.472],[4.31,14.205],[4.238,13.935],[4.175,13.663]],closed:!0,fill:!1}],cloud:[{t:`poly`,pts:[[3.709,14.235],[3.737,13.971],[3.783,13.71],[3.847,13.453],[3.929,13.2],[4.029,12.954],[4.145,12.716],[4.277,12.486],[4.426,12.266],[4.589,12.057],[4.767,11.86],[4.957,11.676],[5.16,11.506],[5.375,11.35],[5.6,11.209],[5.834,11.085],[6.076,10.977],[6.326,10.886],[6.581,10.813],[6.84,10.758],[7.103,10.721],[7.367,10.702],[7.512,10.651],[7.549,10.304],[7.609,9.96],[7.694,9.622],[7.802,9.29],[7.932,8.966],[8.085,8.653],[8.26,8.35],[8.455,8.061],[8.67,7.786],[8.903,7.527],[9.154,7.284],[9.422,7.06],[9.704,6.855],[10,6.67],[10.308,6.506],[10.627,6.364],[10.955,6.245],[11.29,6.149],[11.632,6.076],[11.977,6.027],[12.326,6.003],[12.674,6.003],[13.023,6.027],[13.368,6.076],[13.71,6.149],[14.045,6.245],[14.373,6.364],[14.692,6.506],[15,6.67],[15.296,6.855],[15.578,7.06],[15.846,7.284],[16.097,7.527],[16.33,7.786],[16.545,8.061],[16.74,8.35],[16.915,8.653],[17.068,8.966],[17.198,9.29],[17.306,9.622],[17.391,9.96],[17.451,10.304],[17.576,10.62],[17.825,10.655],[18.071,10.707],[18.312,10.776],[18.549,10.862],[18.778,10.964],[19,11.082],[19.213,11.215],[19.416,11.363],[19.609,11.525],[19.79,11.699],[19.958,11.886],[20.112,12.084],[20.253,12.292],[20.379,12.51],[20.489,12.736],[20.583,12.969],[20.661,13.208],[20.721,13.452],[20.765,13.699],[20.791,13.949],[20.8,14.2],[20.791,14.451],[20.765,14.701],[20.721,14.948],[20.661,15.192],[20.583,15.431],[20.489,15.664],[20.379,15.89],[20.253,16.108],[20.112,16.316],[19.958,16.514],[19.79,16.701],[19.609,16.875],[19.416,17.037],[19.213,17.185],[19,17.318],[20.8,18.2],[18.778,17.436],[18.549,17.538],[18.312,17.624],[18.071,17.693],[17.825,17.745],[17.576,17.78],[17.326,17.798],[17.074,17.798],[16.824,17.78],[16.575,17.745],[16.329,17.693],[16.088,17.624],[15.851,17.538],[14.021,15.89],[15.622,17.436],[15.4,17.318],[14.147,16.108],[15.187,17.185],[14.288,16.316],[14.984,17.037],[14.791,16.875],[14.442,16.514],[14.61,16.701],[13.71,15.851],[13.368,15.924],[13.023,15.973],[12.674,15.997],[12.326,15.997],[11.977,15.973],[11.632,15.924],[10.411,16.943],[10.233,17.14],[10.574,16.734],[10.043,17.324],[10.723,16.514],[9.84,17.494],[11.29,15.851],[9.625,17.65],[10.855,16.284],[9.4,17.791],[9.166,17.915],[10.971,16.046],[8.924,18.023],[8.674,18.114],[11.071,15.8],[8.419,18.187],[6.581,18.187],[6.326,18.114],[6.076,18.023],[5.834,17.915],[5.6,17.791],[5.375,17.65],[3.7,18.2],[5.16,17.494],[4.957,17.324],[4.767,17.14],[4.589,16.943],[4.426,16.734],[4.277,16.514],[4.145,16.284],[4.029,16.046],[3.929,15.8],[3.847,15.547],[3.783,15.29],[3.737,15.029],[3.709,14.765],[3.7,14.5]],closed:!0,fill:!1}],cloud_sun:[{t:`circle`,c:[8.5,8.5],r:3,fill:!1},{t:`poly`,pts:[[4.964,12.036],[3.692,13.308]],closed:!1,fill:!1},{t:`poly`,pts:[[3.5,8.5],[1.7,8.5]],closed:!1,fill:!1},{t:`poly`,pts:[[4.964,4.964],[3.692,3.692]],closed:!1,fill:!1},{t:`poly`,pts:[[8.5,3.5],[8.5,1.7]],closed:!1,fill:!1},{t:`poly`,pts:[[12.036,4.964],[13.308,3.692]],closed:!1,fill:!1},{t:`poly`,pts:[[7.402,16.233],[7.424,16.016],[7.462,15.802],[7.515,15.591],[7.582,15.384],[7.663,15.183],[7.759,14.987],[7.867,14.799],[7.989,14.618],[8.123,14.447],[8.269,14.285],[8.425,14.134],[8.592,13.995],[8.768,13.867],[8.952,13.751],[9.144,13.649],[9.343,13.561],[9.547,13.487],[9.756,13.427],[9.969,13.381],[10.184,13.351],[10.401,13.336],[10.52,13.294],[10.55,13.009],[10.6,12.728],[10.669,12.45],[10.757,12.178],[10.864,11.912],[10.99,11.655],[11.133,11.407],[11.293,11.17],[11.469,10.945],[11.661,10.732],[11.867,10.533],[12.086,10.349],[12.317,10.181],[12.56,10.029],[12.813,9.895],[13.074,9.779],[13.343,9.681],[13.618,9.602],[13.898,9.542],[14.181,9.502],[14.467,9.482],[14.753,9.482],[15.039,9.502],[15.322,9.542],[15.602,9.602],[15.877,9.681],[16.146,9.779],[16.407,9.895],[16.66,10.029],[16.903,10.181],[17.134,10.349],[17.353,10.533],[17.559,10.732],[17.751,10.945],[17.927,11.17],[18.087,11.407],[18.23,11.655],[18.356,11.912],[18.463,12.178],[18.551,12.45],[18.62,12.728],[18.67,13.009],[18.773,13.268],[18.977,13.297],[19.178,13.34],[19.376,13.396],[19.57,13.467],[19.758,13.551],[19.94,13.647],[20.115,13.757],[20.281,13.878],[20.439,14.01],[20.587,14.153],[20.725,14.306],[20.852,14.469],[20.967,14.64],[21.07,14.818],[21.161,15.003],[21.238,15.194],[21.302,15.39],[21.351,15.59],[21.387,15.793],[21.409,15.998],[21.416,16.204],[21.409,16.41],[21.387,16.615],[21.351,16.818],[21.302,17.018],[21.238,17.214],[21.161,17.405],[21.07,17.59],[20.967,17.768],[20.852,17.939],[20.725,18.102],[20.587,18.255],[20.439,18.398],[20.281,18.53],[20.115,18.651],[19.94,18.761],[21.416,19.484],[19.758,18.857],[19.57,18.941],[19.376,19.012],[19.178,19.068],[18.977,19.111],[18.773,19.14],[18.567,19.154],[18.361,19.154],[18.155,19.14],[17.951,19.111],[17.75,19.068],[17.552,19.012],[17.358,18.941],[15.858,17.59],[17.17,18.857],[16.988,18.761],[15.961,17.768],[16.813,18.651],[16.076,17.939],[16.647,18.53],[16.489,18.398],[16.203,18.102],[16.341,18.255],[15.602,17.558],[15.322,17.618],[15.039,17.658],[14.753,17.678],[14.467,17.678],[14.181,17.658],[13.898,17.618],[12.897,18.453],[12.751,18.615],[13.031,18.282],[12.595,18.766],[13.153,18.101],[12.428,18.905],[13.618,17.558],[12.252,19.033],[13.261,17.913],[12.068,19.149],[11.876,19.251],[13.357,17.717],[11.677,19.339],[11.473,19.413],[13.438,17.516],[11.264,19.473],[9.756,19.473],[9.547,19.413],[9.343,19.339],[9.144,19.251],[8.952,19.149],[8.768,19.033],[7.394,19.484],[8.592,18.905],[8.425,18.766],[8.269,18.615],[8.123,18.453],[7.989,18.282],[7.867,18.101],[7.759,17.913],[7.663,17.717],[7.582,17.516],[7.515,17.309],[7.462,17.098],[7.424,16.884],[7.402,16.667],[7.394,16.45]],closed:!0,fill:!1}],cloud_moon:[{t:`poly`,pts:[[3.501,9.433],[3.454,9.258],[3.414,9.081],[3.379,8.903],[3.351,8.724],[3.328,8.544],[3.313,8.363],[3.303,8.181],[3.3,8],[3.303,7.819],[3.313,7.637],[3.328,7.456],[3.351,7.276],[3.379,7.097],[3.414,6.919],[3.454,6.742],[3.501,6.567],[3.555,6.393],[3.614,6.221],[3.679,6.052],[3.75,5.885],[3.826,5.72],[3.909,5.559],[3.997,5.4],[4.09,5.244],[4.189,5.092],[4.293,4.944],[4.402,4.799],[4.517,4.658],[4.636,4.521],[4.759,4.388],[4.888,4.259],[5.021,4.136],[5.158,4.017],[5.299,3.902],[5.444,3.793],[5.592,3.689],[5.744,3.59],[5.9,3.497],[6.059,3.409],[6.22,3.326],[6.385,3.25],[6.552,3.179],[6.721,3.114],[6.893,3.055],[7.067,3.001],[6.77,5.101],[6.745,5.26],[6.801,4.944],[6.837,4.787],[6.725,5.419],[6.878,4.632],[6.711,5.579],[6.925,4.479],[6.703,5.739],[6.977,4.327],[7.242,2.954],[7.035,4.177],[6.7,5.9],[7.098,4.029],[6.703,6.061],[7.166,3.883],[7.238,3.74],[7.419,2.914],[6.711,6.221],[7.316,3.6],[7.399,3.462],[6.725,6.381],[7.486,3.328],[7.597,2.879],[7.579,3.196],[6.745,6.54],[7.675,3.068],[7.776,2.851],[7.776,2.943],[6.77,6.699],[6.801,6.856],[6.837,7.013],[6.878,7.168],[6.925,7.321],[6.977,7.473],[7.035,7.623],[7.098,7.771],[7.166,7.917],[7.238,8.06],[7.316,8.2],[7.399,8.338],[7.486,8.472],[7.579,8.604],[7.675,8.732],[7.776,8.857],[7.882,8.978],[7.991,9.095],[8.105,9.209],[8.222,9.318],[8.343,9.424],[8.468,9.525],[8.596,9.621],[8.728,9.714],[13.171,10.102],[13.25,10.115],[13.023,10.165],[12.873,10.223],[8.862,9.801],[13.174,10.28],[12.721,10.275],[12.568,10.322],[9,9.884],[13.091,10.441],[12.413,10.363],[12.256,10.399],[9.14,9.962],[12.099,10.43],[13.003,10.6],[11.94,10.455],[9.283,10.034],[11.781,10.475],[9.429,10.102],[11.621,10.489],[12.91,10.756],[11.461,10.497],[9.577,10.165],[11.3,10.5],[9.727,10.223],[11.139,10.497],[10.979,10.489],[9.879,10.275],[10.819,10.475],[10.032,10.322],[10.66,10.455],[10.187,10.363],[10.501,10.43],[12.811,10.908],[10.344,10.399],[12.707,11.056],[12.598,11.201],[12.483,11.342],[12.364,11.479],[12.241,11.612],[12.112,11.741],[11.979,11.864],[11.842,11.983],[11.701,12.098],[11.556,12.207],[11.408,12.311],[11.256,12.41],[11.1,12.503],[10.941,12.591],[10.78,12.674],[10.615,12.75],[10.448,12.821],[10.279,12.886],[10.107,12.945],[9.933,12.999],[9.758,13.046],[9.581,13.086],[9.403,13.121],[9.224,13.149],[9.044,13.172],[8.863,13.187],[8.681,13.197],[8.5,13.2],[8.319,13.197],[8.137,13.187],[7.956,13.172],[7.776,13.149],[7.597,13.121],[7.419,13.086],[7.242,13.046],[7.067,12.999],[6.893,12.945],[6.721,12.886],[6.552,12.821],[6.385,12.75],[6.22,12.674],[6.059,12.591],[5.9,12.503],[5.744,12.41],[5.592,12.311],[5.444,12.207],[5.299,12.098],[5.158,11.983],[5.021,11.864],[4.888,11.741],[4.759,11.612],[4.636,11.479],[4.517,11.342],[4.402,11.201],[4.293,11.056],[4.189,10.908],[4.09,10.756],[3.997,10.6],[3.909,10.441],[3.826,10.28],[3.75,10.115],[3.679,9.948],[3.614,9.779],[3.555,9.607]],closed:!0,fill:!1},{t:`poly`,pts:[[7.402,16.233],[7.424,16.016],[7.462,15.802],[7.515,15.591],[7.582,15.384],[7.663,15.183],[7.759,14.987],[7.867,14.799],[7.989,14.618],[8.123,14.447],[8.269,14.285],[8.425,14.134],[8.592,13.995],[8.768,13.867],[8.952,13.751],[9.144,13.649],[9.343,13.561],[9.547,13.487],[9.756,13.427],[9.969,13.381],[10.184,13.351],[10.401,13.336],[10.52,13.294],[10.55,13.009],[10.6,12.728],[10.669,12.45],[10.757,12.178],[10.864,11.912],[10.99,11.655],[11.133,11.407],[11.293,11.17],[11.469,10.945],[11.661,10.732],[11.867,10.533],[12.086,10.349],[12.317,10.181],[12.56,10.029],[12.813,9.895],[13.074,9.779],[13.343,9.681],[13.618,9.602],[13.898,9.542],[14.181,9.502],[14.467,9.482],[14.753,9.482],[15.039,9.502],[15.322,9.542],[15.602,9.602],[15.877,9.681],[16.146,9.779],[16.407,9.895],[16.66,10.029],[16.903,10.181],[17.134,10.349],[17.353,10.533],[17.559,10.732],[17.751,10.945],[17.927,11.17],[18.087,11.407],[18.23,11.655],[18.356,11.912],[18.463,12.178],[18.551,12.45],[18.62,12.728],[18.67,13.009],[18.773,13.268],[18.977,13.297],[19.178,13.34],[19.376,13.396],[19.57,13.467],[19.758,13.551],[19.94,13.647],[20.115,13.757],[20.281,13.878],[20.439,14.01],[20.587,14.153],[20.725,14.306],[20.852,14.469],[20.967,14.64],[21.07,14.818],[21.161,15.003],[21.238,15.194],[21.302,15.39],[21.351,15.59],[21.387,15.793],[21.409,15.998],[21.416,16.204],[21.409,16.41],[21.387,16.615],[21.351,16.818],[21.302,17.018],[21.238,17.214],[21.161,17.405],[21.07,17.59],[20.967,17.768],[20.852,17.939],[20.725,18.102],[20.587,18.255],[20.439,18.398],[20.281,18.53],[20.115,18.651],[19.94,18.761],[21.416,19.484],[19.758,18.857],[19.57,18.941],[19.376,19.012],[19.178,19.068],[18.977,19.111],[18.773,19.14],[18.567,19.154],[18.361,19.154],[18.155,19.14],[17.951,19.111],[17.75,19.068],[17.552,19.012],[17.358,18.941],[15.858,17.59],[17.17,18.857],[16.988,18.761],[15.961,17.768],[16.813,18.651],[16.076,17.939],[16.647,18.53],[16.489,18.398],[16.203,18.102],[16.341,18.255],[15.602,17.558],[15.322,17.618],[15.039,17.658],[14.753,17.678],[14.467,17.678],[14.181,17.658],[13.898,17.618],[12.897,18.453],[12.751,18.615],[13.031,18.282],[12.595,18.766],[13.153,18.101],[12.428,18.905],[13.618,17.558],[12.252,19.033],[13.261,17.913],[12.068,19.149],[11.876,19.251],[13.357,17.717],[11.677,19.339],[11.473,19.413],[13.438,17.516],[11.264,19.473],[9.756,19.473],[9.547,19.413],[9.343,19.339],[9.144,19.251],[8.952,19.149],[8.768,19.033],[7.394,19.484],[8.592,18.905],[8.425,18.766],[8.269,18.615],[8.123,18.453],[7.989,18.282],[7.867,18.101],[7.759,17.913],[7.663,17.717],[7.582,17.516],[7.515,17.309],[7.462,17.098],[7.424,16.884],[7.402,16.667],[7.394,16.45]],closed:!0,fill:!1}],rain:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`poly`,pts:[[8.5,17.6],[6.9,21.6]],closed:!1,fill:!1},{t:`poly`,pts:[[12.5,17.6],[10.9,21.6]],closed:!1,fill:!1},{t:`poly`,pts:[[16.5,17.6],[14.9,21.6]],closed:!1,fill:!1}],drizzle:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`poly`,pts:[[8.5,18.4],[7.9,20]],closed:!1,fill:!1},{t:`poly`,pts:[[12.5,18.4],[11.9,20]],closed:!1,fill:!1},{t:`poly`,pts:[[16.5,18.4],[15.9,20]],closed:!1,fill:!1}],snow:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`circle`,c:[8.5,19.2],r:.9,fill:!0},{t:`circle`,c:[12.5,21],r:.9,fill:!0},{t:`circle`,c:[16.5,19.2],r:.9,fill:!0}],storm:[{t:`poly`,pts:[[4.538,11.011],[4.563,10.774],[4.605,10.539],[4.662,10.307],[4.736,10.08],[4.826,9.859],[4.93,9.644],[5.05,9.438],[5.183,9.24],[5.33,9.052],[5.49,8.874],[5.662,8.708],[5.844,8.555],[6.038,8.415],[6.24,8.288],[6.451,8.176],[6.669,8.079],[6.893,7.997],[7.123,7.932],[7.356,7.882],[7.593,7.849],[7.831,7.832],[7.961,7.786],[7.994,7.474],[8.048,7.164],[8.124,6.86],[8.221,6.561],[8.339,6.27],[8.477,5.987],[8.634,5.715],[8.809,5.455],[9.003,5.207],[9.213,4.974],[9.439,4.756],[9.68,4.554],[9.934,4.369],[10.2,4.203],[10.477,4.055],[10.764,3.928],[11.059,3.82],[11.361,3.734],[11.669,3.668],[11.98,3.625],[12.293,3.603],[12.607,3.603],[12.92,3.625],[13.231,3.668],[13.539,3.734],[13.841,3.82],[14.136,3.928],[14.423,4.055],[14.7,4.203],[14.966,4.369],[15.22,4.554],[15.461,4.756],[15.687,4.974],[15.897,5.207],[16.091,5.455],[16.266,5.715],[16.423,5.987],[16.561,6.27],[16.679,6.561],[16.776,6.86],[16.852,7.164],[16.906,7.474],[17.019,7.758],[17.243,7.789],[17.464,7.836],[17.681,7.899],[17.894,7.976],[18.1,8.068],[18.3,8.174],[18.492,8.294],[18.675,8.427],[18.848,8.572],[19.011,8.729],[19.162,8.897],[19.301,9.076],[19.428,9.263],[19.541,9.459],[19.64,9.662],[19.725,9.872],[19.794,10.087],[19.849,10.306],[19.888,10.529],[19.912,10.754],[19.92,10.98],[19.912,11.206],[19.888,11.431],[19.849,11.654],[19.794,11.873],[19.725,12.088],[19.64,12.298],[19.541,12.501],[19.428,12.697],[19.301,12.884],[19.162,13.063],[19.011,13.231],[18.848,13.388],[18.675,13.533],[18.492,13.666],[18.3,13.786],[19.92,14.58],[18.1,13.892],[17.894,13.984],[17.681,14.061],[17.464,14.124],[17.243,14.171],[17.019,14.202],[16.793,14.218],[16.567,14.218],[16.341,14.202],[16.117,14.171],[15.896,14.124],[15.679,14.061],[15.466,13.984],[13.819,12.501],[15.26,13.892],[15.06,13.786],[13.932,12.697],[14.868,13.666],[14.059,12.884],[14.685,13.533],[14.512,13.388],[14.198,13.063],[14.349,13.231],[13.539,12.466],[13.231,12.532],[12.92,12.575],[12.607,12.597],[12.293,12.597],[11.98,12.575],[11.669,12.532],[10.57,13.448],[10.41,13.626],[10.717,13.26],[10.238,13.792],[10.85,13.062],[10.056,13.945],[11.361,12.466],[9.862,14.085],[10.97,12.856],[9.66,14.212],[9.449,14.324],[11.074,12.641],[9.231,14.421],[9.007,14.503],[11.164,12.42],[8.777,14.568],[7.123,14.568],[6.893,14.503],[6.669,14.421],[6.451,14.324],[6.24,14.212],[6.038,14.085],[4.53,14.58],[5.844,13.945],[5.662,13.792],[5.49,13.626],[5.33,13.448],[5.183,13.26],[5.05,13.062],[4.93,12.856],[4.826,12.641],[4.736,12.42],[4.662,12.193],[4.605,11.961],[4.563,11.726],[4.538,11.489],[4.53,11.25]],closed:!0,fill:!1},{t:`poly`,pts:[[13.2,16],[10.6,19.6],[13.4,19.6],[11.2,23]],closed:!1,fill:!1}],fog:[{t:`poly`,pts:[[4,8],[20,8]],closed:!1,fill:!1},{t:`poly`,pts:[[3,12],[17,12]],closed:!1,fill:!1},{t:`poly`,pts:[[6,16],[21,16]],closed:!1,fill:!1},{t:`poly`,pts:[[5,20],[15,20]],closed:!1,fill:!1}],wind:[{t:`poly`,pts:[[3,9],[16.5,9],[16.5,9],[17.75,8.665],[18.665,7.75],[19,6.5],[18.665,5.25],[17.75,4.335],[16.5,4],[15.25,4.335],[14.335,5.25],[14,6.5]],closed:!1,fill:!1},{t:`poly`,pts:[[3,13],[19,13],[19,13],[20.25,13.335],[21.165,14.25],[21.5,15.5],[21.165,16.75],[20.25,17.665],[19,18],[17.75,17.665],[16.835,16.75],[16.5,15.5]],closed:!1,fill:!1},{t:`poly`,pts:[[3,17],[11,17]],closed:!1,fill:!1}],alert:[{t:`poly`,pts:[[12,3.5],[21.5,20],[2.5,20]],closed:!0,fill:!1},{t:`poly`,pts:[[12,9.5],[12,14.2]],closed:!1,fill:!1},{t:`circle`,c:[12,17.2],r:1,fill:!0}],check:[{t:`poly`,pts:[[4.5,12.5],[9.5,17.5],[19.5,6.5]],closed:!1,fill:!1}],cross:[{t:`poly`,pts:[[6,6],[18,18]],closed:!1,fill:!1},{t:`poly`,pts:[[18,6],[6,18]],closed:!1,fill:!1}],clock:[{t:`circle`,c:[12,12],r:9,fill:!1},{t:`poly`,pts:[[12,6.5],[12,12],[15.8,14.2]],closed:!1,fill:!1}],link_out:[{t:`poly`,pts:[[10,5],[5,5],[5,19],[19,19],[19,14]],closed:!1,fill:!1},{t:`poly`,pts:[[12,12],[19.5,4.5]],closed:!1,fill:!1},{t:`poly`,pts:[[14,4.5],[19.5,4.5],[19.5,10]],closed:!1,fill:!1}],lock:[{t:`poly`,pts:[[5,11],[19,11],[19,20.5],[5,20.5]],closed:!0,fill:!1},{t:`poly`,pts:[[8,11],[8,8],[8,8],[8.136,6.965],[8.536,6],[9.172,5.172],[10,4.536],[10.965,4.136],[12,4],[13.035,4.136],[14,4.536],[14.828,5.172],[15.464,6],[15.864,6.965],[16,8],[16,11]],closed:!1,fill:!1}],unlock:[{t:`poly`,pts:[[5,11],[19,11],[19,20.5],[5,20.5]],closed:!0,fill:!1},{t:`poly`,pts:[[8,11],[8,8],[8,8],[8.136,6.965],[8.536,6],[9.172,5.172],[10,4.536],[10.965,4.136],[12,4],[13.035,4.136],[14,4.536],[14.828,5.172],[15.464,6],[15.864,6.965],[16,8],[16,9]],closed:!1,fill:!1}],pin:[{t:`poly`,pts:[[6.371,12.75],[5.892,11.723],[5.599,10.629],[5.5,9.5],[5.599,8.371],[5.892,7.277],[6.371,6.25],[7.021,5.322],[7.822,4.521],[8.75,3.871],[9.777,3.392],[10.871,3.099],[12,3],[13.129,3.099],[14.223,3.392],[15.25,3.871],[16.178,4.521],[16.979,5.322],[17.629,6.25],[18.108,7.277],[18.401,8.371],[18.5,9.5],[18.401,10.629],[18.108,11.723],[17.629,12.75],[12,21.5]],closed:!0,fill:!1},{t:`circle`,c:[12,9.5],r:2.3,fill:!1}],up:[{t:`poly`,pts:[[12,19],[12,5]],closed:!1,fill:!1},{t:`poly`,pts:[[6,11],[12,5],[18,11]],closed:!1,fill:!1}],down:[{t:`poly`,pts:[[12,5],[12,19]],closed:!1,fill:!1},{t:`poly`,pts:[[6,13],[12,19],[18,13]],closed:!1,fill:!1}]}},an=0;function on(e){console.assert(e!=null,`detectOverflows: root required`),console.assert(typeof e.querySelectorAll==`function`,`detectOverflows: root is an element`);let t=e.querySelectorAll(`.ni-t[data-max-w]`),n=0;for(let e of t){let t=Number(e.getAttribute(`data-max-w`));!Number.isFinite(t)||t<=0||e.scrollWidth>t+.5&&!e.hasAttribute(`data-ellipsis`)&&(e.setAttribute(`data-ellipsis`,``),n+=1,an+=1)}return n}var sn=m(`unrenderable`),cn=a(``),ln=a(``),un=a(``),dn=a(``),fn=a(``),pn=a(``),mn=a(``),hn=a(``),gn=a(``),_n=a(``),vn=a(``),yn=m(``),bn=m(` `),xn=m(`
          `),Sn=m(`
          `);function Cn(n,r){let i=s();E(r,!0);function a(){let e=typeof window>`u`?null:window;return typeof e?.NI_NOW==`number`?e.NI_NOW:Date.now()}let c=z(e(a())),u=typeof window>`u`?null:window.setInterval(()=>{k(c,a(),!0)},15e3);te(()=>{u!==null&&window.clearInterval(u)});let m=N(()=>{try{return{ok:!0,clir:Q(r.clir)}}catch(e){return{ok:!1,why:e instanceof qe?e.message:String(e)}}}),g=z(0),y=N(()=>v(m).ok?v(m).clir.bucket.min_w:0),C=N(()=>v(g)>v(y)?v(g):v(y)),w=N(()=>v(g)>0&&v(g)v(m).ok&&v(C)>0?qt(v(m).clir,{width:v(C),now:v(c),viewerTz:r.viewerTz}):null),D=z(null);l(()=>{if(!v(D)||!v(T))return;let e=v(D),t=()=>{on(e)},n=typeof document>`u`?null:document.fonts;n&&typeof n.ready?.then==`function`?n.ready.then(t,t):t()});let O=z(null),M=N(()=>v(T)!==null&&v(T).ops.some(e=>ae(e)?.k===`basemap`));l(()=>{if(!v(M))return;let e=!0;return Xt().then(t=>{e&&k(O,t)},()=>{e&&k(O,[])}),()=>{e=!1}});function I(e){console.assert(Number.isFinite(e),`fmt: finite number`);let t=e.toFixed(2).replace(/\.?0+$/,``);return t===`-0`||t===``?`0`:t}function L(e,t){return console.assert(t>=0,`rx: width non-negative`),vt(e,0,t)}function R(e){return console.assert(e.length>0,`tokVar: token required`),`var(--ni-${e})`}function ie(e){return e.kind===`text`}function ae(e){return e.kind===`svg`?e.prim:null}function B(e,t){console.assert(e.y1>=e.y0,`boxRect: ordered box`),console.assert(t>=0,`boxRect: width non-negative`);let n=L(e.x0,t),r=L(e.x1,t);return{x:n,y:e.y0,w:Math.max(0,r-n),h:Math.max(0,e.y1-e.y0)}}function oe(e,t){console.assert(e.k===`tri`,`triPoints: tri prim`),console.assert(e.size>0,`triPoints: size positive`);let n=e.size*.866,r=L(e.x,t),i=e.y,a=e.size;return(e.dir===`up`?[[r-a/2,i+n/2],[r+a/2,i+n/2],[r,i-n/2]]:e.dir===`down`?[[r-a/2,i-n/2],[r+a/2,i-n/2],[r,i+n/2]]:e.dir===`left`?[[r+n/2,i-a/2],[r+n/2,i+a/2],[r-n/2,i]]:[[r-n/2,i-a/2],[r-n/2,i+a/2],[r+n/2,i]]).map(([e,t])=>`${I(e)},${I(t)}`).join(` `)}function V(e,t){console.assert(e.k===`path`,`pathD: path prim`),console.assert(Array.isArray(e.pts),`pathD: points array`);let n=e.box,r=L(n.x0,t),i=L(n.x1,t),a=e.pts.map(([e,t])=>[r+e*(i-r),n.y0+t*(n.y1-n.y0)]);if(a.length<2)return{line:``,fill:null};let o=`M`+a.map(([e,t])=>`${I(e)},${I(t)}`).join(` L`),s=a[0],c=a[a.length-1];return{line:o,fill:e.fill?`${o} L${I(c[0])},${I(n.y1)} L${I(s[0])},${I(n.y1)} Z`:null}}function H(e,t,n){console.assert(e.length>0,`gapDash: segments required`),console.assert(t<=n,`gapDash: ordered ends`);let r=[0],i=t;for(let[t,n]of e)r.push(t-i,n-t),i=n;return r.push(n-i+1e3),r.map(I).join(` `)}function se(e,t,n){if(console.assert(n>0,`cellFill: steps positive`),console.assert(e>=0,`cellFill: value non-negative`),t===`seq`)return R(`viz-seq-${1+Math.round(e*4/Math.max(1,n-1))}`);let r=e/Math.max(1,n-1);return r<=.5?`color-mix(in srgb, ${R(`viz-div-mid`)} ${I(r*200)}%, ${R(`viz-div-neg`)})`:`color-mix(in srgb, ${R(`viz-div-pos`)} ${I((r-.5)*200)}%, ${R(`viz-div-mid`)})`}function ce(e,t){console.assert(e.k===`cells`,`cellsFor: cells prim`),console.assert(e.cols>0&&e.rows>0,`cellsFor: grid shape`);let n=e.box,r=L(n.x0,t),i=(L(n.x1,t)-r-e.gap*(e.cols-1))/e.cols,a=(n.y1-n.y0-e.gap*(e.rows-1))/e.rows,o=[];for(let t=0;t0,`iconScale: size positive`),console.assert(rn.box>0,`iconScale: icon box`),e.size/rn.box}function ue(e){return console.assert(Array.isArray(e),`pointList: points array`),e.map(e=>`${I(e[0])},${I(e[1])}`).join(` `)}var U=f(),de=b(U),fe=e=>{var t=sn();o(()=>j(t,`title`,v(m).ok?`render failed`:v(m).why)),d(e,t)},W=e=>{var n=Sn();let r;var a=x(n);let s;var c=x(a);p(c,21,()=>v(T).ops,F,(e,n)=>{let r=N(()=>ae(v(n)));var a=f(),s=b(a),c=e=>{var n=f(),a=b(n),s=e=>{let t=N(()=>v(r)),n=N(()=>B({x0:v(t).x0,x1:v(t).x1,y0:v(t).y0,y1:v(t).y1},v(T).width));var i=cn();let a;o((e,n,r,o,s,c,l)=>{j(i,`x`,e),j(i,`y`,n),j(i,`width`,r),j(i,`height`,o),j(i,`rx`,s),a=_(i,``,a,{fill:c,stroke:l,opacity:v(t).alpha??1})},[()=>I(v(n).x),()=>I(v(n).y),()=>I(v(n).w),()=>I(v(n).h),()=>I(v(t).r),()=>R(v(t).tok),()=>v(t).stroke?R(v(t).stroke):`none`]),d(e,i)},c=e=>{let t=N(()=>v(r));var n=ln();let i;o((e,r,a,o,s,c,l)=>{j(n,`x1`,e),j(n,`y1`,r),j(n,`x2`,a),j(n,`y2`,o),i=_(n,``,i,{stroke:s,"stroke-width":c,"stroke-dasharray":l,opacity:v(t).alpha??1})},[()=>I(L(v(t).x0,v(T).width)),()=>I(v(t).y0),()=>I(L(v(t).x1,v(T).width)),()=>I(v(t).y1),()=>R(v(t).tok),()=>I(v(t).w),()=>v(t)._segs?H(v(t)._segs,Math.min(v(t).y0,v(t).y1),Math.max(v(t).y0,v(t).y1)):v(t).dash?v(t).dash.map(I).join(` `):`none`]),d(e,n)},l=e=>{let t=N(()=>v(r));var n=un();let i;o((e,r)=>{j(n,`points`,e),i=_(n,``,i,{fill:r,opacity:v(t).alpha??1})},[()=>oe(v(t),v(T).width),()=>R(v(t).tok)]),d(e,n)},u=e=>{let n=N(()=>v(r));var i=fn();let a;var s=x(i),c=e=>{var t=dn();let r;o((e,n,i,a)=>{j(t,`cx`,e),j(t,`cy`,n),j(t,`r`,i),r=_(t,``,r,{fill:a})},[()=>I(L(v(n).x,v(T).width)),()=>I(v(n).y),()=>I(v(n).r+v(n).ring_w),()=>R(v(n).ring)]),d(e,t)};t(s,e=>{v(n).ring&&e(c)});var l=h(s);let u;A(i),o((e,t,r,o)=>{a=_(i,``,a,{opacity:v(n).alpha??1}),j(l,`cx`,e),j(l,`cy`,t),j(l,`r`,r),u=_(l,``,u,{fill:o})},[()=>I(L(v(n).x,v(T).width)),()=>I(v(n).y),()=>I(v(n).r),()=>R(v(n).tok)]),d(e,i)},m=e=>{let n=N(()=>v(r)),i=N(()=>V(v(n),v(T).width));var a=mn();let s;var c=x(a),l=e=>{var t=pn();let r;o(e=>{j(t,`d`,v(i).fill),r=_(t,``,r,{fill:e,stroke:`none`})},[()=>R(v(n).fill)]),d(e,t)};t(c,e=>{v(i).fill&&v(n).fill&&e(l)});var u=h(c);let f;A(a),o((e,t)=>{s=_(a,``,s,{opacity:v(n).alpha??1}),j(u,`d`,v(i).line),f=_(u,``,f,{fill:`none`,stroke:e,"stroke-width":t,"stroke-dasharray":v(n).style===`interp`?`4 3`:`none`,"stroke-linejoin":`round`,"stroke-linecap":`round`})},[()=>R(v(n).tok),()=>I(v(n).w)]),d(e,a)},g=e=>{let t=N(()=>v(r));var n=gn();let i;p(n,21,()=>ce(v(t),v(T).width),F,(e,t)=>{var n=hn();o((e,r,i,a)=>{j(n,`x`,e),j(n,`y`,r),j(n,`width`,i),j(n,`height`,a),_(n,v(t).style)},[()=>I(v(t).x),()=>I(v(t).y),()=>I(v(t).w),()=>I(v(t).h)]),d(e,n)}),A(n),o(()=>i=_(n,``,i,{opacity:v(t).alpha??1})),d(e,n)},y=e=>{let n=N(()=>v(r)),a=N(()=>B(v(n).box,v(T).width));var s=f(),c=b(s),l=e=>{var t=_n();let r;var s=x(t),c=S(s),l=h(s);let u;A(t),o((e,a,o,d,f,p,m)=>{r=_(t,``,r,{opacity:v(n).alpha??1}),j(s,`id`,`${i}-map-${v(n).id??``}`),j(c,`x`,e),j(c,`y`,a),j(c,`width`,o),j(c,`height`,d),j(l,`d`,f),j(l,`clip-path`,`url(#${i}-map-${v(n).id??``})`),u=_(l,``,u,{fill:p,stroke:m,"stroke-width":`0.75`,"stroke-linejoin":`round`})},[()=>I(v(a).x),()=>I(v(a).y),()=>I(v(a).w),()=>I(v(a).h),()=>en(v(n),v(T).width,v(O)).join(` `),()=>R(v(n).land),()=>R(v(n).stroke)]),d(e,t)},u=e=>{var t=cn();let r;o((e,i,a,o,s,c)=>{j(t,`x`,e),j(t,`y`,i),j(t,`width`,a),j(t,`height`,o),r=_(t,``,r,{fill:s,stroke:c,"stroke-width":`0.75`,opacity:v(n).alpha??1})},[()=>I(v(a).x),()=>I(v(a).y),()=>I(v(a).w),()=>I(v(a).h),()=>R(v(n).land),()=>R(v(n).stroke)]),d(e,t)};t(c,e=>{v(O)&&v(O).length>0?e(l):e(u,-1)}),d(e,s)},C=e=>{let n=N(()=>v(r)),i=N(()=>le(v(n)));var a=gn();let s;p(a,21,()=>rn.icons[v(n).name]??[],F,(e,r)=>{var i=f(),a=b(i),s=e=>{var t=dn();let i;o((e,n,r,a,o)=>{j(t,`cx`,e),j(t,`cy`,n),j(t,`r`,r),i=_(t,``,i,{fill:a,stroke:o})},[()=>I(v(r).c[0]),()=>I(v(r).c[1]),()=>I(v(r).r),()=>v(r).fill?R(v(n).tok):`none`,()=>v(r).fill?`none`:R(v(n).tok)]),d(e,t)},c=e=>{var t=un();let i;o((e,n,r)=>{j(t,`points`,e),i=_(t,``,i,{fill:n,stroke:r})},[()=>ue(v(r).pts),()=>v(r).fill?R(v(n).tok):`none`,()=>v(r).fill?`none`:R(v(n).tok)]),d(e,t)},l=e=>{var t=vn();let i;o((e,n)=>{j(t,`points`,e),i=_(t,``,i,{fill:`none`,stroke:n})},[()=>ue(v(r).pts),()=>R(v(n).tok)]),d(e,t)};t(a,e=>{v(r).t===`circle`?e(s):v(r).closed?e(c,1):e(l,-1)}),d(e,i)}),A(a),o((e,t,r,i)=>{j(a,`transform`,`translate(${e??``},${t??``}) scale(${r??``})`),s=_(a,``,s,{fill:`none`,"stroke-width":i,"stroke-linecap":`round`,"stroke-linejoin":`round`,opacity:v(n).alpha??1})},[()=>I(L(v(n).x,v(T).width)-12*v(i)),()=>I(v(n).y-12*v(i)),()=>I(v(i)),()=>I(rn.stroke)]),d(e,a)};t(a,e=>{v(r).k===`rect`?e(s):v(r).k===`line`?e(c,1):v(r).k===`tri`?e(l,2):v(r).k===`dot`?e(u,3):v(r).k===`path`?e(m,4):v(r).k===`cells`?e(g,5):v(r).k===`basemap`?e(y,6):v(r).k===`icon`&&e(C,7)}),d(e,n)};t(s,e=>{v(r)&&e(c)}),d(e,a)}),A(c);var l=h(c,2);p(l,17,()=>v(T).ops,F,(e,n)=>{let r=N(()=>ae(v(n)));var i=f(),a=b(i),s=e=>{let t=N(()=>v(r)),n=N(()=>B(v(t).box,v(T).width));var i=yn();let a;o((e,n,r,o)=>a=_(i,``,a,{left:e,top:n,width:r,height:o,opacity:v(t).alpha??1}),[()=>`${I(v(n).x)??``}px`,()=>`${I(v(n).y)??``}px`,()=>`${I(v(n).w)??``}px`,()=>`${I(v(n).h)??``}px`]),d(e,i)};t(a,e=>{v(r)&&v(r).k===`image`&&e(s)}),d(e,i)});var u=h(l,2);p(u,17,()=>v(T).ops,F,(e,n)=>{var r=f(),i=b(r),a=e=>{var t=xn();let r;p(t,21,()=>v(n).lines,F,(e,t)=>{var n=bn(),r=S(n,!0);o(()=>P(r,v(t))),d(e,n)}),A(t),o((e,i,a,o,s,c,l)=>{j(t,`data-p`,v(n).id),j(t,`data-role`,v(n).role),j(t,`data-max-w`,e),j(t,`dir`,v(n).direction),r=_(t,``,r,{left:i,top:a,width:o,"font-size":s,"font-weight":v(n).wt,"line-height":c,color:l,"text-align":v(n).align,"font-variant-numeric":v(n).tnum?`tabular-nums`:`normal`,opacity:v(n).alpha}),t.dir=t.dir},[()=>I(v(n).width),()=>`${I(v(n).left)??``}px`,()=>`${I(v(n).top)??``}px`,()=>`${I(v(n).width)??``}px`,()=>`${I(v(n).px)??``}px`,()=>`${I(v(n).lh)??``}px`,()=>R(v(n).color)]),d(e,t)},s=N(()=>ie(v(n)));t(i,e=>{v(s)&&e(a)}),d(e,r)}),A(a),ee(a,e=>k(D,e),()=>v(D)),A(n),o((e,t,i,o,l,u,d,f)=>{r=_(n,``,r,{height:e}),j(a,`aria-label`,v(T).summary),j(a,`data-form`,v(m).clir.form),j(a,`data-span`,v(m).clir.span),s=_(a,``,s,{width:t,height:i,transform:o}),j(c,`width`,l),j(c,`height`,u),j(c,`viewBox`,`0 0 ${d??``} ${f??``}`)},[()=>`${I(v(T).height*v(w))??``}px`,()=>`${I(v(T).width)??``}px`,()=>`${I(v(T).height)??``}px`,()=>v(w)===1?null:`scale(${I(v(w))})`,()=>I(v(T).width),()=>I(v(T).height),()=>I(v(T).width),()=>I(v(T).height)]),re(n,`clientWidth`,e=>k(g,e)),d(e,n)};t(de,e=>{!v(m).ok||!v(T)?e(fe):e(W,-1)}),d(n,U),ne()}var wn=m(``),Tn=m(` `),$=m(``);function En(e,n){E(n,!0);let r=z(null),i=z(!1);l(()=>{let e=n.src,t=!0;return k(r,null),k(i,!1),V.niImageDataUrl(e).then(e=>{t&&k(r,e,!0)},()=>{t&&k(i,!0)}),()=>{t=!1}});var a=f(),s=b(a),c=e=>{var t=wn();o(()=>{j(t,`src`,v(r)),j(t,`alt`,n.alt)}),d(e,t)},u=e=>{var t=Tn(),r=S(t,!0);o(()=>P(r,n.alt)),d(e,t)},p=e=>{var t=$();o(()=>j(t,`aria-label`,n.alt)),d(e,t)};t(s,e=>{v(r)?e(c):v(i)?e(u,1):e(p,-1)}),d(e,a),ne()}var Dn=100,On=8,kn=2e3,An=500,jn=200,Mn=200,Nn=/^\/api\/ni\/items\/[A-Za-z0-9-]+\/image(\?v=[\w.:+-]*)?$/,Pn=[`title`,`label`,`value`,`caption`],Fn=[`default`,`muted`,`accent`,`ok`,`warn`,`danger`],In=[`sm`,`md`,`lg`],Ln=[``,`accent`,`ok`,`warn`,`danger`],Rn=[`v`,`h`],zn=[`sm`,`md`],Bn=[`plain`,`compact`,`percent`,`currency`],Vn=[`line`,`bars`],Hn=new Set([`when`,`on_tap`]);function Un(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wn(e){return console.assert(e.type===`text`,`checkText: type must be text`),console.assert(typeof e==`object`,`checkText: node must be an object`),typeof e.value==`string`?e.value.length>kn?`text.value exceeds 2000 chars`:Pn.includes(e.role)?Fn.includes(e.tone)?In.includes(e.size)?null:`text.size invalid`:`text.tone invalid`:`text.role invalid`:`text.value must be string`}function Gn(e){return console.assert(e.type===`number`,`checkNumber: type must be number`),console.assert(typeof e==`object`,`checkNumber: node must be an object`),typeof e.value!=`number`||!Number.isFinite(e.value)?`number.value must be finite`:Bn.includes(e.format)?Fn.includes(e.tone)?In.includes(e.size)?e.unit!==void 0&&typeof e.unit!=`string`?`number.unit must be string`:null:`number.size invalid`:`number.tone invalid`:`number.format invalid`}function Kn(e){return console.assert(e.type===`chip`,`checkChip: type must be chip`),console.assert(typeof e==`object`,`checkChip: node must be an object`),typeof e.value==`string`?e.value.length>kn?`chip.value exceeds 2000 chars`:Ln.includes(e.kind)?null:`chip.kind invalid`:`chip.value must be string`}function qn(e){return console.assert(e.type===`bar`,`checkBar: type must be bar`),console.assert(typeof e==`object`,`checkBar: node must be an object`),typeof e.value!=`number`||!Number.isFinite(e.value)?`bar.value must be finite`:typeof e.max!=`number`||!Number.isFinite(e.max)||e.max<=0?`bar.max must be > 0`:Fn.includes(e.tone)?null:`bar.tone invalid`}function Jn(e){return console.assert(e.type===`icon`,`checkIcon: type must be icon`),console.assert(typeof e==`object`,`checkIcon: node must be an object`),typeof e.name!=`string`||e.name.length===0?`icon.name must be non-empty string`:Fn.includes(e.tone)?null:`icon.tone invalid`}function Yn(e){console.assert(e.type===`spark`,`checkSpark: type must be spark`),console.assert(typeof e==`object`,`checkSpark: node must be an object`);let t=e.points;if(!Array.isArray(t))return`spark.points must be array`;if(t.length>An)return`spark.points exceeds 500`;for(let e of t)if(typeof e==`number`){if(!Number.isFinite(e))return`spark.points value must be finite`}else{if(!Un(e))return`spark.points entry must be number or {t, v}`;if(typeof e.v!=`number`||!Number.isFinite(e.v))return`spark.points.v must be finite`;if(e.t!==void 0&&typeof e.t!=`string`)return`spark.points.t must be string`}return Vn.includes(e.kind)?e.tone!==void 0&&!Fn.includes(e.tone)?`spark.tone invalid`:null:`spark.kind invalid`}function Xn(e){return console.assert(e.type===`image`,`checkImage: type must be image`),console.assert(typeof e==`object`,`checkImage: node must be an object`),typeof e.src==`string`?Nn.test(e.src)?typeof e.alt==`string`?e.alt.length>Mn?`image.alt exceeds 200 chars`:null:`image.alt must be string`:`image.src must be /api/ni/items//image`:`image.src must be string`}function Zn(e){if(console.assert(e.type===`gauge`,`checkGauge: type must be gauge`),console.assert(typeof e==`object`,`checkGauge: node must be an object`),typeof e.value!=`number`||!Number.isFinite(e.value))return`gauge.value must be finite`;if(typeof e.min!=`number`||!Number.isFinite(e.min))return`gauge.min must be finite`;if(typeof e.max!=`number`||!Number.isFinite(e.max))return`gauge.max must be finite`;if(e.max<=e.min)return`gauge.max must be > gauge.min`;if(e.tone!==void 0&&!Fn.includes(e.tone))return`gauge.tone invalid`;if(e.label!==void 0){if(typeof e.label!=`string`)return`gauge.label must be string`;if(e.label.length>jn)return`gauge.label exceeds 200 chars`}return null}function Qn(e){if(console.assert(typeof e==`object`&&!!e,`checkLeaf: object required`),console.assert(typeof e.type==`string`,`checkLeaf: type must be string`),`when`in e)return`when key must be stripped server-side`;let t=e.type;if(Hn.has(t))return`reserved type refused: ${t}`;if(t===`repeat`)return`repeat must be expanded server-side before rendering`;if(t===`divider`)return null;if(t===`text`)return Wn(e);if(t===`number`)return Gn(e);if(t===`chip`)return Kn(e);if(t===`bar`)return qn(e);if(t===`icon`)return Jn(e);if(t===`image`)return Xn(e);if(t===`spark`)return Yn(e);if(t===`gauge`)return Zn(e);if(t===`stack`)return Rn.includes(e.dir)?zn.includes(e.gap)?Array.isArray(e.children)?null:`stack.children must be array`:`stack.gap invalid`:`stack.dir invalid`;if(t===`grid`){let t=e.cols;return typeof t!=`number`||t<2||t>4||!Number.isInteger(t)?`grid.cols must be 2..4`:Array.isArray(e.children)?null:`grid.children must be array`}return`unknown node type: ${t}`}function $n(e){if(console.assert(e!==void 0,`validateBoundScene: root defined`),console.assert(arguments.length===1,`validateBoundScene: one arg`),!Un(e))return`scene must be an object`;let t=[{node:e,depth:1}],n=0;for(;t.length>0;){let e=t.pop();if(!e)break;let{node:r,depth:i}=e;if(n+=1,n>Dn)return`scene exceeds 100 nodes`;if(i>On)return`scene exceeds depth 8`;if(!Un(r))return`child must be an object`;let a=Qn(r);if(a)return a;let o=r.type===`stack`||r.type===`grid`?r.children:null;if(Array.isArray(o))for(let e of o){if(!Un(e))return`child must be an object`;t.push({node:e,depth:i+1})}}return null}var er=new Intl.NumberFormat(void 0,{notation:`compact`,maximumFractionDigits:1}),tr=new Intl.NumberFormat(void 0,{style:`percent`,maximumFractionDigits:1}),nr=new Intl.NumberFormat(void 0,{style:`currency`,currency:`USD`}),rr=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),ir=new Intl.NumberFormat(void 0,{maximumSignificantDigits:3});function ar(e,t,n){if(console.assert(typeof e==`number`,`formatNumber: value must be number`),console.assert(Bn.includes(t),`formatNumber: format in enum`),!Number.isFinite(e))return`—`;if(t===`percent`)return tr.format(e);if(t===`currency`)return nr.format(e);let r=t===`compact`?er.format(e):(e!==0&&Math.abs(e)<1?ir:rr).format(e),i=typeof n==`string`?n.trim():``;return i?`${r} ${i}`:r}var or=150,sr=240;function cr(e){return console.assert(e!=null,`extractV: point defined`),console.assert(typeof e==`number`||typeof e==`object`,`extractV: number or object`),typeof e==`number`?e:e.v}function lr(e){console.assert(Array.isArray(e),`seriesRange: array required`),console.assert(e.length>0,`seriesRange: non-empty`);let t=1/0,n=-1/0;for(let r of e){let e=cr(r);en&&(n=e)}return{vmin:t,vmax:n}}function ur(e,t,n){return console.assert(Number.isFinite(e),`normalized: v finite`),console.assert(n>=t,`normalized: max >= min`),n===t?.5:(e-t)/(n-t)}function dr(e,t,n){console.assert(Array.isArray(e),`sparkPath: array required`),console.assert(t>0&&n>0,`sparkPath: positive dims`);let r=e.length;if(r===0)return``;let{vmin:i,vmax:a}=lr(e),o=[],s=r===1?1:r-1;for(let c=0;c0&&n>0,`sparkBars: positive dims`);let r=e.length;if(r===0)return[];let{vmin:i,vmax:a}=lr(e),o=t/r,s=[];for(let t=0;t0,`polar: r > 0`),console.assert(Number.isFinite(t),`polar: degrees finite`);let n=t*Math.PI/180;return{x:e*Math.cos(n),y:e*Math.sin(n)}}function mr(e,t,n,r){console.assert(Number.isFinite(e),`gaugeArc: value finite`),console.assert(n>t,`gaugeArc: max > min`);let i=(Math.min(n,Math.max(t,e))-t)/(n-t),a=i*sr,o=pr(r,or),s=pr(r,or+a);if(i===0)return{d:`M ${o.x.toFixed(2)} ${o.y.toFixed(2)}`,pct:i};let c=+(a>180);return{d:`M ${o.x.toFixed(2)} ${o.y.toFixed(2)} A ${r} ${r} 0 ${c} 1 ${s.x.toFixed(2)} ${s.y.toFixed(2)}`,pct:i}}var hr=m(`unrenderable`),gr=m(`
          `),_r=m(`
          `),vr=m(`
          `),yr=m(` `),br=m(` `),xr=m(`
          `),Sr=m(``),Cr=m(`·`),wr=m(`—`),Tr=a(``),Er=a(``),Dr=a(``),Or=a(``),kr=m(`
          `),Ar=m(`
          `);function jr(e,n){E(n,!0);let r=N(()=>$n(n.node)),i={default:`var(--text)`,muted:`var(--muted)`,accent:`var(--accent)`,ok:`var(--ok)`,warn:`var(--warn)`,danger:`var(--danger)`},a={title:`font-size: var(--f-section); font-weight: 650`,label:`font-size: var(--f-label); color: var(--muted)`,value:`font-size: var(--f-h2); font-variant-numeric: tabular-nums`,caption:`font-size: var(--f-meta); color: var(--muted)`},s={sm:`var(--f-label)`,md:`var(--f-h2)`,lg:`var(--f-h1)`},c={sm:`var(--s-2)`,md:`var(--s-4)`};function l(e){return console.assert(typeof e==`string`,`toneStyle: tone is string`),console.assert(e in i,`toneStyle: tone in enum`),e==="default"?``:`color: ${i[e]}`}function m(e,t){console.assert(e in a,`textStyle: role in enum`),console.assert(t in i,`textStyle: tone in enum`);let n=a[e];return t==="default"?n:`${n}; color: ${i[t]}`}function g(e,t){return console.assert(typeof e==`number`,`barPct: value is number`),console.assert(typeof t==`number`&&t>0,`barPct: max > 0`),Math.min(100,Math.max(0,e/t*100))}let y=mr(1,0,1,40).d;function C(e){return console.assert(e===void 0||e in i,`sparkColor: tone in enum`),console.assert(typeof i==`object`,`sparkColor: TONE_VAR present`),i[e&&e!=="default"?e:`accent`]}function w(e,t,n){return console.assert(typeof e==`number`,`clampValue: v is number`),console.assert(n>t,`clampValue: hi > lo`),Math.min(n,Math.max(t,e))}var T=f(),D=b(T),k=e=>{var t=hr();o(()=>j(t,`title`,v(r))),d(e,t)},M=e=>{var t=gr();let r;p(t,21,()=>n.node.children,F,(e,t)=>{jr(e,{get node(){return v(t)}})}),A(t),o(()=>r=_(t,``,r,{"flex-direction":n.node.dir===`v`?`column`:`row`,gap:c[n.node.gap]})),d(e,t)},ee=e=>{var t=_r();let r;p(t,21,()=>n.node.children,F,(e,t)=>{jr(e,{get node(){return v(t)}})}),A(t),o(()=>r=_(t,``,r,{"grid-template-columns":`repeat(${n.node.cols}, minmax(0, 1fr))`})),d(e,t)},I=e=>{var t=vr();d(e,t)},te=e=>{var t=yr(),r=S(t,!0);o(e=>{_(t,e),P(r,n.node.value)},[()=>m(n.node.role,n.node.tone)]),d(e,t)},L=e=>{var t=br(),r=S(t,!0);o((e,n)=>{_(t,e),P(r,n)},[()=>`font-size: ${s[n.node.size]}; font-variant-numeric: tabular-nums; ${l(n.node.tone)}`,()=>ar(n.node.value,n.node.format,n.node.unit)]),d(e,t)},R=e=>{de(e,{get kind(){return n.node.kind},children:(e,t)=>{O();var r=u();o(()=>P(r,n.node.value)),d(e,r)},$$slots:{default:!0}})},z=e=>{var t=xr();j(t,`aria-valuemin`,0);var r=S(t);o((e,i)=>{j(t,`aria-valuenow`,e),j(t,`aria-valuemax`,n.node.max),_(r,i)},[()=>Math.min(n.node.max,Math.max(0,n.node.value)),()=>`width: ${g(n.node.value,n.node.max)}%; background: ${i[n.node.tone==="default"?`accent`:n.node.tone]}`]),d(e,t)},re=e=>{var r=f(),i=b(r),a=e=>{var t=Sr(),r=x(t);ce(r,{get name(){return n.node.name}}),A(t),o(e=>_(t,e),[()=>l(n.node.tone)]),d(e,t)},s=N(()=>Object.hasOwn(se,n.node.name)),c=e=>{var t=Cr();o(()=>j(t,`title`,`unknown icon: ${n.node.name}`)),d(e,t)};t(i,e=>{v(s)?e(a):e(c,-1)}),d(e,r)},ie=e=>{En(e,{get src(){return n.node.src},get alt(){return n.node.alt}})},ae=e=>{var r=f(),i=b(r),a=e=>{var t=wr();d(e,t)},s=e=>{var r=Dr();j(r,`viewBox`,`0 0 200 30`);var i=x(r),a=e=>{var t=Tr();o(e=>j(t,`points`,e),[()=>dr(n.node.points,200,30)]),d(e,t)},s=e=>{var t=f(),r=b(t);p(r,17,()=>fr(n.node.points,200,30),F,(e,t)=>{var n=Er();o(()=>{j(n,`x`,v(t).x),j(n,`y`,v(t).y),j(n,`width`,v(t).w),j(n,`height`,v(t).h)}),d(e,n)}),d(e,t)};t(i,e=>{n.node.kind===`line`?e(a):e(s,-1)}),A(r),o(e=>_(r,e),[()=>`color: ${C(n.node.tone)}`]),d(e,r)};t(i,e=>{n.node.points.length===0?e(a):e(s,-1)}),d(e,r)},B=e=>{var r=Ar(),i=x(r),a=x(i),s=h(a),c=e=>{var t=Or();o(e=>j(t,`d`,e),[()=>mr(n.node.value,n.node.min,n.node.max,40).d]),d(e,t)},l=N(()=>mr(n.node.value,n.node.min,n.node.max,40).pct>0);t(s,e=>{v(l)&&e(c)}),A(i);var u=h(i,2),f=S(u,!0),p=h(u,2),m=e=>{var t=kr(),r=S(t,!0);o(()=>P(r,n.node.label)),d(e,t)};t(p,e=>{n.node.label&&e(m)}),A(r),o((e,t,r)=>{j(i,`aria-label`,n.node.label??`gauge`),j(i,`aria-valuenow`,e),j(i,`aria-valuemin`,n.node.min),j(i,`aria-valuemax`,n.node.max),_(i,t),j(a,`d`,y),P(f,r)},[()=>w(n.node.value,n.node.min,n.node.max),()=>`color: ${C(n.node.tone)}`,()=>ar(n.node.value,`plain`)]),d(e,r)};t(D,e=>{v(r)?e(k):n.node.type===`stack`?e(M,1):n.node.type===`grid`?e(ee,2):n.node.type===`divider`?e(I,3):n.node.type===`text`?e(te,4):n.node.type===`number`?e(L,5):n.node.type===`chip`?e(R,6):n.node.type===`bar`?e(z,7):n.node.type===`icon`?e(re,8):n.node.type===`image`?e(ie,9):n.node.type===`spark`?e(ae,10):n.node.type===`gauge`&&e(B,11)}),d(e,T),ne()}var Mr=new Set([`downloading`,`verifying`,`unpacking`,`self-testing`]),Nr=12,Pr=5,Fr=`page browser is busy`,Ir=`The page browser is unavailable on this machine, so this card can't update here. This isn't a failure — Settings → Status shows why.`,Lr=`The page browser is busy — try again in a moment.`;function Rr(e){console.assert(e==null||typeof e==`object`,`browserWaitLabel: flow shape`);let t=e?.browser;if(!t||typeof t!=`object`||!Mr.has(t.phase))return``;let n=Number.isFinite(t.pct)?Math.min(100,Math.max(0,Math.round(t.pct))):0;return console.assert(n>=0&&n<=100,`browserWaitLabel: pct clamped`),`Preparing the page browser (${n}%)…`}function zr(e){console.assert(e==null||typeof e==`object`,`tapClause: flow shape`);let t=e?.tap;if(!t||typeof t!=`object`||t.render_notice!==!0)return``;let n=Number.isInteger(t.site_cap)&&t.site_cap>0?` (up to ${t.site_cap})`:``;return console.assert(n===``||n.startsWith(` (up to `),`tapClause: the cap reads as a parenthesis`),`If the page needs SmartBrain's page browser, that one visit may also load the sites it depends on${n}.`}function Br(e){console.assert(typeof e.id==`string`,`renderDraftSites: a board row`);let t=e.draft;if(!t||t.reason!==`render_sites`||!Array.isArray(t.sites))return null;let n=[];for(let e of t.sites.slice(1,13))typeof e==`string`&&e.trim()!==``&&!n.includes(e)&&n.push(e);return console.assert(n.length<=Nr,`renderDraftSites: capped`),n.length>0?n:null}function Vr(e){console.assert(Number.isInteger(e),`alsoLoadsLine: a whole count`);let t=Math.max(0,Math.trunc(e));return console.assert(t>=0,`alsoLoadsLine: never negative`),`This page also loads ${t} other site${t===1?``:`s`}`}function Hr(e){console.assert(typeof e.id==`string`,`renderNotice: a board row`);let t=e.rendered===!0&&e.render?.unavailable===!0;return console.assert(typeof t==`boolean`,`renderNotice: a verdict`),t?Ir:``}function Ur(e){console.assert(typeof e.id==`string`,`feedCandidates: a board row`);let t=e.preview?.feed_candidates;if(!Array.isArray(t))return[];let n=[];for(let e of t.slice(0,Pr))e&&typeof e.url==`string`&&e.url.startsWith(`https://`)&&typeof e.site==`string`&&!n.some(t=>t.url===e.url)&&n.push({url:e.url,site:e.site});return console.assert(n.length<=Pr,`feedCandidates: capped`),n}var Wr={render_busy:`busy`,render_unavailable:`unavailable`};function Gr(e){console.assert(e.length>0,`capacityOfCode: a code`);let t=Object.hasOwn(Wr,e)?Wr[e]:``;return console.assert(t===``||t===`busy`||t===`unavailable`,`capacityOfCode: closed answer`),t}function Kr(e){if(console.assert(!0,`errorCapacity: the fallback sentence`),!(e instanceof Error))return``;let{status:t,code:n}=e,r=typeof n==`string`&&n!==``?Gr(n):t===409&&e.message.includes(Fr)?`busy`:``;return console.assert(r===``||r===`busy`||r===`unavailable`,`errorCapacity: closed answer`),r}function qr(e){if(console.assert(e==null||typeof e==`object`,`replyCapacity: reply shape`),!e)return``;let t=e.code,n=typeof t==`string`&&t!==``?Gr(t):e.run===`busy`?`busy`:e.kind===`render_unavailable`?`unavailable`:``;return console.assert(n===``||n===`busy`||n===`unavailable`,`replyCapacity: closed answer`),n}function Jr(e){console.assert(e===``||e===`busy`||e===`unavailable`,`capacityNote: closed input`);let t=e===`busy`?Lr:e===`unavailable`?Ir:``;return console.assert(t!==``||e===``,`capacityNote: every answer has its note`),t}function Yr(e){console.assert(e===``||e===`busy`||e===`unavailable`,`confirmedNote: closed input`);let t=e===`busy`?`Confirmed — the page browser is busy, so the card checks its data on its next update.`:e===`unavailable`?`Confirmed — the page browser is unavailable on this machine, so the card can't check its data yet. Settings → Status shows why.`:``;return console.assert(t!==``||e===``,`confirmedNote: every answer has its note`),t}var Xr=m(`
        • `),Zr=m(`

          `),Qr=m(`

            Activate is your OK for every update of this card to load exactly these sites.

            `);function $r(e,n){E(n,!0);let r=C(n,`busy`,3,!1),i=C(n,`error`,3,``);var a=Qr(),s=x(a),c=S(s),l=h(s,2);p(l,20,()=>n.sites,e=>e,(e,t)=>{var n=Xr(),r=S(n,!0);o(()=>P(r,t)),d(e,n)}),A(l);var u=h(l,4),f=x(u),m=S(f,!0);A(u);var g=h(u,2),_=e=>{var t=Zr(),n=S(t,!0);o(()=>P(n,i())),d(e,t)};t(g,e=>{i()&&e(_)}),A(a),o(e=>{P(c,`${e??``}:`),f.disabled=r(),P(m,r()?`Activating…`:`Activate`)},[()=>Vr(n.sites.length)]),B(`click`,f,function(...e){n.onActivate?.apply(this,e)}),d(e,a),ne()}g([`click`]);var ei={no:`May not answer your question`,partly:`May not fully answer your question`},ti={no:`This card may not answer your question.`,partly:`This card may not fully answer your question.`};function ni(e){if(console.assert(!0,`readFit: a positive label cap`),!e||typeof e!=`object`||Array.isArray(e))return null;let{verdict:t,missing:n}=e;if(t!==`no`&&t!==`partly`||!Array.isArray(n))return null;let r=n.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>e.trim()).slice(0,3);return console.assert(r.length<=3,`readFit: at most FIT_MAX_MISSING labels`),{verdict:t,missing:r}}function ri(e){let t=ni(e);if(!t)return null;let n=t.missing.length>0?`Missing: ${t.missing.join(`, `)}`:null;return console.assert(ei[t.verdict].length>0,`fitText: a chip for every verdict`),console.assert(n===null||n.startsWith(`Missing: `),`fitText: the detail names what is missing`),{chip:ei[t.verdict],detail:n}}function ii(e){let t=ni(e);if(!t)return``;let n=t.missing.length>0?` It lacks: ${t.missing.join(`, `)}.`:``;return console.assert(ti[t.verdict].endsWith(`.`),`fitLine: a whole sentence for every verdict`),console.assert(n===``||n.endsWith(`.`),`fitLine: the lacks clause is a sentence`),`${ti[t.verdict]}${n}`}function ai(e){return console.assert(e===void 0||typeof e==`object`,`asClirFaces: shape is object|undefined`),!e||typeof e!=`object`||e.desktop===void 0&&e.phone===void 0?null:{desktop:e.desktop,phone:e.phone}}function oi(e){if(console.assert(e!==void 0,`verifyOptions: payload defined`),console.assert(!Array.isArray(e),`verifyOptions: payload is the board's one bound node, not a list`),!e||typeof e!=`object`)return[];let t=e,n=t.type===`form`?ai(t.clir):null;if(!n)return[];let r={id:`pick`,clir:n,summary:typeof t.summary==`string`?t.summary:``,why:``},i=(Array.isArray(t.alternatives)?t.alternatives.slice(0,1):[])[0],a=i?ai(i.clir):null;if(!i||!a)return[r];let o=typeof i.summary==`string`?i.summary:``;return[r,{id:`second`,clir:a,summary:o,why:o?`Shown differently: ${o}`:`A different design of the same data.`}]}var si=[[`answer`,`answer`],[`select`,`quantity`],[`where`,`filter`],[`time`,`time`],[`order`,`order`],[`limit`,`limit`],[`agg`,`count`]];function ci(e){if(console.assert(si.length>0,`coverageChips: the closed clause table`),console.assert(!Array.isArray(e),`coverageChips: coverage is a clause map, not a list`),!e||typeof e!=`object`)return[];let t=e,n=[];for(let[e,r]of si){let i=t[e];i===`approximated`?n.push(`${r} approximated`):i===`unbound`&&n.push(`${r} not found`)}return console.assert(n.length<=si.length,`coverageChips: at most one chip per clause`),n}function li(e){console.assert(e==null||typeof e==`object`,`optionMaxWidth: clir is an object or null`);let t=e&&typeof e==`object`?e.span:void 0,n=typeof t==`string`?/^([dp])([1-4])x([1-3])$/.exec(t):null;return console.assert(n===null||n[1]===`d`||n[1]===`p`,`optionMaxWidth: device is d or p`),n?n[1]===`p`?n[2]===`1`?`160px`:`398px`:n[2]===`1`?`calc(50% - var(--s-2))`:null:null}var ui=m(`
            `),di=m(`

            `),fi=m(`

            `),pi=m(``),mi=m(`

            Reads as

            `),hi=m(``),gi=m(`
            `),_i=m(`

            This is live data — is it right?

            `);function vi(e,n){E(n,!0);let r=C(n,`busy`,3,!1),i=C(n,`interpretation`,3,``),a=C(n,`coverage`,3,void 0),s=C(n,`fit`,3,null),c=N(()=>oi(n.payload)),l=N(()=>v(c).find(e=>e.id===`pick`)??null),f=N(()=>v(c).find(e=>e.id===`second`)??null),m=N(()=>ci(a())),g=N(()=>ii(s())),y=z(`desktop`);R(()=>{k(y,window.matchMedia?.(`(max-width: 560px)`)?.matches?`phone`:`desktop`,!0)});function b(){console.assert(v(y)===`desktop`||v(y)===`phone`,`toggleFace: known face before flip`);let e=v(y)===`desktop`?`phone`:`desktop`;console.assert(e!==v(y),`toggleFace: flips to the other face`),k(y,e,!0)}function w(e){return console.assert(e.id===`pick`||e.id===`second`,`faceOf: known option id`),console.assert(v(y)===`desktop`||v(y)===`phone`,`faceOf: known face`),v(y)===`phone`?e.clir.phone:e.clir.desktop}function T(){console.assert(typeof document<`u`,`isLightNow: DOM available`);let e=document.documentElement.dataset.theme;return e===`light`||e!==`dark`&&(typeof window>`u`?null:window.matchMedia?.(`(prefers-color-scheme: light)`))?.matches===!0}let D=z(!1),j,M=!1;R(()=>{k(D,T(),!0)});function F(){console.assert(typeof v(D)==`boolean`,`toggleTheme: light is boolean`),console.assert(typeof document<`u`,`toggleTheme: DOM available`),M||=(j=document.documentElement.dataset.theme,!0),k(D,!v(D)),document.documentElement.dataset.theme=v(D)?`light`:`dark`}te(()=>{M&&typeof document<`u`&&(j===void 0?document.documentElement.removeAttribute(`data-theme`):document.documentElement.dataset.theme=j)});var ee=_i(),I=h(x(ee),2),L=x(I),re=S(L,!0),ie=h(L,2),ae=S(ie,!0);A(I);var oe=h(I,2),V=e=>{let t=N(()=>w(v(l)));var r=ui();let i;Cn(x(r),{get clir(){return v(t)},get viewerTz(){return n.viewerTz}}),A(r),o(e=>i=_(r,``,i,{"max-width":e}),[()=>li(v(t))]),d(e,r)};t(oe,e=>{v(l)&&e(V)});var H=h(oe,2),se=e=>{let t=N(()=>w(v(f)));var r=di();let i;var a=x(r),s=S(a,!0);Cn(h(a,2),{get clir(){return v(t)},get viewerTz(){return n.viewerTz}}),A(r),o(e=>{i=_(r,``,i,{"max-width":e}),P(s,v(f).why)},[()=>li(v(t))]),d(e,r)};t(H,e=>{v(f)&&e(se)});var ce=h(H,2),le=e=>{var t=fi(),n=S(t,!0);o(()=>P(n,v(g))),d(e,t)};t(ce,e=>{v(g)&&e(le)});var ue=h(ce,2),U=e=>{var n=mi(),r=h(x(n),2),a=S(r,!0),s=h(r,2),c=e=>{var t=pi();p(t,20,()=>v(m),e=>e,(e,t)=>{de(e,{children:(e,n)=>{O();var r=u();o(()=>P(r,t)),d(e,r)},$$slots:{default:!0}})}),A(t),d(e,t)};t(s,e=>{v(m).length>0&&e(c)}),A(n),o(()=>P(a,i())),d(e,n)};t(ue,e=>{i()&&e(U)});var fe=h(ue,2),W=e=>{var i=gi(),a=x(i),s=S(a,!0),c=h(a,2),l=e=>{var t=hi();o(()=>t.disabled=r()),B(`click`,t,()=>n.onUse(`second`)),d(e,t)};t(c,e=>{v(f)&&e(l)});var u=h(c,2);A(i),o(()=>{a.disabled=r(),P(s,r()?`Checking…`:`Use this`),u.disabled=r()}),B(`click`,a,()=>n.onUse(`pick`)),B(`click`,u,function(...e){n.onWrong?.apply(this,e)}),d(e,i)};t(fe,e=>{v(l)&&e(W)}),A(ee),o(()=>{L.disabled=r(),P(re,v(y)===`desktop`?`Desktop`:`Phone`),ie.disabled=r(),P(ae,v(D)?`Light`:`Dark`)}),B(`click`,L,b),B(`click`,ie,F),d(e,ee),ne()}g([`click`]);var yi={extract_miss:`couldn't find the expected data`,fetch_failed:`couldn't reach the source`,image_type:`not a supported image`,llm_requires_local:`needs a local model`,mcp_unavailable:`your MCP server didn't answer`,secret_missing:`credential problem`,secret_host_mismatch:`credential problem`,render_refused:`the page browser wouldn't open this address`,render_timeout:`the page took too long in the page browser`,render_blocked:`the site turned the page browser away`,render_offsite:`the page moved to a site this card doesn't allow`,render_confinement:`the page browser's safety checks stopped the read`,render_oversize:`the page was too big for the page browser`,render_engine:`the page browser couldn't read the page`};function bi(e){console.assert(e==null||typeof e==`string`,`friendlyErrorClass: cls is string|null|undefined`),console.assert(typeof yi==`object`,`friendlyErrorClass: map present`);let t=typeof e==`string`?e.trim():``;return t?yi[t]??t:``}function xi(e){if(console.assert(e==null||typeof e==`object`,`flowStageLabel: flow is object|null|undefined`),console.assert(e==null||typeof e.state==`string`,`flowStageLabel: state is string when flow present`),!e)return``;let t=e.state;return(t===`failed`||t===`unsupported`?``:Rr(e))||(t===`intent`?`Understanding your request…`:t===`source`?e.error===`awaiting_pick`?`Waiting for you to pick a source on the card`:`Finding the source…`:t===`awaiting_access`?`Needs your key or contact email`:t===`sampling`?`Reading a sample…`:t===`mapping`?`Choosing the data fields…`:t===`assembling`?`Building the card…`:t===`awaiting_credential`?`Needs your API key`:t===`awaiting_params`?`Needs a detail from you`:t===`ready`?`Building the card…`:``)}function Si(e){return console.assert(e==null||typeof e==`object`,`isFlowActive: flow is object|null|undefined`),console.assert(e==null||typeof e.state==`string`,`isFlowActive: state is string when flow present`),e?e.state!==`failed`&&e.state!==`unsupported`:!1}function Ci(e){console.assert(typeof e==`object`&&!!e,`awaitingYesSource: a is object`),console.assert(typeof e.host==`string`&&typeof e.title==`string`,`awaitingYesSource: strings`);let t=e.from===`page`?`web page`:`dataset`,n=e.host.trim(),r=e.title.trim(),i=r!==``&&r.toLowerCase()!==n.toLowerCase();return n?i?`From the ${t} ${n} — ${r}`:`From the ${t} at ${n}`:i?`From the ${t} “${r}”`:`From a ${t}`}function wi(e){console.assert(e===void 0||Array.isArray(e),`pickRows: array or undefined`);let t=e??[],n=new Set,r=e=>!n.has(e.url)&&(n.add(e.url),!0),i=t.filter(e=>e.kind===`library`&&r(e)),a=t.filter(e=>e.kind===`link`&&/^https:\/\//.test(e.url)&&r(e));return{sources:i,links:a,heading:i.length>0?`From the SmartBrain Library — tap the one that fits:`:a.length>0?`No SmartBrain Library source answers this yet.`:`No SmartBrain Library source answers this yet — paste a link to the data:`}}function Ti(e){console.assert(typeof e.host==`string`,`linkWhat: host is string`);let t=e.found===`dataset`?`dataset`:`web page`;return e.host.trim()?`${e.host.trim()} · ${t}`:t}function Ei(e,t,n){console.assert(Array.isArray(e),`filterTemplates: templates is array`),console.assert(typeof t==`string`,`filterTemplates: query is string`);let r=t.trim().toLowerCase(),i=n.trim();return!r&&!i?e:e.filter(e=>{if(i&&e.category!==i)return!1;if(!r||e.title.toLowerCase().includes(r)||e.goal.toLowerCase().includes(r)||e.category.toLowerCase().includes(r))return!0;for(let t of e.tags)if(t.toLowerCase().includes(r))return!0;return!1})}function Di(e){console.assert(Array.isArray(e),`templateCategories: templates is array`),console.assert(e.every(e=>typeof e==`object`),`templateCategories: entries are objects`);let t=new Set;for(let n of e){let e=n.category?.trim();e&&t.add(e)}return[...t].sort((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase()))}function Oi(e,t){console.assert(Array.isArray(e),`validateParamForm: params is array`),console.assert(typeof t==`object`&&!!t,`validateParamForm: values is object`);for(let n of e){if(n.kind===`secret`)continue;let e=t[n.name],r=typeof e==`string`?e.trim():``;if(r.length===0)return{name:n.name,message:`${n.label} is required.`};if(n.kind===`number`&&!Number.isFinite(Number(r)))return{name:n.name,message:`${n.label} must be a number.`}}return null}function ki(e,t){console.assert(Array.isArray(e),`paramValuesForInstall: params is array`),console.assert(typeof t==`object`&&!!t,`paramValuesForInstall: values is object`);let n={};for(let r of e){if(r.kind===`secret`)continue;let e=t[r.name],i=typeof e==`string`?e.trim():``;i.length!==0&&(n[r.name]=r.kind===`number`?Number(i):i)}return n}function Ai(e){console.assert(e==null||typeof e==`string`,`formatFingerprint: fp is string|null|undefined`),console.assert(!0,`formatFingerprint: total`);let t=typeof e==`string`?e.trim():``;return t?`Publisher ${t}`:`Unknown publisher`}function ji(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Mi(e){console.assert(e==null||typeof e==`object`,`stagesFromSpec: spec is object|null|undefined`),console.assert(!Array.isArray(e),`stagesFromSpec: spec is not an array`);let t={extract:null,transform:null};if(!ji(e))return t;let n=e.pipeline;if(!Array.isArray(n))return t;for(let e of n)ji(e)&&(e.op===`extract`&&ji(e.paths)?t.extract===null&&(t.extract=e.paths):e.op===`transform`&&Array.isArray(e.apply)&&t.transform===null&&(t.transform=e.apply));return t}function Ni(e){if(console.assert(e===null||typeof e==`object`||e===void 0,`formatStageJson: value is object|null|undefined`),console.assert(!0,`formatStageJson: total`),e==null)return`(none)`;try{return JSON.stringify(e,null,2)}catch{return`(unserializable)`}}var Pi=m(`

            `),Fi=m(``),Ii=m(` `,1),Li=m(`
            `),Ri=m(`
            Needs your
            `),zi=m(`
            `),Bi=m(`
            Needs
            `),Vi=m(`

            Creation didn’t finish. Delete this card, or start again above.

            `),Hi=m(`
            `),Ui=m(`

            Is this what you asked for?

            `),Wi=m(`

            Confirmed — verifying, this card goes live after the next successful refresh.

            `),Gi=m(`

            This is live data — is it right?

            `),Ki=m(` `,1),qi=m(` `,1),Ji=m(``),Yi=m(`
            ⋯
            `),Xi=m(`
            `),Zi=m(`

            `),Qi=m(``),$i=m(`
            `,1),ea=m(`
            `,1),ta=m(` `,1),na=m(``),ra=m(``),ia=m(`
            `),aa=m(`

            `),oa=m(`

            `,1),sa=m(`

            Finding a source for this…

            `),ca=m(`

            `),la=m(`

            Needs your own free key — you'll paste it next

            `),ua=m(`

            Asks for your contact email once

            `),da=m(`
            `),fa=m(`
            `),pa=m(`
          • `),ma=m(` `,1),ha=m(`

            `),ga=m(`

            `),_a=m(`Get one here, then paste it below.`,1),va=m(`

            `,1),ya=m(`

            `,1),ba=m(`

            `),xa=m(`
            `),Sa=m(`

            First run failed —

            `),Ca=m(`

            Waiting for the first run…

            `),wa=m(` `,1),Ta=m(`
            `),Ea=m(`

            `),Da=m(` `,1),Oa=m(` `,1),ka=m(` `,1),Aa=m(`

            Couldn’t load this proposal.

            `),ja=m(`

            Current mapping

            extract

             

            transform

             

            Proposed mapping

            extract

             

            transform

             
            `),Ma=m(`

            `),B=l(`

            `),V=l(`
            `);function H(e,n){let r=g(n,`hint`,3,``),o=g(n,`error`,3,``);var c=V(),l=m(c),d=m(l),f=h(d,!0),p=u(d,2);i(p,()=>n.children??O),S(l);var _=u(l,2),v=e=>{var t=z(),n=h(t,!0);a(()=>E(n,o())),s(e,t)},y=e=>{var t=B(),n=h(t,!0);a(()=>E(n,r())),s(e,t)};t(_,e=>{o()?e(v):r()&&e(y,1)}),S(c),a(()=>E(f,n.label)),s(e,c)}var se=[{id:``,label:`All`},{id:`curated`,label:`Curated`},{id:`harvested`,label:`Harvested`},{id:`local`,label:`Mine`}],U={http_json:`JSON`,http_csv:`CSV`,http_xml:`XML`,rss:`RSS feed`,atom:`Atom feed`,gtfs:`Transit schedule (GTFS)`,gtfs_rt:`Transit realtime (GTFS-RT)`,gbfs:`Bike share (GBFS)`,ics:`Calendar (ICS)`,html:`Web page`,image:`Image`,text:`Text`},W={official:`Official`,primary:`Primary`,aggregator:`Aggregator`,community:`Community`},G={curated:`Curated`,provider_trusted:`Provider-trusted`,harvested:`Harvested`,local:`Yours`};function ce(e,t){return console.assert(typeof e==`string`,`statusLabel: status is string`),console.assert(typeof t==`string`,`statusLabel: auth is string`),e===`ok`?`Works`:e===`degraded`?`Degraded`:e===`failed`||e===`refused`?`Not working`:t===`none`?`Unchecked`:`Needs a key`}function le(e,t){return console.assert(typeof e==`string`,`statusChipKind: status is string`),console.assert(typeof t==`string`,`statusChipKind: auth is string`),e===`ok`?`ok`:e===`degraded`?`warn`:e===`failed`||e===`refused`?`danger`:``}function ue(e){return console.assert(typeof e==`string`,`authorityLabel: input is string`),console.assert(e in W,`authorityLabel: known enum`),W[e]??`Unknown`}function de(e){return console.assert(typeof e==`string`,`tierLabel: input is string`),console.assert(e in G,`tierLabel: known enum`),G[e]??e}function fe(e){return console.assert(typeof e==`string`,`accessKindLabel: input is string`),console.assert(e in U,`accessKindLabel: known enum`),U[e]??e}function pe(){console.assert(typeof U==`object`,`accessKindOptions: labels present`);let e=Object.keys(U);return console.assert(e.length>0,`accessKindOptions: at least one kind`),e.map(e=>({id:e,label:U[e]}))}var K={public_domain:`Public domain`,open_license:`Open license`,terms_allow:`Terms allow use`,unverified:`Terms not confirmed`};function me(e){return console.assert(typeof e==`string`,`termsLabel: input is string`),console.assert(!0,`termsLabel: total`),K[e]??e}function he(e,t){console.assert(typeof e==`string`,`labelCategory: id is string`),console.assert(Array.isArray(t),`labelCategory: tax is array`);let[n,r]=e.split(`/`),i=t.find(e=>e.id===n);if(!i)return e;let a=r?i.subcategories.find(e=>e.id===r):null;return r&&a?`${i.label} › ${a.label}`:i.label}function ge(e){console.assert(typeof e==`object`,`buildSearchQuery: opts is object`),console.assert(e.limit>0,`buildSearchQuery: limit is positive`);let t={offset:e.offset,limit:e.limit},n=e.q.trim();return n&&(t.q=n),e.category&&(t.category=e.category),e.subcategory&&(t.subcategory=e.subcategory),e.tier&&(t.tier=e.tier),t}function q(e){return console.assert(e==null||typeof e==`number`,`formatCount: number|null|undefined`),console.assert(!0,`formatCount: total`),typeof e!=`number`||!Number.isFinite(e)||e<0?`0`:Math.floor(e).toLocaleString(`en-US`)}function _e(e){console.assert(typeof e==`object`,`validateLocalForm: input is object`),console.assert(typeof e.name==`string`,`validateLocalForm: name is string`);let t=e.name.trim();if(t.length<2||t.length>120)return{field:`name`,message:`Give the source a name (2–120 characters).`};let n=e.url.trim();if(!n.startsWith(`https://`)||n.length>2e3)return{field:`url`,message:`The address must start with https://`};if(e.description.trim().length>600)return{field:`description`,message:`Keep the description under 600 characters.`};let r=e.category.trim();return!r||!r.includes(`/`)?{field:`category`,message:`Choose a category.`}:null}function ve(e,t){console.assert(typeof e==`object`,`rowCategoryPhrase: row is object`),console.assert(Array.isArray(t),`rowCategoryPhrase: tax is array`);let n=Array.isArray(e.categories)?e.categories:[];return n.length===0?``:n.slice(0,2).map(e=>he(e,t)).join(` · `)}var J={realtime:`Live`,minutes:`Every few minutes`,hourly:`Hourly`,daily:`Daily`,weekly:`Weekly`,monthly:`Monthly`,quarterly:`Every quarter`,annual:`Yearly`,irregular:`Whenever the provider publishes`,static:`Rarely changes`};function ye(e){console.assert(e==null||typeof e==`string`,`cadenceLabel: cadence is a string or empty`);let t=J[(e||`irregular`).trim()]??J.irregular;return console.assert(t.length>0,`cadenceLabel: never empty`),t}function be(e,t){if(console.assert(e==null||typeof e==`string`,`checkedOnLabel: iso is a string`),!e)return``;let n=Date.parse(e);if(Number.isNaN(n))return``;let r=new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`,year:`numeric`}).format(n);return console.assert(r.length>0,`checkedOnLabel: formatted date is non-empty`),r}var xe=l(`

            `),Se=l(``),Ce=l(`

            `),we=l(``),Te=l(`

            Browse the SmartBrain Library

            About 18 MB. Takes a few seconds on a normal connection.

            `),Ee=l(``),De=l(`
            `),Oe=l(`
            `),ke=l(``),Ae=l(` `),je=l(`
          • `),Me=l(`

            Your sources

              `,1),Ne=l(`

              Library

              `),Pe=l(`

              `),Fe=l(`
                `,1),Ie=l(` `,1),Le=l(`
                `),Re=l(`

                Library

                `,1),ze=l(`

                `),Be=l(` `),Ve=l(` `,1),He=l(`
                What it answers
                `,1),Ue=l(`· e.g. `,1),We=l(`
              • `),Ge=l(`
                Parameters
                  `,1),Ke=l(` · Read terms`,1),qe=l(`
                • `),Je=l(`
                  Example asks
                    `,1),Ye=l(``),Xe=l(`

                    Provider
                    Address
                    Needs a key
                    Data format
                    Terms
                    How often it updates
                    Last check
                    `,1),Ze=l(`

                    `,1),Qe=l(``),$e=l(``),et=l(``),tt=l(``),nt=l(``),rt=l(``),it=l(``),at=l(`

                    `),ot=l(`

                    Add a source