dorkos 0.43.0 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +6 -6
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-BbL4h7yi-BbRHxR_f.js → BaseTanStackRouterDevtoolsPanel-BbL4h7yi-Cd8JnBCJ.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-BbL4h7yi-Bhzkg96L.js → BaseTanStackRouterDevtoolsPanel-BbL4h7yi-D73A7WJY.js} +1 -1
- package/dist/client/assets/{ConfigTab-BshXF_Ah.js → ConfigTab-Dq5dbbEB.js} +1 -1
- package/dist/client/assets/{ConfigTab-CuOK-h_n.js → ConfigTab-lJafANrQ.js} +1 -1
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CMO0N95A-5qa4W6Ke.js → FloatingTanStackRouterDevtools-CMO0N95A-DUFt2Sab.js} +1 -1
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CMO0N95A-Deu-qTVi.js → FloatingTanStackRouterDevtools-CMO0N95A-g68_CzC5.js} +1 -1
- package/dist/client/assets/{RightPanelHeader-BwRpiPnF.js → RightPanelHeader-B-bdVBD5.js} +1 -1
- package/dist/client/assets/{RightPanelHeader-phxQm-eZ.js → RightPanelHeader-XFaPYtCt.js} +1 -1
- package/dist/client/assets/{SessionsTab-B1dlYyRR.js → SessionsTab-BeSViVbi.js} +1 -1
- package/dist/client/assets/{SessionsTab-BjOaGzWL.js → SessionsTab-Djl3a1JS.js} +1 -1
- package/dist/client/assets/{ToolkitTab-BZNbWVwL.js → ToolkitTab-E1j7Fl9y.js} +1 -1
- package/dist/client/assets/{ToolkitTab-BgNQLkM0.js → ToolkitTab-p2cUpDvj.js} +1 -1
- package/dist/client/assets/{TopologyGraph-BkPzBOVe.js → TopologyGraph-DjrSwcZ7.js} +1 -1
- package/dist/client/assets/{TopologyGraph-DtdKZsQa.js → TopologyGraph-tT2ioy9i.js} +1 -1
- package/dist/client/assets/{highlighted-body-OFNGDK62-VbF6zstp.js → highlighted-body-OFNGDK62-BGqDg_CH.js} +1 -1
- package/dist/client/assets/{highlighted-body-OFNGDK62-wj1ZFptk.js → highlighted-body-OFNGDK62-C0BhuUrQ.js} +1 -1
- package/dist/client/assets/{index-CHBl9Xp9.js → index-B5vwNxrp.js} +5 -5
- package/dist/client/assets/{index-CRu7kmbh.js → index-BVMqbrTk.js} +1 -1
- package/dist/client/assets/{index-BVTuvWRf.js → index-Bu_BRhOD.js} +3 -3
- package/dist/client/assets/{index-BGL_u2Ur.js → index-CCg4gR3O.js} +1 -1
- package/dist/client/assets/{index-wLQz6ZAE.js → index-DEQVQjg0.js} +1 -1
- package/dist/client/assets/{index-Dv5_bsa-.js → index-DJ2ScbA0.js} +1 -1
- package/dist/client/assets/{index-B2LppgvO.js → index-DMT5csia.js} +2 -2
- package/dist/client/assets/{index-DK5Wb-8-.js → index-DOPU0lrN.js} +3 -3
- package/dist/client/assets/{index-DvBLhlqB.js → index-DbM6pHiq.js} +5 -5
- package/dist/client/assets/{index-Bm_WP_Ps.js → index-DdYKR8rh.js} +2 -2
- package/dist/client/assets/{index-Ca1oUJjn.js → index-Dh7cfXXe.js} +1 -1
- package/dist/client/assets/{index-Di8NW-Up.js → index-JvZmJ892.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/index.js +70 -17
- package/dist/server/index.js.map +3 -3
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var xt=Object.defineProperty;var wt=(e,n,i)=>n in e?xt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var N=(e,n,i)=>wt(e,typeof n!="symbol"?n+"":n,i);import{ce as bt,j as v,r as ee}from"./index-
|
|
1
|
+
var xt=Object.defineProperty;var wt=(e,n,i)=>n in e?xt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var N=(e,n,i)=>wt(e,typeof n!="symbol"?n+"":n,i);import{ce as bt,j as v,r as ee}from"./index-B5vwNxrp.js";var on={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a6 as w,j as e,a7 as b,a8 as v,a9 as S,r as x,aa as O,a2 as A,d as k,ab as z,ac as d,ad as L,u as
|
|
1
|
+
import{a6 as w,j as e,a7 as b,a8 as v,a9 as S,r as x,aa as O,a2 as A,d as k,ab as z,ac as d,ad as L,u as c,ae as E,af as T,ag as _,ah as P,ai as R,aj as D,ak as M,al as I}from"./index-DbM6pHiq.js";import{am as oe}from"./index-DbM6pHiq.js";import{R as B}from"./RightPanelHeader-XFaPYtCt.js";/**
|
|
2
2
|
* @license lucide-react v1.8.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const U=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],N=w("braces",U),F={url:v,markdown:b,json:N},H={url:"Web Page",markdown:"Document",json:"JSON Data"};function g({title:s,contentType:t}){const n=t?F[t]:S,o=s??(t?H[t]:"Canvas");return e.jsxs("div",{className:"border-b",children:[e.jsx(B,{}),t&&e.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-1.5",children:[e.jsx(n,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"text-muted-foreground truncate text-xs font-medium",children:o})]})]})}const J=["javascript:","data:","file:","blob:"],W=new Set(["allow-scripts","allow-same-origin","allow-popups","allow-forms","allow-downloads","allow-modals"]),Y="allow-scripts allow-same-origin allow-popups allow-forms";function $(s){return s.split(" ").filter(t=>W.has(t)).join(" ")}function K(s){try{const t=new URL(s);return!J.includes(t.protocol)}catch{return!1}}function X({content:s}){if(!x.useMemo(()=>K(s.url),[s.url]))return e.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:e.jsx("p",{children:"This URL cannot be displayed for security reasons."})});const n=s.sandbox?$(s.sandbox):Y;return e.jsx("iframe",{src:s.url,sandbox:n,className:"h-full w-full border-0",title:s.title??"Canvas content"})}function Q({content:s}){return e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none
|
|
6
|
+
*/const U=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],N=w("braces",U),F={url:v,markdown:b,json:N},H={url:"Web Page",markdown:"Document",json:"JSON Data"};function g({title:s,contentType:t}){const n=t?F[t]:S,o=s??(t?H[t]:"Canvas");return e.jsxs("div",{className:"border-b",children:[e.jsx(B,{}),t&&e.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-1.5",children:[e.jsx(n,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"text-muted-foreground truncate text-xs font-medium",children:o})]})]})}const J=["javascript:","data:","file:","blob:"],W=new Set(["allow-scripts","allow-same-origin","allow-popups","allow-forms","allow-downloads","allow-modals"]),Y="allow-scripts allow-same-origin allow-popups allow-forms";function $(s){return s.split(" ").filter(t=>W.has(t)).join(" ")}function K(s){try{const t=new URL(s);return!J.includes(t.protocol)}catch{return!1}}function X({content:s}){if(!x.useMemo(()=>K(s.url),[s.url]))return e.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:e.jsx("p",{children:"This URL cannot be displayed for security reasons."})});const n=s.sandbox?$(s.sandbox):Y;return e.jsx("iframe",{src:s.url,sandbox:n,className:"h-full w-full border-0",title:s.title??"Canvas content"})}function Q({content:s}){return e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:e.jsx(O,{shikiTheme:["github-light","github-dark"],children:s.content})})}function V({content:s}){return e.jsx("div",{className:"p-4 font-mono text-sm",children:e.jsx(C,{value:s.data,depth:0})})}const q=20;function C({value:s,depth:t,keyName:n}){const[o,l]=x.useState(t>2),r=x.useCallback(()=>l(i=>!i),[]);if(t>=q)return e.jsx(u,{keyName:n,value:"[max depth]",className:"text-muted-foreground"});if(s===null)return e.jsx(u,{keyName:n,value:"null",className:"text-muted-foreground"});if(typeof s=="boolean")return e.jsx(u,{keyName:n,value:String(s),className:"text-blue-500"});if(typeof s=="number")return e.jsx(u,{keyName:n,value:String(s),className:"text-green-500"});if(typeof s=="string")return e.jsx(u,{keyName:n,value:`"${s}"`,className:"text-amber-500"});const a=Array.isArray(s),m=a?s.map((i,f)=>[String(f),i]):Object.entries(s),y=a?"[":"{",j=a?"]":"}";return e.jsxs("div",{style:{paddingLeft:t>0?16:0},children:[e.jsxs("button",{type:"button",className:"hover:bg-muted -ml-0.5 inline-flex items-center gap-0.5 rounded px-0.5",onClick:r,children:[e.jsx(A,{className:k("size-3 transition-transform",!o&&"rotate-90")}),n!=null&&e.jsxs("span",{className:"text-foreground",children:[n,": "]}),e.jsxs("span",{className:"text-muted-foreground",children:[y,o&&` ... ${m.length} items `,o&&j]})]}),!o&&e.jsxs(e.Fragment,{children:[m.map(([i,f])=>e.jsx(C,{keyName:a?void 0:i,value:f,depth:t+1},i)),e.jsx("div",{className:"text-muted-foreground",children:j})]})]})}function u({keyName:s,value:t,className:n}){return e.jsxs("div",{style:{paddingLeft:16},children:[s!=null&&e.jsxs("span",{className:"text-foreground",children:[s,": "]}),e.jsx("span",{className:n,children:t})]})}const G=[{icon:b,label:"Markdown",description:"Render a document",action:()=>({type:"markdown",content:`# Untitled
|
|
7
7
|
|
|
8
|
-
Start writing...`,title:"Document"})},{icon:N,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON Data"})},{icon:v,label:"Web Page",description:"Embed a URL",action:()=>({type:"url",url:"https://dorkos.ai",title:"Web Page"})}];function
|
|
8
|
+
Start writing...`,title:"Document"})},{icon:N,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON Data"})},{icon:v,label:"Web Page",description:"Embed a URL",action:()=>({type:"url",url:"https://dorkos.ai",title:"Web Page"})}];function h(s,t,n,o){return s.split("").reduce((r,a)=>r+a.charCodeAt(0),0)*(t+1)*7%(o-n)+n}function Z({onAction:s}){const t=z(),n=x.useId(),o=x.useMemo(()=>Array.from({length:6},(l,r)=>({x:h(n,r*3,10,90),y:h(n,r*3+1,10,80),size:h(n,r*3+2,24,56),delay:r*.4})),[n]);return e.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center overflow-hidden px-6",children:[!t&&o.map((l,r)=>e.jsx(d.div,{className:"border-border/40 absolute rounded-lg border",style:{left:`${l.x}%`,top:`${l.y}%`,width:l.size,height:l.size},initial:{opacity:0,scale:.6,rotate:-10},animate:{opacity:[0,.15,.08,.15],scale:[.6,1,.9,1],rotate:[-10,0,5,0]},transition:{duration:8,delay:l.delay,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}},r)),e.jsxs(d.div,{className:"relative z-10 flex max-w-sm flex-col items-center gap-6 text-center",initial:t?!1:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},children:[e.jsx(d.div,{className:"bg-muted/50 text-muted-foreground flex size-14 items-center justify-center rounded-2xl",initial:t?!1:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.1},children:e.jsx(L,{className:"size-7"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:"A blank canvas"}),e.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["Your agent can render documents, data, and web pages here.",e.jsx("br",{}),"Or pick a starting point below."]})]}),e.jsx(d.div,{className:"mt-2 flex w-full flex-col gap-2",initial:"hidden",animate:"visible",variants:t?{}:{visible:{transition:{staggerChildren:.08,delayChildren:.25}}},children:G.map(({icon:l,label:r,description:a,action:m})=>e.jsxs(d.button,{variants:t?{}:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25},className:"border-border hover:bg-accent/50 flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors",onClick:()=>s(m()),children:[e.jsx(l,{className:"text-muted-foreground size-4 shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium",children:r}),e.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:a})]})]},r))})]})]})}function p({canvasContent:s,onSetContent:t}){return s?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:s.title,contentType:s.type}),e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[s.type==="url"&&e.jsx(X,{content:s}),s.type==="markdown"&&e.jsx(Q,{content:s}),s.type==="json"&&e.jsx(V,{content:s})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{}),e.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:e.jsx(Z,{onAction:t})})]})}function te(){const s=c(n=>n.canvasContent),t=c(n=>n.setCanvasContent);return e.jsx("div",{"data-slot":"canvas",className:"flex h-full flex-col overflow-hidden",children:e.jsx(p,{canvasContent:s,onSetContent:t})})}function ne(){const s=c(a=>a.canvasOpen),t=c(a=>a.canvasContent),n=c(a=>a.setCanvasOpen),o=c(a=>a.setCanvasContent),l=E();if(!s)return null;const r=()=>n(!1);return l?e.jsx(T,{open:!0,onOpenChange:a=>!a&&r(),children:e.jsxs(_,{side:"right",showCloseButton:!1,className:"bg-sidebar text-sidebar-foreground flex w-full flex-col gap-0 p-0 sm:max-w-full",children:[e.jsxs(P,{className:"sr-only",children:[e.jsx(R,{children:"Canvas"}),e.jsx(D,{children:"Agent-driven content pane."})]}),e.jsx(p,{canvasContent:t,onSetContent:o})]})}):e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"group relative flex w-2 items-center justify-center",children:e.jsx("div",{className:"bg-border group-hover:bg-ring h-full w-px transition-colors"})}),e.jsx(I,{id:"agent-canvas",order:2,defaultSize:50,minSize:20,collapsible:!0,onCollapse:r,children:e.jsx("div",{className:"bg-sidebar text-sidebar-foreground flex h-full flex-col overflow-hidden rounded-lg border",children:e.jsx(p,{canvasContent:t,onSetContent:o})})})]})}export{ne as AgentCanvas,te as CanvasContent,oe as useCanvasPersistence};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a6 as Ae,bd as Le,be as Ue,bf as Fe,r as l,ab as $e,bg as Ge,bh as Ke,bi as qe,bj as ke,bk as Se,bl as Ye,bm as We,bn as Qe,bo as Ze,bp as Je,bq as Xe,br as et,bs as tt,bt as nt,bu as st,bv as K,bw as at,bx as it,by as ot,bz as rt,bA as lt,i as te,k as ne,an as se,bB as Te,bC as ct,bD as U,f as q,bE as ut,bF as dt,bG as mt,j as e,bH as ht,bI as ft,B as I,bJ as pt,d as R,bK as gt,bL as we,bM as Ee,bN as Me,bO as de,bP as xt,bQ as bt,bR as yt,bS as Y,bT as W,Z as De,bU as vt,t as G,bV as jt,bW as Nt,ar as Re,bX as Ct,bY as At,ac as j,bZ as z,b_ as kt,b$ as St,c0 as Tt,c1 as wt,c2 as Et,X as Pe,T as me,c as he,e as fe,c3 as Mt,c4 as Dt,c5 as Rt,c6 as Pt,c7 as It,u as pe,c8 as Ot,c9 as zt,ca as Ht,cb as Vt,cc as H}from"./index-
|
|
1
|
+
import{a6 as Ae,bd as Le,be as Ue,bf as Fe,r as l,ab as $e,bg as Ge,bh as Ke,bi as qe,bj as ke,bk as Se,bl as Ye,bm as We,bn as Qe,bo as Ze,bp as Je,bq as Xe,br as et,bs as tt,bt as nt,bu as st,bv as K,bw as at,bx as it,by as ot,bz as rt,bA as lt,i as te,k as ne,an as se,bB as Te,bC as ct,bD as U,f as q,bE as ut,bF as dt,bG as mt,j as e,bH as ht,bI as ft,B as I,bJ as pt,d as R,bK as gt,bL as we,bM as Ee,bN as Me,bO as de,bP as xt,bQ as bt,bR as yt,bS as Y,bT as W,Z as De,bU as vt,t as G,bV as jt,bW as Nt,ar as Re,bX as Ct,bY as At,ac as j,bZ as z,b_ as kt,b$ as St,c0 as Tt,c1 as wt,c2 as Et,X as Pe,T as me,c as he,e as fe,c3 as Mt,c4 as Dt,c5 as Rt,c6 as Pt,c7 as It,u as pe,c8 as Ot,c9 as zt,ca as Ht,cb as Vt,cc as H}from"./index-DbM6pHiq.js";import{cd as qn}from"./index-DbM6pHiq.js";import{R as Ie}from"./RightPanelHeader-XFaPYtCt.js";/**
|
|
2
2
|
* @license lucide-react v1.8.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as b,j as e,p as f,C as v,P as N,q as E,d as g,s as w,v as y,w as k,x as S,y as C,z,B as R,D as T,t as m}from"./index-
|
|
1
|
+
import{r as b,j as e,p as f,C as v,P as N,q as E,d as g,s as w,v as y,w as k,x as S,y as C,z,B as R,D as T,t as m}from"./index-DbM6pHiq.js";import{E as L,F as M,G as _,H as B}from"./index-DbM6pHiq.js";const P=new Set(["disabled","discovered","incompatible","invalid"]);function D({extension:o,onToggle:u,isToggling:c}){const{manifest:s,status:t,scope:h,error:n}=o,[r,a]=b.useState(!1),x=!P.has(t),d=t==="incompatible",l=t==="invalid",i=t==="compile_error"||t==="activate_error",j=!d&&!l;return e.jsx("div",{"data-slot":"extension-card","data-testid":`extension-card-${o.id}`,className:g("bg-card rounded-xl border p-4",i&&"border-amber-500/50",(d||l)&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i&&e.jsx(f,{className:"size-4 shrink-0 text-amber-500","aria-hidden":"true"}),(d||l)&&!i&&e.jsx(v,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!i&&!d&&!l&&e.jsx(N,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"font-medium",children:s.name}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["v",s.version]})]}),s.description&&e.jsx("p",{className:"text-muted-foreground text-sm",children:s.description}),d&&s.minHostVersion&&e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Requires DorkOS >= ",s.minHostVersion]}),i&&n&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-sm text-amber-600 dark:text-amber-400",children:[t==="compile_error"?"Compilation error: ":"Activation failed: ",n.message]}),n.details&&e.jsxs("button",{type:"button",onClick:()=>a(p=>!p),className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","aria-expanded":r,children:[e.jsx(E,{className:g("size-3 transition-transform",r&&"rotate-180")}),r?"Hide details":"Show details"]}),r&&n.details&&e.jsx("pre",{className:"bg-muted mt-1 max-h-32 overflow-auto rounded-md p-2 text-xs",children:n.details})]}),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs",children:[e.jsx(w,{variant:"outline",className:"text-xs",children:h}),s.author&&e.jsx("span",{children:s.author})]})]}),e.jsx("div",{className:"pt-0.5",children:e.jsx(y,{checked:x,onCheckedChange:p=>u(o.id,p),disabled:!j||c,"aria-label":`${x?"Disable":"Enable"} ${s.name}`})})]})})}function $(){const{data:o=[],isLoading:u}=k(),c=S(),s=C(),t=z(),h=new Set([...c.variables?[c.variables]:[],...s.variables?[s.variables]:[]]);async function n(a,x){(x?c:s).mutate(a,{onSuccess:()=>{m.info("Extension changed — reload the page to apply",{action:{label:"Reload now",onClick:()=>location.reload()}})},onError:l=>{const i=x?"enable":"disable";m.error(`Failed to ${i} extension: ${l.message}`)}})}function r(){t.mutate(void 0,{onSuccess:a=>{m.success(`Reloaded ${a.length} extension(s)`)},onError:()=>{m.error("Failed to reload extensions")}})}return u?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading extensions…"}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Extensions add new UI and capabilities to DorkOS. Place them in"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"~/.dork/extensions/"})," or"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:".dork/extensions/"})," in your project."]}),o.length===0?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"no-extensions",children:e.jsx("p",{children:"No extensions installed."})}):e.jsx("div",{className:"space-y-3",children:o.map(a=>e.jsx(D,{extension:a,onToggle:n,isToggling:h.has(a.id)},a.id))}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(R,{variant:"outline",size:"sm",onClick:r,disabled:t.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(T,{className:g("mr-2 size-4",t.isPending&&"animate-spin")}),"Reload Extensions"]})})]})}export{L as ExtensionLoader,M as ExtensionProvider,$ as ExtensionsSettingsTab,_ as createExtensionAPI,B as useExtensions};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var xt=Object.defineProperty;var wt=(e,n,i)=>n in e?xt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var N=(e,n,i)=>wt(e,typeof n!="symbol"?n+"":n,i);import{ce as bt,j as v,r as ee}from"./index-
|
|
1
|
+
var xt=Object.defineProperty;var wt=(e,n,i)=>n in e?xt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var N=(e,n,i)=>wt(e,typeof n!="symbol"?n+"":n,i);import{ce as bt,j as v,r as ee}from"./index-DbM6pHiq.js";var on={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FloatingTanStackRouterDevtools-CMO0N95A-
|
|
2
|
-
var Fe=e=>{throw TypeError(e)};var Ve=(e,t,n)=>t.has(e)||Fe("Cannot "+n);var y=(e,t,n)=>(Ve(e,t,"read from private field"),n?n.call(e):t.get(e)),p=(e,t,n)=>t.has(e)?Fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),m=(e,t,n,s)=>(Ve(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n);import{a4 as Ye,a5 as ze,a as Qe,r as C,j as le}from"./index-DvBLhlqB.js";var d={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Be(this.context.count)},getNextContextId(){return Be(this.context.count++)}};function Be(e){const t=String(e),n=t.length-1;return d.context.id+(n?String.fromCharCode(96+n):"")+t}function ie(e){d.context=e}var dt=(e,t)=>e===t,be=Symbol("solid-proxy"),Je=typeof Proxy=="function",ht=Symbol("solid-track"),Se={equals:dt},Ze=rt,L=1,xe=2,et={owned:null,cleanups:null,context:null,owner:null},Re={},w=null,Ne=null,gt=null,v=null,E=null,$=null,Pe=0;function ve(e,t){const n=v,s=w,r=e.length===0,l=t===void 0?s:t,i=r?et:{owned:null,cleanups:null,context:l?l.context:null,owner:l},o=r?e:()=>e(()=>P(()=>ce(i)));w=i,v=null;try{return j(o,!0)}finally{v=n,w=s}}function D(e,t){t=t?Object.assign({},Se,t):Se;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},s=r=>(typeof r=="function"&&(r=r(n.value)),ot(n,r));return[st.bind(n),s]}function yt(e,t,n){const s=Ae(e,t,!0,L);se(s)}function V(e,t,n){const s=Ae(e,t,!1,L);se(s)}function yn(e,t,n){Ze=Ot;const s=Ae(e,t,!1,L);(!n||!n.render)&&(s.user=!0),$?$.push(s):se(s)}function x(e,t,n){n=n?Object.assign({},Se,n):Se;const s=Ae(e,t,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,se(s),st.bind(s)}function mt(e){return e&&typeof e=="object"&&"then"in e}function wt(e,t,n){let s,r,l;s=!0,r=e,l={};let i=null,o=Re,a=null,f=!1,u="initialValue"in l,c=typeof s=="function"&&x(s);const h=new Set,[g,R]=(l.storage||D)(l.initialValue),[M,U]=D(void 0),[oe,N]=D(void 0,{equals:!1}),[T,k]=D(u?"ready":"unresolved");d.context&&(a=d.getNextContextId(),l.ssrLoadFrom==="initial"?o=l.initialValue:d.load&&d.has(a)&&(o=d.load(a)));function A(S,b,I,O){return i===S&&(i=null,O!==void 0&&(u=!0),(S===o||b===o)&&l.onHydrated&&queueMicrotask(()=>l.onHydrated(O,{value:b})),o=Re,Te(b,I)),b}function Te(S,b){j(()=>{b===void 0&&R(()=>S),k(b!==void 0?"errored":u?"ready":"unresolved"),U(b);for(const I of h.keys())I.decrement();h.clear()},!1)}function Ce(){const S=St,b=g(),I=M();if(I!==void 0&&!i)throw I;return v&&v.user,b}function De(S=!0){if(S!==!1&&f)return;f=!1;const b=c?c():s;if(b==null||b===!1){A(i,P(g));return}let I;const O=o!==Re?o:P(()=>{try{return r(b,{value:g(),refetching:S})}catch(re){I=re}});if(I!==void 0){A(i,void 0,pe(I),b);return}else if(!mt(O))return A(i,O,void 0,b),O;return i=O,"v"in O?(O.s===1?A(i,O.v,void 0,b):A(i,void 0,pe(O.v),b),O):(f=!0,queueMicrotask(()=>f=!1),j(()=>{k(u?"refreshing":"pending"),N()},!1),O.then(re=>A(O,re,void 0,b),re=>A(O,void 0,pe(re),b)))}Object.defineProperties(Ce,{state:{get:()=>T()},error:{get:()=>M()},loading:{get(){const S=T();return S==="pending"||S==="refreshing"}},latest:{get(){if(!u)return Ce();const S=M();if(S&&!i)throw S;return g()}}});let _e=w;return c?yt(()=>(_e=w,De(!1))):De(!1),[Ce,{refetch:S=>pt(_e,()=>De(S)),mutate:R}]}function P(e){if(v===null)return e();const t=v;v=null;try{return e()}finally{v=t}}function vt(e){return w===null||(w.cleanups===null?w.cleanups=[e]:w.cleanups.push(e)),e}function pt(e,t){const n=w,s=v;w=e,v=null;try{return j(t,!0)}catch(r){je(r)}finally{w=n,v=s}}var[mn,wn]=D(!1);function tt(e,t){const n=Symbol("context");return{id:n,Provider:Pt(n),defaultValue:e}}function bt(e){let t;return w&&w.context&&(t=w.context[e.id])!==void 0?t:e.defaultValue}function nt(e){const t=x(e),n=x(()=>Me(t()));return n.toArray=()=>{const s=n();return Array.isArray(s)?s:s!=null?[s]:[]},n}var St;function st(){if(this.sources&&this.state)if(this.state===L)se(this);else{const e=E;E=null,j(()=>Oe(this),!1),E=e}if(v){const e=this.observers?this.observers.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(e)):(v.sources=[this],v.sourceSlots=[e]),this.observers?(this.observers.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}return this.value}function ot(e,t,n){let s=e.value;return(!e.comparator||!e.comparator(s,t))&&(e.value=t,e.observers&&e.observers.length&&j(()=>{for(let r=0;r<e.observers.length;r+=1){const l=e.observers[r],i=Ne&&Ne.running;i&&Ne.disposed.has(l),(i?!l.tState:!l.state)&&(l.pure?E.push(l):$.push(l),l.observers&&it(l)),i||(l.state=L)}if(E.length>1e6)throw E=[],new Error},!1)),t}function se(e){if(!e.fn)return;ce(e);const t=Pe;xt(e,e.value,t)}function xt(e,t,n){let s;const r=w,l=v;v=w=e;try{s=e.fn(t)}catch(i){return e.pure&&(e.state=L,e.owned&&e.owned.forEach(ce),e.owned=null),e.updatedAt=n+1,je(i)}finally{v=l,w=r}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ot(e,s):e.value=s,e.updatedAt=n)}function Ae(e,t,n,s=L,r){const l={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:w,context:w?w.context:null,pure:n};return w===null||w!==et&&(w.owned?w.owned.push(l):w.owned=[l]),l}function Ee(e){if(e.state===0)return;if(e.state===xe)return Oe(e);if(e.suspense&&P(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Pe);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===L)se(e);else if(e.state===xe){const s=E;E=null,j(()=>Oe(e,t[0]),!1),E=s}}function j(e,t){if(E)return e();let n=!1;t||(E=[]),$?n=!0:$=[],Pe++;try{const s=e();return Et(n),s}catch(s){n||($=null),E=null,je(s)}}function Et(e){if(E&&(rt(E),E=null),e)return;const t=$;$=null,t.length&&j(()=>Ze(t),!1)}function rt(e){for(let t=0;t<e.length;t++)Ee(e[t])}function Ot(e){let t,n=0;for(t=0;t<e.length;t++){const s=e[t];s.user?e[n++]=s:Ee(s)}if(d.context){if(d.count){d.effects||(d.effects=[]),d.effects.push(...e.slice(0,n));return}ie()}for(d.effects&&(d.done||!d.count)&&(e=[...d.effects,...e],n+=d.effects.length,delete d.effects),t=0;t<n;t++)Ee(e[t])}function Oe(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const s=e.sources[n];if(s.sources){const r=s.state;r===L?s!==t&&(!s.updatedAt||s.updatedAt<Pe)&&Ee(s):r===xe&&Oe(s,t)}}}function it(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=xe,n.pure?E.push(n):$.push(n),n.observers&&it(n))}}function ce(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),r=n.observers;if(r&&r.length){const l=r.pop(),i=n.observerSlots.pop();s<r.length&&(l.sourceSlots[i]=s,r[s]=l,n.observerSlots[s]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)ce(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ce(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function pe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function je(e,t=w){throw pe(e)}function Me(e){if(typeof e=="function"&&!e.length)return Me(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=Me(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Pt(e,t){return function(s){let r;return V(()=>r=P(()=>(w.context={...w.context,[e]:s.value},nt(()=>s.children))),void 0),r}}var At=Symbol("fallback");function Ue(e){for(let t=0;t<e.length;t++)e[t]()}function Tt(e,t,n={}){let s=[],r=[],l=[],i=0,o=t.length>1?[]:null;return vt(()=>Ue(l)),()=>{let a=e()||[],f=a.length,u,c;return a[ht],P(()=>{let g,R,M,U,oe,N,T,k,A;if(f===0)i!==0&&(Ue(l),l=[],s=[],r=[],i=0,o&&(o=[])),n.fallback&&(s=[At],r[0]=ve(Te=>(l[0]=Te,n.fallback())),i=1);else if(i===0){for(r=new Array(f),c=0;c<f;c++)s[c]=a[c],r[c]=ve(h);i=f}else{for(M=new Array(f),U=new Array(f),o&&(oe=new Array(f)),N=0,T=Math.min(i,f);N<T&&s[N]===a[N];N++);for(T=i-1,k=f-1;T>=N&&k>=N&&s[T]===a[k];T--,k--)M[k]=r[T],U[k]=l[T],o&&(oe[k]=o[T]);for(g=new Map,R=new Array(k+1),c=k;c>=N;c--)A=a[c],u=g.get(A),R[c]=u===void 0?-1:u,g.set(A,c);for(u=N;u<=T;u++)A=s[u],c=g.get(A),c!==void 0&&c!==-1?(M[c]=r[u],U[c]=l[u],o&&(oe[c]=o[u]),c=R[c],g.set(A,c)):l[u]();for(c=N;c<f;c++)c in M?(r[c]=M[c],l[c]=U[c],o&&(o[c]=oe[c],o[c](c))):r[c]=ve(h);r=r.slice(0,i=f),s=a.slice(0)}return r});function h(g){if(l[c]=g,o){const[R,M]=D(c);return o[c]=M,t(a[c],R)}return t(a[c])}}}function ae(e,t){return P(()=>e(t||{}))}function we(){return!0}var Ie={get(e,t,n){return t===be?n:e.get(t)},has(e,t){return t===be?!0:e.has(t)},set:we,deleteProperty:we,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:we,deleteProperty:we}},ownKeys(e){return e.keys()}};function ke(e){return(e=typeof e=="function"?e():e)?e:{}}function Ct(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function vn(...e){let t=!1;for(let i=0;i<e.length;i++){const o=e[i];t=t||!!o&&be in o,e[i]=typeof o=="function"?(t=!0,x(o)):o}if(Je&&t)return new Proxy({get(i){for(let o=e.length-1;o>=0;o--){const a=ke(e[o])[i];if(a!==void 0)return a}},has(i){for(let o=e.length-1;o>=0;o--)if(i in ke(e[o]))return!0;return!1},keys(){const i=[];for(let o=0;o<e.length;o++)i.push(...Object.keys(ke(e[o])));return[...new Set(i)]}},Ie);const n={},s=Object.create(null);for(let i=e.length-1;i>=0;i--){const o=e[i];if(!o)continue;const a=Object.getOwnPropertyNames(o);for(let f=a.length-1;f>=0;f--){const u=a[f];if(u==="__proto__"||u==="constructor")continue;const c=Object.getOwnPropertyDescriptor(o,u);if(!s[u])s[u]=c.get?{enumerable:!0,configurable:!0,get:Ct.bind(n[u]=[c.get.bind(o)])}:c.value!==void 0?c:void 0;else{const h=n[u];h&&(c.get?h.push(c.get.bind(o)):c.value!==void 0&&h.push(()=>c.value))}}}const r={},l=Object.keys(s);for(let i=l.length-1;i>=0;i--){const o=l[i],a=s[o];a&&a.get?Object.defineProperty(r,o,a):r[o]=a?a.value:void 0}return r}function Dt(e,...t){const n=t.length;if(Je&&be in e){const r=n>1?t.flat():t[0],l=t.map(i=>new Proxy({get(o){return i.includes(o)?e[o]:void 0},has(o){return i.includes(o)&&o in e},keys(){return i.filter(o=>o in e)}},Ie));return l.push(new Proxy({get(i){return r.includes(i)?void 0:e[i]},has(i){return r.includes(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!r.includes(i))}},Ie)),l}const s=[];for(let r=0;r<=n;r++)s[r]={};for(const r of Object.getOwnPropertyNames(e)){let l=n;for(let o=0;o<t.length;o++)if(t[o].includes(r)){l=o;break}const i=Object.getOwnPropertyDescriptor(e,r);!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable?s[l][r]=i.value:Object.defineProperty(s[l],r,i)}return s}function lt(e){let t,n;const s=r=>{const l=d.context;if(l){const[o,a]=D();d.count||(d.count=0),d.count++,(n||(n=e())).then(f=>{!d.done&&ie(l),d.count--,a(()=>f.default),ie()}),t=o}else if(!t){const[o]=wt(()=>(n||(n=e())).then(a=>a.default));t=o}let i;return x(()=>(i=t())?P(()=>{if(!l||d.done)return i(r);const o=d.context;ie(l);const a=i(r);return ie(o),a}):"")};return s.preload=()=>n||((n=e()).then(r=>t=()=>r.default),n),s}var Rt=0;function pn(){return d.context?d.getNextContextId():`cl-${Rt++}`}var at=e=>`Stale read from <${e}>.`;function bn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return x(Tt(()=>e.each,e.children,t||void 0))}function Sn(e){const t=e.keyed,n=x(()=>e.when,void 0,void 0),s=t?n:x(n,void 0,{equals:(r,l)=>!r==!l});return x(()=>{const r=s();if(r){const l=e.children;return typeof l=="function"&&l.length>0?P(()=>l(t?r:()=>{if(!P(s))throw at("Show");return n()})):l}return e.fallback},void 0,void 0)}function xn(e){const t=nt(()=>e.children),n=x(()=>{const s=t(),r=Array.isArray(s)?s:[s];let l=()=>{};for(let i=0;i<r.length;i++){const o=i,a=r[i],f=l,u=x(()=>f()?void 0:a.when,void 0,void 0),c=a.keyed?u:x(u,void 0,{equals:(h,g)=>!h==!g});l=()=>f()||(c()?[o,u,a]:void 0)}return l});return x(()=>{const s=n()();if(!s)return e.fallback;const[r,l,i]=s,o=i.children;return typeof o=="function"&&o.length>0?P(()=>o(i.keyed?l():()=>{var a;if(((a=P(n)())==null?void 0:a[0])!==r)throw at("Match");return l()})):o},void 0,void 0)}function En(e){return e}var Nt=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable","allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"]),kt=new Set(["innerHTML","textContent","innerText","children"]),Mt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),It=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function $t(e,t){const n=It[e];return typeof n=="object"?n[t]?n.$:void 0:n}var Lt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),jt=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),_t={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},On=e=>x(()=>e());function Ft(e,t,n){let s=n.length,r=t.length,l=s,i=0,o=0,a=t[r-1].nextSibling,f=null;for(;i<r||o<l;){if(t[i]===n[o]){i++,o++;continue}for(;t[r-1]===n[l-1];)r--,l--;if(r===i){const u=l<s?o?n[o-1].nextSibling:n[l-o]:a;for(;o<l;)e.insertBefore(n[o++],u)}else if(l===o)for(;i<r;)(!f||!f.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[l-1]&&n[o]===t[r-1]){const u=t[--r].nextSibling;e.insertBefore(n[o++],t[i++].nextSibling),e.insertBefore(n[--l],u),t[r]=n[l]}else{if(!f){f=new Map;let c=o;for(;c<l;)f.set(n[c],c++)}const u=f.get(t[i]);if(u!=null)if(o<u&&u<l){let c=i,h=1,g;for(;++c<r&&c<l&&!((g=f.get(t[c]))==null||g!==u+h);)h++;if(h>u-o){const R=t[i];for(;o<u;)e.insertBefore(n[o++],R)}else e.replaceChild(n[o++],t[i++])}else i++;else t[i++].remove()}}}var Ge="_$DX_DELEGATE";function ct(e,t,n,s={}){let r;return ve(l=>{r=l,t===document?e():Yt(t,e(),t.firstChild?null:void 0,n)},s.owner),()=>{r(),t.textContent=""}}function Pn(e,t,n,s){let r;const l=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},i=()=>(r||(r=l())).cloneNode(!0);return i.cloneNode=i,i}function Vt(e,t=window.document){const n=t[Ge]||(t[Ge]=new Set);for(let s=0,r=e.length;s<r;s++){const l=e[s];n.has(l)||(n.add(l),t.addEventListener(l,Zt))}}function $e(e,t,n){B(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Bt(e,t,n,s){B(e)||(s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s))}function Ut(e,t,n){B(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Gt(e,t){B(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ht(e,t,n,s){if(s)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=l=>r.call(e,n[1],l))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Kt(e,t,n={}){const s=Object.keys(t||{}),r=Object.keys(n);let l,i;for(l=0,i=r.length;l<i;l++){const o=r[l];!o||o==="undefined"||t[o]||(He(e,o,!1),delete n[o])}for(l=0,i=s.length;l<i;l++){const o=s[l],a=!!t[o];!o||o==="undefined"||n[o]===a||!a||(He(e,o,!0),n[o]=a)}return n}function qt(e,t,n){if(!t)return n?$e(e,"style"):t;const s=e.style;if(typeof t=="string")return s.cssText=t;typeof n=="string"&&(s.cssText=n=void 0),n||(n={}),t||(t={});let r,l;for(l in n)t[l]??s.removeProperty(l),delete n[l];for(l in t)r=t[l],r!==n[l]&&(s.setProperty(l,r),n[l]=r);return n}function Xt(e,t={},n,s){const r={};return s||V(()=>r.children=ue(e,t.children,r.children)),V(()=>typeof t.ref=="function"&&Wt(t.ref,e)),V(()=>zt(e,t,n,!0,r,!0)),r}function Wt(e,t,n){return P(()=>e(t,n))}function Yt(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return ue(e,t,s,n);V(r=>ue(e,t(),r,n),s)}function zt(e,t,n,s,r={},l=!1){t||(t={});for(const i in r)if(!(i in t)){if(i==="children")continue;r[i]=Ke(e,i,null,r[i],n,l,t)}for(const i in t){if(i==="children")continue;const o=t[i];r[i]=Ke(e,i,o,r[i],n,l,t)}}function Qt(e){let t,n;return!B()||!(t=d.registry.get(n=en()))?e():(d.completed&&d.completed.add(t),d.registry.delete(n),t)}function B(e){return!!d.context&&!d.done&&(!e||e.isConnected)}function Jt(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function He(e,t,n){const s=t.trim().split(/\s+/);for(let r=0,l=s.length;r<l;r++)e.classList.toggle(s[r],n)}function Ke(e,t,n,s,r,l,i){let o,a,f,u,c;if(t==="style")return qt(e,n,s);if(t==="classList")return Kt(e,n,s);if(n===s)return s;if(t==="ref")l||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);s&&e.removeEventListener(h,s,typeof s!="function"&&s),n&&e.addEventListener(h,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);s&&e.removeEventListener(h,s,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),g=Lt.has(h);if(!g&&s){const R=Array.isArray(s)?s[0]:s;e.removeEventListener(h,R)}(g||n)&&(Ht(e,h,n,g),g&&Vt([h]))}else if(t.slice(0,5)==="attr:")$e(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Ut(e,t.slice(5),n);else if((c=t.slice(0,5)==="prop:")||(f=kt.has(t))||!r&&((u=$t(t,e.tagName))||(a=Nt.has(t)))||(o=e.nodeName.includes("-")||"is"in i)){if(c)t=t.slice(5),a=!0;else if(B(e))return n;t==="class"||t==="className"?Gt(e,n):o&&!a&&!f?e[Jt(t)]=n:e[u||t]=n}else{const h=r&&t.indexOf(":")>-1&&_t[t.split(":")[0]];h?Bt(e,h,t,n):$e(e,Mt[t]||t,n)}return n}function Zt(e){if(d.registry&&d.events&&d.events.find(([a,f])=>f===e))return;let t=e.target;const n=`$$${e.type}`,s=e.target,r=e.currentTarget,l=a=>Object.defineProperty(e,"target",{configurable:!0,value:a}),i=()=>{const a=t[n];if(a&&!t.disabled){const f=t[`${n}Data`];if(f!==void 0?a.call(t,f,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&l(t.host),!0},o=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),d.registry&&!d.done&&(d.done=_$HY.done=!0),e.composedPath){const a=e.composedPath();l(a[0]);for(let f=0;f<a.length-2&&(t=a[f],!!i());f++){if(t._$host){t=t._$host,o();break}if(t.parentNode===r)break}}else o();l(s)}function ue(e,t,n,s,r){const l=B(e);if(l){!n&&(n=[...e.childNodes]);let a=[];for(let f=0;f<n.length;f++){const u=n[f];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():a.push(u)}n=a}for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(l||i==="number"&&(t=t.toString(),t===n))return n;if(o){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=G(e,n,s,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(l)return n;n=G(e,n,s)}else{if(i==="function")return V(()=>{let a=t();for(;typeof a=="function";)a=a();n=ue(e,a,n,s)}),()=>n;if(Array.isArray(t)){const a=[],f=n&&Array.isArray(n);if(Le(a,t,n,r))return V(()=>n=ue(e,a,n,s,!0)),()=>n;if(l){if(!a.length)return n;if(s===void 0)return n=[...e.childNodes];let u=a[0];if(u.parentNode!==e)return n;const c=[u];for(;(u=u.nextSibling)!==s;)c.push(u);return n=c}if(a.length===0){if(n=G(e,n,s),o)return n}else f?n.length===0?qe(e,a,s):Ft(e,n,a):(n&&G(e),qe(e,a));n=a}else if(t.nodeType){if(l&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=G(e,n,s,t);G(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Le(e,t,n,s){let r=!1;for(let l=0,i=t.length;l<i;l++){let o=t[l],a=n&&n[e.length],f;if(!(o==null||o===!0||o===!1))if((f=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))r=Le(e,o,a)||r;else if(f==="function")if(s){for(;typeof o=="function";)o=o();r=Le(e,Array.isArray(o)?o:[o],Array.isArray(a)?a:[a])||r}else e.push(o),r=!0;else{const u=String(o);a&&a.nodeType===3&&a.data===u?e.push(a):e.push(document.createTextNode(u))}}return r}function qe(e,t,n=null){for(let s=0,r=t.length;s<r;s++)e.insertBefore(t[s],n)}function G(e,t,n,s){if(n===void 0)return e.textContent="";const r=s||document.createTextNode("");if(t.length){let l=!1;for(let i=t.length-1;i>=0;i--){const o=t[i];if(r!==o){const a=o.parentNode===e;!l&&!i?a?e.replaceChild(r,o):e.insertBefore(r,n):a&&o.remove()}else l=!0}}else e.insertBefore(r,n);return[r]}function en(){return d.getNextContextId()}var tn="http://www.w3.org/2000/svg";function nn(e,t=!1,n=void 0){return t?document.createElementNS(tn,e):document.createElement(e,{is:n})}function sn(e,t){const n=x(e);return x(()=>{const s=n();switch(typeof s){case"function":return P(()=>s(t));case"string":const r=jt.has(s),l=d.context?Qt():nn(s,r,P(()=>t.is));return Xt(l,t,r),l}})}function An(e){const[,t]=Dt(e,["component"]);return sn(()=>e.component,t)}var ut=tt(void 0),ft=tt(void 0),Tn=()=>{const e=bt(ft);if(!e)throw new Error("useDevtoolsOnClose must be used within a TanStackRouterDevtools component");return e},H,K,q,X,W,fe,de,he,Y,_,z,ge,Xe,on=(Xe=class{constructor(e){p(this,H);p(this,K);p(this,q);p(this,X);p(this,W);p(this,fe);p(this,de);p(this,he);p(this,Y);p(this,_,!1);p(this,z);p(this,ge);m(this,H,D(e.router)),m(this,K,D(e.routerState)),m(this,q,e.position??"bottom-left"),m(this,X,e.initialIsOpen??!1),m(this,W,e.shadowDOMTarget),m(this,fe,e.panelProps),m(this,de,e.closeButtonProps),m(this,he,e.toggleButtonProps),m(this,Y,e.containerElement)}mount(e){if(y(this,_))throw new Error("Devtools is already mounted");const t=ct(()=>{const[n]=y(this,H),[s]=y(this,K),r=y(this,q),l=y(this,X),i=y(this,W),o=y(this,fe),a=y(this,de),f=y(this,he),u=y(this,Y);let c;return y(this,z)?c=y(this,z):(c=lt(()=>Ye(()=>import("./FloatingTanStackRouterDevtools-CMO0N95A-Deu-qTVi.js"),__vite__mapDeps([0,1,2,3]))),m(this,z,c)),ae(ut.Provider,{value:i,get children(){return ae(c,{position:r,initialIsOpen:l,router:n,routerState:s,shadowDOMTarget:i,panelProps:o,closeButtonProps:a,toggleButtonProps:f,containerElement:u})}})},e);m(this,_,!0),m(this,ge,t)}unmount(){var e;if(!y(this,_))throw new Error("Devtools is not mounted");(e=y(this,ge))==null||e.call(this),m(this,_,!1)}setRouter(e){y(this,H)[1](e)}setRouterState(e){y(this,K)[1](e)}setOptions(e){e.position!==void 0&&m(this,q,e.position),e.initialIsOpen!==void 0&&m(this,X,e.initialIsOpen),e.shadowDOMTarget!==void 0&&m(this,W,e.shadowDOMTarget),e.containerElement!==void 0&&m(this,Y,e.containerElement)}},H=new WeakMap,K=new WeakMap,q=new WeakMap,X=new WeakMap,W=new WeakMap,fe=new WeakMap,de=new WeakMap,he=new WeakMap,Y=new WeakMap,_=new WeakMap,z=new WeakMap,ge=new WeakMap,Xe),Q,J,Z,ee,te,F,ye,me,ne,We,rn=(We=class{constructor(e){p(this,Q);p(this,J);p(this,Z);p(this,ee);p(this,te);p(this,F,!1);p(this,ye);p(this,me);p(this,ne);const{router:t,routerState:n,shadowDOMTarget:s,setIsOpen:r,style:l,className:i}=e;m(this,Q,D(t)),m(this,J,D(n)),m(this,Z,D(l)),m(this,ee,D(i)),m(this,te,s),m(this,ye,r)}mount(e){if(y(this,F))throw new Error("Devtools is already mounted");const t=ct(()=>{const[n]=y(this,Q),[s]=y(this,J),[r]=y(this,Z),[l]=y(this,ee),i=y(this,te),o=y(this,ye);let a;return y(this,ne)?a=y(this,ne):(a=lt(()=>Ye(()=>import("./BaseTanStackRouterDevtoolsPanel-BbL4h7yi-BbRHxR_f.js"),__vite__mapDeps([1,2,3]))),m(this,ne,a)),ae(ut.Provider,{value:i,get children(){return ae(ft.Provider,{value:{onCloseClick:()=>{}},get children(){return ae(a,{router:n,routerState:s,shadowDOMTarget:i,setIsOpen:o,style:r,className:l})}})}})},e);m(this,F,!0),m(this,me,t)}unmount(){var e;if(!y(this,F))throw new Error("Devtools is not mounted");(e=y(this,me))==null||e.call(this),m(this,F,!1)}setRouter(e){y(this,Q)[1](e)}setRouterState(e){y(this,J)[1](e)}setStyle(e){y(this,Z)[1](e)}setClassName(e){y(this,ee)[1](e)}setOptions(e){e.shadowDOMTarget!==void 0&&m(this,te,e.shadowDOMTarget),e.router!==void 0&&this.setRouter(e.router),e.routerState!==void 0&&this.setRouterState(e.routerState),e.style!==void 0&&this.setStyle(e.style),e.className!==void 0&&this.setClassName(e.className)}},Q=new WeakMap,J=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,F=new WeakMap,ye=new WeakMap,me=new WeakMap,ne=new WeakMap,We);function ln(e){const{initialIsOpen:t,panelProps:n,closeButtonProps:s,toggleButtonProps:r,position:l,containerElement:i,shadowDOMTarget:o,router:a}=e,f=ze(),u=a??f,c=Qe({router:u}),h=C.useRef(null),[g]=C.useState(()=>new on({initialIsOpen:t,panelProps:n,closeButtonProps:s,toggleButtonProps:r,position:l,containerElement:i,shadowDOMTarget:o,router:u,routerState:c}));return C.useEffect(()=>{g.setRouter(u)},[g,u]),C.useEffect(()=>{g.setRouterState(c)},[g,c]),C.useEffect(()=>{g.setOptions({initialIsOpen:t,panelProps:n,closeButtonProps:s,toggleButtonProps:r,position:l,containerElement:i,shadowDOMTarget:o})},[g,t,n,s,r,l,i,o]),C.useEffect(()=>(h.current&&g.mount(h.current),()=>{g.unmount()}),[g]),le.jsx(C.Fragment,{children:le.jsx("div",{ref:h})})}var an=e=>{const{router:t,...n}=e,s=ze(),r=t??s,l=Qe({router:r}),i=C.useRef(null),[o]=C.useState(()=>new rn({...n,router:r,routerState:l}));return C.useEffect(()=>{o.setRouter(r)},[o,r]),C.useEffect(()=>{o.setRouterState(l)},[o,l]),C.useEffect(()=>{o.setOptions({className:e.className,style:e.style,shadowDOMTarget:e.shadowDOMTarget})},[o,e.className,e.style,e.shadowDOMTarget]),C.useEffect(()=>(i.current&&o.mount(i.current),()=>{o.unmount()}),[o]),le.jsx(le.Fragment,{children:le.jsx("div",{ref:i})})},cn=function(){return null},un=ln,fn=function(){return null},dn=an;const Cn=Object.freeze(Object.defineProperty({__proto__:null,TanStackRouterDevtools:cn,TanStackRouterDevtoolsInProd:un,TanStackRouterDevtoolsPanel:fn,TanStackRouterDevtoolsPanelInProd:dn},Symbol.toStringTag,{value:"Module"}));export{ft as D,bn as F,En as M,xn as S,yn as a,x as b,D as c,ae as d,V as e,Gt as f,An as g,pn as h,Yt as i,$e as j,Ht as k,On as l,vn as m,bt as n,Sn as o,vt as p,P as q,ut as r,Xt as s,Pn as t,Tn as u,Vt as v,Cn as w};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FloatingTanStackRouterDevtools-CMO0N95A-g68_CzC5.js","assets/BaseTanStackRouterDevtoolsPanel-BbL4h7yi-D73A7WJY.js","assets/index-DbM6pHiq.js","assets/index-vz12tem1.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Fe=e=>{throw TypeError(e)};var Ve=(e,t,n)=>t.has(e)||Fe("Cannot "+n);var y=(e,t,n)=>(Ve(e,t,"read from private field"),n?n.call(e):t.get(e)),p=(e,t,n)=>t.has(e)?Fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),m=(e,t,n,s)=>(Ve(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n);import{a4 as Ye,a5 as ze,a as Qe,r as C,j as le}from"./index-DbM6pHiq.js";var d={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Be(this.context.count)},getNextContextId(){return Be(this.context.count++)}};function Be(e){const t=String(e),n=t.length-1;return d.context.id+(n?String.fromCharCode(96+n):"")+t}function ie(e){d.context=e}var dt=(e,t)=>e===t,be=Symbol("solid-proxy"),Je=typeof Proxy=="function",ht=Symbol("solid-track"),Se={equals:dt},Ze=rt,L=1,xe=2,et={owned:null,cleanups:null,context:null,owner:null},Re={},w=null,Ne=null,gt=null,v=null,E=null,$=null,Pe=0;function ve(e,t){const n=v,s=w,r=e.length===0,l=t===void 0?s:t,i=r?et:{owned:null,cleanups:null,context:l?l.context:null,owner:l},o=r?e:()=>e(()=>P(()=>ce(i)));w=i,v=null;try{return j(o,!0)}finally{v=n,w=s}}function D(e,t){t=t?Object.assign({},Se,t):Se;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},s=r=>(typeof r=="function"&&(r=r(n.value)),ot(n,r));return[st.bind(n),s]}function yt(e,t,n){const s=Ae(e,t,!0,L);se(s)}function V(e,t,n){const s=Ae(e,t,!1,L);se(s)}function yn(e,t,n){Ze=Ot;const s=Ae(e,t,!1,L);(!n||!n.render)&&(s.user=!0),$?$.push(s):se(s)}function x(e,t,n){n=n?Object.assign({},Se,n):Se;const s=Ae(e,t,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,se(s),st.bind(s)}function mt(e){return e&&typeof e=="object"&&"then"in e}function wt(e,t,n){let s,r,l;s=!0,r=e,l={};let i=null,o=Re,a=null,f=!1,u="initialValue"in l,c=typeof s=="function"&&x(s);const h=new Set,[g,R]=(l.storage||D)(l.initialValue),[M,U]=D(void 0),[oe,N]=D(void 0,{equals:!1}),[T,k]=D(u?"ready":"unresolved");d.context&&(a=d.getNextContextId(),l.ssrLoadFrom==="initial"?o=l.initialValue:d.load&&d.has(a)&&(o=d.load(a)));function A(S,b,I,O){return i===S&&(i=null,O!==void 0&&(u=!0),(S===o||b===o)&&l.onHydrated&&queueMicrotask(()=>l.onHydrated(O,{value:b})),o=Re,Te(b,I)),b}function Te(S,b){j(()=>{b===void 0&&R(()=>S),k(b!==void 0?"errored":u?"ready":"unresolved"),U(b);for(const I of h.keys())I.decrement();h.clear()},!1)}function Ce(){const S=St,b=g(),I=M();if(I!==void 0&&!i)throw I;return v&&v.user,b}function De(S=!0){if(S!==!1&&f)return;f=!1;const b=c?c():s;if(b==null||b===!1){A(i,P(g));return}let I;const O=o!==Re?o:P(()=>{try{return r(b,{value:g(),refetching:S})}catch(re){I=re}});if(I!==void 0){A(i,void 0,pe(I),b);return}else if(!mt(O))return A(i,O,void 0,b),O;return i=O,"v"in O?(O.s===1?A(i,O.v,void 0,b):A(i,void 0,pe(O.v),b),O):(f=!0,queueMicrotask(()=>f=!1),j(()=>{k(u?"refreshing":"pending"),N()},!1),O.then(re=>A(O,re,void 0,b),re=>A(O,void 0,pe(re),b)))}Object.defineProperties(Ce,{state:{get:()=>T()},error:{get:()=>M()},loading:{get(){const S=T();return S==="pending"||S==="refreshing"}},latest:{get(){if(!u)return Ce();const S=M();if(S&&!i)throw S;return g()}}});let _e=w;return c?yt(()=>(_e=w,De(!1))):De(!1),[Ce,{refetch:S=>pt(_e,()=>De(S)),mutate:R}]}function P(e){if(v===null)return e();const t=v;v=null;try{return e()}finally{v=t}}function vt(e){return w===null||(w.cleanups===null?w.cleanups=[e]:w.cleanups.push(e)),e}function pt(e,t){const n=w,s=v;w=e,v=null;try{return j(t,!0)}catch(r){je(r)}finally{w=n,v=s}}var[mn,wn]=D(!1);function tt(e,t){const n=Symbol("context");return{id:n,Provider:Pt(n),defaultValue:e}}function bt(e){let t;return w&&w.context&&(t=w.context[e.id])!==void 0?t:e.defaultValue}function nt(e){const t=x(e),n=x(()=>Me(t()));return n.toArray=()=>{const s=n();return Array.isArray(s)?s:s!=null?[s]:[]},n}var St;function st(){if(this.sources&&this.state)if(this.state===L)se(this);else{const e=E;E=null,j(()=>Oe(this),!1),E=e}if(v){const e=this.observers?this.observers.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(e)):(v.sources=[this],v.sourceSlots=[e]),this.observers?(this.observers.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}return this.value}function ot(e,t,n){let s=e.value;return(!e.comparator||!e.comparator(s,t))&&(e.value=t,e.observers&&e.observers.length&&j(()=>{for(let r=0;r<e.observers.length;r+=1){const l=e.observers[r],i=Ne&&Ne.running;i&&Ne.disposed.has(l),(i?!l.tState:!l.state)&&(l.pure?E.push(l):$.push(l),l.observers&&it(l)),i||(l.state=L)}if(E.length>1e6)throw E=[],new Error},!1)),t}function se(e){if(!e.fn)return;ce(e);const t=Pe;xt(e,e.value,t)}function xt(e,t,n){let s;const r=w,l=v;v=w=e;try{s=e.fn(t)}catch(i){return e.pure&&(e.state=L,e.owned&&e.owned.forEach(ce),e.owned=null),e.updatedAt=n+1,je(i)}finally{v=l,w=r}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ot(e,s):e.value=s,e.updatedAt=n)}function Ae(e,t,n,s=L,r){const l={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:w,context:w?w.context:null,pure:n};return w===null||w!==et&&(w.owned?w.owned.push(l):w.owned=[l]),l}function Ee(e){if(e.state===0)return;if(e.state===xe)return Oe(e);if(e.suspense&&P(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Pe);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===L)se(e);else if(e.state===xe){const s=E;E=null,j(()=>Oe(e,t[0]),!1),E=s}}function j(e,t){if(E)return e();let n=!1;t||(E=[]),$?n=!0:$=[],Pe++;try{const s=e();return Et(n),s}catch(s){n||($=null),E=null,je(s)}}function Et(e){if(E&&(rt(E),E=null),e)return;const t=$;$=null,t.length&&j(()=>Ze(t),!1)}function rt(e){for(let t=0;t<e.length;t++)Ee(e[t])}function Ot(e){let t,n=0;for(t=0;t<e.length;t++){const s=e[t];s.user?e[n++]=s:Ee(s)}if(d.context){if(d.count){d.effects||(d.effects=[]),d.effects.push(...e.slice(0,n));return}ie()}for(d.effects&&(d.done||!d.count)&&(e=[...d.effects,...e],n+=d.effects.length,delete d.effects),t=0;t<n;t++)Ee(e[t])}function Oe(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const s=e.sources[n];if(s.sources){const r=s.state;r===L?s!==t&&(!s.updatedAt||s.updatedAt<Pe)&&Ee(s):r===xe&&Oe(s,t)}}}function it(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=xe,n.pure?E.push(n):$.push(n),n.observers&&it(n))}}function ce(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),r=n.observers;if(r&&r.length){const l=r.pop(),i=n.observerSlots.pop();s<r.length&&(l.sourceSlots[i]=s,r[s]=l,n.observerSlots[s]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)ce(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ce(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function pe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function je(e,t=w){throw pe(e)}function Me(e){if(typeof e=="function"&&!e.length)return Me(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=Me(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Pt(e,t){return function(s){let r;return V(()=>r=P(()=>(w.context={...w.context,[e]:s.value},nt(()=>s.children))),void 0),r}}var At=Symbol("fallback");function Ue(e){for(let t=0;t<e.length;t++)e[t]()}function Tt(e,t,n={}){let s=[],r=[],l=[],i=0,o=t.length>1?[]:null;return vt(()=>Ue(l)),()=>{let a=e()||[],f=a.length,u,c;return a[ht],P(()=>{let g,R,M,U,oe,N,T,k,A;if(f===0)i!==0&&(Ue(l),l=[],s=[],r=[],i=0,o&&(o=[])),n.fallback&&(s=[At],r[0]=ve(Te=>(l[0]=Te,n.fallback())),i=1);else if(i===0){for(r=new Array(f),c=0;c<f;c++)s[c]=a[c],r[c]=ve(h);i=f}else{for(M=new Array(f),U=new Array(f),o&&(oe=new Array(f)),N=0,T=Math.min(i,f);N<T&&s[N]===a[N];N++);for(T=i-1,k=f-1;T>=N&&k>=N&&s[T]===a[k];T--,k--)M[k]=r[T],U[k]=l[T],o&&(oe[k]=o[T]);for(g=new Map,R=new Array(k+1),c=k;c>=N;c--)A=a[c],u=g.get(A),R[c]=u===void 0?-1:u,g.set(A,c);for(u=N;u<=T;u++)A=s[u],c=g.get(A),c!==void 0&&c!==-1?(M[c]=r[u],U[c]=l[u],o&&(oe[c]=o[u]),c=R[c],g.set(A,c)):l[u]();for(c=N;c<f;c++)c in M?(r[c]=M[c],l[c]=U[c],o&&(o[c]=oe[c],o[c](c))):r[c]=ve(h);r=r.slice(0,i=f),s=a.slice(0)}return r});function h(g){if(l[c]=g,o){const[R,M]=D(c);return o[c]=M,t(a[c],R)}return t(a[c])}}}function ae(e,t){return P(()=>e(t||{}))}function we(){return!0}var Ie={get(e,t,n){return t===be?n:e.get(t)},has(e,t){return t===be?!0:e.has(t)},set:we,deleteProperty:we,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:we,deleteProperty:we}},ownKeys(e){return e.keys()}};function ke(e){return(e=typeof e=="function"?e():e)?e:{}}function Ct(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function vn(...e){let t=!1;for(let i=0;i<e.length;i++){const o=e[i];t=t||!!o&&be in o,e[i]=typeof o=="function"?(t=!0,x(o)):o}if(Je&&t)return new Proxy({get(i){for(let o=e.length-1;o>=0;o--){const a=ke(e[o])[i];if(a!==void 0)return a}},has(i){for(let o=e.length-1;o>=0;o--)if(i in ke(e[o]))return!0;return!1},keys(){const i=[];for(let o=0;o<e.length;o++)i.push(...Object.keys(ke(e[o])));return[...new Set(i)]}},Ie);const n={},s=Object.create(null);for(let i=e.length-1;i>=0;i--){const o=e[i];if(!o)continue;const a=Object.getOwnPropertyNames(o);for(let f=a.length-1;f>=0;f--){const u=a[f];if(u==="__proto__"||u==="constructor")continue;const c=Object.getOwnPropertyDescriptor(o,u);if(!s[u])s[u]=c.get?{enumerable:!0,configurable:!0,get:Ct.bind(n[u]=[c.get.bind(o)])}:c.value!==void 0?c:void 0;else{const h=n[u];h&&(c.get?h.push(c.get.bind(o)):c.value!==void 0&&h.push(()=>c.value))}}}const r={},l=Object.keys(s);for(let i=l.length-1;i>=0;i--){const o=l[i],a=s[o];a&&a.get?Object.defineProperty(r,o,a):r[o]=a?a.value:void 0}return r}function Dt(e,...t){const n=t.length;if(Je&&be in e){const r=n>1?t.flat():t[0],l=t.map(i=>new Proxy({get(o){return i.includes(o)?e[o]:void 0},has(o){return i.includes(o)&&o in e},keys(){return i.filter(o=>o in e)}},Ie));return l.push(new Proxy({get(i){return r.includes(i)?void 0:e[i]},has(i){return r.includes(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!r.includes(i))}},Ie)),l}const s=[];for(let r=0;r<=n;r++)s[r]={};for(const r of Object.getOwnPropertyNames(e)){let l=n;for(let o=0;o<t.length;o++)if(t[o].includes(r)){l=o;break}const i=Object.getOwnPropertyDescriptor(e,r);!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable?s[l][r]=i.value:Object.defineProperty(s[l],r,i)}return s}function lt(e){let t,n;const s=r=>{const l=d.context;if(l){const[o,a]=D();d.count||(d.count=0),d.count++,(n||(n=e())).then(f=>{!d.done&&ie(l),d.count--,a(()=>f.default),ie()}),t=o}else if(!t){const[o]=wt(()=>(n||(n=e())).then(a=>a.default));t=o}let i;return x(()=>(i=t())?P(()=>{if(!l||d.done)return i(r);const o=d.context;ie(l);const a=i(r);return ie(o),a}):"")};return s.preload=()=>n||((n=e()).then(r=>t=()=>r.default),n),s}var Rt=0;function pn(){return d.context?d.getNextContextId():`cl-${Rt++}`}var at=e=>`Stale read from <${e}>.`;function bn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return x(Tt(()=>e.each,e.children,t||void 0))}function Sn(e){const t=e.keyed,n=x(()=>e.when,void 0,void 0),s=t?n:x(n,void 0,{equals:(r,l)=>!r==!l});return x(()=>{const r=s();if(r){const l=e.children;return typeof l=="function"&&l.length>0?P(()=>l(t?r:()=>{if(!P(s))throw at("Show");return n()})):l}return e.fallback},void 0,void 0)}function xn(e){const t=nt(()=>e.children),n=x(()=>{const s=t(),r=Array.isArray(s)?s:[s];let l=()=>{};for(let i=0;i<r.length;i++){const o=i,a=r[i],f=l,u=x(()=>f()?void 0:a.when,void 0,void 0),c=a.keyed?u:x(u,void 0,{equals:(h,g)=>!h==!g});l=()=>f()||(c()?[o,u,a]:void 0)}return l});return x(()=>{const s=n()();if(!s)return e.fallback;const[r,l,i]=s,o=i.children;return typeof o=="function"&&o.length>0?P(()=>o(i.keyed?l():()=>{var a;if(((a=P(n)())==null?void 0:a[0])!==r)throw at("Match");return l()})):o},void 0,void 0)}function En(e){return e}var Nt=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable","allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"]),kt=new Set(["innerHTML","textContent","innerText","children"]),Mt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),It=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function $t(e,t){const n=It[e];return typeof n=="object"?n[t]?n.$:void 0:n}var Lt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),jt=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),_t={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},On=e=>x(()=>e());function Ft(e,t,n){let s=n.length,r=t.length,l=s,i=0,o=0,a=t[r-1].nextSibling,f=null;for(;i<r||o<l;){if(t[i]===n[o]){i++,o++;continue}for(;t[r-1]===n[l-1];)r--,l--;if(r===i){const u=l<s?o?n[o-1].nextSibling:n[l-o]:a;for(;o<l;)e.insertBefore(n[o++],u)}else if(l===o)for(;i<r;)(!f||!f.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[l-1]&&n[o]===t[r-1]){const u=t[--r].nextSibling;e.insertBefore(n[o++],t[i++].nextSibling),e.insertBefore(n[--l],u),t[r]=n[l]}else{if(!f){f=new Map;let c=o;for(;c<l;)f.set(n[c],c++)}const u=f.get(t[i]);if(u!=null)if(o<u&&u<l){let c=i,h=1,g;for(;++c<r&&c<l&&!((g=f.get(t[c]))==null||g!==u+h);)h++;if(h>u-o){const R=t[i];for(;o<u;)e.insertBefore(n[o++],R)}else e.replaceChild(n[o++],t[i++])}else i++;else t[i++].remove()}}}var Ge="_$DX_DELEGATE";function ct(e,t,n,s={}){let r;return ve(l=>{r=l,t===document?e():Yt(t,e(),t.firstChild?null:void 0,n)},s.owner),()=>{r(),t.textContent=""}}function Pn(e,t,n,s){let r;const l=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},i=()=>(r||(r=l())).cloneNode(!0);return i.cloneNode=i,i}function Vt(e,t=window.document){const n=t[Ge]||(t[Ge]=new Set);for(let s=0,r=e.length;s<r;s++){const l=e[s];n.has(l)||(n.add(l),t.addEventListener(l,Zt))}}function $e(e,t,n){B(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Bt(e,t,n,s){B(e)||(s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s))}function Ut(e,t,n){B(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Gt(e,t){B(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ht(e,t,n,s){if(s)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=l=>r.call(e,n[1],l))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Kt(e,t,n={}){const s=Object.keys(t||{}),r=Object.keys(n);let l,i;for(l=0,i=r.length;l<i;l++){const o=r[l];!o||o==="undefined"||t[o]||(He(e,o,!1),delete n[o])}for(l=0,i=s.length;l<i;l++){const o=s[l],a=!!t[o];!o||o==="undefined"||n[o]===a||!a||(He(e,o,!0),n[o]=a)}return n}function qt(e,t,n){if(!t)return n?$e(e,"style"):t;const s=e.style;if(typeof t=="string")return s.cssText=t;typeof n=="string"&&(s.cssText=n=void 0),n||(n={}),t||(t={});let r,l;for(l in n)t[l]??s.removeProperty(l),delete n[l];for(l in t)r=t[l],r!==n[l]&&(s.setProperty(l,r),n[l]=r);return n}function Xt(e,t={},n,s){const r={};return s||V(()=>r.children=ue(e,t.children,r.children)),V(()=>typeof t.ref=="function"&&Wt(t.ref,e)),V(()=>zt(e,t,n,!0,r,!0)),r}function Wt(e,t,n){return P(()=>e(t,n))}function Yt(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return ue(e,t,s,n);V(r=>ue(e,t(),r,n),s)}function zt(e,t,n,s,r={},l=!1){t||(t={});for(const i in r)if(!(i in t)){if(i==="children")continue;r[i]=Ke(e,i,null,r[i],n,l,t)}for(const i in t){if(i==="children")continue;const o=t[i];r[i]=Ke(e,i,o,r[i],n,l,t)}}function Qt(e){let t,n;return!B()||!(t=d.registry.get(n=en()))?e():(d.completed&&d.completed.add(t),d.registry.delete(n),t)}function B(e){return!!d.context&&!d.done&&(!e||e.isConnected)}function Jt(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function He(e,t,n){const s=t.trim().split(/\s+/);for(let r=0,l=s.length;r<l;r++)e.classList.toggle(s[r],n)}function Ke(e,t,n,s,r,l,i){let o,a,f,u,c;if(t==="style")return qt(e,n,s);if(t==="classList")return Kt(e,n,s);if(n===s)return s;if(t==="ref")l||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);s&&e.removeEventListener(h,s,typeof s!="function"&&s),n&&e.addEventListener(h,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);s&&e.removeEventListener(h,s,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),g=Lt.has(h);if(!g&&s){const R=Array.isArray(s)?s[0]:s;e.removeEventListener(h,R)}(g||n)&&(Ht(e,h,n,g),g&&Vt([h]))}else if(t.slice(0,5)==="attr:")$e(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Ut(e,t.slice(5),n);else if((c=t.slice(0,5)==="prop:")||(f=kt.has(t))||!r&&((u=$t(t,e.tagName))||(a=Nt.has(t)))||(o=e.nodeName.includes("-")||"is"in i)){if(c)t=t.slice(5),a=!0;else if(B(e))return n;t==="class"||t==="className"?Gt(e,n):o&&!a&&!f?e[Jt(t)]=n:e[u||t]=n}else{const h=r&&t.indexOf(":")>-1&&_t[t.split(":")[0]];h?Bt(e,h,t,n):$e(e,Mt[t]||t,n)}return n}function Zt(e){if(d.registry&&d.events&&d.events.find(([a,f])=>f===e))return;let t=e.target;const n=`$$${e.type}`,s=e.target,r=e.currentTarget,l=a=>Object.defineProperty(e,"target",{configurable:!0,value:a}),i=()=>{const a=t[n];if(a&&!t.disabled){const f=t[`${n}Data`];if(f!==void 0?a.call(t,f,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&l(t.host),!0},o=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),d.registry&&!d.done&&(d.done=_$HY.done=!0),e.composedPath){const a=e.composedPath();l(a[0]);for(let f=0;f<a.length-2&&(t=a[f],!!i());f++){if(t._$host){t=t._$host,o();break}if(t.parentNode===r)break}}else o();l(s)}function ue(e,t,n,s,r){const l=B(e);if(l){!n&&(n=[...e.childNodes]);let a=[];for(let f=0;f<n.length;f++){const u=n[f];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():a.push(u)}n=a}for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(l||i==="number"&&(t=t.toString(),t===n))return n;if(o){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=G(e,n,s,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(l)return n;n=G(e,n,s)}else{if(i==="function")return V(()=>{let a=t();for(;typeof a=="function";)a=a();n=ue(e,a,n,s)}),()=>n;if(Array.isArray(t)){const a=[],f=n&&Array.isArray(n);if(Le(a,t,n,r))return V(()=>n=ue(e,a,n,s,!0)),()=>n;if(l){if(!a.length)return n;if(s===void 0)return n=[...e.childNodes];let u=a[0];if(u.parentNode!==e)return n;const c=[u];for(;(u=u.nextSibling)!==s;)c.push(u);return n=c}if(a.length===0){if(n=G(e,n,s),o)return n}else f?n.length===0?qe(e,a,s):Ft(e,n,a):(n&&G(e),qe(e,a));n=a}else if(t.nodeType){if(l&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=G(e,n,s,t);G(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Le(e,t,n,s){let r=!1;for(let l=0,i=t.length;l<i;l++){let o=t[l],a=n&&n[e.length],f;if(!(o==null||o===!0||o===!1))if((f=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))r=Le(e,o,a)||r;else if(f==="function")if(s){for(;typeof o=="function";)o=o();r=Le(e,Array.isArray(o)?o:[o],Array.isArray(a)?a:[a])||r}else e.push(o),r=!0;else{const u=String(o);a&&a.nodeType===3&&a.data===u?e.push(a):e.push(document.createTextNode(u))}}return r}function qe(e,t,n=null){for(let s=0,r=t.length;s<r;s++)e.insertBefore(t[s],n)}function G(e,t,n,s){if(n===void 0)return e.textContent="";const r=s||document.createTextNode("");if(t.length){let l=!1;for(let i=t.length-1;i>=0;i--){const o=t[i];if(r!==o){const a=o.parentNode===e;!l&&!i?a?e.replaceChild(r,o):e.insertBefore(r,n):a&&o.remove()}else l=!0}}else e.insertBefore(r,n);return[r]}function en(){return d.getNextContextId()}var tn="http://www.w3.org/2000/svg";function nn(e,t=!1,n=void 0){return t?document.createElementNS(tn,e):document.createElement(e,{is:n})}function sn(e,t){const n=x(e);return x(()=>{const s=n();switch(typeof s){case"function":return P(()=>s(t));case"string":const r=jt.has(s),l=d.context?Qt():nn(s,r,P(()=>t.is));return Xt(l,t,r),l}})}function An(e){const[,t]=Dt(e,["component"]);return sn(()=>e.component,t)}var ut=tt(void 0),ft=tt(void 0),Tn=()=>{const e=bt(ft);if(!e)throw new Error("useDevtoolsOnClose must be used within a TanStackRouterDevtools component");return e},H,K,q,X,W,fe,de,he,Y,_,z,ge,Xe,on=(Xe=class{constructor(e){p(this,H);p(this,K);p(this,q);p(this,X);p(this,W);p(this,fe);p(this,de);p(this,he);p(this,Y);p(this,_,!1);p(this,z);p(this,ge);m(this,H,D(e.router)),m(this,K,D(e.routerState)),m(this,q,e.position??"bottom-left"),m(this,X,e.initialIsOpen??!1),m(this,W,e.shadowDOMTarget),m(this,fe,e.panelProps),m(this,de,e.closeButtonProps),m(this,he,e.toggleButtonProps),m(this,Y,e.containerElement)}mount(e){if(y(this,_))throw new Error("Devtools is already mounted");const t=ct(()=>{const[n]=y(this,H),[s]=y(this,K),r=y(this,q),l=y(this,X),i=y(this,W),o=y(this,fe),a=y(this,de),f=y(this,he),u=y(this,Y);let c;return y(this,z)?c=y(this,z):(c=lt(()=>Ye(()=>import("./FloatingTanStackRouterDevtools-CMO0N95A-g68_CzC5.js"),__vite__mapDeps([0,1,2,3]))),m(this,z,c)),ae(ut.Provider,{value:i,get children(){return ae(c,{position:r,initialIsOpen:l,router:n,routerState:s,shadowDOMTarget:i,panelProps:o,closeButtonProps:a,toggleButtonProps:f,containerElement:u})}})},e);m(this,_,!0),m(this,ge,t)}unmount(){var e;if(!y(this,_))throw new Error("Devtools is not mounted");(e=y(this,ge))==null||e.call(this),m(this,_,!1)}setRouter(e){y(this,H)[1](e)}setRouterState(e){y(this,K)[1](e)}setOptions(e){e.position!==void 0&&m(this,q,e.position),e.initialIsOpen!==void 0&&m(this,X,e.initialIsOpen),e.shadowDOMTarget!==void 0&&m(this,W,e.shadowDOMTarget),e.containerElement!==void 0&&m(this,Y,e.containerElement)}},H=new WeakMap,K=new WeakMap,q=new WeakMap,X=new WeakMap,W=new WeakMap,fe=new WeakMap,de=new WeakMap,he=new WeakMap,Y=new WeakMap,_=new WeakMap,z=new WeakMap,ge=new WeakMap,Xe),Q,J,Z,ee,te,F,ye,me,ne,We,rn=(We=class{constructor(e){p(this,Q);p(this,J);p(this,Z);p(this,ee);p(this,te);p(this,F,!1);p(this,ye);p(this,me);p(this,ne);const{router:t,routerState:n,shadowDOMTarget:s,setIsOpen:r,style:l,className:i}=e;m(this,Q,D(t)),m(this,J,D(n)),m(this,Z,D(l)),m(this,ee,D(i)),m(this,te,s),m(this,ye,r)}mount(e){if(y(this,F))throw new Error("Devtools is already mounted");const t=ct(()=>{const[n]=y(this,Q),[s]=y(this,J),[r]=y(this,Z),[l]=y(this,ee),i=y(this,te),o=y(this,ye);let a;return y(this,ne)?a=y(this,ne):(a=lt(()=>Ye(()=>import("./BaseTanStackRouterDevtoolsPanel-BbL4h7yi-D73A7WJY.js"),__vite__mapDeps([1,2,3]))),m(this,ne,a)),ae(ut.Provider,{value:i,get children(){return ae(ft.Provider,{value:{onCloseClick:()=>{}},get children(){return ae(a,{router:n,routerState:s,shadowDOMTarget:i,setIsOpen:o,style:r,className:l})}})}})},e);m(this,F,!0),m(this,me,t)}unmount(){var e;if(!y(this,F))throw new Error("Devtools is not mounted");(e=y(this,me))==null||e.call(this),m(this,F,!1)}setRouter(e){y(this,Q)[1](e)}setRouterState(e){y(this,J)[1](e)}setStyle(e){y(this,Z)[1](e)}setClassName(e){y(this,ee)[1](e)}setOptions(e){e.shadowDOMTarget!==void 0&&m(this,te,e.shadowDOMTarget),e.router!==void 0&&this.setRouter(e.router),e.routerState!==void 0&&this.setRouterState(e.routerState),e.style!==void 0&&this.setStyle(e.style),e.className!==void 0&&this.setClassName(e.className)}},Q=new WeakMap,J=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,F=new WeakMap,ye=new WeakMap,me=new WeakMap,ne=new WeakMap,We);function ln(e){const{initialIsOpen:t,panelProps:n,closeButtonProps:s,toggleButtonProps:r,position:l,containerElement:i,shadowDOMTarget:o,router:a}=e,f=ze(),u=a??f,c=Qe({router:u}),h=C.useRef(null),[g]=C.useState(()=>new on({initialIsOpen:t,panelProps:n,closeButtonProps:s,toggleButtonProps:r,position:l,containerElement:i,shadowDOMTarget:o,router:u,routerState:c}));return C.useEffect(()=>{g.setRouter(u)},[g,u]),C.useEffect(()=>{g.setRouterState(c)},[g,c]),C.useEffect(()=>{g.setOptions({initialIsOpen:t,panelProps:n,closeButtonProps:s,toggleButtonProps:r,position:l,containerElement:i,shadowDOMTarget:o})},[g,t,n,s,r,l,i,o]),C.useEffect(()=>(h.current&&g.mount(h.current),()=>{g.unmount()}),[g]),le.jsx(C.Fragment,{children:le.jsx("div",{ref:h})})}var an=e=>{const{router:t,...n}=e,s=ze(),r=t??s,l=Qe({router:r}),i=C.useRef(null),[o]=C.useState(()=>new rn({...n,router:r,routerState:l}));return C.useEffect(()=>{o.setRouter(r)},[o,r]),C.useEffect(()=>{o.setRouterState(l)},[o,l]),C.useEffect(()=>{o.setOptions({className:e.className,style:e.style,shadowDOMTarget:e.shadowDOMTarget})},[o,e.className,e.style,e.shadowDOMTarget]),C.useEffect(()=>(i.current&&o.mount(i.current),()=>{o.unmount()}),[o]),le.jsx(le.Fragment,{children:le.jsx("div",{ref:i})})},cn=function(){return null},un=ln,fn=function(){return null},dn=an;const Cn=Object.freeze(Object.defineProperty({__proto__:null,TanStackRouterDevtools:cn,TanStackRouterDevtoolsInProd:un,TanStackRouterDevtoolsPanel:fn,TanStackRouterDevtoolsPanelInProd:dn},Symbol.toStringTag,{value:"Module"}));export{ft as D,bn as F,En as M,xn as S,yn as a,x as b,D as c,ae as d,V as e,Gt as f,An as g,pn as h,Yt as i,$e as j,Ht as k,On as l,vn as m,bt as n,Sn as o,vt as p,P as q,ut as r,Xt as s,Pn as t,Tn as u,Vt as v,Cn as w};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a6 as w,j as e,a7 as b,a8 as v,a9 as S,r as x,aa as O,a2 as A,d as k,ab as z,ac as d,ad as L,u as
|
|
1
|
+
import{a6 as w,j as e,a7 as b,a8 as v,a9 as S,r as x,aa as O,a2 as A,d as k,ab as z,ac as d,ad as L,u as c,ae as E,af as T,ag as _,ah as P,ai as R,aj as D,ak as M,al as I}from"./index-B5vwNxrp.js";import{am as oe}from"./index-B5vwNxrp.js";import{R as B}from"./RightPanelHeader-B-bdVBD5.js";/**
|
|
2
2
|
* @license lucide-react v1.8.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const U=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],N=w("braces",U),F={url:v,markdown:b,json:N},H={url:"Web Page",markdown:"Document",json:"JSON Data"};function g({title:s,contentType:t}){const n=t?F[t]:S,o=s??(t?H[t]:"Canvas");return e.jsxs("div",{className:"border-b",children:[e.jsx(B,{}),t&&e.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-1.5",children:[e.jsx(n,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"text-muted-foreground truncate text-xs font-medium",children:o})]})]})}const J=["javascript:","data:","file:","blob:"],W=new Set(["allow-scripts","allow-same-origin","allow-popups","allow-forms","allow-downloads","allow-modals"]),Y="allow-scripts allow-same-origin allow-popups allow-forms";function $(s){return s.split(" ").filter(t=>W.has(t)).join(" ")}function K(s){try{const t=new URL(s);return!J.includes(t.protocol)}catch{return!1}}function X({content:s}){if(!x.useMemo(()=>K(s.url),[s.url]))return e.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:e.jsx("p",{children:"This URL cannot be displayed for security reasons."})});const n=s.sandbox?$(s.sandbox):Y;return e.jsx("iframe",{src:s.url,sandbox:n,className:"h-full w-full border-0",title:s.title??"Canvas content"})}function Q({content:s}){return e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none
|
|
6
|
+
*/const U=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],N=w("braces",U),F={url:v,markdown:b,json:N},H={url:"Web Page",markdown:"Document",json:"JSON Data"};function g({title:s,contentType:t}){const n=t?F[t]:S,o=s??(t?H[t]:"Canvas");return e.jsxs("div",{className:"border-b",children:[e.jsx(B,{}),t&&e.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-1.5",children:[e.jsx(n,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"text-muted-foreground truncate text-xs font-medium",children:o})]})]})}const J=["javascript:","data:","file:","blob:"],W=new Set(["allow-scripts","allow-same-origin","allow-popups","allow-forms","allow-downloads","allow-modals"]),Y="allow-scripts allow-same-origin allow-popups allow-forms";function $(s){return s.split(" ").filter(t=>W.has(t)).join(" ")}function K(s){try{const t=new URL(s);return!J.includes(t.protocol)}catch{return!1}}function X({content:s}){if(!x.useMemo(()=>K(s.url),[s.url]))return e.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:e.jsx("p",{children:"This URL cannot be displayed for security reasons."})});const n=s.sandbox?$(s.sandbox):Y;return e.jsx("iframe",{src:s.url,sandbox:n,className:"h-full w-full border-0",title:s.title??"Canvas content"})}function Q({content:s}){return e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:e.jsx(O,{shikiTheme:["github-light","github-dark"],children:s.content})})}function V({content:s}){return e.jsx("div",{className:"p-4 font-mono text-sm",children:e.jsx(C,{value:s.data,depth:0})})}const q=20;function C({value:s,depth:t,keyName:n}){const[o,l]=x.useState(t>2),r=x.useCallback(()=>l(i=>!i),[]);if(t>=q)return e.jsx(u,{keyName:n,value:"[max depth]",className:"text-muted-foreground"});if(s===null)return e.jsx(u,{keyName:n,value:"null",className:"text-muted-foreground"});if(typeof s=="boolean")return e.jsx(u,{keyName:n,value:String(s),className:"text-blue-500"});if(typeof s=="number")return e.jsx(u,{keyName:n,value:String(s),className:"text-green-500"});if(typeof s=="string")return e.jsx(u,{keyName:n,value:`"${s}"`,className:"text-amber-500"});const a=Array.isArray(s),m=a?s.map((i,f)=>[String(f),i]):Object.entries(s),y=a?"[":"{",j=a?"]":"}";return e.jsxs("div",{style:{paddingLeft:t>0?16:0},children:[e.jsxs("button",{type:"button",className:"hover:bg-muted -ml-0.5 inline-flex items-center gap-0.5 rounded px-0.5",onClick:r,children:[e.jsx(A,{className:k("size-3 transition-transform",!o&&"rotate-90")}),n!=null&&e.jsxs("span",{className:"text-foreground",children:[n,": "]}),e.jsxs("span",{className:"text-muted-foreground",children:[y,o&&` ... ${m.length} items `,o&&j]})]}),!o&&e.jsxs(e.Fragment,{children:[m.map(([i,f])=>e.jsx(C,{keyName:a?void 0:i,value:f,depth:t+1},i)),e.jsx("div",{className:"text-muted-foreground",children:j})]})]})}function u({keyName:s,value:t,className:n}){return e.jsxs("div",{style:{paddingLeft:16},children:[s!=null&&e.jsxs("span",{className:"text-foreground",children:[s,": "]}),e.jsx("span",{className:n,children:t})]})}const G=[{icon:b,label:"Markdown",description:"Render a document",action:()=>({type:"markdown",content:`# Untitled
|
|
7
7
|
|
|
8
|
-
Start writing...`,title:"Document"})},{icon:N,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON Data"})},{icon:v,label:"Web Page",description:"Embed a URL",action:()=>({type:"url",url:"https://dorkos.ai",title:"Web Page"})}];function
|
|
8
|
+
Start writing...`,title:"Document"})},{icon:N,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON Data"})},{icon:v,label:"Web Page",description:"Embed a URL",action:()=>({type:"url",url:"https://dorkos.ai",title:"Web Page"})}];function h(s,t,n,o){return s.split("").reduce((r,a)=>r+a.charCodeAt(0),0)*(t+1)*7%(o-n)+n}function Z({onAction:s}){const t=z(),n=x.useId(),o=x.useMemo(()=>Array.from({length:6},(l,r)=>({x:h(n,r*3,10,90),y:h(n,r*3+1,10,80),size:h(n,r*3+2,24,56),delay:r*.4})),[n]);return e.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center overflow-hidden px-6",children:[!t&&o.map((l,r)=>e.jsx(d.div,{className:"border-border/40 absolute rounded-lg border",style:{left:`${l.x}%`,top:`${l.y}%`,width:l.size,height:l.size},initial:{opacity:0,scale:.6,rotate:-10},animate:{opacity:[0,.15,.08,.15],scale:[.6,1,.9,1],rotate:[-10,0,5,0]},transition:{duration:8,delay:l.delay,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}},r)),e.jsxs(d.div,{className:"relative z-10 flex max-w-sm flex-col items-center gap-6 text-center",initial:t?!1:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},children:[e.jsx(d.div,{className:"bg-muted/50 text-muted-foreground flex size-14 items-center justify-center rounded-2xl",initial:t?!1:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.1},children:e.jsx(L,{className:"size-7"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:"A blank canvas"}),e.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["Your agent can render documents, data, and web pages here.",e.jsx("br",{}),"Or pick a starting point below."]})]}),e.jsx(d.div,{className:"mt-2 flex w-full flex-col gap-2",initial:"hidden",animate:"visible",variants:t?{}:{visible:{transition:{staggerChildren:.08,delayChildren:.25}}},children:G.map(({icon:l,label:r,description:a,action:m})=>e.jsxs(d.button,{variants:t?{}:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25},className:"border-border hover:bg-accent/50 flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors",onClick:()=>s(m()),children:[e.jsx(l,{className:"text-muted-foreground size-4 shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium",children:r}),e.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:a})]})]},r))})]})]})}function p({canvasContent:s,onSetContent:t}){return s?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:s.title,contentType:s.type}),e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[s.type==="url"&&e.jsx(X,{content:s}),s.type==="markdown"&&e.jsx(Q,{content:s}),s.type==="json"&&e.jsx(V,{content:s})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{}),e.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:e.jsx(Z,{onAction:t})})]})}function te(){const s=c(n=>n.canvasContent),t=c(n=>n.setCanvasContent);return e.jsx("div",{"data-slot":"canvas",className:"flex h-full flex-col overflow-hidden",children:e.jsx(p,{canvasContent:s,onSetContent:t})})}function ne(){const s=c(a=>a.canvasOpen),t=c(a=>a.canvasContent),n=c(a=>a.setCanvasOpen),o=c(a=>a.setCanvasContent),l=E();if(!s)return null;const r=()=>n(!1);return l?e.jsx(T,{open:!0,onOpenChange:a=>!a&&r(),children:e.jsxs(_,{side:"right",showCloseButton:!1,className:"bg-sidebar text-sidebar-foreground flex w-full flex-col gap-0 p-0 sm:max-w-full",children:[e.jsxs(P,{className:"sr-only",children:[e.jsx(R,{children:"Canvas"}),e.jsx(D,{children:"Agent-driven content pane."})]}),e.jsx(p,{canvasContent:t,onSetContent:o})]})}):e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"group relative flex w-2 items-center justify-center",children:e.jsx("div",{className:"bg-border group-hover:bg-ring h-full w-px transition-colors"})}),e.jsx(I,{id:"agent-canvas",order:2,defaultSize:50,minSize:20,collapsible:!0,onCollapse:r,children:e.jsx("div",{className:"bg-sidebar text-sidebar-foreground flex h-full flex-col overflow-hidden rounded-lg border",children:e.jsx(p,{canvasContent:t,onSetContent:o})})})]})}export{ne as AgentCanvas,te as CanvasContent,oe as useCanvasPersistence};
|