@deepseek-insight/dsi 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -1
- package/bin/dsi-chassis.mjs +371 -0
- package/bin/dsi.mjs +22 -5
- package/build/client/_app/immutable/chunks/CgYTrsc7.js +2 -0
- package/build/client/_app/immutable/chunks/DAVs74W8.js +1 -0
- package/build/client/_app/immutable/chunks/{e-3PBXxJ.js → DxK-AwFF.js} +1 -1
- package/build/client/_app/immutable/chunks/EyZgnsOk.js +1 -0
- package/build/client/_app/immutable/entry/{app.ezxtVZch.js → app.BrbZICAs.js} +2 -2
- package/build/client/_app/immutable/entry/start.D0ra5p5U.js +1 -0
- package/build/client/_app/immutable/nodes/{1.CGppLUrN.js → 1.BpeytF2X.js} +1 -1
- package/build/client/_app/immutable/nodes/{2.9BE7-E5x.js → 2.BeOldRUA.js} +3 -3
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{internal2.js-Cu5N8_4R.js → internal2.js-BmeTE2qk.js} +2 -2
- package/build/server/chunks/chunks/{registry.js-Bwc2MNSZ.js → registry.js-Cnmd1vW3.js} +194 -19
- package/build/server/chunks/chunks/{state.js-CRPhnJJH.js → state.js-D-A2xekV.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/{_server.ts.js-BxfB-QXT.js → _server.ts.js-DlbbO3RF.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-DT6rU-EU.js → _server.ts.js-B85bLw4w.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/{_server.ts.js-Cwu4C98Y.js → _server.ts.js-Dt5Bxv2-.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/element/{_server.ts.js-B55tx3-S.js → _server.ts.js-uJ5BnGUA.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/history/{_server.ts.js-D2ft7u0s.js → _server.ts.js-CVCoWk2n.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-BO1uO6i3.js → _server.ts.js-CmhQ7zGO.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-zOccgfJZ.js → _server.ts.js-CFtpmSCd.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-DgyR0sLf.js → _server.ts.js-BH8MNt9W.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/{_server.ts.js-CPCIL2MG.js → _server.ts.js-uIrK0T8h.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js-Cjvr5nEt.js → _server.ts.js-Bg5yHS9F.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-Bb3DkB-H.js → _server.ts.js-DG6xvUsm.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/{_server.ts.js-DVcq1pYf.js → _server.ts.js-RiXP45mV.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-D1xgkwTO.js → _server.ts.js-w9MNQddQ.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/zoom/{_server.ts.js-DFo94fTq.js → _server.ts.js-BoXDoshV.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-0Gye8oLN.js → _server.ts.js-pQmJm_Io.js} +2 -2
- package/build/server/chunks/entries/pages/{_error.svelte.js-CJ9RHd_3.js → _error.svelte.js-CL7qPUQ1.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.svelte.js-DlLAziUY.js → _page.svelte.js-nXReJwZQ.js} +4 -4
- package/build/server/chunks/{handler-BRlzTcii.js → handler-DiVCAgmr.js} +3 -3
- package/build/server/chunks/{index.js-D2umW-Cg.js → index.js-DW6Zd84U.js} +2 -2
- package/build/server/chunks/{manifest.js-CaT4HRXz.js → manifest.js-DXLiUOif.js} +19 -19
- package/build/server/chunks/nodes/1.js-BX_MW_nG.js +9 -0
- package/build/server/chunks/nodes/{2.js-CF_m1q-z.js → 2.js-darOh5z6.js} +3 -3
- package/package.json +1 -1
- package/skills/dsi-host-drive/SKILL.md +96 -0
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/build/client/_app/immutable/chunks/Dj8AK3pr.js +0 -1
- package/build/client/_app/immutable/chunks/UPlr67N1.js +0 -2
- package/build/client/_app/immutable/chunks/WySTHi46.js +0 -1
- package/build/client/_app/immutable/entry/start.DdPLwPDt.js +0 -1
- package/build/server/chunks/nodes/1.js-cXTCbvze.js +0 -9
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ One "floor" is a pair: **DSH** (the harness host) and **DSI** (the page you watc
|
|
|
82
82
|
| DSH host | `3080` | `--port <n>` or `DSH_PORT=<n>` env var (flag wins) | the harness brain of the floor |
|
|
83
83
|
| DSI page | `5174` | `DSI_PORT=<n>` env var | the page you open in the browser |
|
|
84
84
|
| Browser brain | `9515` | `GLASS_PORT=<n>` env var | the MCP endpoint agents use to drive the glass browser |
|
|
85
|
+
| Glass chassis | *(this machine)* | `GLASS_CHASSIS_URL=<url>` env var | where Shift+click births its visible window — unset means right here |
|
|
85
86
|
|
|
86
87
|
**The browser brain.** By default the glass browser's assistant (the MCP brain that lets an agent click and type in the browser) runs as its **own separate helper process** — if it fails, you lose only the glass panel. Adding `--playwright-mcp` moves that brain **inside the DSI page server**: one less background process and a faster start, but a brain failure can now touch the page server itself. DSI prints a banner saying so whenever you use the flag — drop the flag to go back to the helper process.
|
|
87
88
|
|
|
@@ -92,7 +93,50 @@ DSI_PORT=5176 DSH_PORT=3081 GLASS_PORT=19515 npx @deepseek-insight/dsi@latest ds
|
|
|
92
93
|
# Page: http://localhost:5176 · host: 3081 · brain: http://127.0.0.1:19515/sse
|
|
93
94
|
```
|
|
94
95
|
|
|
95
|
-
**
|
|
96
|
+
**DSI in a VM, Glass on the host.** Run DSI/DSH inside OrbStack (or any VM) while
|
|
97
|
+
the Glass brain stays on your Mac — that is where the headed glass can be seen
|
|
98
|
+
(Shift+Click opens a visible Playwright window, and only the host display can
|
|
99
|
+
show one). The VM floor boots **brain-less** (no brain flag — never spawn a
|
|
100
|
+
second, invisible brain) and exports `GLASS_BRAIN_URL` pointing at the host;
|
|
101
|
+
OrbStack exposes the Mac to its VMs at `host.internal`:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# inside the VM — floor lives here, brain dials the host
|
|
105
|
+
DSI_PORT=5171 DSH_PORT=3081 GLASS_BRAIN_URL=http://host.internal:9515/sse npx @deepseek-insight/dsi@latest dsh --sync
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```mermaid
|
|
109
|
+
sequenceDiagram
|
|
110
|
+
participant M as host Mac
|
|
111
|
+
participant V as VM floor (OrbStack)
|
|
112
|
+
participant G as Glass brain (host 9515)
|
|
113
|
+
M->>M: dsi dsh --sync with the brain flag — Glass lives here
|
|
114
|
+
V->>V: dsi dsh --sync brain-less with GLASS_BRAIN_URL exported
|
|
115
|
+
V->>G: preset dials the host stamp
|
|
116
|
+
G->>G: Shift+Click opens a HEADED window on the host display
|
|
117
|
+
V->>G: tabs, panels, viewport — driven over the wire
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```mermaid
|
|
121
|
+
flowchart TD
|
|
122
|
+
A[floor boots] --> B{GLASS_BRAIN_URL exported?}
|
|
123
|
+
B -- yes --> C[dial that address — VM floor, host brain]
|
|
124
|
+
B -- no --> D[dial 127.0.0.1:GLASS_PORT — same machine]
|
|
125
|
+
C --> E[headed glass opens where the brain runs]
|
|
126
|
+
D --> E
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Second floors are fully drivable.** At boot, a floor stamps its own addresses (`DSI_UI`, `GLASS_BRAIN_URL`) into everything it starts — so agents in *that* floor's conversations drive *that* floor's glass automatically, and the preset brain entry follows the stamped port. Nothing on the primary floor changes: without a stamp (a bare `dsh web` boot), the brain falls back to `9515` and the drivers probe `5175` → `5174` exactly as before. One conversation = one glass owner; the driver refuses to touch another conversation's glass, and a session busy in the live floor shows `writer-held` if you try to prompt it from the second window (watch it there, prompt it on its own floor).
|
|
130
|
+
|
|
131
|
+
**Two glass addresses: brain vs chassis.** The glass has two halves and each has its own stamp. The **brain** (`GLASS_BRAIN_URL`) is where *agents* dial in — the MCP endpoint. The **chassis** (`GLASS_CHASSIS_URL`) is where a Shift+click's *visible window* is born. By default both are "this machine" and nothing changes. When DSI runs on a machine with no screen (a VM) but your screens live on the host, stamp the chassis at the host and the window opens where you are looking:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# in the VM — the window is born on the host, the panel mirrors it
|
|
135
|
+
node bin/dsi-chassis.mjs --bind 192.168.1.9 --port 9525 # on the HOST: the chassis companion
|
|
136
|
+
DSI_PORT=5171 DSH_PORT=3081 GLASS_CHASSIS_URL=http://192.168.1.9:9525 pnpm dsi dsh --sync
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The host-side **companion** (`dsi-chassis`) births each Shift+click glass on a fresh disposable profile — never your real Chrome profile — enforces the same one-conversation-one-glass rule on its side, binds only the address you name (never all interfaces), and bridges CDP back to the floor. When the stamp is set and the companion is down, the panel says so honestly instead of silently falling back to a screenless local launch; unset the stamp and every floor behaves exactly as before.
|
|
96
140
|
|
|
97
141
|
## License
|
|
98
142
|
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* dsi-chassis — the host companion (ADR-0054 D3/D4, spec 2026-11-08 Glass
|
|
4
|
+
* Chassis Remote CDP task 1.1).
|
|
5
|
+
*
|
|
6
|
+
* A small helper that runs on the machine the operator's SCREENS are on.
|
|
7
|
+
* A floor whose launcher stamped GLASS_CHASSIS_URL at this process asks it
|
|
8
|
+
* to birth the headed glass THERE, by the house rules:
|
|
9
|
+
* - disposable profiles only (the Borrowed Chrome posture — the host's
|
|
10
|
+
* real Chrome profile is never mounted, read, or deletable);
|
|
11
|
+
* - one conversation = one glass, enforced HERE (ownership survives the
|
|
12
|
+
* machine boundary; a busy owner is refused with the writer-held
|
|
13
|
+
* contract);
|
|
14
|
+
* - it binds ONLY the interface address given via the required --bind
|
|
15
|
+
* flag, never 0.0.0.0 (D4);
|
|
16
|
+
* - it owns Chrome's debugging port and speaks clean CDP to the floor —
|
|
17
|
+
* HTTP endpoints are proxied with the Host header rewritten, JSON
|
|
18
|
+
* responses have their webSocketDebuggerUrl rewritten to route back
|
|
19
|
+
* through the companion, and websocket upgrades are raw-piped (this
|
|
20
|
+
* is the loopback/Host-header hop, ADR fact 7).
|
|
21
|
+
*
|
|
22
|
+
* The birth rules (profile naming, owner marker, pid-of-port) come from
|
|
23
|
+
* src/lib/server/browser/chassis-shared.ts — the SAME module the floor's
|
|
24
|
+
* registry imports; plain node strips the types natively (Node >= 23.6).
|
|
25
|
+
*
|
|
26
|
+
* Wire:
|
|
27
|
+
* POST /open { width, height, ownerSessionId } -> { id, cdpTarget, pid, profileDir }
|
|
28
|
+
* 409 { error: 'BUSY' } when ownerSessionId already holds a glass
|
|
29
|
+
* POST /close { id } (or { pid } / { profileDir }) -> { ok }
|
|
30
|
+
* GET /status -> { bind, port, glasses: [...] }
|
|
31
|
+
* /cdp/<id>/... CDP bridge (HTTP + websocket upgrade) to that glass
|
|
32
|
+
*
|
|
33
|
+
* Run: node bin/dsi-chassis.mjs --bind 192.168.1.9 [--port 9560]
|
|
34
|
+
*/
|
|
35
|
+
import { createServer, request as httpRequest } from 'node:http';
|
|
36
|
+
import { connect as netConnect } from 'node:net';
|
|
37
|
+
import { homedir } from 'node:os';
|
|
38
|
+
import { join } from 'node:path';
|
|
39
|
+
import { mkdirSync, rmSync } from 'node:fs';
|
|
40
|
+
import { pathToFileURL } from 'node:url';
|
|
41
|
+
|
|
42
|
+
import {
|
|
43
|
+
disposableProfilePath,
|
|
44
|
+
pidOfPort,
|
|
45
|
+
writeOwnerMarker
|
|
46
|
+
} from '../src/lib/server/browser/chassis-shared.ts';
|
|
47
|
+
|
|
48
|
+
/** The companion's disposable root — the same default the floor config
|
|
49
|
+
* ships (insight-config). The companion runs on the host and answers to
|
|
50
|
+
* the Borrowed Chrome posture, so deletes are GUARDED to this root. */
|
|
51
|
+
const PROFILE_ROOT = join(homedir(), '.dsi', 'browser-profiles');
|
|
52
|
+
|
|
53
|
+
/** D4 — the bind verdict. Pure: `--bind` is REQUIRED and 0.0.0.0 (and the
|
|
54
|
+
* IPv6 all-interfaces '::') are refused. The stamp already names the
|
|
55
|
+
* exact interface; bind-all buys nothing and invites every device. */
|
|
56
|
+
export function resolveBind(bind) {
|
|
57
|
+
if (bind === undefined || bind === '') {
|
|
58
|
+
return { ok: false, error: 'dsi-chassis: --bind <addr> is required (the private interface from the GLASS_CHASSIS_URL stamp); refusing to guess' };
|
|
59
|
+
}
|
|
60
|
+
if (bind === '0.0.0.0' || bind === '::' || bind === '[::]') {
|
|
61
|
+
return { ok: false, error: 'dsi-chassis: refusing 0.0.0.0 — bind the ONE private interface from the stamp (ADR-0054 D4)' };
|
|
62
|
+
}
|
|
63
|
+
return { ok: true, addr: bind };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** CLI arg parsing — pure, so the pins drive it directly. */
|
|
67
|
+
export function parseArgs(argv) {
|
|
68
|
+
const out = { bind: undefined, port: undefined };
|
|
69
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
70
|
+
const a = argv[i];
|
|
71
|
+
if (a === '--bind') { out.bind = argv[i + 1]; i += 1; }
|
|
72
|
+
else if (a.startsWith('--bind=')) out.bind = a.slice('--bind='.length);
|
|
73
|
+
else if (a === '--port') { out.port = Number(argv[i + 1]); i += 1; }
|
|
74
|
+
else if (a.startsWith('--port=')) out.port = Number(a.slice('--port='.length));
|
|
75
|
+
}
|
|
76
|
+
return out;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** A free port for Chrome's debugging listener — net probe, no lsof
|
|
80
|
+
* dependency, same behavior on macOS and Linux hosts. */
|
|
81
|
+
async function freeChassisPort(preferred) {
|
|
82
|
+
const { createServer: probeServer } = await import('node:net');
|
|
83
|
+
const tryBind = (port) =>
|
|
84
|
+
new Promise((resolve) => {
|
|
85
|
+
const s = probeServer();
|
|
86
|
+
s.once('error', () => resolve(false));
|
|
87
|
+
s.once('listening', () => s.close(() => resolve(true)));
|
|
88
|
+
s.listen(port, '127.0.0.1');
|
|
89
|
+
});
|
|
90
|
+
if (preferred && (await tryBind(preferred))) return preferred;
|
|
91
|
+
for (let p = 9520; p < 9620; p += 1) if (await tryBind(p)) return p;
|
|
92
|
+
throw new Error('dsi-chassis: no free debugging port in 9520..9619');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** The REAL launcher: headed Chromium on a disposable profile via the
|
|
96
|
+
* repo's pinned playwright-core, channel 'chrome' with the bundled
|
|
97
|
+
* chromium fallback — the same posture registry.open() births with. */
|
|
98
|
+
async function defaultLaunch({ profileDir, args, headless, width, height }) {
|
|
99
|
+
const { chromium } = await import('playwright-core');
|
|
100
|
+
const ignoreDefaultArgs = ['--enable-automation', '--mute-audio', '--hide-scrollbars'];
|
|
101
|
+
// headless honors the floor's plain-click contract (no OS window); only
|
|
102
|
+
// the Shift+click headed open passes false (ADR-0054 D2 — the chassis
|
|
103
|
+
// exists so a HEADED glass can be born where the screens are).
|
|
104
|
+
// Anti-bot parity (registry's PLAIN_IDENTITY posture): a headless birth
|
|
105
|
+
// must not advertise HeadlessChrome — Google captcha'd the first VM-floor
|
|
106
|
+
// plain click on 2026-11-08 while the host floor's spoofed glass passed.
|
|
107
|
+
const identity = headless === true
|
|
108
|
+
? { userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' }
|
|
109
|
+
: {};
|
|
110
|
+
// Viewport parity (ADR-0041's local contract, carried across the machine
|
|
111
|
+
// boundary): HEADED is window-driven — viewport null so the page tracks
|
|
112
|
+
// Browser.setWindowBounds. HEADLESS has no OS window: pin the viewport to
|
|
113
|
+
// the requested box (no +6/+70 chassis padding — that pads OS title bars,
|
|
114
|
+
// and a headless glass has none) or the mirror is cut off at the bottom
|
|
115
|
+
// (live witness 2026-11-08: VM plain click vs host panel box).
|
|
116
|
+
const viewport = headless === true
|
|
117
|
+
? { defaultViewport: { width: Number(width) || 730, height: Number(height) || 830 } }
|
|
118
|
+
: { defaultViewport: null };
|
|
119
|
+
let context;
|
|
120
|
+
try {
|
|
121
|
+
context = await chromium.launchPersistentContext(profileDir, { channel: 'chrome', headless: headless === true, ignoreDefaultArgs, ...identity, ...viewport, args });
|
|
122
|
+
} catch {
|
|
123
|
+
context = await chromium.launchPersistentContext(profileDir, { headless: headless === true, ignoreDefaultArgs, ...identity, ...viewport, args });
|
|
124
|
+
}
|
|
125
|
+
const port = Number(args.find((a) => a.startsWith('--remote-debugging-port='))?.split('=')[1]);
|
|
126
|
+
const pid = pidOfPort(port);
|
|
127
|
+
return {
|
|
128
|
+
pid,
|
|
129
|
+
port,
|
|
130
|
+
close: async () => { await context.close(); }
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Start the companion. `launch` is injectable so the pins can drive the
|
|
136
|
+
* whole open/close/ownership/bridge contract without a real Chromium.
|
|
137
|
+
* Returns { server, port, glasses, stop }.
|
|
138
|
+
*/
|
|
139
|
+
export async function startChassisCompanion(opts = {}) {
|
|
140
|
+
const bindVerdict = resolveBind(opts.bind);
|
|
141
|
+
if (!bindVerdict.ok) throw new Error(bindVerdict.error);
|
|
142
|
+
const bind = bindVerdict.ok ? bindVerdict.addr : undefined;
|
|
143
|
+
const launch = opts.launch ?? defaultLaunch;
|
|
144
|
+
const portFor = opts.portFor ?? freeChassisPort;
|
|
145
|
+
// Injectable for the pins (and a VM host may relocate the root); the
|
|
146
|
+
// default stays the Borrowed Chrome root. Deletes are GUARDED to THIS
|
|
147
|
+
// root — the guard is a PATH check, never a flag (the borrowed-wipe RCA).
|
|
148
|
+
const profileRoot = opts.profileRoot ?? PROFILE_ROOT;
|
|
149
|
+
|
|
150
|
+
// The ownership registry lives IN this process: one conversation = one
|
|
151
|
+
// glass, keyed by the requesting floor's ownerSessionId (karpathy edge
|
|
152
|
+
// case: two floors stamping the same companion each carry their own id).
|
|
153
|
+
const glasses = new Map(); // id -> glass
|
|
154
|
+
const byOwner = new Map(); // ownerSessionId -> id
|
|
155
|
+
|
|
156
|
+
const server = createServer(async (req, res) => {
|
|
157
|
+
try {
|
|
158
|
+
const url = new URL(req.url ?? '/', 'http://' + (req.headers.host ?? bind));
|
|
159
|
+
// --- the CDP bridge: /cdp/<id>/... proxies to that glass's port ---
|
|
160
|
+
const cdp = url.pathname.match(/^\/cdp\/([^/]+)(\/.*)$/);
|
|
161
|
+
if (cdp) {
|
|
162
|
+
const glass = glasses.get(cdp[1]);
|
|
163
|
+
if (!glass) { res.statusCode = 404; res.end('unknown glass'); return; }
|
|
164
|
+
const headers = { ...req.headers, host: '127.0.0.1:' + glass.debugPort };
|
|
165
|
+
const preq = httpRequest({ host: '127.0.0.1', port: glass.debugPort, path: cdp[2] + url.search, method: req.method, headers }, (pres) => {
|
|
166
|
+
const ctype = String(pres.headers['content-type'] ?? '');
|
|
167
|
+
if (ctype.includes('json')) {
|
|
168
|
+
const chunks = [];
|
|
169
|
+
pres.on('data', (c) => chunks.push(c));
|
|
170
|
+
pres.on('end', () => {
|
|
171
|
+
// Rewrite the advertised debugger urls to route back
|
|
172
|
+
// through THIS companion — the floor never needs to know
|
|
173
|
+
// Chrome's loopback port (ADR fact 7, the Host hop).
|
|
174
|
+
const body = Buffer.concat(chunks).toString('utf8')
|
|
175
|
+
.split('ws://127.0.0.1:' + glass.debugPort).join('ws://' + (req.headers.host ?? bind + ':' + glass.boundPort) + '/cdp/' + glass.id);
|
|
176
|
+
const headers = { ...pres.headers };
|
|
177
|
+
delete headers['transfer-encoding'];
|
|
178
|
+
res.writeHead(pres.statusCode ?? 200, { ...headers, 'content-length': Buffer.byteLength(body) });
|
|
179
|
+
res.end(body);
|
|
180
|
+
});
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
res.writeHead(pres.statusCode ?? 200, pres.headers);
|
|
184
|
+
pres.pipe(res);
|
|
185
|
+
});
|
|
186
|
+
preq.on('error', () => { try { res.statusCode = 502; res.end('cdp bridge down'); } catch { /* gone */ } });
|
|
187
|
+
req.pipe(preq);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (req.method === 'GET' && url.pathname === '/status') {
|
|
191
|
+
res.writeHead(200, { 'content-type': 'application/json' });
|
|
192
|
+
res.end(JSON.stringify({
|
|
193
|
+
bind,
|
|
194
|
+
port: glassPort(server),
|
|
195
|
+
glasses: [...glasses.values()].map((g) => ({ id: g.id, ownerSessionId: g.ownerSessionId, pid: g.pid, profileDir: g.profileDir }))
|
|
196
|
+
}));
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (req.method === 'POST' && url.pathname === '/open') {
|
|
200
|
+
const chunks = [];
|
|
201
|
+
for await (const c of req) chunks.push(c);
|
|
202
|
+
let body;
|
|
203
|
+
try { body = JSON.parse(Buffer.concat(chunks).toString('utf8') || '{}'); } catch { body = {}; }
|
|
204
|
+
const ownerSessionId = typeof body.ownerSessionId === 'string' ? body.ownerSessionId : '';
|
|
205
|
+
if (!ownerSessionId) {
|
|
206
|
+
res.writeHead(400, { 'content-type': 'application/json' });
|
|
207
|
+
res.end(JSON.stringify({ error: 'BAD_REQUEST', message: 'ownerSessionId is required — ownership is keyed by the requesting conversation' }));
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
// Writer-held, enforced HERE (D3): a busy owner is refused, and
|
|
211
|
+
// the refusal is HONEST — the floor surfaces it, no fallback.
|
|
212
|
+
if (byOwner.has(ownerSessionId)) {
|
|
213
|
+
res.writeHead(409, { 'content-type': 'application/json' });
|
|
214
|
+
res.end(JSON.stringify({ error: 'BUSY', message: 'writer-held: owner session ' + ownerSessionId + ' already holds a glass on this chassis' }));
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const id = crypto.randomUUID();
|
|
218
|
+
const profileDir = disposableProfilePath(profileRoot, id);
|
|
219
|
+
mkdirSync(profileDir, { recursive: true });
|
|
220
|
+
writeOwnerMarker(profileDir); // shared birth rule — the sweep contract holds on the host too
|
|
221
|
+
const debugPort = await portFor(opts.debugPort);
|
|
222
|
+
const width = Math.max(200, Math.min(1920, Number(body.width) || 730));
|
|
223
|
+
const height = Math.max(120, Math.min(1080, Number(body.height) || 830));
|
|
224
|
+
const args = [
|
|
225
|
+
'--no-first-run',
|
|
226
|
+
'--remote-debugging-port=' + debugPort,
|
|
227
|
+
'--disable-dev-shm-usage',
|
|
228
|
+
'--disable-renderer-backgrounding',
|
|
229
|
+
'--disable-background-timer-throttling',
|
|
230
|
+
'--disable-backgrounding-occluded-windows',
|
|
231
|
+
'--disable-blink-features=AutomationControlled',
|
|
232
|
+
'--autoplay-policy=no-user-gesture-required',
|
|
233
|
+
'--window-size=' + (width + 6) + ',' + (height + 70)
|
|
234
|
+
];
|
|
235
|
+
const born = await launch({ profileDir, args, headless: body.headless === true, width, height }).catch((e) => {
|
|
236
|
+
// a failed birth must not leave a profile dir behind (and the
|
|
237
|
+
// error rides the honest 500 to the floor's panel)
|
|
238
|
+
try { if (profileDir.startsWith(profileRoot)) rmSync(profileDir, { recursive: true, force: true }); } catch { /* best-effort */ }
|
|
239
|
+
throw e;
|
|
240
|
+
});
|
|
241
|
+
const glass = {
|
|
242
|
+
id,
|
|
243
|
+
ownerSessionId,
|
|
244
|
+
debugPort,
|
|
245
|
+
pid: born.pid ?? null,
|
|
246
|
+
profileDir,
|
|
247
|
+
close: born.close
|
|
248
|
+
};
|
|
249
|
+
glasses.set(id, glass);
|
|
250
|
+
byOwner.set(ownerSessionId, id);
|
|
251
|
+
res.writeHead(200, { 'content-type': 'application/json' });
|
|
252
|
+
// The cdpTarget routes THROUGH this companion (the bridge above) —
|
|
253
|
+
// the floor attaches its relay to this URL, never to Chrome raw.
|
|
254
|
+
// Root it at the address the floor DIALED (the request's Host
|
|
255
|
+
// header — same idiom as the ws rewrite in the bridge): `bind`
|
|
256
|
+
// is often 127.0.0.1, which only means "this machine" to the
|
|
257
|
+
// HOST — to a remote floor (VM over the OrbStack bridge) it is
|
|
258
|
+
// the wrong machine and connectOverCDP dials itself (witness
|
|
259
|
+
// 2026-11-08: ECONNREFUSED 127.0.0.1:9525 from the VM floor).
|
|
260
|
+
const dialHost = req.headers.host ?? (bind + ':' + glassPort(server));
|
|
261
|
+
res.end(JSON.stringify({ id, cdpTarget: 'http://' + dialHost + '/cdp/' + id, pid: glass.pid, profileDir }));
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (req.method === 'POST' && url.pathname === '/close') {
|
|
265
|
+
const chunks = [];
|
|
266
|
+
for await (const c of req) chunks.push(c);
|
|
267
|
+
let body;
|
|
268
|
+
try { body = JSON.parse(Buffer.concat(chunks).toString('utf8') || '{}'); } catch { body = {}; }
|
|
269
|
+
// Karpathy edge case: the companion may have restarted, so a
|
|
270
|
+
// glass is closable by id, pid, or profileDir — not id alone.
|
|
271
|
+
const glass = glasses.get(String(body.id ?? ''))
|
|
272
|
+
?? [...glasses.values()].find((g) => (body.pid !== undefined && g.pid === body.pid) || (body.profileDir !== undefined && g.profileDir === body.profileDir));
|
|
273
|
+
if (!glass) {
|
|
274
|
+
res.writeHead(404, { 'content-type': 'application/json' });
|
|
275
|
+
res.end(JSON.stringify({ error: 'NO_GLASS', message: 'no such glass on this chassis' }));
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
await releaseGlass(glass);
|
|
279
|
+
res.writeHead(200, { 'content-type': 'application/json' });
|
|
280
|
+
res.end(JSON.stringify({ ok: true }));
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
res.statusCode = 404;
|
|
284
|
+
res.end();
|
|
285
|
+
} catch (e) {
|
|
286
|
+
// Honest failure: a birth or close that throws is a 500 with the
|
|
287
|
+
// reason — the floor's panel surfaces it verbatim (no fallback).
|
|
288
|
+
try {
|
|
289
|
+
res.writeHead(500, { 'content-type': 'application/json' });
|
|
290
|
+
res.end(JSON.stringify({ error: 'CHASSIS_FAILED', message: e instanceof Error ? e.message : String(e) }));
|
|
291
|
+
} catch { /* client gone */ }
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
function releaseGlass(glass) {
|
|
296
|
+
glasses.delete(glass.id);
|
|
297
|
+
if (byOwner.get(glass.ownerSessionId) === glass.id) byOwner.delete(glass.ownerSessionId);
|
|
298
|
+
return (async () => {
|
|
299
|
+
try { await glass.close(); } catch { /* already dead */ }
|
|
300
|
+
try { if (glass.pid) process.kill(glass.pid, 'SIGKILL'); } catch { /* already dead */ }
|
|
301
|
+
// Borrowed Chrome: deletes are GUARDED to the disposable root.
|
|
302
|
+
if (glass.profileDir.startsWith(profileRoot)) rmSync(glass.profileDir, { recursive: true, force: true });
|
|
303
|
+
})();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const upgrade = (req, socket, head) => {
|
|
307
|
+
const m = (req.url ?? '').match(/^\/cdp\/([^/]+)(\/devtools\/.*)$/);
|
|
308
|
+
if (!m) { socket.destroy(); return; }
|
|
309
|
+
const glass = glasses.get(m[1]);
|
|
310
|
+
if (!glass) { socket.destroy(); return; }
|
|
311
|
+
// Raw pipe to Chrome's loopback port; the Host header is rewritten —
|
|
312
|
+
// recent Chrome validates it (ADR fact 7) and the companion is the hop.
|
|
313
|
+
const headers = [];
|
|
314
|
+
const raw = req.rawHeaders;
|
|
315
|
+
for (let i = 0; i < raw.length; i += 2) {
|
|
316
|
+
headers.push(raw[i] + ': ' + (raw[i].toLowerCase() === 'host' ? '127.0.0.1:' + glass.debugPort : raw[i + 1]));
|
|
317
|
+
}
|
|
318
|
+
const upstream = netConnect(glass.debugPort, '127.0.0.1', () => {
|
|
319
|
+
upstream.write(req.method + ' ' + m[2] + ' HTTP/1.1\r\n' + headers.join('\r\n') + '\r\n\r\n');
|
|
320
|
+
if (head?.length) upstream.write(head);
|
|
321
|
+
socket.pipe(upstream);
|
|
322
|
+
upstream.pipe(socket);
|
|
323
|
+
});
|
|
324
|
+
const fail = () => { socket.destroy(); upstream.destroy(); };
|
|
325
|
+
upstream.on('error', fail);
|
|
326
|
+
socket.on('error', fail);
|
|
327
|
+
};
|
|
328
|
+
server.on('upgrade', upgrade);
|
|
329
|
+
|
|
330
|
+
const wanted = opts.port ?? 9560;
|
|
331
|
+
const boundPort = await new Promise((res, rej) => {
|
|
332
|
+
server.once('error', rej);
|
|
333
|
+
server.listen(wanted, bind, () => {
|
|
334
|
+
const a = server.address();
|
|
335
|
+
res(typeof a === 'object' && a ? a.port : wanted);
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
return {
|
|
339
|
+
server,
|
|
340
|
+
port: boundPort,
|
|
341
|
+
glasses,
|
|
342
|
+
stop: async () => {
|
|
343
|
+
server.removeAllListeners('upgrade');
|
|
344
|
+
for (const g of [...glasses.values()]) await releaseGlass(g);
|
|
345
|
+
await new Promise((res) => server.close(() => res()));
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function glassPort(server) {
|
|
351
|
+
const a = server.address();
|
|
352
|
+
return typeof a === 'object' && a ? a.port : 0;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// ---- direct run: parse CLI, resolve bind, start, stay up --------------------
|
|
356
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
357
|
+
const { bind, port } = parseArgs(process.argv.slice(2));
|
|
358
|
+
const verdict = resolveBind(bind);
|
|
359
|
+
if (!verdict.ok) {
|
|
360
|
+
console.error(verdict.error);
|
|
361
|
+
process.exit(1);
|
|
362
|
+
}
|
|
363
|
+
startChassisCompanion({ bind: verdict.addr, port })
|
|
364
|
+
.then((c) => {
|
|
365
|
+
console.log('dsi-chassis: listening on ' + verdict.addr + ':' + c.port + ' (stamp me as GLASS_CHASSIS_URL=http://' + verdict.addr + ':' + c.port + ')');
|
|
366
|
+
})
|
|
367
|
+
.catch((e) => {
|
|
368
|
+
console.error('dsi-chassis: ' + (e instanceof Error ? e.message : String(e)));
|
|
369
|
+
process.exit(1);
|
|
370
|
+
});
|
|
371
|
+
}
|
package/bin/dsi.mjs
CHANGED
|
@@ -88,7 +88,11 @@ const USAGE = [
|
|
|
88
88
|
' must keep running (another conversation floor), forward',
|
|
89
89
|
' --port <n> (or DSH_PORT=<n>; the flag wins) — it goes to `dsh web`',
|
|
90
90
|
' and DSI follows it automatically. GLASS_PORT=<n> moves the brain',
|
|
91
|
-
' (the glass browser MCP, default 9515).',
|
|
91
|
+
' (the glass browser MCP, default 9515). A pre-set GLASS_BRAIN_URL',
|
|
92
|
+
' overrides the computed brain address byte-for-byte. On a VM floor,',
|
|
93
|
+
' stamp GLASS_CHASSIS_URL=http://<host>:<port> (run `node bin/dsi-chassis.mjs --bind <host>`',
|
|
94
|
+
' there) and Shift+click births the visible glass window on THAT',
|
|
95
|
+
' machine; unset, the window is born locally exactly as always.',
|
|
92
96
|
'',
|
|
93
97
|
' All commands (flags — see above):',
|
|
94
98
|
'',
|
|
@@ -389,13 +393,26 @@ function setDshAuthToken(token) {
|
|
|
389
393
|
/** The Stamped Floor (ADR 2026-11-05, D1): every floor announces its own
|
|
390
394
|
* addresses into the env it gives its children — the UI base (the Floor
|
|
391
395
|
* Seam D1a seam, finally with a writer) and the brain URL (the preset's
|
|
392
|
-
* !!js expression reads
|
|
393
|
-
* launcher is the only party that knows both ports at spawn time.
|
|
396
|
+
* !!js expression reads GLASS_BRAIN_URL with a 9515 bare-boot fallback).
|
|
397
|
+
* The launcher is the only party that knows both ports at spawn time.
|
|
398
|
+
* D2 (ADR 2026-11-08): an operator pre-set GLASS_BRAIN_URL passes through
|
|
399
|
+
* byte-for-byte — no validation, no trim; the computed URL is only the
|
|
400
|
+
* default.
|
|
401
|
+
* GLASS_CHASSIS_URL (ADR-0054, 2026-11-08): the SECOND stamp — where the
|
|
402
|
+
* glass WINDOW is born. Same ladder: an operator-exported value passes
|
|
403
|
+
* through byte-for-byte; unset stamps nothing and the registry keeps its
|
|
404
|
+
* local launch exactly as today (D5). It points at the host companion
|
|
405
|
+
* (`node bin/dsi-chassis.mjs --bind <addr>`), not at raw Chrome. */
|
|
394
406
|
function stampedFloorEnv(uiPort) {
|
|
395
|
-
|
|
407
|
+
const env = {
|
|
396
408
|
DSI_UI: 'http://127.0.0.1:' + uiPort,
|
|
397
|
-
|
|
409
|
+
GLASS_BRAIN_URL: process.env.GLASS_BRAIN_URL ?? 'http://127.0.0.1:' + (process.env.GLASS_PORT ?? 9515) + '/sse'
|
|
398
410
|
};
|
|
411
|
+
// Unset means NOTHING is stamped (D5): byte-for-byte today's env shape.
|
|
412
|
+
if (process.env.GLASS_CHASSIS_URL !== undefined) {
|
|
413
|
+
env.GLASS_CHASSIS_URL = process.env.GLASS_CHASSIS_URL;
|
|
414
|
+
}
|
|
415
|
+
return env;
|
|
399
416
|
}
|
|
400
417
|
|
|
401
418
|
function dshWebVersion() {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{J as e,K as t,Y as n,ft as r,q as i,r as a,t as o,ut as s,vt as c}from"./0Tfhif1V.js";var l=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},u=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}},d=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function f(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function p(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function ee(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function g(){}function _(...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 te(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var v=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&y.delete(b(e)),v(e,t));var y=new Map;function ne(e,t){let n=b(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=te(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 re(e,t,n){if(y.size>0){let t=b(e,n),r=y.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);y.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${_(...e)}"]`}return n}var x=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{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 le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=x.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).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);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}var ue=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function de(e,t){let n=se(e),r=e!=`/`&&e.endsWith(`/`);return`/`+n.map(n=>n.replace(ue,(n,r,i,a)=>{let o=t[a];if(!o){if(r||i&&o!==void 0)return``;throw Error(`Missing parameter '${a}' in route ${e}`)}if(o.startsWith(`/`)||o.endsWith(`/`))throw Error(`Parameter '${a}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return o})).filter(Boolean).join(`/`)+(r?`/`:``)}function fe({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}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(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 pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var S=globalThis.__sveltekit_15fhu59?.base??``,he=globalThis.__sveltekit_15fhu59?.assets??S??``,ge=``;function _e(...e){if(!e[0].startsWith(`/`))throw Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${e[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return S+ge+de(e[0],e[1])}var ve=`1794157304351`,ye=`sveltekit:snapshot`,be=`sveltekit:scroll`,xe=`sveltekit:states`,Se=`sveltekit:pageurl`,C=`sveltekit:history`,w=`sveltekit:navigation`,T={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},E=location.origin;function Ce(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 D(){return{x:pageXOffset,y:pageYOffset}}function O(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var we={...T,"":T.hover};function Te(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ee(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Te(e)}}function De(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||A(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===E&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function k(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=O(s,`preload-code`)),i===null&&(i=O(s,`preload-data`)),t===null&&(t=O(s,`keepfocus`)),n===null&&(n=O(s,`noscroll`)),a===null&&(a=O(s,`reload`)),o===null&&(o=O(s,`replacestate`)),s=Te(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:we[r??`off`],preload_data:we[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Oe(e){let t=c(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function a(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:a}}var ke={v:g};function Ae(){let{set:e,subscribe:t}=c(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==ve;return r&&(e(!0),ke.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function A(e,t,n){return e.origin!==E||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function je(e){}var Me=2**32-1,Ne=Me-1,Pe=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Fe(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getPrototypeOf(t)===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Pe}function Ie(e){return Object.prototype.toString.call(e).slice(8,-1)}function Le(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)}function Re(e){return!(!Number.isInteger(e)||e<0||e>Ne)}function ze(e){return!(!Number.isInteger(e)||e<0||e>Me)}function Be(e){if(e.length===0||e.length>1&&e.charCodeAt(0)===48)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return Re(+e)}function Ve(e){for(var t=e.length-1;t>=0&&!Be(e[t]);t--);return t+1}function He(e){let t=Object.keys(e);return t.length=Ve(t),t}function Ue(e){return Uint8Array.fromBase64(e).buffer}function We(e){return Uint8Array.from(Buffer.from(e,`base64`)).buffer}function Ge(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}var Ke=typeof Uint8Array.fromBase64==`function`,qe=typeof process==`object`&&process.versions?.node!==void 0,Je=Ke?Ue:qe?We:Ge;function Ye(e,t){if(!t)return e;let n={};for(let r of Object.keys(e))n[r]=t[r]??e[r];return n}var Xe=Object.freeze({kind:`not-plain`}),Ze=Object.freeze({kind:`symbol-keys`});Object.freeze({identify:e=>e,typeOf:e=>e===null?`null`:typeof e,toPrimitive:e=>e,tagOf:e=>Ie(e),isThenable:e=>typeof e.then==`function`,toPromise:e=>Promise.resolve(e),unbox:e=>e.valueOf(),toISOString:e=>isNaN(e.getDate())?``:e.toISOString(),toStringValue:e=>e.toString(),regExpInfo:e=>({source:e.source,flags:e.flags}),valuesOf:e=>e,entriesOf:e=>e,viewInfo:e=>({buffer:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength,length:e.length,bufferByteLength:e.buffer.byteLength}),toArrayBuffer:e=>e,lengthOf:e=>e.length,hasOwn:(e,t)=>Object.hasOwn(e,t),indicesOf:e=>He(e),shapeOf:e=>Fe(e)?Le(e).length>0?Ze:{kind:Object.getPrototypeOf(e)===null?`null-proto`:`plain`,keys:Object.keys(e)}:Xe,get:(e,t)=>e[t]});var Qe=Object.freeze({fromPrimitive:e=>e,fromISOString:e=>new Date(e),fromStringValue:(e,t)=>e===`URL`?new URL(t):e===`URLSearchParams`?new URLSearchParams(t):Temporal[e.slice(9)].from(t),fromArrayBuffer:e=>e,fromRegExpInfo:(e,t)=>new RegExp(e,t),fromViewInfo:(e,t,n,r)=>{let i=globalThis[e];return n===void 0?new i(t):new i(t,n,r)},box:e=>Object(e),createArray:e=>Array(e),createSparseArray:e=>{let t=[];return t[Ne]=void 0,delete t[Ne],t.length=e,t},createObject:()=>({}),createNullPrototypeObject:()=>Object.create(null),createSet:()=>new Set,createMap:()=>new Map,set:(e,t,n)=>{e[t]=n},addValue:(e,t)=>{e.add(t)},addEntry:(e,t,n)=>{e.set(t,n)}});function $e(e,t,n){let r=Ye(Qe,n?.operations);if(typeof e==`number`)return s(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let i=e,a=Array(i.length),o=null;function s(e,n=!1){if(e===-1)return r.fromPrimitive(void 0);if(e===-3)return r.fromPrimitive(NaN);if(e===-4)return r.fromPrimitive(1/0);if(e===-5)return r.fromPrimitive(-1/0);if(e===-6)return r.fromPrimitive(-0);if(n||typeof e!=`number`)throw Error(`Invalid input`);if(e in a)return a[e];let c=i[e];if(!c||typeof c!=`object`)a[e]=r.fromPrimitive(c);else if(Array.isArray(c)){if(typeof c[0]==`string`){let n=c[0],l=t&&Object.hasOwn(t,n)?t[n]:void 0;if(l){let t=c[1];if(typeof t!=`number`&&(t=i.push(c[1])-1),Object.hasOwn(a,t))return a[e]=l(a[t]);if(o??=new Set,o.has(t))throw Error(`Invalid circular reference`);return o.add(t),a[e]=l(s(t)),o.delete(t),a[e]}switch(n){case`Date`:a[e]=r.fromISOString(c[1]);break;case`Set`:let t=r.createSet();a[e]=t;for(let e=1;e<c.length;e+=1)r.addValue(t,s(c[e]));break;case`Map`:let o=r.createMap();a[e]=o;for(let e=1;e<c.length;e+=2)r.addEntry(o,s(c[e]),s(c[e+1]));break;case`RegExp`:a[e]=r.fromRegExpInfo(c[1],c[2]);break;case`Object`:{let t=c[1];if(typeof i[t]==`object`&&i[t][0]!==`BigInt`)throw Error(`Invalid input`);a[e]=r.box(s(t));break}case`BigInt`:a[e]=r.fromPrimitive(BigInt(c[1]));break;case`null`:let l=r.createNullPrototypeObject();a[e]=l;for(let e=1;e<c.length;e+=2){if(c[e]===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");r.set(l,c[e],s(c[e+1]))}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{if(i[c[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=s(c[1]);a[e]=r.fromViewInfo(n,t,c[2],c[3]);break}case`ArrayBuffer`:{let t=c[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);a[e]=r.fromArrayBuffer(Je(t));break}case`URL`:case`URLSearchParams`:case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:a[e]=r.fromStringValue(n,c[1]);break;default:throw Error(`Unknown type ${n}`)}}else if(c[0]===-7){let t=c[1];if(!ze(t))throw Error(`Invalid input`);let n=r.createSparseArray(t);a[e]=n;for(let e=2;e<c.length;e+=2){let i=c[e];if(!Re(i)||i>=t)throw Error(`Invalid input`);r.set(n,i,s(c[e+1]))}}else{let t=r.createArray(c.length);a[e]=t;for(let e=0;e<c.length;e+=1){let n=c[e];n!==-2&&r.set(t,e,s(n))}}}else{let t=r.createObject();a[e]=t;for(let e of Object.keys(c)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");r.set(t,e,s(c[e]))}}return a[e]}return s(0)}var et=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...et],[...new Set([...et])];function tt(e){return e.filter(e=>e!=null)}var nt=`x-sveltekit-invalidated`,rt=`x-sveltekit-trailing-slash`;function j(e,t){return e+`/`+t}function it(e){return e instanceof l||e instanceof d?e.status:500}function at(e){return e instanceof d?e.text:`Internal Error`}var M,N,ot,st=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),ct=`a:`;st?(M={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ct)},N={current:null},ot={current:!1}):(M=new class{#e=r({});get data(){return t(this.#e)}set data(e){s(this.#e,e)}#t=r(null);get form(){return t(this.#t)}set form(e){s(this.#t,e)}#n=r(null);get error(){return t(this.#n)}set error(e){s(this.#n,e)}#r=r({});get params(){return t(this.#r)}set params(e){s(this.#r,e)}#i=r({id:null});get route(){return t(this.#i)}set route(e){s(this.#i,e)}#a=r({});get state(){return t(this.#a)}set state(e){s(this.#a,e)}#o=r(-1);get status(){return t(this.#o)}set status(e){s(this.#o,e)}#s=r(new URL(ct));get url(){return t(this.#s)}set url(e){s(this.#s,e)}},N=new class{#e=r(null);get current(){return t(this.#e)}set current(e){s(this.#e,e)}},ot=new class{#e=r(!1);get current(){return t(this.#e)}set current(e){s(this.#e,e)}},ke.v=()=>ot.current=!0);function lt(e){Object.assign(M,e)}var ut=`/__data.json`,dt=`.html__data.json`;function ft(e){return e.endsWith(`.html`)?e.replace(/\.html$/,dt):e.replace(/\/$/,``)+ut}var pt={spanContext(){return mt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},mt={traceId:``,spanId:``,traceFlags:0};async function*ht(e,t){let n=!1,r=``,i=new TextDecoder;for(;;){let a=r.indexOf(t);for(;a!==-1;)yield r.slice(0,a),r=r.slice(a+t.length),a=r.indexOf(t);if(n){r&&(yield r);return}let o=await e.read();n=o.done,o.value&&(r+=i.decode(o.value,{stream:!0})),n&&(r+=i.decode())}}async function*gt(e){for await(let t of ht(e,`
|
|
2
|
+
`)){let e=t.trim();e&&(yield JSON.parse(e))}}var{onMount:_t,tick:vt}=o,yt=n??(e=>e()),bt=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),P=null,F=pe(`sveltekit:scroll`)??{},I=pe(`sveltekit:snapshot`)??{},L={url:Oe({}),page:Oe({}),navigating:c(null),updated:Ae()};function xt(e){F[e]=D()}function St(e,t){let n=e+1;for(;F[n];)delete F[n],n+=1;for(n=t+1;I[n];)delete I[n],n+=1}function R(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(g)}async function Ct(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(S||`/`);e&&await e.update()}}var wt,Tt,Et,z,Dt,B,Ot={},kt={},At=[],jt=[],V=null;function Mt(){V?.fork?.then(e=>e?.discard()),V=null,Q={element:void 0,href:void 0}}var Nt=new Map,Pt=new Set,Ft=new Set,H=new Set,U={branch:[],error:null,url:null,nav:null},It=!1,Lt=!1,Rt=!0,W=!1,G=!1,zt=!1,Bt=!1,Vt,K,q,J,Y=new Set,Ht=new Map,Ut=new Map;async function Wt(e,t,n){if(globalThis.__sveltekit_15fhu59.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_15fhu59.data;for(let t in e)Ot[t]=e[t];for(let e in n)Ot[e]=n[e];for(let e in r)Ot[e]=r[e];for(let e in t)kt[e]=t[e]}document.URL!==location.href&&(location.href=location.href),B=e,await e.hooks.init?.(),wt=fe(e),z=document.documentElement,Dt=t,Tt=e.nodes[0],Et=e.nodes[1],Tt(),Et(),K=history.state?.[C],q=history.state?.[w],K||(K=q=Date.now(),history.replaceState({...history.state,[C]:K,[w]:q},``));let r=F[K];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await xn(Dt,n)):(await Z({type:`enter`,url:Ce(B.hash?kn(new URL(location.href)):location.href),replace_state:!0}),i()),bn()}function Gt(){At.length=0,Bt=!1}function Kt(e){jt.some(e=>e?.snapshot)&&(I[e]=jt.map(e=>e?.snapshot?.capture()))}function qt(e){I[e]?.forEach((e,t)=>{jt[t]?.snapshot?.restore(e)})}function Jt(){xt(K),me(be,F),Kt(q),me(ye,I)}async function Yt(t,n,r,i){let a,o;n.invalidateAll&&Mt(),await Z({type:`goto`,url:Ce(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){Bt=!0,a=new Set;for(let[e,t]of Ht)for(let[n,r]of t)r.resource?.reset(),a.add(j(e,n));o=new Set;for(let[e,t]of Ut)for(let n of t.keys())o.add(j(e,n))}n.invalidate&&n.invalidate.forEach(vn)}}),n.invalidateAll&&e().then(e).then(()=>{for(let[e,t]of Ht)for(let[n,{resource:r}]of t)a?.has(j(e,n))&&r.start();for(let[e,t]of Ut)for(let[n,{resource:r}]of t)o?.has(j(e,n))&&r.reconnect()})}async function Xt(e){if(e.id!==V?.id){Mt();let t={};Y.add(t),V={id:e.id,token:t,promise:sn({...e,preload:t}).then(e=>(Y.delete(t),e.type===`loaded`&&e.state.error&&Mt(),e)),fork:null}}return V.promise}async function Zt(e){let t=(await X(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function Qt(e,t,n){let r={params:U.params,route:{id:U.route?.id??null},url:new URL(location.href)};if(U={...e.state,nav:r},lt(e.props.page),Vt=new B.root({target:t,props:{...e.props,stores:L,components:jt},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:F[K]??D()},willUnload:!1,type:`enter`,complete:Promise.resolve()};H.forEach(t=>t(e))}qt(q),Lt=!0}async function $t({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=f(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:tt(n).map(e=>e.node.component),page:On(M)}};s!==void 0&&(l.props.form=s);let u={},d=!M,p=0;for(let e=0;e<Math.max(n.length,U.branch.length);e+=1){let t=n[e],r=U.branch[e];t?.data!==r?.data&&(d=!0),t&&(u={...u,...t.data},d&&(l.props[`data_${p}`]=u),p+=1)}return(!U.url||e.href!==U.url.href||U.error!==a||s!==void 0&&s!==M.form||d)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?u:M.data}),l}async function en({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:pt,current:pt},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:h(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},B.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=tn(t,r,n);return s&&e(i.href),a},setHeaders:g,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function tn(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:Lt?re(r,i.href,t):ne(r,t)}}function nn(e,t,n,r,i,a){if(Bt)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==U.params[e])return!0;for(let e of i.dependencies)if(At.some(t=>t(new URL(e))))return!0;return!1}function rn(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function an(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 on({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:On(M),constructors:[]}}}async function sn({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return Y.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:c}=i,d=[...s,c];o.forEach(e=>e?.().catch(g)),d.forEach(e=>e?.[1]().catch(g));let f=null,p=U.url?e!==fn(U.url):!1,ee=U.route?i.id!==U.route.id:!1,m=an(U.url,n),h=!1;{let t=d.map((e,t)=>{let n=U.branch[t],i=!!e?.[0]&&(n?.loader!==e[1]||nn(h,ee,p,m,n.server?.uses,r));return i&&(h=!0),i});if(t.some(Boolean)){try{f=await Sn(n,t)}catch(t){let o=await $(t,{url:n,params:r,route:{id:e}});return a&&Y.has(a)?on({error:o,url:n,params:r,route:i}):ln({status:it(t),error:o,url:n,route:i})}if(f.type===`redirect`)return f}}let _=f?.nodes,te=!1,v=d.map(async(e,t)=>{if(!e)return;let a=U.branch[t],o=_?.[t];if((!o||o.type===`skip`)&&e[1]===a?.loader&&!nn(te,ee,p,m,a.universal?.uses,r))return a;if(te=!0,o?.type===`error`)throw o;return en({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await v[n])?.data);return e},server_data_node:rn(o===void 0&&e[0]?{type:`skip`}:o??null,e[0]?a?.server:void 0)})});for(let e of v)e.catch(g);let y=[];for(let e=0;e<d.length;e+=1)if(d[e])try{y.push(await v[e])}catch(t){if(t instanceof u)return{type:`redirect`,location:t.location};if(a&&Y.has(a))return on({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=it(t),c;if(_?.includes(t))s=t.status??s,c=t.error;else if(t instanceof l)c=t.body;else{if(await L.updated.check())return await Ct(),await R(n);c=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await cn(e,y,o);return d?$t({url:n,params:r,branch:y.slice(0,d.idx).concat(d.node),errors:o,status:s,error:c,route:i}):await mn(n,{id:i.id},c,s)}else y.push(void 0);return $t({url:n,params:r,branch:y,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function cn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function ln({status:e,error:t,url:n,route:r}){let i={},a=null;if(B.server_loads[0]===0)try{let e=await Sn(n,[!0]);if(e.type!==`data`||e.nodes[0]&&e.nodes[0].type!==`data`)throw 0;a=e.nodes[0]??null}catch(e){if(!(e instanceof l&&e.status===404)&&(n.origin!==E||n.pathname!==location.pathname||It))return await R(n)}try{return $t({url:n,params:i,branch:[await en({loader:Tt,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:rn(a)}),{node:await Et(),loader:Et,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof u){await Yt(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,`<`).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 un(e){let t=e.href;if(Nt.has(t))return Nt.get(t);let n;try{let r=(async()=>{let t=await B.hooks.reroute({url:new URL(e),fetch:async(t,n)=>tn(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})();Nt.set(t,r),n=await r}catch{Nt.delete(t);return}return n}async function X(e,t){if(e&&!A(e,S,B.hash)){let n=await un(e);if(!n)return;let r=dn(n);for(let n of wt){let i=n.exec(r);if(i)return{id:fn(e),invalidating:t,route:n,params:ee(i),url:e}}}}function dn(e){return p(B.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(S.length))||`/`}function fn(e){return(B.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function pn({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Dn(U,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 W||Pt.forEach(e=>e(c)),o?null:s}async function Z({type:t,url:n,popped:r,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:u={},accept:f=g,block:p=g,event:ee}){let m=J;J=u;let h=await X(n,!1),_=t===`enter`?Dn(U,h,n,t):pn({url:n,type:t,delta:r?.delta,intent:h,scroll:r?.scroll,event:ee});if(!_){p(),J===u&&(J=m);return}let te=K,v=q;f(),W=!0,Lt&&_.navigation.type!==`enter`&&L.navigating.set(N.current=_.navigation);let y=h&&await sn(h);if(!y){if(A(n,S,B.hash))return await R(n,s);y=await mn(n,{id:null},await $(new d(404,`Not Found`,`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,s)}if(n=h?.url||n,J!==u){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:t,url:new URL(y.location,n),popped:r,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:u}),_.fulfil(void 0);return}if(y=await ln({status:500,error:await $(Error(`Redirect loop`),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await L.updated.check())return await Ct(),await R(n,s);if(Gt(),xt(te),Kt(v),y.props.page.url.pathname!==n.pathname&&(n.pathname=y.props.page.url.pathname),c=r?r.state:c,!r){let e=+!s,t={[C]:K+=e,[w]:q+=e,[xe]:c};(s?history.replaceState:history.pushState).call(history,t,``,n),s||St(K,q)}let ne=h&&V?.id===h.id?V.fork:null;V?.fork&&!ne?Mt():(V=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let re;if(Lt){let e=(await Promise.all(Array.from(Ft,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{H.delete(e)})}e.push(t),e.forEach(e=>{H.add(e)})}let t=_.navigation.to;U={...y.state,nav:{params:t.params,route:t.route,url:t.url}},y.props.page&&(y.props.page.url=n),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let r=ne&&await ne;r?re=r.commit():(P=null,Vt.$set(y.props),P&&Object.assign(y.props.page,P),lt(y.props.page),re=i?.()),zt=!0}else await Qt(y,Dt,!1);let{activeElement:b}=document;if(await re,await e(),await e(),J!==u){_.reject(Error(`navigation aborted`));return}y.props.page&&P&&Object.assign(y.props.page,P);let x=null;if(Rt){let e=r?r.scroll:o?D():null;e?scrollTo(e.x,e.y):(x=n.hash&&document.getElementById(An(n)))?x.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==b&&document.activeElement!==document.body;!a&&!ie&&En(n,!x),Rt=!0,W=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=D()),H.forEach(e=>e(_.navigation)),t===`popstate`&&qt(q),L.navigating.set(N.current=null)}async function mn(e,t,n,r,i){return e.origin===E&&e.pathname===location.pathname&&!It?await ln({status:r,error:n,url:e,route:t}):await R(e,i)}var Q={element:void 0,href:void 0};function hn(){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&&(Zt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Ee(e,z),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=De(r,S,B.hash);if(o||s)return;let c=k(r),l=a&&fn(U.url)===fn(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=T.tap;let e=await X(a,!1);if(!e)return;Xt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,Zt(a))}}function a(){r.disconnect();for(let e of z.querySelectorAll(`a`)){let{url:t,external:n,download:i}=De(e,S,B.hash);if(n||i)continue;let a=k(e);a.reload||(a.preload_code===T.viewport&&r.observe(e),a.preload_code===T.eager&&Zt(t))}}H.add(a),a()}function $(e,t){if(e instanceof l)return e.body;let n=it(e),r=at(e);return B.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function gn(e,t){_t(()=>(e.add(t),()=>{e.delete(t)}))}function _n(e){gn(H,e)}function vn(e){if(typeof e==`function`)At.push(e);else{let{href:t}=new URL(e,location.href);At.push(e=>e.href===t)}}function yn(e,t){let n={[C]:K,[w]:q,[Se]:M.url.href,[xe]:t};history.replaceState(n,``,Ce(e)),M.state=t,Vt.$set({page:yt(()=>On(M))})}function bn(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(Jt(),!W){let e=Dn(U,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};Pt.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&Jt()}),navigator.connection?.saveData||hn(),z.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Ee(t.composedPath()[0],z);if(!n)return;let{url:r,external:i,target:a,download:o}=De(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=k(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)){pn({url:r,type:`link`,event:t})?W=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=U.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(G=!0,xt(K),e(r),!s.replace_state)return;G=!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(A(r,S,!1))return;let i=e.target,a=k(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(!Tn){if(t.state?.[`sveltekit:history`]){let n=t.state[C];if(J={},n===K)return;let r=F[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[w],s=U.url?m(location)===m(U.url):!1;if(o===q&&(zt||s)){i!==M.state&&(M.state=i),e(a),F[K]=D(),r&&scrollTo(r.x,r.y),K=n;return}let c=n-K;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{K=n,q=o},block:()=>{history.go(-c)},nav_token:J,event:t})}else G||(e(new URL(location.href)),B.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{G&&(G=!1,history.replaceState({...history.state,[C]:++K,[w]:q},``,location.href))});for(let e of document.querySelectorAll(`link`))bt.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&L.navigating.set(N.current=null)});function e(e){U.url=M.url=e,L.page.set(On(M)),L.page.notify()}}async function xn(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){It=!0;let l=new URL(location.href),d;({params:i={},route:a={id:null}}=await X(l,!1)||{}),d=wt.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=wn(r.uses)),en({loader:B.nodes[t],url:l,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:rn(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await $t({url:l,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof u)return await R(new URL(t.location,location.href));f=await ln({status:it(t),error:await $(t,{url:l,params:i,route:a}),url:l,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await Qt(f,e,p))}async function Sn(e,t){let n=new URL(e);n.pathname=ft(e.pathname),e.pathname.endsWith(`/`)&&n.searchParams.append(rt,`1`),n.searchParams.append(nt,t.map(e=>e?`1`:`0`).join(``));let r=await(0,window.fetch)(n.href,{});if(!r.ok){let e;throw r.headers.get(`content-type`)?.includes(`application/json`)?e=await r.json():r.status===404?e=`Not Found`:r.status===500&&(e=`Internal Error`),new l(r.status,e)}return new Promise((e,t)=>{Cn(e,r).catch(t)})}async function Cn(e,t){let n=t.body.getReader(),r=new Map;function i(e){return $e(e,{...B.decoders,Promise:e=>new Promise((t,n)=>{r.set(e,{fulfil:t,reject:n})})})}for await(let t of gt(n)){if(t.type===`redirect`)return e(t);if(t.type===`data`)t.nodes?.forEach(e=>{e?.type===`data`&&(e.uses=wn(e.uses),e.data=i(e.data))}),e(t);else if(t.type===`chunk`){let{id:e,data:n,error:a}=t,o=r.get(e);r.delete(e),a?o.reject(i(a)):o.fulfil(i(n))}}}function wn(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Tn=!1;function En(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=An(e);if(n&&document.getElementById(n)){let{x:r,y:i}=D();setTimeout(()=>{let a=history.state;Tn=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Tn=!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<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Dn(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(g),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},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 On(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 kn(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function An(e){let t;if(B.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{M as a,N as i,yn as n,je as o,Wt as r,_e as s,_n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as e}from"../nodes/2.BeOldRUA.js";export{e as startPanelResize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Tt as e,ct as t}from"./0Tfhif1V.js";import{a as n}from"./
|
|
1
|
+
import{Tt as e,ct as t}from"./0Tfhif1V.js";import{a as n}from"./CgYTrsc7.js";import{m as r}from"./D9jhmf3I.js";var i={},a=[`en`,`zh`,`id`,`es`],o=`dsi.locale`,s=3456e4,c=[`cookie`,`preferredLanguage`,`baseLocale`],l=[],u=typeof window>`u`;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var d=!1,f=()=>{let e=c;!u&&typeof window<`u`&&window.location?.href&&(e=P(window.location.href));let t=p(e,typeof window<`u`?window.location?.href:void 0);if(t)return d||(d=!0,h(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found`)};function p(e,t){let n;for(let t of e){if(t===`cookie`)n=D();else if(t===`baseLocale`)n=`en`;else if(t===`preferredLanguage`&&!u)n=O();else if(I(t)&&F.has(t)){let e=F.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return v(t)}}let e=_(n);if(e)return e}}var m=e=>{e?window.location.href=e:window.location.reload()},h=(e,t)=>{let n={reload:!0,...t},r;try{r=f()}catch{}let i=[],a=c;!u&&typeof window<`u`&&window.location?.href&&(a=P(window.location.href));for(let t of a)if(t===`cookie`){if(u||typeof document>`u`||typeof window>`u`)continue;let t=`${o}=${e}; path=/; max-age=${s}`;document.cookie=t,T()}else if(t===`baseLocale`)continue;else if(I(t)&&F.has(t)){let n=F.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let l=()=>{!u&&n.reload&&window.location&&e!==r&&m(void 0)};if(i.length)return Promise.all(i).then(()=>{l()});l()},g=()=>typeof window<`u`?window.location.origin:`http://fallback.com`;function _(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of a)if(e.toLowerCase()===t)return e}function v(e){let t=_(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${a.join(`, `)}`)}function y(e){return e}function b(e,t){return e.exec(t.href)}var x=o.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),S=RegExp(`(?:^|;\\s*)${x}=([^;]*)`),C=Symbol(),w=C;function T(){w=C}function E(){typeof queueMicrotask==`function`?queueMicrotask(T):Promise.resolve().then(T)}function D(){if(typeof document>`u`)return;if(w!==C)return w;let e=document.cookie.match(S)?.[1];return w=_(e),E(),w}function O(){if(!navigator?.languages?.length)return;let e=navigator.languages.map(e=>({fullTag:e,baseTag:e.split(`-`)[0]}));for(let t of e){let e=_(t.fullTag);if(e)return e;let n=_(t.baseTag);if(n)return n}}function k(e){return A(e)}function A(e){let t=y(typeof e==`string`?new URL(e,g()):new URL(e)),n=t.pathname.split(`/`).filter(Boolean);return n.length>0&&_(n[0])&&(t.pathname=`/`+n.slice(1).join(`/`)),y(t)}var j,M;function N(e){if(l.length===0)return;let t=typeof e==`string`?e:e.href;if(j===t)return M;let n=y(new URL(t,`http://example.com`)),r=k(n),a=r.href===n.href?[n]:[n,r],o;for(let e of a){for(let t of l)if(b(new i(t.match,e.href),e)){o=t;break}if(o)break}return j=t,M=o,o}function P(e){let t=N(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:c}var F=new Map;function I(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}var L=t({locale:`en`});function R(){let t=e(L).locale;try{let e=f();if(r.includes(e))return e}catch{}return r.includes(t)?t:`en`}async function z(e){if(r.includes(e)){await h(e,{reload:!1});try{localStorage.setItem(`dsi.locale`,e)}catch{}L.locale=e}}function B(t){e(L).locale;try{let e=f();if(r.includes(e))return t()}catch{}return t()}var V=()=>`← Back to the workspace`,H=()=>`← 返回工作区`,U=()=>`← Kembali ke workspace`,W=()=>`← Volver al workspace`,ee=((e={},t={})=>{let n=t.locale??f();return n===`zh`?H(e):n===`id`?U(e):n===`es`?W(e):V(e)}),G=()=>`DSH host unreachable`,K=()=>`DSH 主机不可达`,q=()=>`Host DSH tidak dapat dijangkau`,J=()=>`Host DSH inalcanzable`,Y=((e={},t={})=>{let n=t.locale??f();return n===`zh`?K(e):n===`id`?q(e):n===`es`?J(e):G(e)}),X=()=>`It may have been reaped, or the link predates this host's ledger.`,Z=()=>`它可能已被回收,或链接早于此主机的账本。`,Q=()=>`Mungkin sudah dihapus, atau tautannya lebih tua dari ledger host ini.`,$=()=>`Puede haber sido recolectada, o el enlace es anterior al libro mayor de este host.`,te=((e={},t={})=>{let n=t.locale??f();return n===`zh`?Z(e):n===`id`?Q(e):n===`es`?$(e):X(e)}),ne=()=>`Session not found`,re=()=>`会话未找到`,ie=()=>`Sesi tidak ditemukan`,ae=()=>`Sesión no encontrada`,oe=((e={},t={})=>{let n=t.locale??f();return n===`zh`?re(e):n===`id`?ie(e):n===`es`?ae(e):ne(e)}),se=()=>`Unexpected error`,ce=()=>`意外错误`,le=()=>`Kesalahan tak terduga`,ue=()=>`Error inesperado`,de=((e={},t={})=>{let n=t.locale??f();return n===`zh`?ce(e):n===`id`?le(e):n===`es`?ue(e):se(e)}),fe={get data(){return n.data},get error(){return n.error},get form(){return n.form},get params(){return n.params},get route(){return n.route},get state(){return n.state},get status(){return n.status},get url(){return n.url}};export{Y as a,z as c,te as i,B as l,de as n,ee as o,oe as r,R as s,fe as t,f as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"../nodes/2.BeOldRUA.js";export{e as stringify};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DopnsZUT.js","../chunks/0Tfhif1V.js","../chunks/xihTtKlq.js","../chunks/CTWtsoJD.js","../chunks/D9jhmf3I.js","../assets/0.Bjw4vcZl.css","../nodes/1.
|
|
2
|
-
import{E as e,I as t,J as n,K as r,L as i,M as a,Ot as o,P as s,R as c,V as l,a as u,at as d,bt as f,et as p,ft as m,i as h,l as g,mt as _,nt as v,ot as y,r as b,st as x,tt as S,ut as C,xt as w}from"../chunks/0Tfhif1V.js";import{t as T}from"../chunks/HclGiUj8.js";import"../chunks/xihTtKlq.js";var E={},D=c(`<div data-svelte="root" id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=c(`<!> <!>`,1);function k(c,h){w(h,!0);let T=u(h,`components`,23,()=>[]),E=u(h,`data_0`,3,null),k=u(h,`data_1`,3,null);v(()=>h.stores.page.set(h.page)),S(()=>{h.stores,h.page,h.constructors,T(),h.form,E(),k(),h.stores.page.notify()});let A=m(!1),j=m(!1),M=m(null);b(()=>{let e=h.stores.page.subscribe(()=>{r(A)&&(C(j,!0),n().then(()=>{C(M,document.title||`untitled page`,!0)}))});return C(A,!0),e});let N=_(()=>h.constructors[1]);var P=O(),F=y(P),I=n=>{let a=_(()=>h.constructors[0]);var o=i(),s=y(o);e(s,()=>r(a),(n,a)=>{g(a(n,{get data(){return E()},get form(){return h.form},get params(){return h.page.params},children:(n,a)=>{var o=i(),s=y(o);e(s,()=>r(N),(e,t)=>{g(t(e,{get data(){return k()},get form(){return h.form},get params(){return h.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),t(n,o)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,o)},L=n=>{let a=_(()=>h.constructors[0]);var o=i(),s=y(o);e(s,()=>r(a),(e,t)=>{g(t(e,{get data(){return E()},get form(){return h.form},get params(){return h.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,o)};a(F,e=>{h.constructors[1]?e(I):e(L,-1)});var R=x(F,2),z=e=>{var n=D(),i=d(n),c=e=>{var n=l();p(()=>s(n,r(M))),t(e,n)};a(i,e=>{r(j)&&e(c)}),o(n),t(e,n)};a(R,e=>{r(A)&&e(z)}),t(c,P),f()}var A=h(k),j=[()=>T(()=>import(`../nodes/0.DopnsZUT.js`),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>T(()=>import(`../nodes/1.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DopnsZUT.js","../chunks/0Tfhif1V.js","../chunks/xihTtKlq.js","../chunks/CTWtsoJD.js","../chunks/D9jhmf3I.js","../assets/0.Bjw4vcZl.css","../nodes/1.BpeytF2X.js","../chunks/DxK-AwFF.js","../chunks/CgYTrsc7.js","../nodes/2.BeOldRUA.js","../chunks/HclGiUj8.js","../assets/2.glyfXGzi.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{E as e,I as t,J as n,K as r,L as i,M as a,Ot as o,P as s,R as c,V as l,a as u,at as d,bt as f,et as p,ft as m,i as h,l as g,mt as _,nt as v,ot as y,r as b,st as x,tt as S,ut as C,xt as w}from"../chunks/0Tfhif1V.js";import{t as T}from"../chunks/HclGiUj8.js";import"../chunks/xihTtKlq.js";var E={},D=c(`<div data-svelte="root" id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=c(`<!> <!>`,1);function k(c,h){w(h,!0);let T=u(h,`components`,23,()=>[]),E=u(h,`data_0`,3,null),k=u(h,`data_1`,3,null);v(()=>h.stores.page.set(h.page)),S(()=>{h.stores,h.page,h.constructors,T(),h.form,E(),k(),h.stores.page.notify()});let A=m(!1),j=m(!1),M=m(null);b(()=>{let e=h.stores.page.subscribe(()=>{r(A)&&(C(j,!0),n().then(()=>{C(M,document.title||`untitled page`,!0)}))});return C(A,!0),e});let N=_(()=>h.constructors[1]);var P=O(),F=y(P),I=n=>{let a=_(()=>h.constructors[0]);var o=i(),s=y(o);e(s,()=>r(a),(n,a)=>{g(a(n,{get data(){return E()},get form(){return h.form},get params(){return h.page.params},children:(n,a)=>{var o=i(),s=y(o);e(s,()=>r(N),(e,t)=>{g(t(e,{get data(){return k()},get form(){return h.form},get params(){return h.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),t(n,o)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,o)},L=n=>{let a=_(()=>h.constructors[0]);var o=i(),s=y(o);e(s,()=>r(a),(e,t)=>{g(t(e,{get data(){return E()},get form(){return h.form},get params(){return h.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,o)};a(F,e=>{h.constructors[1]?e(I):e(L,-1)});var R=x(F,2),z=e=>{var n=D(),i=d(n),c=e=>{var n=l();p(()=>s(n,r(M))),t(e,n)};a(i,e=>{r(j)&&e(c)}),o(n),t(e,n)};a(R,e=>{r(A)&&e(z)}),t(c,P),f()}var A=h(k),j=[()=>T(()=>import(`../nodes/0.DopnsZUT.js`),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>T(()=>import(`../nodes/1.BpeytF2X.js`),__vite__mapDeps([6,1,2,7,8,4]),import.meta.url),()=>T(()=>import(`../nodes/2.BeOldRUA.js`),__vite__mapDeps([9,1,8,10,2,4,3,7,11]),import.meta.url)],M=[],N={"/":[-3]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,r as t}from"../chunks/CgYTrsc7.js";export{e as load_css,t as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e,K as t,M as n,Ot as r,P as i,R as a,Z as o,at as s,bt as c,et as l,mt as u,ot as d,rt as f,st as p,w as m,xt as h}from"../chunks/0Tfhif1V.js";import"../chunks/xihTtKlq.js";import{a as g,i as _,l as v,n as y,o as b,r as x,t as S}from"../chunks/
|
|
1
|
+
import{I as e,K as t,M as n,Ot as r,P as i,R as a,Z as o,at as s,bt as c,et as l,mt as u,ot as d,rt as f,st as p,w as m,xt as h}from"../chunks/0Tfhif1V.js";import"../chunks/xihTtKlq.js";import{a as g,i as _,l as v,n as y,o as b,r as x,t as S}from"../chunks/DxK-AwFF.js";var C=a(`<h1 class="text-xl font-semibold"> </h1> <p class="text-sm text-text-secondary" data-testid="error-message"> </p> <p class="text-xs text-text-muted"> </p>`,1),w=a(`<h1 class="text-xl font-semibold"> </h1> <p class="text-sm text-text-secondary" data-testid="error-message"> </p>`,1),T=a(`<main data-svelte="ErrorPage" class="mx-auto flex max-w-3xl flex-col items-center gap-4 px-4 py-16 text-center"><p class="text-5xl font-semibold text-text-muted" data-testid="error-status"> </p> <!> <a href="/" class="mt-2 rounded-md border border-surface-border px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-alt" data-testid="error-back-home"> </a></main>`);function E(a,E){h(E,!0);let D=u(()=>S.status),O=u(()=>S.error?.message??`Something went wrong.`);var k=T();m(`1j96wlh`,e=>{o(()=>{f.title=`${t(D)??``} — deepseek-insight`})});var A=s(k),j=s(A,!0);r(A);var M=p(A,2),N=n=>{var a=C(),o=d(a),c=s(o,!0);r(o);var u=p(o,2),f=s(u,!0);r(u);var m=p(u,2),h=s(m,!0);r(m),l((e,n)=>{i(c,e),i(f,t(O)),i(h,n)},[()=>v(x),()=>v(_)]),e(n,a)},P=n=>{var a=w(),o=d(a),c=s(o,!0);r(o);var u=p(o,2),f=s(u,!0);r(u),l(e=>{i(c,e),i(f,t(O))},[()=>v(g)]),e(n,a)},F=n=>{var a=w(),o=d(a),c=s(o,!0);r(o);var u=p(o,2),f=s(u,!0);r(u),l(e=>{i(c,e),i(f,t(O))},[()=>v(y)]),e(n,a)};n(M,e=>{t(D)===404?e(N):t(D)===503?e(P,1):e(F,-1)});var I=p(M,2),L=s(I,!0);r(I),r(k),l(e=>{i(j,t(D)),i(L,e)},[()=>v(b)]),e(a,k),c()}export{E as component};
|