9remote 3.0.40 → 3.0.46
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/dist/cli.cjs +6 -6
- package/dist/extension/background.js +120 -17
- package/dist/extension/manifest.json +2 -2
- package/dist/extension/popup.html +7 -0
- package/dist/extension/popup.js +6 -0
- package/dist/ptyDaemon.cjs +5 -5
- package/dist/server.cjs +248 -241
- package/dist/ui/assets/index-BefL072o.js +8 -0
- package/dist/ui/assets/index-DvsANh5-.css +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +2 -2
- package/dist/web/__next._full.txt +26 -20
- package/dist/web/__next._head.txt +1 -1
- package/dist/web/__next._index.txt +12 -7
- package/dist/web/__next._tree.txt +2 -2
- package/dist/web/_next/static/chunks/1772-2df6c72aa1bdf99d.js +1 -0
- package/dist/web/_next/static/chunks/1920-64e4610715fd991d.js +1 -0
- package/dist/web/_next/static/chunks/1968-90d80a8543ed4f21.js +32 -0
- package/dist/web/_next/static/chunks/556-1dec70a3f28ddbe8.js +1 -0
- package/dist/web/_next/static/chunks/5587-b8f18d331fdde617.js +1 -0
- package/dist/web/_next/static/chunks/6153.189180c190f90b2f.js +1 -0
- package/dist/web/_next/static/chunks/6221-2be9b41ee97fc1e6.js +11 -0
- package/dist/web/_next/static/chunks/7489.c1e8656da3738df7.js +1 -0
- package/dist/web/_next/static/chunks/8126-c11d39a1ae6ac126.js +1 -0
- package/dist/web/_next/static/chunks/820-c1bd7547f2433453.js +1 -0
- package/dist/web/_next/static/chunks/8534.189180c190f90b2f.js +1 -0
- package/dist/web/_next/static/chunks/9121-cf1e65bb26b0908b.js +1 -0
- package/dist/web/_next/static/chunks/{9491-6dc334192080d071.js → 9491-970597f510e71615.js} +1 -1
- package/dist/web/_next/static/chunks/app/_global-error/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/_not-found/page-bfa58c699e86fa7c.js +1 -0
- package/dist/web/_next/static/chunks/app/admin/access/page-79e70c584b6e2150.js +5 -0
- package/dist/web/_next/static/chunks/app/admin/login/page-4a768b6df8ed5259.js +1 -0
- package/dist/web/_next/static/chunks/app/admin/ota/page-e4d26a8db9968a98.js +5 -0
- package/dist/web/_next/static/chunks/app/admin/page-1c13a4c1567ed18e.js +5 -0
- package/dist/web/_next/static/chunks/app/admin/turn/page-dbd8be78d0941005.js +5 -0
- package/dist/web/_next/static/chunks/app/download/page-e27de0a4170f4b73.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-fc9671123388edff.js +1 -0
- package/dist/web/_next/static/chunks/app/login/page-8216ac4904ee3551.js +1 -0
- package/dist/web/_next/static/chunks/app/{page-1e67d8a5f3775276.js → page-fde2c88f21078fca.js} +2 -2
- package/dist/web/_next/static/chunks/app/workspace/browse/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/editor/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/files/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/git/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/layout-0d349197dc482ccd.js +23 -0
- package/dist/web/_next/static/chunks/app/workspace/mobile/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/pair/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/remote/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/settings/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/terminal/[sessionId]/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/welcome/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/app/workspace/workspaces/page-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/main-72206f0a3cb91ecb.js +5 -0
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/app-error-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/forbidden-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/not-found-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/unauthorized-e60883b219ccba1a.js +1 -0
- package/dist/web/_next/static/chunks/{webpack-dd1f7a5ae02e5d84.js → webpack-31691f9bc04b8076.js} +1 -1
- package/dist/web/_next/static/css/{adc0ee53b89bee3c.css → 4da4daf9f2bf1755.css} +1 -1
- package/dist/web/_next/static/css/577dbf61f141a630.css +1 -0
- package/dist/web/_next/static/{55Oo1FQxj9HIxB7QE1XWG → u29HK3zWfDC3mM40skU_h}/_buildManifest.js +1 -1
- package/dist/web/_not-found/__next._full.txt +20 -18
- package/dist/web/_not-found/__next._head.txt +1 -1
- package/dist/web/_not-found/__next._index.txt +7 -7
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/web/_not-found/__next._not-found.txt +1 -1
- package/dist/web/_not-found/__next._tree.txt +2 -2
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +20 -18
- package/dist/web/admin/__next._full.txt +29 -22
- package/dist/web/admin/__next._head.txt +1 -1
- package/dist/web/admin/__next._index.txt +12 -7
- package/dist/web/admin/__next._tree.txt +2 -2
- package/dist/web/admin/__next.admin.__PAGE__.txt +2 -2
- package/dist/web/admin/__next.admin.txt +1 -1
- package/dist/web/admin/access/__next._full.txt +30 -22
- package/dist/web/admin/access/__next._head.txt +1 -1
- package/dist/web/admin/access/__next._index.txt +12 -7
- package/dist/web/admin/access/__next._tree.txt +2 -2
- package/dist/web/admin/access/__next.admin.access.__PAGE__.txt +2 -2
- package/dist/web/admin/access/__next.admin.access.txt +1 -1
- package/dist/web/admin/access/__next.admin.txt +1 -1
- package/dist/web/admin/access.html +1 -1
- package/dist/web/admin/access.txt +30 -22
- package/dist/web/admin/login/__next._full.txt +30 -22
- package/dist/web/admin/login/__next._head.txt +1 -1
- package/dist/web/admin/login/__next._index.txt +12 -7
- package/dist/web/admin/login/__next._tree.txt +2 -2
- package/dist/web/admin/login/__next.admin.login.__PAGE__.txt +2 -2
- package/dist/web/admin/login/__next.admin.login.txt +1 -1
- package/dist/web/admin/login/__next.admin.txt +1 -1
- package/dist/web/admin/login.html +1 -1
- package/dist/web/admin/login.txt +30 -22
- package/dist/web/admin/ota/__next._full.txt +30 -22
- package/dist/web/admin/ota/__next._head.txt +1 -1
- package/dist/web/admin/ota/__next._index.txt +12 -7
- package/dist/web/admin/ota/__next._tree.txt +2 -2
- package/dist/web/admin/ota/__next.admin.ota.__PAGE__.txt +2 -2
- package/dist/web/admin/ota/__next.admin.ota.txt +1 -1
- package/dist/web/admin/ota/__next.admin.txt +1 -1
- package/dist/web/admin/ota.html +1 -1
- package/dist/web/admin/ota.txt +30 -22
- package/dist/web/admin/turn/__next._full.txt +30 -22
- package/dist/web/admin/turn/__next._head.txt +1 -1
- package/dist/web/admin/turn/__next._index.txt +12 -7
- package/dist/web/admin/turn/__next._tree.txt +2 -2
- package/dist/web/admin/turn/__next.admin.turn.__PAGE__.txt +2 -2
- package/dist/web/admin/turn/__next.admin.turn.txt +1 -1
- package/dist/web/admin/turn/__next.admin.txt +1 -1
- package/dist/web/admin/turn.html +1 -1
- package/dist/web/admin/turn.txt +30 -22
- package/dist/web/admin.html +1 -1
- package/dist/web/admin.txt +29 -22
- package/dist/web/download/__next._full.txt +26 -19
- package/dist/web/download/__next._head.txt +1 -1
- package/dist/web/download/__next._index.txt +12 -7
- package/dist/web/download/__next._tree.txt +2 -2
- package/dist/web/download/__next.download.__PAGE__.txt +2 -2
- package/dist/web/download/__next.download.txt +1 -1
- package/dist/web/download.html +1 -1
- package/dist/web/download.txt +26 -19
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +26 -20
- package/dist/web/login/__next._full.txt +29 -22
- package/dist/web/login/__next._head.txt +1 -1
- package/dist/web/login/__next._index.txt +12 -7
- package/dist/web/login/__next._tree.txt +2 -2
- package/dist/web/login/__next.login.__PAGE__.txt +2 -2
- package/dist/web/login/__next.login.txt +1 -1
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +29 -22
- package/dist/web/workspace/__next._full.txt +27 -20
- package/dist/web/workspace/__next._head.txt +1 -1
- package/dist/web/workspace/__next._index.txt +12 -7
- package/dist/web/workspace/__next._tree.txt +3 -3
- package/dist/web/workspace/__next.workspace.__PAGE__.txt +1 -1
- package/dist/web/workspace/__next.workspace.txt +3 -3
- package/dist/web/workspace/browse/__next._full.txt +30 -22
- package/dist/web/workspace/browse/__next._head.txt +1 -1
- package/dist/web/workspace/browse/__next._index.txt +12 -7
- package/dist/web/workspace/browse/__next._tree.txt +3 -3
- package/dist/web/workspace/browse/__next.workspace.browse.__PAGE__.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.browse.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.txt +3 -3
- package/dist/web/workspace/browse.html +1 -1
- package/dist/web/workspace/browse.txt +30 -22
- package/dist/web/workspace/editor/__next._full.txt +30 -22
- package/dist/web/workspace/editor/__next._head.txt +1 -1
- package/dist/web/workspace/editor/__next._index.txt +12 -7
- package/dist/web/workspace/editor/__next._tree.txt +3 -3
- package/dist/web/workspace/editor/__next.workspace.editor.__PAGE__.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.editor.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.txt +3 -3
- package/dist/web/workspace/editor.html +1 -1
- package/dist/web/workspace/editor.txt +30 -22
- package/dist/web/workspace/files/__next._full.txt +30 -22
- package/dist/web/workspace/files/__next._head.txt +1 -1
- package/dist/web/workspace/files/__next._index.txt +12 -7
- package/dist/web/workspace/files/__next._tree.txt +3 -3
- package/dist/web/workspace/files/__next.workspace.files.__PAGE__.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.files.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.txt +3 -3
- package/dist/web/workspace/files.html +1 -1
- package/dist/web/workspace/files.txt +30 -22
- package/dist/web/workspace/git/__next._full.txt +30 -22
- package/dist/web/workspace/git/__next._head.txt +1 -1
- package/dist/web/workspace/git/__next._index.txt +12 -7
- package/dist/web/workspace/git/__next._tree.txt +3 -3
- package/dist/web/workspace/git/__next.workspace.git.__PAGE__.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.git.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.txt +3 -3
- package/dist/web/workspace/git.html +1 -1
- package/dist/web/workspace/git.txt +30 -22
- package/dist/web/workspace/mobile/__next._full.txt +30 -22
- package/dist/web/workspace/mobile/__next._head.txt +1 -1
- package/dist/web/workspace/mobile/__next._index.txt +12 -7
- package/dist/web/workspace/mobile/__next._tree.txt +3 -3
- package/dist/web/workspace/mobile/__next.workspace.mobile.__PAGE__.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.mobile.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.txt +3 -3
- package/dist/web/workspace/mobile.html +1 -1
- package/dist/web/workspace/mobile.txt +30 -22
- package/dist/web/workspace/pair/__next._full.txt +30 -22
- package/dist/web/workspace/pair/__next._head.txt +1 -1
- package/dist/web/workspace/pair/__next._index.txt +12 -7
- package/dist/web/workspace/pair/__next._tree.txt +3 -3
- package/dist/web/workspace/pair/__next.workspace.pair.__PAGE__.txt +1 -1
- package/dist/web/workspace/pair/__next.workspace.pair.txt +1 -1
- package/dist/web/workspace/pair/__next.workspace.txt +3 -3
- package/dist/web/workspace/pair.html +1 -1
- package/dist/web/workspace/pair.txt +30 -22
- package/dist/web/workspace/remote/__next._full.txt +30 -22
- package/dist/web/workspace/remote/__next._head.txt +1 -1
- package/dist/web/workspace/remote/__next._index.txt +12 -7
- package/dist/web/workspace/remote/__next._tree.txt +3 -3
- package/dist/web/workspace/remote/__next.workspace.remote.__PAGE__.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.remote.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.txt +3 -3
- package/dist/web/workspace/remote.html +1 -1
- package/dist/web/workspace/remote.txt +30 -22
- package/dist/web/workspace/settings/__next._full.txt +37 -0
- package/dist/web/{dev/question → workspace/settings}/__next._head.txt +1 -1
- package/dist/web/workspace/settings/__next._index.txt +17 -0
- package/dist/web/{dev/question → workspace/settings}/__next._tree.txt +3 -2
- package/dist/web/workspace/settings/__next.workspace.settings.__PAGE__.txt +5 -0
- package/dist/web/{dev/question/__next.dev.question.txt → workspace/settings/__next.workspace.settings.txt} +1 -1
- package/dist/web/workspace/settings/__next.workspace.txt +8 -0
- package/dist/web/workspace/settings.html +1 -0
- package/dist/web/workspace/settings.txt +37 -0
- package/dist/web/workspace/terminal/default/__next._full.txt +30 -24
- package/dist/web/workspace/terminal/default/__next._head.txt +1 -1
- package/dist/web/workspace/terminal/default/__next._index.txt +12 -7
- package/dist/web/workspace/terminal/default/__next._tree.txt +3 -3
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.__PAGE__.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.txt +3 -3
- package/dist/web/workspace/terminal/default.html +1 -1
- package/dist/web/workspace/terminal/default.txt +30 -24
- package/dist/web/workspace/welcome/__next._full.txt +30 -22
- package/dist/web/workspace/welcome/__next._head.txt +1 -1
- package/dist/web/workspace/welcome/__next._index.txt +12 -7
- package/dist/web/workspace/welcome/__next._tree.txt +3 -3
- package/dist/web/workspace/welcome/__next.workspace.txt +3 -3
- package/dist/web/workspace/welcome/__next.workspace.welcome.__PAGE__.txt +1 -1
- package/dist/web/workspace/welcome/__next.workspace.welcome.txt +1 -1
- package/dist/web/workspace/welcome.html +1 -1
- package/dist/web/workspace/welcome.txt +30 -22
- package/dist/web/workspace/workspaces/__next._full.txt +30 -22
- package/dist/web/workspace/workspaces/__next._head.txt +1 -1
- package/dist/web/workspace/workspaces/__next._index.txt +12 -7
- package/dist/web/workspace/workspaces/__next._tree.txt +3 -3
- package/dist/web/workspace/workspaces/__next.workspace.txt +3 -3
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.__PAGE__.txt +1 -1
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.txt +1 -1
- package/dist/web/workspace/workspaces.html +1 -1
- package/dist/web/workspace/workspaces.txt +30 -22
- package/dist/web/workspace.html +1 -1
- package/dist/web/workspace.txt +27 -20
- package/package.json +5 -5
- package/dist/ui/assets/index-D_C1NTm1.js +0 -8
- package/dist/ui/assets/index-SHlsPzjb.css +0 -1
- package/dist/web/_next/static/chunks/1772-ef73c166e83f5eff.js +0 -1
- package/dist/web/_next/static/chunks/1920-5ead25286846df83.js +0 -1
- package/dist/web/_next/static/chunks/1968-4d2969f0b7112e0b.js +0 -32
- package/dist/web/_next/static/chunks/329-15d3e36af1b2827f.js +0 -1
- package/dist/web/_next/static/chunks/556-a8f04c41c5663ee8.js +0 -1
- package/dist/web/_next/static/chunks/5587-fc5af8c76df14222.js +0 -1
- package/dist/web/_next/static/chunks/6153.8c6b8930e22ceea0.js +0 -1
- package/dist/web/_next/static/chunks/6221-cf883148bf8a4c1e.js +0 -11
- package/dist/web/_next/static/chunks/7489.24938d89538cd03e.js +0 -1
- package/dist/web/_next/static/chunks/8126-0279fc9e17c08aff.js +0 -1
- package/dist/web/_next/static/chunks/820-99036fb63c5462c8.js +0 -1
- package/dist/web/_next/static/chunks/8534.8c6b8930e22ceea0.js +0 -1
- package/dist/web/_next/static/chunks/9121-3d281debd0f3e659.js +0 -1
- package/dist/web/_next/static/chunks/app/_global-error/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/_not-found/page-9f829d2c4beb1840.js +0 -1
- package/dist/web/_next/static/chunks/app/admin/access/page-45f45ad529e5b691.js +0 -5
- package/dist/web/_next/static/chunks/app/admin/login/page-382072b5b43d3c29.js +0 -1
- package/dist/web/_next/static/chunks/app/admin/ota/page-293c0743bd60f454.js +0 -5
- package/dist/web/_next/static/chunks/app/admin/page-fc676dae451dd646.js +0 -5
- package/dist/web/_next/static/chunks/app/admin/turn/page-2ab33033fc7f0919.js +0 -5
- package/dist/web/_next/static/chunks/app/dev/question/page-bafce0c9fd4e8488.js +0 -1
- package/dist/web/_next/static/chunks/app/download/page-a65d1c7fcf6397af.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-f1429d22e935695f.js +0 -1
- package/dist/web/_next/static/chunks/app/login/page-a5dd37d1cbbb394e.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/browse/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/editor/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/files/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/git/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/layout-d8bb677fa1caa5a7.js +0 -20
- package/dist/web/_next/static/chunks/app/workspace/mobile/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/pair/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/remote/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/terminal/[sessionId]/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/welcome/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/workspaces/page-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/main-e10b0dbebb4de0a8.js +0 -5
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/app-error-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/forbidden-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/not-found-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/chunks/next/dist/client/components/builtin/unauthorized-2ece09c883187d82.js +0 -1
- package/dist/web/_next/static/css/1c2cca827fa36d54.css +0 -1
- package/dist/web/dev/question/__next._full.txt +0 -29
- package/dist/web/dev/question/__next._index.txt +0 -12
- package/dist/web/dev/question/__next.dev.question.__PAGE__.txt +0 -9
- package/dist/web/dev/question/__next.dev.txt +0 -5
- package/dist/web/dev/question.html +0 -1
- package/dist/web/dev/question.txt +0 -29
- /package/dist/web/_next/static/{55Oo1FQxj9HIxB7QE1XWG → u29HK3zWfDC3mM40skU_h}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8126],{189:(e,t,r)=>{r.d(t,{Fo:()=>u,U0:()=>l,vd:()=>d});var n=r(7620),i=r(89228);let s="9remote_auth",a="9remote_auth_state",o=["apiKey","tunnelUrl","mode","localIp"];function l(){try{localStorage.removeItem(a)}catch{}}function c(e){"u">typeof document&&(document.cookie=`${s}=${e}; path=/; max-age=86400; SameSite=Lax`)}function d({apiKey:e,tunnelUrl:t,mode:r="remote",tempKey:n=null,localIp:s=null}){if(!e){try{localStorage.removeItem(a)}catch{}return}try{sessionStorage.setItem("apiKey",e),sessionStorage.setItem("tunnelUrl",t),sessionStorage.setItem("mode",r||"remote"),n?sessionStorage.setItem("tempKey",n):sessionStorage.removeItem("tempKey"),s?sessionStorage.setItem("localIp",s):sessionStorage.removeItem("localIp")}catch{}c(e);try{sessionStorage.removeItem("9remote_manual_disconnect")}catch{}try{!function(){try{return"false"!==localStorage.getItem("9remote_remember_key_preference")}catch{return!1}}()?localStorage.removeItem(a):localStorage.setItem(a,JSON.stringify({apiKey:e,tunnelUrl:t,mode:r,localIp:s}))}catch{}i.d.getState().setAuthKey(e)}function u(){let e=(0,n.useCallback)(()=>{let e,t,r,n,i;try{e=sessionStorage.getItem("apiKey"),t=sessionStorage.getItem("tunnelUrl"),r=sessionStorage.getItem("mode"),n=sessionStorage.getItem("tempKey"),i=sessionStorage.getItem("localIp")}catch{return null}if(!e){let n=function(){try{return JSON.parse(localStorage.getItem(a)||"null")}catch{return null}}();if(!n?.apiKey)return null;try{for(let e of o)n[e]&&sessionStorage.setItem(e,n[e])}catch{}e=n.apiKey,t=n.tunnelUrl??null,r=n.mode??null,i=n.localIp??null}return c(e),{apiKey:e,tunnelUrl:t,mode:r,tempKey:n,localIp:i}},[]);return{getAuth:e,setAuth:(0,n.useCallback)(e=>d(e),[]),clearAuth:(0,n.useCallback)(()=>{try{sessionStorage.clear()}catch{}try{localStorage.removeItem(a)}catch{}"u">typeof document&&(document.cookie=`${s}=; path=/; max-age=0`)},[])}}},6134:(e,t,r)=>{r.d(t,{FQ:()=>l,Lq:()=>m,UX:()=>o,k_:()=>d,yO:()=>c});var n=r(96631);let i=[],s=new Set,a=location.hostname.startsWith("dev.")||"localhost"===location.hostname&&!(0,n.gJ)()||"1"===localStorage.getItem("9remote:termLog");function o(){return a}function l(){return i}function c(e){return s.add(e),()=>s.delete(e)}function d(){for(let e of(i.length=0,s))try{e(null)}catch(e){}}function u(e){if(null==e)return"";if(e instanceof Uint8Array||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return`<${e.byteLength}b>`;if("string"==typeof e)return e.length>120?`${e.slice(0,60)}…${e.length}b`:e;if("object"==typeof e)try{return JSON.stringify(e)}catch(e){}return String(e)}let h=new Set(["recv"]),p=null;function m(e,...t){if(!a)return;let r=Date.now(),n=t.map(u).join(" ");if(p&&p.category===e&&p.baseMsg===n&&r-p.ts<3e3||h.has(e)&&p&&p.category===e&&r-p.ts<300){p.count=(p.count||1)+1,p.ts=r,p.msg=`${n} \xd7${p.count}`,queueMicrotask(()=>{for(let e of s)try{e(p)}catch(e){}});return}let o={ts:r,category:e,msg:n,baseMsg:n,count:1};p=o,i.push(o),i.length>800&&i.shift(),queueMicrotask(()=>{for(let e of s)try{e(o)}catch(e){}})}},14337:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(54568);function i({size:e="md",text:t,className:r=""}){return(0,n.jsxs)("div",{className:`flex flex-col items-center justify-center gap-3 ${r}`,children:[(0,n.jsx)("div",{className:`animate-spin rounded-full border-brand-500 border-t-transparent ${{sm:"h-4 w-4 border-2",md:"h-8 w-8 border-2",lg:"h-12 w-12 border-b-2"}[e]}`}),t&&(0,n.jsx)("p",{className:"text-brand-500 text-sm font-medium",children:t})]})}},14511:(e,t,r)=>{r.d(t,{freshAuth:()=>s});var n=r(99022),i=r(68469);async function s(e={},t){let r={...e,connectionMode:t},a=(0,n.lz)(e.apiKey),o=e.tempKey?(0,n.lz)(e.tempKey):null,l=o?.tail?o:a?.tail?a:a||o,c=l?.tail;if(delete r.keyTail,delete r.keyTailSealed,!c)return r;if(l?.hostSealKey){let e=await (0,i.Y)(c,l.hostSealKey);if(e)return r.keyTailSealed=e,r}return r.keyTail=c,r}},14757:(e,t,r)=>{r.d(t,{k:()=>n});function n(e){let t=String(e||"").trim(),r=e=>({tempKey:e.slice(0,6).toUpperCase(),tail:e.slice(6,8).toUpperCase()}),n=/#([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(n)return r(n[1].replace(/-/g,""));let i=/^([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(i)return r(i[1].replace(/-/g,""));let s=/[?&]k=([A-NP-Z1-9]{6})(?:[^A-NP-Z1-9]|$)/i.exec(t);return s?{tempKey:s[1].toUpperCase()}:/^[A-NP-Z1-9]{6}$/i.test(t)?{tempKey:t.toUpperCase()}:null}},18179:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(54568),i=r(7620),s=r(96605),a=r(14652),o=r(9121),l=r(33879);function c({isOpen:e,onClose:t}){let{t:r,locale:d,setLocale:u}=(0,o.s)();return((0,i.useEffect)(()=>{if(!e)return;let r=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e,t]),e)?(0,n.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-[2px] animate-in fade-in duration-200",onClick:t}),(0,n.jsxs)("div",{className:"relative card-elev max-w-lg w-full max-h-[90dvh] flex flex-col animate-in zoom-in-95 duration-200",children:[(0,n.jsxs)("div",{className:"px-5 py-4 flex items-center justify-between flex-shrink-0",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-text",children:r("menu.language")}),(0,n.jsx)("button",{onClick:t,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-all duration-150 ease-out","aria-label":r("common.close"),children:(0,n.jsx)(s.X,{size:20})})]}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto modal-scrollable p-3",children:(0,n.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2",children:l.dI.map(e=>{let r=e.code===d;return(0,n.jsxs)("button",{onClick:()=>{var r;return r=e.code,void((0,a.e)(),u(r),t())},className:`px-2 py-2 rounded-brand flex items-center gap-2 transition-all duration-150 ease-out active:scale-[0.97] min-w-0 ${r?"bg-brand-500 text-white":"text-text hover:bg-surface-2"}`,children:[(0,n.jsx)("img",{src:`https://flagcdn.com/w80/${e.country}.png`,alt:e.label,className:"w-5 h-[14px] object-cover rounded-[2px] flex-shrink-0",loading:"lazy"}),(0,n.jsx)("span",{className:"flex-1 text-sm font-medium truncate text-left",children:e.label}),r&&(0,n.jsx)(s.aJ,{size:14,className:"flex-shrink-0"})]},e.code)})})})]})]}):null}},18753:(e,t,r)=>{r.d(t,{U:()=>n});function n(e,t){if(!e||!t)return!1;let r=String(e).split(".").map(Number),n=String(t).split(".").map(Number);for(let e=0;e<3;e++){let t=r[e]||0,i=n[e]||0;if(t!==i)return t>i}return!1}},23084:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(54568),i=r(7620),s=r(97509),a=r(14652),o=r(9121),l=r(96605);function c({isOpen:e,onClose:t,onConfirm:r,title:d,message:u,confirmText:h,cancelText:p}){let{t:m}=(0,o.s)(),f=(0,i.useRef)(null),y=(0,i.useRef)(null),g=h??m("common.confirm"),_=p??m("common.cancel");return((0,i.useEffect)(()=>{if(!e)return;let t=requestAnimationFrame(()=>{y.current?.focus()});return()=>cancelAnimationFrame(t)},[e]),(0,i.useEffect)(()=>{if(!e)return;let n=e=>{if("Escape"===e.key)e.preventDefault(),e.stopPropagation(),t();else if("Enter"===e.key){if(f.current&&document.activeElement===f.current){e.preventDefault(),e.stopPropagation(),t();return}e.preventDefault(),e.stopPropagation(),(0,a.e)(),r?.(),t()}};return window.addEventListener("keydown",n,!0),()=>window.removeEventListener("keydown",n,!0)},[e,t,r]),!e||"u"<typeof document)?null:(0,s.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center px-4",style:{paddingTop:"max(1rem, env(safe-area-inset-top))",paddingBottom:"max(1rem, env(safe-area-inset-bottom))"},children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-[2px] animate-in fade-in duration-150",onClick:t}),(0,n.jsxs)("div",{role:"dialog","aria-modal":"true",className:"relative card-elev max-w-md w-full my-auto max-h-[min(85%,calc(var(--app-height,85vh)-2rem))] overflow-y-auto animate-in zoom-in-95 duration-200",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,n.jsx)("div",{className:"px-6 py-4",children:(0,n.jsx)("h3",{className:"text-lg font-semibold text-text",children:d})}),(0,n.jsx)("div",{className:"px-6 pb-4",children:(0,n.jsx)("p",{className:"text-text whitespace-pre-line",children:u})}),(0,n.jsxs)("div",{className:"px-6 py-4 flex justify-end gap-3",children:[(0,n.jsxs)("button",{ref:f,onClick:()=>{(0,a.e)(),t()},className:"px-4 py-2 bg-surface-2 hover:bg-surface-3 text-text rounded-brand transition-all duration-150 ease-out active:scale-[0.98] font-medium flex items-center gap-1.5",children:[(0,n.jsx)("span",{children:_}),(0,n.jsx)("kbd",{className:"hidden sm:inline-flex items-center text-[10px] font-mono px-1 py-0.5 rounded bg-surface-3 text-text-muted leading-none",children:"Esc"})]}),(0,n.jsxs)("button",{ref:y,onClick:()=>{(0,a.e)(),r?.(),t()},className:"px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-brand transition-all duration-150 ease-out active:scale-[0.98] font-medium flex items-center gap-1.5 focus:outline-none focus:ring-2 focus:ring-red-500/50",children:[(0,n.jsx)("span",{children:g}),(0,n.jsx)("kbd",{className:"hidden sm:inline-flex items-center justify-center w-4 h-4 rounded bg-white/20 text-white",children:(0,n.jsx)(l.Lt,{size:10,strokeWidth:2.5})})]})]})]})]}),document.body)}},23635:(e,t,r)=>{r.d(t,{B:()=>p});var n=r(94245),i=r(59055),s=r(36487),a=r(30368),o=r(72627);let l=(e,{min:t,max:r})=>Math.max(t,Math.min(r,Math.round(e)));var c=r(92571);let d={name:null,value:null},u=null,h=()=>{if(u&&(clearTimeout(u),u=null),null===d.name)return;let{name:e,value:t}=d;d.name=null,d.value=null;try{localStorage.setItem(e,JSON.stringify(t))}catch{}};window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&h()});let p=(0,n.v)((0,i.Zr)((e,t,r)=>({...{viewStack:[{type:"list"}],openedSessions:[],activeWorkspaceId:null,setActiveWorkspaceId:t=>e(e=>({activeWorkspaceId:t,fullMode:!!e.fullModes?.[t??o.AD]})),livePanes:[],touchLivePane:t=>e(e=>{let r=Array.isArray(t)?t:[t];return{livePanes:[...e.livePanes.filter(e=>!r.includes(e)),...r].slice(-s.kn)}}),mountedWorkspaces:{},markWorkspaceMounted:t=>e(e=>{let r=t??o.AD;return e.mountedWorkspaces[r]?e:{mountedWorkspaces:{...e.mountedWorkspaces,[r]:!0}}}),isWorkspaceMounted:e=>{let r=e??o.AD;return!!t().mountedWorkspaces[r]},drafts:{},setDraft:(t,r)=>e(e=>({drafts:{...e.drafts,[t]:r}})),collapsedWorkspaces:{},toggleWorkspace:t=>e(e=>({collapsedWorkspaces:{...e.collapsedWorkspaces,[t]:!e.collapsedWorkspaces[t]}})),cwdBySession:{},setCwd:(t,r)=>{if(!t||!r)return;let n=(0,c.kb)(r);e(e=>e.cwdBySession[t]===n?e:{cwdBySession:{...e.cwdBySession,[t]:n}})},pushView:t=>e(e=>{let r=Array.isArray(e.viewStack)?e.viewStack:[],n=a.yP.includes(t?.type),i=n?r:r.filter((e,t)=>!(a.yP.includes(e?.type)&&t===r.length-1));if(n&&i.length&&i[i.length-1]?.type===t?.type){let e=[...i];return e[e.length-1]=t,{viewStack:e}}return{viewStack:[...i,t]}}),popView:()=>e(e=>{let t=Array.isArray(e.viewStack)?e.viewStack:[];return{viewStack:t.length>1?t.slice(0,-1):[{type:"list"}]}}),setViewStack:t=>e({viewStack:t}),addOpenedSession:t=>e(e=>({openedSessions:e.openedSessions.includes(t)?e.openedSessions:[...e.openedSessions,t]})),removeOpenedSession:t=>e(e=>{let{[t]:r,...n}=e.drafts,{[t]:i,...s}=e.pendingStartup,{[t]:a,...o}=e.artifactsBySession;return{artifactsBySession:o,openedSessions:e.openedSessions.filter(e=>e!==t),livePanes:e.livePanes.filter(e=>e!==t),hiddenPaneSessionIds:e.hiddenPaneSessionIds?e.hiddenPaneSessionIds.filter(e=>e!==t):[],drafts:n,pendingStartup:s}}),replaceOpenedSession:(t,r)=>e(e=>{if(!r||t===r)return e;let n=e=>e===t?r:e;return{openedSessions:!t||e.openedSessions.includes(t)?e.openedSessions.map(n):e.openedSessions.includes(r)?e.openedSessions:[...e.openedSessions,r],livePanes:e.livePanes.map(n)}}),clearOpenedSessions:()=>e({openedSessions:[],livePanes:[]}),reorderOpenedSessions:t=>e(e=>{let r=new Set(t),n=t.filter(t=>e.openedSessions.includes(t));if(n.length<2)return{};let i=0;return{openedSessions:e.openedSessions.map(e=>r.has(e)?n[i++]:e)}}),closeSession:t=>e(e=>{let{[t]:r,...n}=e.drafts,{[t]:i,...s}=e.pendingStartup,{[t]:a,...o}=e.agentBySession,l=((e,t)=>{let r={};for(let[n,i]of Object.entries(e))r[n]={at:0,sessions:t?i.sessions.map(t):i.sessions};return r})(e.agentHistory,e=>e.openSessionId===t?{...e,openSessionId:null}:e);return{openedSessions:e.openedSessions.filter(e=>e!==t),livePanes:e.livePanes.filter(e=>e!==t),drafts:n,pendingStartup:s,agentBySession:o,agentHistory:l}}),getCurrentView:()=>{let{viewStack:e}=t();return e[e.length-1]},getSelectedSession:()=>{let{viewStack:e}=t();for(let t=e.length-1;t>=0;t--)if("terminal"===e[t].type)return e[t].sessionId;return null},reset:()=>e({viewStack:[{type:"list"}],openedSessions:[],livePanes:[],activeWorkspaceId:null})},...{sidebarCollapsed:!1,toggleSidebar:()=>e(e=>({sidebarCollapsed:!e.sidebarCollapsed})),setSidebarCollapsed:t=>e({sidebarCollapsed:!!t}),sidebarWidth:s.gH.default,setSidebarWidth:t=>e({sidebarWidth:l(t,s.gH)}),fullModes:{},fullMode:!1,toggleFullMode:t=>e(e=>{let r=t??e.activeWorkspaceId??o.AD,n=!e.fullModes[r];return{fullModes:{...e.fullModes,[r]:n},fullMode:r===(e.activeWorkspaceId??o.AD)?n:e.fullMode}}),setFullMode:(t,r)=>e(e=>{let n="boolean"==typeof t?e.activeWorkspaceId??o.AD:t??e.activeWorkspaceId??o.AD,i="boolean"==typeof t?t:!!r;return{fullModes:{...e.fullModes,[n]:i},fullMode:n===(e.activeWorkspaceId??o.AD)?i:e.fullMode}}),hiddenPaneSessionIds:[],toggleHidePane:t=>e(e=>({hiddenPaneSessionIds:e.hiddenPaneSessionIds.includes(t)?e.hiddenPaneSessionIds.filter(e=>e!==t):[...e.hiddenPaneSessionIds,t]})),unhidePane:t=>e(e=>({hiddenPaneSessionIds:e.hiddenPaneSessionIds.filter(e=>e!==t)})),paneWidths:{},setPaneWidth:(t,r)=>e(e=>({paneWidths:{...e.paneWidths,[t]:null==r?null:l(r,s.k9)}})),rightPanelOpen:window.innerWidth>=s.jK,rightPanelTabs:{},rightPanelWidth:s.Ds.default,toggleRightPanel:()=>e(e=>({rightPanelOpen:!e.rightPanelOpen,rightPanelWasOpen:null})),closeRightPanel:()=>e({rightPanelOpen:!1,rightPanelWasOpen:null}),openRightPanel:()=>e({rightPanelOpen:!0,rightPanelWasOpen:null}),setRightPanelTab:(t,r)=>e(e=>({rightPanelOpen:!0,rightPanelWasOpen:null,...null!=r?{rightPanelTabs:{...e.rightPanelTabs,[r]:t}}:{}})),rightPanelRoots:{},setRightPanelRoot:(t,r)=>e(e=>{if(null==t)return e;let n=e.rightPanelRoots[t],i=r&&r!==t?r:void 0;if(n===i)return e;let s={...e.rightPanelRoots};return i?s[t]=i:delete s[t],{rightPanelRoots:s}}),setRightPanelWidth:t=>e({rightPanelWidth:l(t,s.Ds)}),editorFilePath:null,editorPanelWidth:s.Ao.default,setEditorPanelWidth:t=>e({editorPanelWidth:l(t,s.Ao)}),editorPreviewSeq:0,artifactTitle:null,rightPanelWasOpen:null,artifactSessionId:null,editorJump:null,openEditorFile:(t,r={})=>e(e=>({editorFilePath:t,editorPreviewSeq:r.preview?e.editorPreviewSeq+1:0,artifactTitle:r.artifactTitle||null,artifactSessionId:r.artifactSessionId||null,editorJump:r.line?{line:r.line,column:r.column,seq:(e.editorJump?.seq||0)+1}:null,...r.artifactTitle?{rightPanelWasOpen:e.rightPanelWasOpen??e.rightPanelOpen,rightPanelOpen:!1}:{}})),closeEditorFile:()=>e(e=>({editorFilePath:null,editorPreviewSeq:0,artifactTitle:null,artifactSessionId:null,rightPanelWasOpen:null,...e.rightPanelWasOpen?{rightPanelOpen:!0}:{},...e.artifactSessionId&&e.editorFilePath?{artifactsBySession:((e,t,r)=>{let n=e[t];if(!n)return e;let i=n.filter(e=>e.path!==r);if(i.length===n.length)return e;let{[t]:s,...a}=e;return i.length?{...a,[t]:i}:a})(e.artifactsBySession,e.artifactSessionId,e.editorFilePath)}:{}})),hiddenHeaderButtons:["mobile"],hiddenHeaderButtonsMigrated:!1,toggleHeaderButton:t=>e(e=>({hiddenHeaderButtons:e.hiddenHeaderButtons.includes(t)?e.hiddenHeaderButtons.filter(e=>e!==t):[...e.hiddenHeaderButtons,t]})),mobileLowPower:!1,setMobileLowPower:t=>e({mobileLowPower:!!t}),mobileOpen:!1,mobileMode:"float",mobilePanelWidth:s.b5.default,mobileFloatRect:null,setMobileOpen:t=>e({mobileOpen:!!t}),setMobileMode:t=>e({mobileMode:t,mobileOpen:!0}),setMobilePanelWidth:t=>e({mobilePanelWidth:l(t,s.b5)}),setMobileFloatRect:t=>e({mobileFloatRect:t}),mobileSession:null,setMobileSession:t=>e(e=>({mobileSession:"function"==typeof t?t(e.mobileSession):t}))},...{webglEnabled:!1,setWebglEnabled:t=>e({webglEnabled:!!t}),fontSize:null,setFontSize:t=>e({fontSize:t?Math.max(10,Math.min(18,Math.round(t))):null}),terminalTheme:"default",setTerminalTheme:t=>e({terminalTheme:t||"default"}),terminalBackgrounds:["art8"],setTerminalBackgrounds:t=>e({terminalBackgrounds:Array.isArray(t)?t.filter(Boolean):[]}),terminalBackgroundOpacity:null,setTerminalBackgroundOpacity:t=>e({terminalBackgroundOpacity:null==t?s._z:Number(Math.max(s.DW.min,Math.min(s.DW.max,Math.round(t/s.DW.step)*s.DW.step)).toFixed(2))}),customBackgrounds:[],setCustomBackgrounds:t=>e({customBackgrounds:Array.isArray(t)?t.filter(e=>e?.id&&e?.dataUrl):[]}),backgroundBySession:{},setSessionBackground:(t,r)=>e(e=>{let n={...e.backgroundBySession};return r?n[t]=r:delete n[t],{backgroundBySession:n}}),showFolderButton:!0,showNoteButton:!1,setShowFolderButton:t=>e({showFolderButton:!!t}),setShowNoteButton:t=>e({showNoteButton:!!t}),noteChips:[],addNoteChip:t=>e(e=>({noteChips:[...e.noteChips,t]})),removeNoteChip:t=>e(e=>({noteChips:e.noteChips.filter(e=>e!==t)})),pinnedNotes:{},setNotePinned:(t,r)=>e(e=>{let n={...e.pinnedNotes};return r?n[t]=!0:delete n[t],{pinnedNotes:n}})},...{agentCaps:{},setAgentCaps:t=>e({agentCaps:t||{}}),artifactEnabled:!1,setArtifactEnabled:t=>e({artifactEnabled:!!t}),mcpClients:[],setMcpClients:t=>e({mcpClients:Array.isArray(t)?t:[]}),agentClisBy:{},setAgentClis:(t,r)=>e(e=>({agentClisBy:{...e.agentClisBy,[t]:{list:Array.isArray(r)?r:[],at:Date.now()}}})),agentHistory:{},setAgentHistory:(t,r)=>e(e=>({agentHistory:{...e.agentHistory,[t]:{at:Date.now(),sessions:Array.isArray(r)?r:[]}}})),invalidateAgentHistory:()=>e(e=>({agentHistory:(e=>{let t={};for(let[r,n]of Object.entries(e))t[r]={at:0,sessions:n.sessions};return t})(e.agentHistory)})),agentBySession:{},setSessionAgent:(t,r)=>e(e=>e.agentBySession[t]===r?e:{agentBySession:{...e.agentBySession,[t]:r}}),pendingStartup:{},queueStartup:(t,r)=>e(e=>({pendingStartup:{...e.pendingStartup,[t]:r}})),consumeStartup:r=>{let n=t().pendingStartup[r];return void 0===n?null:(e(e=>{let{[r]:t,...n}=e.pendingStartup;return{pendingStartup:n}}),n)},artifactsBySession:{},pushArtifact:(t,r)=>e(e=>{if(!t||!r?.path)return{};let n=(e.artifactsBySession[t]||[]).filter(e=>e.path!==r.path);return{artifactsBySession:{...e.artifactsBySession,[t]:[r,...n].slice(0,s.zv)}}}),removeArtifact:(t,r)=>e(e=>({artifactsBySession:((e,t,r)=>{let n=e[t];if(!n)return e;let i=n.filter(e=>e.path!==r);if(i.length===n.length)return e;let{[t]:s,...a}=e;return i.length?{...a,[t]:i}:a})(e.artifactsBySession,t,r)}))}}),{name:"terminal-ui-state",partialize:e=>({viewStack:e.viewStack,openedSessions:e.openedSessions,agentBySession:e.agentBySession,activeWorkspaceId:e.activeWorkspaceId,collapsedWorkspaces:e.collapsedWorkspaces,webglEnabled:e.webglEnabled,fontSize:e.fontSize,terminalTheme:e.terminalTheme,terminalBackgrounds:e.terminalBackgrounds,terminalBackgroundOpacity:e.terminalBackgroundOpacity,backgroundBySession:e.backgroundBySession,showFolderButton:e.showFolderButton,showNoteButton:e.showNoteButton,noteChips:e.noteChips,pinnedNotes:e.pinnedNotes,sidebarCollapsed:e.sidebarCollapsed,sidebarWidth:e.sidebarWidth,fullModes:e.fullModes||{},fullMode:e.fullMode,hiddenPaneSessionIds:e.hiddenPaneSessionIds||[],paneWidths:e.paneWidths,rightPanelOpen:e.rightPanelOpen,rightPanelTabs:e.rightPanelTabs,rightPanelWidth:e.rightPanelWidth,editorPanelWidth:e.editorPanelWidth,hiddenHeaderButtons:e.hiddenHeaderButtons,hiddenHeaderButtonsMigrated:e.hiddenHeaderButtonsMigrated,mobileLowPower:e.mobileLowPower,mobileMode:e.mobileMode,mobilePanelWidth:e.mobilePanelWidth,mobileFloatRect:e.mobileFloatRect,artifactsBySession:e.artifactsBySession}),storage:{getItem:e=>{try{let t=localStorage.getItem(e);if(!t)return null;let r=JSON.parse(t);return r&&!Array.isArray(r.viewStack)&&(r.viewStack=[{type:"list"}]),r}catch{return null}},setItem:(e,t)=>{d.name=e,d.value=t,u||(u=setTimeout(h,s.eu))},removeItem:e=>{d.name===e&&(d.name=null,d.value=null),localStorage.removeItem(e)}},onRehydrateStorage:()=>e=>{e&&(Array.isArray(e.viewStack)&&0!==e.viewStack.length||(e.viewStack=[{type:"list"}]),window.location.pathname.replace(/\/+$/,"")===a.U2&&(e.viewStack=[{type:"list"}]),e.viewStack=e.viewStack.filter(e=>e?.type==="browser"||!a.yP.includes(e?.type)&&e?.type!=="site"),0===e.viewStack.length&&(e.viewStack=[{type:"list"}]),Array.isArray(e.terminalBackgrounds)||(e.terminalBackgrounds=[]),e.terminalBackground&&"none"!==e.terminalBackground&&0===e.terminalBackgrounds.length&&(e.terminalBackgrounds=[e.terminalBackground]),e.agentBySession&&"object"==typeof e.agentBySession||(e.agentBySession={}),window.innerWidth<s.jK&&(e.rightPanelOpen=!1),!e.hiddenHeaderButtonsMigrated&&(e.hiddenHeaderButtonsMigrated=!0,Array.isArray(e.hiddenHeaderButtons)?e.hiddenHeaderButtons.includes("mobile")||(e.hiddenHeaderButtons=[...e.hiddenHeaderButtons,"mobile"]):e.hiddenHeaderButtons=["mobile"]))}}))},30068:(e,t,r)=>{r.d(t,{D5:()=>a,FO:()=>c,I9:()=>l,Ic:()=>o,eR:()=>n,ij:()=>s,tC:()=>i});let n={namespace:"/remote",enableWebRTC:!0,enableTurn:!1,debug:{transport:!1,remote:!1,panel:!1,showButton:!1},dcChunkSize:8,dcReliable:!1,dcOrdered:!1,hashRequestInterval:1500,lastDataThreshold:500,restreamDelay:200,mouseThrottle:8,keyThrottle:25,scrollInterval:100,tileLoadTimeout:600,batchSize:16,batchDelay:3,decodeQueueCap:48,resizeDebounceMs:100,resizeStableFrames:3,resizeMaxFrames:30,focusDebounce:50,longPressDelay:1e3,doubleClickDelay:300,moveThreshold:10,edgeScrollThreshold:15,edgeScrollMultiplier:1.5,momentumFriction:.94,momentumMinVelocity:.3,pointerMode:"trackpad",trackpadSensitivity:1.3,trackpadAcceleration:1.5,trackpadTapMaxMove:8,trackpadTapMaxDuration:220,trackpadCursorSize:20,trackpadEdgeMarginRatio:.25,clipboardBadgeTimeout:1e4,gestureLockDelay:80,gestureDistanceThreshold:15,gestureCentroidThreshold:10,gestureDominanceRatio:2,wheelScrollMultiplier:2.5,wheelLineHeight:40,wheelPageHeight:400,wheelZoomStep:.1,wheelBoostInterval:250,mouseButtonMap:{0:"left",1:"middle",2:"right"},pcModeControls:{rectangleSelect:!1,pointerModeToggle:!1,handMode:!1,keyboardToggle:!1,textPanel:!0,modifierRow:!0,help:!0}},i={ctrl:"control",cmd:"command",alt:"alt",shift:"shift"},s=[{id:"ctrl",label:"Ctrl",modifier:"ctrl",type:"modifier"},{id:"alt",label:"Alt",modifier:"alt",type:"modifier"},{id:"shift",label:"Shift",modifier:"shift",type:"modifier"},{id:"cmd",label:"⌘",modifier:"cmd",type:"modifier"},{id:"esc",label:"Esc",key:"escape",type:"key"},{id:"tab",label:"Tab",key:"tab",type:"key"},{id:"enter",label:"↵",key:"enter",type:"key",primary:!0},{id:"backspace",label:"⌫",key:"backspace",type:"key"},{id:"undo",label:"Undo",key:"z",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"redo",label:"Redo",key:"z",modifiers:["control","shift"],type:"combo",osAdaptive:!0},{id:"up",label:"↑",key:"up",type:"arrow"},{id:"down",label:"↓",key:"down",type:"arrow"},{id:"left",label:"←",key:"left",type:"arrow"},{id:"right",label:"→",key:"right",type:"arrow"},{id:"home",label:"Home",key:"home",type:"key"},{id:"end",label:"End",key:"end",type:"key"},{id:"pgup",label:"PgUp",key:"pageup",type:"key"},{id:"pgdn",label:"PgDn",key:"pagedown",type:"key"},{id:"del",label:"Del",key:"delete",type:"key"},{id:"ins",label:"Ins",key:"insert",type:"key"},{id:"f1",label:"F1",key:"f1",type:"key"},{id:"f2",label:"F2",key:"f2",type:"key"},{id:"f3",label:"F3",key:"f3",type:"key"},{id:"f4",label:"F4",key:"f4",type:"key"},{id:"f5",label:"F5",key:"f5",type:"key"},{id:"f6",label:"F6",key:"f6",type:"key"},{id:"f7",label:"F7",key:"f7",type:"key"},{id:"f8",label:"F8",key:"f8",type:"key"},{id:"f9",label:"F9",key:"f9",type:"key"},{id:"f10",label:"F10",key:"f10",type:"key"},{id:"f11",label:"F11",key:"f11",type:"key"},{id:"f12",label:"F12",key:"f12",type:"key"},{id:"ctrlAltDel",label:"Ctl+Alt+Del",key:"delete",modifiers:["control","alt"],type:"combo"},{id:"ctrlShiftEsc",label:"Task Mgr",key:"escape",modifiers:["control","shift"],type:"combo"},{id:"altTab",label:"Alt+Tab",key:"tab",modifiers:["alt"],type:"combo"},{id:"altF4",label:"Alt+F4",key:"f4",modifiers:["alt"],type:"combo"},{id:"winKey",label:"Win",key:"command",type:"key"},{id:"printScreen",label:"PrtSc",key:"printscreen",type:"key"},{id:"paste",label:"Paste",key:"v",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"cut",label:"Cut",key:"x",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"selectAll",label:"All",key:"a",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"desktopPrev",label:"◀ Desk",type:"desktop",direction:"prev"},{id:"desktopNext",label:"Desk ▶",type:"desktop",direction:"next"},{id:"desktopNew",label:"+ Desk",type:"desktop",direction:"new"}],a=["esc","undo","up","down","tab","ctrl","alt","shift","cmd","backspace"],o="enter",l=[["left","right","home","end","pgup","pgdn","del"],["f1","f2","f3","f4","f5","f6","f7","altTab"],["f9","f10","f11","f12","ctrlAltDel",,"desktopPrev","desktopNext","desktopNew"]],c={enter:"enter",return:"enter",space:" ",backspace:"backspace",tab:"tab",escape:"escape",Enter:"enter"," ":"space",Backspace:"backspace",Tab:"tab",Escape:"escape",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown",Delete:"delete",Insert:"insert",F1:"f1",F2:"f2",F3:"f3",F4:"f4",F5:"f5",F6:"f6",F7:"f7",F8:"f8",F9:"f9",F10:"f10",F11:"f11",F12:"f12",CapsLock:"capslock",NumLock:"numlock",ScrollLock:"scrolllock",PrintScreen:"printscreen",ContextMenu:"menu"}},30368:(e,t,r)=>{r.d(t,{O5:()=>c,U2:()=>n,dX:()=>d,mn:()=>l,yP:()=>s});let n="/workspace",i={list:()=>n,terminal:e=>`${n}/terminal/${encodeURIComponent(e.sessionId||"")}`,files:e=>o(`${n}/files`,{ws:e.workspace,p:e.currentPath}),editor:e=>o(`${n}/editor`,{path:e.path,line:e.line,col:e.column}),git:e=>o(`${n}/git`,{ws:e.workspace}),remote:()=>`${n}/remote`,mobile:()=>`${n}/mobile`,workspaces:()=>`${n}/workspaces`,browse:e=>o(`${n}/browse`,{path:e.path}),pair:()=>`${n}/pair`,welcome:()=>`${n}/welcome`},s=["browser"],a={"":"list",terminal:"terminal",files:"files",editor:"editor",git:"git",remote:"remote",mobile:"mobile",workspaces:"workspaces",browse:"browse",pair:"pair",welcome:"welcome"};function o(e,t){let r=Object.entries(t).filter(([,e])=>null!=e&&""!==e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join("&");return r?`${e}?${r}`:e}function l(e,t){if(!e?.startsWith(n))return null;let[r,i]=e.slice(n.length).replace(/^\//,"").split("/"),s=a[r||""];if(!s)return null;let o=e=>t?.get(e)||void 0;switch(s){case"terminal":return{type:s,sessionId:i?decodeURIComponent(i):void 0};case"files":return{type:s,workspace:o("ws"),currentPath:o("p")};case"editor":return{type:s,path:o("path"),line:u(o("line")),column:u(o("col"))};case"git":return{type:s,workspace:o("ws")};case"browse":return{type:s,path:o("path")};default:return{type:s}}}function c(e){return(i[e?.type]||i.list)(e)}function d(e,t){let r=c(t),n=e.findIndex(e=>c(e)===r);if(-1!==n)return e.slice(0,n+1);if("terminal"===t.type&&e[e.length-1]?.type==="terminal"){let r=[...e];return r[r.length-1]=t,r}return null}function u(e){let t=Number(e);return Number.isFinite(t)?t:void 0}},30562:(e,t,r)=>{r.d(t,{O:()=>n,Sn:()=>c,TR:()=>l,_8:()=>s,cC:()=>p,dM:()=>u,fm:()=>i,jP:()=>d,lE:()=>o,qn:()=>h,w:()=>a});let n="https://9remote.cc",i="https://9remote.cc/",s=2208,a=`http://127.0.0.1:${s}`,o=a,l=`${a}/api/ui/state`,c={connect:`${n}/api/connect`,tempKeyCreate:`${n}/api/temp-key/create`,tempKeyVerify:`${n}/api/temp-key/verify`,tempKeyRemove:`${n}/api/temp-key/remove`,turnCredentials:`${n}/api/webrtc/turn-credentials`},d=5,u=2e3,h=5e3,p=1e4},31856:(e,t,r)=>{r.d(t,{U:()=>p,x$:()=>h,zm:()=>m});var n=r(30562),i=r(70658),s=r(67841),a=r(189),o=r(69469),l=r(81353),c=r(99022),d=r(81851);let u=0;async function h(e,{currentKey:t}={}){let r=++u,c=l.rh.getState(),d=t||c.hosts[c.currentKey]?.full||c.currentKey;d&&((0,s.d6)(d,window.location.pathname+window.location.search),l.rh.getState().setAutoConnect((0,o.Uo)(d),!0));let p=await fetch(n.Sn.connect,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:e})});if(!p.ok)throw Error("connect failed");let m=await p.json(),f=!1;for(let t=0;t<n.jP&&!f;t++)(f=await (0,i.zg)(m.tunnelUrl,e))||!(t<n.jP-1)||await new Promise(e=>setTimeout(e,n.dM));if(!f)throw Error("unreachable");r===u&&(0,a.vd)({apiKey:e,tunnelUrl:m.tunnelUrl,mode:"remote",localIp:m.localIp||null})}function p(e){try{e?sessionStorage.setItem(d.aS,"1"):sessionStorage.removeItem(d.aS)}catch{}}function m(e,{remember:t=!0,leavingHead:r=null,navigate:n=!0}={}){e?.tail&&e.tempKey&&(0,c.LG)(e.tempKey,{tail:e.tail}),p(t),r&&((0,s.d6)(r,window.location.pathname+window.location.search),l.rh.getState().setAutoConnect((0,o.Uo)(r),!0)),n&&(window.location.href="/workspace/")}},32763:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(54568),i=r(7620),s=r(96605),a=r(56156),o=r(9121);function l({isOpen:e,onClose:t,onScan:c}){let{t:d}=(0,o.s)(),u=(0,i.useRef)(null),h=(0,i.useRef)(null),p=(0,i.useRef)(null),m=(0,i.useRef)(null),f=(0,i.useRef)(null),[y,g]=(0,i.useState)(""),[_,b]=(0,i.useState)(""),w=(0,i.useCallback)(async e=>{if(h.current)try{await h.current.stop()}catch(e){}b("detected"),await new Promise(e=>setTimeout(e,300)),b("authenticating"),await c(e)||(b(""),f.current?.())},[c]),k=(0,i.useCallback)(async()=>{if(!p.current){let e=await Promise.all([r.e(2732),r.e(9700)]).then(r.bind(r,89700)).catch(()=>null);if(!e)return void g(d("login.qrLibFail"));p.current=e.Html5Qrcode}let e=document.getElementById("qr-reader");if(!e)return void g(d("login.qrInitFail"));try{e.innerHTML="";let t=new p.current("qr-reader");h.current=t,await t.start({facingMode:"environment"},{fps:10,qrbox:{width:250,height:250}},e=>{m.current?.(e)},()=>{})}catch(t){let e=t.toString();e.includes("NotAllowedError")?g(d("login.qrCamDenied")):e.includes("NotFoundError")?g(d("login.qrNoCamera")):e.includes("NotReadableError")?g(d("login.qrCamBusy")):g(d("login.qrCamError"))}},[d]),A=(0,i.useCallback)(async()=>{if(h.current){try{await h.current.stop()}catch(e){}h.current=null}g(""),b(""),t()},[t]);return((0,i.useEffect)(()=>{m.current=w},[w]),(0,i.useEffect)(()=>{if(!e)return;let t=!1;f.current=async()=>{h.current=null,await new Promise(e=>setTimeout(e,400)),t||k()};let r=setTimeout(()=>{t||k()},200);return()=>{if(t=!0,clearTimeout(r),f.current=null,h.current){try{h.current.stop()}catch(e){}h.current=null}}},[e,k]),e)?(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,n.jsxs)("div",{className:"relative card-elev max-w-md w-full mx-4 overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[(0,n.jsx)("h2",{className:"text-xl font-bold text-text",children:d("login.qrScanTitle")}),(0,n.jsx)("button",{onClick:A,className:"text-text-muted hover:text-text transition-colors p-1",children:(0,n.jsx)(s.X,{size:24})})]}),(0,n.jsx)("div",{className:"relative bg-black",children:(0,n.jsx)("div",{id:"qr-reader",ref:u,className:"w-full",style:{minHeight:"300px"}})}),(0,n.jsxs)("div",{className:"p-4",children:[y?(0,n.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-red-500/10 rounded-brand text-red-400",children:[(0,n.jsx)(s.RI,{size:20,className:"flex-shrink-0 mt-0.5"}),(0,n.jsx)("p",{className:"text-sm",children:y})]}):"detected"===_?(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 bg-green-500/10 rounded-brand text-green-400",children:[(0,n.jsx)(s.vW,{size:22}),(0,n.jsx)("p",{className:"text-sm font-medium",children:d("login.qrDetected")})]}):"authenticating"===_?(0,n.jsx)("div",{className:"flex items-center justify-center gap-2 p-3 bg-brand-500/10 rounded-brand text-brand-400",children:(0,n.jsx)("p",{className:"text-sm font-medium",children:d("login.qrAuthenticating")})}):(0,n.jsx)("p",{className:"text-sm text-text-muted text-center",children:d("login.qrHint")}),(0,n.jsx)(a.A,{variant:"secondary",onClick:A,disabled:"authenticating"===_,className:"w-full mt-4",children:"authenticating"===_?d("login.qrPleaseWait"):d("common.cancel")})]})]})}):null}},36487:(e,t,r)=>{r.d(t,{$Z:()=>Y,A_:()=>c,Ao:()=>p,B$:()=>q,BM:()=>ei,DW:()=>K,Ds:()=>h,EE:()=>R,FC:()=>ef,Fz:()=>m,Gp:()=>ee,IJ:()=>X,Il:()=>em,Jv:()=>o,KA:()=>_,KN:()=>I,Lo:()=>Q,M8:()=>et,Mg:()=>ev,Nz:()=>eb,OM:()=>ed,Pj:()=>E,Pz:()=>V,Qe:()=>d,RF:()=>ey,RS:()=>G,TM:()=>$,Tb:()=>k,Tk:()=>b,Uc:()=>es,VE:()=>el,W$:()=>U,YA:()=>ep,YS:()=>T,ZU:()=>O,_C:()=>eS,_O:()=>Z,_z:()=>j,aD:()=>D,am:()=>S,ar:()=>B,b5:()=>f,b9:()=>e_,bl:()=>eg,bs:()=>x,c:()=>F,cK:()=>ek,dU:()=>en,de:()=>eC,dt:()=>n,eE:()=>ec,eu:()=>P,fw:()=>eu,g$:()=>eA,gH:()=>u,hp:()=>C,i5:()=>eh,iW:()=>w,j4:()=>er,jK:()=>i,k9:()=>s,kn:()=>l,ll:()=>v,ok:()=>ex,pS:()=>a,pZ:()=>W,pt:()=>z,qQ:()=>A,qj:()=>y,qw:()=>ea,t:()=>N,vP:()=>M,vk:()=>H,wu:()=>L,y:()=>ew,zm:()=>eo,zv:()=>g});let n=["git status","git add .",'git commit -m ""',"git push","git pull","git fetch","git diff","git log --oneline","git branch","git checkout","git checkout -b","git switch","git stash","git stash pop","git merge","git rebase","git clone","git remote -v","git restore","npm install","npm ci","npm run dev","npm run build","npm run test","npm run lint","npm outdated","pnpm install","pnpm dev","yarn dev","bun install","cd ..","cd ~","cd -","ls -la","ll","mkdir -p","cp -r","find . -name","du -sh","chmod +x","ln -s","grep -rn","grep -i","wc -l","tail -f","ps aux","df -h","free -h","lsof -i","netstat -tlnp","docker ps","docker ps -a","docker images","docker logs -f","docker exec -it","docker compose up -d","docker compose down","docker build -t","code .","claude","claude --continue","claude --resume","claude --dangerously-skip-permissions","claude mcp","codex","codex --full-auto"],i=760,s={min:400,max:1/0},a=2,o=0,l=12,c=250,d=8,u={default:190,min:180,max:1/0},h={default:190,min:190,max:1/0},p={default:420,min:280,max:1/0},m=[{id:"remote",labelKey:"menu.remoteDesktop",descKey:"menu.remoteDesktopHint",group:"header",section:"remote"},{id:"sites",labelKey:"menu.sites",descKey:"menu.sitesHint",group:"header",section:"remote"},{id:"mobile",labelKey:"mobile.androidDevice",descKey:"mobile.androidDeviceHint",group:"header",section:"remote"},{id:"notifications",labelKey:"menu.notificationsButton",descKey:"menu.notificationsButtonHint",group:"header",section:"plugins"},{id:"folder",labelKey:"menu.showFolder",group:"pane",section:"terminal",storeKey:"showFolderButton",setterKey:"setShowFolderButton"},{id:"note",labelKey:"menu.showNote",group:"pane",section:"terminal",storeKey:"showNoteButton",setterKey:"setShowNoteButton"}],f={default:300,min:240,max:1/0},y={width:{default:300,min:240,max:900},height:{default:620,min:320},margin:12,defaultOffset:24},g=20,_=1e4,b={maxDepth:1,deepMaxDepth:3,cacheTtlMs:3e4},w={topThresholdLines:5,guardMs:600,minFetchBytes:256,chainMax:3,chainDebounceMs:300,disabled:!1},k=5242880,A=5,v=3e3,S=150,T=100,x=101,C=200,R={Escape:{data:"\x1b"},c:{ctrl:!0,data:"\x03",requireNoSelection:!0},d:{ctrl:!0,data:"\x04"},z:{ctrl:!0,data:"\x1a"},l:{ctrl:!0,data:"\f"}},P=250,I=999,$=["check again","continue","summarize"],D="terminal:noteSync",M="terminal:openSession",L=5e3,O=250,U=90,E={cursorBlink:!0,fontSize:12,fontSizeMobile:12,fontFamily:'ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "Noto Sans Mono", Menlo, Monaco, "Courier New", monospace',scrollback:15e3,convertEol:!0,allowProposedApi:!0,scrollOnUserInput:!0,fastScrollModifier:"none",smoothScrollDuration:0,rescaleOverlappingGlyphs:!0,minimumContrastRatio:4.5,macOptionIsMeta:!0};function B(e){return null!=e?e:window.innerWidth<768?E.fontSizeMobile:E.fontSize}let j=.8,N=.25,F="16,16,20",W="116,120,136",q=.28,K={min:.3,max:.95,step:.01},H={none:{label:"None"},art1:{label:"Anime 1",src:"/backgrounds/bg9.jpg"},art2:{label:"Anime 2",src:"/backgrounds/bg2.jpg"},art3:{label:"Anime 3",src:"/backgrounds/bg3.jpg"},art4:{label:"Anime 4",src:"/backgrounds/bg4.jpg"},art5:{label:"Anime 5",src:"/backgrounds/bg5.jpg"},art7:{label:"Anime 7",src:"/backgrounds/bg7.jpg"},art8:{label:"Anime 8",src:"/backgrounds/bg8.jpg"},art9:{label:"Anime 9",src:"/backgrounds/bg10.jpg"},art10:{label:"Anime 10",src:"/backgrounds/bg11.jpg"},art11:{label:"Anime 11",src:"/backgrounds/bg12.jpg"},art12:{label:"Anime 12",src:"/backgrounds/bg13.jpg"}};function z(e,t){return e&&t&&"none"!==t&&(H[t]||String(t).startsWith("custom"))?{...e,background:"#10101400"}:e}function J(e){return"custom"===e?"custom":"string"==typeof e&&e.startsWith("custom:")?e.slice(7):null}function G(e,t=[]){let r=J(e);return r?t.find(e=>e?.id===r)?.dataUrl||null:H[e]?.src||null}function V(e){return H[e]?.label||(J(e)?"Custom":H.none.label)}let Z=4e3,Q=2e4;function X(e,t=[]){return Array.isArray(e)?e.filter(e=>{let r=J(e);return r?t.some(e=>e?.id===r):"none"===e||!!H[e]}):[]}function Y(e,t,r=[],n=0){var i;return X([e],r)[0]||(i=X(t,r),Array.isArray(i)&&0!==i.length&&i[n%i.length]||"none")}let ee={gpuAcceleration:"auto",smoothScrollDuration:125},et={clipboard:!0,search:!0,image:!0},er=30,en=2,ei=100,es=600,ea=150,eo=4e3,el=3e3,ec=8e3,ed=6e4,eu=3e4,eh="28%",ep=400,em={lineHeight:18,sensitivity:1,friction:.95,minVelocity:.3,maxVelocity:55,wheelStepLines:1,tuiThrottleMs:50,momentumRenderCadenceMs:33,tuiBackpressureTimeoutMs:120,sgrUp:(e,t)=>`\x1b[<64;${e};${t}M`,sgrDown:(e,t)=>`\x1b[<65;${e};${t}M`},ef={longPressMs:450,moveTolerance:10,wordChars:/[A-Za-z0-9._\-/~:@]/},ey={verbs:["cd","ls","ll","cat","less","more","head","tail","vim","nvim","nano","bat","code","code-insiders","rm","cp","mv","mkdir","touch","chmod","open","grep"],ttlMs:3e5,debounceMs:120,maxDirs:20,maxResults:8},eg={minDistance:60,ratio:1.5,maxDuration:500},e_=e=>!!e&&27!==e.charCodeAt(0),eb=e=>"string"==typeof e&&(/^\x1b\[[?>=][0-9;]*c$/.test(e)||/^\x1b\[[0-9]+;[0-9]+R$/.test(e)||/^\x1b\[0n$/.test(e)||/^\x1b\]\d+;/.test(e)),ew=[{id:"ctrl",label:"Ctrl",key:"Ctrl",type:"modifier"},{id:"opt",label:"Opt",key:"Alt",type:"modifier"},{id:"shift",label:"Shift",key:"Shift",type:"modifier"},{id:"meta",label:"⌘",key:"Meta",type:"modifier"},{id:"esc",label:"Esc",key:"Escape",type:"key"},{id:"tab",label:"Tab",key:"Tab",type:"key"},{id:"enter",label:"↵",key:"Enter",type:"key"},{id:"backspace",label:"⌫",key:"Backspace",type:"key"},{id:"up",label:"↑",key:"ArrowUp",type:"arrow"},{id:"down",label:"↓",key:"ArrowDown",type:"arrow"},{id:"left",label:"←",key:"ArrowLeft",type:"arrow"},{id:"right",label:"→",key:"ArrowRight",type:"arrow"},{id:"home",label:"Home",key:"Home",type:"key"},{id:"end",label:"End",key:"End",type:"key"},{id:"pgup",label:"PgUp",key:"PageUp",type:"key"},{id:"pgdn",label:"PgDn",key:"PageDown",type:"key"},{id:"del",label:"Del",key:"Delete",type:"key"},{id:"ins",label:"Ins",key:"Insert",type:"key"},{id:"ctrlA",label:"^A",key:"a",type:"ctrl"},{id:"ctrlC",label:"^C",key:"c",type:"ctrl"},{id:"ctrlD",label:"^D",key:"d",type:"ctrl"},{id:"ctrlE",label:"^E",key:"e",type:"ctrl"},{id:"ctrlK",label:"^K",key:"k",type:"ctrl"},{id:"ctrlL",label:"^L",key:"l",type:"ctrl"},{id:"ctrlN",label:"^N",key:"n",type:"ctrl"},{id:"ctrlP",label:"^P",key:"p",type:"ctrl"},{id:"ctrlR",label:"^R",key:"r",type:"ctrl"},{id:"ctrlT",label:"^T",key:"t",type:"ctrl"},{id:"ctrlU",label:"^U",key:"u",type:"ctrl"},{id:"ctrlW",label:"^W",key:"w",type:"ctrl"},{id:"ctrlX",label:"^X",key:"x",type:"ctrl"},{id:"ctrlY",label:"^Y",key:"y",type:"ctrl"},{id:"ctrlZ",label:"^Z",key:"z",type:"ctrl"},{id:"f1",label:"F1",key:"F1",type:"key"},{id:"f2",label:"F2",key:"F2",type:"key"},{id:"f3",label:"F3",key:"F3",type:"key"},{id:"f4",label:"F4",key:"F4",type:"key"},{id:"f5",label:"F5",key:"F5",type:"key"},{id:"f6",label:"F6",key:"F6",type:"key"},{id:"f7",label:"F7",key:"F7",type:"key"},{id:"f8",label:"F8",key:"F8",type:"key"},{id:"f9",label:"F9",key:"F9",type:"key"},{id:"f10",label:"F10",key:"F10",type:"key"},{id:"f11",label:"F11",key:"F11",type:"key"},{id:"f12",label:"F12",key:"F12",type:"key"},{id:"pipe",label:"|",key:"|",type:"key"},{id:"tilde",label:"~",key:"~",type:"key"},{id:"slash",label:"/",key:"/",type:"key"},{id:"backslash",label:"\\",key:"\\",type:"key"},{id:"dash",label:"-",key:"-",type:"key"},{id:"underscore",label:"_",key:"_",type:"key"}],ek=["esc","up","down","ctrlC","ctrl","opt","shift","tab","slash"],eA="enter",ev=[["left","right","home","end","pgup","pgdn","del"],["ctrlZ","ctrlR","ctrlL","ctrlA","ctrlE","ctrlW","ctrlD"],["f1","f2","f3","f4","f5","f10","f11"]],eS={base:"flex items-center justify-center rounded-brand font-semibold transition-all duration-150 ease-out active:scale-[0.94]",textNormal:"text-xs",textSmall:"text-[11px]",normal:"bg-surface-2 hover:bg-surface-3 text-text",arrow:"bg-surface-2 hover:bg-surface-3 text-text text-sm",modifierActive:"bg-brand-500 text-white shadow-sm",pinned:"bg-brand-500/15 hover:bg-brand-500/25 text-brand-400",size:{minWidth:"34px",height:"32px",paddingLeft:"6px",paddingRight:"6px"},sizeLarge:{minWidth:"38px",height:"32px",paddingLeft:"8px",paddingRight:"8px"},sizeSmall:{width:"28px",height:"28px"}},eT=["main","master"],ex=e=>eT.includes(e),eC={DELAY_MS:400,GAP_PX:6,EDGE_PX:8,MAX_WIDTH_PX:320,EST_HEIGHT_PX:48,SLACK_PX:.5}},44964:(e,t,r)=>{r.d(t,{N:()=>i.N0,u:()=>l});var n=r(7620),i=r(81851);let s="9remote_api_keys",a=()=>{window.dispatchEvent(new Event(i.N0))};function o(e){try{return btoa(e)}catch{return e}}function l(){let e=(0,n.useCallback)(()=>{try{let e=localStorage.getItem(s);if(!e)return[];return JSON.parse(e).map(e=>({...e,key:function(e){try{return atob(e)}catch{return e}}(e.key)}))}catch(e){return console.error("Failed to load API keys:",e),[]}},[!0]),t=(0,n.useCallback)((t,r="")=>{if(t&&1)try{let n=e(),i=n.findIndex(e=>e.key===t);if(-1!==i){let e=n.map((e,t)=>({...e,key:o(e.key),lastLoginDate:t===i?new Date().toISOString():e.lastLoginDate}));localStorage.setItem(s,JSON.stringify(e));return}let l={id:Date.now().toString(),key:o(t),label:r||`Key ${n.length+1}`,createdAt:new Date().toISOString(),lastLoginDate:new Date().toISOString()},c=[...n.map(e=>({...e,key:o(e.key)})),l];localStorage.setItem(s,JSON.stringify(c)),a()}catch(e){console.error("Failed to save API key:",e)}},[!0,e]),r=(0,n.useCallback)((t,r)=>{try{let n=e(),i=n.findIndex(e=>e.id===t),l=i+r;if(-1===i||l<0||l>=n.length)return;[n[i],n[l]]=[n[l],n[i]],localStorage.setItem(s,JSON.stringify(n.map(e=>({...e,key:o(e.key)})))),a()}catch(e){console.error("Failed to move API key:",e)}},[!0,e]),i=(0,n.useCallback)(t=>{try{let r=e().filter(e=>e.id!==t).map(e=>({...e,key:o(e.key)}));localStorage.setItem(s,JSON.stringify(r)),a()}catch(e){console.error("Failed to remove API key:",e)}},[!0,e]),l=(0,n.useCallback)(()=>{try{localStorage.removeItem(s)}catch(e){console.error("Failed to clear API keys:",e)}},[!0]),c=(0,n.useCallback)(()=>{try{let e=localStorage.getItem(s);if(!e)return!1;return JSON.parse(e).length>0}catch{return!1}},[!0]),d=(0,n.useCallback)((t,r)=>{try{let n=e().map(e=>({...e,key:o(e.key),label:e.id===t?r:e.label||""}));localStorage.setItem(s,JSON.stringify(n)),a()}catch(e){console.error("Failed to rename API key:",e)}},[!0,e]),u=(0,n.useCallback)(t=>{if(t&&1)try{let r=e().map(e=>({...e,key:o(e.key),lastLoginDate:e.key===t?new Date().toISOString():e.lastLoginDate}));localStorage.setItem(s,JSON.stringify(r))}catch(e){console.error("Failed to update last login date:",e)}},[!0,e]);return{saveKey:t,loadKeys:e,moveKey:r,removeKey:i,renameKey:d,clearKeys:l,hasStoredKeys:c,updateLastLogin:u}}},55285:(e,t,r)=>{r.d(t,{c:()=>i});var n=r(30068);function i(e,...t){n.eR.debug?.[e]&&console.log(...t)}},56156:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(54568);function i({children:e,variant:t="primary",size:r="md",disabled:s=!1,loading:a=!1,onClick:o,className:l="",...c}){let d=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[r]} ${s||a?"cursor-not-allowed":""} ${l}`;return(0,n.jsx)("button",{onClick:o,disabled:s||a,className:d,...c,children:a?(0,n.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,n.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},59506:(e,t,r)=>{function n(e,t){if(e===t)return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t)return!1;let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n of r)if(!(n in t)||e[n]!==t[n])return!1;return!0}function i(e,t){if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function s(e,t){if(e===t)return!0;if(!e||!t)return!1;let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let i of r)if(!(i in t)||!n(e[i],t[i]))return!1;return!0}r.d(t,{dI:()=>n,h3:()=>s,nk:()=>i})},67841:(e,t,r)=>{r.d(t,{H$:()=>a,d6:()=>s});var n=r(7620),i=r(79748);let s=(e,t)=>{if(e&&t)try{localStorage.setItem("9remote_nav:"+e,t)}catch{}};function a(e){let t=(0,i.usePathname)(),r=(0,i.useSearchParams)();(0,n.useEffect)(()=>{if(!e||!t?.startsWith("/workspace"))return;let n=function(e,t){if(!e)return"";let r=t?.toString();return r?`${e}?${r}`:e}(t,r);n&&s(e,n)},[e,t,r])}},68469:(e,t,r)=>{r.d(t,{O:()=>u,Y:()=>c});let n=new Uint8Array([48,42,48,5,6,3,43,101,110,3,33,0]);function i(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}function s(e){let t="",r=new Uint8Array(e);for(let e=0;e<r.length;e++)t+=String.fromCharCode(r[e]);return btoa(t)}function a(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}async function o(e){let t;try{t=i(String(e))}catch{return null}if(32!==t.length)return null;try{return await crypto.subtle.importKey("spki",a(n,t),{name:"X25519"},!0,[])}catch{return null}}async function l(e,t,r,n){let i=await crypto.subtle.deriveBits({name:"X25519",public:t},e,256),s=await crypto.subtle.importKey("raw",i,"HKDF",!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:a(r,n),info:new TextEncoder().encode("9remote-tail-seal-v1")},s,{name:"AES-GCM",length:256},!1,["encrypt"])}async function c(e,t){if("string"!=typeof e||!e||"string"!=typeof t||!t)return null;let r=await o(t);if(!r)return null;try{let t=await crypto.subtle.generateKey({name:"X25519"},!0,["deriveBits"]),n=new Uint8Array(await crypto.subtle.exportKey("spki",t.publicKey)).slice(-32),i=new Uint8Array(await crypto.subtle.exportKey("spki",r)).slice(-32),a=await l(t.privateKey,r,n,i),o=crypto.getRandomValues(new Uint8Array(12)),c=await crypto.subtle.encrypt({name:"AES-GCM",iv:o},a,new TextEncoder().encode(e));return{epk:s(n),iv:s(o),ct:s(c)}}catch{return null}}let d="ABCDEFGHJKLMNPQRSTUVWXYZ23456789";async function u(e,t){if("u"<typeof crypto||!crypto.subtle)return null;let r=[e,t].map(e=>{let t;try{t=i(String(e||""))}catch{t=new Uint8Array(0)}let r=new Uint8Array(2);return new DataView(r.buffer).setUint16(0,t.length),a(r,t)}),n=new Uint8Array(await crypto.subtle.digest("SHA-256",a(...r)));return d[n[0]%32]+d[n[1]%32]}},69469:(e,t,r)=>{function n(e){return"string"==typeof e&&!!e&&/^sk-[a-z0-9]{8}-[a-z0-9]{4}-[0-9a-f]{6}$/.test(e.trim().toLowerCase())}function i(e){if("string"!=typeof e||!/^sk-[a-z0-9]{8}-[a-np-z1-9]{8}-[a-np-z1-9]{8}$/.test(e))return e||null;let t=e.split("-");return`${t[0]}-${t[1]}-${t[2]}`}function s(e){return"string"==typeof e&&/^sk-[a-z0-9]{8}-[a-np-z1-9]{8}-[a-np-z1-9]{8}$/.test(e)?e.split("-")[3]:null}r.d(t,{Cj:()=>s,PF:()=>n,Uo:()=>i})},70658:(e,t,r)=>{r.d(t,{As:()=>f,zg:()=>u});var n=r(7620),i=r(79748),s=r(30562),a=r(69469),o=r(99022),l=r(96631),c=r(189);let d="wrong-key-tail";async function u(e,t,r=s.qn){try{let t=new AbortController,n=setTimeout(()=>t.abort(),r),i=await fetch(`${e}/api/health`,{signal:t.signal});return clearTimeout(n),i.ok}catch{return!1}}async function h(e,{tail:t,tempKey:r},n=s.qn){try{let i=new AbortController,s=setTimeout(()=>i.abort(),n),a=await fetch(`${e}/api/verify-key`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tail:t||null,tempKey:r||null}),signal:i.signal});if(clearTimeout(s),!a.ok)return null;return(await a.json())?.ok===!0}catch{return null}}async function p(){return(0,l._r)()?(0,l.rh)(await m()):(0,l.Yr)()?window.location.origin:null}async function m(){try{let e=await fetch(s.TR);return e.ok?await e.json():null}catch{return null}}function f(){let[e,t]=(0,n.useState)(!1),[r,l]=(0,n.useState)(""),u=(0,i.useRouter)(),{setAuth:f}=(0,c.Fo)(),y=(0,n.useCallback)(async(e,{persistSession:r=!0}={})=>{t(!0),l("");try{let t,n=await p();if(n){let t=e.tail||(0,a.Cj)(e.apiKey||""),i=e.tempKey||(e.token?.length<=8?e.token:null),s=await m(),c=(0,a.Uo)(s?.permanentKey||""),u=(0,a.Uo)(e.apiKey||e.token||""),p=String(s?.oneTimeKey||"").slice(0,6).toUpperCase(),y=i?!!p&&p===i.toUpperCase():!!c&&!!u&&(0,a.Uo)(c)===u;try{let s=y?await h(n,{tail:t,tempKey:i}):null;if(!0===s){let s=e.apiKey||i||"",l=(0,a.Uo)(s)||"direct";return t&&(0,o.LG)(l,{tail:t}),r&&f({apiKey:l,tunnelUrl:n,mode:"local",tempKey:i?i.toUpperCase():null,localIp:null}),{success:!0,shouldAskToSave:!0,apiKey:l}}if(!1===s)return l(d),{success:!1,wrongTail:!0}}catch{}}let i=new AbortController,c=setTimeout(()=>i.abort(),s.cC);try{t=await fetch(s.Sn.connect,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,apiKey:(0,a.Uo)(e.apiKey)}),signal:i.signal})}catch(e){throw Error(e?.name==="AbortError"?"Connection timed out. Please try again.":"Network error. Please try again.")}finally{clearTimeout(c)}if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Authentication failed")}let u=await t.json(),y=(0,a.Uo)(e.apiKey||u.apiKey);u.hostKeys?.x&&(0,o.LG)(y,{hostSealKey:u.hostKeys.x,hostPubKey:u.hostKeys.ed||null});let g=e.tail||(0,a.Cj)(e.apiKey||"");if(u.tunnelUrl&&(g||e.tempKey)){let t=await h(u.tunnelUrl,{tail:g,tempKey:e.tempKey||null});if(!1===t)return l(d),{success:!1,wrongTail:!0}}return r&&f({apiKey:y,tunnelUrl:u.tunnelUrl||null,mode:"remote",tempKey:e.tempKey?e.tempKey.toUpperCase():null,localIp:u.localIp||null}),{success:!0,shouldAskToSave:!0,apiKey:y}}catch(e){return l(e.message),{success:!1,error:e.message}}finally{t(!1)}},[u,f]);return{loading:e,error:r,setError:l,authenticateWithToken:(0,n.useCallback)(async(e,t=!1,r=null,n)=>t?y({token:e,tempKey:e,tail:r},n):y({token:e},n),[y]),authenticateWithApiKey:(0,n.useCallback)((e,t)=>y({apiKey:e},t),[y])}}},72627:(e,t,r)=>{r.d(t,{AD:()=>n,Jc:()=>l,Mt:()=>a,g4:()=>o,gk:()=>s,xs:()=>i});let n="__ungrouped__",i=e=>e?.workspaceId??e?.groupId??null;function s({sessions:e,openedSessions:t,livePanes:r,mountedWorkspaces:a,activeWorkspaceId:o,isDesktop:l}){let c=new Set(e.filter(e=>i(e)===(o??null)).map(e=>e.id)),d=t.filter(e=>c.has(e)),u=new Set([...d,...r.filter(e=>t.includes(e))]),h=t.filter(e=>u.has(e)),p=new Map(e.map(e=>[e.id,i(e)])),m=new Set(t.filter(e=>!!c.has(e)||!!l&&!!a[p.get(e)??n])),f=new Map(d.map((e,t)=>[e,t]));return{workspaceSessionIds:c,workspaceOpenedSessions:d,renderedSessions:h,mountedSet:m,workspaceIndex:f}}let a=(e,t,r)=>!t&&r.has(e)?120*r.get(e):0;function o({container:e,pane:t}){if(!e||!t||t.offsetWidth<=0)return null;let r=t.getBoundingClientRect().left-e.getBoundingClientRect().left;return Math.max(0,Math.min(e.scrollLeft+r-(e.clientWidth-t.offsetWidth)/2,e.scrollWidth-e.clientWidth))}function l({rowWidth:e,paneCount:t,sidebarWidth:r,sidePx:n,gapPx:i,paddingPx:s,minWidth:a}){return!(e>0)||t<=0?null:Math.max(a,Math.floor((e-r-s-n-(t-1)*i)/t))}},75677:(e,t,r)=>{r.d(t,{o:()=>n});function n(e){if(!e)return"";if(e.length<=14)return e;let t=e.substring(0,8),r=e.substring(e.length-6),n="•".repeat(12);return`${t}${n}${r}`}},81353:(e,t,r)=>{r.d(t,{Nw:()=>x,eJ:()=>S,d:()=>T,rh:()=>v});var n=r(94245),i=r(23635),s=r(89228),a=r(93162),o=r(30068),l=r(69469),c=r(99022);let d="9remote_fleet_connected";function u(){try{return JSON.parse(localStorage.getItem(d)||"[]")}catch{return[]}}class h{constructor({hostOf:e,patch:t,bindBus:r,ready:n,probeTargets:i,servedBy:s=null,servedBus:a=null}){this._hostOf=e,this._patch=t,this._bindBus=r,this._ready=n,this._probeTargets=i,this._servedBy=s||(()=>!1),this._servedBus=a||(()=>null),this.buses=new Map,this._connectTimers=new Map,this.pending=new Map,this._probeTimer=null,this._probeVisible=null}busOf(e){return e&&this.buses.get(e)?.busRef?.current||null}pmOf(e){return this.buses.get(e)||null}has(e){return this.buses.has(e)}whenReady(e,t){let r=this._hostOf(e);if(!e||!r)return;if(this._servedBy(e)){let r=this._servedBus(e);r&&t(r);return}let n=this.busOf(e);if(n&&"online"===r.status)return void t(n);if(!this._canOpen(r,e))return;this.open(e,r);let i=this.pending.get(e)||[];i.push(t),this.pending.set(e,i)}persistIntent(e,t){if(e)try{let r=new Set(u());t?r.add(e):r.delete(e),localStorage.setItem(d,JSON.stringify([...r]))}catch{}}_canOpen(e,t){return!(!e||this._servedBy(t))&&!!e.full}open(e,t){if(this.has(e))return;let r=function(){try{return localStorage.getItem("9remote_deviceId")}catch{return null}}();if(!this._canOpen(t,e)||!r)return;this.persistIntent(e,!0);let n=(0,l.Cj)(t.full);n&&(0,c.LG)(e,{tail:n});let i=t=>this._patch(e,t),s=!1,d=new a.g({tunnelUrl:null,localIp:null,namespace:"",socketOptions:{auth:{apiKey:e,tempKey:null,deviceId:r}},apiKey:e,deviceId:r,tempKey:null,onConnect:t=>{clearTimeout(this._connectTimers.get(e)),this._connectTimers.delete(e),i({status:"online",lastSeenAt:Date.now(),updating:!1,approval:null});let r=this.pending.get(e);if(r)for(let n of(this.pending.delete(e),r))try{n(t)}catch{}s||(s=!0,this._bindBus(t,e)),this._ready(t,e)},onDisconnect:()=>{this.pending.delete(e),i({status:"offline",lastSeenAt:Date.now()})}},{enableWebRTC:o.eR.enableWebRTC,enableTurn:o.eR.enableTurn,apiKey:e,onTransportChange:e=>i({carrier:e||"ws"})});this.buses.set(e,d),i({status:"connecting"}),this._connectTimers.set(e,setTimeout(()=>this._onConnectTimeout(e),15e3)),d.connect()}_onConnectTimeout(e){this._connectTimers.delete(e),this.buses.has(e)&&this._hostOf(e)?.status==="connecting"&&(this._patch(e,{status:"offline"}),this._hostOf(e)?.approval!=="pending"&&this.persistIntent(e,!1))}drop(e){let t=this.buses.get(e);t&&(t.disconnect(),this.buses.delete(e)),clearTimeout(this._connectTimers.get(e)),this._connectTimers.delete(e),this.pending.delete(e)}retry(e){this.drop(e),this.open(e,this._hostOf(e))}closeAll(){for(let e of this.buses.values())e.disconnect();for(let e of(this.buses.clear(),this._connectTimers.values()))clearTimeout(e);this._connectTimers.clear(),this.pending.clear(),this.disarmProbe()}armProbe(){this._probeTimer||(this._probeTimer=setInterval(()=>{document.hidden||this.probeOnce()},6e4),this._probeVisible=()=>{"visible"===document.visibilityState&&this.probeOnce()},document.addEventListener("visibilitychange",this._probeVisible))}disarmProbe(){this._probeTimer&&(clearInterval(this._probeTimer),this._probeTimer=null,document.removeEventListener("visibilitychange",this._probeVisible),this._probeVisible=null)}probeOnce(){let e=this._probeTargets().filter(e=>!this.has(e));e.length&&fetch("/api/host-status",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({heads:e})}).then(e=>e.ok?e.json():null).then(t=>{for(let r of e){if(this.has(r))continue;let e=t?.hosts?.[r];e&&this._patch(r,{status:e.online?"online":"offline"})}}).catch(()=>{})}}var p=r(18753),m=r(59506),f=r(6134);let y="9remote_fleet_cache",g=null;function _(e){clearTimeout(g),g=setTimeout(()=>{g=null;let t={};for(let[r,n]of Object.entries(e().hosts))t[r]={label:n.label,platform:n.platform,version:n.version,sessions:n.sessions,workspaces:n.workspaces,statusMap:n.statusMap,lastSeenAt:n.lastSeenAt};try{localStorage.setItem(y,JSON.stringify(t))}catch{}},1e3)}let b=e=>({key:e,full:null,label:"",status:"offline",carrier:"ws",sessions:[],workspaces:[],statusMap:{},tasksBySession:{},platform:null,version:null,lastSeenAt:null,updateAvailable:null,canSelfUpdate:!1,updating:!1,approval:null,remoteAvailable:!1,mobileAvailable:!1,isCodespaces:!1,mobileDeviceCount:0}),w=(e,t)=>v.getState()._patchHost(e,t),k=(e,t)=>{e?.emit("getSessions",e=>{Array.isArray(e)&&w(t,{sessions:e})}),e?.emit("getWorkspaces",e=>{Array.isArray(e)&&w(t,{workspaces:e})}),e?.emit("getStatusState"),e?.emit("getSessionTasks",e=>v.getState().applySessionTasksState(t,e))},A=null,v=(0,n.v)((e,t)=>({hosts:{},currentKey:null,sync(r,n){let i=n||"",s=new Map;for(let e of r){let t=(0,l.Uo)(e.key);t&&!s.has(t)&&s.set(t,{full:e.key,label:e.label||""})}i&&!s.has(i)&&s.set(i,{full:null,label:""});let a=[...s.keys()].filter(e=>e!==i).slice(0,8),o=new Set(a);for(let e of[...A.buses.keys()])o.has(e)||A.drop(e);let c=function(){try{return JSON.parse(localStorage.getItem(y)||"{}")}catch{return{}}}(),d=new Set(u()),h=!1;try{h="1"===sessionStorage.getItem("9remote_manual_disconnect")}catch{}for(let r of(e(e=>{let t={};for(let[r,n]of s){let s=e.hosts[r]||{...b(r),...c[r]||{}};t[r]={...s,key:r,full:n.full,label:n.label||s.label,status:r===i?h?"offline":"full":o.has(r)&&("online"===s.status||"connecting"===s.status)?s.status:"offline"}}return{hosts:t,currentKey:i}}),a))d.has(r)&&A.open(r,t().hosts[r]);A.probeOnce(),A.armProbe()},_patchHost(r,n){e(e=>{let t=e.hosts[r];return t?{hosts:{...e.hosts,[r]:{...t,...n}}}:e}),_(t)},applyStatusState(r,n){let i=n||{};e(e=>{let t=e.hosts[r];return!t||(0,m.h3)(t.statusMap,i)?e:{hosts:{...e.hosts,[r]:{...t,statusMap:i}}}}),_(t)},applyStatusChange(r,{sessionId:n,state:i,tool:s,since:a,conversationId:o}={}){n&&(e(e=>{let t=e.hosts[r];if(!t)return e;let l=t.statusMap[n],c={state:i,tool:void 0!==s?s:l?.tool,since:a,...o||l?.conversationId?{conversationId:o||l?.conversationId}:{}};return(0,m.dI)(l,c)?e:{hosts:{...e.hosts,[r]:{...t,statusMap:{...t.statusMap,[n]:c}}}}}),_(t))},applyStatusCleared(r,n){n&&(e(e=>{let t=e.hosts[r],i=t?.statusMap?.[n];return i?{hosts:{...e.hosts,[r]:{...t,statusMap:{...t.statusMap,[n]:{...i,state:"idle"}}}}}:e}),_(t))},applySessionTasks(t,{sessionId:r,records:n}={}){r&&e(e=>{let i=e.hosts[t];if(!i)return e;let s={...i.tasksBySession||{}};return Array.isArray(n)&&n.length?s[r]=n:delete s[r],{hosts:{...e.hosts,[t]:{...i,tasksBySession:s}}}})},applySessionTasksState(t,r){e(e=>{let n=e.hosts[t];if(!n)return e;let i={};for(let[e,t]of Object.entries(r||{}))Array.isArray(t)&&t.length&&(i[e]=t);return{hosts:{...e.hosts,[t]:{...n,tasksBySession:i}}}})},_closeHost(e,r={}){A.drop(e),t()._patchHost(e,{status:"offline",lastSeenAt:Date.now(),approval:null,...r})},ensureHost(e){e===t().currentKey||A.has(e)||A.open(e,t().hosts[e])},connectHost(e){t().retryHost(e)},requestHostUpdate(e,r="update"){let n=t().hosts[e];if(!n||n.updating)return;let i={updating:!0,updateAvailable:null};if("full"===n.status){let n=s.d.getState(),a=n.busRef?.current;if(!a?.connected)return void(0,f.Lq)("update",`request ${r} on ACTIVE ${e} dropped: bus not connected`);t()._patchHost(e,i),n.protocolRef?.current?.setUpdating?.(!0),a.emit("restart"===r?"requestRestart":"requestUpdate")}else t()._patchHost(e,i),A.pmOf(e)?.setUpdating?.(!0),A.whenReady(e,t=>{A.pmOf(e)?.setUpdating?.(!0),(0,f.Lq)("update",`request ${r} sent on fleet bus ${e}`),t.emit("restart"===r?"requestRestart":"requestUpdate")});setTimeout(()=>{t().hosts[e]?.updating&&t()._patchHost(e,{updating:!1})},12e4)},setAutoConnect(e,t){A.persistIntent(e,t)},retryHost(e){A.retry(e)},disconnectHost(e){A.persistIntent(e,!1),t()._closeHost(e)},closeAll(){A.closeAll()}}));function S(e){return A?.busOf(e)||null}function T(e){return A?.pmOf(e)||null}function x(e,t){A?.whenReady(e,t)}A=new h({hostOf:e=>v.getState().hosts[e],patch:w,bindBus:(e,t)=>{e.on("connect",()=>{e.emit("device:clientReady"),k(e,t)}),e.on("serverInfo",e=>{let r=!!v.getState().hosts[t]?.updating;w(t,{platform:e?.platform||null,isCodespaces:!!e?.isCodespaces,version:e?.version||null,updateAvailable:!r&&(0,p.U)(e?.updateAvailable?.version,e?.version)?e.updateAvailable:null,canSelfUpdate:!!e?.canSelfUpdate,remoteAvailable:!!e?.remoteAvailable,mobileAvailable:!!e?.mobileAvailable})}),e.on("statusState",e=>v.getState().applyStatusState(t,e)),e.on("statusChange",e=>v.getState().applyStatusChange(t,e)),e.on("statusCleared",e=>v.getState().applyStatusCleared(t,e)),e.on("sessionTasks",e=>v.getState().applySessionTasks(t,e)),e.on("sessionsChanged",()=>k(e,t)),e.on("workspacesChanged",()=>k(e,t)),e.on("session-renamed",()=>k(e,t)),e.on("sessionClosed",r=>{r&&i.B.getState().closeSession(r),k(e,t)}),e.on("device:pendingApproval",()=>w(t,{approval:"pending"})),e.on("device:approved",()=>w(t,{approval:null})),e.on("device:rejected",()=>v.getState()._closeHost(t,{approval:"rejected"})),e.on("device:tailRejected",()=>v.getState()._closeHost(t))},ready:(e,t)=>{e.emit("device:clientReady"),k(e,t)},probeTargets:()=>{let e=v.getState(),t=new Set(u());return Object.values(e.hosts).filter(r=>r.key!==e.currentKey&&t.has(r.key)).map(e=>e.key)},servedBy:e=>!!e&&e===v.getState().currentKey,servedBus:()=>{let e=s.d.getState();return e.connected?e.busRef?.current||e.bus:null}})},81851:(e,t,r)=>{r.d(t,{AC:()=>m,An:()=>d,BF:()=>g,El:()=>T,HE:()=>M,HJ:()=>f,Ic:()=>P,J2:()=>v,Jd:()=>R,KF:()=>c,KP:()=>D,ML:()=>A,N0:()=>C,Of:()=>L,QS:()=>y,QZ:()=>s,Rh:()=>$,Tr:()=>b,UT:()=>_,ZN:()=>o,aS:()=>x,b4:()=>p,bg:()=>k,cx:()=>a,dT:()=>i,fP:()=>h,gI:()=>w,j3:()=>O,l_:()=>n,mk:()=>u,o_:()=>I,qM:()=>S,si:()=>l});let n={control:"control",binary:"binary",file:"file",mobile:"mobile",browser:"browser"},i=65536,s={ackTimeoutMs:5e3,maxAttempts:3,backoffMs:[500,1500,3e3],probeBackoffMs:[3e4,6e4,12e4,3e5],classifyAfterProbes:3},a={urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302"],timeoutMs:2500,minIntervalMs:15e3},o=500,l=3,c=3e3,d=9e3,u=25e3,h=3,p=1e3,m=4e3,f=15e3,y=1e3,g=12e3,_=2e3,b=1e4,w={enabled:!0,pingMs:25e3},k={pending:"pending-approval",rejected:"device-rejected"},A={mismatch:"mismatch",sealUnreadable:"seal-unreadable",timeout:"proof-timeout"},v={pending:"pending",approved:"approved",rejected:"rejected",reconnect:"reconnect"},S=8,T="9remote_pending_save",x="9remote_wants_save",C="9remote:keys-changed",R="9remote_login_error",P="strict",I={debounceMs:500},$=3e4,D=15e3,M={chunkSize:65528,windowSize:64,dcBufferThreshold:8388608,maxUploadSize:0x3200000,maxDownloadSize:0xc800000,maxStreamMediaSize:524288e3},L={idle:"idle",connecting:"connecting",open:"open",degraded:"degraded",closed:"closed"},O={clientApp:{enabled:["ws","rtc"],parallel:!0,channels:{control:{strategy:"priority",prefer:"rtc"},binary:{strategy:"priority",prefer:"rtc"},file:{strategy:"priority",prefer:"rtc"},mobile:{strategy:"priority",prefer:"rtc"},browser:{strategy:"priority",prefer:"rtc"}},rtc:{enableTurn:!0,dcControl:{ordered:!0}}},remoteDesktop:{enabled:["ws","rtc"],parallel:!0,channels:{control:{strategy:"priority",prefer:"rtc"},binary:{strategy:"priority",prefer:"rtc"},file:{strategy:"priority",prefer:"rtc"},mobile:{strategy:"priority",prefer:"rtc"},browser:{strategy:"priority",prefer:"rtc"}},rtc:{enableTurn:!0,dcControl:{ordered:!0}}}}},89228:(e,t,r)=>{r.d(t,{d:()=>s});var n=r(94245),i=r(81851);let s=(0,n.v)(e=>({bus:null,busRef:{current:null},protocolRef:{current:null},connected:!1,everConnected:!1,deliberate:!1,connectionMode:"tunnel",carrier:"ws",approvalStatus:null,admitted:!1,authKey:null,endpoint:null,retryStatus:{isRetrying:!1,attempt:0,maxAttempts:10,failed:!1},setConnection:t=>e(e=>({...e,...t})),setConnected:t=>e({connected:t}),setCarrier:t=>e({carrier:t}),setConnectionMode:t=>e({connectionMode:t}),setRetryStatus:t=>e({retryStatus:t}),setAuthKey:t=>e({authKey:t}),setAdmitted:t=>e({admitted:t}),applyApproval:t=>e(e=>{let r=e.approvalStatus;return t===i.J2.reconnect?r===i.J2.approved?{approvalStatus:null}:{}:r===i.J2.approved&&t===i.J2.pending?{}:{approvalStatus:t}}),reset:()=>e({bus:null,connected:!1,deliberate:!1,everConnected:!1,connectionMode:"tunnel",carrier:"ws",endpoint:null,approvalStatus:null,admitted:!1,retryStatus:{isRetrying:!1,attempt:0,maxAttempts:10,failed:!1}})}))},92571:(e,t,r)=>{r.d(t,{$b:()=>b,A0:()=>z,AE:()=>y,Ax:()=>$,Dk:()=>P,GW:()=>q,Jl:()=>W,Kr:()=>H,L0:()=>Q,L8:()=>g,LN:()=>B,Qw:()=>L,RV:()=>function e(t){let r;if(!t||"object"!=typeof t)return t;if(Array.isArray(t)){let r=!1,n=t.map(t=>{let n=e(t);return n!==t&&(r=!0),n});return r?n:t}for(let s of Object.keys(t)){let a=t[s];if(i.has(s)&&"string"==typeof a&&a.includes("\\"))(r||={...t})[s]=n(a);else if(a&&"object"==typeof a){let n=e(a);n!==a&&((r||={...t})[s]=n)}}return r||t},W5:()=>X,YO:()=>k,ZH:()=>_,_C:()=>N,bd:()=>Z,cv:()=>F,d5:()=>K,fQ:()=>A,gh:()=>C,hh:()=>O,iB:()=>w,kS:()=>j,kb:()=>n,mv:()=>x,n2:()=>D,pA:()=>I,qu:()=>M,rL:()=>G,so:()=>v,u:()=>f,vd:()=>U,vs:()=>S,xW:()=>T,xl:()=>J,xr:()=>V,zT:()=>E});let n=e=>"string"==typeof e?e.replace(/\\/g,"/"):e,i=new Set(["path","currentPath","parentPath","dirPath","filePath","repoPath","oldPath","newPath","fullPath","relativePath"]),s=[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg",".avif",".apng",".tif",".tiff",".heic",".heif"],a=[".mp4",".m4v",".webm",".ogv",".mov",".mkv",".avi",".3gp"],o=[".mp3",".wav",".ogg",".oga",".flac",".m4a",".aac",".opus"],l=[".pdf"],c=[".docx"],d=[".xlsx",".xls",".csv",".tsv"],u=[".html",".htm",".xhtml"],h=[".mmd",".mermaid"],p=[".md",".markdown",".mdx"];function m(e,t){if(!e)return!1;let r=e.toLowerCase();return t.some(e=>r.endsWith(e))}let f=e=>m(e,s),y=e=>m(e,a),g=e=>m(e,o),_=e=>m(e,l),b=e=>m(e,c),w=e=>m(e,d);function k(e){return e?m(e,u)?"html":m(e,p)?"markdown":m(e,h)?"mermaid":null:null}let A="9remote-preview",v={".js":"javascript",".jsx":"javascript",".ts":"javascript",".tsx":"javascript",".mjs":"javascript",".cjs":"javascript",".html":"html",".htm":"html",".xhtml":"html",".css":"css",".scss":"css",".sass":"css",".less":"css",".styl":"css",".json":"json",".json5":"json",".jsonc":"json",".md":"markdown",".markdown":"markdown",".mdx":"markdown",".py":"python",".pyw":"python",".rb":"ruby",".php":"php",".go":"go",".rs":"rust",".java":"java",".kt":"kotlin",".kts":"kotlin",".swift":"swift",".scala":"scala",".clj":"clojure",".cljs":"clojure",".ex":"elixir",".exs":"elixir",".erl":"erlang",".hs":"haskell",".ml":"ocaml",".mli":"ocaml",".jl":"julia",".pl":"perl",".pm":"perl",".tcl":"tcl",".lua":"lua",".r":"r",".dart":"dart",".groovy":"groovy",".gradle":"groovy",".c":"c",".h":"c",".cpp":"cpp",".cc":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".cs":"csharp",".m":"objectivec",".sh":"shell",".bash":"shell",".zsh":"shell",".fish":"shell",".ps1":"powershell",".bat":"batch",".cmd":"batch",".yml":"yaml",".yaml":"yaml",".toml":"toml",".ini":"ini",".cfg":"ini",".conf":"ini",".properties":"ini",".xml":"xml",".sql":"sql",".graphql":"graphql",".gql":"graphql",".proto":"protobuf",".vue":"vue",".svelte":"svelte",".csv":"csv",".tsv":"csv",".log":"log",".diff":"diff",".patch":"diff",".dockerfile":"dockerfile",".makefile":"makefile",".mk":"makefile",".env":"env",".gitignore":"gitignore"},S={M:"text-git-modified",A:"text-git-added",D:"text-git-deleted","?":"text-git-untracked",U:"text-git-modified"},T={normal:{indentBase:12,indentStep:12,icon:16,chevron:14,text:"text-[15px] sm:text-sm",padY:"py-1 sm:py-0.5"},compact:{indentBase:8,indentStep:8,icon:14,chevron:12,text:"text-[13px] sm:text-[12px]",padY:"py-0.5 sm:py-[1px]"}},x=e=>e?"folder-changed"===e?22:32:4,C=768,R="git-diff:",P=(e,t)=>`${R}${e}:${t}`,I=e=>"string"==typeof e&&e.startsWith(R),$=e=>{let t=e.slice(R.length),r=t.indexOf(":");return{status:t.slice(0,r),absPath:t.slice(r+1)}},D=(e,t,r)=>`${R}${e}:${t}\u0000${r}`,M=e=>{let{status:t,absPath:r}=$(e),n=r.indexOf("\0");return -1===n?{status:t,repoPath:null,filePath:r}:{status:t,repoPath:r.slice(0,n),filePath:r.slice(n+1)}},L=18,O=12,U=40,E=48,B=30,j=10,N=70,F=20,W={MAX_DIRS:40,DEBOUNCE_MS:300,PREVIEW_DEBOUNCE_MS:1e3,IDLE_UNWATCH_MS:6e4},q="fileExplorer:gitRefresh",K={sidebarWidth:"fileExplorer.sidebarWidth",sidebarVisible:"fileExplorer.sidebarVisible",bottomPanelVisible:"fileExplorer.bottomPanelVisible",bottomPanelHeight:"fileExplorer.bottomPanelHeight",activityPanel:"fileExplorer.activityPanel",recentFiles:"fileExplorer.recentFiles",openTabs:"fileExplorer.openTabs",editorFontSize:"fileExplorer.editorFontSize",wordWrap:"fileExplorer.wordWrap",expandedFolders:"fileExplorer.expandedFolders",showHidden:"fileExplorer.showHidden"},H={explorer:"explorer",search:"search",scm:"scm",settings:"settings"},z=14,J=4,G=9,V=10,Z=28,Q=5,X=4194304},92673:(e,t,r)=>{r.d(t,{Gf:()=>c,Gi:()=>p,Hu:()=>l,Nn:()=>u,O8:()=>s,cu:()=>d,el:()=>a,ij:()=>h,l7:()=>o,no:()=>m,pe:()=>n,rl:()=>i,xO:()=>f});let n="https://api.github.com",i="https://github.com/decolua/9remote",s=`${n}/repos/decolua/9remote`,a=`${s}/releases?per_page=100`,o=!1,l=".devcontainer/devcontainer.json",c="NREMOTE_API_KEY",d={name:"9Remote",image:"mcr.microsoft.com/devcontainers/universal:latest",postCreateCommand:"npm install -g 9remote@latest",postAttachCommand:"nohup 9remote start > /tmp/9remote.log 2>&1 &",forwardPorts:[2208],portsAttributes:{2208:{label:"9Remote Server",onAutoForward:"silent",visibility:"public"}}},u=3e3,h=60,p={available:"Available",starting:"Starting",shutdown:"Shutdown",unknown:"Unknown"},m={user:"/user",codespaces:"/user/codespaces",codespaceByName:e=>`/user/codespaces/${e}`,startCodespace:e=>`/user/codespaces/${e}/start`,userReposList:"/user/repos?per_page=100&sort=updated&affiliation=owner,collaborator",repoContents:(e,t,r)=>`/repos/${e}/${t}/contents/${r}`,createCodespaceForRepo:(e,t)=>`/repos/${e}/${t}/codespaces`,codespaceSecretsPublicKey:"/user/codespaces/secrets/public-key",codespaceSecret:e=>`/user/codespaces/secrets/${e}`,codespaceSecretRepos:(e,t)=>`/user/codespaces/secrets/${e}/repositories/${t}`};function f(e){return`https://${e}-2208.app.github.dev`}},93162:(e,t,r)=>{r.d(t,{g:()=>J});var n=r(81851);class i{static{this.id="base"}static{this.capabilities={control:!1,binary:!1,signaling:"none"}}static{this.priority={control:0,binary:0}}constructor(){this._listeners=new Map,this._state=n.Of.idle}get state(){return this._state}get ready(){return this._state===n.Of.open}supports(e){return!!this.constructor.capabilities[e]}getPriority(e){return this.constructor.priority[e]??0}on(e,t){this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t)}off(e,t){this._listeners.get(e)?.delete(t)}_emit(e,...t){let r=this._listeners.get(e);if(r)for(let e of r)e(...t)}_setState(e){this._state!==e&&(this._state=e,this._emit("stateChange",e))}connect(e){throw Error("Not implemented: connect")}disconnect(){throw Error("Not implemented: disconnect")}send(e,t){throw Error("Not implemented: send")}}var s=r(80514),a=r(14511);let o={transports:["websocket"],reconnection:!1,reconnectionDelay:1e3,reconnectionDelayMax:5e3};class l{constructor({tunnelUrl:e,namespace:t="",socketOptions:r={}}){this._tunnelUrl=e,this._namespace=t,this._socketOptions=r}connect({onSocket:e,onFail:t}){let r=this._namespace?`${this._tunnelUrl}${this._namespace}`:this._tunnelUrl,n=this._tunnelUrl===window.location.origin?"local":"tunnel",i=(0,s.io)(r,{...o,...this._socketOptions,path:"/socket.io",auth:e=>{(0,a.freshAuth)(this._socketOptions.auth,n).then(e)}}),l=!1;i.once("connect",()=>{l||(l=!0,e(i,n))}),i.once("connect_error",()=>{l||(l=!0,t?.())})}}let c={transports:["websocket"],reconnection:!1};class d{constructor({tunnelUrl:e,localIp:t,namespace:r="",socketOptions:n={}}){this._tunnelUrl=e,this._localIp=t,this._namespace=r,this._socketOptions=n}connect({onSocket:e,onFail:t}){let r=!1,n=(t,n)=>{if(r){try{t.disconnect()}catch{}return}r=!0,e(t,n)},i=e=>this._namespace?`${e}${this._namespace}`:e,o=e=>({...c,...this._socketOptions,path:"/socket.io",auth:t=>{(0,a.freshAuth)(this._socketOptions.auth,e).then(t)}}),l=()=>{let e=this._tunnelUrl===window.location.origin?"local":"tunnel",a=(0,s.io)(i(this._tunnelUrl),o(e));a.once("connect",()=>n(a,e)),a.once("connect_error",()=>void(!r&&(r=!0,t?.())))};if(!this._localIp||"https:"===window.location.protocol)return void l();let d=(0,s.io)(i(`http://${this._localIp}`),o("local"));d.once("connect",()=>n(d,"local")),d.once("connect_error",()=>{r||(d.disconnect(),l())})}}var u=r(30562);let h=3;var p=r(55285),m=r(6134);let f=2e3,y=15,g=15,_=15,b=45;class w extends i{static{this.id="ws"}static{this.capabilities={control:!0,binary:!0,file:!0,browser:!0,signaling:"ws"}}static{this.priority={control:100,binary:10,file:10,browser:10}}constructor(){super(),this._socket=null,this._connectionMode="local",this._retryTimer=null,this._retryAttempt=0,this._retryScheduled=!1,this._retryNowTimer=null,this._destroyed=!1,this._blocked=!1,this._updating=!1,this._connecting=!1,this._visibilityHandler=null,this._lastInboundAt=Date.now(),this._lastMsgAt=0,this._zombieWatchdogTimer=null,this._outboundWatchdogTimer=null,this._lastBufferedAmount=0,this._retrySeq=0}get lastInboundAt(){return this._lastInboundAt}get lastMsgAt(){return this._lastMsgAt}get socket(){return this._socket}get connectionMode(){return this._connectionMode}get blocked(){return this._blocked}setUpdating(e){this._updating=e,e&&(this._maxAttempts=b,this._retryAttempt=0,(0,p.c)("transport",`[ws] updating=true maxAttempts=${this._maxAttempts}`))}forceReconnect(){this._destroyed||this._forceReconnect()}retryNow(e="?"){if(this._blocked)return void(0,m.Lq)("switch",`ws retryNow SKIP by=${e} (blocked)`);let t=Date.now(),r=t-(this._lastRetryNowAt||0);if(r<3e3){this._retryNowTimer||(this._retryNowTimer=setTimeout(()=>{this._retryNowTimer=null,this.retryNow(`${e}-deferred`)},3e3-r)),(0,p.c)("transport","[ws] retryNow throttled → deferred"),(0,m.Lq)("switch",`ws retryNow DEFER by=${e} (${3e3-r}ms left)`);return}(0,m.Lq)("switch",`ws retryNow GO by=${e} (drops attempt ${this._retryAttempt})`),this._retrySeq++,this._lastRetryNowAt=t,clearTimeout(this._retryNowTimer),this._retryNowTimer=null,clearTimeout(this._retryTimer),clearTimeout(this._connectingTimer),this._retryTimer=null,this._retryScheduled=!1,this._retryAttempt=0,this._connecting=!1,this._destroyed=!0,this._detachSocketEvents(),this._socket?.disconnect(),this._socket=null,this._destroyed=!1,this._ctx?.onRetryStatus?.({isRetrying:!0,attempt:1,maxAttempts:this._maxAttempts,failed:!1}),this._setState(n.Of.connecting),this._connectInternal()}setBlocked(e){this._blocked=e,(0,p.c)("transport",`[ws] blocked=${e}`),e?(this._cancelRetry(),this._socket?.disconnect()):this._socket?.connected||this._destroyed||this._connectInternal()}connect(e){this._ctx=e,this._auth=e.auth,this._maxAttempts=this._auth.tempKey?y:g,this._reconnectMaxAttempts=_,this._destroyed=!1,this._attachNetworkListeners(),this._setState(n.Of.connecting),this._connectInternal()}disconnect(){this._destroyed=!0,this._retrySeq++,this._cancelRetry(),clearTimeout(this._zombieWatchdogTimer),clearTimeout(this._outboundWatchdogTimer),this._removeNetworkListeners(),this._detachSocketEvents(),this._socket?.disconnect(),this._socket=null,this._setState(n.Of.closed)}send(e,t){if(!this._socket?.connected)return!1;if(e===n.l_.control){let{event:e,args:r=[],cb:n}=t;return n?this._socket.emit(e,...r,n):this._socket.emit(e,...r),!0}return e===n.l_.binary?(this._socket.emit("tiles-bin-v2",t),!0):e===n.l_.browser?(this._socket.emit("browser:tiles-bin",t),!0):e===n.l_.file&&(this._socket.emit("file-bin",t),!0)}_outboundStalled(e){try{let t=e?.io?.engine?.transport?.ws,r="number"==typeof t?.bufferedAmount?t.bufferedAmount:0,n=r>0&&this._lastBufferedAmount>0&&r>=this._lastBufferedAmount;return this._lastBufferedAmount=r,n}catch{return this._lastBufferedAmount=0,!1}}_connectInternal(){if(this._connecting||this._socket?.connected||this._destroyed)return;if(!this._auth.tunnelUrl&&!this._auth.localIp){(0,p.c)("transport","[ws] connect HOLD (no tunnelUrl/localIp yet) → retry"),(0,m.Lq)("switch","ws connect HOLD (no url yet) → fetch on retry"),this._setState(n.Of.degraded),this._scheduleRetry();return}this._connecting=!0,clearTimeout(this._connectingTimer),this._connectingTimer=setTimeout(()=>{this._connecting=!1},f);let e={tunnelUrl:this._auth.tunnelUrl,namespace:this._auth.namespace||"",socketOptions:this._auth.socketOptions||{}};(0,p.c)("transport",`[ws] connect: tunnelUrl=${this._auth.tunnelUrl} localIp=${this._auth.localIp||"none"}`),new l(e).connect({onSocket:(e,t)=>{if(this._connecting=!1,clearTimeout(this._connectingTimer),this._socket?.connected&&this._socket!==e){try{e.disconnect()}catch{}return}this._connectionMode=t,this._socket=e,this._retryAttempt=0,this._updating=!1,this._maxAttempts=this._reconnectMaxAttempts,this._cancelRetry(),this._attachSocketEvents(e),(0,p.c)("transport",`[ws] connect mode=${t}`),(0,m.Lq)("switch",`ws open mode=${t}`),this._setState(n.Of.open)},onFail:()=>{this._connecting=!1,clearTimeout(this._connectingTimer),(0,p.c)("transport","[ws] connect FAIL → schedule retry"),this._scheduleRetry()}})}_attachSocketEvents(e){e.on("disconnect",e=>{(0,p.c)("transport",`[ws] disconnect reason=${e}`),(0,m.Lq)("switch",`ws disconnect reason=${e}`),this._setState(n.Of.degraded),this._destroyed||this._forceReconnect()}),e.on("connect_error",e=>{(0,p.c)("transport",`[ws] connect_error ${e?.message||e}`),this._setState(n.Of.degraded),this._forceReconnect()});let t=()=>{clearTimeout(this._zombieWatchdogTimer),this._zombieWatchdogTimer=setTimeout(()=>{if(!this._destroyed&&this._socket===e){if(Date.now()-this._lastInboundAt<n.Rh)return void t();(0,m.Lq)("switch","ws zombie watchdog → force reconnect"),this.forceReconnect()}},n.Rh)};t(),e.io?.on?.("ping",()=>{this._lastInboundAt=Date.now(),t()}),e.on("connect",()=>{this._lastInboundAt=Date.now(),t()});let r=()=>{clearTimeout(this._outboundWatchdogTimer),this._outboundWatchdogTimer=setTimeout(()=>{if(!this._destroyed&&this._socket===e){if(this._outboundStalled(e)){(0,m.Lq)("switch","ws outbound stall (send buffer frozen) → force reconnect"),this.forceReconnect();return}r()}},n.KP)};r(),e.onAny((e,t)=>{this._lastMsgAt=Date.now(),this._emit("message",{event:e,data:t,source:"ws"})})}_attachNetworkListeners(){this._visibilityHandler||(this._visibilityHandler=()=>{"visible"!==document.visibilityState||this._socket?.connected||this._connecting||this.retryNow("visible")},this._offlineHandler=()=>{(0,m.Lq)("switch","ws offline event → drop socket, degraded"),this._socket?.disconnect(),this._socket=null,this._setState(n.Of.degraded)},this._onlineHandler=()=>{this._socket?.connected||this._connecting?(0,m.Lq)("switch",`ws online event → skip (${this._connecting?"handshaking":"already up"})`):this.retryNow("online")},this._pagehideHandler=()=>{try{this._socket?.disconnect()}catch{}},window.addEventListener("pagehide",this._pagehideHandler),document.addEventListener("visibilitychange",this._visibilityHandler),window.addEventListener("offline",this._offlineHandler),window.addEventListener("online",this._onlineHandler))}_detachSocketEvents(){if(this._socket)try{this._socket.offAny()}catch{}}_removeNetworkListeners(){this._pagehideHandler&&(window.removeEventListener("pagehide",this._pagehideHandler),this._pagehideHandler=null),this._visibilityHandler&&(document.removeEventListener("visibilitychange",this._visibilityHandler),this._visibilityHandler=null),this._offlineHandler&&(window.removeEventListener("offline",this._offlineHandler),this._offlineHandler=null),this._onlineHandler&&(window.removeEventListener("online",this._onlineHandler),this._onlineHandler=null)}_forceReconnect(){if(!this._destroyed&&!this._blocked&&!this._retryScheduled&&!this._connecting){if(this._retrySeq++,this._retryAttempt++,this._retryAttempt>h){this._retryAttempt=0,this._scheduleRetry();return}this._socket?.disconnect(),this._socket=null,this._connectInternal()}}_scheduleRetry(){this._retryScheduled||this._destroyed||this._blocked||(this._retryScheduled=!0,this._retryTimer=setTimeout(()=>this._doRetry(),f))}async _doRetry(){if(this._destroyed)return;if("u">typeof document&&"hidden"===document.visibilityState){(0,m.Lq)("switch",`ws retry HOLD (hidden, still at ${this._retryAttempt}/${this._maxAttempts})`),this._retryScheduled=!1,this._scheduleRetry();return}this._retryAttempt++;let e=this._retryAttempt,t=this._retrySeq;if(e>this._maxAttempts){this._retryScheduled=!1,(0,m.Lq)("switch",`ws GAVE UP after ${this._maxAttempts} attempts → closed`),this._ctx?.onRetryStatus?.({isRetrying:!1,attempt:e,maxAttempts:this._maxAttempts,failed:!0}),this._setState(n.Of.closed);return}(0,p.c)("transport",`[ws] retry attempt=${e}/${this._maxAttempts}`),(0,m.Lq)("switch",`ws retry ${e}/${this._maxAttempts}`),this._ctx?.onRetryStatus?.({isRetrying:!0,attempt:e,maxAttempts:this._maxAttempts,failed:!1});try{let e=await fetch(u.Sn.connect,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:this._auth.apiKey})});if(!e.ok)throw Error("Failed");let{tunnelUrl:r,localIp:n}=await e.json();if(t!==this._retrySeq)return void(0,m.Lq)("switch","ws retry ABORT (superseded mid-fetch)");this._auth.tunnelUrl=r,this._auth.localIp=n||null,this._connectionMode="local",this._ctx?.onUrlUpdate?.({tunnelUrl:r,localIp:n}),this._socket?.disconnect(),this._retryScheduled=!1,this._connectInternal()}catch{if(t!==this._retrySeq)return;this._retryScheduled=!1,this._scheduleRetry()}}_cancelRetry(){clearTimeout(this._retryTimer),this._retryTimer=null,clearTimeout(this._retryNowTimer),this._retryNowTimer=null,this._retrySeq++,this._retryAttempt=0,this._retryScheduled=!1,this._ctx?.onRetryStatus?.({isRetrying:!1,attempt:0,maxAttempts:this._maxAttempts,failed:!1})}}function k(e,t){if(t instanceof Uint8Array){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return{__b:btoa(e)}}return t}function A(e,t){if(t&&"object"==typeof t&&"string"==typeof t.__b){let e=atob(t.__b),r=new Uint8Array(e.length);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);return r}return t}function v(e){return JSON.stringify(e,k)}function S(e,t=null){let r=[],n={event:e.event,args:function e(t,r){if(t instanceof ArrayBuffer)return r.push(new Uint8Array(t)),{__B:r.length-1};if(ArrayBuffer.isView(t))return r.push(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),{__B:r.length-1};if(Array.isArray(t))return t.map(t=>e(t,r));if(t&&"object"==typeof t){let n={};for(let i of Object.keys(t))n[i]=e(t[i],r);return n}return t}(e.args||[],r),ackId:e.ackId??null,lens:r.map(e=>e.length)};t&&(n.frag=t.id,n.part=t.part,n.parts=t.parts);let i=new TextEncoder().encode(JSON.stringify(n)),s=new Uint8Array(4+i.length+r.reduce((e,t)=>e+t.length,0));new DataView(s.buffer).setUint32(0,i.length,!0),s.set(i,4);let a=4+i.length;for(let e of r)s.set(e,a),a+=e.length;return s}function T(e){let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t.length<4)throw Error("frame too short");let r=4+new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0,!0);if(r>t.length)throw Error("frame header truncated");let n=JSON.parse(new TextDecoder().decode(t.subarray(4,r))),i=[],s=r;for(let e of n.lens||[]){if(s+e>t.length)throw Error("frame part truncated");i.push(t.subarray(s,s+e)),s+=e}return{event:n.event,args:function e(t,r){if(Array.isArray(t))return t.map(t=>e(t,r));if(t&&"object"==typeof t){if("number"==typeof t.__B)return r[t.__B]??null;let n={};for(let i of Object.keys(t))n[i]=e(t[i],r);return n}return t}(n.args||[],i),ackId:n.ackId??null,frag:n.frag,part:n.part,parts:n.parts}}function x(){let e=new Map;return{push(t){let{frag:r,part:n,parts:i}=t;if(null==r)return t;if(!Number.isInteger(n)||!Number.isInteger(i)||n<0||i<1||n>=i||i>4096)return null;let s=e.get(r);s||(e.size>=4&&e.delete(e.keys().next().value),s={slices:Array(i),got:0},e.set(r,s));let a=t.args?.[0];if(null==a||(!s.slices[n]&&(s.slices[n]=a,s.got++),s.got<i))return null;e.delete(r);let o=new Uint8Array(s.slices.reduce((e,t)=>e+t.byteLength,0)),l=0;for(let e of s.slices)o.set(e,l),l+=e.byteLength;return T(o)}}}var C=r(99022),R=r(30068);let P=null,I=0,$=new Map,D=0;async function M(e,t){let r=`9remote_turn_cache_${t?.slice(0,12)||"anon"}`;try{let e="u">typeof localStorage?localStorage.getItem(r):null;if(e){let t=JSON.parse(e);if(t?.expiresAt>Date.now()&&Array.isArray(t.iceServers)&&t.iceServers.length)return t.iceServers}}catch{}try{let n=await fetch(e,{headers:{"X-API-Key":t},signal:AbortSignal.timeout(4e3)});if(n.ok){let e=await n.json();if(e?.iceServers?.length){try{"u">typeof localStorage&&localStorage.setItem(r,JSON.stringify({iceServers:e.iceServers,expiresAt:Date.now()+828e5}))}catch{}return e.iceServers}}}catch(e){console.warn("[WebRtcProtocol] TURN fetch failed:",e.message)}return null}class L extends i{static{this.id="rtc"}static{this.capabilities={control:!0,binary:!0,file:!0,browser:!0,signaling:"external"}}static{this.priority={control:50,binary:100,file:100,browser:100}}constructor(){super(),this._pc=null,this._dcControl=null,this._dcBinary=null,this._dcFile=null,this._dcMobile=null,this._typeDetail="dc-stun",this._localCandidateTypes=new Set,this._answerApplied=!1,this._pendingCandidates=[],this._iceReachedChecking=!1,this._everOpened=!1,this._isLoopback=!1,this._pendingEmit=null,this._flushTimer=null,this._latestTileTs=new Map,this._hbTimer=null,this._hbLastPing=0,this._hbFastCadence=!1,this._dcStallCount=0,this._dcStallSince=0,this._dcPrevQueued=0,this._peerEnv2=!1,this._peerFragCtl=!1,this._v2Announced=!1,this._v2RxSeen=!1,this._fragSeq=0,this._reassemble=x(),this._lastInboundAt=0,this._signalingHandlers={},this._signaling=null,this._useTurn=!1}get lastInboundAt(){return this._lastInboundAt}getPriority(e){return"dc-turn"===this._typeDetail?5:150}async connect(e){this._ctx=e,this._cleanupPeer(),this._peerEpoch=(this._peerEpoch??0)+1,this._localCandidateTypes=new Set,this._answerApplied=!1,this._pendingCandidates=[],this._iceReachedChecking=!1,this._everOpened=!1,this._isLoopback=!1,this._hbFastCadence=!1,this._dcStallCount=0,this._dcStallSince=0,this._dcPrevQueued=0,this._typeDetail="dc-stun",this._lastMid=null,this._remoteGatheringDone=!1,this._setState(n.Of.connecting),this.connectingSince=Date.now(),this.connectDeadline=this.connectingSince+n.AC,clearTimeout(this._connectTimer),this._connectTimer=setTimeout(()=>{this._state!==n.Of.open&&((0,p.c)("transport",`[rtc] connect timeout (${n.AC}ms, state=${this._state}) → close + retry`),this._closePeer(`connect-timeout (state=${this._state})`))},n.AC);let t=[{urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun3.l.google.com:19302","stun:stun4.l.google.com:19302"]},{urls:"stun:global.stun.twilio.com:3478"},{urls:"stun:stun.cloudflare.com:3478"}];if(this._useTurn=!!(e.useTurn||e.profile?.rtc?.enableTurn),e.iceServers?.length)t=e.iceServers;else if(this._useTurn){let r=await M(u.Sn.turnCredentials,e.auth?.apiKey);r?.length&&(t=r)}let r=new RTCPeerConnection({iceServers:t,iceCandidatePoolSize:4,bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"});this._pc=r;let i=e.profile?.rtc?.dcControl?.ordered??!0,s=r.createDataChannel("control",{ordered:i}),a=r.createDataChannel("binary",{ordered:!1,maxPacketLifeTime:500}),o=r.createDataChannel("file",{ordered:!0}),l=r.createDataChannel("mobile",{ordered:!0}),c=r.createDataChannel("browser",{ordered:!1,maxPacketLifeTime:500});a.binaryType="arraybuffer",s.binaryType="arraybuffer",o.binaryType="arraybuffer",l.binaryType="arraybuffer",c.binaryType="arraybuffer",this._dcControl=s,this._dcBinary=a,this._dcFile=o,this._dcMobile=l,this._dcBrowser=c;let d=async()=>{if("open"!==s.readyState||"open"!==a.readyState)return;let e="";try{let t=await r.getStats();t.forEach(r=>{if("candidate-pair"===r.type&&"succeeded"===r.state){let n=[...t.values()].find(e=>e.id===r.localCandidateId),i=[...t.values()].find(e=>e.id===r.remoteCandidateId);(n?.candidateType==="relay"||i?.candidateType==="relay")&&(this._typeDetail="dc-turn");let s=n?.address||n?.ip||"",a=i?.address||i?.ip||"";("127.0.0.1"===s||"::1"===s||"127.0.0.1"===a||"::1"===a)&&(this._isLoopback=!0),e=`local=${n?.candidateType}/${n?.protocol} remote=${i?.candidateType}/${i?.protocol}`}})}catch{}this.send(n.l_.control,{event:"rtc:linkType",args:[this._typeDetail]}),(0,p.c)("transport",`[rtc] dc OPEN type=${this._typeDetail} ${e}`),(0,m.Lq)("switch",`rtc dc OPEN (${this._typeDetail} ${e})`),clearTimeout(this._connectTimer),this._connectTimer=null,this._everOpened=!0,this._lastInboundAt=Date.now(),this._setState(n.Of.open)};s.onopen=d,a.onopen=d;let h=()=>{let e=!this._dcControl||"closed"===this._dcControl.readyState,t=!this._dcBinary||"closed"===this._dcBinary.readyState;(0,m.Lq)("switch",`rtc dc-close (ctrl=${this._dcControl?.readyState} bin=${this._dcBinary?.readyState})`),e&&t?this._setState(n.Of.closed):this._setState(n.Of.degraded)};s.onclose=h,a.onclose=h,o.onclose=()=>{this._dcFile=null},l.onclose=()=>{this._dcMobile=null},c.onclose=()=>{this._dcBrowser=null},s.onerror=e=>{let t=e.error?.message??"unknown";t.includes("User-Initiated")||console.error("[rtc] dcControl ERROR:",t)},a.onerror=e=>{let t=e.error?.message??"unknown";t.includes("User-Initiated")||console.error("[rtc] dcBinary ERROR:",t)},o.onerror=e=>{let t=e.error?.message??"unknown";t.includes("User-Initiated")||console.error("[rtc] dcFile ERROR:",t)},s.onmessage=({data:e})=>{let t;this._lastInboundAt=Date.now();try{let r;if("string"==typeof e)r=JSON.parse("string"==typeof e?e:new TextDecoder().decode(e),A);else r=T(e),this._v2RxSeen||(this._v2RxSeen=!0,(0,m.Lq)("switch","env2: first v2 binary frame DECODED from agent (mutual upgrade confirmed)"));t=this._reassemble.push(r)}catch(e){console.error("[rtc] control parse error:",e.message);return}if(t){if("__ping"===t.event){this._hbTimer||this._startHeartbeatWatch(),(this._hbLastPing?Date.now()-this._hbLastPing:1/0)<=2*n.KF&&(this._hbFastCadence=!0),this._hbLastPing=Date.now();try{s.send(v({event:"__pong",args:t.args||[]}))}catch{}return}this._emit("message",{event:t.event,data:t,source:"rtc"})}},a.onmessage=({data:e})=>{this._lastInboundAt=Date.now(),e instanceof ArrayBuffer&&this._receiveTile(e,"tiles-data")},c.onmessage=({data:e})=>{this._lastInboundAt=Date.now(),e instanceof ArrayBuffer&&this._receiveTile(e,"browser:tiles-data")},o.onmessage=({data:e})=>{this._lastInboundAt=Date.now(),e instanceof ArrayBuffer&&this._emit("binary",{channel:"file",buffer:e,source:"rtc"})},l.onmessage=({data:e})=>{this._lastInboundAt=Date.now(),e instanceof ArrayBuffer&&this._emit("binary",{channel:"mobile",buffer:e,source:"rtc"})},r.onicecandidate=({candidate:e})=>{var t;if(!e)return void this._sendSignaling({type:"ice",candidate:"",mid:this._lastMid||"0"});this._lastMid=e.sdpMid;let r=/typ (host|srflx|relay|prflx)/.exec(e.candidate||"");r&&this._localCandidateTypes.add(r[1]);let n=(t=e.candidate)&&t.includes("typ srflx")&&t.split(" ")[4]||null;n&&this._emit("netFingerprint",n),this._sendSignaling({type:"ice",candidate:e.candidate,mid:e.sdpMid})},r.oniceconnectionstatechange=()=>{(0,p.c)("transport",`[rtc] iceState=${r.iceConnectionState}`),(0,m.Lq)("switch",`rtc ice=${r.iceConnectionState} types=[${[...this._localCandidateTypes].join(",")}]`),"checking"===r.iceConnectionState&&(this._iceReachedChecking=!0),"disconnected"===r.iceConnectionState?this._setState(n.Of.degraded):"failed"===r.iceConnectionState?this._closePeer("ice-failed"):"connected"===r.iceConnectionState&&this._dcControl?.readyState==="open"&&this._dcBinary?.readyState==="open"&&this._setState(n.Of.open)},this._signaling=e.signaling,this._signaling?.on?.(e=>this._handleSignal(e));try{let e=await r.createOffer();await r.setLocalDescription(e),(0,p.c)("transport","[rtc] offer sent"),(0,m.Lq)("switch","rtc offer sent"),this._sendSignaling({type:"offer",sdp:e.sdp,useTurn:this._useTurn})}catch(e){console.error("[rtc] createOffer error:",e.message),this._closePeer(`create-offer:${e.message}`)}}disconnect(e="?"){this._closePeer(`manual-disconnect by=${e} state=${this._state}`),this._signaling?.off?.(),this._signaling=null}send(e,t){if(e===n.l_.control){if(this._dcControl?.readyState!=="open")return!1;let e={event:t.event,args:t.args||[],ackId:t.ackId||null},r=this._sendControlStallChecked(this._dcControl,e);return r&&this._peerEnv2&&!this._v2Announced&&(this._v2Announced=!0,(0,m.Lq)("switch","env2: client→agent control now SENT as v2 binary frames")),r}if(e===n.l_.binary){if(this._dcBinary?.readyState!=="open")return!1;try{return this._dcBinary.send(t),!0}catch(e){return console.error("[rtc] send binary error:",e.message),!1}}if(e===n.l_.file){if(this._dcFile?.readyState!=="open")return!1;try{if(this._dcFile.bufferedAmount>n.HE.dcBufferThreshold)return!1;return this._dcFile.send(t),!0}catch(e){console.error("[rtc] send file error:",e.message)}}return!1}_sendControlStallChecked(e,t){let r,i=e.bufferedAmount;if(i>0&&i>=this._dcPrevQueued){0===this._dcStallCount&&(this._dcStallSince=Date.now()),this._dcStallCount++;let e=Date.now()-this._dcStallSince;if(this._dcStallCount>=n.fP&&e>=n.b4)return this._closePeer(`dc-drain-stall (${i}B stuck ${e}ms)`),!1}else this._dcStallCount=0;if(this._peerEnv2)r=this._sendFramed(t);else try{e.send(v(t)),r=!0}catch(e){r=!1}return this._dcPrevQueued=e.bufferedAmount,r}get typeDetail(){return this._typeDetail}get isLoopback(){return this._isLoopback}_closePeer(e){(0,m.Lq)("switch",`rtc→closed reason=${e}`),this._cleanupPeer(),this._setState(n.Of.closed)}setPeerCaps(e){this._peerEnv2=!!e?.env2,this._peerFragCtl=!!e?.fragCtl}get maxControlBytes(){return this._pc?.sctp?.maxMessageSize||n.dT}_sendFramed(e){var t;let r,n,i=this._peerFragCtl?this.maxControlBytes:1/0,s=(t=++this._fragSeq,(n=function(e,t){if(e.byteLength<=t)return[e];let r=t-192;if(r<=0)return null;let n=Math.ceil(e.byteLength/r);if(n>4096)return null;let i=[];for(let t=0;t<n;t++)i.push(e.subarray(t*r,Math.min((t+1)*r,e.byteLength)));return i}(r=S(e),i))?1===n.length?[r]:n.map((r,i)=>S({event:e.event,args:[r]},{id:t,part:i,parts:n.length})):null);if(!s)return!1;try{for(let e of s)this._dcControl.send(e);return!0}catch(e){return(0,p.c)("transport",`[rtc] control send refused: ${e.message}`),!1}}_startHeartbeatWatch(){this._hbTimer&&(clearInterval(this._hbTimer),this._hbTimer=null),this._hbLastPing=Date.now(),this._hbTimer=setInterval(()=>{if(this._state!==n.Of.open){clearInterval(this._hbTimer),this._hbTimer=null;return}let e=Date.now()-this._hbLastPing;e>(this._hbFastCadence?n.An:n.mk)&&((0,p.c)("transport",`[rtc] heartbeat: no ping for ${e}ms → closing stalled peer`),this._closePeer(`heartbeat-stale (${e}ms)`))},n.KF)}async _addRemoteCandidate({candidate:e,mid:t}){e||(this._remoteGatheringDone=!0),await this._pc.addIceCandidate(new RTCIceCandidate(e?{candidate:e,sdpMid:t}:{candidate:"",sdpMid:t||"0"})).catch(()=>{})}_startDeadPathWatch(){clearInterval(this._deadPathTimer),this._deadPathTimer=setInterval(async()=>{if(this._state===n.Of.open||!this._pc)return this._stopDeadPathWatch();if(!this._remoteGatheringDone||"complete"!==this._pc.iceGatheringState)return;let e=0,t=0;try{(await this._pc.getStats()).forEach(r=>{"candidate-pair"===r.type&&(e++,"failed"===r.state&&t++)})}catch{return}e&&!(t<e)&&(this._stopDeadPathWatch(),this._closePeer(`dead-path (${t} pair(s) failed)`))},n.QS)}_stopDeadPathWatch(){clearInterval(this._deadPathTimer),this._deadPathTimer=null}_sendSignaling(e){this._signaling?.send?.(e)}async _handleSignal(e){if((0,p.c)("transport",`[rtc] signal: ${e.type}`),(0,m.Lq)("switch",`rtc signal recv=${e.type}`),this._pc)try{if("answer"===e.type){if(this._answerApplied||"stable"===this._pc.signalingState){(0,p.c)("transport","[rtc] duplicate answer ignored"),(0,m.Lq)("switch","rtc duplicate answer ignored");return}if(e.pub&&e.sig){let t=await this._verifyHostAnswer(e);if(t){console.error(`[rtc] host key verification FAILED (${t}) — relayed answer rejected`),this._closePeer(`host-key-rejected:${t}`);return}}await this._pc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e.sdp})),this._answerApplied=!0,(0,p.c)("transport","[rtc] answer set"),(0,m.Lq)("switch","rtc answer applied");let t=this._pendingCandidates;for(let e of(this._pendingCandidates=[],t))await this._addRemoteCandidate(e);clearTimeout(this._connectTimer),this.connectDeadline=Date.now()+n.HJ,this._startDeadPathWatch(),this._connectTimer=setTimeout(async()=>{if(this._state!==n.Of.open){try{let e=await this._pc.getStats();e.forEach(t=>{if("candidate-pair"!==t.type)return;let r=e.get(t.localCandidateId),n=e.get(t.remoteCandidateId),i=(r?.address||r?.ip||"?").split(":")[0].slice(-12),s=n?.address||n?.ip||"?";(0,m.Lq)("switch",`pair ${t.state} ${r?.candidateType}:${i}→${n?.candidateType}:${s}`)})}catch{}this._closePeer(`ice-timeout (state=${this._state})`)}},n.HJ)}else if("ice"===e.type){if(!this._answerApplied)return void this._pendingCandidates.push(e);await this._addRemoteCandidate(e)}else"error"===e.type&&((0,p.c)("transport",`[rtc] server error: ${e.message}`),this._closePeer(`server-error:${e.message}`))}catch(e){console.error("[rtc] signal handle error:",e.message)}}async _verifyHostAnswer(e){let t=this._ctx?.auth?.apiKey;if(!t)return null;let r=(0,C.lz)(t),n=r?.hostPubKey?r:null,i=!!r?.hostSealKey;if((0,p.c)("auth","[seal] verify answer:",{hostSentXpub:!!e.xpub,agentSentXpub:!!e.xpub,pinned:!!n,stalePin:!!(r?.hostPubKey&&!i),pendingFp2:(0,C.e1)()}),n){if(n.hostPubKey!==e.pub){let r=(0,C.e1)();return r&&await (0,C.t8)(e.pub,e.xpub)===r?((0,C.LG)(t,{hostPubKey:e.pub,hostSealKey:e.xpub,fp2:r}),(0,p.c)("transport","[rtc] host key re-pinned via fresh pairing fp2"),null):((0,p.c)("auth","[seal] REJECT answer — pinned pub differs (host key rotated?) and no fresh fp2 to re-pin"),"pinned-pub-mismatch")}let r=await (0,C.D5)(e.pub,e.sdp,e.sig);if(!1===r)return(0,p.c)("auth","[seal] REJECT answer — signature invalid (relay tampering?)"),"sig-invalid";if(null===r){if(!i)return(0,p.c)("auth","[seal] REJECT answer — no Ed25519 in browser and pinned fp2 predates sealing"),"no-ed25519-old-pin";let t=await (0,C.t8)(e.pub,e.xpub)===n.fp2;return t||(0,p.c)("auth","[seal] REJECT answer — fp2 fallback mismatch vs pinned",n.fp2),t?null:"fp2-mismatch"}return null}let s=(0,C.e1)();if(s){let r=await (0,C.t8)(e.pub,e.xpub);if(r!==s)return(0,p.c)("auth","[seal] REJECTED — fp2",r,"!= code",s,e.xpub?"":"(agent sent no sealing key — needs the source build)"),(0,C.HY)(),"pairing-fp2-mismatch";(0,C.LG)(t,{hostPubKey:e.pub,hostSealKey:e.xpub,fp2:r}),(0,p.c)("auth","[seal] pinned via RTC — fp2",r,"sealing key stored"),(0,p.c)("transport","[rtc] host key pinned via pairing fp2")}return null}natVerdict(){let e=this._localCandidateTypes;return this._everOpened||e.has("relay")?"ok":0===e.size||e.has("srflx")&&(!this._answerApplied||this._iceReachedChecking)?"unknown":"hard"}_cleanupPeer(){for(let e of(clearTimeout(this._connectTimer),this._connectTimer=null,this._stopDeadPathWatch(),this._hbTimer&&(clearInterval(this._hbTimer),this._hbTimer=null),[this._dcControl,this._dcBinary,this._dcFile,this._dcMobile]))if(e){e.onopen=null,e.onclose=null,e.onerror=null,e.onmessage=null;try{e.close()}catch{}}if(this._dcControl=null,this._dcBinary=null,this._dcFile=null,this._dcMobile=null,this._dcStallCount=0,this._dcStallSince=0,this._dcPrevQueued=0,this._isLoopback=!1,this._typeDetail="dc-stun",this._pc){this._pc.onicecandidate=null,this._pc.oniceconnectionstatechange=null;try{this._pc.close()}catch{}this._pc=null}this._pendingEmit=null,this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=null),this._latestTileTs.clear(),this._reassemble=x()}_receiveTile(e,t="tiles-data"){let n=++I,i=e.byteLength;new Promise(t=>{let i=setTimeout(()=>{$.has(n)&&($.delete(n),t(null))},8e3),s=R.eR.decodeQueueCap;for(;$.size>=s;){let e=$.keys().next().value,t=$.get(e);if(!t)break;clearTimeout(t.timer),$.delete(e),t.resolve(null)}let a=function(){if(!1===P)return null;if(P)return P;try{P=new Worker(r.tu(new URL(r.p+r.u(6153),r.b)))}catch{return P=!1,null}return P.onmessage=({data:{tiles:e,timestamp:t,id:r,hasBitmap:n,error:i}})=>{D=0;let s=$.get(r);if(!s){if(e)for(let t of e)t.bitmap?.close?.();return}clearTimeout(s.timer),$.delete(r),s.resolve(i?null:{tiles:e,timestamp:t,hasBitmap:n})},P.onerror=e=>{console.error("[Worker] tileDecoder:",e.message),function(){if(P)try{P.terminate()}catch{}for(let{resolve:e}of(P=null,$.values()))try{e(null)}catch{}$.clear()}(),++D>=3&&(P=!1)},P}();if(!a){clearTimeout(i),$.delete(n),t(null);return}$.set(n,{resolve:t,timer:i}),a.postMessage({buffer:e,id:n,v:2},[e])}).then(e=>{if(!e)return;let{tiles:r,timestamp:n,hasBitmap:s}=e;this._pendingEmits??=new Map,this._latestTsMaps??=new Map;let a=this._pendingEmits.get(t);a||(a={tiles:new Map,timestamp:n,hasBitmap:s,bytes:0},this._pendingEmits.set(t,a));let o=this._latestTsMaps.get(t);for(let e of(o||(o=new Map,this._latestTsMaps.set(t,o)),a.bytes+=i,r))n>=(o.get(e.tileIndex)??0)?(o.set(e.tileIndex,n),a.tiles.get(e.tileIndex)?.bitmap?.close?.(),a.tiles.set(e.tileIndex,e),n>a.timestamp&&(a.timestamp=n)):e.bitmap?.close?.();this._flushTimers??=new Map,this._flushTimers.has(t)&&clearTimeout(this._flushTimers.get(t));let l=setTimeout(()=>{this._flushTimers.delete(t);let e=this._pendingEmits.get(t);if(!e)return;this._pendingEmits.delete(t);let r=[...e.tiles.values()];r.length&&this._emit("message",{event:t,data:{tiles:r,timestamp:e.timestamp,hasBitmap:e.hasBitmap,bytes:e.bytes,transport:this._typeDetail},source:"rtc"})},0);this._flushTimers.set(t,l)})}}let O=new Map;function U(e){if(!e?.id)throw Error("Adapter missing static id");O.set(e.id,e)}function E({urls:e,timeoutMs:t,PeerConnection:r}={}){let i=r||("u">typeof RTCPeerConnection?RTCPeerConnection:null);if(!i)return Promise.resolve(null);let s=[{urls:e||n.cx.urls}];return new Promise(e=>{let r,a,o=!1,l=t=>{if(!o){o=!0,clearTimeout(a);try{r.onicecandidate=null,r.close()}catch{}e(t)}};try{r=new i({iceServers:s,iceCandidatePoolSize:0})}catch{return e(null)}a=setTimeout(()=>l(null),t??n.cx.timeoutMs),r.onicecandidate=({candidate:e})=>{var t;if(!e)return l(null);let r=(t=e.candidate)&&t.includes("typ srflx")&&t.split(" ")[4]||null;r&&l(r)};try{r.createDataChannel("probe"),r.createOffer().then(e=>r.setLocalDescription(e)).catch(()=>l(null))}catch{l(null)}})}let B="no-public-ip";function j(e){let t=0,r=!1;for(let n of e.values())"candidate-pair"===n.type&&(n.nominated||n.selected)&&(r=!0,t+=(n.bytesReceived??0)+(n.responsesReceived??0));return r?t:null}function N(e,t="stale"){let r=e._adapters.get("ws"),i=Math.max(r?.lastInboundAt??0,r?.lastMsgAt??0),s=r?.ready&&function({ready:e=!0,lastInboundAt:t=0,now:r}={}){return!!e&&(!t||r-t>=n.Rh)}({ready:!0,lastInboundAt:i,now:Date.now()});if(r){let e=r.lastInboundAt??0,n=r.lastMsgAt??0,i=Date.now();(0,m.Lq)("switch",`zombie check (${t}): verdict=${!!s} ready=${!!r.ready} lastPong=${e?`${i-e}ms`:"never"} lastMsg=${n?`${i-n}ms`:"never"}`)}if(!s)return!1;(0,p.c)("transport",`[pm] ws zombie (${t}) → force reconnect`);try{r.forceReconnect?.()}catch{}return!0}function F(e,t){let r=e._adapters.get("rtc"),i=r?._pc;if(!i||"failed"===i.connectionState)return void e._forceRestartRtc(`${t}-pc-failed`);if(e._probeLive?.rtc===r)return void(0,m.Lq)("switch",`${t} probe shared (already measuring this peer)`);clearTimeout(e._resumeProbeTimer);let s=++e._probeToken;e._probeLive={rtc:r,token:s},(async()=>{let t=j(await i.getStats());return null==t||(await new Promise(t=>{e._resumeProbeTimer=setTimeout(t,n.UT)}),s!==e._probeToken)?null:j(await i.getStats())-t})().then(i=>{if(s!==e._probeToken)return;let a=r?.lastInboundAt&&Date.now()-r.lastInboundAt<n.mk;null!=i&&i>0||a?(0,m.Lq)("switch",`${t} probe alive (Δ=${i}, recent=${!!a})`):((0,m.Lq)("switch",`${t} probe DEAD (Δ=${i}) → forceRestartRtc`),e._forceRestartRtc(`${t}-probe-dead`))}).catch(()=>{s!==e._probeToken||(r?.lastInboundAt&&Date.now()-r.lastInboundAt<n.mk?(0,m.Lq)("switch",`${t} probe error ignored (rtc recently active)`):((0,m.Lq)("switch",`${t} probe error → forceRestartRtc`),e._forceRestartRtc(`${t}-probe-error`)))}).finally(()=>{e._probeLive?.token===s&&(e._probeLive=null)})}function W(e,t){if(t?.type!=="error")return!1;let r=t.message===n.bg.pending?"pending":t.message===n.bg.rejected?"rejected":null;return!!r&&((0,p.c)("transport",`[pm] device ${r} → approval UI`),e._awaitingApproval=!0,e._wsCallbacks.onApproval?.(r),!0)}function q(e){if((0,m.Lq)("switch","signaling ready"),H(e),e._awaitingApproval)return;let t=e._adapters.get("rtc");if(!t){(0,m.Lq)("switch","sig-ready → start rtc (was deferred)"),e._startSecondaryAdapters();return}t.state===n.Of.closed&&((0,m.Lq)("switch","sig-ready → restartRtc (rtc was closed)"),e._restartRtc("sig-ready"))}function K(e,t){!(e._sig?.ready&&e._sig.send(t))&&("offer"===t.type&&(e._sigBuffer=e._sigBuffer.filter(e=>"offer"!==e.type&&"ice"!==e.type)),e._sigBuffer.push(t),e._sigBuffer.length>32&&e._sigBuffer.shift())}function H(e){if(!e._sigBuffer.length)return;let t=e._sigBuffer;for(let r of(e._sigBuffer=[],t))K(e,r)}async function z(e){if(e._auth.tunnelUrl!==window.location.origin)try{(0,p.c)("transport",`[pm] refreshTunnelUrl: fetching from ${u.O}/api/connect`);let t=await fetch(`${u.O}/api/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:e._auth.apiKey})});if(!t.ok)return void(0,p.c)("transport",`[pm] refreshTunnelUrl: HTTP ${t.status}`);let r=await t.json();(0,p.c)("transport",`[pm] refreshTunnelUrl: got ${r.tunnelUrl} (was ${e._auth.tunnelUrl})`),r.tunnelUrl&&r.tunnelUrl!==e._auth.tunnelUrl&&(e._auth.tunnelUrl=r.tunnelUrl)}catch(e){(0,p.c)("transport",`[pm] refreshTunnelUrl: error ${e.message}`)}}U(w),U(L);class J{constructor(e,t){const{profile:r,auth:i,wsCallbacks:s,rtcCallbacks:a,peerId:o}=function(e,t){let r=t?.enableWebRTC?"remoteDesktop":"clientApp",i={...n.j3[r]};t?.enableWebRTC||(i.enabled=["ws"]),t?.enableTurn&&(i.rtc={...i.rtc,enableTurn:!0});let s={tunnelUrl:e.tunnelUrl,localIp:e.localIp,apiKey:e.apiKey,tempKey:e.tempKey,deviceId:e.deviceId,namespace:e.namespace,socketOptions:e.socketOptions},a={onConnect:e.onConnect,onDisconnect:e.onDisconnect,onRetryStatus:e.onRetryStatus,onUrlUpdate:e.onUrlUpdate,onApproval:e.onApproval},o=t?{onUpgrade:t.onUpgrade,onFallback:t.onFallback,onTransportChange:t.onTransportChange}:{},l=`${e.deviceId}:${Math.random().toString(36).slice(2,10)}`;return s.socketOptions?.auth&&(s.socketOptions.auth.peerId=l),{profile:i,auth:s,wsCallbacks:a,rtcCallbacks:o,peerId:l}}(e,t);for(const e of(this._profile=r,this._auth=i,this._wsCallbacks=s,this._rtcCallbacks=a,this._peerId=o,Object.assign(this,{_adapters:new Map,_buffer:[],_pendingAcks:new Map,_ackTimers:new Map,_ackSeq:0,_rtcRestartAttempts:0,_rtcRestartTimer:null,_rtcRestartDueAt:0,_probeAttempts:0,_rtcGivenUp:!1,_giveUpIp:null,_lastStunProbeAt:0,_rejoinDebounceTimer:null,_netFingerprint:null,_awaitingApproval:!1,_ackTimeoutMs:n.QZ.ackTimeoutMs,_hiddenAt:null,_resumeProbeTimer:null,_probeToken:0,_probeLive:null,_connected:!1,_type:"ws",_connectionMode:"tunnel",_lastWsState:null,_rawSocket:null,_onConnectFired:!1,_rtcSignalingHandler:null,_sig:null,_sigDestroyed:!1,_sigBuffer:[],_wsFallbackTimer:null}),this._bus=function(e){let t=new Map,r=(e,r)=>{t.has(e)||t.set(e,[]),t.get(e).push(r)},n=(e,r)=>{let n=t.get(e);if(!n)return;let i=n.findIndex(e=>e===r||e._original===r);-1!==i&&n.splice(i,1)};return{_listeners:t,get connected(){return e._anyAdapterReady()},get id(){return e._rawSocket?.id||null},emit(t,...r){e._sendControl(t,r)},on(e,t){r(e,t)},off(e,t){n(e,t)},once(e,t){let i=(...r)=>{n(e,i),t(...r)};i._original=t,r(e,i)},listeners:e=>[...t.get(e)||[]],dispatch(e,r=[]){let n=t.get(e);if(n?.length){for(let e of[...n])if(n.includes(e))try{e(...r)}catch{}}},clear(){t.clear()},disconnect(){e._rawSocket?.disconnect()},kickWsZombie:t=>e.kickWsZombie(t)}}(this),this.busRef={current:this._bus},C.IU))this._bus.on(e,t=>(0,C.lu)(this,e,t));this._watchers=function(e){let t=()=>{let t;if((0,m.Lq)("switch",`visibility=${document.visibilityState}`),"visible"!==document.visibilityState)return;let r=e._adapters.get("ws"),i=e._adapters.get("rtc");if((0,m.Lq)("switch",`resume check: ws=${r?.ready?"ready":r?.state} rtc=${i?.ready?"ready":i?.state}`),N(e,"resume"),e._awaitingApproval)return;if(e._rtcGivenUp)return void e._maybeRearmRtc();if(t=e._rtcRestartTimer?Math.max(e._rtcRestartDueAt-Date.now(),0):-1,(0,m.Lq)("switch",`RESET attempts (was ${e._rtcRestartAttempts}) reason=resume pendingIn=${t}ms`),e._rtcRestartAttempts=0,e._probeAttempts=0,t<=n.QZ.backoffMs[0]||((0,m.Lq)("switch",`resume: pending rung was ${t}ms out → re-arm fast`),e._disarmRestart(),e._scheduleRtcRestart("resume-rearm")),!e._canSignal())return void e._sig?.retryNow("resume-no-carrier");let s=i?.state;i&&s!==n.Of.closed&&s!==n.Of.degraded?function(e){let t=e._adapters.get("rtc");if(!t?.ready)return e._restartRtc("resume-not-ready");let r=e._hiddenAt?Date.now()-e._hiddenAt:0;if("function"==typeof matchMedia&&matchMedia("(pointer: coarse)").matches&&r>n.Tr){(0,m.Lq)("switch",`resume: hidden ${Math.round(r/1e3)}s on touch → skip probe, force restart`),(0,p.c)("transport",`[pm] resume: hidden ${Math.round(r/1e3)}s → immediate restart`),e._forceRestartRtc("resume-hidden-touch");return}F(e,"resume")}(e):((0,m.Lq)("switch",`visibility → restartRtc (rtc=${s||"absent"})`),e._restartRtc("resume-dead-rtc"))},r=()=>{if("hidden"===document.visibilityState){e._hiddenAt=Date.now();return}clearTimeout(e._resumeCoalesceTimer),e._resumeCoalesceTimer=setTimeout(t,150)};document.addEventListener("visibilitychange",r);let i=!1,s=r=>{let n=!!r.detail?.hidden;if(n!==i){if(i=n,n){e._hiddenAt=Date.now();return}clearTimeout(e._resumeCoalesceTimer),e._resumeCoalesceTimer=setTimeout(t,150)}};document.addEventListener("app-visibility",s);let a=()=>{"visible"===document.visibilityState&&r()},o=()=>{e._hiddenAt=Date.now()};document.addEventListener("resume",a),document.addEventListener("freeze",o);let l=()=>{clearTimeout(e._netDebounceTimer),e._netDebounceTimer=setTimeout(()=>{!1===navigator.onLine?(0,m.Lq)("switch","net-change: still offline → wait"):((0,p.c)("transport","[pm] network change → probe rtc"),(0,m.Lq)("switch",`net-change: online=${navigator.onLine} → kick sig + ws + rtc`),e._sig?.retryNow("net-change"),e.retryNow("net-change"),(0,m.Lq)("switch",`RESET attempts (was ${e._rtcRestartAttempts}) givenUp=${e._rtcGivenUp} reason=net-change`),e._rtcRestartAttempts=0,e._probeAttempts=0,e._rtcGivenUp=!1,e._giveUpIp=null,e._shouldRenegotiate()&&e._restartRtc("net-change"))},n.o_.debounceMs)};return window.addEventListener("online",l),navigator.connection?.addEventListener?.("change",l),{visibilityHandler:r,detach(){document.removeEventListener("visibilitychange",r),document.removeEventListener("app-visibility",s),document.removeEventListener("resume",a),document.removeEventListener("freeze",o),window.removeEventListener("online",l),navigator.connection?.removeEventListener?.("change",l),clearTimeout(e._netDebounceTimer),e._netDebounceTimer=null,clearTimeout(e._resumeCoalesceTimer),e._resumeCoalesceTimer=null}}}(this)}get type(){return this._type}get connected(){return this._connected}get connectionMode(){return this._connectionMode}get wsBlocked(){return this._adapters.get("ws")?.blocked||!1}setWsBlocked(e){this._adapters.get("ws")?.setBlocked(e)}setUpdating(e){this._adapters.get("ws")?.setUpdating(e)}retryNow(e="user"){let t=this._adapters.get("ws");t?t.retryNow?.(e):((0,m.Lq)("switch",`retryNow by=${e}: no ws adapter → full connect()`),this.connect())}kickWsZombie(e="stale"){return N(this,e)}emit(e,...t){this._sendControl(e,t)}sendBinary(e,t){let r=this._pickAdapter(e);return!!r&&r.send(e,t)}connect(){this._sigDestroyed=!1;let e=this._profile.enabled.includes("rtc");e&&this._initSignalingClient(),e&&(this._canSignal()?this._startSecondaryAdapters():((0,m.Lq)("switch","rtc deferred — waiting for signaling relay"),clearTimeout(this._rtcDeferTimer),this._rtcDeferTimer=setTimeout(()=>{this._sigDestroyed||this._adapters.has("rtc")||((0,m.Lq)("switch","rtc defer expired → start anyway"),this._startSecondaryAdapters())},n.BF))),this._startWsFallback(),(0,p.c)("transport","[pm] connect: RTC + WS parallel (RTC preferred, WS warm standby)."),(0,m.Lq)("switch","connect: RTC + WS parallel")}async _startWsFallback(){if(!(this._adapters.has("ws")||this._sigDestroyed||this._adapters.get("rtc")?.isLoopback)){if((0,m.Lq)("switch","ws-fallback: start (refresh url)"),await this._refreshTunnelUrl(),this._adapters.has("ws")||this._sigDestroyed||this._adapters.get("rtc")?.isLoopback)return void(0,m.Lq)("switch","ws-fallback: aborted (destroyed, loopback or already attached)");(0,m.Lq)("switch","ws-fallback: connecting"),this._instantiate("ws"),this._adapters.get("ws")?.connect(this._buildCtx("ws"))}}async _refreshTunnelUrl(){return z(this)}_initSignalingClient(){!function(e){if(!n.gI.enabled||e._sig||e._sigDestroyed||!e._auth.deviceId||!e._auth.apiKey)return;let t=u.O.replace(/^http/,"ws")+"/signaling";r.e(7489).then(r.bind(r,87489)).then(({SignalingClient:r})=>{e._sig||e._sigDestroyed||(e._sig=new r({url:t,role:"client",roomId:e._auth.apiKey,apiKey:e._auth.apiKey,from:e._peerId,onReady:()=>q(e),pingMs:n.gI.pingMs}),e._sig.on(t=>{if("error"===t.type&&"rtc-disabled"===t.message){e._rtcTestDisabled=!0,(0,m.Lq)("switch","rtc-disabled by host → stop RTC retry (use WS)");return}W(e,t)||e._rtcSignalingHandler?.(t)}),e._sig.connect())}).catch(e=>(0,p.c)("transport",`[pm] SignalingClient load failed: ${e?.message||e}`))}(this)}_instantiate(e){if(this._adapters.has(e))return;let t=O.get(e);if(!t)return;let r=new t;r.on("stateChange",t=>this._onAdapterStateChange(e,t)),r.on("message",({event:e,data:t,source:r})=>this._dispatch(e,t,r)),r.on("binary",e=>this._onBinary(e)),"rtc"===e&&(r.on("netFingerprint",e=>this._onNetFingerprint(e)),this._srvCaps&&r.setPeerCaps?.(this._srvCaps)),this._adapters.set(e,r)}_onNetFingerprint(e){if(!e||e===this._netFingerprint)return;let t=this._netFingerprint;this._netFingerprint=e,t&&(0,p.c)("transport",`[pm] net fingerprint ${t}→${e} (same network — no backoff reset)`)}_maybeRearmRtc(){if(!this._rtcGivenUp)return;let e=Date.now();e-this._lastStunProbeAt<n.cx.minIntervalMs||(this._lastStunProbeAt=e,E().then(e=>{var t;if(this._sigDestroyed||!this._rtcGivenUp)return;let r=e||(this._giveUpIp===B?B:null);(t=this._giveUpIp,r&&(!t||r!==t))?((0,m.Lq)("switch",`rearm check: ip ${this._giveUpIp||"unknown"}→${r} changed → re-arm RTC`),(0,p.c)("transport","[pm] public ip changed → re-arm rtc"),this._rtcGivenUp=!1,this._giveUpIp=null,this._probeAttempts=0,this._rtcRestartAttempts=0,this._netFingerprint=e,this._canSignal())?this._shouldRenegotiate()&&this._restartRtc("stun-rearm"):this._sig?.retryNow("stun-rearm"):(0,m.Lq)("switch",`rearm check: ip=${r||"unknown"} same as give-up → stay WS-only`)}).catch(()=>{}))}_startSecondaryAdapters(){for(let e of((0,p.c)("transport",`[pm] startSecondary enabled=${this._profile.enabled}`),(0,p.c)("transport",`[pm] startSecondary rtcTestDisabled=${!!this._rtcTestDisabled}`),this._profile.enabled))"ws"!==e&&("rtc"!==e||!this._rtcTestDisabled)&&(this._adapters.has(e)||((0,p.c)("transport",`[pm] start adapter ${e}`),this._instantiate(e),this._adapters.get(e)?.connect(this._buildCtx(e))))}_handleApprovalSignal(e){return W(this,e)}_onSignalingReady(){q(this)}_canSignal(){return!!this._sig?.ready}_shouldRenegotiate(){return!this._awaitingApproval&&this._canSignal()}_restartRtc(e="?"){(0,m.Lq)("switch",`restartRtc CALLED by=${e} attempts=${this._rtcRestartAttempts}`);let t=this._adapters.get("rtc"),r=function({testDisabled:e,givenUp:t,rtcState:r,hasRtc:i}){return e?"skip-test-disabled":t?"skip-given-up":i&&(r===n.Of.connecting||r===n.Of.open)?"skip-in-flight":i?"restart":"start-fresh"}({testDisabled:!!this._rtcTestDisabled,givenUp:this._rtcGivenUp,rtcState:t?.state,hasRtc:!!t});if("skip-test-disabled"===r)return void(0,m.Lq)("switch","restartRtc skipped (rtcTestDisabled)");if("skip-given-up"===r)return void(0,m.Lq)("switch","restartRtc skipped (hard NAT → WS-only)");if("skip-in-flight"===r)return void(0,m.Lq)("switch",`restartRtc skipped (rtc=${t.state})`);if("start-fresh"===r){(0,m.Lq)("switch","restartRtc: no rtc → startSecondary"),this._startSecondaryAdapters();return}(0,m.Lq)("switch","restartRtc: tear down + renegotiate"),(0,p.c)("transport","[pm] ws reconnected → restart rtc");try{t.disconnect(`restart:${e}`)}catch{}this._adapters.delete("rtc"),this._rtcSignalingHandler=null,this._startSecondaryAdapters()}_forceRestartRtc(e="?"){(0,m.Lq)("switch",`forceRestartRtc CALLED by=${e}`);let t=this._adapters.get("rtc");if(t){try{t.disconnect(`force:${e}`)}catch{}this._adapters.delete("rtc"),this._rtcSignalingHandler=null}this._rtcGivenUp?(0,m.Lq)("switch","forceRestartRtc: torn down, no renegotiate (hard NAT)"):this._startSecondaryAdapters()}disconnect(){this._watchers?.detach(),this._watchers=null,clearTimeout(this._resumeProbeTimer),this._resumeProbeTimer=null,clearTimeout(this._rtcDeferTimer),this._rtcDeferTimer=null,this._probeToken++;try{this._sig?.disconnect()}catch{}for(let e of(this._sig=null,this._sigDestroyed=!0,this._sigBuffer=[],clearTimeout(this._wsFallbackTimer),clearTimeout(this._rejoinDebounceTimer),this._rejoinDebounceTimer=null,this._adapters.values()))try{e.disconnect("pm-disconnect")}catch{}for(let e of(this._adapters.clear(),this._bus.clear(),this._buffer=[],this._connected=!1,this._rawSocket=null,this._disarmRestart(),(0,m.Lq)("switch",`RESET attempts (was ${this._rtcRestartAttempts}) reason=pm-disconnect`),this._rtcRestartAttempts=0,this._probeAttempts=0,this._rtcGivenUp=!1,this._giveUpIp=null,this._lastStunProbeAt=0,this._ackTimers.values()))clearTimeout(e);this._ackTimers.clear()}_buildCtx(e,t){let r={auth:this._auth,profile:this._profile};return"ws"===e&&(r.onRetryStatus=this._wsCallbacks.onRetryStatus,r.onUrlUpdate=e=>{e.tunnelUrl&&(this._auth.tunnelUrl=e.tunnelUrl),void 0!==e.localIp&&(this._auth.localIp=e.localIp),this._wsCallbacks.onUrlUpdate?.(e)}),"rtc"===e&&(r.signaling={send:e=>this._sendSignaling(e),on:e=>{this._rtcSignalingHandler=e},off:()=>{this._rtcSignalingHandler=null}}),r}_onAdapterStateChange(e,t){(0,p.c)("transport",`[pm] ${e} state=${t}`),("rtc"!==e||t!==n.Of.closed)&&(0,m.Lq)("switch",`${e}→${t}`),"ws"===e&&function(e,t){let r=e._adapters.get("ws");if(t===n.Of.open){let t=e._lastWsState===n.Of.degraded;e._connected=!0,e._connectionMode=r?.connectionMode||"tunnel",e._rawSocket=r?.socket||null,t&&e._maybeFireRejoin("ws","ws reconnect while rtc ready"),e._lastWsState!==n.Of.open&&(e._onConnectFired?e._wsCallbacks.onUrlUpdate?.({}):(e._onConnectFired=!0,(0,m.Lq)("switch",`onConnect FIRE (ws, mode=${e._connectionMode})`),e._wsCallbacks.onConnect?.(e._bus,e._connectionMode)))}else e._rawSocket=null,e._lastWsState===n.Of.open&&((0,m.Lq)("switch","ws down"),e._anyAdapterReady()&&(0,m.Lq)("switch","ws down but rtc alive → skip onDisconnect"));e._lastWsState=t}(this,t),"rtc"===e&&function(e,t){if(t===n.Of.open){let t=e._onConnectFired;clearTimeout(e._wsFallbackTimer),e._rtcCallbacks.onUpgrade?.(e._adapters.get("rtc")?.typeDetail||"dc-stun"),e._onConnectFired||(e._onConnectFired=!0,e._connected=!0,e._connectionMode="webrtc",(0,m.Lq)("switch","onConnect FIRE (rtc, mode=webrtc)"),e._wsCallbacks.onConnect?.(e._bus,e._connectionMode)),e._rtcRestartAttempts=0,e._probeAttempts=0,e._rtcGivenUp=!1,e._giveUpIp=null,e._disarmRestart(),clearTimeout(e._rejoinDebounceTimer),e._rejoinDebounceTimer=null;let r=e._adapters.get("rtc");if(r?.isLoopback){(0,m.Lq)("switch","rtc loopback detected (same machine) → drop ws standby");let t=e._adapters.get("ws");if(t){try{t.disconnect()}catch{}e._adapters.delete("ws")}}t&&e._maybeFireRejoin("rtc","rtc reconnect while ws ready")}if(t===n.Of.closed){for(let t of(e._rtcCallbacks.onFallback?.("ws"),(0,m.Lq)("switch","rtc closed → startWsFallback + scheduleRtcRestart"),e._startWsFallback(),clearTimeout(e._wsFallbackTimer),e._pendingAcks.values()))try{t({error:"rtc-closed"})}catch{}for(let t of(e._pendingAcks.clear(),e._ackTimers.values()))clearTimeout(t);e._ackTimers.clear(),e._scheduleRtcRestart("rtc-closed")}}(this,t),"rtc"===e&&t===n.Of.open&&((0,p.c)("auth","[seal] rtc OPEN → sending proof"),(0,C.pV)(this)),this._recomputeType();let r=this._anyAdapterReady();r!==this._connected&&(this._connected=r,r||(this._onConnectFired=!1,(0,m.Lq)("switch",`onDisconnect FIRE (last carrier gone: ${e}→${t})`),this._wsCallbacks.onDisconnect?.(`${e}-${t}`))),this._flushBuffer()}_maybeFireRejoin(e,t){let r="ws"===e?this._adapters.get("rtc"):this._adapters.get("ws");if(r?.ready){(0,p.c)("transport",`[pm] ${t} → skip rejoin (other ready)`),(0,m.Lq)("switch",`${t} → skip rejoin (other ready)`);return}if("ws"===e&&r&&r.state===n.Of.connecting){(0,p.c)("transport",`[pm] ${t} → debounce rejoin (rtc connecting)`),(0,m.Lq)("switch",`${t} → debounce rejoin ${n.ZN}ms (rtc connecting)`),clearTimeout(this._rejoinDebounceTimer),this._rejoinDebounceTimer=setTimeout(()=>{this._rejoinDebounceTimer=null;let e=this._adapters.get("rtc");e?.ready?(0,m.Lq)("switch","debounce: rtc opened → skip rejoin"):((0,m.Lq)("switch",`debounce expired → FIRE rejoin (rtc=${e?.state||"absent"})`),this._bus.dispatch("connect",[]))},n.ZN);return}(0,m.Lq)("switch",`${t} → FIRE rejoin`),this._bus.dispatch("connect",[])}_recomputeType(){let e=this._pickAdapter(n.l_.binary)||this._pickAdapter(n.l_.control),t=e&&"rtc"===e.constructor.id?e.typeDetail||"dc-stun":"ws";t!==this._type&&(this._type=t,this._rtcCallbacks.onTransportChange?.(t))}_anyAdapterReady(){for(let e of this._adapters.values())if(e.ready)return!0;return!1}_pickAdapter(e){return function(e,t,r){let n=t.channels[r];if(!n)return null;let i=[...e.values()].filter(e=>e.supports(r)&&e.ready);return i.length?(i.sort((e,t)=>{let i=t.getPriority?t.getPriority(r):t.constructor.priority[r]??0,s=e.getPriority?e.getPriority(r):e.constructor.priority[r]??0;if(i!==s)return i-s;if(n.prefer){if(t.constructor.id===n.prefer)return 1;if(e.constructor.id===n.prefer)return -1}return 0}),i[0]||null):null}(this._adapters,this._profile,e)}_sendControl(e,t){!function(e,t,r){let i="function"==typeof r[r.length-1]?r.pop():null,s=e._pickAdapter(n.l_.control);if(!s){(0,p.c)("transport",`[pm] buffer event=${t} (no adapter ready)`),(0,m.Lq)("switch",`buffer "${t}" (no adapter)`),e._buffer.push({event:t,args:r,cb:i});return}if((0,p.c)("transport",`[pm] send control event=${t} via=${s.constructor.id}`),"rtc"===s.constructor.id){let a=null;if(i&&(a=`c_${++e._ackSeq}`,e._pendingAcks.set(a,i),e._scheduleAckTimeout(a,{event:t,args:r})),!s.send(n.l_.control,{event:t,args:r,ackId:a})){let o=e._pickAdapter(n.l_.control);if(o&&o!==s&&o.send(n.l_.control,i?{event:t,args:r,ackId:a,cb:i}:{event:t,args:r,ackId:a}))return;(0,p.c)("transport",`[pm] rtc refused event=${t} → buffered`),e._buffer.push({event:t,args:r,cb:i})}}else s.send(n.l_.control,{event:t,args:r,cb:i})}(this,e,t)}_flushBuffer(){!function(e){if(!e._buffer.length)return;let t=e._pickAdapter(n.l_.control);if(!t)return;let r=e._buffer.splice(0);for(let{event:n,args:i,cb:s}of((0,p.c)("transport",`[pm] flush ${r.length} buffered via=${t.constructor.id}`),r))e._sendControl(n,s?[...i,s]:i)}(this)}_dispatch(e,t,r){!function(e,t,r,i){if("srvCaps"===t){let t="rtc"===i?r?.args?.[0]:r;(0,p.c)("transport",`[pm] srvCaps from host via ${i}: ${JSON.stringify(t)}`),e._srvCaps=t||{},e._adapters.get("rtc")?.setPeerCaps?.(e._srvCaps)}if("__ack"===t){let{ackId:t,args:n}=r||{},i=e._pendingAcks.get(t);if(i){e._pendingAcks.delete(t);let r=e._ackTimers.get(t);r&&(clearTimeout(r),e._ackTimers.delete(t)),i(...n||[])}return}if("device:approved"===t){e._awaitingApproval=!1;let t=e._adapters.get("rtc");e._canSignal()&&(!t||t.state===n.Of.closed)&&e._restartRtc("device-approved")}if("rtc:enabled"===t){e._rtcTestDisabled&&(e._rtcTestDisabled=!1,(0,m.Lq)("switch","rtc:enabled by host → clear flag + restart RTC"),e._restartRtc("rtc-enabled"));return}if("tunnel:updated"===t){let t="rtc"===i?r?.args?.[0]:r;if(t){let{tunnelUrl:r,localIp:n,status:i}=t;if(e._auth.tunnelUrl===window.location?.origin)return(0,m.Lq)("switch",`tunnel:updated ignored (carrier is the page origin; got url=${r||"none"})`);if((0,m.Lq)("switch",`tunnel:updated recv (status=${i} url=${r||"none"})`),"ready"===i&&r){let t=e._auth.tunnelUrl!==r;e._auth.tunnelUrl=r,n&&(e._auth.localIp=n),e._wsCallbacks.onUrlUpdate?.({tunnelUrl:r,localIp:n});let i=e._adapters.get("ws");if(i&&(!i.ready||t)){(0,m.Lq)("switch",`tunnel:updated → ${t?"url changed":"ws not ready"} → retry ws with new URL`);try{i.retryNow("tunnel-updated")}catch{}}}else"down"===i&&(e._auth.tunnelUrl="",e._wsCallbacks.onUrlUpdate?.({tunnelUrl:"",localIp:n}))}return}let s="rtc"===i&&Array.isArray(r?.args)?r.args:[r];e._bus?.dispatch(t,s)}(this,e,t,r)}_onBinary(e){e&&("mobile"===e.channel?this._bus?.dispatch("mobile-bin",[e.buffer]):"file"===e.channel&&this._bus?.dispatch("file-bin",[e.buffer]))}_scheduleAckTimeout(e){var t;let r;t=this,r=setTimeout(()=>{t._ackTimers.delete(e),(0,p.c)("transport",`[pm] ack timeout ackId=${e} event=undefined → suspect zombie RTC`);let r=t._pendingAcks.get(e),i=t._adapters.get("rtc");t._adapters.get("ws");let s=Date.now(),a=i?.lastInboundAt||0;i?.ready&&a&&s-a<n.mk?(0,m.Lq)("switch",`ack-timeout ? ignored (rtc active, lastInbound=${s-a}ms ago)`):i?.state===n.Of.open?F(t,"ack-timeout:?"):t._scheduleRtcRestart("ack-timeout")},t._ackTimeoutMs),t._ackTimers.set(e,r)}_armRestart(e,t){clearTimeout(this._rtcRestartTimer),this._rtcRestartDueAt=Date.now()+t,this._rtcRestartTimer=setTimeout(e,t)}_disarmRestart(){let e=this._rtcRestartTimer?Math.max(this._rtcRestartDueAt-Date.now(),0):-1;return clearTimeout(this._rtcRestartTimer),this._rtcRestartTimer=null,this._rtcRestartDueAt=0,e}_scheduleRtcRestart(e="?"){if((0,m.Lq)("switch",`rtcRestart REQ by=${e} attempts=${this._rtcRestartAttempts} probe=${this._probeAttempts} givenUp=${this._rtcGivenUp} pending=${!!this._rtcRestartTimer}`),this._rtcRestartTimer){let t=Math.max(this._rtcRestartDueAt-Date.now(),0);(0,m.Lq)("switch",`rtcRestart SKIP by=${e} (pending rung ${this._rtcRestartAttempts} fires in ${t}ms)`);return}if(this._rtcGivenUp){(0,m.Lq)("switch","scheduleRtcRestart skipped (hard NAT → WS-only)"),(0,p.c)("transport","[pm] rtc probe skipped (given up — hard NAT)");return}let t=function({attempts:e,probeAttempts:t,verdict:r}){let i,s,a=e>=n.QZ.maxAttempts,o=t;if(a){if(i=n.QZ.probeBackoffMs[t]??n.QZ.probeBackoffMs.at(-1),(o=t+1)>=n.QZ.classifyAfterProbes){if("hard"===(s=r?.()??"unknown"))return{giveUp:!0,verdict:s,probeAttempts:o};o=0}}else i=n.QZ.backoffMs[e]??n.QZ.backoffMs.at(-1);return{delay:i,isProbe:a,attempts:e+1,probeAttempts:o,verdict:s}}({attempts:this._rtcRestartAttempts,probeAttempts:this._probeAttempts,verdict:()=>this._adapters.get("rtc")?.natVerdict?.()??"unknown"});if(void 0!==t.verdict&&((0,m.Lq)("switch",`scheduleRtcRestart natVerdict=${t.verdict} probeAttempts=${t.probeAttempts}`),(0,p.c)("transport",`[pm] rtc nat verdict=${t.verdict} after ${t.probeAttempts} probes`)),t.giveUp){this._probeAttempts=t.probeAttempts,this._rtcGivenUp=!0,this._giveUpIp=this._netFingerprint,this._giveUpIp||E().then(e=>{this._rtcGivenUp&&!this._giveUpIp&&(this._giveUpIp=e||B,(0,m.Lq)("switch",`give-up baseline from probe: ip=${this._giveUpIp}`))}).catch(()=>{}),(0,m.Lq)("switch",`RTC give-up: hard NAT → WS-only (ip=${this._giveUpIp||"pending"})`);return}let{delay:r,isProbe:i}=t;this._probeAttempts=t.probeAttempts,this._rtcRestartAttempts=t.attempts,(0,m.Lq)("switch",`rtcRestart ARM by=${e} rung=${this._rtcRestartAttempts} delay=${r}ms probe=${i}`),(0,p.c)("transport",`[pm] schedule rtc ${i?"probe":"restart"} #${this._rtcRestartAttempts} in ${r}ms`);let s=()=>{if(this._disarmRestart(),this._awaitingApproval||!this._sig?.ready)return;let e=this._adapters.get("rtc");if(e){let t=function({state:e,connectingSince:t,connectDeadline:r,now:i,connectTimeoutMs:s}){return e!==n.Of.connecting?"restart":i<function({connectingSince:e,connectDeadline:t,connectTimeoutMs:r}){return t??(e??0)+r}({connectingSince:t,connectDeadline:r,connectTimeoutMs:s})?"wait":"teardown"}({state:e.state,connectingSince:e.connectingSince,connectDeadline:e.connectDeadline,now:Date.now(),connectTimeoutMs:n.AC});if("wait"===t){let t=Math.max(function({connectingSince:e,connectDeadline:t,connectTimeoutMs:r}){return t??(e??0)+r}({connectingSince:e.connectingSince,connectDeadline:e.connectDeadline,connectTimeoutMs:n.AC})-Date.now(),r);(0,m.Lq)("switch",`restart tick: peer still young (rung ${this._rtcRestartAttempts}) → re-arm in ${t}ms, no rung spent`),this._armRestart(s,t);return}if("teardown"===t){try{e.disconnect(`rung-${this._rtcRestartAttempts}-teardown`)}catch{}this._adapters.delete("rtc"),this._rtcSignalingHandler=null}}this._restartRtc(`rung-${this._rtcRestartAttempts}`)};this._armRestart(s,r)}_sendSignaling(e){K(this,e)}_flushSigBuffer(){H(this)}}},96605:(e,t,r)=>{r.d(t,{$o:()=>eB.A,AX:()=>e_.A,Ay:()=>tl,BK:()=>e4.A,BZ:()=>X.A,Bm:()=>W.A,Cp:()=>z.A,Do:()=>o.A,F1:()=>l.A,FE:()=>e1.A,FW:()=>eU.A,Fc:()=>eO.A,GD:()=>O.A,GO:()=>ef.A,Gr:()=>I.A,Gv:()=>ew.A,Hx:()=>es.A,Ir:()=>d.A,J4:()=>e0.A,JG:()=>y.A,JU:()=>q.A,Jl:()=>m.A,Kq:()=>ta.A,LM:()=>ec.A,Lt:()=>x.A,M6:()=>eY.A,MA:()=>c.A,Mr:()=>eE.A,P6:()=>et.A,QR:()=>T.A,Qp:()=>a.A,RI:()=>i.A,TB:()=>e6.A,Ud:()=>V.A,VA:()=>eg.A,Vn:()=>ez.A,W1:()=>em.A,WE:()=>b.A,We:()=>e3.A,Wn:()=>S.A,X:()=>ts.A,X_:()=>D.A,ZH:()=>L.A,ZU:()=>e9.A,Ze:()=>eM.A,Zr:()=>K.A,_O:()=>te.A,_V:()=>ee.A,a4:()=>eb.A,aJ:()=>p.A,ak:()=>Z.A,bE:()=>e7.A,bd:()=>e5.A,cC:()=>u.A,c_:()=>g.A,dJ:()=>N.A,de:()=>ti.A,dx:()=>H.A,e6:()=>eS.A,e9:()=>eN.A,eM:()=>eq.A,ek:()=>eZ.A,es:()=>ev.A,f2:()=>G.A,f5:()=>P.A,gH:()=>eI.A,h1:()=>eh.A,iU:()=>B.A,jG:()=>eL.A,jj:()=>ey.A,jl:()=>w.A,jz:()=>eC.A,kU:()=>$.A,kV:()=>er.A,kr:()=>el.A,kt:()=>eW.A,lM:()=>e8.A,lP:()=>eA.A,m0:()=>k.A,mN:()=>Q.A,nU:()=>eu.A,qz:()=>J.A,rX:()=>_.A,s3:()=>en.A,sU:()=>eX.A,sv:()=>j.A,ue:()=>eT.A,vR:()=>eP.A,vW:()=>ej.A,vd:()=>F.A,vj:()=>eH.A,vv:()=>ea.A,wB:()=>eG.A,wO:()=>eQ.A,ww:()=>Y.A,xq:()=>ep.A,xv:()=>eR.A,y8:()=>eo.A,yQ:()=>f.A,yU:()=>eD.A,yd:()=>s.A,zP:()=>h.A,zW:()=>tt.A});var n=r(54568),i=r(14796),s=r(50683),a=r(30307),o=r(62826),l=r(22061),c=r(46480),d=r(77542),u=r(30824),h=r(8631),p=r(34309),m=r(63322),f=r(34041),y=r(8008),g=r(76265),_=r(17156),b=r(11964),w=r(21411),k=r(1173),A=r(72980),v=r(9901),S=r(3129),T=r(59706),x=r(31381),C=r(40414),R=r(91276),P=r(2099),I=r(26083),$=r(20732),D=r(69724),M=r(93675),L=r(96249),O=r(36293),U=r(16556),E=r(14264),B=r(2939),j=r(74206),N=r(52947),F=r(26463),W=r(45894),q=r(72030),K=r(58588),H=r(10280),z=r(57460),J=r(97380),G=r(80172),V=r(7086),Z=r(83667),Q=r(73012),X=r(19773),Y=r(64529),ee=r(31260),et=r(46396),er=r(86163),en=r(45258),ei=r(81167),es=r(7920),ea=r(68476),eo=r(53903),el=r(58299),ec=r(41956),ed=r(1345),eu=r(76710),eh=r(1778),ep=r(81168),em=r(17212),ef=r(32174),ey=r(6906),eg=r(82099),e_=r(39182),eb=r(23428),ew=r(44073),ek=r(26093),eA=r(15217),ev=r(67310),eS=r(45667),eT=r(63742),ex=r(90466),eC=r(16172),eR=r(63253),eP=r(80367),eI=r(794),e$=r(99348),eD=r(81002),eM=r(21126),eL=r(55769),eO=r(28819),eU=r(67447),eE=r(11344),eB=r(49600),ej=r(14858),eN=r(60527),eF=r(16889),eW=r(19293),eq=r(92534),eK=r(14432),eH=r(23555),ez=r(82797),eJ=r(95740),eG=r(37270),eV=r(4326),eZ=r(35198),eQ=r(41684),eX=r(46548),eY=r(3792),e0=r(87130),e1=r(94411),e2=r(27663),e5=r(87547),e3=r(30774),e4=r(88011),e6=r(44968),e8=r(82791),e9=r(70479),e7=r(96466),te=r(63058),tt=r(96553),tr=r(69458),tn=r(1852),ti=r(39075),ts=r(36645),ta=r(56242);let to={AlertCircle:i.A,ArrowDown:s.A,ArrowRight:a.A,ArrowUp:o.A,ArrowUpRight:l.A,Ban:c.A,Bell:d.A,Bot:u.A,Bug:h.A,Check:p.A,CheckCircle2:m.A,ChevronDown:f.A,ChevronLeft:y.A,ChevronRight:g.A,ChevronUp:_.A,ChevronsDownUp:b.A,Circle:w.A,ClipboardPaste:k.A,Command:A.A,Compass:v.A,Columns2:S.A,Copy:T.A,CornerDownLeft:x.A,Crown:C.A,Delete:R.A,Download:P.A,ExternalLink:I.A,Eye:$.A,EyeOff:D.A,Facebook:M.A,File:L.A,FileCode:O.A,FileJson:U.A,FilePlus:E.A,FileText:B.A,Files:j.A,Filter:N.A,Folder:F.A,FolderOpen:W.A,FolderPlus:q.A,GitBranch:K.A,GitFork:H.A,Github:z.A,Globe:J.A,GripVertical:G.A,Hand:V.A,HardDrive:Z.A,HelpCircle:Q.A,History:X.A,Home:Y.A,Image:ee.A,ImageOff:et.A,KeyRound:er.A,Keyboard:en.A,Laptop:ei.A,LayoutDashboard:es.A,Link2:ea.A,ListChecks:eo.A,Loader2:el.A,Lock:ec.A,LogIn:ed.A,LogOut:eu.A,Maximize2:eh.A,Minimize2:ep.A,Menu:em.A,Mic:ef.A,MicOff:ey.A,Monitor:eg.A,Moon:e_.A,MoreHorizontal:eb.A,MoreVertical:ew.A,MousePointer2:ek.A,Package:eA.A,Palette:ev.A,PanelLeft:eS.A,PanelLeftClose:eT.A,PanelLeftOpen:ex.A,PanelRight:eC.A,Paperclip:eR.A,Pause:eP.A,Pencil:eI.A,Pi:e$.A,Pin:eD.A,PinOff:eM.A,Play:eL.A,Plug:eO.A,Plus:eU.A,Power:eE.A,PowerOff:eB.A,QrCode:ej.A,RefreshCw:eN.A,Replace:eF.A,RotateCw:eW.A,Save:eq.A,Scissors:eK.A,Search:eH.A,Send:ez.A,SendHorizontal:eJ.A,Settings:eG.A,Share:eV.A,Shield:eZ.A,Smartphone:eQ.A,Sparkles:eX.A,Square:eY.A,SquarePen:e0.A,Star:e1.A,StickyNote:e2.A,Sun:e5.A,Target:e3.A,Terminal:e4.A,Trash2:e6.A,Triangle:e8.A,Type:e9.A,Undo2:e7.A,Upload:te.A,Users:tt.A,Volume2:tr.A,VolumeX:tn.A,Wallpaper:ti.A,X:ts.A,Zap:ta.A};function tl({name:e,size:t=20,className:r="",...i}){let s=to[e];return s?(0,n.jsx)(s,{size:t,className:r,strokeWidth:2,...i}):(console.warn(`Icon "${e}" not found in the icon registry`),null)}},96631:(e,t,r)=>{r.d(t,{Yr:()=>l,_r:()=>s,gJ:()=>o,rh:()=>c,sP:()=>a});var n=r(30562);let i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;function s(){let e=window.location.hostname;return"localhost"===e||"::1"===e||"[::1]"===e||e.startsWith("127.")||e.endsWith(".localhost")}function a(){return s()||!!window.__TAURI__}function o(){return!!window.__TAURI__||window.location.port===String(n._8)||!0}function l(){if(s())return!0;let e=i.exec(window.location.hostname);if(!e||e.slice(1).some(e=>Number(e)>255))return!1;let t=Number(e[1]),r=Number(e[2]);return 10===t||192===t&&168===r||172===t&&!!(r>=16)&&!!(r<=31)}function c(e){return s()&&window.location.port!==String(n._8)?e?.loopbackOrigin||n.w||n.lE:null}},99022:(e,t,r)=>{r.d(t,{$4:()=>d,D5:()=>b,HY:()=>p,I8:()=>y,IU:()=>w,LG:()=>u,cH:()=>g,e1:()=>m,lu:()=>k,lz:()=>c,pV:()=>A,t8:()=>h});var n=r(81851);r(55285);var i=r(68469);let s="9remote_device_trust",a="9remote_pending_fp2";function o(){try{return JSON.parse(localStorage.getItem(s)||"{}")}catch{return{}}}function l(e){localStorage.setItem(s,JSON.stringify(e))}function c(e){return o()[e]||null}function d(e){if(!e)return e;let t=c(e)?.tail;return t?`${e}-${t}`:e}function u(e,t){let r=o();r[e]={...r[e]||{},...t},l(r)}async function h(e,t){return e&&t?await (0,i.O)(e,t):null}function p(){let e=sessionStorage.getItem(a);return sessionStorage.removeItem(a),e?JSON.parse(e).fp2??null:null}function m(){try{let e=sessionStorage.getItem(a);if(!e)return null;let{fp2:t,exp:r}=JSON.parse(e);if(!t||Date.now()>r)return sessionStorage.removeItem(a),null;return t}catch{return null}}let f="9remote_api_keys";function y(){try{let e=sessionStorage.getItem(n.El);if(!e)return;sessionStorage.removeItem(n.El);let t=JSON.parse(localStorage.getItem(f)||"[]");if(t.some(t=>{try{return atob(t.key)===e}catch{return!1}}))return;t.push({id:String(Date.now()),key:btoa(e),label:`Key ${t.length+1}`,createdAt:new Date().toISOString(),lastLoginDate:new Date().toISOString()}),localStorage.setItem(f,JSON.stringify(t));try{window.dispatchEvent(new Event(n.N0))}catch{}}catch{}}function g(e){if(e)try{let t=o();delete t[e],l(t)}catch{}}function _(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}async function b(e,t,r){try{let n=await crypto.subtle.importKey("raw",_(e),{name:"Ed25519"},!1,["verify"]);return await crypto.subtle.verify("Ed25519",n,_(r),new TextEncoder().encode(t))}catch{return null}}let w=["device:keyIssued","device:tailRejected"];function k(e,t,r){let i=e._auth?.apiKey;if(!i)return!1;if("device:keyIssued"===t){e._auth.tempKey=null,e._auth.socketOptions?.auth&&(e._auth.socketOptions.auth.tempKey=null);try{sessionStorage.removeItem("tempKey")}catch{}let t=r?.tail;return!t||(u(i,{tail:t}),e._tailProofSent=e._adapters.get("rtc")?._peerEpoch??0,sessionStorage.getItem(n.aS)&&(sessionStorage.removeItem(n.aS),sessionStorage.setItem(n.El,`${i}-${t}`),y()),!0)}return"device:tailRejected"===t&&(r?.reason===n.ML.sealUnreadable&&u(i,{hostSealKey:null}),!0)}async function A(e){let t=e._auth?.apiKey;if(!t)return;let i=e._adapters.get("rtc");if(!i?.ready)return;let s=i._peerEpoch??0;if(e._tailProofSent===s)return;let{freshAuth:a}=await Promise.resolve().then(r.bind(r,14511)),o=await a({apiKey:t,tempKey:e._auth?.tempKey||null},"rtc");(o.keyTail||o.keyTailSealed)&&i.send(n.l_.control,{event:"device:tailProof",args:[{keyTail:o.keyTail,keyTailSealed:o.keyTailSealed,tempKey:e._auth?.tempKey||null}]})&&(e._tailProofSent=s)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{794:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},1173:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("clipboard-paste",[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]])},1345:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]])},1778:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},1852:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},2099:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},2939:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},3129:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]])},3792:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},4326:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])},6906:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]])},7086:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("hand",[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]])},7920:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},8008:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},8631:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]])},9901:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},10280:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]])},11344:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]])},11964:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("chevrons-down-up",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]])},13454:(e,a,t)=>{t.d(a,{A:()=>p});var h=t(7620);let y=(...e)=>e.filter((e,a,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===a).join(" ").trim(),d=e=>{let a=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,a,t)=>t?t.toUpperCase():a.toLowerCase());return a.charAt(0).toUpperCase()+a.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let k=(0,h.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:d,className:k="",children:p,iconNode:c,...r},A)=>(0,h.createElement)("svg",{ref:A,...l,width:a,height:a,stroke:e,strokeWidth:d?24*Number(t)/Number(a):t,className:y("lucide",k),...!p&&!(e=>{for(let a in e)if(a.startsWith("aria-")||"role"===a||"title"===a)return!0;return!1})(r)&&{"aria-hidden":"true"},...r},[...c.map(([e,a])=>(0,h.createElement)(e,a)),...Array.isArray(p)?p:[p]])),p=(e,a)=>{let t=(0,h.forwardRef)(({className:t,...l},p)=>(0,h.createElement)(k,{ref:p,iconNode:a,className:y(`lucide-${d(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,t),...l}));return t.displayName=d(e),t}},14264:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},14432:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]])},14796:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},14858:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("qr-code",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]])},15217:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},16172:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]])},16556:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]])},16889:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("replace",[["path",{d:"M14 4a1 1 0 0 1 1-1",key:"dhj8ez"}],["path",{d:"M15 10a1 1 0 0 1-1-1",key:"1mnyi5"}],["path",{d:"M21 4a1 1 0 0 0-1-1",key:"sfs9ap"}],["path",{d:"M21 9a1 1 0 0 1-1 1",key:"mp6qeo"}],["path",{d:"m3 7 3 3 3-3",key:"x25e72"}],["path",{d:"M6 10V5a2 2 0 0 1 2-2h2",key:"15xut4"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}]])},17156:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},17212:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},19293:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},19773:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},20732:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},21126:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]])},21411:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},22061:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]])},23428:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},23555:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},26083:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},26093:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]])},26463:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},27663:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},28819:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]])},30307:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},30774:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},30824:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},31260:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},31381:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("corner-down-left",[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]])},32174:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])},34041:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},34309:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},35198:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},36293:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]])},36645:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},37270:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},39075:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("wallpaper",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"m9 17 6.1-6.1a2 2 0 0 1 2.81.01L22 15",key:"1sl52q"}],["circle",{cx:"8",cy:"9",r:"2",key:"gjzl9d"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]])},39182:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]])},40414:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]])},41684:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},41956:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},44073:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]])},44968:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},45258:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]])},45667:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]])},45894:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},46396:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]])},46480:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},46548:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},49600:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("power-off",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},50683:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},52947:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},53903:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},55769:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},56242:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},57460:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]])},58299:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},58588:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]])},59706:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},60527:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},62826:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},63058:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},63253:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]])},63322:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},63742:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]])},64529:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]])},67310:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]])},67447:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},68476:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},69458:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},69724:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},70479:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]])},72030:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},72980:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]])},73012:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},74206:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]])},76265:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},76710:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]])},77542:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},80172:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]])},80367:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},81002:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},81167:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]])},81168:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},82099:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},82791:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]])},82797:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},83667:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},86163:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},87130:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},87547:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},88011:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},90466:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]])},91276:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]])},92534:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},93675:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]])},94411:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},95740:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]])},96249:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]])},96466:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},96553:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},97380:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},99348:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(13454).A)("pi",[["line",{x1:"9",x2:"9",y1:"4",y2:"20",key:"ovs5a5"}],["path",{d:"M4 7c0-1.7 1.3-3 3-3h13",key:"10pag4"}],["path",{d:"M18 20c-1.7 0-3-1.3-3-3V4",key:"1gaosr"}]])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";let e="u">typeof createImageBitmap,t={1:24,2:28};async function a(i,s,h=1){let l=new DataView(i),g=l.getUint32(0,!0),n=l.getFloat64(4,!1),f=t[h]||24,m=[],p=12;for(let e=0;e<g&&!(p+f>i.byteLength);e++){let e=l.getUint32(p,!0),t=l.getUint32(p+4,!0),a=l.getUint32(p+8,!0),s=l.getUint32(p+12,!0),g=l.getUint32(p+16,!0),n=l.getUint32(p+20,!0),r=2===h?l.getUint32(p+24,!0):null;if(p+f+n>i.byteLength)break;let o=i.slice(p+f,p+f+n);m.push({tileIndex:e,x:t,y:a,width:s,height:g,imageBuffer:o,hash:r}),p+=f+n}if(e){let e=await Promise.all(m.map(e=>createImageBitmap(new Blob([e.imageBuffer])).catch(()=>null))),t=m.map((t,a)=>({tileIndex:t.tileIndex,x:t.x,y:t.y,width:t.width,height:t.height,hash:t.hash,bitmap:e[a]})),a=e.filter(Boolean);self.postMessage({tiles:t,timestamp:n,id:s,hasBitmap:!0},a)}else{let e=m.map(e=>e.imageBuffer),t=m.map(e=>({tileIndex:e.tileIndex,x:e.x,y:e.y,width:e.width,height:e.height,hash:e.hash,imageBuffer:e.imageBuffer}));self.postMessage({tiles:t,timestamp:n,id:s,hasBitmap:!1},e)}}self.onmessage=({data:{buffer:e,id:t,v:i}})=>{a(e,t,i).catch(e=>{self.postMessage({error:e.message,id:t})})}})(),_N_E={};
|