@juspay/shooter 1.21.0 → 1.22.0
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/.claude/hooks/notifier.cjs +94 -1
- package/build/client/_app/immutable/assets/2.JWRrnR-w.css +1 -0
- package/build/client/_app/immutable/assets/2.JWRrnR-w.css.br +0 -0
- package/build/client/_app/immutable/assets/2.JWRrnR-w.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BfbPKMXz.js +3 -0
- package/build/client/_app/immutable/chunks/BfbPKMXz.js.br +0 -0
- package/build/client/_app/immutable/chunks/BfbPKMXz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C4Hns_Wl.js +1 -0
- package/build/client/_app/immutable/chunks/C4Hns_Wl.js.br +0 -0
- package/build/client/_app/immutable/chunks/C4Hns_Wl.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BmfLecb1.js → CZg4kn4E.js} +1 -1
- package/build/client/_app/immutable/chunks/CZg4kn4E.js.br +0 -0
- package/build/client/_app/immutable/chunks/CZg4kn4E.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{EqMAkEha.js → DhK7PwI_.js} +1 -1
- package/build/client/_app/immutable/chunks/DhK7PwI_.js.br +0 -0
- package/build/client/_app/immutable/chunks/DhK7PwI_.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.CeSxgGat.js → app.CTqz33nP.js} +2 -2
- package/build/client/_app/immutable/entry/app.CTqz33nP.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CTqz33nP.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.Dj-Kvgwo.js +1 -0
- package/build/client/_app/immutable/entry/start.Dj-Kvgwo.js.br +2 -0
- package/build/client/_app/immutable/entry/start.Dj-Kvgwo.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.oaPwxh1O.js → 0.Qn7Ktiht.js} +1 -1
- package/build/client/_app/immutable/nodes/0.Qn7Ktiht.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.Qn7Ktiht.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.DMPyoM-M.js → 1.BxWOfNlo.js} +1 -1
- package/build/client/_app/immutable/nodes/1.BxWOfNlo.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BxWOfNlo.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{10.Cbm7nQKK.js → 10.BGPYD1s1.js} +1 -1
- package/build/client/_app/immutable/nodes/10.BGPYD1s1.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.BGPYD1s1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{11.CKmZjP_a.js → 11.BxY1PUjC.js} +1 -1
- package/build/client/_app/immutable/nodes/11.BxY1PUjC.js.br +0 -0
- package/build/client/_app/immutable/nodes/{11.CKmZjP_a.js.gz → 11.BxY1PUjC.js.gz} +0 -0
- package/build/client/_app/immutable/nodes/2.Bc2qALkX.js +23 -0
- package/build/client/_app/immutable/nodes/2.Bc2qALkX.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.Bc2qALkX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.BgLpGnzb.js → 3.N2-A8noI.js} +1 -1
- package/build/client/_app/immutable/nodes/3.N2-A8noI.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.N2-A8noI.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.Avc1-gVb.js → 5.DziEu9rx.js} +1 -1
- package/build/client/_app/immutable/nodes/5.DziEu9rx.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.DziEu9rx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.Dw2wEssJ.js → 6.BWF9Qx6F.js} +1 -1
- package/build/client/_app/immutable/nodes/6.BWF9Qx6F.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BWF9Qx6F.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.DwKZjoBg.js → 7.DHuDIdpz.js} +1 -1
- package/build/client/_app/immutable/nodes/7.DHuDIdpz.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.DHuDIdpz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.ZUAI6g5E.js → 8.D0Ijt9Vv.js} +1 -1
- package/build/client/_app/immutable/nodes/8.D0Ijt9Vv.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.D0Ijt9Vv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.I_KGXPwB.js → 9.2Piwo35J.js} +1 -1
- package/build/client/_app/immutable/nodes/9.2Piwo35J.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.2Piwo35J.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/pty-holder.cjs +6 -0
- package/build/server/chunks/{0-vrTNAfZB.js → 0-CVGsyVKN.js} +2 -2
- package/build/server/chunks/{0-vrTNAfZB.js.map → 0-CVGsyVKN.js.map} +1 -1
- package/build/server/chunks/{1-nbr-bOoF.js → 1-BAlAsKdp.js} +2 -2
- package/build/server/chunks/{1-nbr-bOoF.js.map → 1-BAlAsKdp.js.map} +1 -1
- package/build/server/chunks/{10-ChyvvJ6w.js → 10-BUCX7Aqz.js} +2 -2
- package/build/server/chunks/{10-ChyvvJ6w.js.map → 10-BUCX7Aqz.js.map} +1 -1
- package/build/server/chunks/{11-6ZAjL3uU.js → 11-DHPvc2yA.js} +2 -2
- package/build/server/chunks/{11-6ZAjL3uU.js.map → 11-DHPvc2yA.js.map} +1 -1
- package/build/server/chunks/{2-DWFRVDWJ.js → 2-DLOMdCHW.js} +4 -4
- package/build/server/chunks/{2-DWFRVDWJ.js.map → 2-DLOMdCHW.js.map} +1 -1
- package/build/server/chunks/{3-CKANM_WM.js → 3-DCf69LYo.js} +2 -2
- package/build/server/chunks/{3-CKANM_WM.js.map → 3-DCf69LYo.js.map} +1 -1
- package/build/server/chunks/{5-BxVjs2qi.js → 5-D-Uv1voC.js} +2 -2
- package/build/server/chunks/{5-BxVjs2qi.js.map → 5-D-Uv1voC.js.map} +1 -1
- package/build/server/chunks/{6-Cbf1AAMQ.js → 6-DUrC2Naz.js} +2 -2
- package/build/server/chunks/{6-Cbf1AAMQ.js.map → 6-DUrC2Naz.js.map} +1 -1
- package/build/server/chunks/{7-CMK2quEf.js → 7-TXwjMHt2.js} +2 -2
- package/build/server/chunks/{7-CMK2quEf.js.map → 7-TXwjMHt2.js.map} +1 -1
- package/build/server/chunks/{8-DhdfkfDM.js → 8-D2X_jBsT.js} +2 -2
- package/build/server/chunks/{8-DhdfkfDM.js.map → 8-D2X_jBsT.js.map} +1 -1
- package/build/server/chunks/{9-CPpxtRM5.js → 9-DK0hH5Xa.js} +2 -2
- package/build/server/chunks/{9-CPpxtRM5.js.map → 9-DK0hH5Xa.js.map} +1 -1
- package/build/server/chunks/_page.svelte-8OFzwdNA.js +758 -0
- package/build/server/chunks/_page.svelte-8OFzwdNA.js.map +1 -0
- package/build/server/chunks/{_server.ts-BWVlO8iV.js → _server.ts-05JJOdcX.js} +15 -12
- package/build/server/chunks/_server.ts-05JJOdcX.js.map +1 -0
- package/build/server/chunks/{_server.ts-CC2K8-L2.js → _server.ts-B54Pvhgc.js} +3 -2
- package/build/server/chunks/_server.ts-B54Pvhgc.js.map +1 -0
- package/build/server/chunks/{_server.ts-BevnuePu.js → _server.ts-BCljU9Sg.js} +7 -3
- package/build/server/chunks/_server.ts-BCljU9Sg.js.map +1 -0
- package/build/server/chunks/{_server.ts-D-vgx5UZ.js → _server.ts-BTmknWpO.js} +2 -2
- package/build/server/chunks/{_server.ts-D-vgx5UZ.js.map → _server.ts-BTmknWpO.js.map} +1 -1
- package/build/server/chunks/{_server.ts-tChyh9FX.js → _server.ts-BXhmLZwN.js} +4 -2
- package/build/server/chunks/{_server.ts-tChyh9FX.js.map → _server.ts-BXhmLZwN.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CvJKTS3Z.js → _server.ts-BbRSpB74.js} +4 -2
- package/build/server/chunks/{_server.ts-CvJKTS3Z.js.map → _server.ts-BbRSpB74.js.map} +1 -1
- package/build/server/chunks/{_server.ts-Dp-hXW_I.js → _server.ts-Bol54_Qo.js} +3 -2
- package/build/server/chunks/_server.ts-Bol54_Qo.js.map +1 -0
- package/build/server/chunks/{_server.ts-X1R7L_QI.js → _server.ts-C0PO_cAu.js} +3 -2
- package/build/server/chunks/{_server.ts-X1R7L_QI.js.map → _server.ts-C0PO_cAu.js.map} +1 -1
- package/build/server/chunks/_server.ts-C6NRpe7e.js +33 -0
- package/build/server/chunks/_server.ts-C6NRpe7e.js.map +1 -0
- package/build/server/chunks/_server.ts-CGqCOCdK.js +53 -0
- package/build/server/chunks/_server.ts-CGqCOCdK.js.map +1 -0
- package/build/server/chunks/{_server.ts-CA5KUENM.js → _server.ts-CZb-BI5H.js} +3 -2
- package/build/server/chunks/_server.ts-CZb-BI5H.js.map +1 -0
- package/build/server/chunks/{_server.ts-VzDcFFgy.js → _server.ts-DPHRUFYS.js} +4 -2
- package/build/server/chunks/_server.ts-DPHRUFYS.js.map +1 -0
- package/build/server/chunks/{_server.ts-D0zRDSx0.js → _server.ts-D_WRex0k.js} +4 -2
- package/build/server/chunks/_server.ts-D_WRex0k.js.map +1 -0
- package/build/server/chunks/{_server.ts-CD7JP3fz.js → _server.ts-DiBMY7Ho.js} +3 -2
- package/build/server/chunks/_server.ts-DiBMY7Ho.js.map +1 -0
- package/build/server/chunks/{library-apns-Dl3iRE2h.js → library-apns-D8RPINlv.js} +62 -7
- package/build/server/chunks/library-apns-D8RPINlv.js.map +1 -0
- package/build/server/chunks/{pending-requests-C9p57WoU.js → pending-requests-8rWjrF6d.js} +3 -2
- package/build/server/chunks/pending-requests-8rWjrF6d.js.map +1 -0
- package/build/server/chunks/presence-store-Bx_g0-Gd.js +23 -0
- package/build/server/chunks/presence-store-Bx_g0-Gd.js.map +1 -0
- package/build/server/chunks/{pty-manager-ZqXqa-6A.js → pty-manager-CoWVT56F.js} +26 -5
- package/build/server/chunks/pty-manager-CoWVT56F.js.map +1 -0
- package/build/server/chunks/shooter-home-4f_HkdGI.js +10 -0
- package/build/server/chunks/shooter-home-4f_HkdGI.js.map +1 -0
- package/build/server/index.js +1 -1
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +38 -24
- package/build/server/manifest.js.map +1 -1
- package/package.json +2 -2
- package/src/lib/modules/client/common/index.ts +1 -0
- package/src/lib/modules/client/common/presence.ts +47 -0
- package/src/lib/modules/client/dashboard/AutopilotPanel.svelte +188 -4
- package/src/lib/modules/client/dashboard/autopilot-driver.svelte.ts +681 -0
- package/src/lib/modules/client/dashboard/decide-injection.ts +127 -0
- package/src/lib/modules/client/dashboard/store.svelte.ts +65 -24
- package/src/lib/modules/client/neurolink/fetch-proxy.ts +38 -1
- package/src/lib/modules/server/apn/apns-payload.ts +50 -0
- package/src/lib/modules/server/apn/library-apns.ts +50 -8
- package/src/lib/modules/server/apn/pending-requests.ts +3 -1
- package/src/lib/modules/server/sessions/autopilot-context.ts +57 -0
- package/src/lib/modules/server/sessions/autopilot-engine.ts +148 -43
- package/src/lib/modules/server/sessions/litellm-client.ts +90 -34
- package/src/lib/modules/server/sessions/next-step-consensus.ts +27 -2
- package/src/lib/modules/server/sessions/summary-store.ts +3 -1
- package/src/lib/modules/server/terminal/agent-launch.ts +26 -0
- package/src/lib/modules/server/terminal/pty-holder.cjs +6 -0
- package/src/lib/modules/server/terminal/pty-manager.ts +13 -3
- package/src/lib/modules/server/terminal/session-watcher.ts +12 -2
- package/src/lib/modules/server/terminal/terminal-store.ts +3 -1
- package/src/lib/modules/server/utils/shooter-home.ts +16 -0
- package/src/lib/modules/server/ws/presence-store.ts +50 -0
- package/src/lib/types/autopilot.ts +65 -0
- package/src/routes/api/autopilot/goal/+server.ts +72 -0
- package/src/routes/api/neurolink-proxy/+server.ts +8 -2
- package/src/routes/api/notify/+server.ts +22 -15
- package/src/routes/api/presence/+server.ts +39 -0
- package/src/routes/api/ws-status/+server.ts +8 -5
- package/build/client/_app/immutable/assets/2.BHi6pjT2.css +0 -1
- package/build/client/_app/immutable/assets/2.BHi6pjT2.css.br +0 -0
- package/build/client/_app/immutable/assets/2.BHi6pjT2.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BmfLecb1.js.br +0 -0
- package/build/client/_app/immutable/chunks/BmfLecb1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CRkG7oE4.js +0 -1
- package/build/client/_app/immutable/chunks/CRkG7oE4.js.br +0 -0
- package/build/client/_app/immutable/chunks/CRkG7oE4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DOEXXmsh.js +0 -3
- package/build/client/_app/immutable/chunks/DOEXXmsh.js.br +0 -0
- package/build/client/_app/immutable/chunks/DOEXXmsh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/EqMAkEha.js.br +0 -0
- package/build/client/_app/immutable/chunks/EqMAkEha.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CeSxgGat.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CeSxgGat.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DrnJFwxA.js +0 -1
- package/build/client/_app/immutable/entry/start.DrnJFwxA.js.br +0 -2
- package/build/client/_app/immutable/entry/start.DrnJFwxA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.oaPwxh1O.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.oaPwxh1O.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DMPyoM-M.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DMPyoM-M.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.Cbm7nQKK.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.Cbm7nQKK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.CKmZjP_a.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.zlrdNFtH.js +0 -13
- package/build/client/_app/immutable/nodes/2.zlrdNFtH.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.zlrdNFtH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BgLpGnzb.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BgLpGnzb.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.Avc1-gVb.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.Avc1-gVb.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.Dw2wEssJ.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.Dw2wEssJ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.DwKZjoBg.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.DwKZjoBg.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.ZUAI6g5E.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.ZUAI6g5E.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.I_KGXPwB.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.I_KGXPwB.js.gz +0 -0
- package/build/server/chunks/_page.svelte-tBuIq8Pg.js +0 -159
- package/build/server/chunks/_page.svelte-tBuIq8Pg.js.map +0 -1
- package/build/server/chunks/_server.ts-BWVlO8iV.js.map +0 -1
- package/build/server/chunks/_server.ts-BevnuePu.js.map +0 -1
- package/build/server/chunks/_server.ts-CA5KUENM.js.map +0 -1
- package/build/server/chunks/_server.ts-CC2K8-L2.js.map +0 -1
- package/build/server/chunks/_server.ts-CD7JP3fz.js.map +0 -1
- package/build/server/chunks/_server.ts-D0zRDSx0.js.map +0 -1
- package/build/server/chunks/_server.ts-Dp-hXW_I.js.map +0 -1
- package/build/server/chunks/_server.ts-VzDcFFgy.js.map +0 -1
- package/build/server/chunks/library-apns-Dl3iRE2h.js.map +0 -1
- package/build/server/chunks/pending-requests-C9p57WoU.js.map +0 -1
- package/build/server/chunks/pty-manager-ZqXqa-6A.js.map +0 -1
|
@@ -113,7 +113,15 @@ async function hasWebSocketClients() {
|
|
|
113
113
|
if (res.statusCode === 200) {
|
|
114
114
|
try {
|
|
115
115
|
const parsed = JSON.parse(data);
|
|
116
|
-
|
|
116
|
+
// Prefer the foreground-viewer signal: the persistent autonomy loop keeps
|
|
117
|
+
// connectedClients > 0 forever, which would suppress EVERY phone push. Only skip the
|
|
118
|
+
// push when a viewer is actually foregrounded. Fall back to the old count for
|
|
119
|
+
// servers that don't yet report viewerPresent.
|
|
120
|
+
if (typeof parsed.viewerPresent === 'boolean') {
|
|
121
|
+
resolve(parsed.viewerPresent);
|
|
122
|
+
} else {
|
|
123
|
+
resolve(parsed.connectedClients > 0);
|
|
124
|
+
}
|
|
117
125
|
} catch (e) {
|
|
118
126
|
resolve(false);
|
|
119
127
|
}
|
|
@@ -239,6 +247,11 @@ function adaptClaudeCodeEvent(cliArg, stdinData) {
|
|
|
239
247
|
// getSessionContext() can read the goal + last user msg + last assistant text.
|
|
240
248
|
data.sessionId = stdinData?.session_id || '';
|
|
241
249
|
|
|
250
|
+
// When this hook runs inside a Shooter-managed PTY, the pty-holder injects
|
|
251
|
+
// SHOOTER_TERMINAL_ID. Tag every event with it so the autopilot engine + phone
|
|
252
|
+
// driver can attribute the activity to this terminal. Empty for normal sessions.
|
|
253
|
+
data.terminalId = process.env.SHOOTER_TERMINAL_ID || '';
|
|
254
|
+
|
|
242
255
|
// --- PermissionRequest: Agent needs user permission to run a tool ---
|
|
243
256
|
if (cliArg === 'PermissionRequest') {
|
|
244
257
|
data.tool = stdinData?.tool_name || process.env.CLAUDE_TOOL_NAME || 'Unknown';
|
|
@@ -421,6 +434,7 @@ function adaptOpenCodeEvent(hookEventType, hookData = {}) {
|
|
|
421
434
|
files: hookData.files || [],
|
|
422
435
|
message: hookData.message || hookData.error || '',
|
|
423
436
|
questions: hookData.questions || [],
|
|
437
|
+
terminalId: process.env.SHOOTER_TERMINAL_ID || '',
|
|
424
438
|
};
|
|
425
439
|
|
|
426
440
|
return createCommonEvent('opencode', eventType, data);
|
|
@@ -536,12 +550,85 @@ function getSessionIdentifier() {
|
|
|
536
550
|
// SECTION 6: Event Processor (Source-Agnostic)
|
|
537
551
|
// ============================================
|
|
538
552
|
|
|
553
|
+
// ── Managed-terminal event forwarding ──────────────────────────────────────
|
|
554
|
+
// A Shooter-MANAGED terminal (launched via POST /api/terminals) runs its agent
|
|
555
|
+
// in a PTY that carries SHOOTER_TERMINAL_ID. For those terminals we forward the
|
|
556
|
+
// raw lifecycle activity — tool start/stop, idle, errors — to the server as a
|
|
557
|
+
// SKIP-PUSH broadcast, so the always-on autopilot engine and the phone driver
|
|
558
|
+
// can observe the agent and (in auto mode) drive it. This is the bridge that
|
|
559
|
+
// lets the engine/driver see a REAL managed agent. A normal session (no
|
|
560
|
+
// SHOOTER_TERMINAL_ID) forwards nothing, so its behaviour is unchanged.
|
|
561
|
+
const MANAGED_FORWARD_EVENTS = new Set(['tool.before', 'tool.after', 'session.idle', 'error']);
|
|
562
|
+
|
|
563
|
+
async function forwardManagedEvent(event) {
|
|
564
|
+
const terminalId = process.env.SHOOTER_TERMINAL_ID || '';
|
|
565
|
+
if (!terminalId || !MANAGED_FORWARD_EVENTS.has(event.eventType)) {
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
// The server's broadcastHookEvent() reads data.eventType + terminalId and maps
|
|
569
|
+
// this onto the wire event (agent-idle / tool-started / tool-completed /
|
|
570
|
+
// tool-failed) that the engine + driver consume.
|
|
571
|
+
const data = { ...event.data, eventType: event.eventType, terminalId };
|
|
572
|
+
// On idle, attach the agent's LAST message so the engine knows the OUTCOME (e.g. "the test
|
|
573
|
+
// failed because…"), not just which commands ran. Without the outcome the consensus lenses
|
|
574
|
+
// have nothing to converge on and every next-step stays tentative.
|
|
575
|
+
if (event.eventType === 'session.idle' && data.sessionId && !data.message) {
|
|
576
|
+
// The Stop hook can fire a beat before the agent's FINAL message is flushed to the JSONL, so
|
|
577
|
+
// a naive read returns an early "I'll do X" line instead of the outcome. Wait briefly for the
|
|
578
|
+
// flush, then read, so the engine's consensus is grounded in what actually happened.
|
|
579
|
+
await new Promise((resolve) => setTimeout(resolve, 700));
|
|
580
|
+
try {
|
|
581
|
+
const ctx = getSessionContext(data.sessionId);
|
|
582
|
+
if (ctx.lastAssistantText) {
|
|
583
|
+
data.message = ctx.lastAssistantText.slice(0, 600);
|
|
584
|
+
}
|
|
585
|
+
} catch {
|
|
586
|
+
// best-effort enrichment — forward without it on any read error
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
postManagedEvent(data);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
function postManagedEvent(data) {
|
|
593
|
+
try {
|
|
594
|
+
const payload = JSON.stringify({
|
|
595
|
+
data,
|
|
596
|
+
message: data.eventType || 'event',
|
|
597
|
+
skipPush: true, // engine/driver broadcast only — never a phone push
|
|
598
|
+
title: 'Autopilot activity',
|
|
599
|
+
});
|
|
600
|
+
const options = {
|
|
601
|
+
headers: {
|
|
602
|
+
Authorization: `Bearer ${AUTH_KEY}`,
|
|
603
|
+
'Content-Length': Buffer.byteLength(payload),
|
|
604
|
+
'Content-Type': 'application/json',
|
|
605
|
+
'User-Agent': 'Shooter-Notifier/3.0 managed',
|
|
606
|
+
},
|
|
607
|
+
method: 'POST',
|
|
608
|
+
};
|
|
609
|
+
const protocol = API_URL.startsWith('https') ? https : http;
|
|
610
|
+
const req = protocol.request(API_URL, options, (res) => {
|
|
611
|
+
res.on('data', () => {});
|
|
612
|
+
res.on('end', () => {});
|
|
613
|
+
});
|
|
614
|
+
req.on('error', (error) => debugLog(`managed-forward error: ${error.message}`));
|
|
615
|
+
req.setTimeout(3000, () => req.destroy(new Error('managed-forward timeout')));
|
|
616
|
+
req.write(payload);
|
|
617
|
+
req.end();
|
|
618
|
+
} catch (error) {
|
|
619
|
+
debugLog(`managed-forward exception: ${error.message}`);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
539
623
|
/**
|
|
540
624
|
* Process common events - NO source-specific logic here
|
|
541
625
|
*/
|
|
542
626
|
async function processEvent(event) {
|
|
543
627
|
debugLog(`Processing event: ${event.eventType} from ${event.source}`);
|
|
544
628
|
|
|
629
|
+
// Managed terminals: mirror raw activity to the engine/driver (skip-push).
|
|
630
|
+
await forwardManagedEvent(event);
|
|
631
|
+
|
|
545
632
|
switch (event.eventType) {
|
|
546
633
|
case 'tool.before':
|
|
547
634
|
handleToolStart(event);
|
|
@@ -1276,6 +1363,12 @@ function extractUserPromptText(entry) {
|
|
|
1276
1363
|
if (trimmed.startsWith('<system-reminder>')) return '';
|
|
1277
1364
|
if (trimmed.startsWith('<command-message>')) return '';
|
|
1278
1365
|
if (trimmed.startsWith('<command-name>')) return '';
|
|
1366
|
+
if (trimmed.startsWith('<command-args>')) return '';
|
|
1367
|
+
// Slash commands inject "<local-command-caveat>Caveat: …" / "<local-command-stdout>…" as the FIRST
|
|
1368
|
+
// user message — these were leaking into the goal subtitle ("Goal: <local-command-caveat>…").
|
|
1369
|
+
// Mirrors SYSTEM_TAG_PREFIXES in src/lib/modules/server/sessions/jsonl-reader.ts.
|
|
1370
|
+
if (trimmed.startsWith('<local-command')) return '';
|
|
1371
|
+
if (trimmed.startsWith('<task-notification>')) return '';
|
|
1279
1372
|
if (trimmed.startsWith('<bash-stdout>')) return '';
|
|
1280
1373
|
if (trimmed.startsWith('<bash-stderr>')) return '';
|
|
1281
1374
|
if (trimmed.startsWith('Caveat:')) return '';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.autopilot-panel.svelte-ziwu2n{background:var(--component-bg, #1a1a1a);border:1px solid var(--border, #2e2e2e);border-radius:var(--radius-lg, 8px);padding:var(--space-4, 16px);margin-bottom:var(--space-4, 16px)}.panel-header.svelte-ziwu2n{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-3, 12px)}.panel-title-row.svelte-ziwu2n{display:flex;align-items:center;gap:var(--space-2, 8px)}.panel-title.svelte-ziwu2n{color:var(--text-primary, #ededed);font-size:var(--text-sm, 13px);font-weight:600;letter-spacing:.04em;text-transform:uppercase}@keyframes svelte-ziwu2n-pulse{0%,to{opacity:1}50%{opacity:.4}}.status-dot-active.svelte-ziwu2n{animation:svelte-ziwu2n-pulse 2s ease-in-out infinite;background:var(--ds-green-700, #16a34a);border-radius:50%;display:inline-block;flex-shrink:0;height:7px;width:7px}.toggle-btn.svelte-ziwu2n{border:1px solid transparent;border-radius:var(--radius-full, 9999px);cursor:pointer;font-size:var(--text-xs, 12px);font-weight:600;padding:4px 14px;transition:background var(--transition-fast, .15s ease),color var(--transition-fast, .15s ease)}.toggle-btn--off.svelte-ziwu2n{background:var(--ds-green-alpha-200, rgba(22, 163, 74, .12));border-color:var(--ds-green-alpha-400, rgba(22, 163, 74, .3));color:var(--ds-green-700, #16a34a)}.toggle-btn--off.svelte-ziwu2n:hover{background:var(--ds-green-alpha-400, rgba(22, 163, 74, .2))}.toggle-btn--on.svelte-ziwu2n{background:var(--ds-gray-alpha-200, rgba(255, 255, 255, .06));border-color:var(--border, #2e2e2e);color:var(--text-secondary, #a1a1a1)}.toggle-btn--on.svelte-ziwu2n:hover{background:var(--ds-gray-alpha-300, rgba(255, 255, 255, .1));color:var(--text-primary, #ededed)}.toggle-btn.svelte-ziwu2n:focus-visible{outline:2px solid var(--ds-blue-700, #0070f3);outline-offset:2px}.panel-empty.svelte-ziwu2n{color:var(--text-tertiary, #7d7d7d);font-size:var(--text-xs, 12px);font-style:italic;margin:0}.sessions-list.svelte-ziwu2n{display:flex;flex-direction:column;gap:var(--space-3, 12px)}.session-card.svelte-ziwu2n{background:var(--bg-subtle, rgba(255, 255, 255, .02));border:1px solid var(--border-subtle, rgba(255, 255, 255, .06));border-radius:var(--radius-md, 6px);display:flex;flex-direction:column;gap:var(--space-2, 8px);padding:var(--space-3, 12px)}.session-header.svelte-ziwu2n{align-items:center;display:flex;gap:var(--space-2, 8px);justify-content:space-between}.session-name.svelte-ziwu2n{color:var(--text-primary, #ededed);flex:1;font-size:var(--text-sm, 13px);font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-status.svelte-ziwu2n{flex-shrink:0;font-size:var(--text-xs, 12px);font-weight:500}.session-status--idle.svelte-ziwu2n{color:var(--text-tertiary, #7d7d7d)}.session-summary.svelte-ziwu2n{-webkit-box-orient:vertical;-webkit-line-clamp:2;color:var(--text-secondary, #a1a1a1);display:-webkit-box;font-size:var(--text-xs, 12px);line-clamp:2;line-height:var(--leading-normal, 1.5);margin:0;overflow:hidden}.next-steps.svelte-ziwu2n{display:flex;flex-direction:column;gap:6px}.next-steps-label.svelte-ziwu2n{color:var(--text-tertiary, #7d7d7d);font-size:var(--text-xs, 12px);font-weight:600;letter-spacing:.06em;text-transform:uppercase}.steps-list.svelte-ziwu2n{display:flex;flex-direction:column;gap:5px;list-style:none;margin:0;padding:0}.step-item.svelte-ziwu2n{align-items:baseline;display:flex;gap:8px}.step-badge.svelte-ziwu2n{align-items:center;border-radius:var(--radius-full, 9999px);cursor:default;display:inline-flex;flex-shrink:0;font-size:10px;font-weight:700;height:18px;justify-content:center;min-width:20px;padding:0 5px}.step-badge--strong.svelte-ziwu2n{background:var(--ds-green-alpha-200, rgba(22, 163, 74, .12));color:var(--ds-green-700, #16a34a)}.step-badge--medium.svelte-ziwu2n{background:var(--ds-blue-alpha-200, rgba(0, 112, 243, .12));color:var(--ds-blue-700, #0070f3)}.step-badge--weak.svelte-ziwu2n{background:var(--ds-gray-alpha-200, rgba(255, 255, 255, .06));color:var(--text-tertiary, #7d7d7d)}.step-badge--tentative.svelte-ziwu2n{background:var(--ds-amber-alpha-200, rgba(217, 119, 6, .12));color:var(--ds-amber-700, #d97706);font-style:italic}.step-text.svelte-ziwu2n{color:var(--text-secondary, #a1a1a1);font-size:var(--text-xs, 12px);line-height:var(--leading-normal, 1.5)}.last-updated.svelte-ziwu2n{color:var(--text-tertiary, #7d7d7d);font-size:10px;margin-top:2px}.autonomy-row.svelte-ziwu2n{align-items:center;display:flex;gap:var(--space-2, 8px);justify-content:space-between;margin-bottom:var(--space-3, 12px)}.autonomy-label.svelte-ziwu2n{display:flex;flex-direction:column;gap:2px;min-width:0}.autonomy-title.svelte-ziwu2n{color:var(--text-primary, #ededed);font-size:var(--text-xs, 12px);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.autonomy-sub.svelte-ziwu2n{color:var(--text-tertiary, #7d7d7d);font-size:11px}.toggle-btn--danger.svelte-ziwu2n{background:var(--ds-red-alpha-200, rgba(220, 38, 38, .14));border-color:var(--ds-red-alpha-400, rgba(220, 38, 38, .35));color:var(--ds-red-700, #dc2626)}.toggle-btn--danger.svelte-ziwu2n:hover{background:var(--ds-red-alpha-400, rgba(220, 38, 38, .22))}.autonomy-warning.svelte-ziwu2n{background:var(--ds-amber-alpha-200, rgba(217, 119, 6, .12));border:1px solid var(--ds-amber-alpha-400, rgba(217, 119, 6, .3));border-radius:var(--radius-md, 6px);color:var(--ds-amber-700, #d97706);font-size:11px;margin-bottom:var(--space-3, 12px);padding:6px 10px}.actions-log.svelte-ziwu2n{display:flex;flex-direction:column;gap:5px;margin-bottom:var(--space-3, 12px)}.actions-label.svelte-ziwu2n{color:var(--text-tertiary, #7d7d7d);font-size:var(--text-xs, 12px);font-weight:600;letter-spacing:.06em;text-transform:uppercase}.actions-list.svelte-ziwu2n{display:flex;flex-direction:column;gap:4px;list-style:none;margin:0;padding:0}.action-item.svelte-ziwu2n{align-items:baseline;display:flex;font-size:11px;gap:8px}.action-kind.svelte-ziwu2n{border-radius:var(--radius-full, 9999px);flex-shrink:0;font-size:9px;font-weight:700;padding:1px 6px;text-transform:uppercase}.action-item--injected.svelte-ziwu2n .action-kind:where(.svelte-ziwu2n){background:var(--ds-green-alpha-200, rgba(22, 163, 74, .12));color:var(--ds-green-700, #16a34a)}.action-item--skipped.svelte-ziwu2n .action-kind:where(.svelte-ziwu2n){background:var(--ds-gray-alpha-200, rgba(255, 255, 255, .06));color:var(--text-tertiary, #7d7d7d)}.action-item--error.svelte-ziwu2n .action-kind:where(.svelte-ziwu2n){background:var(--ds-red-alpha-200, rgba(220, 38, 38, .14));color:var(--ds-red-700, #dc2626)}.action-detail.svelte-ziwu2n{color:var(--text-secondary, #a1a1a1);flex:1;font-family:var(--font-mono, monospace);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.action-time.svelte-ziwu2n{color:var(--text-tertiary, #7d7d7d);flex-shrink:0;font-size:10px}@keyframes svelte-1qbe2oo-pulse{0%,to{opacity:1}50%{opacity:.4}}@keyframes svelte-1qbe2oo-activity-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.5);opacity:.7}}.card.svelte-1qbe2oo{background:var(--component-bg, #1a1a1a);border:1px solid var(--border, #2e2e2e);border-left:4px solid var(--status-color, #6b7280);border-radius:var(--radius-lg, 8px);padding:var(--space-4, 16px);display:flex;flex-direction:column;gap:var(--space-3, 12px);cursor:pointer;transition:border-color var(--transition-fast, .15s ease),background var(--transition-fast, .15s ease);color:inherit;text-align:left;width:100%}.card.svelte-1qbe2oo:hover{background:var(--component-bg-hover, #1f1f1f);border-color:var(--border-hover, #454545);border-left-color:var(--status-color, #6b7280)}.card.svelte-1qbe2oo:focus-visible{outline:2px solid var(--ds-blue-700, #0070f3);outline-offset:2px}.card-header.svelte-1qbe2oo{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2, 8px);min-width:0}.project-name.svelte-1qbe2oo{font-size:var(--text-base, 14px);font-weight:600;color:var(--text-primary, #ededed);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.status-pill{--pill-font-size: var(--text-xs, 12px);--pill-font-weight: 500;--pill-padding: 3px 10px;--pill-border-radius: var(--radius-full, 9999px);--pill-cursor: default;flex-shrink:0}.status-pill--running-active{--pill-background: var(--ds-green-100);--pill-color: var(--ds-green-700);--pill-hover-background: var(--ds-green-100);--pill-hover-color: var(--ds-green-700);animation:svelte-1qbe2oo-pulse 2s ease-in-out infinite}.status-pill--running{--pill-background: var(--ds-blue-100);--pill-color: var(--ds-blue-700);--pill-hover-background: var(--ds-blue-100);--pill-hover-color: var(--ds-blue-700)}.status-pill--idle{--pill-background: var(--ds-amber-100);--pill-color: var(--ds-amber-700);--pill-hover-background: var(--ds-amber-100);--pill-hover-color: var(--ds-amber-700)}.status-pill--exited{--pill-background: var(--ds-gray-alpha-200);--pill-color: var(--ds-gray-600);--pill-hover-background: var(--ds-gray-alpha-200);--pill-hover-color: var(--ds-gray-600)}.status-pill--error{--pill-background: var(--ds-red-100);--pill-color: var(--ds-red-700);--pill-hover-background: var(--ds-red-100);--pill-hover-color: var(--ds-red-700)}.goal-text.svelte-1qbe2oo{font-size:var(--text-sm, 13px);color:var(--text-secondary, #a1a1a1);font-style:italic;margin:0;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:var(--leading-normal, 1.5)}.summary-row.svelte-1qbe2oo{min-height:18px}.summary-text.svelte-1qbe2oo{font-size:var(--text-sm, 13px);color:var(--text-primary, #ededed);line-height:var(--leading-normal, 1.5);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.summarizing.svelte-1qbe2oo{font-size:var(--text-xs, 12px);color:var(--ds-amber-700);font-style:italic}.summary-fallback.svelte-1qbe2oo{font-size:var(--text-xs, 12px);color:var(--text-tertiary, #7d7d7d);font-style:italic}.stats-row.svelte-1qbe2oo{display:flex;align-items:center;gap:var(--space-3, 12px);flex-wrap:wrap;min-width:0}.stat.svelte-1qbe2oo{display:inline-flex;align-items:center;gap:var(--space-1, 4px);font-size:var(--text-xs, 12px);color:var(--text-tertiary, #7d7d7d);white-space:nowrap}.stat-error.svelte-1qbe2oo{color:var(--ds-red-700)}.stat-path.svelte-1qbe2oo{font-family:var(--font-mono, monospace);overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1;text-align:right}.status-dot-active.svelte-1qbe2oo{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--ds-green-700);animation:svelte-1qbe2oo-activity-pulse .6s ease-in-out infinite;flex-shrink:0}.status-dot-static.svelte-1qbe2oo{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--ds-gray-600, #878787);flex-shrink:0}@media(max-width:768px){.card.svelte-1qbe2oo{padding:10px 12px}.stats-row.svelte-1qbe2oo{flex-wrap:wrap;gap:4px}}@media(max-width:480px){.card.svelte-1qbe2oo{padding:8px 10px}.goal-text.svelte-1qbe2oo{-webkit-line-clamp:1;line-clamp:1}}.section.svelte-14sxgtb{display:flex;flex-direction:column;gap:var(--space-3, 12px);margin-bottom:var(--space-6, 24px)}.section-label.svelte-14sxgtb{font-size:var(--text-xs, 12px);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-secondary, #a1a1a1);margin:0 0 var(--space-1, 4px) 0}.stats-bar.svelte-1uha8ag{display:flex;gap:10px;margin-top:var(--space-4)}.stat-chip.svelte-1uha8ag{display:flex;align-items:center;gap:6px;background:#ffffff0a;border:1px solid rgba(255,255,255,.06);border-radius:20px;padding:6px 14px}.stat-chip-active.svelte-1uha8ag{background:var(--ds-green-alpha-200);border-color:var(--ds-green-alpha-400)}.stat-value.svelte-1uha8ag{font-weight:700;font-size:.9rem;color:#f0f0f0}.stat-chip-active.svelte-1uha8ag .stat-value:where(.svelte-1uha8ag){color:var(--ds-green-500)}.stat-label.svelte-1uha8ag{font-size:.78rem;color:#a3a3a3cc}.dashboard-section.svelte-1uha8ag{margin-bottom:var(--space-6)}.section-label.svelte-1uha8ag{font-size:var(--text-xs, 12px);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-secondary);margin-bottom:var(--space-3)}.projects-container.svelte-1uha8ag{display:flex;flex-direction:column;gap:var(--space-3);animation:fadeIn .2s ease}@media(max-width:768px){.stats-bar.svelte-1uha8ag{flex-wrap:wrap}}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{bv as Te,v as Ve,s as P,g as j,b as N,P as oe,bw as At}from"./DWmC0QM7.js";class pe{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Le{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function Et(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function kt(e){return e.split("%25").map(decodeURI).join("%25")}function Rt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ye({href:e}){return e.split("#")[0]}function St(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const It=new TextDecoder;function Ut(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Tt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&z.delete(je(e)),Tt(e,t));const z=new Map;function Lt(e,t){const n=je(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&z.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=Ut(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Pt(e,t,n){if(z.size>0){const r=je(e,n),a=z.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);z.delete(r)}}return window.fetch(t,n)}function je(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${St(...a)}"]`}return r}const jt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Nt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${xt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((i,l)=>{if(l%2){if(i.startsWith("x+"))return ve(String.fromCharCode(parseInt(i.slice(2),16)));if(i.startsWith("u+"))return ve(String.fromCharCode(...i.slice(2).split("-").map(g=>parseInt(g,16))));const u=jt.exec(i),[,d,p,h,f]=u;return t.push({name:h,matcher:f,optional:!!d,rest:!!p,chained:p?l===1&&o[0]==="":!1}),p?"([^]*?)":d?"([^/]*)?":"([^/]+?)"}return ve(i)}).join("")}).join("")}/?$`),params:t}}function Ot(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Ot)}function Ct(e,t,n){const r={},a=e.slice(1),s=a.filter(c=>c!==void 0);let o=0;for(let c=0;c<t.length;c+=1){const i=t[c];let l=a[c-o];if(i.chained&&i.rest&&o&&(l=a.slice(c-o,c+1).filter(u=>u).join("/"),o=0),l===void 0)if(i.rest)l="";else continue;if(!i.matcher||n[i.matcher](l)){r[i.name]=l;const u=t[c+1],d=a[c+1];u&&!u.rest&&u.optional&&d&&i.chained&&(o=0),!u&&!d&&Object.keys(r).length===s.length&&(o=0);continue}if(i.optional&&i.chained){o++;continue}return}if(!o)return r}function ve(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Dt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([c,[i,l,u]])=>{const{pattern:d,params:p}=Nt(c),h={id:c,exec:f=>{const g=d.exec(f);if(g)return Ct(g,p,r)},errors:[1,...u||[]].map(f=>e[f]),layouts:[0,...l||[]].map(o),leaf:s(i)};return h.errors.length=h.layouts.length=Math.max(h.errors.length,h.layouts.length),h});function s(c){const i=c<0;return i&&(c=~c),[i,e[c]]}function o(c){return c===void 0?c:[a.has(c),e[c]]}}function Qe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function qe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_1gln3aw?.base??"",$t=globalThis.__sveltekit_1gln3aw?.assets??U??"",Bt="1781369023861",et="sveltekit:snapshot",tt="sveltekit:scroll",nt="sveltekit:states",Ft="sveltekit:pageurl",q="sveltekit:history",Q="sveltekit:navigation",B={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},re=location.origin;function Ne(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function M(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ye={...B,"":B.hover};function rt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function at(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=rt(e)}}function Ee(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const c=location.hash.split("#")[1]||"/";r.hash=`#${c}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||_e(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=r?.origin===re&&e.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function se(e){let t=null,n=null,r=null,a=null,s=null,o=null,c=e;for(;c&&c!==document.documentElement;)r===null&&(r=V(c,"preload-code")),a===null&&(a=V(c,"preload-data")),t===null&&(t=V(c,"keepfocus")),n===null&&(n=V(c,"noscroll")),s===null&&(s=V(c,"reload")),o===null&&(o=V(c,"replacestate")),c=rt(c);function i(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ye[r??"off"],preload_data:Ye[a??"off"],keepfocus:i(t),noscroll:i(n),reload:i(s),replace_state:i(o)}}function Ge(e){const t=Te(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function s(o){let c;return t.subscribe(i=>{(c===void 0||n&&i!==c)&&o(c=i)})}return{notify:r,set:a,subscribe:s}}const ot={v:()=>{}};function Mt(){const{set:e,subscribe:t}=Te(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${$t}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Bt;return o&&(e(!0),ot.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function _e(e,t,n){return e.origin!==re||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function jn(e){}const Vt=-1,qt=-2,Yt=-3,Gt=-4,Kt=-5,Wt=-6,Ht=-7,st=2**32-1,ke=st-1;function Xt(e){return!(!Number.isInteger(e)||e<0||e>ke)}function zt(e){return!(!Number.isInteger(e)||e<0||e>st)}function Jt(e){return Uint8Array.fromBase64(e).buffer}function Zt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Qt(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let a=0;a<n;a++)r[a]=t.charCodeAt(a);return r.buffer}const en=typeof Uint8Array.fromBase64=="function",tn=typeof process=="object"&&process.versions?.node!==void 0,nn=en?Jt:tn?Zt:Qt;function rn(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);let a=null;function s(o,c=!1){if(o===Vt)return;if(o===Yt)return NaN;if(o===Gt)return 1/0;if(o===Kt)return-1/0;if(o===Wt)return-0;if(c||typeof o!="number")throw new Error("Invalid input");if(o in r)return r[o];const i=n[o];if(!i||typeof i!="object")r[o]=i;else if(Array.isArray(i))if(typeof i[0]=="string"){const l=i[0],u=t&&Object.hasOwn(t,l)?t[l]:void 0;if(u){let d=i[1];if(typeof d!="number"&&(d=n.push(i[1])-1),a??=new Set,a.has(d))throw new Error("Invalid circular reference");return a.add(d),r[o]=u(s(d)),a.delete(d),r[o]}switch(l){case"Date":r[o]=new Date(i[1]);break;case"Set":const d=new Set;r[o]=d;for(let f=1;f<i.length;f+=1)d.add(s(i[f]));break;case"Map":const p=new Map;r[o]=p;for(let f=1;f<i.length;f+=2)p.set(s(i[f]),s(i[f+1]));break;case"RegExp":r[o]=new RegExp(i[1],i[2]);break;case"Object":{const f=i[1];if(typeof n[f]=="object"&&n[f][0]!=="BigInt")throw new Error("Invalid input");r[o]=Object(s(f));break}case"BigInt":r[o]=BigInt(i[1]);break;case"null":const h=Object.create(null);r[o]=h;for(let f=1;f<i.length;f+=2){if(i[f]==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");h[i[f]]=s(i[f+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(n[i[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const f=globalThis[l],g=s(i[1]);r[o]=i[2]!==void 0?new f(g,i[2],i[3]):new f(g);break}case"ArrayBuffer":{const f=i[1];if(typeof f!="string")throw new Error("Invalid ArrayBuffer encoding");const g=nn(f);r[o]=g;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const f=l.slice(9);r[o]=Temporal[f].from(i[1]);break}case"URL":{const f=new URL(i[1]);r[o]=f;break}case"URLSearchParams":{const f=new URLSearchParams(i[1]);r[o]=f;break}default:throw new Error(`Unknown type ${l}`)}}else if(i[0]===Ht){const l=i[1];if(!zt(l))throw new Error("Invalid input");const u=[];r[o]=u,u[ke]=void 0,delete u[ke];for(let d=2;d<i.length;d+=2){const p=i[d];if(!Xt(p)||p>=l)throw new Error("Invalid input");u[p]=s(i[d+1])}u.length=l}else{const l=new Array(i.length);r[o]=l;for(let u=0;u<i.length;u+=1){const d=i[u];d!==qt&&(l[u]=s(d))}}else{const l={};r[o]=l;for(const u of Object.keys(i)){if(u==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const d=i[u];l[u]=s(d)}}return r[o]}return s(0)}const it=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...it];const an=new Set([...it]);[...an];function on(e){return e.filter(t=>t!=null)}const sn="x-sveltekit-invalidated",cn="x-sveltekit-trailing-slash";function ie(e){return e instanceof pe||e instanceof Pe?e.status:500}function ln(e){return e instanceof Pe?e.text:"Internal Error"}let S,ee,be;const fn=Ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ve.toString()),Ke="a:";fn?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ke)},ee={current:null},be={current:!1}):(S=new class{#e=P({});get data(){return j(this.#e)}set data(t){N(this.#e,t)}#t=P(null);get form(){return j(this.#t)}set form(t){N(this.#t,t)}#n=P(null);get error(){return j(this.#n)}set error(t){N(this.#n,t)}#r=P({});get params(){return j(this.#r)}set params(t){N(this.#r,t)}#a=P({id:null});get route(){return j(this.#a)}set route(t){N(this.#a,t)}#o=P({});get state(){return j(this.#o)}set state(t){N(this.#o,t)}#s=P(-1);get status(){return j(this.#s)}set status(t){N(this.#s,t)}#i=P(new URL(Ke));get url(){return j(this.#i)}set url(t){N(this.#i,t)}},ee=new class{#e=P(null);get current(){return j(this.#e)}set current(t){N(this.#e,t)}},be=new class{#e=P(!1);get current(){return j(this.#e)}set current(t){N(this.#e,t)}},ot.v=()=>be.current=!0);function un(e){Object.assign(S,e)}const dn="/__data.json",hn=".html__data.json";function pn(e){return e.endsWith(".html")?e.replace(/\.html$/,hn):e.replace(/\/$/,"")+dn}const _n=new Set(["icon","shortcut icon","apple-touch-icon"]);let H=null;const D=Qe(tt)??{},te=Qe(et)??{},C={url:Ge({}),page:Ge({}),navigating:Te(null),updated:Mt()};function Oe(e){D[e]=M()}function gn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;te[n];)delete te[n],n+=1}function K(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function ct(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function We(){}let xe,Re,ce,x,Se,A;const le=[],fe=[];let L=null;function Ie(){L?.fork?.then(e=>e?.discard()),L=null}const ae=new Map,lt=new Set,mn=new Set,J=new Set;let w={branch:[],error:null,url:null},Ce=!1,ue=!1,He=!0,ne=!1,X=!1,ft=!1,De=!1,ut,R,I,F;const Z=new Set,Xe=new Map;async function Cn(e,t,n){globalThis.__sveltekit_1gln3aw?.data&&globalThis.__sveltekit_1gln3aw.data,document.URL!==location.href&&(location.href=location.href),A=e,await e.hooks.init?.(),xe=Dt(e),x=document.documentElement,Se=t,Re=e.nodes[0],ce=e.nodes[1],Re(),ce(),R=history.state?.[q],I=history.state?.[Q],R||(R=I=Date.now(),history.replaceState({...history.state,[q]:R,[Q]:I},""));const r=D[R];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await Un(Se,n)):(await Y({type:"enter",url:Ne(A.hash?Ln(new URL(location.href)):location.href),replace_state:!0}),a()),In()}function wn(){le.length=0,De=!1}function dt(e){fe.some(t=>t?.snapshot)&&(te[e]=fe.map(t=>t?.snapshot?.capture()))}function ht(e){te[e]?.forEach((t,n)=>{fe[n]?.snapshot?.restore(t)})}function ze(){Oe(R),qe(tt,D),dt(I),qe(et,te)}async function pt(e,t,n,r){let a;t.invalidateAll&&Ie(),await Y({type:"goto",url:Ne(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(De=!0,a=[...Xe.keys()]),t.invalidate&&t.invalidate.forEach(Sn)}}),t.invalidateAll&&oe().then(oe).then(()=>{Xe.forEach(({resource:s},o)=>{a?.includes(o)&&s.refresh?.()})})}async function yn(e){if(e.id!==L?.id){Ie();const t={};Z.add(t),L={id:e.id,token:t,promise:gt({...e,preload:t}).then(n=>(Z.delete(t),n.type==="loaded"&&n.state.error&&Ie(),n)),fork:null}}return L.promise}async function Ae(e){const t=(await me(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function _t(e,t,n){const r={params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)};w={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(S,e.props.page),ut=new A.root({target:t,props:{...e.props,stores:C,components:fe},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),ht(I),n){const s={from:null,to:{...r,scroll:D[R]??M()},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(s))}ue=!0}async function de({url:e,params:t,branch:n,errors:r,status:a,error:s,route:o,form:c}){let i="never";if(U&&(e.pathname===U||e.pathname===U+"/"))i="always";else for(const f of n)f?.slash!==void 0&&(i=f.slash);e.pathname=Et(e.pathname,i),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:s,route:o},props:{constructors:on(n).map(f=>f.node.component),page:Me(S)}};c!==void 0&&(l.props.form=c);let u={},d=!S,p=0;for(let f=0;f<Math.max(n.length,w.branch.length);f+=1){const g=n[f],b=w.branch[f];g?.data!==b?.data&&(d=!0),g&&(u={...u,...g.data},d&&(l.props[`data_${p}`]=u),p+=1)}return(!w.url||e.href!==w.url.href||w.error!==s||c!==void 0&&c!==S.form||d)&&(l.props.page={error:s,params:t,route:{id:o?.id??null},state:{},status:a,url:new URL(e),form:c??null,data:d?u:S.data}),l}async function $e({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let o=null;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},i=await e();return{node:i,loader:e,server:s,universal:i.universal?.load?{type:"data",data:o,uses:c}:null,data:o??s?.data??null,slash:i.universal?.trailingSlash??s?.slash}}function vn(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=ue?Pt(r,a.href,t):Lt(r,t);return{resolved:a,promise:s}}function Je(e,t,n,r,a,s){if(De)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==w.params[o])return!0;for(const o of a.dependencies)if(le.some(c=>c(new URL(o))))return!0;return!1}function Be(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function bn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function Ze({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Me(S),constructors:[]}}}async function gt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(L?.id===e)return Z.delete(L.token),L.promise;const{errors:o,layouts:c,leaf:i}=a,l=[...c,i];o.forEach(m=>m?.().catch(()=>{})),l.forEach(m=>m?.[1]().catch(()=>{}));let u=null;const d=w.url?e!==he(w.url):!1,p=w.route?a.id!==w.route.id:!1,h=bn(w.url,n);let f=!1;{const m=l.map((y,E)=>{const k=w.branch[E],v=!!y?.[0]&&(k?.loader!==y[1]||Je(f,p,d,h,k.server?.uses,r));return v&&(f=!0),v});if(m.some(Boolean)){try{u=await yt(n,m)}catch(y){const E=await G(y,{url:n,params:r,route:{id:e}});return Z.has(s)?Ze({error:E,url:n,params:r,route:a}):ge({status:ie(y),error:E,url:n,route:a})}if(u.type==="redirect")return u}}const g=u?.nodes;let b=!1;const _=l.map(async(m,y)=>{if(!m)return;const E=w.branch[y],k=g?.[y];if((!k||k.type==="skip")&&m[1]===E?.loader&&!Je(b,p,d,h,E.universal?.uses,r))return E;if(b=!0,k?.type==="error")throw k;return $e({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let $=0;$<y;$+=1)Object.assign(O,(await _[$])?.data);return O},server_data_node:Be(k===void 0&&m[0]?{type:"skip"}:k??null,m[0]?E?.server:void 0)})});for(const m of _)m.catch(()=>{});const T=[];for(let m=0;m<l.length;m+=1)if(l[m])try{T.push(await _[m])}catch(y){if(y instanceof Le)return{type:"redirect",location:y.location};if(Z.has(s))return Ze({error:await G(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=ie(y),k;if(g?.includes(y))E=y.status??E,k=y.error;else if(y instanceof pe)k=y.body;else{if(await C.updated.check())return await ct(),await K(n);k=await G(y,{params:r,url:n,route:{id:a.id}})}const v=await An(m,T,o);return v?de({url:n,params:r,branch:T.slice(0,v.idx).concat(v.node),errors:o,status:E,error:k,route:a}):await wt(n,{id:a.id},k,E)}else T.push(void 0);return de({url:n,params:r,branch:T,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function An(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function ge({status:e,error:t,url:n,route:r}){const a={};let s=null;if(A.server_loads[0]===0)try{const c=await yt(n,[!0]);if(c.type!=="data"||c.nodes[0]&&c.nodes[0].type!=="data")throw 0;s=c.nodes[0]??null}catch{(n.origin!==re||n.pathname!==location.pathname||Ce)&&await K(n)}try{const o=await $e({loader:Re,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Be(s)}),c={node:await ce(),loader:ce,universal:null,server:null,data:null};return de({url:n,params:a,branch:[o,c],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof Le)return pt(new URL(o.location,location.href),{},0);throw o}}async function En(e){const t=e.href;if(ae.has(t))return ae.get(t);let n;try{const r=(async()=>{let a=await A.hooks.reroute({url:new URL(e),fetch:async(s,o)=>vn(s,o,e).promise})??e;if(typeof a=="string"){const s=new URL(e);A.hash?s.hash=a:s.pathname=a,a=s}return a})();ae.set(t,r),n=await r}catch{ae.delete(t);return}return n}async function me(e,t){if(e&&!_e(e,U,A.hash)){const n=await En(e);if(!n)return;const r=kn(n);for(const a of xe){const s=a.exec(r);if(s)return{id:he(e),invalidating:t,route:a,params:Rt(s),url:e}}}}function kn(e){return kt(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function he(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function mt({url:e,type:t,intent:n,delta:r,event:a,scroll:s}){let o=!1;const c=Fe(w,n,e,t,s??null);r!==void 0&&(c.navigation.delta=r),a!==void 0&&(c.navigation.event=a);const i={...c.navigation,cancel:()=>{o=!0,c.reject(new Error("navigation cancelled"))}};return ne||lt.forEach(l=>l(i)),o?null:c}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:c=0,nav_token:i={},accept:l=We,block:u=We,event:d}){const p=F;F=i;const h=await me(t,!1),f=e==="enter"?Fe(w,h,t,e):mt({url:t,type:e,delta:n?.delta,intent:h,scroll:n?.scroll,event:d});if(!f){u(),F===i&&(F=p);return}const g=R,b=I;l(),ne=!0,ue&&f.navigation.type!=="enter"&&C.navigating.set(ee.current=f.navigation);let _=h&&await gt(h);if(!_){if(_e(t,U,A.hash))return await K(t,s);_=await wt(t,{id:null},await G(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=h?.url||t,F!==i)return f.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(c<20){await Y({type:e,url:new URL(_.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:c+1,nav_token:i}),f.fulfil(void 0);return}_=await ge({status:500,error:await G(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else _.props.page.status>=400&&await C.updated.check()&&(await ct(),await K(t,s));if(wn(),Oe(g),dt(b),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),o=n?n.state:o,!n){const v=s?0:1,O={[q]:R+=v,[Q]:I+=v,[nt]:o};(s?history.replaceState:history.pushState).call(history,O,"",t),s||gn(R,I)}const T=h&&L?.id===h.id?L.fork:null;L=null,_.props.page.state=o;let m;if(ue){const v=(await Promise.all(Array.from(mn,W=>W(f.navigation)))).filter(W=>typeof W=="function");if(v.length>0){let W=function(){v.forEach(we=>{J.delete(we)})};v.push(W),v.forEach(we=>{J.add(we)})}const O=f.navigation.to;w={..._.state,nav:{params:O.params,route:O.route,url:O.url}},_.props.page&&(_.props.page.url=t);const $=T&&await T;$?m=$.commit():(H=null,ut.$set(_.props),H&&Object.assign(_.props.page,H),un(_.props.page),m=At?.()),ft=!0}else await _t(_,Se,!1);const{activeElement:y}=document;await m,await oe(),await oe();let E=null;if(He){const v=n?n.scroll:a?M():null;v?scrollTo(v.x,v.y):(E=t.hash&&document.getElementById(bt(t)))?E.scrollIntoView():scrollTo(0,0)}const k=document.activeElement!==y&&document.activeElement!==document.body;!r&&!k&&Tn(t,!E),He=!0,_.props.page&&(H&&Object.assign(_.props.page,H),Object.assign(S,_.props.page)),ne=!1,e==="popstate"&&ht(I),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=M()),J.forEach(v=>v(f.navigation)),C.navigating.set(ee.current=null)}async function wt(e,t,n,r,a){return e.origin===re&&e.pathname===location.pathname&&!Ce?await ge({status:r,error:n,url:e,route:t}):await K(e,a)}function Rn(){let e,t={element:void 0,href:void 0},n;x.addEventListener("mousemove",c=>{const i=c.target;clearTimeout(e),e=setTimeout(()=>{s(i,B.hover)},20)});function r(c){c.defaultPrevented||s(c.composedPath()[0],B.tap)}x.addEventListener("mousedown",r),x.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(c=>{for(const i of c)i.isIntersecting&&(Ae(new URL(i.target.href)),a.unobserve(i.target))},{threshold:0});async function s(c,i){const l=at(c,x),u=l===t.element&&l?.href===t.href&&i>=n;if(!l||u)return;const{url:d,external:p,download:h}=Ee(l,U,A.hash);if(p||h)return;const f=se(l),g=d&&he(w.url)===he(d);if(!(f.reload||g))if(i<=f.preload_data){t={element:l,href:l.href},n=B.tap;const b=await me(d,!1);if(!b)return;yn(b)}else i<=f.preload_code&&(t={element:l,href:l.href},n=i,Ae(d))}function o(){a.disconnect();for(const c of x.querySelectorAll("a")){const{url:i,external:l,download:u}=Ee(c,U,A.hash);if(l||u)continue;const d=se(c);d.reload||(d.preload_code===B.viewport&&a.observe(c),d.preload_code===B.eager&&Ae(i))}}J.add(o),o()}function G(e,t){if(e instanceof pe)return e.body;const n=ie(e),r=ln(e);return A.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Dn(e,t={}){return e=new URL(Ne(e)),e.origin!==re?Promise.reject(new Error("goto: invalid URL")):pt(e,t,0)}function Sn(e){if(typeof e=="function")le.push(e);else{const{href:t}=new URL(e,location.href);le.push(n=>n.href===t)}}function In(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!ne){const r=Fe(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};lt.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||Rn(),x.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=at(t.composedPath()[0],x);if(!n)return;const{url:r,external:a,target:s,download:o}=Ee(n,U,A.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const c=se(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[l,u]=(A.hash?r.hash.replace(/^#/,""):r.href).split("#"),d=l===ye(location);if(a||c.reload&&(!d||!u)){mt({url:r,type:"link",event:t})?ne=!0:t.preventDefault();return}if(u!==void 0&&d){const[,p]=w.url.href.split("#");if(p===u){if(t.preventDefault(),u===""||u==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=n.ownerDocument.getElementById(decodeURIComponent(u));h&&(h.scrollIntoView(),h.focus())}return}if(X=!0,Oe(R),e(r),!c.replace_state)return;X=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await Y({type:"link",url:r,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??r.href===location.href,event:t})}),x.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const o=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(_e(o,U,!1))return;const c=t.target,i=se(c);if(i.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(c,r);o.search=new URLSearchParams(l).toString(),Y({type:"form",url:o,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ue){if(t.state?.[q]){const n=t.state[q];if(F={},n===R)return;const r=D[n],a=t.state[nt]??{},s=new URL(t.state[Ft]??location.href),o=t.state[Q],c=w.url?ye(location)===ye(w.url):!1;if(o===I&&(ft||c)){a!==S.state&&(S.state=a),e(s),D[R]=M(),r&&scrollTo(r.x,r.y),R=n;return}const l=n-R;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:l},accept:()=>{R=n,I=o},block:()=>{history.go(-l)},nav_token:F,event:t})}else if(!X){const n=new URL(location.href);e(n),A.hash&&location.reload()}}}),addEventListener("hashchange",()=>{X&&(X=!1,history.replaceState({...history.state,[q]:++R,[Q]:I},"",location.href))});for(const t of document.querySelectorAll("link"))_n.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(ee.current=null)});function e(t){w.url=S.url=t,C.page.set(Me(S)),C.page.notify()}}async function Un(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:c,form:i}){Ce=!0;const l=new URL(location.href);let u;({params:a={},route:s={id:null}}=await me(l,!1)||{}),u=xe.find(({id:h})=>h===s.id);let d,p=!0;try{const h=r.map(async(g,b)=>{const _=c[b];return _?.uses&&(_.uses=vt(_.uses)),$e({loader:A.nodes[g],url:l,params:a,route:s,parent:async()=>{const T={};for(let m=0;m<b;m+=1)Object.assign(T,(await h[m]).data);return T},server_data_node:Be(_)})}),f=await Promise.all(h);if(u){const g=u.layouts;for(let b=0;b<g.length;b++)g[b]||f.splice(b,0,void 0)}d=await de({url:l,params:a,branch:f,status:t,error:n,errors:u?.errors,form:i,route:u??null})}catch(h){if(h instanceof Le){await K(new URL(h.location,location.href));return}d=await ge({status:ie(h),error:await G(h,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",p=!1}d.props.page&&(d.props.page.state={}),await _t(d,e,p)}async function yt(e,t){const n=new URL(e);n.pathname=pn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(cn,"1"),n.searchParams.append(sn,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new pe(a.status,s)}return new Promise(async s=>{const o=new Map,c=a.body.getReader();function i(u){return rn(u,{...A.decoders,Promise:d=>new Promise((p,h)=>{o.set(d,{fulfil:p,reject:h})})})}let l="";for(;;){const{done:u,value:d}=await c.read();if(u&&!l)break;for(l+=!d&&l?`
|
|
2
|
+
`:It.decode(d,{stream:!0});;){const p=l.indexOf(`
|
|
3
|
+
`);if(p===-1)break;const h=JSON.parse(l.slice(0,p));if(l=l.slice(p+1),h.type==="redirect")return s(h);if(h.type==="data")h.nodes?.forEach(f=>{f?.type==="data"&&(f.uses=vt(f.uses),f.data=i(f.data))}),s(h);else if(h.type==="chunk"){const{id:f,data:g,error:b}=h,_=o.get(f);o.delete(f),b?_.reject(i(b)):_.fulfil(i(g))}}}})}function vt(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??[])}}let Ue=!1;function Tn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=bt(e);if(r&&document.getElementById(r)){const{x:s,y:o}=M();setTimeout(()=>{const c=history.state;Ue=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(c,"",e),t&&scrollTo(s,o),Ue=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const c=s[o],i=a.getRangeAt(o);if(c.commonAncestorContainer!==i.commonAncestorContainer||c.startContainer!==i.startContainer||c.endContainer!==i.endContainer||c.startOffset!==i.startOffset||c.endOffset!==i.endOffset)return}a.removeAllRanges()}})}}}function Fe(e,t,n,r,a=null){let s,o;const c=new Promise((l,u)=>{s=l,o=u});return c.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:M()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:c},fulfil:s,reject:o}}function Me(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 Ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function bt(e){let t;if(A.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Cn as a,Dn as g,jn as l,S as p,C as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as y}from"./gQJcRhou.js";import"./BDcFu3l7.js";const R="https://unpkg.com/@juspay/neurolink@9.61.1/dist/browser/neurolink.min.js",u={"https://api.anthropic.com/":"anthropic","https://api.mistral.ai/":"mistral","https://api.openai.com/":"openai","https://generativelanguage.googleapis.com/":"google-ai"};let p=!1;function k(){if(p||typeof globalThis>"u")return;p=!0;const t=globalThis.fetch.bind(globalThis);globalThis.fetch=async(e,o)=>{const s=typeof e=="string"?e:e instanceof URL?e.href:e.url,a=m(s);if(!a)return t(e,o);const i={},r=o?.headers??(e instanceof Request?e.headers:{}),d=r instanceof Headers?r:Object.entries(r);for(const[f,g]of d){const h=f.toLowerCase();h!=="x-api-key"&&h!=="authorization"&&(i[f]=g)}let n;try{n=JSON.parse(o?.body??(e instanceof Request?await e.text():"{}"))}catch{n={}}const c=y(),l={"Content-Type":"application/json"};return c&&(l.Authorization=`Bearer ${c}`),t("/api/neurolink-proxy",{body:JSON.stringify({body:n,headers:i,provider:a,url:s}),headers:l,method:"POST"})}}function b(){if(typeof window>"u")return"";const e=window.process?.env?.LITELLM_BASE_URL;return typeof e=="string"?e:""}function m(t){const e=Object.entries(u).find(([s])=>t.startsWith(s))?.[1];if(e)return e;const o=b();if(o&&t.startsWith(o))return"litellm"}export{R as N,k as i};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./
|
|
1
|
+
import{s as e}from"./BfbPKMXz.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,p as e}from"./
|
|
1
|
+
import{s as r,p as e}from"./BfbPKMXz.js";const a={get params(){return e.params},get url(){return e.url}};r.updated.check;const s=a;export{s as p};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{_}from"../chunks/PPVm8Dsz.js";import{j as x,Q as H,f as Q,R as U,S as W,T as X,m as q,l as j,U as z,n as J,b as P,V as K,g as u,W as Z,X as $,Y as tt,p as et,G as rt,E as at,v as st,P as ot,A as R,d as nt,w as it,s as b,c as _t,r as ct,t as ut,x as O}from"../chunks/DWmC0QM7.js";import{B as mt,k as dt,m as lt,u as ft,p as T,i as A,a as v,j as D,f as k,g as I,t as ht,s as vt}from"../chunks/BPDiEZo0.js";function L(s,t,a){var n;x&&(n=J,H());var o=new mt(s);Q(()=>{var e=t()??null;if(x){var r=W(n),c=r===z,p=e!==null;if(c!==p){var g=X();q(g),o.anchor=g,j(!1),o.ensure(e,e&&(f=>a(f,e))),j(!0);return}}o.ensure(e,e&&(f=>a(f,e)))},U)}function gt(s){return class extends Et{constructor(t){super({component:s,...t})}}}class Et{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=tt(r,!1,!1);return a.set(e,c),c};const o=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===K?!0:(u(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return P(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?dt:lt)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Z(),this.#e=o.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||$(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(o,e)},this.#t.$destroy=()=>{ft(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...o)=>a.call(this,...o);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}const Dt={};var yt=k('<div 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>'),Rt=k("<!> <!>",1);function Pt(s,t){et(t,!0);let a=T(t,"components",23,()=>[]),n=T(t,"data_0",3,null),o=T(t,"data_1",3,null);rt(()=>t.stores.page.set(t.page)),at(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),o(),t.stores.page.notify()});let e=b(!1),r=b(!1),c=b(null);st(()=>{const i=t.stores.page.subscribe(()=>{u(e)&&(P(r,!0),ot().then(()=>{P(c,document.title||"untitled page",!0)}))});return P(e,!0),i});const p=O(()=>t.constructors[1]);var g=Rt(),f=R(g);{var S=i=>{const m=O(()=>t.constructors[0]);var d=D(),E=R(d);L(E,()=>u(m),(l,h)=>{I(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(y,bt)=>{var V=D(),Y=R(V);L(Y,()=>u(p),(B,F)=>{I(F(B,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),G=>a()[1]=G,()=>a()?.[1])}),v(y,V)},$$slots:{default:!0}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)},C=i=>{const m=O(()=>t.constructors[0]);var d=D(),E=R(d);L(E,()=>u(m),(l,h)=>{I(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)};A(f,i=>{t.constructors[1]?i(S):i(C,-1)})}var M=nt(f,2);{var N=i=>{var m=yt(),d=_t(m);{var E=l=>{var h=ht();ut(()=>vt(h,u(c))),v(l,h)};A(d,l=>{u(r)&&l(E)})}ct(m),v(i,m)};A(M,i=>{u(e)&&i(N)})}v(s,g),it()}const It=gt(Pt),Lt=[()=>_(()=>import("../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Qn7Ktiht.js","../chunks/BPDiEZo0.js","../chunks/DWmC0QM7.js","../chunks/B1bOvemT.js","../assets/ColorPicker.CV4IKef4.css","../chunks/BfbPKMXz.js","../chunks/CZg4kn4E.js","../chunks/Bn-6X1BO.js","../chunks/CG453M9q.js","../chunks/CSjf4fBs.js","../assets/0.BwNtE8TX.css","../nodes/1.BxWOfNlo.js","../chunks/2rBV5OkJ.js","../assets/1.B_AnTlN1.css","../nodes/2.Bc2qALkX.js","../chunks/CJulw9ux.js","../chunks/xs1Xl3_e.js","../chunks/gQJcRhou.js","../chunks/BDcFu3l7.js","../chunks/BLszSzTT.js","../chunks/BcpydfqI.js","../chunks/C4Hns_Wl.js","../chunks/C87ZRWX0.js","../chunks/DomZZqvG.js","../assets/2.JWRrnR-w.css","../nodes/3.N2-A8noI.js","../assets/3.DHxQoulp.css","../nodes/4.BFYS2g9C.js","../chunks/DzuS5Nbr.js","../assets/4.D4EDSN4H.css","../nodes/5.DziEu9rx.js","../assets/5.C5qz-NeI.css","../nodes/6.BWF9Qx6F.js","../chunks/DhK7PwI_.js","../chunks/BdtLzPpO.js","../assets/6.DzV0p3l-.css","../nodes/7.DHuDIdpz.js","../chunks/i5iZvmIH.js","../assets/ChatView.Bnlg-oAF.css","../assets/7.CEbRAOOf.css","../nodes/8.D0Ijt9Vv.js","../assets/8.BYgAX7hR.css","../nodes/9.2Piwo35J.js","../assets/9.DV6pZunn.css","../nodes/10.BGPYD1s1.js","../assets/10.BhoBXADL.css","../nodes/11.BxY1PUjC.js","../chunks/PPVm8Dsz.js","../assets/11.F10lvwyh.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_}from"../chunks/PPVm8Dsz.js";import{j as x,Q as H,f as Q,R as U,S as W,T as X,m as q,l as j,U as z,n as J,b as P,V as K,g as u,W as Z,X as $,Y as tt,p as et,G as rt,E as at,v as st,P as ot,A as R,d as nt,w as it,s as b,c as _t,r as ct,t as ut,x as O}from"../chunks/DWmC0QM7.js";import{B as mt,k as dt,m as lt,u as ft,p as T,i as A,a as v,j as D,f as k,g as I,t as ht,s as vt}from"../chunks/BPDiEZo0.js";function L(s,t,a){var n;x&&(n=J,H());var o=new mt(s);Q(()=>{var e=t()??null;if(x){var r=W(n),c=r===z,p=e!==null;if(c!==p){var g=X();q(g),o.anchor=g,j(!1),o.ensure(e,e&&(f=>a(f,e))),j(!0);return}}o.ensure(e,e&&(f=>a(f,e)))},U)}function gt(s){return class extends Et{constructor(t){super({component:s,...t})}}}class Et{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=tt(r,!1,!1);return a.set(e,c),c};const o=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===K?!0:(u(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return P(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?dt:lt)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Z(),this.#e=o.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||$(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(o,e)},this.#t.$destroy=()=>{ft(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...o)=>a.call(this,...o);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}const Dt={};var yt=k('<div 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>'),Rt=k("<!> <!>",1);function Pt(s,t){et(t,!0);let a=T(t,"components",23,()=>[]),n=T(t,"data_0",3,null),o=T(t,"data_1",3,null);rt(()=>t.stores.page.set(t.page)),at(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),o(),t.stores.page.notify()});let e=b(!1),r=b(!1),c=b(null);st(()=>{const i=t.stores.page.subscribe(()=>{u(e)&&(P(r,!0),ot().then(()=>{P(c,document.title||"untitled page",!0)}))});return P(e,!0),i});const p=O(()=>t.constructors[1]);var g=Rt(),f=R(g);{var S=i=>{const m=O(()=>t.constructors[0]);var d=D(),E=R(d);L(E,()=>u(m),(l,h)=>{I(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(y,bt)=>{var V=D(),Y=R(V);L(Y,()=>u(p),(B,F)=>{I(F(B,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),G=>a()[1]=G,()=>a()?.[1])}),v(y,V)},$$slots:{default:!0}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)},C=i=>{const m=O(()=>t.constructors[0]);var d=D(),E=R(d);L(E,()=>u(m),(l,h)=>{I(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)};A(f,i=>{t.constructors[1]?i(S):i(C,-1)})}var M=nt(f,2);{var N=i=>{var m=yt(),d=_t(m);{var E=l=>{var h=ht();ut(()=>vt(h,u(c))),v(l,h)};A(d,l=>{u(r)&&l(E)})}ct(m),v(i,m)};A(M,i=>{u(e)&&i(N)})}v(s,g),it()}const It=gt(Pt),Lt=[()=>_(()=>import("../nodes/0.Qn7Ktiht.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),()=>_(()=>import("../nodes/1.BxWOfNlo.js"),__vite__mapDeps([11,1,2,12,5,6,3,4,13]),import.meta.url),()=>_(()=>import("../nodes/2.Bc2qALkX.js"),__vite__mapDeps([14,1,2,3,4,12,5,7,15,8,16,17,18,19,20,21,22,23,24]),import.meta.url),()=>_(()=>import("../nodes/3.N2-A8noI.js"),__vite__mapDeps([25,1,2,12,5,3,4,17,18,19,20,21,22,26]),import.meta.url),()=>_(()=>import("../nodes/4.BFYS2g9C.js"),__vite__mapDeps([27,1,2,3,4,12,28,17,18,22,29]),import.meta.url),()=>_(()=>import("../nodes/5.DziEu9rx.js"),__vite__mapDeps([30,1,2,3,4,21,17,18,22,31]),import.meta.url),()=>_(()=>import("../nodes/6.BWF9Qx6F.js"),__vite__mapDeps([32,1,2,3,4,12,5,33,28,7,15,16,17,18,34,19,23,35]),import.meta.url),()=>_(()=>import("../nodes/7.DHuDIdpz.js"),__vite__mapDeps([36,1,2,12,3,4,33,5,16,18,34,37,20,38,39]),import.meta.url),()=>_(()=>import("../nodes/8.D0Ijt9Vv.js"),__vite__mapDeps([40,1,2,3,4,12,5,23,41]),import.meta.url),()=>_(()=>import("../nodes/9.2Piwo35J.js"),__vite__mapDeps([42,1,2,3,4,12,6,5,43]),import.meta.url),()=>_(()=>import("../nodes/10.BGPYD1s1.js"),__vite__mapDeps([44,1,2,3,4,12,5,15,8,9,16,17,18,34,23,45]),import.meta.url),()=>_(()=>import("../nodes/11.BxY1PUjC.js"),__vite__mapDeps([46,47,1,2,12,3,4,5,6,28,18,34,37,20,38,17,23,48]),import.meta.url)],Vt=[0],xt={"/":[-3],"/activity":[-4],"/config":[-5],"/neurolink":[-6],"/project":[6],"/session/[id]":[7],"/sos":[8],"/sos/[id]":[9],"/terminals":[10],"/terminals/[id]":[11]},w={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},pt=Object.fromEntries(Object.entries(w.transport).map(([s,t])=>[s,t.decode])),jt=Object.fromEntries(Object.entries(w.transport).map(([s,t])=>[s,t.encode])),kt=!1,wt=(s,t)=>pt[s](t);export{wt as decode,pt as decoders,xt as dictionary,jt as encoders,kt as hash,w as hooks,Dt as matchers,Lt as nodes,It as root,Vt as server_loads};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/BfbPKMXz.js";export{o as load_css,r as start};
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as V,e as F,f as G,c as H}from"../chunks/BPDiEZo0.js";import{p as J,E as Q,v as X,t as Y,w as Z,b as y,c as a,d as i,g as c,r as s,B as g,s as $,x as k}from"../chunks/DWmC0QM7.js";import{P as tt,B as et,a as at,c as v,s as p}from"../chunks/B1bOvemT.js";import{g as st}from"../chunks/
|
|
1
|
+
import{a as V,e as F,f as G,c as H}from"../chunks/BPDiEZo0.js";import{p as J,E as Q,v as X,t as Y,w as Z,b as y,c as a,d as i,g as c,r as s,B as g,s as $,x as k}from"../chunks/DWmC0QM7.js";import{P as tt,B as et,a as at,c as v,s as p}from"../chunks/B1bOvemT.js";import{g as st}from"../chunks/BfbPKMXz.js";import{p as nt}from"../chunks/CZg4kn4E.js";import{B as rt}from"../chunks/Bn-6X1BO.js";import{S as ot}from"../chunks/CG453M9q.js";import{T as it}from"../chunks/CSjf4fBs.js";const lt=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
2
2
|
<rect x="3" y="3" width="7" height="7"/>
|
|
3
3
|
<rect x="14" y="3" width="7" height="7"/>
|
|
4
4
|
<rect x="3" y="14" width="7" height="7"/>
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as b,a as c,e as J,f as K,s as k,c as L,t as d}from"../chunks/BPDiEZo0.js";import{F as M,G as N,E as w,I as P,J as y,K as q,g as G,L as z,M as C,N as O,p as Q,t as j,w as R,c as f,d as g,D as U,$ as V,r as v}from"../chunks/DWmC0QM7.js";import{h as W}from"../chunks/2rBV5OkJ.js";import{g as X}from"../chunks/
|
|
1
|
+
import{i as b,a as c,e as J,f as K,s as k,c as L,t as d}from"../chunks/BPDiEZo0.js";import{F as M,G as N,E as w,I as P,J as y,K as q,g as G,L as z,M as C,N as O,p as Q,t as j,w as R,c as f,d as g,D as U,$ as V,r as v}from"../chunks/DWmC0QM7.js";import{h as W}from"../chunks/2rBV5OkJ.js";import{g as X}from"../chunks/BfbPKMXz.js";import{p as Y}from"../chunks/CZg4kn4E.js";import{B as $}from"../chunks/B1bOvemT.js";function Z(n=!1){const r=M,s=r.l.u;if(!s)return;let p=()=>z(r.s);if(n){let i=0,a={};const _=C(()=>{let l=!1;const m=r.s;for(const o in m)m[o]!==a[o]&&(a[o]=m[o],l=!0);return l&&i++,i});p=()=>G(_)}s.b.length&&N(()=>{B(r,p),y(s.b)}),w(()=>{const i=P(()=>s.m.map(q));return()=>{for(const a of i)typeof a=="function"&&a()}}),s.a.length&&w(()=>{B(r,p),y(s.a)})}function B(n,r){if(n.l.s)for(const s of n.l.s)G(s);r()}O();var ee=K('<main class="error-page svelte-1j96wlh"><div class="error-content svelte-1j96wlh"><div class="error-code svelte-1j96wlh"> </div> <h1 class="error-title svelte-1j96wlh"><!></h1> <p class="error-message svelte-1j96wlh"><!></p> <div class="error-actions svelte-1j96wlh"><!> <!></div></div></main>');function ie(n,r){Q(r,!1);const s=()=>L(Y,"$page",p),[p,i]=J();Z();var a=ee();W("1j96wlh",e=>{U(()=>{V.title="Error - Shooter"})});var _=f(a),l=f(_),m=f(l,!0);v(l);var o=g(l,2),E=f(o);{var S=e=>{var t=d("Page not found");c(e,t)},T=e=>{var t=d("Something went wrong");c(e,t)};b(E,e=>{s().status===404?e(S):e(T,-1)})}v(o);var u=g(o,2),A=f(u);{var D=e=>{var t=d();j(()=>k(t,s().error.message)),c(e,t)},F=e=>{var t=d("The page you're looking for doesn't exist or has been moved.");c(e,t)},H=e=>{var t=d("An unexpected error occurred. Try refreshing or going back.");c(e,t)};b(A,e=>{s().error?.message?e(D):s().status===404?e(F,1):e(H,-1)})}v(u);var h=g(u,2),x=f(h);$(x,{text:"Go Home",classes:"btn-primary",onclick:()=>{X("/")}});var I=g(x,2);$(I,{text:"Go Back",classes:"btn-secondary",onclick:()=>{history.back()}}),v(h),v(_),v(a),j(()=>k(m,s().status)),c(n,a),R(),i()}export{ie as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as fe,j as Ve,i as H,a as _,s as D,f as b,t as We}from"../chunks/BPDiEZo0.js";import{p as ke,v as $e,A as _e,w as De,b as i,c as n,r as s,t as K,g as e,s as P,x as C,q as Ke,d as c,B as he,y as Ye,D as Ue,$ as Xe}from"../chunks/DWmC0QM7.js";import{T as Pe,s as Le,d as le,f as et,e as ge,C as tt,S as at,I as st,B as ne,b as Be,c as Ae,i as rt,P as Ie,g as nt}from"../chunks/B1bOvemT.js";import{h as lt}from"../chunks/2rBV5OkJ.js";import{g as Oe}from"../chunks/
|
|
1
|
+
import{p as fe,j as Ve,i as H,a as _,s as D,f as b,t as We}from"../chunks/BPDiEZo0.js";import{p as ke,v as $e,A as _e,w as De,b as i,c as n,r as s,t as K,g as e,s as P,x as C,q as Ke,d as c,B as he,y as Ye,D as Ue,$ as Xe}from"../chunks/DWmC0QM7.js";import{T as Pe,s as Le,d as le,f as et,e as ge,C as tt,S as at,I as st,B as ne,b as Be,c as Ae,i as rt,P as Ie,g as nt}from"../chunks/B1bOvemT.js";import{h as lt}from"../chunks/2rBV5OkJ.js";import{g as Oe}from"../chunks/BfbPKMXz.js";import{R as it,S as ot}from"../chunks/CJulw9ux.js";import{S as ct}from"../chunks/CG453M9q.js";import{T as dt}from"../chunks/CSjf4fBs.js";import{c as ut,s as Ee,g as vt}from"../chunks/xs1Xl3_e.js";import{i as mt}from"../chunks/gQJcRhou.js";import"../chunks/BDcFu3l7.js";import{A as pt}from"../chunks/BdtLzPpO.js";import{E as Ne}from"../chunks/DomZZqvG.js";var ft=b("<time> </time>"),ht=b("<time> </time>");function je(ie,d){ke(d,!0);let U=fe(d,"format",3,"long"),L=fe(d,"updateInterval",3,6e4),B=fe(d,"tooltip",3,!1),v=C(()=>d.date instanceof Date?d.date:new Date(d.date)),w=C(()=>e(v).toISOString()),M=C(()=>e(v).toLocaleString(d.locale,{dateStyle:"full",timeStyle:"short"})),x=P("");function h(){const S=Date.now(),f=e(v).getTime()-S,u=Math.abs(f),g=Math.round(u/1e3),J=Math.round(u/6e4),R=Math.round(u/36e5),z=Math.round(u/864e5),F=Math.round(u/6048e5),ee=Math.round(u/2592e6),Q=Math.round(u/31536e6),te=new Intl.RelativeTimeFormat(d.locale,{style:U()});let A,o;g<60?(A="second",o=g):J<60?(A="minute",o=J):R<24?(A="hour",o=R):z<7?(A="day",o=z):F<4?(A="week",o=F):ee<12?(A="month",o=ee):(A="year",o=Q);const E=f<0?-1:1;return te.format(E*o,A)}function O(){i(x,h(),!0)}$e(()=>{if(O(),L()>0){const S=setInterval(O,L());return()=>clearInterval(S)}});var X=Ve(),oe=_e(X);{var ce=S=>{Pe(S,{get text(){return e(M)},children:(m,f)=>{var u=ft(),g=n(u,!0);s(u),K(()=>{Le(u,1,`relative-time ${d.classes??""??""}`,"svelte-o98vko"),le(u,"datetime",e(w)),le(u,"data-pw",typeof d.testId=="string"?d.testId:null),D(g,e(x))}),_(m,u)},$$slots:{default:!0}})},q=S=>{var m=ht(),f=n(m,!0);s(m),K(()=>{Le(m,1,`relative-time ${d.classes??""??""}`,"svelte-o98vko"),le(m,"datetime",e(w)),le(m,"data-pw",typeof d.testId=="string"?d.testId:null),D(f,e(x))}),_(S,m)};H(oe,S=>{B()?S(ce):S(q,-1)})}_(ie,X),De()}var gt=b('<div class="section svelte-plslui"><span class="section-label svelte-plslui">Quick Launch</span> <div class="preset-grid svelte-plslui"></div></div> <div class="section svelte-plslui"><span class="section-label svelte-plslui">Working Directory</span> <!> <div class="custom-cwd-group svelte-plslui"><!></div></div> <!> <!>',1);function _t(ie,d){ke(d,!0);let U=fe(d,"open",15,!1);const L=[{args:[],command:"claude",label:"Claude Code"},{args:[],command:"codex",label:"Codex"},{args:[],command:"gemini",label:"Gemini"},{args:[],command:"qwen",label:"Qwen"},{args:[],command:"cursor-agent",label:"Cursor"},{args:[],command:"copilot",label:"Copilot"},{args:[],command:"amp",label:"Amp"},{args:[],command:"opencode",label:"OpenCode"},{args:[],command:"zsh",label:"Shell / zsh"},{args:[],command:"bash",label:"Bash"}];let B=P(0),v=P(Ke([])),w=P(""),M=P(""),x=P(!1),h=P("");$e(()=>{O()});async function O(){try{const m=await fetch("/api/sessions?limit=50&offset=0",{headers:{Authorization:`Bearer ${d.apiKey}`}});if(!m.ok)return;const u=(await m.json()).projects.map(g=>g.fullPath).filter(g=>typeof g=="string"&&g.length>0);i(v,[...new Set(u)],!0),e(v).length>0&&!e(w)&&i(w,e(v)[0],!0)}catch{}}function X(m){i(B,m,!0)}function oe(){return L[e(B)].command}function ce(){return L[e(B)].args}function q(){const m=e(M).trim();return m||(e(w)?e(w):"/tmp")}async function S(){const m=oe();if(m){i(x,!0),i(h,"");try{const f=await fetch("/api/terminals",{body:JSON.stringify({args:ce(),command:m,cwd:q()||void 0}),headers:{Authorization:`Bearer ${d.apiKey}`,"Content-Type":"application/json"},method:"POST"});if(!f.ok){const g=await f.json().catch(()=>({}));i(h,(typeof g.error=="string"?g.error:"")||`Failed to launch (${f.status})`,!0);return}const u=await f.json();d.onLaunch(u)}catch{i(h,"Network error — is the server running?")}finally{i(x,!1)}}}et(ie,{side:"bottom",title:"New Terminal",get onclose(){return d.onClose},classes:"launch-sheet",get open(){return U()},set open(f){U(f)},content:f=>{var u=gt(),g=_e(u),J=c(n(g),2);ge(J,23,()=>L,o=>o.label,(o,E,k)=>{{let de=C(()=>e(B)===e(k));tt(o,{mode:"radio",get selected(){return e(de)},onclick:()=>{X(e(k))},classes:"preset-choice",children:(ue,we)=>{he();var ve=We();K(()=>D(ve,e(E).label)),_(ue,ve)},$$slots:{default:!0}})}}),s(J),s(g);var R=c(g,2),z=c(n(R),2);{let o=C(()=>e(v).length>0?e(v).map(k=>({id:k,label:k})):[{id:"",label:"No recent projects"}]),E=C(()=>e(w)?[e(w)]:e(v).length>0?[e(v)[0]]:[""]);at(z,{get items(){return e(o)},get value(){return e(E)},placeholder:"Select a project",onchange:k=>{i(w,k[0]||"",!0)},classes:"launch-select"})}var F=c(z,2),ee=n(F);st(ee,{label:"Or enter a custom path",dataType:"text",placeholder:"/path/to/project",classes:"input-mono launch-input",get value(){return e(M)},set value(o){i(M,o,!0)}}),s(F),s(R);var Q=c(R,2);{let o=C(()=>e(x)?"Launching...":"Launch Terminal");ne(Q,{classes:"btn-launch",get disabled(){return e(x)},onclick:S,get showLoader(){return e(x)},get text(){return e(o)}})}var te=c(Q,2);{var A=o=>{Be(o,{get text(){return e(h)},classes:"banner-error launch-error-banner"})};H(te,o=>{e(h)&&o(A)})}_(f,u)},$$slots:{content:!0}}),De()}var wt=b('<meta name="description" content="Active terminal sessions on this machine"/>'),bt=b("<!> Refresh",1),xt=b('<span class="plus-icon svelte-1ewpmn2">+</span> New Terminal',1),yt=b('<div class="loading-container"></div>'),St=b('<span class="plus-icon svelte-1ewpmn2">+</span> New Terminal',1),Ct=b('<span class="terminal-cwd svelte-1ewpmn2"> </span>'),Tt=b('<div class="terminal-preview svelte-1ewpmn2"><span class="terminal-preview-text svelte-1ewpmn2"> </span></div>'),At=b('<a class="terminal-card svelte-1ewpmn2"><div class="terminal-card-header svelte-1ewpmn2"><div class="terminal-card-left svelte-1ewpmn2"><span class="status-indicator status-running svelte-1ewpmn2"><span></span></span> <span class="terminal-command svelte-1ewpmn2"> </span> <!></div> <!></div> <div class="terminal-card-meta svelte-1ewpmn2"><!> <span class="terminal-pid svelte-1ewpmn2"> </span></div> <!></a>'),It=b('<span class="terminal-cwd svelte-1ewpmn2"> </span>'),Pt=b('<div class="terminal-preview svelte-1ewpmn2"><span class="terminal-preview-text svelte-1ewpmn2"> </span></div>'),Lt=b('<a class="terminal-card terminal-card-exited svelte-1ewpmn2"><div class="terminal-card-header svelte-1ewpmn2"><div class="terminal-card-left svelte-1ewpmn2"><span class="status-indicator status-exited svelte-1ewpmn2"><span class="status-dot-static"></span></span> <span class="terminal-command svelte-1ewpmn2"> </span> <!> <!></div> <div class="terminal-card-right svelte-1ewpmn2"><!> <!></div></div> <div class="terminal-card-meta svelte-1ewpmn2"><!></div> <!></a>'),kt=b('<div class="terminals-container svelte-1ewpmn2"><!> <!></div>'),$t=b('<main class="main"><div class="page-header"><div class="page-header-content"><div><h1 class="page-title">Terminals</h1> <p class="page-description">Active terminal sessions on this machine</p></div> <div class="page-actions"><!> <!></div></div></div> <!> <!></main> <!>',1);function Jt(ie,d){ke(d,!0);const U=1e4,L="shooter_terminals",B=["zsh","bash","sh","fish"];let v=P(Ke([])),w=P(!1),M=!1,x=P(null),h=P(null),O=null;const X=C(()=>e(v).filter(t=>t.status==="running")),oe=C(()=>e(v).filter(t=>t.status==="exited"));$e(()=>{ce();const t=vt(L,1e4);t&&(i(v,t,!0),i(w,!1)),q(),O=setInterval(()=>{e(h)?.apiKey&&q()},U)}),Ye(()=>{O&&(clearInterval(O),O=null)});function ce(){try{const t=localStorage.getItem("shooter_config");if(t){const a=JSON.parse(t);mt(a)?i(h,a,!0):(localStorage.removeItem("shooter_config"),i(h,null))}}catch{}}async function q(){if(!(!e(h)?.apiKey||M)){M=!0,e(v).length===0&&i(w,!0);try{const a=await fetch("/api/terminals",{headers:{Authorization:`Bearer ${e(h).apiKey}`}});if(!a.ok){i(x,`Failed to load terminals (HTTP ${a.status})`);return}i(x,null);const r=await a.json();i(v,r.terminals.map(y=>({...y,lastOutput:y.lastOutput??null})),!0),Ee(L,e(v))}catch(t){i(x,"Failed to load terminals"),console.error("Failed to fetch terminals:",t)}finally{i(w,!1),M=!1}}}async function S(){i(w,!0),ut(L),await q()}function m(){Oe("/config")}let f=P(!1);function u(){i(f,!0)}function g(){i(f,!1)}function J(t){i(f,!1),Oe(`/terminals/${t.id}`)}function R(t){const a=t.split("/").pop()||t;return pt.includes(a)?"ai":(B.includes(a),"shell")}function z(t){return t.status==="exited"?{class:"pill-badge-ended",label:"ENDED"}:R(t.command)==="ai"?{class:"pill-badge-ai",label:"AI"}:{class:"pill-badge-shell",label:"SHELL"}}function F(t,a=40){if(t.length<=a)return t;const r=t.split("/");return r.length<=3?t:`${r[0]}/.../${r.slice(-2).join("/")}`}function ee(t){return t.replace(/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\x1b\[[\?]?[0-9;]*[a-zA-Z]|\x1b/g,"").replace(/[\x00-\x1f]/g,"").trim()}function Q(t,a=80){if(!t)return"";const r=t.split(`
|
|
2
2
|
`).map(T=>ee(T)).filter(T=>T.trim()),y=r[r.length-1]||"";return y.length<=a?y:`${y.slice(0,a)}...`}function te(t){return t.split("/").pop()||t}async function A(t,a){if(t.preventDefault(),t.stopPropagation(),!!e(h)?.apiKey)try{(await fetch(`/api/terminals/${a}`,{headers:{Authorization:`Bearer ${e(h).apiKey}`},method:"DELETE"})).ok&&(i(v,e(v).filter(y=>y.id!==a),!0),Ee(L,e(v)))}catch(r){console.error("Failed to remove terminal:",r)}}var o=$t();lt("1ewpmn2",t=>{var a=wt();Ue(()=>{Xe.title="Terminals - Shooter"}),_(t,a)});var E=_e(o),k=n(E),de=n(k),ue=c(n(de),2),we=n(ue);ne(we,{classes:"btn-secondary",onclick:S,get disabled(){return e(w)},children:(t,a)=>{var r=bt(),y=_e(r);Ae(y,{get svg(){return it},classes:"icon-14"}),he(),_(t,r)},$$slots:{default:!0}});var ve=c(we,2);ne(ve,{classes:"btn-primary",onclick:u,children:(t,a)=>{var r=xt();he(),_(t,r)},$$slots:{default:!0}}),s(ue),s(de),s(k);var Me=c(k,2);{var Re=t=>{Be(t,{get text(){return e(x)},classes:"banner-error"})};H(Me,t=>{e(x)&&t(Re)})}var ze=c(Me,2);{var Fe=t=>{var a=yt();ge(a,20,()=>Array(4),rt,(r,y)=>{ot(r,{classes:"shimmer-card"})}),s(a),_(t,a)},He=t=>{Ne(t,{title:"Configuration Required",description:"Set up your API credentials to view terminal sessions",icon:r=>{Ae(r,{get svg(){return ct},classes:"icon-24"})},children:(r,y)=>{ne(r,{classes:"btn-primary",onclick:m,text:"Configure Settings"})}})},qe=t=>{Ne(t,{title:"No terminals",description:"Launch a new terminal session to get started. Terminal sessions will appear here once created.",icon:r=>{Ae(r,{get svg(){return dt},classes:"icon-24"})},children:(r,y)=>{ne(r,{classes:"btn-primary",onclick:u,children:(T,l)=>{var Z=St();he(),_(T,Z)},$$slots:{default:!0}})}})},Je=t=>{var a=kt(),r=n(a);ge(r,17,()=>e(X),T=>T.id,(T,l)=>{const Z=C(()=>z(e(l)));var N=At(),G=n(N),V=n(G),W=n(V),be=n(W);s(W);var ae=c(W,2),xe=n(ae,!0);s(ae);var ye=c(ae,2);Ie(ye,{get text(){return e(Z).label},get classes(){return e(Z).class}}),s(V);var me=c(V,2);je(me,{get date(){return e(l).createdAt},format:"narrow",classes:"terminal-time"}),s(G);var se=c(G,2),pe=n(se);{let p=C(()=>e(l).currentCwd||e(l).cwd);Pe(pe,{get text(){return e(p)},position:"bottom",children:(I,$)=>{var j=Ct(),Y=n(j,!0);s(j),K(Ge=>D(Y,Ge),[()=>F(e(l).currentCwd||e(l).cwd)]),_(I,j)},$$slots:{default:!0}})}var re=c(pe,2),Se=n(re);s(re),s(se);var Ce=c(se,2);{var Te=p=>{var I=Tt(),$=n(I),j=n($,!0);s($),s(I),K(Y=>D(j,Y),[()=>Q(e(l).lastOutput)]),_(p,I)};H(Ce,p=>{e(l).lastOutput&&p(Te)})}s(N),K(p=>{le(N,"href",`/terminals/${e(l).id??""}`),Le(be,1,nt(e(l).isActive?"status-dot-active":"status-dot-idle")),D(xe,p),D(Se,`PID ${e(l).pid??""}`)},[()=>te(e(l).command)]),_(T,N)});var y=c(r,2);ge(y,17,()=>e(oe),T=>T.id,(T,l)=>{const Z=C(()=>z(e(l)));var N=Lt(),G=n(N),V=n(G),W=c(n(V),2),be=n(W,!0);s(W);var ae=c(W,2);Ie(ae,{get text(){return e(Z).label},get classes(){return e(Z).class}});var xe=c(ae,2);{var ye=p=>{{let I=C(()=>e(l).exitCode!==0?"pill-exit-error":"pill-exit-ok");Ie(p,{get text(){return`exit ${e(l).exitCode??""}`},get classes(){return e(I)}})}};H(xe,p=>{e(l).exitCode!==null&&p(ye)})}s(V);var me=c(V,2),se=n(me);{let p=C(()=>e(l).exitedAt||e(l).createdAt);je(se,{get date(){return e(p)},format:"narrow",classes:"terminal-time"})}var pe=c(se,2);ne(pe,{classes:"btn-ghost btn-sm btn-remove",onclick:p=>{A(p,e(l).id)},text:"×"}),s(me),s(G);var re=c(G,2),Se=n(re);Pe(Se,{get text(){return e(l).cwd},position:"bottom",children:(p,I)=>{var $=It(),j=n($,!0);s($),K(Y=>D(j,Y),[()=>F(e(l).cwd)]),_(p,$)},$$slots:{default:!0}}),s(re);var Ce=c(re,2);{var Te=p=>{var I=Pt(),$=n(I),j=n($,!0);s($),s(I),K(Y=>D(j,Y),[()=>Q(e(l).lastOutput)]),_(p,I)};H(Ce,p=>{e(l).lastOutput&&p(Te)})}s(N),K(p=>{le(N,"href",`/terminals/${e(l).id??""}`),D(be,p)},[()=>te(e(l).command)]),_(T,N)}),s(a),_(t,a)};H(ze,t=>{e(w)&&e(v).length===0?t(Fe):e(h)?.apiKey?e(v).length===0?t(qe,2):t(Je,-1):t(He,1)})}s(E);var Qe=c(E,2);{var Ze=t=>{_t(t,{get apiKey(){return e(h).apiKey},onClose:g,onLaunch:J,get open(){return e(f)},set open(a){i(f,a,!0)}})};H(Qe,t=>{e(h)?.apiKey&&t(Ze)})}_(ie,o),De()}export{Jt as component};
|
|
Binary file
|
|
Binary file
|