studiograph 1.3.3-next.21 → 1.3.3-next.23
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/commands/serve.js +3 -0
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/sync.js +58 -17
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/core/workspace.d.ts +6 -0
- package/dist/core/workspace.js +47 -0
- package/dist/core/workspace.js.map +1 -1
- package/dist/server/chrome/chrome.js +23 -252
- package/dist/server/collab.d.ts +27 -0
- package/dist/server/collab.js +117 -0
- package/dist/server/collab.js.map +1 -0
- package/dist/server/index.js +11 -6
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/collab.d.ts +6 -0
- package/dist/server/routes/collab.js +10 -0
- package/dist/server/routes/collab.js.map +1 -0
- package/dist/server/routes/graph-api.d.ts +2 -2
- package/dist/server/routes/graph-api.js +27 -6
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/sync-api.d.ts +2 -1
- package/dist/server/routes/sync-api.js +13 -1
- package/dist/server/routes/sync-api.js.map +1 -1
- package/dist/server/routes/ws.js +38 -0
- package/dist/server/routes/ws.js.map +1 -1
- package/dist/server/session-manager.d.ts +40 -0
- package/dist/server/session-manager.js +130 -0
- package/dist/server/session-manager.js.map +1 -0
- package/dist/server/ws-hub.d.ts +60 -1
- package/dist/server/ws-hub.js +113 -2
- package/dist/server/ws-hub.js.map +1 -1
- package/dist/web/_app/immutable/assets/AppShell.EyPUoNrB.css +1 -0
- package/dist/web/_app/immutable/assets/{editor.CaaAjbLg.css → entity.Bjlko8oW.css} +1 -1
- package/dist/web/_app/immutable/chunks/1XQG_7uE.js +1 -0
- package/dist/web/_app/immutable/chunks/{BDskUnFZ.js → BIQoyk5V.js} +10 -10
- package/dist/web/_app/immutable/chunks/{DFSquWcI.js → BV_9Nfp2.js} +1 -1
- package/dist/web/_app/immutable/chunks/Bk7i2AGK.js +5 -0
- package/dist/web/_app/immutable/chunks/ByFfmBEu.js +2 -0
- package/dist/web/_app/immutable/chunks/{BzhnXU6Q.js → C5cMwwSn.js} +1 -1
- package/dist/web/_app/immutable/chunks/CICthOLY.js +27 -0
- package/dist/web/_app/immutable/chunks/CaITTL5o.js +2 -0
- package/dist/web/_app/immutable/chunks/{BfTJ6NzK.js → CjKjQEMp.js} +1 -1
- package/dist/web/_app/immutable/chunks/{GRkK54yd.js → D-tW7Byc.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Ddy4RvyP.js → DCWeodCf.js} +1 -1
- package/dist/web/_app/immutable/chunks/DWSjaG46.js +1 -0
- package/dist/web/_app/immutable/chunks/{DRChbfXz.js → DiXzlxx7.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BbLYZVsw.js → Dpn7ZAUg.js} +1 -1
- package/dist/web/_app/immutable/chunks/EhE2EcYu.js +1 -0
- package/dist/web/_app/immutable/chunks/dCvzTHAY.js +1 -0
- package/dist/web/_app/immutable/chunks/{BjnErSlK.js → eEhMI0BQ.js} +1 -1
- package/dist/web/_app/immutable/chunks/i6t46AUT.js +2 -0
- package/dist/web/_app/immutable/chunks/pwrC_shA.js +1 -0
- package/dist/web/_app/immutable/entry/app.DjA3G34a.js +2 -0
- package/dist/web/_app/immutable/entry/start.DLZQ1-hB.js +1 -0
- package/dist/web/_app/immutable/nodes/0.B3dFDaCX.js +2 -0
- package/dist/web/_app/immutable/nodes/{1.gy-UNDF3.js → 1.B7XWRWiG.js} +1 -1
- package/dist/web/_app/immutable/nodes/{2.CFmJZos9.js → 2.BEOcFuIE.js} +1 -1
- package/dist/web/_app/immutable/nodes/3.NxBZXoOo.js +1 -0
- package/dist/web/_app/immutable/nodes/4.DyI15z1O.js +17 -0
- package/dist/web/_app/immutable/nodes/{5.C7yLiq2I.js → 5.CLl1ihqQ.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.DKaTmAiw.js → 6.DcamPcH8.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.CA3sQ74A.js → 7.C8Ctaz0_.js} +1 -1
- package/dist/web/_app/immutable/nodes/8.B5PKapjV.js +2 -0
- package/dist/web/_app/immutable/nodes/{9.BVVyKTae.js → 9.CjhBf9vj.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +10 -10
- package/package.json +2 -1
- package/dist/web/_app/immutable/assets/AppShell.C00jH_aT.css +0 -1
- package/dist/web/_app/immutable/chunks/B3v6bkHV.js +0 -27
- package/dist/web/_app/immutable/chunks/BQlTvYWB.js +0 -1
- package/dist/web/_app/immutable/chunks/CRcLi9EQ.js +0 -1
- package/dist/web/_app/immutable/chunks/DL7u7dQi.js +0 -2
- package/dist/web/_app/immutable/chunks/m74CvwCG.js +0 -2
- package/dist/web/_app/immutable/chunks/trveDs8t.js +0 -1
- package/dist/web/_app/immutable/entry/app.3j3I-9SC.js +0 -2
- package/dist/web/_app/immutable/entry/start.CYScsHkx.js +0 -1
- package/dist/web/_app/immutable/nodes/0.CxCm4CPW.js +0 -2
- package/dist/web/_app/immutable/nodes/3.D1yvWsPv.js +0 -1
- package/dist/web/_app/immutable/nodes/4.LKUIo9Zg.js +0 -16
- package/dist/web/_app/immutable/nodes/8.DEuJARDO.js +0 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{c as E,a as u,k as As,r as Re,q as bt,f as x,m as Is,u as Ms,t as It,s as ve,d as Ns,e as Ht,b as Os}from"./CjKjQEMp.js";import{bi as Fs,h as Rs,a as zs,bs as Ds,b as Ls,f as p,S as dn,y as o,V as b,z as O,x as _,bt as Zr,al as Bs,ar as _n,bu as Ks,m as eo,ao as Vs,B as Us,D as Ct,F as dr,P as Ws,p as D,bd as ce,n as L,o as P,u as k,bv as js,bw as po,q as A,t as Ze,v as ee,_ as go,T as On,U as mo}from"./D-tW7Byc.js";import{B as Gs,l as We,s as G,p as S,i as N,r as me,b as br}from"./EhE2EcYu.js";import{m as pt,y as sr,e as W,b as lt,c as Qe,p as Vn,d as yo,s as bo,B as $e,l as zt,w as I,a as Rt,z as qs,A as Hs,g as Ys}from"./ByFfmBEu.js";import{I as je,s as Ge,r as Xt,X as fr,a as mt,i as yt,n as Ue,P as to,T as ir,R as Xs}from"./pwrC_shA.js";import{c as B}from"./Dpn7ZAUg.js";import{g as Dt}from"./C5cMwwSn.js";import{I as Bn}from"./BV_9Nfp2.js";import"./eEhMI0BQ.js";function Qs(){return Symbol(Fs)}const Js=Symbol("NaN");function Zs(n,e,t){Rs&&zs();var r=new Gs(n),s=!Ds();Ls(()=>{var a=e();a!==a&&(a=Js),s&&a!==null&&typeof a=="object"&&(a={}),r.ensure(a,t)})}function _o(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];je(n,G({name:"search"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function Fn(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m9 18 6-6-6-6"}]];je(n,G({name:"chevron-right"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function Rn(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 9 6 6 6-6"}]];je(n,G({name:"chevron-down"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ei(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]];je(n,G({name:"log-out"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}const ti={project:"#6e6ee8",organization:"#00c2b2",person:"#f0c246",meeting:"#ff7a00",deal:"#3ecf8e",deliverable:"#ff3864",decision:"#00a8ff",dataset:"#be00ff",process:"#f5c800",deck:"#6e6ee8",doc:"#00a8ff",document:"#a855f7",note:"#94a3b8",publication:"#ec4899",reference:"#14b8a6",task:"#f97316",role:"#ff7a00","practice-area":"#8b5cf6","case-study":"#06b6d4",standard:"#ff2aa8"};function cn(n){return n?ti[n]??"#5c5c66":"#5c5c66"}const ni={person:"people","practice-area":"practice-areas","case-study":"case-studies",process:"processes"};function ri(n){return ni[n]??n+"s"}function oi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["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"}],["circle",{cx:"12",cy:"12",r:"3"}]];je(n,G({name:"eye"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ar(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["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"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["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"}],["path",{d:"m2 2 20 20"}]];je(n,G({name:"eye-off"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function si(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["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"}],["circle",{cx:"12",cy:"12",r:"3"}]];je(n,G({name:"settings"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ii(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M20 8h-5"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10"}],["path",{d:"M15 14h5l-5 6h5"}]];je(n,G({name:"arrow-down-a-z"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ai(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M11 4h10"}],["path",{d:"M11 8h7"}],["path",{d:"M11 12h4"}]];je(n,G({name:"arrow-down-wide-narrow"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function li(n){return pt(`/api/repos/${encodeURIComponent(n)}/sync`,{method:"POST"})}function Ou(n,e,t){return pt(`/api/repos/${encodeURIComponent(n)}/entities/${encodeURIComponent(e)}/${encodeURIComponent(t)}/refresh`,{method:"POST"})}function Fu(n,e,t){return pt(`/api/repos/${encodeURIComponent(n)}/entities/${encodeURIComponent(e)}/${encodeURIComponent(t)}/refresh/apply`,{method:"POST"})}function Ru(){return pt("/api/sources")}function zu(){return pt("/api/connectors")}function Du(n){return pt(`/api/connectors/${encodeURIComponent(n)}/config`)}function Lu(n,e){return pt(`/api/connectors/${encodeURIComponent(n)}/config`,{method:"POST",body:JSON.stringify({fields:e})})}function Bu(n){return pt(`/api/connectors/${encodeURIComponent(n)}/config`,{method:"DELETE"})}function Ku(n){return pt(`/api/sources/${encodeURIComponent(n)}`)}function Vu(n,e){return pt(`/api/sources/${encodeURIComponent(n)}`,{method:"POST",body:JSON.stringify(e)})}function Uu(n,e){return pt(`/api/repos/${encodeURIComponent(n)}`,{method:"PATCH",body:JSON.stringify({sync:e})})}function ci(){let n=dn({}),e=null,t=null;function r(f,g,T){t&&(clearInterval(t),t=null),e=`${f}/${g}/${T}`,a("enter",f,g,T),t=setInterval(()=>{e&&a("heartbeat",f,g,T)},3e4)}function s(){if(t&&(clearInterval(t),t=null),e){const[f,g,T]=e.split("/");f&&g&&T&&a("leave",f,g,T),e=null}}function a(f,g,T,w){Xt.send({type:"presence",action:f,repo:g,entityType:T,entityId:w})}function i(f){const g=`${f.repo}/${f.entityType}/${f.entityId}`,T=n[g]??[];if(f.action==="leave")n[g]=T.filter(w=>w.id!==f.user.id);else{const w=T.findIndex(y=>y.id===f.user.id);w>=0?(T[w]=f.user,n[g]=[...T]):n[g]=[...T,f.user]}}function l(){if(!e)return;const[f,g,T]=e.split("/");f&&g&&T&&a("enter",f,g,T)}function d(f,g,T,w){const y=`${f}/${g}/${T}`,h=n[y]??[];return w?h.filter(m=>m.id!==w):h}return{enter:r,leave:s,handlePresenceEvent:i,resendCurrentPresence:l,getPresence:d}}const _r=ci();Xt.setPresenceHandler(n=>_r.handlePresenceEvent(n));Xt.setOnConnectCallback(()=>_r.resendCurrentPresence());function ui(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]];je(n,G({name:"users"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function di(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["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"}]];je(n,G({name:"folder-open"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function fi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z"}],["path",{d:"M17 21v-2"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10"}],["path",{d:"M21 21v-2"}],["path",{d:"M3 5V3"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z"}],["path",{d:"M7 5V3"}]];je(n,G({name:"cable"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function hi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M12 22v-5"}],["path",{d:"M15 8V2"}],["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"}],["path",{d:"M9 8V2"}]];je(n,G({name:"plug"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function vi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];je(n,G({name:"info"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function pi(n){return typeof n=="function"}function kn(n){return n!==null&&typeof n=="object"}const gi=["string","number","bigint","boolean"];function hr(n){return n==null||gi.includes(typeof n)?!0:Array.isArray(n)?n.every(e=>hr(e)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const un=Symbol("box"),Qn=Symbol("is-writable");function $(n,e){const t=b(n);return e?{[un]:!0,[Qn]:!0,get current(){return o(t)},set current(r){e(r)}}:{[un]:!0,get current(){return n()}}}function Pn(n){return kn(n)&&un in n}function wr(n){return Pn(n)&&Qn in n}function mi(n){return Pn(n)?n:pi(n)?$(n):wo(n)}function yi(n){return Object.entries(n).reduce((e,[t,r])=>Pn(r)?(wr(r)?Object.defineProperty(e,t,{get(){return r.current},set(s){r.current=s}}):Object.defineProperty(e,t,{get(){return r.current}}),e):Object.assign(e,{[t]:r}),{})}function bi(n){return wr(n)?{[un]:!0,get current(){return n.current}}:n}function wo(n){let e=O(dn(n));return{[un]:!0,[Qn]:!0,get current(){return o(e)},set current(t){_(e,t,!0)}}}function Zt(n){let e=O(dn(n));return{[un]:!0,[Qn]:!0,get current(){return o(e)},set current(t){_(e,t,!0)}}}Zt.from=mi;Zt.with=$;Zt.flatten=yi;Zt.readonly=bi;Zt.isBox=Pn;Zt.isWritableBox=wr;function To(...n){return function(e){for(const t of n)if(t){if(e.defaultPrevented)return;typeof t=="function"?t.call(this,e):t.current?.call(this,e)}}}var no=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_i=/\n/g,wi=/^\s*/,Ti=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Si=/^:\s*/,Ci=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ei=/^[;\s]*/,xi=/^\s+|\s+$/g,ki=`
|
|
2
|
+
`,ro="/",oo="*",Yt="",Pi="comment",$i="declaration";function Ai(n,e){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];e=e||{};var t=1,r=1;function s(h){var m=h.match(_i);m&&(t+=m.length);var F=h.lastIndexOf(ki);r=~F?h.length-F:r+h.length}function a(){var h={line:t,column:r};return function(m){return m.position=new i(h),f(),m}}function i(h){this.start=h,this.end={line:t,column:r},this.source=e.source}i.prototype.content=n;function l(h){var m=new Error(e.source+":"+t+":"+r+": "+h);if(m.reason=h,m.filename=e.source,m.line=t,m.column=r,m.source=n,!e.silent)throw m}function d(h){var m=h.exec(n);if(m){var F=m[0];return s(F),n=n.slice(F.length),m}}function f(){d(wi)}function g(h){var m;for(h=h||[];m=T();)m!==!1&&h.push(m);return h}function T(){var h=a();if(!(ro!=n.charAt(0)||oo!=n.charAt(1))){for(var m=2;Yt!=n.charAt(m)&&(oo!=n.charAt(m)||ro!=n.charAt(m+1));)++m;if(m+=2,Yt===n.charAt(m-1))return l("End of comment missing");var F=n.slice(2,m-2);return r+=2,s(F),n=n.slice(m),r+=2,h({type:Pi,comment:F})}}function w(){var h=a(),m=d(Ti);if(m){if(T(),!d(Si))return l("property missing ':'");var F=d(Ci),ye=h({type:$i,property:so(m[0].replace(no,Yt)),value:F?so(F[0].replace(no,Yt)):Yt});return d(Ei),ye}}function y(){var h=[];g(h);for(var m;m=w();)m!==!1&&(h.push(m),g(h));return h}return f(),y()}function so(n){return n?n.replace(xi,Yt):Yt}function Ii(n,e){let t=null;if(!n||typeof n!="string")return t;const r=Ai(n),s=typeof e=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:i,value:l}=a;s?e(i,l,a):l&&(t=t||{},t[i]=l)}),t}const Mi=/\d/,Ni=["-","_","/","."];function Oi(n=""){if(!Mi.test(n))return n!==n.toLowerCase()}function Fi(n){const e=[];let t="",r,s;for(const a of n){const i=Ni.includes(a);if(i===!0){e.push(t),t="",r=void 0;continue}const l=Oi(a);if(s===!1){if(r===!1&&l===!0){e.push(t),t=a,r=l;continue}if(r===!0&&l===!1&&t.length>1){const d=t.at(-1);e.push(t.slice(0,Math.max(0,t.length-1))),t=d+a,r=l;continue}}t+=a,r=l,s=i}return e.push(t),e}function So(n){return n?Fi(n).map(e=>zi(e)).join(""):""}function Ri(n){return Di(So(n||""))}function zi(n){return n?n[0].toUpperCase()+n.slice(1):""}function Di(n){return n?n[0].toLowerCase()+n.slice(1):""}function zn(n){if(!n)return{};const e={};function t(r,s){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){e[So(r)]=s;return}if(r.startsWith("--")){e[r]=s;return}e[Ri(r)]=s}return Ii(n,t),e}function Qt(...n){return(...e)=>{for(const t of n)typeof t=="function"&&t(...e)}}function Li(n,e){const t=RegExp(n,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(t)?r.replace(t,e):r}}const Bi=Li(/[A-Z]/,n=>`-${n.toLowerCase()}`);function Ki(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(e=>`${Bi(e)}: ${n[e]};`).join(`
|
|
3
|
+
`)}function Vi(n={}){return Ki(n).replace(`
|
|
4
|
+
`," ")}const Ui=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Wi=new Set(Ui);function ji(n){return Wi.has(n)}function Ke(...n){const e={...n[0]};for(let t=1;t<n.length;t++){const r=n[t];if(r){for(const s of Object.keys(r)){const a=e[s],i=r[s],l=typeof a=="function",d=typeof i=="function";if(l&&ji(s)){const f=a,g=i;e[s]=To(f,g)}else if(l&&d)e[s]=Qt(a,i);else if(s==="class"){const f=hr(a),g=hr(i);f&&g?e[s]=sr(a,i):f?e[s]=sr(a):g&&(e[s]=sr(i))}else if(s==="style"){const f=typeof a=="object",g=typeof i=="object",T=typeof a=="string",w=typeof i=="string";if(f&&g)e[s]={...a,...i};else if(f&&w){const y=zn(i);e[s]={...a,...y}}else if(T&&g){const y=zn(a);e[s]={...y,...i}}else if(T&&w){const y=zn(a),h=zn(i);e[s]={...y,...h}}else f?e[s]=a:g?e[s]=i:T?e[s]=a:w&&(e[s]=i)}else e[s]=i!==void 0?i:a}for(const s of Object.getOwnPropertySymbols(r)){const a=e[s],i=r[s];e[s]=i!==void 0?i:a}}}return typeof e.style=="object"&&(e.style=Vi(e.style).replaceAll(`
|
|
5
|
+
`," ")),e.hidden===!1&&(e.hidden=void 0,delete e.hidden),e.disabled===!1&&(e.disabled=void 0,delete e.disabled),e}const Gi=typeof window<"u"?window:void 0;function qi(n){let e=n.activeElement;for(;e?.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}class vr extends Map{#e=new Map;#t=O(0);#n=O(0);#r=Zr||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#n.v=super.size}}#o(e){return Zr===this.#r?O(e):Bs(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#o(0),t.set(e,r);else return o(this.#t),!1;return o(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#o(0),t.set(e,r);else{o(this.#t);return}return o(r),super.get(e)}set(e,t){var r=this.#e,s=r.get(e),a=super.get(e),i=super.set(e,t),l=this.#t;if(s===void 0)s=this.#o(0),r.set(e,s),_(this.#n,super.size),_n(l);else if(a!==t){_n(s);var d=l.reactions===null?null:new Set(l.reactions),f=d===null||!s.reactions?.every(g=>d.has(g));f&&_n(l)}return i}delete(e){var t=this.#e,r=t.get(e),s=super.delete(e);return r!==void 0&&(t.delete(e),_(r,-1)),s&&(_(this.#n,super.size),_n(this.#t)),s}clear(){if(super.size!==0){super.clear();var e=this.#e;_(this.#n,0);for(var t of e.values())_(t,-1);_n(this.#t),e.clear()}}#s(){o(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#o(0);e.set(t,r)}}for([,r]of this.#e)o(r)}keys(){return o(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return o(this.#n),super.size}}class Hi{#e;#t;constructor(e={}){const{window:t=Gi,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=As(s=>{const a=Re(t,"focusin",s),i=Re(t,"focusout",s);return()=>{a(),i()}}))}get current(){return this.#t?.(),this.#e?qi(this.#e):null}}new Hi;class fn{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return Ks(this.#t)}get(){const e=eo(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=eo(this.#t);return t===void 0?e:t}set(e){return Vs(this.#t,e)}}function Yi(n,e){switch(n){case"post":Ct(e);break;case"pre":Us(e);break}}function Co(n,e,t,r={}){const{lazy:s=!1}=r;let a=!s,i=Array.isArray(n)?[]:void 0;Yi(e,()=>{const l=Array.isArray(n)?n.map(f=>f()):n();if(!a){a=!0,i=l;return}const d=dr(()=>t(l,i));return i=l,d})}function Xe(n,e,t){Co(n,"post",e,t)}function Xi(n,e,t){Co(n,"pre",e,t)}Xe.pre=Xi;function hn(n){Ct(()=>()=>{n()})}function Eo(n,e){return setTimeout(e,n)}function Mt(n){Ws().then(n)}const Qi=1,Ji=9,Zi=11;function pr(n){return kn(n)&&n.nodeType===Qi&&typeof n.nodeName=="string"}function xo(n){return kn(n)&&n.nodeType===Ji}function ea(n){return kn(n)&&n.constructor?.name==="VisualViewport"}function ta(n){return kn(n)&&n.nodeType!==void 0}function ko(n){return ta(n)&&n.nodeType===Zi&&"host"in n}function na(n,e){if(!n||!e||!pr(n)||!pr(e))return!1;const t=e.getRootNode?.();if(n===e||n.contains(e))return!0;if(t&&ko(t)){let r=e;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function $n(n){return xo(n)?n:ea(n)?n.document:n?.ownerDocument??document}function Po(n){return ko(n)?Po(n.host):xo(n)?n.defaultView??window:pr(n)?n.ownerDocument?.defaultView??window:window}function ra(n){let e=n.activeElement;for(;e?.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}class Tr{element;#e=b(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return o(this.#e)}set root(e){_(this.#e,e)}constructor(e){typeof e=="function"?this.element=$(e):this.element=e}getDocument=()=>$n(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>ra(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)}function ot(n,e){return{[Qs()]:t=>Pn(n)?(n.current=t,dr(()=>e?.(t)),()=>{"isConnected"in t&&t.isConnected||(n.current=null,e?.(null))}):(n(t),dr(()=>e?.(t)),()=>{"isConnected"in t&&t.isConnected||(n(null),e?.(null))})}}function Sr(n){return n?"true":"false"}function Bt(n){return n?"":void 0}function oa(n){return n?!0:void 0}function Cr(n){return n?"open":"closed"}function Wu(n,e){return e?"mixed":n?"true":"false"}class sa{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}}function Er(n){const e=new sa(n);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}const xn="ArrowDown",xr="ArrowLeft",kr="ArrowRight",Un="ArrowUp",$o="End",An="Enter",ia="Escape",Ao="Home",aa="PageDown",la="PageUp",vn=" ",ca="Tab";function ua(n){return window.getComputedStyle(n).getPropertyValue("direction")}function da(n="ltr",e="horizontal"){return{horizontal:n==="rtl"?xr:kr,vertical:xn}[e]}function fa(n="ltr",e="horizontal"){return{horizontal:n==="rtl"?kr:xr,vertical:Un}[e]}function ha(n="ltr",e="horizontal"){return["ltr","rtl"].includes(n)||(n="ltr"),["horizontal","vertical"].includes(e)||(e="horizontal"),{nextKey:da(n,e),prevKey:fa(n,e)}}const Io=typeof document<"u",io=va();function va(){return Io&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Nt(n){return n instanceof HTMLElement}function gr(n){return n instanceof Element}function Mo(n){return n instanceof Element||n instanceof SVGElement}function ju(n){return n!==null}function pa(n){return n instanceof HTMLInputElement&&"select"in n}class No{#e;#t=Zt(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,r=!1){const s=this.#e.rootNode.current;if(!s||!e)return;const a=this.getCandidateNodes();if(!a.length)return;const i=a.indexOf(e),l=ua(s),{nextKey:d,prevKey:f}=ha(l,this.#e.orientation.current),g=this.#e.loop.current,T={[d]:i+1,[f]:i-1,[Ao]:0,[$o]:a.length-1};if(r){const h=d===xn?kr:xn,m=f===Un?xr:Un;T[h]=i+1,T[m]=i-1}let w=T[t.key];if(w===void 0)return;t.preventDefault(),w<0&&g?w=a.length-1:w===a.length&&g&&(w=0);const y=a[w];if(y)return y.focus(),this.#t.current=y.id,this.#e.onCandidateFocus?.(y),y}getTabIndex(e){const t=this.getCandidateNodes(),r=this.#t.current!==null;return e&&!r&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){const e=this.#t.current;if(!e)return;const t=this.#e.rootNode.current?.querySelector(`#${e}`);!t||!Nt(t)||t.focus()}}class ga{#e;#t=null;constructor(e){this.#e=e,hn(()=>this.#n())}#n(){this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null)}run(e){this.#n();const t=this.#e.ref.current;if(t){if(typeof t.getAnimations!="function"){this.#r(e);return}this.#t=window.requestAnimationFrame(()=>{const r=t.getAnimations();if(r.length===0){this.#r(e);return}Promise.allSettled(r.map(s=>s.finished)).then(()=>{this.#r(e)})})}}#r(e){const t=()=>{e()};this.#e.afterTick?Mt(t):t()}}class mr{#e;#t;#n;#r=O(!1);constructor(e){this.#e=e,_(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new ga({ref:this.#e.ref,afterTick:this.#e.open}),Xe(()=>this.#e.open.current,t=>{t&&_(this.#r,!0),this.#t&&this.#n.run(()=>{t===this.#e.open.current&&(this.#e.open.current||_(this.#r,!1),this.#e.onComplete?.())})})}get shouldRender(){return o(this.#r)}}function pe(){}function _t(n,e){return`bits-${n}`}const ma=Er({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),Ot=new fn("Dialog.Root | AlertDialog.Root");class Jn{static create(e){const t=Ot.getOr(null);return Ot.set(new Jn(e,t))}opts;#e=O(null);get triggerNode(){return o(this.#e)}set triggerNode(e){_(this.#e,e,!0)}#t=O(null);get contentNode(){return o(this.#t)}set contentNode(e){_(this.#t,e,!0)}#n=O(null);get overlayNode(){return o(this.#n)}set overlayNode(e){_(this.#n,e,!0)}#r=O(null);get descriptionNode(){return o(this.#r)}set descriptionNode(e){_(this.#r,e,!0)}#o=O(void 0);get contentId(){return o(this.#o)}set contentId(e){_(this.#o,e,!0)}#s=O(void 0);get titleId(){return o(this.#s)}set titleId(e){_(this.#s,e,!0)}#a=O(void 0);get triggerId(){return o(this.#a)}set triggerId(e){_(this.#a,e,!0)}#i=O(void 0);get descriptionId(){return o(this.#i)}set descriptionId(e){_(this.#i,e,!0)}#l=O(null);get cancelNode(){return o(this.#l)}set cancelNode(e){_(this.#l,e,!0)}#u=O(0);get nestedOpenCount(){return o(this.#u)}set nestedOpenCount(e){_(this.#u,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new mr({ref:$(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new mr({ref:$(()=>this.overlayNode),open:this.opts.open,enabled:!0}),Xe(()=>this.opts.open.current,r=>{this.parent&&(r?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),hn(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>ma.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#c=b(()=>({"data-state":Cr(this.opts.open.current)}));get sharedProps(){return o(this.#c)}set sharedProps(e){_(this.#c,e)}}class Pr{static create(e){return new Pr(e,Ot.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===vn||e.key===An)&&(e.preventDefault(),this.root.handleClose())}#e=b(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(e){_(this.#e,e)}}class $r{static create(e){return new $r(e,Ot.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(this.opts.ref)}#e=b(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(e){_(this.#e,e)}}class Ar{static create(e){return new Ar(e,Ot.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=ot(this.opts.ref),Xe.pre(()=>this.opts.id.current,r=>{this.root.titleId=r})}#e=b(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(e){_(this.#e,e)}}class Ir{static create(e){return new Ir(e,Ot.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=ot(this.opts.ref,r=>{this.root.descriptionNode=r}),Xe.pre(()=>this.opts.id.current,r=>{this.root.descriptionId=r})}#e=b(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(e){_(this.#e,e)}}class Zn{static create(e){return new Zn(e,Ot.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(this.opts.ref,r=>{this.root.contentNode=r,this.root.contentId=r?.id})}#e=b(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#e)}set snippetProps(e){_(this.#e,e)}#t=b(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":Bt(this.root.nestedOpenCount>0),"data-nested":Bt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(e){_(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}}class Mr{static create(e){return new Mr(e,Ot.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(this.opts.ref,r=>this.root.overlayNode=r)}#e=b(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#e)}set snippetProps(e){_(this.#e,e)}#t=b(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Bt(this.root.nestedOpenCount>0),"data-nested":Bt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(e){_(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class Nr{static create(e){return new Nr(e,Ot.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(this.opts.ref,r=>this.root.cancelNode=r),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===vn||e.key===An)&&(e.preventDefault(),this.root.handleClose())}#e=b(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(e){_(this.#e,e)}}function ya(n,e){D(e,!0);let t=S(e,"open",15,!1),r=S(e,"onOpenChange",3,pe),s=S(e,"onOpenChangeComplete",3,pe);Jn.create({variant:$(()=>"alert-dialog"),open:$(()=>t(),l=>{t(l),r()(l)}),onOpenChangeComplete:$(()=>s())});var a=E(),i=p(a);W(i,()=>e.children??ce),u(n,a),L()}var ba=x("<div><!></div>");function Oo(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=S(e,"level",3,2),i=me(e,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const l=Ar.create({id:$(()=>r()),level:$(()=>a()),ref:$(()=>s(),y=>s(y))}),d=b(()=>Ke(i,l.props));var f=E(),g=p(f);{var T=y=>{var h=E(),m=p(h);W(m,()=>e.child,()=>({props:o(d)})),u(y,h)},w=y=>{var h=ba();lt(h,()=>({...o(d)}));var m=P(h);W(m,()=>e.children??ce),k(h),u(y,h)};N(g,y=>{e.child?y(T):y(w,!1)})}u(n,f),L()}var _a=x("<button><!></button>");function wa(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=me(e,["$$slots","$$events","$$legacy","children","child","id","ref"]);const i=$r.create({id:$(()=>r()),ref:$(()=>s(),w=>s(w))}),l=b(()=>Ke(a,i.props));var d=E(),f=p(d);{var g=w=>{var y=E(),h=p(y);W(h,()=>e.child,()=>({props:o(l)})),u(w,y)},T=w=>{var y=_a();lt(y,()=>({...o(l)}));var h=P(y);W(h,()=>e.children??ce),k(y),u(w,y)};N(f,w=>{e.child?w(g):w(T,!1)})}u(n,d),L()}var Ta=x("<button><!></button>");function Sa(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=S(e,"disabled",3,!1),i=me(e,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const l=Nr.create({id:$(()=>r()),ref:$(()=>s(),y=>s(y)),disabled:$(()=>!!a())}),d=b(()=>Ke(i,l.props));var f=E(),g=p(f);{var T=y=>{var h=E(),m=p(h);W(m,()=>e.child,()=>({props:o(d)})),u(y,h)},w=y=>{var h=Ta();lt(h,()=>({...o(d)}));var m=P(h);W(m,()=>e.children??ce),k(h),u(y,h)};N(g,y=>{e.child?y(T):y(w,!1)})}u(n,f),L()}function Ca(n,e){var t=E(),r=p(t);Zs(r,()=>e.children,s=>{var a=E(),i=p(a);W(i,()=>e.children??ce),u(s,a)}),u(n,t)}const Ea=new fn("BitsConfig");function xa(){const n=new ka(null,{});return Ea.getOr(n).opts}class ka{opts;constructor(e,t){const r=Pa(e,t);this.opts={defaultPortalTo:r(s=>s.defaultPortalTo),defaultLocale:r(s=>s.defaultLocale)}}}function Pa(n,e){return t=>$(()=>{const s=t(e)?.current;if(s!==void 0)return s;if(n!==null)return t(n.opts)?.current})}function $a(n,e){return t=>{const r=xa();return $(()=>{const s=t();if(s!==void 0)return s;const a=n(r).current;return a!==void 0?a:e})}}const Aa=$a(n=>n.defaultPortalTo,"body");function Fo(n,e){D(e,!0);const t=Aa(()=>e.to),r=js();let s=b(a);function a(){if(!Io||e.disabled)return null;let T=null;return typeof t.current=="string"?T=document.querySelector(t.current):T=t.current,T}let i;function l(){i&&(Ms(i),i=null)}Xe([()=>o(s),()=>e.disabled],([T,w])=>{if(!T||w){l();return}return i=Is(Ca,{target:T,props:{children:e.children},context:r}),()=>{l()}});var d=E(),f=p(d);{var g=T=>{var w=E(),y=p(w);W(y,()=>e.children??ce),u(T,w)};N(f,T=>{e.disabled&&T(g)})}u(n,d),L()}class Ia{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const s=a=>{t(a)};return Re(e,this.eventName,s,r)}}function ao(n,e=500){let t=null;const r=(...s)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...s)},e)};return r.destroy=()=>{t!==null&&(clearTimeout(t),t=null)},r}function Ro(n,e){return n===e||n.contains(e)}function zo(n){return n?.ownerDocument??document}function Ma(n,e){const{clientX:t,clientY:r}=n,s=e.getBoundingClientRect();return t<s.left||t>s.right||r<s.top||r>s.bottom}const Na=[An,vn],Oa=[xn,la,Ao],Do=[Un,aa,$o],Fa=[...Oa,...Do];function lo(n){return n.pointerType==="mouse"}function Ra(n,{select:e=!1}={}){if(!n||!n.focus)return;const t=$n(n);if(t.activeElement===n)return;const r=t.activeElement;n.focus({preventScroll:!0}),n!==r&&pa(n)&&e&&n.select()}function za(n,{select:e=!1}={},t){const r=t();for(const s of n)if(Ra(s,{select:e}),t()!==r)return!0}let wn=O(!1);class Lt{static _refs=0;static _cleanup;constructor(){Ct(()=>(Lt._refs===0&&(Lt._cleanup=po(()=>{const e=[],t=s=>{_(wn,!1)},r=s=>{_(wn,!0)};return e.push(Re(document,"pointerdown",t,{capture:!0}),Re(document,"pointermove",t,{capture:!0}),Re(document,"keydown",r,{capture:!0})),Qt(...e)})),Lt._refs++,()=>{Lt._refs--,Lt._refs===0&&(_(wn,!1),Lt._cleanup?.())}))}get current(){return o(wn)}set current(e){_(wn,e,!0)}}var Lo=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Wn=Lo.join(","),Bo=typeof Element>"u",Jt=Bo?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jn=!Bo&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},Gn=function(e,t){var r;t===void 0&&(t=!0);var s=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=s===""||s==="true",i=a||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Gn(e.parentNode));return i},Da=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},Ko=function(e,t,r){if(Gn(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(Wn));return t&&Jt.call(e,Wn)&&s.unshift(e),s=s.filter(r),s},qn=function(e,t,r){for(var s=[],a=Array.from(e);a.length;){var i=a.shift();if(!Gn(i,!1))if(i.tagName==="SLOT"){var l=i.assignedElements(),d=l.length?l:i.children,f=qn(d,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:i,candidates:f})}else{var g=Jt.call(i,Wn);g&&r.filter(i)&&(t||!e.includes(i))&&s.push(i);var T=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),w=!Gn(T,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(T&&w){var y=qn(T===!0?i.children:T.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:i,candidates:y})}else a.unshift.apply(a,i.children)}}return s},Vo=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Uo=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Da(e))&&!Vo(e)?0:e.tabIndex},La=function(e,t){var r=Uo(e);return r<0&&t&&!Vo(e)?0:r},Ba=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Wo=function(e){return e.tagName==="INPUT"},Ka=function(e){return Wo(e)&&e.type==="hidden"},Va=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Ua=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Wa=function(e){if(!e.name)return!0;var t=e.form||jn(e),r=function(l){return t.querySelectorAll('input[type="radio"][name="'+l+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(e.name));else try{s=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=Ua(s,e.form);return!a||a===e},ja=function(e){return Wo(e)&&e.type==="radio"},Ga=function(e){return ja(e)&&!Wa(e)},qa=function(e){var t,r=e&&jn(e),s=(t=r)===null||t===void 0?void 0:t.host,a=!1;if(r&&r!==e){var i,l,d;for(a=!!((i=s)!==null&&i!==void 0&&(l=i.ownerDocument)!==null&&l!==void 0&&l.contains(s)||e!=null&&(d=e.ownerDocument)!==null&&d!==void 0&&d.contains(e));!a&&s;){var f,g,T;r=jn(s),s=(f=r)===null||f===void 0?void 0:f.host,a=!!((g=s)!==null&&g!==void 0&&(T=g.ownerDocument)!==null&&T!==void 0&&T.contains(s))}}return a},co=function(e){var t=e.getBoundingClientRect(),r=t.width,s=t.height;return r===0&&s===0},Ha=function(e,t){var r=t.displayCheck,s=t.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var a=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(e).visibility==="hidden")return!0;var i=Jt.call(e,"details>summary:first-of-type"),l=i?e.parentElement:e;if(Jt.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var d=e;e;){var f=e.parentElement,g=jn(e);if(f&&!f.shadowRoot&&s(f)===!0)return co(e);e.assignedSlot?e=e.assignedSlot:!f&&g!==e.ownerDocument?e=g.host:e=f}e=d}if(qa(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return co(e);return!1},Ya=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var s=t.children.item(r);if(s.tagName==="LEGEND")return Jt.call(t,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}t=t.parentElement}return!1},Hn=function(e,t){return!(t.disabled||Ka(t)||Ha(t,e)||Va(t)||Ya(t))},yr=function(e,t){return!(Ga(t)||Uo(t)<0||!Hn(e,t))},Xa=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},jo=function(e){var t=[],r=[];return e.forEach(function(s,a){var i=!!s.scopeParent,l=i?s.scopeParent:s,d=La(l,i),f=i?jo(s.candidates):l;d===0?i?t.push.apply(t,f):t.push(l):r.push({documentOrder:a,tabIndex:d,item:s,isScope:i,content:f})}),r.sort(Ba).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(t)},Go=function(e,t){t=t||{};var r;return t.getShadowRoot?r=qn([e],t.includeContainer,{filter:yr.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Xa}):r=Ko(e,t.includeContainer,yr.bind(null,t)),jo(r)},qo=function(e,t){t=t||{};var r;return t.getShadowRoot?r=qn([e],t.includeContainer,{filter:Hn.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=Ko(e,t.includeContainer,Hn.bind(null,t)),r},Or=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Jt.call(e,Wn)===!1?!1:yr(t,e)},Qa=Lo.concat("iframe:not([inert]):not([inert] *)").join(","),Ho=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Jt.call(e,Qa)===!1?!1:Hn(t,e)};function En(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Ja(n,e){if(!Or(n,En()))return Za(n,e);const t=$n(n),r=Go(t.body,En());e==="prev"&&r.reverse();const s=r.indexOf(n);return s===-1?t.body:r.slice(s+1)[0]}function Za(n,e){const t=$n(n);if(!Ho(n,En()))return t.body;const r=qo(t.body,En());e==="prev"&&r.reverse();const s=r.indexOf(n);return s===-1?t.body:r.slice(s+1).find(i=>Or(i,En()))??t.body}function el(n,e){return n.length!==e.length?!1:n.every((t,r)=>Yo(t,e[r]))}function Yo(n,e){return Number.isNaN(n)&&Number.isNaN(e)?!0:Array.isArray(n)&&Array.isArray(e)?el(n,e):typeof n=="object"&&typeof e=="object"?tl(n,e):Object.is(n,e)}function tl(n,e){if(typeof n!="object"||typeof e!="object"||n===null||e===null)return!1;const t=Object.keys(n),r=Object.keys(e);if(t.length!==r.length)return!1;for(const s of t)if(!r.includes(s)||!Yo(n[s],e[s]))return!1;return!0}function Gu(n,e,t=!0){if(!(n.length===0||e<0||e>=n.length))return n.length===1&&e===0?n[0]:e===n.length-1?t?n[0]:void 0:n[e+1]}function qu(n,e,t=!0){if(!(n.length===0||e<0||e>=n.length))return n.length===1&&e===0?n[0]:e===0?t?n[n.length-1]:void 0:n[e-1]}function Hu(n,e,t,r=!0){if(n.length===0||e<0||e>=n.length)return;let s=e+t;return r?s=(s%n.length+n.length)%n.length:s=Math.max(0,Math.min(s,n.length-1)),n[s]}function Yu(n,e,t,r=!0){if(n.length===0||e<0||e>=n.length)return;let s=e-t;return r?s=(s%n.length+n.length)%n.length:s=Math.max(0,Math.min(s,n.length-1)),n[s]}function Xo(n,e,t){const r=e.toLowerCase();if(r.endsWith(" ")){const T=r.slice(0,-1);if(n.filter(m=>m.toLowerCase().startsWith(T)).length<=1)return Xo(n,T,t);const y=t?.toLowerCase();if(y&&y.startsWith(T)&&y.charAt(T.length)===" "&&e.trim()===T)return t;const h=n.filter(m=>m.toLowerCase().startsWith(r));if(h.length>0){const m=t?n.indexOf(t):-1;return uo(h,Math.max(m,0)).find(j=>j!==t)||t}}const a=e.length>1&&Array.from(e).every(T=>T===e[0])?e[0]:e,i=a.toLowerCase(),l=t?n.indexOf(t):-1;let d=uo(n,Math.max(l,0));a.length===1&&(d=d.filter(T=>T!==t));const g=d.find(T=>T?.toLowerCase().startsWith(i));return g!==t?g:void 0}function uo(n,e){return n.map((t,r)=>n[(e+r)%n.length])}const nl={afterMs:1e4,onChange:pe};function Qo(n,e){const{afterMs:t,onChange:r,getWindow:s}={...nl,...e};let a=null,i=O(dn(n));function l(){return s().setTimeout(()=>{_(i,n,!0),r?.(n)},t)}return Ct(()=>()=>{a&&s().clearTimeout(a)}),$(()=>o(i),d=>{_(i,d,!0),r?.(d),a&&s().clearTimeout(a),a=l()})}class rl{#e;#t;#n=b(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=b(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=Qo("",{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;const r=o(this.#r)(),s=t.find(d=>d===r)?.textContent?.trim()??"",a=t.map(d=>d.textContent?.trim()??""),i=Xo(a,this.#t.current,s),l=t.find(d=>d.textContent?.trim()===i);return l&&o(this.#n)(l),l}resetTypeahead(){this.#t.current=""}get search(){return this.#t.current}}class ol{#e;#t;#n;#r=O(null);constructor(e){this.#e=e,this.#t=b(()=>this.#e.enabled()),this.#n=Qo(!1,{afterMs:e.transitTimeout??300,onChange:t=>{o(this.#t)&&this.#e.setIsPointerInTransit?.(t)},getWindow:()=>Po(this.#e.triggerNode())}),Xe([e.triggerNode,e.contentNode,e.enabled],([t,r,s])=>{if(!t||!r||!s)return;const a=l=>{this.#s(l,r)},i=l=>{this.#s(l,t)};return Qt(Re(t,"pointerleave",a),Re(r,"pointerleave",i))}),Xe(()=>o(this.#r),()=>{const t=s=>{if(!o(this.#r))return;const a=s.target;if(!gr(a))return;const i={x:s.clientX,y:s.clientY},l=e.triggerNode()?.contains(a)||e.contentNode()?.contains(a),d=!ll(i,o(this.#r));l?this.#o():d&&(this.#o(),e.onPointerExit())},r=$n(e.triggerNode()??e.contentNode());if(r)return Re(r,"pointermove",t)})}#o(){_(this.#r,null),this.#n.current=!1}#s(e,t){const r=e.currentTarget;if(!Nt(r))return;const s={x:e.clientX,y:e.clientY},a=sl(s,r.getBoundingClientRect()),i=il(s,a),l=al(t.getBoundingClientRect()),d=cl([...i,...l]);_(this.#r,d,!0),this.#n.current=!0}}function sl(n,e){const t=Math.abs(e.top-n.y),r=Math.abs(e.bottom-n.y),s=Math.abs(e.right-n.x),a=Math.abs(e.left-n.x);switch(Math.min(t,r,s,a)){case a:return"left";case s:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function il(n,e,t=5){const r=t*1.5;switch(e){case"top":return[{x:n.x-t,y:n.y+t},{x:n.x,y:n.y-r},{x:n.x+t,y:n.y+t}];case"bottom":return[{x:n.x-t,y:n.y-t},{x:n.x,y:n.y+r},{x:n.x+t,y:n.y-t}];case"left":return[{x:n.x+t,y:n.y-t},{x:n.x-r,y:n.y},{x:n.x+t,y:n.y+t}];case"right":return[{x:n.x-t,y:n.y-t},{x:n.x+r,y:n.y},{x:n.x-t,y:n.y+t}]}}function al(n){const{top:e,right:t,bottom:r,left:s}=n;return[{x:s,y:e},{x:t,y:e},{x:t,y:r},{x:s,y:r}]}function ll(n,e){const{x:t,y:r}=n;let s=!1;for(let a=0,i=e.length-1;a<e.length;i=a++){const l=e[a].x,d=e[a].y,f=e[i].x,g=e[i].y;d>r!=g>r&&t<(f-l)*(r-d)/(g-d)+l&&(s=!s)}return s}function cl(n){const e=n.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),ul(e)}function ul(n){if(n.length<=1)return n.slice();const e=[];for(let r=0;r<n.length;r++){const s=n[r];for(;e.length>=2;){const a=e[e.length-1],i=e[e.length-2];if((a.x-i.x)*(s.y-i.y)>=(a.y-i.y)*(s.x-i.x))e.pop();else break}e.push(s)}e.pop();const t=[];for(let r=n.length-1;r>=0;r--){const s=n[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(s.y-i.y)>=(a.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const dl="data-context-menu-trigger",fl="data-context-menu-content",Jo=new fn("Menu.Root"),Fr=new fn("Menu.Root | Menu.Sub"),Zo=new fn("Menu.Content"),hl=new Ia("bitsmenuopen",{bubbles:!1,cancelable:!0}),vl=Er({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class es{static create(e){const t=new es(e);return Jo.set(t)}opts;isUsingKeyboard=new Lt;#e=O(!1);get ignoreCloseAutoFocus(){return o(this.#e)}set ignoreCloseAutoFocus(e){_(this.#e,e,!0)}#t=O(!1);get isPointerInTransit(){return o(this.#t)}set isPointerInTransit(e){_(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>vl.getAttr(e,this.opts.variant.current)}class ts{static create(e,t){return Fr.set(new ts(e,t,null))}opts;root;parentMenu;contentId=$(()=>"");#e=O(null);get contentNode(){return o(this.#e)}set contentNode(e){_(this.#e,e,!0)}contentPresence;#t=O(null);get triggerNode(){return o(this.#t)}set triggerNode(e){_(this.#t,e,!0)}constructor(e,t,r){this.opts=e,this.root=t,this.parentMenu=r,this.contentPresence=new mr({ref:$(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),r&&Xe(()=>r.opts.open.current,()=>{r.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class ns{static create(e){return Zo.set(new ns(e,Fr.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=O("");get search(){return o(this.#e)}set search(e){_(this.#e,e,!0)}#t=0;#n;#r=O(!1);get mounted(){return o(this.#r)}set mounted(e){_(this.#r,e,!0)}#o;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new Tr(e.ref),this.attachment=ot(this.opts.ref,r=>{this.parentMenu.contentNode!==r&&(this.parentMenu.contentNode=r)}),t.contentId=e.id,this.#o=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new ol({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:r=>{this.parentMenu.root.isPointerInTransit=r}}),this.#n=new rl({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new No({rootNode:$(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:$(()=>"vertical")}),Xe(()=>this.parentMenu.contentNode,r=>{if(!r)return;const s=()=>{Mt(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return hl.listen(r,s)}),Ct(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#s(){const e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#a(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=e=>{this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#o)&&this.parentMenu.triggerNode&&Or(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(e){let t=this.parentMenu;for(;t.parentMenu!==null;)t=t.parentMenu;if(!t.triggerNode)return;e.preventDefault();const r=Ja(t.triggerNode,e.shiftKey?"prev":"next");r?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),Mt(()=>{r.focus(),Mt(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===ca){this.handleTabKeyDown(e);return}const t=e.target,r=e.currentTarget;if(!Nt(t)||!Nt(r))return;const s=t.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,a=e.ctrlKey||e.altKey||e.metaKey,i=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(t,e)||e.code==="Space")return;const d=this.#s();s&&!a&&i&&this.#n(e.key,d),e.target?.id===this.parentMenu.contentId.current&&Fa.includes(e.key)&&(e.preventDefault(),Do.includes(e.key)&&d.reverse(),za(d,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){gr(e.currentTarget)&&gr(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=""))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&Mt(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#a()}onItemLeave(e){if(e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#a()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#a()}handleInteractOutside(e){if(!Mo(e.target))return;const t=this.parentMenu.triggerNode?.id;if(e.target.id===t){e.preventDefault();return}e.target.closest(`#${t}`)&&e.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#i=b(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return o(this.#i)}set snippetProps(e){_(this.#i,e)}#l=b(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":Cr(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return o(this.#l)}set props(e){_(this.#l,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}}class pl{opts;content;attachment;#e=O(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=ot(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&lo(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;const r=e.currentTarget;if(!Nt(r))return;r.focus()}}onpointerleave(e){e.defaultPrevented||lo(e)&&this.content.onItemLeave(e)}onfocus(e){Mt(()=>{e.defaultPrevented||this.opts.disabled.current||_(this.#e,!0)})}onblur(e){Mt(()=>{e.defaultPrevented||_(this.#e,!1)})}#t=b(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":Sr(this.opts.disabled.current),"data-disabled":Bt(this.opts.disabled.current),"data-highlighted":o(this.#e)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return o(this.#t)}set props(e){_(this.#t,e)}}class rs{static create(e){const t=new pl(e,Zo.get());return new rs(e,t)}opts;item;root;#e=!1;constructor(e,t){this.opts=e,this.item=t,this.root=t.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;const e=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){const t=this.item.content.search!=="";if(!(this.item.opts.disabled.current||t&&e.key===vn)&&Na.includes(e.key)){if(!Nt(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!Nt(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#n=b(()=>Ke(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return o(this.#n)}set props(e){_(this.#n,e)}}class os{static create(e){return new os(e,Jo.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(this.opts.ref)}#e=b(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return o(this.#e)}set props(e){_(this.#e,e)}}class ss{static create(e){return new ss(e,Fr.get())}opts;parentMenu;attachment;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=ot(this.opts.ref,r=>this.parentMenu.triggerNode=r)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType==="touch")return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType==="touch"&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===vn||e.key===An){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===xn&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=b(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=b(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Sr(this.parentMenu.opts.open.current),"aria-controls":o(this.#e),"data-disabled":Bt(this.opts.disabled.current),"data-state":Cr(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return o(this.#t)}set props(e){_(this.#t,e)}}globalThis.bitsDismissableLayers??=new Map;class Rr{static create(e){return new Rr(e)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#o=!1;#s=void 0;#a;#i=pe;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,Ct(()=>{this.#s=zo(this.opts.ref.current)});let t=pe;const r=()=>{this.#f(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};Xe([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return Eo(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#u())}),r}),hn(()=>{this.#f.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#i(),t()})}#l=e=>{e.defaultPrevented||this.opts.ref.current&&Mt(()=>{!this.opts.ref.current||this.#g(e.target)||e.target&&!this.#o&&this.#a.current?.(e)})};#u(){return Qt(Re(this.#s,"pointerdown",Qt(this.#h,this.#p),{capture:!0}),Re(this.#s,"pointerdown",Qt(this.#v,this.#d)),Re(this.#s,"focusin",this.#l))}#c=e=>{let t=e;t.defaultPrevented&&(t=fo(e)),this.#e.current(e)};#d=ao(e=>{if(!this.opts.ref.current){this.#i();return}const t=this.opts.isValidEvent.current(e,this.opts.ref.current)||yl(e,this.opts.ref.current);if(!this.#r||this.#m()||!t){this.#i();return}let r=e;if(r.defaultPrevented&&(r=fo(r)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#i();return}e.pointerType==="touch"?(this.#i(),this.#i=Re(this.#s,"click",this.#c,{once:!0})):this.#e.current(r)},10);#h=e=>{this.#n[e.type]=!0};#v=e=>{this.#n[e.type]=!1};#p=()=>{this.opts.ref.current&&(this.#r=ml(this.opts.ref.current))};#g=e=>this.opts.ref.current?Ro(this.opts.ref.current,e):!1;#f=ao(()=>{for(const e in this.#n)this.#n[e]=!1;this.#r=!1},20);#m(){return Object.values(this.#n).some(Boolean)}#y=()=>{this.#o=!0};#b=()=>{this.#o=!1};props={onfocuscapture:this.#y,onblurcapture:this.#b}}function gl(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([e,{current:t}])=>t==="close"||t==="ignore")}function ml(n){const e=[...globalThis.bitsDismissableLayers],t=gl(e);if(t)return t[0].opts.ref.current===n;const[r]=e[0];return r.opts.ref.current===n}function yl(n,e){const t=n.target;if(!Mo(t))return!1;const r=!!t.closest(`[${dl}]`);if("button"in n&&n.button>0&&!r)return!1;if("button"in n&&n.button===0&&r)return!0;const s=!!e.closest(`[${fl}]`);return r&&s?!1:zo(t).documentElement.contains(t)&&!Ro(e,t)&&Ma(n,e)}function fo(n){const e=n.currentTarget,t=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let s=!1;return new Proxy(r,{get:(i,l)=>l==="currentTarget"?e:l==="target"?t:l==="preventDefault"?()=>{s=!0,typeof i.preventDefault=="function"&&i.preventDefault()}:l==="defaultPrevented"?s:l in i?i[l]:n[l]})}function is(n,e){D(e,!0);let t=S(e,"interactOutsideBehavior",3,"close"),r=S(e,"onInteractOutside",3,pe),s=S(e,"onFocusOutside",3,pe),a=S(e,"isValidEvent",3,()=>!1);const i=Rr.create({id:$(()=>e.id),interactOutsideBehavior:$(()=>t()),onInteractOutside:$(()=>r()),enabled:$(()=>e.enabled),onFocusOutside:$(()=>s()),isValidEvent:$(()=>a()),ref:e.ref});var l=E(),d=p(l);W(d,()=>e.children??ce,()=>({props:i.props})),u(n,l),L()}globalThis.bitsEscapeLayers??=new Map;class zr{static create(e){return new zr(e)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Tr(this.opts.ref);let t=pe;Xe(()=>e.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>Re(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==ia||!bl(this))return;const t=new KeyboardEvent(e.type,e);e.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(t)}}function bl(n){const e=[...globalThis.bitsEscapeLayers],t=e.findLast(([s,{current:a}])=>a==="close"||a==="ignore");if(t)return t[0]===n;const[r]=e[0];return r===n}function as(n,e){D(e,!0);let t=S(e,"escapeKeydownBehavior",3,"close"),r=S(e,"onEscapeKeydown",3,pe);zr.create({escapeKeydownBehavior:$(()=>t()),onEscapeKeydown:$(()=>r()),enabled:$(()=>e.enabled),ref:e.ref});var s=E(),a=p(s);W(a,()=>e.children??ce),u(n,s),L()}class Dr{static instance;#e=wo([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new Dr),this.instance}register(e){const t=this.getActive();t&&t!==e&&t.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(e,r),this.#e.current=this.#e.current.filter(s=>s!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(r=>r!==e);const t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}}class Lr{#e=!1;#t=null;#n=Dr.getInstance();#r=[];#o;constructor(e){this.#o=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#i(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const e=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#o.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const t=this.#c();t?(t.focus(),this.#n.setFocusMemory(this,t)):this.#t.focus()})}#i(){const e=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#o.onCloseAutoFocus.current?.(e),!e.defaultPrevented){const t=this.#n.getPreFocusMemory(this);if(t&&document.contains(t))try{t.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#o.trap.current)return;const e=this.#t,t=e.ownerDocument,r=i=>{if(this.#e||!this.#n.isActiveScope(this))return;const l=i.target;if(!l)return;if(e.contains(l))this.#n.setFocusMemory(this,l);else{const f=this.#n.getFocusMemory(this);if(f&&e.contains(f)&&Ho(f))i.preventDefault(),f.focus();else{const g=this.#c(),T=this.#d()[0];(g||T||e).focus()}}},s=i=>{if(!this.#o.loop||this.#e||i.key!=="Tab"||!this.#n.isActiveScope(this))return;const l=this.#u();if(l.length===0)return;const d=l[0],f=l[l.length-1];!i.shiftKey&&t.activeElement===f?(i.preventDefault(),d.focus()):i.shiftKey&&t.activeElement===d&&(i.preventDefault(),f.focus())};this.#r.push(Re(t,"focusin",r,{capture:!0}),Re(e,"keydown",s));const a=new MutationObserver(()=>{const i=this.#n.getFocusMemory(this);if(i&&!e.contains(i)){const l=this.#c(),d=this.#d()[0],f=l||d;f?(f.focus(),this.#n.setFocusMemory(this,f)):e.focus()}});a.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>a.disconnect())}#u(){return this.#t?Go(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?qo(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(e){let t=null;return Xe([()=>e.ref.current,()=>e.enabled.current],([r,s])=>{r&&s?(t||(t=new Lr(e)),t.mount(r)):t&&(t.unmount(),t=null)}),hn(()=>{t?.unmount()}),{get props(){return{tabindex:-1}}}}}function ls(n,e){D(e,!0);let t=S(e,"enabled",3,!1),r=S(e,"trapFocus",3,!1),s=S(e,"loop",3,!1),a=S(e,"onCloseAutoFocus",3,pe),i=S(e,"onOpenAutoFocus",3,pe);const l=Lr.use({enabled:$(()=>t()),trap:$(()=>r()),loop:s(),onCloseAutoFocus:$(()=>a()),onOpenAutoFocus:$(()=>i()),ref:e.ref});var d=E(),f=p(d);W(f,()=>e.focusScope??ce,()=>({props:l.props})),u(n,d),L()}globalThis.bitsTextSelectionLayers??=new Map;class Br{static create(e){return new Br(e)}opts;domContext;#e=pe;constructor(e){this.opts=e,this.domContext=new Tr(e.ref);let t=pe;Xe(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#t()),()=>{t(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Qt(Re(this.domContext.getDocument(),"pointerdown",this.#n),Re(this.domContext.getDocument(),"pointerup",To(this.#r,this.opts.onPointerUp.current)))}#n=e=>{const t=this.opts.ref.current,r=e.target;!Nt(t)||!Nt(r)||!this.opts.enabled.current||!wl(this)||!na(t,r)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=_l(t,this.domContext.getDocument().body)))};#r=()=>{this.#e(),this.#e=pe}}const ho=n=>n.style.userSelect||n.style.webkitUserSelect;function _l(n,e){const t=ho(e),r=ho(n);return Dn(e,"none"),Dn(n,"text"),()=>{Dn(e,t),Dn(n,r)}}function Dn(n,e){n.style.userSelect=e,n.style.webkitUserSelect=e}function wl(n){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const t=e.at(-1);return t?t[0]===n:!1}function cs(n,e){D(e,!0);let t=S(e,"preventOverflowTextSelection",3,!0),r=S(e,"onPointerDown",3,pe),s=S(e,"onPointerUp",3,pe);Br.create({id:$(()=>e.id),onPointerDown:$(()=>r()),onPointerUp:$(()=>s()),enabled:$(()=>e.enabled&&t()),ref:e.ref});var a=E(),i=p(a);W(i,()=>e.children??ce),u(n,a),L()}globalThis.bitsIdCounter??={current:0};function Tl(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}class Sl{#e;#t=0;#n=O();#r;constructor(e){this.#e=e}#o(){this.#t-=1,this.#r&&this.#t<=0&&(this.#r(),_(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,o(this.#n)===void 0&&(this.#r=po(()=>{_(this.#n,this.#e(...e),!0)})),Ct(()=>()=>{this.#o()}),o(this.#n)}}const Kn=new vr;let Ln=O(null),lr=null,Tn=null,Sn=!1;const vo=$(()=>{for(const n of Kn.values())if(n)return!0;return!1});let cr=null;const Cl=new Sl(()=>{function n(){document.body.setAttribute("style",o(Ln)??""),document.body.style.removeProperty("--scrollbar-width"),io&&lr?.(),_(Ln,null)}function e(){Tn!==null&&(window.clearTimeout(Tn),Tn=null)}function t(s,a){e(),Sn=!0,cr=Date.now();const i=cr,l=()=>{Tn=null,cr===i&&(us(Kn)?Sn=!1:(Sn=!1,a()))},d=s===null?24:s;Tn=window.setTimeout(l,d)}function r(){o(Ln)===null&&Kn.size===0&&!Sn&&_(Ln,document.body.getAttribute("style"),!0)}return Xe(()=>vo.current,()=>{if(!vo.current)return;r(),Sn=!1;const s=getComputedStyle(document.documentElement),a=getComputedStyle(document.body),i=s.scrollbarGutter?.includes("stable")||a.scrollbarGutter?.includes("stable"),l=window.innerWidth-document.documentElement.clientWidth,f={padding:Number.parseInt(a.paddingRight??"0",10)+l,margin:Number.parseInt(a.marginRight??"0",10)};l>0&&!i&&(document.body.style.paddingRight=`${f.padding}px`,document.body.style.marginRight=`${f.margin}px`,document.body.style.setProperty("--scrollbar-width",`${l}px`)),document.body.style.overflow="hidden",io&&(lr=Re(document,"touchmove",g=>{g.target===document.documentElement&&(g.touches.length>1||g.preventDefault())},{passive:!1})),Mt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),hn(()=>()=>{lr?.()}),{get lockMap(){return Kn},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:t,cancelPendingCleanup:e,ensureInitialStyleCaptured:r}});class El{#e=Tl();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=Cl.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=$(()=>this.#r.lockMap.get(this.#e)??!1,r=>this.#r.lockMap.set(this.#e,r)),hn(()=>{if(this.#r.lockMap.delete(this.#e),us(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function us(n){for(const[e,t]of n)if(t)return!0;return!1}function Yn(n,e){D(e,!0);let t=S(e,"preventScroll",3,!0),r=S(e,"restoreScrollDelay",3,null);t()&&new El(t(),()=>r()),L()}var xl=x("<!> <!>",1),kl=x("<!> <div><!></div>",1);function Pl(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=S(e,"forceMount",3,!1),i=S(e,"interactOutsideBehavior",3,"ignore"),l=S(e,"onCloseAutoFocus",3,pe),d=S(e,"onEscapeKeydown",3,pe),f=S(e,"onOpenAutoFocus",3,pe),g=S(e,"onInteractOutside",3,pe),T=S(e,"preventScroll",3,!0),w=S(e,"trapFocus",3,!0),y=S(e,"restoreScrollDelay",3,null),h=me(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const m=Zn.create({id:$(()=>r()),ref:$(()=>s(),ie=>s(ie))}),F=b(()=>Ke(h,m.props));var ye=E(),j=p(ye);{var te=ie=>{ls(ie,{get ref(){return m.opts.ref},loop:!0,get trapFocus(){return w()},get enabled(){return m.root.opts.open.current},get onCloseAutoFocus(){return l()},onOpenAutoFocus:ae=>{f()(ae),!ae.defaultPrevented&&(ae.preventDefault(),Eo(0,()=>m.opts.ref.current?.focus()))},focusScope:(ae,be)=>{let Se=()=>be?.().props;as(ae,G(()=>o(F),{get enabled(){return m.root.opts.open.current},get ref(){return m.opts.ref},onEscapeKeydown:Ie=>{d()(Ie),!Ie.defaultPrevented&&m.root.handleClose()},children:(Ie,Me)=>{is(Ie,G(()=>o(F),{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},get interactOutsideBehavior(){return i()},onInteractOutside:ue=>{g()(ue),!ue.defaultPrevented&&m.root.handleClose()},children:(ue,de)=>{cs(ue,G(()=>o(F),{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},children:(Ce,fe)=>{var he=E(),_e=p(he);{var Ne=ge=>{var R=xl(),Ee=p(R);{var qe=De=>{Yn(De,{get preventScroll(){return T()},get restoreScrollDelay(){return y()}})};N(Ee,De=>{m.root.opts.open.current&&De(qe)})}var xe=A(Ee,2);{let De=b(()=>({props:Ke(o(F),Se()),...m.snippetProps}));W(xe,()=>e.child,()=>o(De))}u(ge,R)},ze=ge=>{var R=kl(),Ee=p(R);Yn(Ee,{get preventScroll(){return T()}});var qe=A(Ee,2);lt(qe,De=>({...De}),[()=>Ke(o(F),Se())]);var xe=P(qe);W(xe,()=>e.children??ce),k(qe),u(ge,R)};N(_e,ge=>{e.child?ge(Ne):ge(ze,!1)})}u(Ce,he)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};N(j,ie=>{(m.shouldRender||a())&&ie(te)})}u(n,ye),L()}var $l=x("<div><!></div>");function ds(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"forceMount",3,!1),a=S(e,"ref",15,null),i=me(e,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const l=Mr.create({id:$(()=>r()),ref:$(()=>a(),w=>a(w))}),d=b(()=>Ke(i,l.props));var f=E(),g=p(f);{var T=w=>{var y=E(),h=p(y);{var m=ye=>{var j=E(),te=p(j);{let ie=b(()=>({props:Ke(o(d)),...l.snippetProps}));W(te,()=>e.child,()=>o(ie))}u(ye,j)},F=ye=>{var j=$l();lt(j,ie=>({...ie}),[()=>Ke(o(d))]);var te=P(j);W(te,()=>e.children??ce,()=>l.snippetProps),k(j),u(ye,j)};N(h,ye=>{e.child?ye(m):ye(F,!1)})}u(w,y)};N(g,w=>{(l.shouldRender||s())&&w(T)})}u(n,f),L()}var Al=x("<div><!></div>");function Il(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=me(e,["$$slots","$$events","$$legacy","id","children","child","ref"]);const i=Ir.create({id:$(()=>r()),ref:$(()=>s(),w=>s(w))}),l=b(()=>Ke(a,i.props));var d=E(),f=p(d);{var g=w=>{var y=E(),h=p(y);W(h,()=>e.child,()=>({props:o(l)})),u(w,y)},T=w=>{var y=Al();lt(y,()=>({...o(l)}));var h=P(y);W(h,()=>e.children??ce),k(y),u(w,y)};N(f,w=>{e.child?w(g):w(T,!1)})}u(n,d),L()}function Ml(n,e){D(e,!0);let t=S(e,"open",15,!1),r=S(e,"onOpenChange",3,pe),s=S(e,"onOpenChangeComplete",3,pe);Jn.create({variant:$(()=>"dialog"),open:$(()=>t(),l=>{t(l),r()(l)}),onOpenChangeComplete:$(()=>s())});var a=E(),i=p(a);W(i,()=>e.children??ce),u(n,a),L()}var Nl=x("<button><!></button>");function Ol(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=S(e,"disabled",3,!1),i=me(e,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const l=Pr.create({variant:$(()=>"close"),id:$(()=>r()),ref:$(()=>s(),y=>s(y)),disabled:$(()=>!!a())}),d=b(()=>Ke(i,l.props));var f=E(),g=p(f);{var T=y=>{var h=E(),m=p(h);W(m,()=>e.child,()=>({props:o(d)})),u(y,h)},w=y=>{var h=Nl();lt(h,()=>({...o(d)}));var m=P(h);W(m,()=>e.children??ce),k(h),u(y,h)};N(g,y=>{e.child?y(T):y(w,!1)})}u(n,f),L()}var Fl=x("<!> <!>",1),Rl=x("<!> <div><!></div>",1);function zl(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=S(e,"forceMount",3,!1),i=S(e,"onCloseAutoFocus",3,pe),l=S(e,"onOpenAutoFocus",3,pe),d=S(e,"onEscapeKeydown",3,pe),f=S(e,"onInteractOutside",3,pe),g=S(e,"trapFocus",3,!0),T=S(e,"preventScroll",3,!0),w=S(e,"restoreScrollDelay",3,null),y=me(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const h=Zn.create({id:$(()=>r()),ref:$(()=>s(),te=>s(te))}),m=b(()=>Ke(y,h.props));var F=E(),ye=p(F);{var j=te=>{ls(te,{get ref(){return h.opts.ref},loop:!0,get trapFocus(){return g()},get enabled(){return h.root.opts.open.current},get onOpenAutoFocus(){return l()},get onCloseAutoFocus(){return i()},focusScope:(Ae,ae)=>{let be=()=>ae?.().props;as(Ae,G(()=>o(m),{get enabled(){return h.root.opts.open.current},get ref(){return h.opts.ref},onEscapeKeydown:Se=>{d()(Se),!Se.defaultPrevented&&h.root.handleClose()},children:(Se,Ie)=>{is(Se,G(()=>o(m),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},onInteractOutside:Me=>{f()(Me),!Me.defaultPrevented&&h.root.handleClose()},children:(Me,ue)=>{cs(Me,G(()=>o(m),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},children:(de,Ce)=>{var fe=E(),he=p(fe);{var _e=ze=>{var ge=Fl(),R=p(ge);{var Ee=xe=>{Yn(xe,{get preventScroll(){return T()},get restoreScrollDelay(){return w()}})};N(R,xe=>{h.root.opts.open.current&&xe(Ee)})}var qe=A(R,2);{let xe=b(()=>({props:Ke(o(m),be()),...h.snippetProps}));W(qe,()=>e.child,()=>o(xe))}u(ze,ge)},Ne=ze=>{var ge=Rl(),R=p(ge);Yn(R,{get preventScroll(){return T()}});var Ee=A(R,2);lt(Ee,xe=>({...xe}),[()=>Ke(o(m),be())]);var qe=P(Ee);W(qe,()=>e.children??ce),k(Ee),u(ze,ge)};N(he,ze=>{e.child?ze(_e):ze(Ne,!1)})}u(de,fe)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};N(ye,te=>{(h.shouldRender||a())&&te(j)})}u(n,F),L()}const Xn=Er({component:"tabs",parts:["root","list","trigger","content"]}),Kr=new fn("Tabs.Root");class Vr{static create(e){return Kr.set(new Vr(e))}opts;attachment;rovingFocusGroup;#e=O(dn([]));get triggerIds(){return o(this.#e)}set triggerIds(e){_(this.#e,e,!0)}valueToTriggerId=new vr;valueToContentId=new vr;constructor(e){this.opts=e,this.attachment=ot(e.ref),this.rovingFocusGroup=new No({candidateAttr:Xn.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(r=>r!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=b(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[Xn.root]:"",...this.attachment}));get props(){return o(this.#t)}set props(e){_(this.#t,e)}}class Ur{static create(e){return new Ur(e,Kr.get())}opts;root;attachment;#e=b(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(e.ref)}#t=b(()=>({id:this.opts.id.current,role:"tablist","aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[Xn.list]:"","data-disabled":Bt(o(this.#e)),...this.attachment}));get props(){return o(this.#t)}set props(e){_(this.#t,e)}}class Wr{static create(e){return new Wr(e,Kr.get())}opts;root;attachment;#e=O(0);#t=b(()=>this.root.opts.value.current===this.opts.value.current);#n=b(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=b(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=ot(e.ref),Xe([()=>this.opts.id.current,()=>this.opts.value.current],([r,s])=>this.root.registerTrigger(r,s)),Ct(()=>{this.root.triggerIds.length,o(this.#t)||!this.root.opts.value.current?_(this.#e,0):_(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#o(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!=="automatic"||o(this.#n)||this.#o()}onclick(e){o(this.#n)||this.#o()}onkeydown(e){if(!o(this.#n)){if(e.key===vn||e.key===An){e.preventDefault(),this.#o();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}#s=b(()=>({id:this.opts.id.current,role:"tab","data-state":Dl(o(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Bt(o(this.#n)),"aria-selected":Sr(o(this.#t)),"aria-controls":o(this.#r),[Xn.trigger]:"",disabled:oa(o(this.#n)),tabindex:o(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return o(this.#s)}set props(e){_(this.#s,e)}}function Dl(n){return n?"active":"inactive"}var Ll=x("<div><!></div>");function Bl(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=S(e,"value",15,""),i=S(e,"onValueChange",3,pe),l=S(e,"orientation",3,"horizontal"),d=S(e,"loop",3,!0),f=S(e,"activationMode",3,"automatic"),g=S(e,"disabled",3,!1),T=me(e,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","orientation","loop","activationMode","disabled","children","child"]);const w=Vr.create({id:$(()=>r()),value:$(()=>a(),j=>{a(j),i()(j)}),orientation:$(()=>l()),loop:$(()=>d()),activationMode:$(()=>f()),disabled:$(()=>g()),ref:$(()=>s(),j=>s(j))}),y=b(()=>Ke(T,w.props));var h=E(),m=p(h);{var F=j=>{var te=E(),ie=p(te);W(ie,()=>e.child,()=>({props:o(y)})),u(j,te)},ye=j=>{var te=Ll();lt(te,()=>({...o(y)}));var ie=P(te);W(ie,()=>e.children??ce),k(te),u(j,te)};N(m,j=>{e.child?j(F):j(ye,!1)})}u(n,h),L()}var Kl=x("<div><!></div>");function Vl(n,e){const t=bt();D(e,!0);let r=S(e,"id",19,()=>_t(t)),s=S(e,"ref",15,null),a=me(e,["$$slots","$$events","$$legacy","child","children","id","ref"]);const i=Ur.create({id:$(()=>r()),ref:$(()=>s(),w=>s(w))}),l=b(()=>Ke(a,i.props));var d=E(),f=p(d);{var g=w=>{var y=E(),h=p(y);W(h,()=>e.child,()=>({props:o(l)})),u(w,y)},T=w=>{var y=Kl();lt(y,()=>({...o(l)}));var h=P(y);W(h,()=>e.children??ce),k(y),u(w,y)};N(f,w=>{e.child?w(g):w(T,!1)})}u(n,d),L()}var Ul=x("<button><!></button>");function Wl(n,e){const t=bt();D(e,!0);let r=S(e,"disabled",3,!1),s=S(e,"id",19,()=>_t(t)),a=S(e,"type",3,"button"),i=S(e,"ref",15,null),l=me(e,["$$slots","$$events","$$legacy","child","children","disabled","id","type","value","ref"]);const d=Wr.create({id:$(()=>s()),disabled:$(()=>r()??!1),value:$(()=>e.value),ref:$(()=>i(),h=>i(h))}),f=b(()=>Ke(l,d.props,{type:a()}));var g=E(),T=p(g);{var w=h=>{var m=E(),F=p(m);W(F,()=>e.child,()=>({props:o(f)})),u(h,m)},y=h=>{var m=Ul();lt(m,()=>({...o(f)}));var F=P(m);W(F,()=>e.children??ce),k(m),u(h,m)};N(T,h=>{e.child?h(w):h(y,!1)})}u(n,g),L()}function jl(n,e){D(e,!0);let t=S(e,"ref",15,null),r=S(e,"value",15,""),s=me(e,["$$slots","$$events","$$legacy","ref","value","class"]);var a=E(),i=p(a);{let l=b(()=>Qe("flex flex-col gap-2",e.class));B(i,()=>Bl,(d,f)=>{f(d,G({"data-slot":"tabs",get class(){return o(l)}},()=>s,{get ref(){return t()},set ref(g){t(g)},get value(){return r()},set value(g){r(g)}}))})}u(n,a),L()}function Gl(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class","orientation"]);var s=E(),a=p(s);{let i=b(()=>Qe(e.orientation==="vertical"?"flex flex-col w-full":"inline-flex h-9 w-fit items-center justify-center rounded-lg bg-[var(--color-bg-surface)] p-[3px]",e.class));B(a,()=>Vl,(l,d)=>{d(l,G({"data-slot":"tabs-list",get class(){return o(i)}},()=>r,{get ref(){return t()},set ref(f){t(f)}}))})}u(n,s),L()}function Cn(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class","orientation"]);var s=E(),a=p(s);{let i=b(()=>Qe("inline-flex items-center text-[13px] font-normal whitespace-nowrap transition-[color,background] duration-150 cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e.orientation==="vertical"?"justify-start w-full h-8 gap-[11px] pl-[19px] pr-3 text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] hover:text-[var(--color-text-primary)] data-[state=active]:bg-[var(--color-bg-hover)] data-[state=active]:text-[var(--color-text-primary)] data-[state=active]:font-medium":"justify-center flex-1 gap-2 rounded-md border border-transparent px-2 py-1 text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] data-[state=active]:bg-[var(--color-bg-hover)] data-[state=active]:text-[var(--color-text-primary)] data-[state=active]:shadow-sm",e.class));B(a,()=>Wl,(l,d)=>{d(l,G({"data-slot":"tabs-trigger",get class(){return o(i)}},()=>r,{get ref(){return t()},set ref(f){t(f)}}))})}u(n,s),L()}function ql(n,e){D(e,!0);let t=S(e,"open",15,!1),r=me(e,["$$slots","$$events","$$legacy","open"]);var s=E(),a=p(s);B(a,()=>ya,(i,l)=>{l(i,G(()=>r,{get open(){return t()},set open(d){t(d)}}))}),u(n,s),L()}function Hl(n,e){let t=me(e,["$$slots","$$events","$$legacy"]);var r=E(),s=p(r);B(s,()=>Fo,(a,i)=>{i(a,G(()=>t))}),u(n,r)}function Yl(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),a=p(s);{let i=b(()=>Qe("text-lg font-semibold",e.class));B(a,()=>Oo,(l,d)=>{d(l,G({"data-slot":"alert-dialog-title",get class(){return o(i)}},()=>r,{get ref(){return t()},set ref(f){t(f)}}))})}u(n,s),L()}function Xl(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),a=p(s);{let i=b(()=>e.class||Qe(Vn()));B(a,()=>wa,(l,d)=>{d(l,G({"data-slot":"alert-dialog-action",get class(){return o(i)}},()=>r,{get ref(){return t()},set ref(f){t(f)}}))})}u(n,s),L()}function Ql(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),a=p(s);{let i=b(()=>e.class||Qe(Vn({variant:"ghost"})));B(a,()=>Sa,(l,d)=>{d(l,G({"data-slot":"alert-dialog-cancel",get class(){return o(i)}},()=>r,{get ref(){return t()},set ref(f){t(f)}}))})}u(n,s),L()}var Jl=x("<div><!></div>");function Zl(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class","children"]);var s=Jl();lt(s,i=>({"data-slot":"alert-dialog-footer",class:i,...r}),[()=>Qe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class)]);var a=P(s);W(a,()=>e.children??ce),k(s),br(s,i=>t(i),()=>t()),u(n,s),L()}var ec=x("<div><!></div>");function tc(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class","children"]);var s=ec();lt(s,i=>({"data-slot":"alert-dialog-header",class:i,...r}),[()=>Qe("flex flex-col gap-2 text-center sm:text-start",e.class)]);var a=P(s);W(a,()=>e.children??ce),k(s),br(s,i=>t(i),()=>t()),u(n,s),L()}function nc(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),a=p(s);{let i=b(()=>Qe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e.class));B(a,()=>ds,(l,d)=>{d(l,G({"data-slot":"alert-dialog-overlay",get class(){return o(i)}},()=>r,{get ref(){return t()},set ref(f){t(f)}}))})}u(n,s),L()}var rc=x("<!> <!>",1);function oc(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class","portalProps"]);Hl(n,G(()=>e.portalProps,{children:(s,a)=>{var i=rc(),l=p(i);nc(l,{});var d=A(l,2);{let f=b(()=>Qe("bg-[var(--color-bg-elevated)] border-[var(--color-border)] text-[var(--color-text-primary)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e.class));B(d,()=>Pl,(g,T)=>{T(g,G({"data-slot":"alert-dialog-content",get class(){return o(f)}},()=>r,{get ref(){return t()},set ref(w){t(w)}}))})}u(s,i)},$$slots:{default:!0}})),L()}function sc(n,e){D(e,!0);let t=S(e,"ref",15,null),r=me(e,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),a=p(s);{let i=b(()=>Qe("text-[var(--color-text-secondary)] text-sm",e.class));B(a,()=>Il,(l,d)=>{d(l,G({"data-slot":"alert-dialog-description",get class(){return o(i)}},()=>r,{get ref(){return t()},set ref(f){t(f)}}))})}u(n,s),L()}var ic=x("<!> <!>",1),ac=x("<!> <!>",1),lc=x("<!> <!>",1);function ur(n,e){D(e,!0);let t=S(e,"open",15),r=S(e,"confirmLabel",3,"Confirm"),s=S(e,"cancelLabel",3,"Cancel"),a=S(e,"destructive",3,!1);var i=E(),l=p(i);B(l,()=>ql,(d,f)=>{f(d,{onOpenChange:g=>{g||e.oncancel()},get open(){return t()},set open(g){t(g)},children:(g,T)=>{var w=E(),y=p(w);B(y,()=>oc,(h,m)=>{m(h,{children:(F,ye)=>{var j=lc(),te=p(j);B(te,()=>tc,(Ae,ae)=>{ae(Ae,{children:(be,Se)=>{var Ie=ic(),Me=p(Ie);B(Me,()=>Yl,(de,Ce)=>{Ce(de,{children:(fe,he)=>{Ze();var _e=It();ee(()=>ve(_e,e.title)),u(fe,_e)},$$slots:{default:!0}})});var ue=A(Me,2);B(ue,()=>sc,(de,Ce)=>{Ce(de,{children:(fe,he)=>{Ze();var _e=It();ee(()=>ve(_e,e.message)),u(fe,_e)},$$slots:{default:!0}})}),u(be,Ie)},$$slots:{default:!0}})});var ie=A(te,2);B(ie,()=>Zl,(Ae,ae)=>{ae(Ae,{children:(be,Se)=>{var Ie=ac(),Me=p(Ie);{let de=b(()=>Vn({variant:"ghost"}));B(Me,()=>Ql,(Ce,fe)=>{fe(Ce,{get class(){return o(de)},get onclick(){return e.oncancel},children:(he,_e)=>{Ze();var Ne=It();ee(()=>ve(Ne,s())),u(he,Ne)},$$slots:{default:!0}})})}var ue=A(Me,2);{let de=b(()=>Vn({variant:a()?"destructive":"accent"}));B(ue,()=>Xl,(Ce,fe)=>{fe(Ce,{get class(){return o(de)},get onclick(){return e.onconfirm},children:(he,_e)=>{Ze();var Ne=It();ee(()=>ve(Ne,r())),u(he,Ne)},$$slots:{default:!0}})})}u(be,Ie)},$$slots:{default:!0}})}),u(F,j)},$$slots:{default:!0}})}),u(g,w)},$$slots:{default:!0}})}),u(n,i),L()}function fs(n,e){D(e,!0);let t=S(e,"open",15,!1),r=me(e,["$$slots","$$events","$$legacy","open","onOpenChange","children"]);var s=E(),a=p(s);B(a,()=>Ml,(i,l)=>{l(i,G({get onOpenChange(){return e.onOpenChange}},()=>r,{get open(){return t()},set open(d){t(d)},children:(d,f)=>{var g=E(),T=p(g);W(T,()=>e.children),u(d,g)},$$slots:{default:!0}}))}),u(n,s),L()}var cc=x("<!> <!>",1);function hs(n,e){D(e,!0);let t=S(e,"size",3,"md"),r=me(e,["$$slots","$$events","$$legacy","children","class","size"]);var s=E(),a=p(s);B(a,()=>Fo,(i,l)=>{l(i,{children:(d,f)=>{var g=cc(),T=p(g);B(T,()=>ds,(y,h)=>{h(y,{class:"dialog-overlay"})});var w=A(T,2);{let y=b(()=>Qe("dialog-content",`dialog-${t()}`,e.class));B(w,()=>zl,(h,m)=>{m(h,G({get class(){return o(y)}},()=>r,{children:(F,ye)=>{var j=E(),te=p(j);W(te,()=>e.children),u(F,j)},$$slots:{default:!0}}))})}u(d,g)},$$slots:{default:!0}})}),u(n,s),L()}var uc=x("<div><!></div>");function dc(n,e){D(e,!0);var t=uc(),r=P(t);W(r,()=>e.children),k(t),ee(s=>bo(t,1,s),[()=>yo(Qe("dialog-header",e.class))]),u(n,t),L()}function fc(n,e){D(e,!0);var t=E(),r=p(t);{let s=b(()=>Qe("dialog-title",e.class));B(r,()=>Oo,(a,i)=>{i(a,{get class(){return o(s)},children:(l,d)=>{var f=E(),g=p(f);W(g,()=>e.children),u(l,f)},$$slots:{default:!0}})})}u(n,t),L()}var hc=x("<div><!></div>");function vc(n,e){D(e,!0);var t=hc(),r=P(t);W(r,()=>e.children),k(t),ee(s=>bo(t,1,s),[()=>yo(Qe("dialog-body",e.class))]),u(n,t),L()}function pc(n,e){D(e,!0);var t=E(),r=p(t);{let s=b(()=>Qe("dialog-close-btn",e.class));B(r,()=>Ol,(a,i)=>{i(a,{get class(){return o(s)},children:(l,d)=>{fr(l,{size:16})},$$slots:{default:!0}})})}u(n,t),L()}var gc=x("<!> <!>",1),mc=x('<span class="type-dot svelte-ak7t5k"></span> <div class="type-info svelte-ak7t5k"><span class="type-name svelte-ak7t5k"> </span> <span class="type-desc svelte-ak7t5k"> </span></div>',1),yc=x('<div class="type-section svelte-ak7t5k"><div class="type-section-label svelte-ak7t5k"> </div> <div class="type-grid svelte-ak7t5k"></div></div>'),bc=x("<!> <!>",1);function _c(n,e){D(e,!0);let t=S(e,"open",15),r=S(e,"appEntityTypes",19,()=>[]);const s={deck:"Presentation slides",doc:"Professional documents",project:"Client engagements and initiatives",meeting:"Conversations and check-ins",decision:"Choices made and their rationale",task:"Action items and to-dos",deliverable:"Outputs and work products",note:"Freeform thinking and scratch",process:"Repeatable methods and workflows",standard:"Guidelines and best practices","case-study":"Past work and lessons learned",document:"Long-form structured content",dataset:"Structured data and tables",reference:"Articles, tools, and resources",publication:"Published works and reports",person:"People you work with",organization:"Companies and institutions",role:"Job functions and responsibilities","practice-area":"Disciplines and specialties",deal:"Opportunities and proposals"},a=[{group:"Project",types:["project","meeting","decision","task","deliverable","note"]},{group:"Knowledge",types:["process","standard","case-study","document","dataset","reference","publication"]},{group:"Business",types:["person","organization","role","practice-area","deal"]}],i=b(()=>r().length>0?[{group:"Apps",types:r()},...a]:a);function l(g){return g.replace(/-/g," ").replace(/\b\w/g,T=>T.toUpperCase())}var d=E(),f=p(d);B(f,()=>fs,(g,T)=>{T(g,{onOpenChange:w=>{w||e.oncancel()},get open(){return t()},set open(w){t(w)},children:(w,y)=>{var h=E(),m=p(h);B(m,()=>hs,(F,ye)=>{ye(F,{size:"md",children:(j,te)=>{var ie=bc(),Ae=p(ie);B(Ae,()=>dc,(be,Se)=>{Se(be,{children:(Ie,Me)=>{var ue=gc(),de=p(ue);B(de,()=>fc,(fe,he)=>{he(fe,{children:(_e,Ne)=>{Ze();var ze=It("New Entity");u(_e,ze)},$$slots:{default:!0}})});var Ce=A(de,2);B(Ce,()=>pc,(fe,he)=>{he(fe,{})}),u(Ie,ue)},$$slots:{default:!0}})});var ae=A(Ae,2);B(ae,()=>vc,(be,Se)=>{Se(be,{class:"entity-body",children:(Ie,Me)=>{var ue=E(),de=p(ue);mt(de,17,()=>o(i),yt,(Ce,fe)=>{var he=yc(),_e=P(he),Ne=P(_e,!0);k(_e);var ze=A(_e,2);mt(ze,21,()=>o(fe).types,yt,(ge,R)=>{$e(ge,{variant:"outline",class:"type-card",type:"button",onclick:()=>e.onselect(o(R)),children:(Ee,qe)=>{var xe=mc(),De=p(xe);let st;var en=A(De,2),Kt=P(en),wt=P(Kt,!0);k(Kt);var ct=A(Kt,2),Vt=P(ct,!0);k(ct),k(en),ee((Ut,Wt)=>{st=zt(De,"",st,Ut),ve(wt,Wt),ve(Vt,s[o(R)])},[()=>({background:cn(o(R))}),()=>l(o(R))]),u(Ee,xe)},$$slots:{default:!0}})}),k(ze),k(he),ee(()=>ve(Ne,o(fe).group)),u(Ce,he)}),u(Ie,ue)},$$slots:{default:!0}})}),u(j,ie)},$$slots:{default:!0}})}),u(w,h)},$$slots:{default:!0}})}),u(n,d),L()}var wc=x('<span class="row-chevron svelte-6dohdz"><!></span>'),Tc=x('<span class="item-count svelte-6dohdz"> </span>'),Sc=x('<!> <span class="row-label svelte-6dohdz"> </span> <!>',1),Cc=x('<div class="indent-group svelte-6dohdz"><!></div>'),Ec=x("<!> <!>",1),xc=x('<span class="repo-type-icon svelte-6dohdz"><!></span>'),kc=x('<span class="repo-name svelte-6dohdz"> </span>'),Pc=x('<span class="item-count svelte-6dohdz"> </span>'),$c=x('<span class="row-chevron svelte-6dohdz"><!></span> <!> <!> <!>',1),Ac=x("<!> <!>",1),Ic=x('<div class="loading-row svelte-6dohdz">Loading...</div>'),Mc=x('<span class="row-chevron svelte-6dohdz"><!></span> <span class="row-label svelte-6dohdz"> </span> <span class="item-count svelte-6dohdz"> </span>',1),Nc=x('<span class="row-chevron svelte-6dohdz"><!></span>'),Oc=x('<mark class="filter-match svelte-6dohdz"> </mark>'),Fc=x('<span class="presence-avatar svelte-6dohdz"> </span>'),Rc=x('<span class="presence-stack svelte-6dohdz"></span>'),zc=x('<!> <span class="row-label svelte-6dohdz"><!></span> <!>',1),Dc=x('<div class="loading-row svelte-6dohdz">Loading...</div>'),Lc=x('<div class="indent-group svelte-6dohdz"><!></div>'),Bc=x('<div class="entity-row-wrapper svelte-6dohdz"><!> <!></div> <!>',1),Kc=x('<div class="indent-group svelte-6dohdz"></div>'),Vc=x("<!> <!>",1),Uc=x('<span class="row-chevron svelte-6dohdz"><!></span> <span class="row-label svelte-6dohdz">New Entity</span>',1),Wc=x("<!> <!>",1),jc=x('<div class="indent-group svelte-6dohdz"><!></div>'),Gc=x('<div class="tree-group svelte-6dohdz"><div class="repo-row-wrapper svelte-6dohdz"><!> <!></div> <!></div>'),qc=x('<div class="workspace-icon svelte-6dohdz"> </div> <span class="workspace-name svelte-6dohdz"> </span>',1),Hc=x('<!> <span class="svelte-6dohdz">Workspace</span>',1),Yc=x('<!> <span class="svelte-6dohdz">Team</span>',1),Xc=x('<!> <span class="svelte-6dohdz">Permissions</span>',1),Qc=x('<!> <span class="svelte-6dohdz">Connectors</span>',1),Jc=x('<!> <span class="svelte-6dohdz">Sync Sources</span>',1),Zc=x("<!> <!> <!> <!> <!>",1),eu=x('<div class="settings-nav svelte-6dohdz"><!></div>'),tu=x('<mark class="filter-match svelte-6dohdz"> </mark>'),nu=x('<span class="recent-time svelte-6dohdz"> </span>'),ru=x('<span class="entity-type-dot svelte-6dohdz"></span> <span class="row-label svelte-6dohdz"><!></span> <!>',1),ou=x('<div class="entity-row-wrapper svelte-6dohdz"><!> <!></div>'),su=x('<div class="no-results svelte-6dohdz">No matching entities</div>'),iu=x("<!> <!>",1),au=x('<div class="no-results svelte-6dohdz">No matching entities</div>'),lu=x("<!> <!>",1),cu=x('<div class="new-collection-row svelte-6dohdz"><!> <!> <!></div>'),uu=x('<span class="row-chevron svelte-6dohdz"><!></span> <span class="repo-name svelte-6dohdz">New Collection</span>',1),du=x('<div class="filter-bar svelte-6dohdz"><span class="filter-icon svelte-6dohdz"><!></span> <!> <!> <!></div> <nav class="tree svelte-6dohdz"><!> <!> <!></nav>',1),fu=x('<div class="sidebar-footer svelte-6dohdz"><span class="user-email svelte-6dohdz"> </span> <!></div>'),hu=x('<aside class="sidebar svelte-6dohdz"><div class="sidebar-header svelte-6dohdz"><!> <!></div> <!> <!></aside> <!> <!> <!> <!>',1);function vu(n,e){D(e,!0);const t=(c,v=ce,C=ce,M=ce,X=ce,ne=ce,le=ce)=>{var Pe=E(),et=p(Pe);mt(et,17,v,yt,(Tt,He)=>{const St=b(()=>ne()?`${ne()}/${o(He).name}`:o(He).name),Ve=b(()=>`${C()}/${M()}/${X()}/${o(St)}`),Te=b(()=>o(He).type==="directory"),Je=b(()=>I.isFolderExpanded(o(Ve))),ut=b(()=>!o(Te)&&o(de)===X()&&o(Ce)===o(St));var H=Ec(),Y=p(H);{let U=b(()=>o(ut)?"selected":""),K=b(()=>o(Ee)===o(Ve)?"focused":""),z=b(()=>`padding-left: ${rn(le(),o(Te))}`);$e(Y,{variant:"ghost",get class(){return`tree-row ${o(U)??""} ${o(K)??""}`},get"data-tree-key"(){return o(Ve)},get style(){return o(z)},onclick:()=>{o(Te)?I.toggleFolder(o(Ve)):Dt(`/${C()}/${M()}/${X()}/${o(St)}`)},children:(V,re)=>{var J=Sc(),Oe=p(J);{var it=we=>{var Fe=wc(),Be=P(Fe);{var se=at=>{Rn(at,{size:14})},dt=at=>{Fn(at,{size:14})};N(Be,at=>{o(Je)?at(se):at(dt,!1)})}k(Fe),u(we,Fe)};N(Oe,we=>{o(Te)&&we(it)})}var Le=A(Oe,2),xt=P(Le,!0);k(Le);var oe=A(Le,2);{var Z=we=>{var Fe=Tc(),Be=P(Fe,!0);k(Fe),ee(()=>ve(Be,o(He).count)),u(we,Fe)};N(oe,we=>{o(Te)&&o(He).count!=null&&we(Z)})}ee(()=>ve(xt,o(He).name)),u(V,J)},$$slots:{default:!0}})}var q=A(Y,2);{var Q=U=>{var K=Cc();let z;var V=P(K);t(V,()=>o(He).children,C,M,X,()=>o(St),()=>le()+1),k(K),ee(re=>z=zt(K,"",z,re),[()=>({"--guide-left":Nn(le())})]),u(U,K)};N(q,U=>{o(Te)&&o(Je)&&o(He).children&&o(He).children.length>0&&U(Q)})}u(Tt,H)}),u(c,Pe)},r=(c,v=ce)=>{const C=b(()=>o(wt)?.repo===v().name),M=b(()=>`repo:${v().name}`);var X=Gc(),ne=P(X),le=P(ne);{let Ve=b(()=>o(C)?"repo-active":""),Te=b(()=>o(Ee)===o(M)?"focused":""),Je=b(()=>o(C)&&o(wt)?.color?`--active-color: ${o(wt).color}`:void 0);$e(le,{variant:"ghost",get class(){return`repo-row ${o(Ve)??""} ${o(Te)??""}`},get"data-tree-key"(){return o(M)},get style(){return o(Je)},onclick:()=>Ut(v().name),children:(ut,H)=>{var Y=$c(),q=p(Y),Q=P(q);{var U=oe=>{Rn(oe,{size:14})},K=b(()=>I.isExpanded(v().name)),z=oe=>{Fn(oe,{size:14})};N(Q,oe=>{o(K)?oe(U):oe(z,!1)})}k(q);var V=A(q,2);{var re=oe=>{var Z=xc(),we=P(Z);ar(we,{size:12}),k(Z),u(oe,Z)};N(V,oe=>{v().private&&oe(re)})}var J=A(V,2);{var Oe=oe=>{Bn(oe,{class:"repo-rename-input",type:"text",onkeydown:j,onblur:ye,onclick:Z=>Z.stopPropagation(),get ref(){return o(m)},set ref(Z){_(m,Z,!0)},get value(){return o(h)},set value(Z){_(h,Z,!0)}})},it=oe=>{var Z=kc(),we=P(Z,!0);k(Z),ee(()=>ve(we,v().name)),Os("dblclick",Z,Fe=>{v().type!=="private"&&F(v().name,Fe)}),u(oe,Z)};N(J,oe=>{o(y)===v().name?oe(Oe):oe(it,!1)})}var Le=A(J,2);{var xt=oe=>{var Z=Pc(),we=P(Z,!0);k(Z),ee(()=>ve(we,v().count)),u(oe,Z)};N(Le,oe=>{v().count!=null&&o(y)!==v().name&&oe(xt)})}u(ut,Y)},$$slots:{default:!0}})}var Pe=A(le,2);{var et=Ve=>{var Te=Ac(),Je=p(Te);{var ut=Y=>{{let q=b(()=>o(s)===v().name?"syncing":""),Q=b(()=>o(s)!==null);$e(Y,{variant:"ghost",size:"icon",get class(){return`repo-sync-btn ${o(q)??""}`},title:"Sync from source",onclick:U=>a(v().name,U),get disabled(){return o(Q)},children:(U,K)=>{Xs(U,{size:12})},$$slots:{default:!0}})}};N(Je,Y=>{v().sync&&v().sync.length>0&&Y(ut)})}var H=A(Je,2);$e(H,{variant:"ghost",size:"icon",class:"repo-delete-btn",title:"Delete collection",onclick:Y=>d(v().name,Y),children:(Y,q)=>{ir(Y,{size:12})},$$slots:{default:!0}}),u(Ve,Te)};N(Pe,Ve=>{o(y)!==v().name&&Ve(et)})}k(ne);var Tt=A(ne,2);{var He=Ve=>{var Te=jc();let Je;var ut=P(Te);{var H=q=>{var Q=Ic();let U;ee(K=>U=zt(Q,"",U,K),[()=>({"padding-left":rn(1,!1)})]),u(q,Q)},Y=q=>{var Q=Wc(),U=p(Q);mt(U,17,()=>vs(v().entities),yt,(z,V)=>{const re=b(()=>`type:${v().name}/${o(V).type}`),J=b(()=>!I.isFolderCollapsed(o(re))),Oe=b(()=>v().name===o(ue)&&o(V).entities.some(Z=>Z.id===o(de)));var it=Vc(),Le=p(it);{let Z=b(()=>o(Oe)?"type-active":""),we=b(()=>`padding-left: ${rn(1,!0)}; border-left-color: ${o(Oe)?cn(o(V).type):"transparent"}`);$e(Le,{variant:"ghost",get class(){return`tree-row type-header-row ${o(Z)??""}`},get style(){return o(we)},get"data-tree-key"(){return o(re)},onclick:()=>I.toggleFolder(o(re)),children:(Fe,Be)=>{var se=Mc(),dt=p(se),at=P(dt);{var Ft=ft=>{Rn(ft,{size:14})},on=ft=>{Fn(ft,{size:14})};N(at,ft=>{o(J)?ft(Ft):ft(on,!1)})}k(dt);var kt=A(dt,2),sn=P(kt,!0);k(kt);var ke=A(kt,2),tt=P(ke,!0);k(ke),ee(()=>{ve(sn,o(V).label),ve(tt,o(V).entities.length)}),u(Fe,se)},$$slots:{default:!0}})}var xt=A(Le,2);{var oe=Z=>{var we=Kc();let Fe;mt(we,21,()=>o(V).entities,yt,(Be,se)=>{const dt=b(()=>o(se).id===o(de)&&v().name===o(ue)&&!o(Ce)),at=b(()=>o(se).hasSubContent&&I.isEntityExpanded(v().name,o(se).entityType,o(se).id)),Ft=b(()=>o(se).hasSubContent?I.getEntityContents(v().name,o(se).entityType,o(se).id):null),on=b(()=>`entity:${v().name}/${o(se).entityType}/${o(se).id}`),kt=b(()=>_r.getPresence(v().name,o(se).entityType,o(se).id,Rt.user?String(Rt.user.id):void 0));var sn=Bc(),ke=p(sn),tt=P(ke);{let ht=b(()=>o(dt)?"selected":""),jt=b(()=>o(Ee)===o(on)?"focused":""),mn=b(()=>`padding-left: ${rn(2,o(se).hasSubContent)}${o(dt)?`; --active-color: ${cn(o(se).entityType)}`:""}`);$e(tt,{variant:"ghost",get class(){return`tree-row ${o(ht)??""} ${o(jt)??""}`},get"data-tree-key"(){return o(on)},get style(){return o(mn)},onclick:()=>nn(o(se),v().name),children:(yn,Pt)=>{var Ye=zc(),vt=p(Ye);{var Gt=nt=>{var rt=Nc(),$t=P(rt);{var bn=gt=>{Rn(gt,{size:14})},At=gt=>{Fn(gt,{size:14})};N($t,gt=>{o(at)?gt(bn):gt(At,!1)})}k(rt),u(nt,rt)};N(vt,nt=>{o(se).hasSubContent&&nt(Gt)})}var qt=A(vt,2),rr=P(qt);{var Ss=nt=>{var rt=E(),$t=p(rt);mt($t,17,()=>jr(o(se).title),yt,(bn,At)=>{var gt=E(),or=p(gt);{var ks=an=>{var ln=Oc(),$s=P(ln,!0);k(ln),ee(()=>ve($s,o(At).text)),u(an,ln)},Ps=an=>{var ln=It();ee(()=>ve(ln,o(At).text)),u(an,ln)};N(or,an=>{o(At).match?an(ks):an(Ps,!1)})}u(bn,gt)}),u(nt,rt)},Cs=nt=>{var rt=It();ee(()=>ve(rt,o(se).title)),u(nt,rt)};N(rr,nt=>{o(fe)?nt(Ss):nt(Cs,!1)})}k(qt);var Es=A(qt,2);{var xs=nt=>{var rt=Rc();mt(rt,21,()=>o(kt).slice(0,3),yt,($t,bn)=>{var At=Fc(),gt=P(At,!0);k(At),ee(or=>ve(gt,or),[()=>o(bn).name[0].toUpperCase()]),u($t,At)}),k(rt),ee($t=>Ys(rt,"title",$t),[()=>o(kt).map($t=>$t.name).join(", ")]),u(nt,rt)};N(Es,nt=>{o(kt).length>0&&nt(xs)})}u(yn,Ye)},$$slots:{default:!0}})}var ft=A(tt,2);$e(ft,{variant:"ghost",size:"icon",class:"entity-delete-btn",title:"Delete entity",onclick:ht=>T(v().name,o(se),ht),children:(ht,jt)=>{ir(ht,{size:12})},$$slots:{default:!0}}),k(ke);var pn=A(ke,2);{var gn=ht=>{var jt=E(),mn=p(jt);{var yn=Ye=>{var vt=Dc();let Gt;ee(qt=>Gt=zt(vt,"",Gt,qt),[()=>({"padding-left":rn(3,!1)})]),u(Ye,vt)},Pt=Ye=>{var vt=Lc();let Gt;var qt=P(vt);t(qt,()=>o(Ft).entries,()=>v().name,()=>o(se).entityType,()=>o(se).id,()=>"",()=>3),k(vt),ee(rr=>Gt=zt(vt,"",Gt,rr),[()=>({"--guide-left":Nn(2)})]),u(Ye,vt)};N(mn,Ye=>{o(Ft).loading?Ye(yn):o(Ft).entries.length>0&&Ye(Pt,1)})}u(ht,jt)};N(pn,ht=>{o(at)&&o(Ft)&&ht(gn)})}Ht("mouseenter",ke,()=>{Ue.hoveredEntityId=o(se).id}),Ht("mouseleave",ke,()=>{Ue.hoveredEntityId=null}),u(Be,sn)}),k(we),ee(Be=>Fe=zt(we,"",Fe,Be),[()=>({"--guide-left":Nn(1)})]),u(Z,we)};N(xt,Z=>{o(J)&&Z(oe)})}u(z,it)});var K=A(U,2);{let z=b(()=>`padding-left: ${rn(1,!0)}`);$e(K,{variant:"ghost",class:"tree-row new-entity-row",get style(){return o(z)},onclick:V=>{V.stopPropagation(),_(Et,v().name,!0)},children:(V,re)=>{var J=Uc(),Oe=p(J),it=P(Oe);to(it,{size:14}),k(Oe),Ze(2),u(V,J)},$$slots:{default:!0}})}u(q,Q)};N(ut,q=>{v().loading?q(H):q(Y,!1)})}k(Te),ee(q=>Je=zt(Te,"",Je,q),[()=>({"--guide-left":Nn(0)})]),u(Ve,Te)},St=b(()=>I.isExpanded(v().name));N(Tt,Ve=>{o(St)&&Ve(He)})}k(X),u(c,X)};let s=O(null);async function a(c,v){if(v.stopPropagation(),!o(s)){_(s,c,!0);try{const{results:C}=await li(c),M=C.reduce((le,Pe)=>le+Pe.created+Pe.derived,0),X=C.reduce((le,Pe)=>le+Pe.skipped,0),ne=C.flatMap(le=>le.errors??[]);M>0&&await I.refreshEntities(c),ne.length>0?Xt.showToast(`Sync: ${ne[0]}`):M>0?Xt.showToast(`Synced ${M} new entities`):Xt.showToast(`No new entities (${X} already synced)`)}catch(C){console.error("Sync failed:",C),Xt.showToast(`Sync failed: ${C.message}`)}finally{_(s,null)}}}let i=O(!1),l=O(null);function d(c,v){v.stopPropagation(),_(l,c,!0)}async function f(){if(!o(l))return;const c=o(l);_(l,null);try{await I.removeCollection(c)}catch(v){console.error("Failed to delete collection:",v.message)}}let g=O(null);function T(c,v,C){C.stopPropagation(),_(g,{repo:c,type:v.entityType,id:v.id,title:v.title},!0)}async function w(){if(!o(g))return;const{repo:c,type:v,id:C}=o(g);_(g,null);try{await qs(c,v,C),await I.refreshEntities(c),Ue.selectedRepo===c&&Ue.selectedId===C&&Dt("/")}catch(M){console.error("Failed to delete entity:",M.message)}}let y=O(null),h=O(""),m=O(null);function F(c,v){v.stopPropagation(),_(y,c,!0),_(h,c,!0),setTimeout(()=>o(m)?.select(),0)}async function ye(){if(!o(y))return;const c=o(y),v=o(h).trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");if(_(y,null),!(!v||v===c))try{await I.renameCollectionTo(c,v)}catch(C){console.error("Failed to rename collection:",C.message)}}function j(c){c.key==="Enter"?(c.preventDefault(),ye()):c.key==="Escape"&&_(y,null)}const te=b(()=>!Rt.authEnabled||Rt.user?.role==="admin");let ie=O(!1),Ae=O(""),ae=O(!1),be=O(null),Se=O(!1);async function Ie(){const c=o(Ae).trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");if(c){_(Se,!0);try{await I.addCollection(c,void 0,o(ae)||void 0),_(ie,!1),_(Ae,""),_(ae,!1)}catch{_(Se,!1),await new Promise(C=>requestAnimationFrame(C)),o(be)?.classList.remove("shake"),o(be)?.offsetWidth,o(be)?.classList.add("shake"),o(be)?.focus();return}finally{_(Se,!1)}}}function Me(c){c.key==="Enter"?(c.preventDefault(),Ie()):c.key==="Escape"&&(_(ie,!1),_(Ae,""),_(ae,!1))}const ue=b(()=>Ue.selectedRepo),de=b(()=>Ue.selectedId),Ce=b(()=>Ue.selectedSubPath),fe=b(()=>I.filterQuery);let he=O(null);function _e(c){const v=c.target.value;I.setFilterQuery(v)}function Ne(){I.setFilterQuery(""),o(he)&&(o(he).value="")}function ze(c,v,C,M,X,ne){for(const le of c){const Pe=X?`${X}/${le.name}`:le.name,et=`${v}/${C}/${M}/${Pe}`;le.type==="directory"?(ne.push({key:et,kind:"content-dir",repo:v,folderKey:et}),I.isFolderExpanded(et)&&le.children?.length&&ze(le.children,v,C,M,Pe,ne)):ne.push({key:et,kind:"content-file",repo:v,gotoPath:`/${v}/${C}/${M}/${Pe}`})}}const ge=b(()=>{const c=[],v=I.sortedRepos;for(const C of v)if(c.push({key:`repo:${C.name}`,kind:"repo",repo:C.name}),I.isExpanded(C.name)&&!C.loading){for(const M of C.entities)if(c.push({key:`entity:${C.name}/${M.entityType}/${M.id}`,kind:"entity",repo:C.name,entity:M}),M.hasSubContent&&I.isEntityExpanded(C.name,M.entityType,M.id)){const ne=I.getEntityContents(C.name,M.entityType,M.id);!ne.loading&&ne.entries.length>0&&ze(ne.entries,C.name,M.entityType,M.id,"",c)}}return c});let R=O(-1);const Ee=b(()=>o(R)>=0&&o(R)<o(ge).length?o(ge)[o(R)].key:null);let qe="";Ct(()=>{const c=I.filterQuery;c!==qe&&(qe=c,_(R,-1))});function xe(){requestAnimationFrame(()=>{if(!o(ct)||o(R)<0)return;const c=o(ge)[o(R)]?.key;if(!c)return;const v=o(ct).querySelector(`[data-tree-key="${CSS.escape(c)}"]`);v&&v.scrollIntoView({block:"nearest"})})}function De(){if(o(R)<0)return;const c=o(ge)[o(R)];if(c)switch(c.kind){case"repo":I.toggleRepo(c.repo);break;case"entity":c.entity&&nn(c.entity,c.repo);break;case"content-dir":c.folderKey&&I.toggleFolder(c.folderKey);break;case"content-file":c.gotoPath&&Dt(c.gotoPath);break}}function st(){if(o(R)<0)return;const c=o(ge)[o(R)];c&&(c.kind==="repo"&&!I.isExpanded(c.repo)?I.toggleRepo(c.repo):c.kind==="entity"&&c.entity?.hasSubContent&&!I.isEntityExpanded(c.repo,c.entity.entityType,c.entity.id)?I.toggleEntity(c.repo,c.entity.entityType,c.entity.id):c.kind==="content-dir"&&c.folderKey&&!I.isFolderExpanded(c.folderKey)?I.toggleFolder(c.folderKey):o(R)<o(ge).length-1&&(On(R),xe()))}function en(){if(o(R)<0)return;const c=o(ge)[o(R)];c&&(c.kind==="repo"&&I.isExpanded(c.repo)?I.toggleRepo(c.repo):c.kind==="entity"&&c.entity?.hasSubContent&&I.isEntityExpanded(c.repo,c.entity.entityType,c.entity.id)?I.toggleEntity(c.repo,c.entity.entityType,c.entity.id):c.kind==="content-dir"&&c.folderKey&&I.isFolderExpanded(c.folderKey)?I.toggleFolder(c.folderKey):o(R)>0&&(On(R,-1),xe()))}function Kt(c){if(c.key==="Escape"){Ne(),o(he)?.blur(),_(R,-1);return}if(c.key==="ArrowDown"){c.preventDefault(),o(R)<o(ge).length-1&&On(R),xe();return}if(c.key==="ArrowUp"){c.preventDefault(),o(R)>0?On(R,-1):o(R)===0&&_(R,-1),xe();return}if(c.key==="Enter"){c.preventDefault(),De();return}if(c.key==="ArrowRight"){c.preventDefault(),st();return}if(c.key==="ArrowLeft"){c.preventDefault(),en();return}}const wt=b(()=>{if(!o(de)||!o(ue))return null;const c=I.repos.find(C=>C.name===o(ue));if(!c)return null;const v=c.entities.find(C=>C.id===o(de));return v?{repo:c.name,entityType:v.entityType,color:cn(v.entityType)}:null});Ct(()=>{const c=o(ue)&&o(de)?`${o(ue)}/${o(de)}`:null;c&&c!==I.lastAutoExpandedFor&&o(wt)&&(I.lastAutoExpandedFor=c,I.isExpanded(o(wt).repo)||I.toggleRepo(o(wt).repo))});let ct=O(void 0);go(()=>{o(ct)&&I.sidebarScrollTop>0&&(o(ct).scrollTop=I.sidebarScrollTop)});function Vt(){o(ct)&&(I.sidebarScrollTop=o(ct).scrollTop)}function Ut(c){I.toggleRepo(c)}function Wt(c,v,C){Dt(`/${c}/${v}/${C}`)}let Et=O(null),tn=O(!1);function In(c){return c.replace(/-/g," ").replace(/\b\w/g,v=>v.toUpperCase())}async function Mn(c,v){if(!o(tn)){_(tn,!0),_(Et,null);try{const C=`${v}-${Date.now()}`,M=`Untitled ${In(v)}`,X=new Date().toISOString(),ne=X.split("T")[0],le=v==="deck"?`<!-- slide: cover -->
|
|
6
|
+
<!-- theme: light -->
|
|
7
|
+
|
|
8
|
+
# ${M}
|
|
9
|
+
## Subtitle
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<!-- slide: end -->
|
|
14
|
+
`:v==="doc"?`## Cover Letter
|
|
15
|
+
|
|
16
|
+
Dear [Contact Name],
|
|
17
|
+
|
|
18
|
+
[Body text]
|
|
19
|
+
|
|
20
|
+
Sincerely,
|
|
21
|
+
|
|
22
|
+
[Your Name]
|
|
23
|
+
|
|
24
|
+
## Project Overview
|
|
25
|
+
|
|
26
|
+
[Project overview text]
|
|
27
|
+
`:"";await Hs(c,v,C,{entity_type:v,entity_id:C,name:M,date:ne,created_at:X,updated_at:X,created_by:"web",updated_by:"web"},le),await I.refreshEntities(c),Dt(`/${c}/${v}/${C}`)}catch(C){console.error("Failed to create entity:",C)}finally{_(tn,!1)}}}function nn(c,v){const C=c.id===o(de)&&v===o(ue)&&!o(Ce);Ue.activeView==="graph"?Ue.selectOnGraph(v,c.entityType,c.id):C?(Ue.deselect(),Dt("/")):(Wt(v,c.entityType,c.id),c.hasSubContent&&I.toggleEntity(v,c.entityType,c.id))}function er(c){if(!c)return"";const v=Date.now()-new Date(c).getTime(),C=Math.floor(v/6e4);if(C<1)return"now";if(C<60)return`${C}m`;const M=Math.floor(C/60);if(M<24)return`${M}h`;const X=Math.floor(M/24);return X<30?`${X}d`:`${Math.floor(X/30)}mo`}function jr(c){const v=o(fe).trim().toLowerCase();if(!v)return[{text:c,match:!1}];const C=c.toLowerCase().indexOf(v);if(C===-1)return[{text:c,match:!1}];const M=[];return C>0&&M.push({text:c.slice(0,C),match:!1}),M.push({text:c.slice(C,C+v.length),match:!0}),C+v.length<c.length&&M.push({text:c.slice(C+v.length),match:!1}),M}function vs(c){const v=new Map;for(const C of c){const M=v.get(C.entityType)??[];M.push(C),v.set(C.entityType,M)}return Array.from(v.entries()).map(([C,M])=>({type:C,label:In(ri(C)),entities:M}))}const Gr=30;function rn(c,v){return`${(v?20:50)+c*Gr}px`}function Nn(c){return`${30+c*Gr}px`}var qr=hu(),tr=p(qr),nr=P(tr),Hr=P(nr);{var ps=c=>{$e(c,{variant:"ghost",class:"home-btn",title:"Home",onclick:()=>{Ue.deselect(),Ue.activeView!=="graph"&&Dt("/")},children:(v,C)=>{var M=qc(),X=p(M),ne=P(X,!0);k(X);var le=A(X,2),Pe=P(le,!0);k(le),ee(et=>{ve(ne,et),ve(Pe,I.name||"Studiograph")},[()=>(I.name||"Studiograph")[0].toUpperCase()]),u(v,M)},$$slots:{default:!0}})};N(Hr,c=>{I.nameLoaded&&c(ps)})}var gs=A(Hr,2);{var ms=c=>{$e(c,{variant:"ghost",size:"icon",class:"settings-btn",title:"Workspace Settings",href:"/settings",children:(v,C)=>{si(v,{size:14})},$$slots:{default:!0}})};N(gs,c=>{o(te)&&c(ms)})}k(nr);var Yr=A(nr,2);{var ys=c=>{var v=eu(),C=P(v);B(C,()=>jl,(M,X)=>{X(M,{get value(){return Ue.settingsTab},onValueChange:ne=>{Ue.settingsTab=ne},class:"flex-1",children:(ne,le)=>{var Pe=E(),et=p(Pe);B(et,()=>Gl,(Tt,He)=>{He(Tt,{orientation:"vertical",children:(St,Ve)=>{var Te=Zc(),Je=p(Te);B(Je,()=>Cn,(Q,U)=>{U(Q,{value:"general",orientation:"vertical",children:(K,z)=>{var V=Hc(),re=p(V);vi(re,{size:14}),Ze(2),u(K,V)},$$slots:{default:!0}})});var ut=A(Je,2);B(ut,()=>Cn,(Q,U)=>{U(Q,{value:"users",orientation:"vertical",children:(K,z)=>{var V=Yc(),re=p(V);ui(re,{size:14}),Ze(2),u(K,V)},$$slots:{default:!0}})});var H=A(ut,2);B(H,()=>Cn,(Q,U)=>{U(Q,{value:"collections",orientation:"vertical",children:(K,z)=>{var V=Xc(),re=p(V);di(re,{size:14}),Ze(2),u(K,V)},$$slots:{default:!0}})});var Y=A(H,2);B(Y,()=>Cn,(Q,U)=>{U(Q,{value:"connectors",orientation:"vertical",children:(K,z)=>{var V=Qc(),re=p(V);hi(re,{size:14}),Ze(2),u(K,V)},$$slots:{default:!0}})});var q=A(Y,2);B(q,()=>Cn,(Q,U)=>{U(Q,{value:"sources",orientation:"vertical",children:(K,z)=>{var V=Jc(),re=p(V);fi(re,{size:14}),Ze(2),u(K,V)},$$slots:{default:!0}})}),u(St,Te)},$$slots:{default:!0}})}),u(ne,Pe)},$$slots:{default:!0}})}),k(v),u(c,v)},bs=c=>{var v=du(),C=p(v),M=P(C),X=P(M);_o(X,{size:14}),k(M);var ne=A(M,2);Bn(ne,{class:"filter-input",type:"text",placeholder:"Search",oninput:_e,onkeydown:Kt,get ref(){return o(he)},set ref(H){_(he,H,!0)}});var le=A(ne,2);{var Pe=H=>{$e(H,{variant:"ghost",size:"icon",class:"filter-clear",onclick:Ne,title:"Clear filter",children:(Y,q)=>{fr(Y,{size:13})},$$slots:{default:!0}})};N(le,H=>{o(fe)&&H(Pe)})}var et=A(le,2);{let H=b(()=>I.sortMode==="recent"?"active":""),Y=b(()=>I.sortMode==="alpha"?"Sort by recent":"Sort alphabetically");$e(et,{variant:"ghost",size:"icon",get class(){return`sort-toggle ${o(H)??""}`},get title(){return o(Y)},onclick:()=>{I.sortMode=I.sortMode==="alpha"?"recent":"alpha"},children:(q,Q)=>{var U=E(),K=p(U);{var z=re=>{ai(re,{size:14})},V=re=>{ii(re,{size:14})};N(K,re=>{I.sortMode==="alpha"?re(z):re(V,!1)})}u(q,U)},$$slots:{default:!0}})}k(C);var Tt=A(C,2),He=P(Tt);{var St=H=>{var Y=iu(),q=p(Y);mt(q,17,()=>I.recentEntities,yt,(K,z)=>{const V=b(()=>o(z).id===o(de)&&o(z).repo===o(ue)&&!o(Ce)),re=b(()=>`entity:${o(z).repo}/${o(z).entityType}/${o(z).id}`);var J=ou(),Oe=P(J);{let Le=b(()=>o(V)?"selected":""),xt=b(()=>o(Ee)===o(re)?"focused":""),oe=b(()=>`padding-left: 27px${o(V)?`; --active-color: ${cn(o(z).entityType)}`:""}`);$e(Oe,{variant:"ghost",get class(){return`tree-row ${o(Le)??""} ${o(xt)??""}`},get"data-tree-key"(){return o(re)},get style(){return o(oe)},onclick:()=>nn(o(z),o(z).repo),children:(Z,we)=>{var Fe=ru(),Be=p(Fe);let se;var dt=A(Be,2),at=P(dt);{var Ft=ke=>{var tt=E(),ft=p(tt);mt(ft,17,()=>jr(o(z).title),yt,(pn,gn)=>{var ht=E(),jt=p(ht);{var mn=Pt=>{var Ye=tu(),vt=P(Ye,!0);k(Ye),ee(()=>ve(vt,o(gn).text)),u(Pt,Ye)},yn=Pt=>{var Ye=It();ee(()=>ve(Ye,o(gn).text)),u(Pt,Ye)};N(jt,Pt=>{o(gn).match?Pt(mn):Pt(yn,!1)})}u(pn,ht)}),u(ke,tt)},on=ke=>{var tt=It();ee(()=>ve(tt,o(z).title)),u(ke,tt)};N(at,ke=>{o(fe)?ke(Ft):ke(on,!1)})}k(dt);var kt=A(dt,2);{var sn=ke=>{var tt=nu(),ft=P(tt,!0);k(tt),ee(pn=>ve(ft,pn),[()=>er(o(z).updatedAt)]),u(ke,tt)};N(kt,ke=>{o(z).updatedAt&&ke(sn)})}ee(ke=>se=zt(Be,"",se,ke),[()=>({background:cn(o(z).entityType)})]),u(Z,Fe)},$$slots:{default:!0}})}var it=A(Oe,2);$e(it,{variant:"ghost",size:"icon",class:"entity-delete-btn",title:"Delete entity",onclick:Le=>T(o(z).repo,o(z),Le),children:(Le,xt)=>{ir(Le,{size:12})},$$slots:{default:!0}}),k(J),Ht("mouseenter",J,()=>{Ue.hoveredEntityId=o(z).id}),Ht("mouseleave",J,()=>{Ue.hoveredEntityId=null}),u(K,J)});var Q=A(q,2);{var U=K=>{var z=su();u(K,z)};N(Q,K=>{o(fe)&&I.recentEntities.length===0&&K(U)})}u(H,Y)},Ve=H=>{var Y=lu(),q=p(Y);mt(q,17,()=>I.sortedRepos,yt,(K,z)=>{r(K,()=>o(z))});var Q=A(q,2);{var U=K=>{var z=au();u(K,z)};N(Q,K=>{o(fe)&&I.sortedRepos.length===0&&K(U)})}u(H,Y)};N(He,H=>{I.sortMode==="recent"?H(St):H(Ve,!1)})}var Te=A(He,2);{var Je=H=>{var Y=cu(),q=P(Y);Bn(q,{class:"new-collection-input",type:"text",placeholder:"collection-name",onkeydown:Me,onblur:()=>{!o(Ae).trim()&&!o(ae)&&_(ie,!1)},get disabled(){return o(Se)},get ref(){return o(be)},set ref(J){_(be,J,!0)},get value(){return o(Ae)},set value(J){_(Ae,J,!0)}});var Q=A(q,2);{var U=J=>{$e(J,{variant:"ghost",size:"icon",class:"new-collection-clear",title:"Clear",onclick:()=>{_(Ae,""),_(ae,!1),_(ie,!1)},onmousedown:Oe=>Oe.preventDefault(),children:(Oe,it)=>{fr(Oe,{size:13})},$$slots:{default:!0}})},K=b(()=>o(Ae).trim());N(Q,J=>{o(K)&&J(U)})}var z=A(Q,2);{var V=J=>{{let Oe=b(()=>o(ae)?"active":""),it=b(()=>o(ae)?"Private (local-only)":"Make private");$e(J,{variant:"ghost",size:"icon",get class(){return`private-toggle ${o(Oe)??""}`},get title(){return o(it)},onclick:()=>{_(ae,!o(ae))},onmousedown:Le=>Le.preventDefault(),children:(Le,xt)=>{var oe=E(),Z=p(oe);{var we=Be=>{ar(Be,{size:13})},Fe=Be=>{oi(Be,{size:13})};N(Z,Be=>{o(ae)?Be(we):Be(Fe,!1)})}u(Le,oe)},$$slots:{default:!0}})}},re=J=>{ar(J,{size:13,class:"private-indicator"})};N(z,J=>{o(te)?J(V):J(re,!1)})}k(Y),u(H,Y)};N(Te,H=>{o(ie)&&H(Je)})}var ut=A(Te,2);$e(ut,{variant:"ghost",class:"repo-row new-collection-btn",onclick:()=>{_(ie,!0),o(te)||_(ae,!0),setTimeout(()=>o(be)?.focus(),0)},title:"New collection",children:(H,Y)=>{var q=uu(),Q=p(q),U=P(Q);to(U,{size:14}),k(Q),Ze(2),u(H,q)},$$slots:{default:!0}}),k(Tt),br(Tt,H=>_(ct,H),()=>o(ct)),Ht("scroll",Tt,Vt),u(c,v)};N(Yr,c=>{Ue.activeView==="settings"?c(ys):c(bs,!1)})}var _s=A(Yr,2);{var ws=c=>{var v=fu(),C=P(v),M=P(C,!0);k(C);var X=A(C,2);$e(X,{variant:"ghost",size:"icon",class:"footer-icon-btn",title:"Sign out",onclick:()=>{_(i,!0)},children:(ne,le)=>{ei(ne,{size:14})},$$slots:{default:!0}}),k(v),ee(()=>ve(M,Rt.user.email)),u(c,v)};N(_s,c=>{Rt.authEnabled&&Rt.user&&c(ws)})}k(tr);var Xr=A(tr,2);{let c=b(()=>o(Et)!==null),v=b(()=>o(Et)??""),C=b(()=>I.apps.flatMap(M=>M.entityTypes));_c(Xr,{get open(){return o(c)},get collection(){return o(v)},get appEntityTypes(){return o(C)},onselect:M=>{o(Et)&&Mn(o(Et),M)},oncancel:()=>{_(Et,null)}})}var Qr=A(Xr,2);{let c=b(()=>o(l)!==null),v=b(()=>`Delete "${o(l)}" and all its entities? This cannot be undone.`);ur(Qr,{get open(){return o(c)},title:"Delete Collection",get message(){return o(v)},confirmLabel:"Delete",destructive:!0,onconfirm:f,oncancel:()=>{_(l,null)}})}var Jr=A(Qr,2);{let c=b(()=>o(g)!==null),v=b(()=>`Delete "${o(g)?.title}"? This cannot be undone.`);ur(Jr,{get open(){return o(c)},title:"Delete Entity",get message(){return o(v)},confirmLabel:"Delete",destructive:!0,onconfirm:w,oncancel:()=>{_(g,null)}})}var Ts=A(Jr,2);ur(Ts,{get open(){return o(i)},title:"Sign Out",message:"Are you sure you want to sign out?",confirmLabel:"Sign Out",destructive:!0,onconfirm:async()=>{_(i,!1),await Rt.logout(),window.location.href="/login"},oncancel:()=>{_(i,!1)}}),u(n,qr),L()}Ns(["dblclick"]);function pu(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];je(n,G({name:"arrow-up"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function gu(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];je(n,G({name:"arrow-down"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function mu(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}],["path",{d:"m9 10-5 5 5 5"}]];je(n,G({name:"corner-down-left"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function yu(n){const e=new URLSearchParams;return n.q&&e.set("q",n.q),n.type&&e.set("type",n.type),n.tags&&e.set("tags",n.tags),n.repos&&e.set("repos",n.repos),pt(`/api/search?${e.toString()}`)}var bu=x('<div class="empty-results svelte-1xems06">No results found</div>'),_u=x('<div class="result-body svelte-1xems06"><div class="result-title-row svelte-1xems06"><span class="result-title svelte-1xems06"> </span> <span class="entity-tag svelte-1xems06"> </span></div> <div class="result-meta svelte-1xems06"><span class="result-path"> </span></div></div>'),wu=x('<div class="search-header svelte-1xems06"><!> <!> <kbd class="esc-badge svelte-1xems06">esc</kbd></div> <div class="results-list svelte-1xems06"><!> <!></div> <div class="search-footer svelte-1xems06"><div class="shortcut-group svelte-1xems06"><kbd class="shortcut-key svelte-1xems06"><!></kbd> <kbd class="shortcut-key svelte-1xems06"><!></kbd> <span class="shortcut-label svelte-1xems06">Navigate</span></div> <div class="shortcut-group svelte-1xems06"><kbd class="shortcut-key svelte-1xems06"><!></kbd> <span class="shortcut-label svelte-1xems06">Open</span></div></div>',1);function Tu(n,e){D(e,!0);let t=S(e,"open",15),r=O(""),s=O(dn([])),a=O(0),i=null;function l(w){const y=w.target;if(_(r,y.value,!0),_(a,0),i&&clearTimeout(i),!o(r).trim()){_(s,[],!0);return}i=setTimeout(async()=>{try{_(s,await yu({q:o(r)}),!0)}catch{_(s,[],!0)}},200)}function d(w){if(w.key==="Escape")e.onclose();else if(w.key==="ArrowDown")w.preventDefault(),_(a,Math.min(o(a)+1,o(s).length-1),!0);else if(w.key==="ArrowUp")w.preventDefault(),_(a,Math.max(o(a)-1,0),!0);else if(w.key==="Enter"){w.preventDefault();const y=o(s)[o(a)];y&&f(y)}}function f(w){const y=w.repoName??"";y&&Dt(`/${y}/${w.entityType}/${w.id}`),e.onclose()}var g=E();Ht("keydown",mo,w=>{(w.metaKey||w.ctrlKey)&&w.key==="k"&&(w.preventDefault(),t()&&e.onclose())});var T=p(g);B(T,()=>fs,(w,y)=>{y(w,{onOpenChange:h=>{h||e.onclose()},get open(){return t()},set open(h){t(h)},children:(h,m)=>{var F=E(),ye=p(F);B(ye,()=>hs,(j,te)=>{te(j,{size:"lg",children:(ie,Ae)=>{var ae=wu(),be=p(ae),Se=P(be);_o(Se,{size:16,strokeWidth:2});var Ie=A(Se,2);Bn(Ie,{type:"text",class:"search-input",placeholder:"Search entities...",get value(){return o(r)},oninput:l,onkeydown:d,autofocus:!0}),Ze(2),k(be);var Me=A(be,2),ue=P(Me);{var de=De=>{var st=bu();u(De,st)},Ce=b(()=>o(s).length===0&&o(r).trim());N(ue,De=>{o(Ce)&&De(de)})}var fe=A(ue,2);mt(fe,17,()=>o(s),yt,(De,st,en)=>{{let Kt=b(()=>en===o(a)?"selected":"");$e(De,{variant:"ghost",get class(){return`result-row ${o(Kt)??""}`},onclick:()=>f(o(st)),children:(wt,ct)=>{var Vt=_u(),Ut=P(Vt),Wt=P(Ut),Et=P(Wt,!0);k(Wt);var tn=A(Wt,2),In=P(tn,!0);k(tn),k(Ut);var Mn=A(Ut,2),nn=P(Mn),er=P(nn,!0);k(nn),k(Mn),k(Vt),ee(()=>{ve(Et,o(st).data?.name??o(st).data?.title??o(st).id),ve(In,o(st).entityType),ve(er,o(st).id)}),u(wt,Vt)},$$slots:{default:!0}})}}),k(Me);var he=A(Me,2),_e=P(he),Ne=P(_e),ze=P(Ne);pu(ze,{size:10,strokeWidth:2.5}),k(Ne);var ge=A(Ne,2),R=P(ge);gu(R,{size:10,strokeWidth:2.5}),k(ge),Ze(2),k(_e);var Ee=A(_e,2),qe=P(Ee),xe=P(qe);mu(xe,{size:10,strokeWidth:2.5}),k(qe),Ze(2),k(Ee),k(he),u(ie,ae)},$$slots:{default:!0}})}),u(h,F)},$$slots:{default:!0}})}),u(n,g),L()}var Su=x('<div id="sg-chrome-footer"></div>'),Cu=x('<div class="app-frame svelte-vr1z90"><div class="app-body svelte-vr1z90"><!> <main class="main-content svelte-vr1z90"><!></main></div> <!></div> <!>',1);function Xu(n,e){D(e,!0);let t=S(e,"showSidebar",3,!0),r=S(e,"showStatusBar",3,!0),s=O(!1);go(()=>{const m=window.StudioChrome;m&&m.mountFooter()});var a=Cu();Ht("keydown",mo,m=>{(m.metaKey||m.ctrlKey)&&m.key==="k"&&(m.preventDefault(),_(s,!o(s)))});var i=p(a),l=P(i),d=P(l);{var f=m=>{vu(m,{})};N(d,m=>{t()&&m(f)})}var g=A(d,2),T=P(g);W(T,()=>e.children),k(g),k(l);var w=A(l,2);{var y=m=>{var F=Su();u(m,F)};N(w,m=>{r()&&m(y)})}k(i);var h=A(i,2);Tu(h,{get open(){return o(s)},onclose:()=>{_(s,!1)}}),u(n,a),L()}export{la as $,Xu as A,Bt as B,fn as C,is as D,as as E,ls as F,Cr as G,vn as H,An as I,Sr as J,Mt as K,Er as L,rs as M,Tr as N,el as O,Fo as P,Wu as Q,No as R,Yn as S,cs as T,Nt as U,Qo as V,Xo as W,rl as X,Un as Y,xn as Z,ca as _,Fu as a,Ao as a0,aa as a1,$o as a2,Gu as a3,qu as a4,Hu as a5,Yu as a6,hn as a7,io as a8,oa as a9,Rn as aa,Ru as ab,zu as ac,oc as ad,tc as ae,Yl as af,sc as ag,Zl as ah,Ql as ai,Xl as aj,ql as ak,hs as al,dc as am,fc as an,vc as ao,fs as ap,Uu as aq,Bu as ar,Du as as,Vu as at,Ku as au,Lu as av,pu as b,mi as c,Gi as d,ot as e,zn as f,Vi as g,Po as h,ju as i,$ as j,_t as k,os as l,Ke as m,pe as n,es as o,_r as p,ts as q,Ou as r,wo as s,ns as t,Tl as u,ss as v,Xe as w,Fn as x,cn as y,mr as z};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as L,c as m,U as E,d as M,f as P,g as U,m as H,h as J,i as v,t as p,j as S}from"./Bk7i2AGK.js";import{V as D,E as T,D as u,W as N}from"./BVBRzmeQ.js";import{EditorSelection as z,Facet as V,Annotation as I,RangeSet as W}from"./Cs5oz2oJ.js";class O{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:L(this.yanchor),yhead:L(this.yhead)}}static fromJSON(e){return new O(m(e.yanchor),m(e.yhead))}}class B{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new E(e)}toYPos(e,t=0){return M(this.ytext,e,t)}fromYPos(e){const t=P(m(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw new Error("[y-codemirror] The position you want to retrieve was created by a different document");return{pos:t.index,assoc:t.assoc}}toYRange(e){const t=e.assoc,n=this.toYPos(e.anchor,t),s=this.toYPos(e.head,t);return new O(n,s)}fromYRange(e){const t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?z.cursor(n.pos,n.assoc):z.range(t.pos,n.pos)}}const b=V.define({combine(o){return o[o.length-1]}}),R=I.define();class j{constructor(e){this.view=e,this.conf=e.state.facet(b),this._observer=(t,n)=>{if(n.origin!==this.conf){const s=t.delta,i=[];let r=0;for(let c=0;c<s.length;c++){const a=s[c];a.insert!=null?i.push({from:r,to:r,insert:a.insert}):a.delete!=null?(i.push({from:r,to:r+a.delete,insert:""}),r+=a.delete):r+=a.retain}e.dispatch({changes:i,annotations:[R.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(R)===this.conf)return;const t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((s,i,r,c,a)=>{const l=a.sliceString(0,a.length,`
|
|
2
|
+
`);s!==i&&t.delete(s+n,i-s),l.length>0&&t.insert(s+n,l),n+=l.length-(i-s)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}}const q=D.fromClass(j),K=T.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:"0px 2px 0px 4px"},".cm-ySelectionCaret":{position:"relative",borderLeft:"1px solid black",borderRight:"1px solid black",marginLeft:"-1px",marginRight:"-1px",boxSizing:"border-box",display:"inline"},".cm-ySelectionCaretDot":{borderRadius:"50%",position:"absolute",width:".4em",height:".4em",top:"-.2em",left:"-.2em",backgroundColor:"inherit",transition:"transform .3s ease-in-out",boxSizing:"border-box"},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:"bottom center",transform:"scale(0)"},".cm-ySelectionInfo":{position:"absolute",top:"-1.05em",left:"-1px",fontSize:".75em",fontFamily:"serif",fontStyle:"normal",fontWeight:"normal",lineHeight:"normal",userSelect:"none",color:"white",paddingLeft:"2px",paddingRight:"2px",zIndex:101,transition:"opacity .3s ease-in-out",backgroundColor:"inherit",opacity:0,transitionDelay:"0s",whiteSpace:"nowrap"},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:"0s"}}),G=I.define();class Q extends N{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return v("span",[S("class","cm-ySelectionCaret"),S("style",`background-color: ${this.color}; border-color: ${this.color}`)],[p(""),v("div",[S("class","cm-ySelectionCaretDot")]),p(""),v("div",[S("class","cm-ySelectionInfo")],[p(this.name)]),p("")])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}}class X{constructor(e){this.conf=e.state.facet(b),this._listener=({added:t,updated:n,removed:s},i,r)=>{t.concat(n).concat(s).findIndex(a=>a!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[G.of([])]})},this._awareness=this.conf.awareness,this._awareness.on("change",this._listener),this.decorations=W.of([])}destroy(){this._awareness.off("change",this._listener)}update(e){const t=this.conf.ytext,n=t.doc,s=this.conf.awareness,i=[],r=this.conf.awareness.getLocalState();if(r!=null){const c=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),a=c?e.state.selection.main:null,l=r.cursor==null?null:m(r.cursor.anchor),d=r.cursor==null?null:m(r.cursor.head);if(a!=null){const h=M(t,a.anchor),f=M(t,a.head);(r.cursor==null||!U(l,h)||!U(d,f))&&s.setLocalStateField("cursor",{anchor:h,head:f})}else r.cursor!=null&&c&&s.setLocalStateField("cursor",null)}s.getStates().forEach((c,a)=>{if(a===s.doc.clientID)return;const l=c.cursor;if(l==null||l.anchor==null||l.head==null)return;const d=P(l.anchor,n),h=P(l.head,n);if(d==null||h==null||d.type!==t||h.type!==t)return;const{color:f="#30bced",name:$="Anonymous"}=c.user||{},y=c.user&&c.user.colorLight||f+"33",k=H(d.index,h.index),_=J(d.index,h.index),g=e.view.state.doc.lineAt(k),w=e.view.state.doc.lineAt(_);if(g.number===w.number)i.push({from:k,to:_,value:u.mark({attributes:{style:`background-color: ${y}`},class:"cm-ySelection"})});else{i.push({from:k,to:g.from+g.length,value:u.mark({attributes:{style:`background-color: ${y}`},class:"cm-ySelection"})}),i.push({from:w.from,to:_,value:u.mark({attributes:{style:`background-color: ${y}`},class:"cm-ySelection"})});for(let C=g.number+1;C<w.number;C++){const F=e.view.state.doc.line(C).from;i.push({from:F,to:F,value:u.line({attributes:{style:`background-color: ${y}`,class:"cm-yLineSelection"}})})}}i.push({from:h.index,to:h.index,value:u.widget({side:h.index-d.index>0?-1:1,block:!1,widget:new Q(f,$)})})}),this.decorations=u.set(i,!0)}}const Z=D.fromClass(X,{decorations:o=>o.decorations}),ee=()=>{let o=!0;return(e,t)=>{if(o){o=!1;try{e()}finally{o=!0}}else t!==void 0&&t()}};class te{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}}const x=V.define({combine(o){return o[o.length-1]}});I.define();class oe{constructor(e){this.view=e,this.conf=e.state.facet(x),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(b),this._beforeChangeSelection=null,this._mux=ee(),this._onStackItemAdded=({stackItem:t,changedParentTypes:n})=>{n.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!t.meta.has(this)&&t.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{const n=t.meta.get(this);if(n){const s=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:s,effects:[T.scrollIntoView(s)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on("stack-item-added",this._onStackItemAdded),this._undoManager.on("stack-item-popped",this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(R)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off("stack-item-added",this._onStackItemAdded),this._undoManager.off("stack-item-popped",this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}}const ne=D.fromClass(oe),A=({state:o,dispatch:e})=>o.facet(x).undo()||!0,Y=({state:o,dispatch:e})=>o.facet(x).redo()||!0,ae=[{key:"Mod-z",run:A,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Y,preventDefault:!0},{key:"Mod-Shift-z",run:Y,preventDefault:!0}],ce=(o,e,{undoManager:t=new E(o)}={})=>{const n=new B(o,e),s=[b.of(n),q];return e&&s.push(K,Z),t!==!1&&s.push(x.of(new te(t)),ne,T.domEventHandlers({beforeinput(i,r){return i.inputType==="historyUndo"?A(r):i.inputType==="historyRedo"?Y(r):!1}})),s};export{O as YRange,B as YSyncConfig,ce as yCollab,Z as yRemoteSelections,K as yRemoteSelectionsTheme,q as ySync,b as ySyncFacet,ae as yUndoManagerKeymap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aq as ie,y as K,Q as oe,F as le,ar as q,a7 as N,al as Z,e as l,h as _,ad as m,as as U,b as ue,a as B,a6 as fe,at as z,a3 as y,g as A,au as I,a2 as C,a4 as ce,av as G,aw as de,ax as X,ay as he,az as _e,an as O,aA as k,aB as J,aC as pe,aD as ee,A as te,aE as ve,a1 as F,c as R,t as ge,s as me,aF as D,E as ye,j as Ee,aG as Te,aH as be,aI as we,aJ as Ne,Y as Ae,aK as Re,l as S,aL as Se,aM as De,aN as Le,aO as Me,aP as Oe,aQ as ke,C as $,aR as P,H as xe,k as Ie,aS as H,d as L,aT as Ce,aU as Fe,aV as Pe,aW as He,p as Ve,aX as We,aY as Ye,n as Be}from"./D-tW7Byc.js";function $e(t){let e=0,r=Z(0),s;return()=>{ie()&&(K(r),oe(()=>(e===0&&(s=le(()=>t(()=>q(r)))),e+=1,()=>{N(()=>{e-=1,e===0&&(s?.(),s=void 0,q(r))})})))}}var je=ye|Ee;function qe(t,e,r,s){new Ue(t,e,r,s)}class Ue{parent;is_pending=!1;transform_error;#t;#v=_?l:null;#s;#u;#e;#a=null;#r=null;#n=null;#i=null;#f=0;#l=0;#c=!1;#d=new Set;#h=new Set;#o=null;#y=$e(()=>(this.#o=Z(this.#f),()=>{this.#o=null}));constructor(e,r,s,a){this.#t=e,this.#s=r,this.#u=n=>{var i=m;i.b=this,i.f|=U,s(n)},this.parent=m.b,this.transform_error=a??this.parent?.transform_error??(n=>n),this.#e=ue(()=>{if(_){const n=this.#v;B();const i=n.data===fe;if(n.data.startsWith(z)){const o=JSON.parse(n.data.slice(z.length));this.#T(o)}else i?this.#b():this.#E()}else this.#g()},je),_&&(this.#t=l)}#E(){try{this.#a=y(()=>this.#u(this.#t))}catch(e){this.error(e)}}#T(e){const r=this.#s.failed;r&&(this.#n=y(()=>{r(this.#t,()=>e,()=>()=>{})}))}#b(){const e=this.#s.pending;e&&(this.is_pending=!0,this.#r=y(()=>e(this.#t)),N(()=>{var r=this.#i=document.createDocumentFragment(),s=A();r.append(s),this.#a=this.#p(()=>(I.ensure(),y(()=>this.#u(s)))),this.#l===0&&(this.#t.before(r),this.#i=null,C(this.#r,()=>{this.#r=null}),this.#_())}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#f=0,this.#a=y(()=>{this.#u(this.#t)}),this.#l>0){var e=this.#i=document.createDocumentFragment();ce(this.#a,e);const r=this.#s.pending;this.#r=y(()=>r(this.#t))}else this.#_()}catch(r){this.error(r)}}#_(){this.is_pending=!1;for(const e of this.#d)G(e,de),X(e);for(const e of this.#h)G(e,he),X(e);this.#d.clear(),this.#h.clear()}defer_effect(e){_e(e,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#p(e){var r=m,s=ee,a=te;O(this.#e),k(this.#e),J(this.#e.ctx);try{return e()}catch(n){return pe(n),null}finally{O(r),k(s),J(a)}}#m(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(e);return}this.#l+=e,this.#l===0&&(this.#_(),this.#r&&C(this.#r,()=>{this.#r=null}),this.#i&&(this.#t.before(this.#i),this.#i=null))}update_pending_count(e){this.#m(e),this.#f+=e,!(!this.#o||this.#c)&&(this.#c=!0,N(()=>{this.#c=!1,this.#o&&ve(this.#o,this.#f)}))}get_effect_pending(){return this.#y(),K(this.#o)}error(e){var r=this.#s.onerror;let s=this.#s.failed;if(!r&&!s)throw e;this.#a&&(F(this.#a),this.#a=null),this.#r&&(F(this.#r),this.#r=null),this.#n&&(F(this.#n),this.#n=null),_&&(R(this.#v),ge(),R(me()));var a=!1,n=!1;const i=()=>{if(a){be();return}a=!0,n&&Te(),this.#n!==null&&C(this.#n,()=>{this.#n=null}),this.#p(()=>{I.ensure(),this.#g()})},f=o=>{try{n=!0,r?.(o,i),n=!1}catch(u){D(u,this.#e&&this.#e.parent)}s&&(this.#n=this.#p(()=>{I.ensure();try{return y(()=>{var u=m;u.b=this,u.f|=U,s(this.#t,()=>o,()=>i)})}catch(u){return D(u,this.#e.parent),null}}))};N(()=>{var o;try{o=this.transform_error(e)}catch(u){D(u,this.#e&&this.#e.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(f,u=>D(u,this.#e&&this.#e.parent)):f(o)})}}function st(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ze=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function at(t){return ze.includes(t)}const Ge={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function it(t){return t=t.toLowerCase(),Ge[t]??t}const Xe=["touchstart","touchmove"];function Je(t){return Xe.includes(t)}const Qe=["textarea","script","style","title"];function ot(t){return Qe.includes(t)}const w=Symbol("events"),re=new Set,V=new Set;function ne(t,e,r,s={}){function a(n){if(s.capture||W.call(e,n),!n.cancelBubble)return Ne(()=>r?.call(this,n))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?N(()=>{e.addEventListener(t,a,s)}):e.addEventListener(t,a,s),a}function lt(t,e,r,s={}){var a=ne(e,t,r,s);return()=>{t.removeEventListener(e,a,s)}}function ut(t,e,r,s,a){var n={capture:s,passive:a},i=ne(t,e,r,n);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&we(()=>{e.removeEventListener(t,i,n)})}function ft(t,e,r){(e[w]??={})[t]=r}function ct(t){for(var e=0;e<t.length;e++)re.add(t[e]);for(var r of V)r(t)}let Q=null;function W(t){var e=this,r=e.ownerDocument,s=t.type,a=t.composedPath?.()||[],n=a[0]||t.target;Q=t;var i=0,f=Q===t&&t[w];if(f){var o=a.indexOf(f);if(o!==-1&&(e===document||e===window)){t[w]=e;return}var u=a.indexOf(e);if(u===-1)return;o<=u&&(i=o)}if(n=a[i]||t.target,n!==e){Ae(t,"currentTarget",{configurable:!0,get(){return n||r}});var E=ee,b=m;k(null),O(null);try{for(var g,d=[];n!==null;){var c=n.assignedSlot||n.parentNode||n.host||null;try{var h=n[w]?.[s];h!=null&&(!n.disabled||t.target===n)&&h.call(n,t)}catch(p){g?d.push(p):g=p}if(t.cancelBubble||c===e||c===null)break;n=c}if(g){for(let p of d)queueMicrotask(()=>{throw p});throw g}}finally{t[w]=e,delete t.currentTarget,k(E),O(b)}}}const Ke=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Ze(t){return Ke?.createHTML(t)??t}function se(t){var e=Re("template");return e.innerHTML=Ze(t.replaceAll("<!>","<!---->")),e.content}function v(t,e){var r=m;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function dt(t,e){var r=(e&De)!==0,s=(e&Le)!==0,a,n=!t.startsWith("<!>");return()=>{if(_)return v(l,null),l;a===void 0&&(a=se(n?t:"<!>"+t),r||(a=S(a)));var i=s||Se?document.importNode(a,!0):a.cloneNode(!0);if(r){var f=S(i),o=i.lastChild;v(f,o)}else v(i,i);return i}}function et(t,e,r="svg"){var s=!t.startsWith("<!>"),a=`<${r}>${s?t:"<!>"+t}</${r}>`,n;return()=>{if(_)return v(l,null),l;if(!n){var i=se(a),f=S(i);n=S(f)}var o=n.cloneNode(!0);return v(o,o),o}}function ht(t,e){return et(t,e,"svg")}function _t(t=""){if(!_){var e=A(t+"");return v(e,e),e}var r=l;return r.nodeType!==Me?(r.before(r=A()),R(r)):Oe(r),v(r,r),r}function pt(){if(_)return v(l,null),l;var t=document.createDocumentFragment(),e=document.createComment(""),r=A();return t.append(e,r),v(e,r),t}function vt(t,e){if(_){var r=m;((r.f&ke)===0||r.nodes.end===null)&&(r.nodes.end=l),B();return}t!==null&&t.before(e)}function gt(){if(_&&l&&l.nodeType===$&&l.textContent?.startsWith("$")){const t=l.textContent.substring(1);return B(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function mt(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=`${r}`)}function tt(t,e){return ae(t,e)}function yt(t,e){P(),e.intro=e.intro??!1;const r=e.target,s=_,a=l;try{for(var n=S(r);n&&(n.nodeType!==$||n.data!==xe);)n=Ie(n);if(!n)throw H;L(!0),R(n);const i=ae(t,{...e,anchor:n});return L(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
2
|
`).some(f=>f.startsWith("https://svelte.dev/e/")))throw i;return i!==H&&console.warn("Failed to hydrate: ",i),e.recover===!1&&Ce(),P(),Fe(r),L(!1),tt(t,e)}finally{L(s),R(a)}}const M=new Map;function ae(t,{target:e,anchor:r,props:s={},events:a,context:n,intro:i=!0,transformError:f}){P();var o=void 0,u=Pe(()=>{var E=r??e.appendChild(A());qe(E,{pending:()=>{}},d=>{Ve({});var c=te;if(n&&(c.c=n),a&&(s.$$events=a),_&&v(d,null),o=t(d,s)||{},_&&(m.nodes.end=l,l===null||l.nodeType!==$||l.data!==We))throw Ye(),H;Be()},f);var b=new Set,g=d=>{for(var c=0;c<d.length;c++){var h=d[c];if(!b.has(h)){b.add(h);var p=Je(h);for(const x of[e,document]){var T=M.get(x);T===void 0&&(T=new Map,M.set(x,T));var j=T.get(h);j===void 0?(x.addEventListener(h,W,{passive:p}),T.set(h,1)):T.set(h,j+1)}}}};return g(He(re)),V.add(g),()=>{for(var d of b)for(const p of[e,document]){var c=M.get(p),h=c.get(d);--h==0?(p.removeEventListener(d,W),c.delete(d),c.size===0&&M.delete(p)):c.set(d,h)}V.delete(g),E!==r&&E.parentNode?.removeChild(E)}});return Y.set(o,u),o}let Y=new WeakMap;function Et(t,e){const r=Y.get(t);return r?(Y.delete(t),r(e)):Promise.resolve()}const rt="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(rt);export{vt as a,ft as b,pt as c,ct as d,ut as e,dt as f,v as g,yt as h,ot as i,ht as j,$e as k,st as l,tt as m,ne as n,it as o,at as p,gt as q,lt as r,mt as s,_t as t,Et as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Bt=Array.isArray,Gt=Array.prototype.indexOf,ie=Array.prototype.includes,Vn=Array.from,Un=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,zt=Object.prototype,$t=Array.prototype,ot=Object.getPrototypeOf,et=Object.isExtensible;function Bn(e){return typeof e=="function"}const Xt=()=>{};function Gn(e){return e()}function Zt(e){for(var t=0;t<e.length;t++)e[t]()}function ut(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Kn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const m=2,ae=4,le=8,He=1<<24,$=16,L=32,X=64,Wt=128,O=512,E=1024,T=2048,F=4096,P=8192,V=16384,ve=32768,Ae=65536,tt=1<<17,Jt=1<<18,de=1<<19,ct=1<<20,zn=1<<25,re=65536,Me=1<<21,qe=1<<22,U=1<<23,te=Symbol("$state"),$n=Symbol("legacy props"),Xn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Wn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Jn=1,ke=3,_t=8;function Ve(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Qt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qn(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function en(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function tn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function nn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function er(){throw new Error("https://svelte.dev/e/hydration_failed")}function tr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function sn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function an(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function nr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const rr=1,sr=2,ar=4,fr=8,ir=16,lr=1,or=2,ur=4,cr=8,_r=16,vr=1,dr=2,ln="[",on="[!",hr="[?",un="]",Ue={},b=Symbol(),cn="http://www.w3.org/1999/xhtml",pr="http://www.w3.org/2000/svg",wr="http://www.w3.org/1998/Math/MathML",yr="@attach";function Be(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Er(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function br(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let G=!1;function mr(e){G=e}let S;function oe(e){if(e===null)throw Be(),Ue;return S=e}function gr(){return oe(Z(S))}function Tr(e){if(G){if(Z(S)!==null)throw Be(),Ue;S=e}}function Ar(e=1){if(G){for(var t=e,n=S;t--;)n=Z(n);S=n}}function xr(e=!0){for(var t=0,n=S;;){if(n.nodeType===_t){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===ln||r===on||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Sr(e){if(!e||e.nodeType!==_t)throw Be(),Ue;return e.data}function vt(e){return e===this.v}function _n(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function dt(e){return!_n(e,this.v)}let Ee=!1;function Rr(){Ee=!0}let p=null;function xe(e){p=e}function Nr(e){return Oe().get(e)}function kr(e,t){return Oe().set(e,t),t}function Or(e){return Oe().has(e)}function Dr(){return Oe()}function Cr(e,t=!1,n){p={p,i:!1,c:null,e:null,s:e,x:null,l:Ee&&!t?{s:null,u:null,$:[]}:null}}function Ir(e){var t=p,n=t.e;if(n!==null){t.e=null;for(var r of n)Dt(r)}return e!==void 0&&(t.x=e),t.i=!0,p=t.p,e??{}}function be(){return!Ee||p!==null&&p.l===null}function Oe(e){return p===null&&Ve(),p.c??=new Map(vn(p)||void 0)}function vn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let J=[];function ht(){var e=J;J=[],Zt(e)}function Pe(e){if(J.length===0&&!we){var t=J;queueMicrotask(()=>{t===J&&ht()})}J.push(e)}function dn(){for(;J.length>0;)ht()}function hn(e){var t=d;if(t===null)return v.f|=U,e;if((t.f&ve)===0&&(t.f&ae)===0)throw e;Se(e,t)}function Se(e,t){for(;t!==null;){if((t.f&Wt)!==0){if((t.f&ve)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const pn=-7169;function y(e,t){e.f=e.f&pn|t}function Ge(e){(e.f&O)!==0||e.deps===null?y(e,E):y(e,F)}function pt(e){if(e!==null)for(const t of e)(t.f&m)===0||(t.f&re)===0||(t.f^=re,pt(t.deps))}function wn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&F)!==0&&n.add(e),pt(e.deps),y(e,E)}const ge=new Set;let w=null,nt=null,I=null,A=[],De=null,we=!1,ue=null;class fe{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#a=0;#f=null;#i=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#a>0}skip_effect(t){this.#e.has(t)||this.#e.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#e.get(t);if(n){this.#e.delete(t);for(var r of n.d)y(r,T),Y(r);for(r of n.m)y(r,F),Y(r)}}process(t){A=[],this.apply();var n=ue=[],r=[];for(const s of t)this.#u(s,n,r);if(ue=null,this.#o()){this.#c(r),this.#c(n);for(const[s,a]of this.#e)bt(s,a)}else{nt=this,w=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),rt(r),rt(n),this.#i.clear(),this.#n.clear(),nt=null,this.#f?.resolve()}I=null}#u(t,n,r){t.f^=E;for(var s=t.first;s!==null;){var a=s.f,l=(a&(L|X))!==0,o=l&&(a&E)!==0,f=o||(a&P)!==0||this.#e.has(s);if(!f&&s.fn!==null){l?s.f^=E:(a&ae)!==0?n.push(s):me(s)&&((a&$)!==0&&this.#n.add(s),_e(s));var i=s.first;if(i!==null){s=i;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#c(t){for(var n=0;n<t.length;n+=1)wn(t[n],this.#i,this.#n)}capture(t,n){n!==b&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){w=this,this.apply()}deactivate(){w===this&&(w=null,I=null)}flush(){if(A.length>0)w=this,wt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#f?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(ge.size>1){this.previous.clear();var t=w,n=I,r=!0;for(const a of ge){if(a===this){r=!1;continue}const l=[];for(const[f,i]of this.current){if(a.current.has(f))if(r&&i!==a.current.get(f))a.current.set(f,i);else continue;l.push(f)}if(l.length===0)continue;const o=[...a.current.keys()].filter(f=>!this.current.has(f));if(o.length>0){var s=A;A=[];const f=new Set,i=new Map;for(const u of l)yt(u,o,f,i);if(A.length>0){w=a,a.apply();for(const u of A)a.#u(u,[],[]);a.deactivate()}A=s}}w=t,I=n}this.#e.clear(),ge.delete(this)}increment(t){this.#r+=1,t&&(this.#a+=1)}decrement(t){this.#r-=1,t&&(this.#a-=1),!this.#l&&(this.#l=!0,Pe(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#i)this.#n.delete(t),y(t,T),Y(t);for(const t of this.#n)y(t,F),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#f??=ut()).promise}static ensure(){if(w===null){const t=w=new fe;ge.add(w),we||Pe(()=>{w===t&&t.flush()})}return w}apply(){}}function yn(e){var t=we;we=!0;try{for(var n;;){if(dn(),A.length===0&&(w?.flush(),A.length===0))return De=null,n;wt()}}finally{we=t}}function wt(){var e=null;try{for(var t=0;A.length>0;){var n=fe.ensure();if(t++>1e3){var r,s;En()}n.process(A),B.clear()}}finally{A=[],De=null,ue=null}}function En(){try{rn()}catch(e){Se(e,De)}}let j=null;function rt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|P))===0&&me(r)&&(j=new Set,_e(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&It(r),j?.size>0)){B.clear();for(const s of j){if((s.f&(V|P))!==0)continue;const a=[s];let l=s.parent;for(;l!==null;)j.has(l)&&(j.delete(l),a.push(l)),l=l.parent;for(let o=a.length-1;o>=0;o--){const f=a[o];(f.f&(V|P))===0&&_e(f)}}j.clear()}}j=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;(a&m)!==0?yt(s,t,n,r):(a&(qe|$))!==0&&(a&T)===0&&Et(s,t,r)&&(y(s,T),Y(s))}}function Et(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(ie.call(t,s))return!0;if((s.f&m)!==0&&Et(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=De=e,n=t.b;if(n?.is_pending&&(e.f&(ae|le|He))!==0&&(e.f&ve)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(ue!==null&&t===d&&(e.f&le)===0)return;if((r&(X|L))!==0){if((r&E)===0)return;t.f^=E}}A.push(t)}function bt(e,t){if(!((e.f&L)!==0&&(e.f&E)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&F)!==0&&t.m.push(e),y(e,E);for(var n=e.first;n!==null;)bt(n,t),n=n.next}}function mt(e,t,n,r){const s=be()?Ke:gn;var a=e.filter(c=>!c.settled);if(n.length===0&&a.length===0){r(t.map(s));return}var l=d,o=bn(),f=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(c=>c.promise)):null;function i(c){o();try{r(c)}catch(_){(l.f&V)===0&&Se(_,l)}Fe()}if(n.length===0){f.then(()=>i(t.map(s)));return}function u(){o(),Promise.all(n.map(c=>mn(c))).then(c=>i([...t.map(s),...c])).catch(c=>Se(c,l))}f?f.then(u):u()}function bn(){var e=d,t=v,n=p,r=w;return function(a=!0){ce(e),z(t),xe(n),a&&r?.activate()}}function Fe(e=!0){ce(null),z(null),xe(null),e&&w?.deactivate()}function gt(){var e=d.b,t=w,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Ke(e){var t=m|T,n=v!==null&&(v.f&m)!==0?v:null;return d!==null&&(d.f|=de),{ctx:p,deps:null,effects:null,equals:vt,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:n??d,ac:null}}function mn(e,t,n){d===null&&Qt();var s=void 0,a=$e(b),l=!v,o=new Map;return Mn(()=>{var f=ut();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(Fe)}catch(_){f.reject(_),Fe()}var i=w;if(l){var u=gt();o.get(i)?.reject(W),o.delete(i),o.set(i,f)}const c=(_,g=void 0)=>{if(i.activate(),g)g!==W&&(a.f|=U,je(a,g));else{(a.f&U)!==0&&(a.f^=U),je(a,_);for(const[h,C]of o){if(o.delete(h),h===i)break;C.reject(W)}}u&&u()};f.promise.then(c,_=>c(null,_||"unknown"))}),Cn(()=>{for(const f of o.values())f.reject(W)}),new Promise(f=>{function i(u){function c(){u===s?f(a):i(s)}u.then(c,c)}i(s)})}function Mr(e){const t=Ke(e);return Ft(t),t}function gn(e){const t=Ke(e);return t.equals=dt,t}function Tn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)K(t[n])}}function An(e){for(var t=e.parent;t!==null;){if((t.f&m)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function ze(e){var t,n=d;ce(An(e));try{e.f&=~re,Tn(e),t=Ht(e)}finally{ce(n)}return t}function Tt(e){var t=ze(e);if(!e.equals(t)&&(e.wv=jt(),(!w?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){y(e,E);return}se||(I!==null?(Ot()||w?.is_fork)&&I.set(e,t):Ge(e))}function xn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=Xt,t.ac=null,ye(t,0),We(t))}function At(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&_e(t)}let Le=new Set;const B=new Map;let xt=!1;function $e(e,t){var n={f:0,v:e,reactions:null,equals:vt,rv:0,wv:0};return n}function H(e,t){const n=$e(e);return Ft(n),n}function Pr(e,t=!1,n=!0){const r=$e(e);return t||(r.equals=dt),Ee&&n&&p!==null&&p.l!==null&&(p.l.s??=[]).push(r),r}function q(e,t,n=!1){v!==null&&(!M||(v.f&tt)!==0)&&be()&&(v.f&(m|$|qe|tt))!==0&&(D===null||!ie.call(D,e))&&fn();let r=n?he(t):t;return je(e,r)}function je(e,t){if(!e.equals(t)){var n=e.v;se?B.set(e,t):B.set(e,n),e.v=t;var r=fe.ensure();if(r.capture(e,n),(e.f&m)!==0){const s=e;(e.f&T)!==0&&ze(s),Ge(s)}e.wv=jt(),St(e,T),be()&&d!==null&&(d.f&E)!==0&&(d.f&(L|X))===0&&(k===null?jn([e]):k.push(e)),!r.is_fork&&Le.size>0&&!xt&&Sn()}return t}function Sn(){xt=!1;for(const e of Le)(e.f&E)!==0&&y(e,F),me(e)&&_e(e);Le.clear()}function Fr(e,t=1){var n=ee(e),r=t===1?n++:n--;return q(e,n),r}function Ie(e){q(e,e.v+1)}function St(e,t){var n=e.reactions;if(n!==null)for(var r=be(),s=n.length,a=0;a<s;a++){var l=n[a],o=l.f;if(!(!r&&l===d)){var f=(o&T)===0;if(f&&y(l,t),(o&m)!==0){var i=l;I?.delete(i),(o&re)===0&&(o&O&&(l.f|=re),St(i,F))}else f&&((o&$)!==0&&j!==null&&j.add(l),Y(l))}}}function he(e){if(typeof e!="object"||e===null||te in e)return e;const t=ot(e);if(t!==zt&&t!==$t)return e;var n=new Map,r=Bt(e),s=H(0),a=ne,l=o=>{if(ne===a)return o();var f=v,i=ne;z(null),lt(a);var u=o();return z(f),lt(i),u};return r&&n.set("length",H(e.length)),new Proxy(e,{defineProperty(o,f,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&sn();var u=n.get(f);return u===void 0?l(()=>{var c=H(i.value);return n.set(f,c),c}):q(u,i.value,!0),!0},deleteProperty(o,f){var i=n.get(f);if(i===void 0){if(f in o){const u=l(()=>H(b));n.set(f,u),Ie(s)}}else q(i,b),Ie(s);return!0},get(o,f,i){if(f===te)return e;var u=n.get(f),c=f in o;if(u===void 0&&(!c||pe(o,f)?.writable)&&(u=l(()=>{var g=he(c?o[f]:b),h=H(g);return h}),n.set(f,u)),u!==void 0){var _=ee(u);return _===b?void 0:_}return Reflect.get(o,f,i)},getOwnPropertyDescriptor(o,f){var i=Reflect.getOwnPropertyDescriptor(o,f);if(i&&"value"in i){var u=n.get(f);u&&(i.value=ee(u))}else if(i===void 0){var c=n.get(f),_=c?.v;if(c!==void 0&&_!==b)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return i},has(o,f){if(f===te)return!0;var i=n.get(f),u=i!==void 0&&i.v!==b||Reflect.has(o,f);if(i!==void 0||d!==null&&(!u||pe(o,f)?.writable)){i===void 0&&(i=l(()=>{var _=u?he(o[f]):b,g=H(_);return g}),n.set(f,i));var c=ee(i);if(c===b)return!1}return u},set(o,f,i,u){var c=n.get(f),_=f in o;if(r&&f==="length")for(var g=i;g<c.v;g+=1){var h=n.get(g+"");h!==void 0?q(h,b):g in o&&(h=l(()=>H(b)),n.set(g+"",h))}if(c===void 0)(!_||pe(o,f)?.writable)&&(c=l(()=>H(void 0)),q(c,he(i)),n.set(f,c));else{_=c.v!==b;var C=l(()=>he(i));q(c,C)}var Je=Reflect.getOwnPropertyDescriptor(o,f);if(Je?.set&&Je.set.call(u,i),!_){if(r&&typeof f=="string"){var Qe=n.get("length"),Ce=Number(f);Number.isInteger(Ce)&&Ce>=Qe.v&&q(Qe,Ce+1)}Ie(s)}return!0},ownKeys(o){ee(s);var f=Reflect.ownKeys(o).filter(c=>{var _=n.get(c);return _===void 0||_.v!==b});for(var[i,u]of n)u.v!==b&&!(i in o)&&f.push(i);return f},setPrototypeOf(){an()}})}function st(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function Lr(e,t){return Object.is(st(e),st(t))}var at,Rn,Nn,Rt,Nt;function jr(){if(at===void 0){at=window,Rn=document,Nn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Rt=pe(t,"firstChild").get,Nt=pe(t,"nextSibling").get,et(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),et(n)&&(n.__t=void 0)}}function Re(e=""){return document.createTextNode(e)}function Ne(e){return Rt.call(e)}function Z(e){return Nt.call(e)}function Yr(e,t){if(!G)return Ne(e);var n=Ne(S);if(n===null)n=S.appendChild(Re());else if(t&&n.nodeType!==ke){var r=Re();return n?.before(r),oe(r),r}return t&&Xe(n),oe(n),n}function Hr(e,t=!1){if(!G){var n=Ne(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==ke){var r=Re();return S?.before(r),oe(r),r}Xe(S)}return S}function qr(e,t=1,n=!1){let r=G?S:e;for(var s;t--;)s=r,r=Z(r);if(!G)return r;if(n){if(r?.nodeType!==ke){var a=Re();return r===null?s?.after(a):r.before(a),oe(a),a}Xe(r)}return oe(r),r}function kn(e){e.textContent=""}function Vr(){return!1}function Ur(e,t,n){return document.createElementNS(t??cn,e,void 0)}function Xe(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===ke;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Br(e,t){if(t){const n=document.body;e.autofocus=!0,Pe(()=>{document.activeElement===n&&e.focus()})}}function Gr(e){G&&Ne(e)!==null&&kn(e)}let ft=!1;function On(){ft||(ft=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ze(e){var t=v,n=d;z(null),ce(null);try{return e()}finally{z(t),ce(n)}}function Kr(e,t,n,r=n){e.addEventListener(t,()=>Ze(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),On()}function kt(e){d===null&&(v===null&&nn(),tn()),se&&en()}function Dn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t){var n=d;n!==null&&(n.f&P)!==0&&(e|=P);var r={ctx:p,deps:null,nodes:null,f:e|T|O,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&ae)!==0)ue!==null?ue.push(r):Y(r);else if(t!==null){try{_e(r)}catch(l){throw K(r),l}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&de)===0&&(s=s.first,(e&$)!==0&&(e&Ae)!==0&&s!==null&&(s.f|=Ae))}if(s!==null&&(s.parent=n,n!==null&&Dn(s,n),v!==null&&(v.f&m)!==0&&(e&X)===0)){var a=v;(a.effects??=[]).push(s)}return r}function Ot(){return v!==null&&!M}function Cn(e){const t=N(le,null);return y(t,E),t.teardown=e,t}function In(e){kt();var t=d.f,n=!v&&(t&L)!==0&&(t&ve)===0;if(n){var r=p;(r.e??=[]).push(e)}else return Dt(e)}function Dt(e){return N(ae|ct,e)}function zr(e){return kt(),N(le|ct,e)}function $r(e){fe.ensure();const t=N(X|de,e);return()=>{K(t)}}function Xr(e){fe.ensure();const t=N(X|de,e);return(n={})=>new Promise(r=>{n.outro?Ln(t,()=>{K(t),r(void 0)}):(K(t),r(void 0))})}function Zr(e){return N(ae,e)}function Mn(e){return N(qe|de,e)}function Wr(e,t=0){return N(le|t,e)}function Jr(e,t=[],n=[],r=[]){mt(r,t,n,s=>{N(le,()=>e(...s.map(ee)))})}function Qr(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=gt();mt(r,t,n,a=>{N(ae,()=>e(...a.map(ee))),s&&s()})}function es(e,t=0){var n=N($|t,e);return n}function ts(e,t=0){var n=N(He|t,e);return n}function ns(e){return N(L|de,e)}function Ct(e){var t=e.teardown;if(t!==null){const n=se,r=v;it(!0),z(null);try{t.call(null)}finally{it(n),z(r)}}}function We(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Ze(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:K(n,t),n=r}}function Pn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&K(t),t=n}}function K(e,t=!0){var n=!1;(t||(e.f&Jt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Fn(e.nodes.start,e.nodes.end),n=!0),We(e,t&&!n),ye(e,0),y(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();Ct(e);var s=e.parent;s!==null&&s.first!==null&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Fn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ln(e,t,n=!0){var r=[];Mt(e,r,!0);var s=()=>{n&&K(e),t&&t()},a=r.length;if(a>0){var l=()=>--a||s();for(var o of r)o.out(l)}else s()}function Mt(e,t,n){if((e.f&P)===0){e.f^=P;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var a=s.next,l=(s.f&Ae)!==0||(s.f&L)!==0&&(e.f&$)!==0;Mt(s,t,l?n:!1),s=a}}}function rs(e){Pt(e,!0)}function Pt(e,t){if((e.f&P)!==0){e.f^=P,(e.f&E)===0&&(y(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Ae)!==0||(n.f&L)!==0;Pt(n,s?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||t)&&l.in()}}function ss(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Z(n);t.append(n),n=s}}let Te=!1,se=!1;function it(e){se=e}let v=null,M=!1;function z(e){v=e}let d=null;function ce(e){d=e}let D=null;function Ft(e){v!==null&&(D===null?D=[e]:D.push(e))}let x=null,R=0,k=null;function jn(e){k=e}let Lt=1,Q=0,ne=Q;function lt(e){ne=e}function jt(){return++Lt}function me(e){var t=e.f;if((t&T)!==0)return!0;if(t&m&&(e.f&=~re),(t&F)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var a=n[s];if(me(a)&&Tt(a),a.wv>e.wv)return!0}(t&O)!==0&&I===null&&y(e,E)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!(D!==null&&ie.call(D,e)))for(var s=0;s<r.length;s++){var a=r[s];(a.f&m)!==0?Yt(a,t,!1):t===a&&(n?y(a,T):(a.f&E)!==0&&y(a,F),Y(a))}}function Ht(e){var t=x,n=R,r=k,s=v,a=D,l=p,o=M,f=ne,i=e.f;x=null,R=0,k=null,v=(i&(L|X))===0?e:null,D=null,xe(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Ze(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Me;var u=e.fn,c=u();e.f|=ve;var _=e.deps,g=w?.is_fork;if(x!==null){var h;if(g||ye(e,R),_!==null&&R>0)for(_.length=R+x.length,h=0;h<x.length;h++)_[R+h]=x[h];else e.deps=_=x;if(Ot()&&(e.f&O)!==0)for(h=R;h<_.length;h++)(_[h].reactions??=[]).push(e)}else!g&&_!==null&&R<_.length&&(ye(e,R),_.length=R);if(be()&&k!==null&&!M&&_!==null&&(e.f&(m|F|T))===0)for(h=0;h<k.length;h++)Yt(k[h],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let C=0;C<n;C+=1)s.deps[C].rv=Q;if(t!==null)for(const C of t)C.rv=Q;k!==null&&(r===null?r=k:r.push(...k))}return(e.f&U)!==0&&(e.f^=U),c}catch(C){return hn(C)}finally{e.f^=Me,x=t,R=n,k=r,v=s,D=a,xe(l),M=o,ne=f}}function Yn(e,t){let n=t.reactions;if(n!==null){var r=Gt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&m)!==0&&(x===null||!ie.call(x,t))){var a=t;(a.f&O)!==0&&(a.f^=O,a.f&=~re),Ge(a),xn(a),ye(a,0)}}function ye(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Yn(e,n[r])}function _e(e){var t=e.f;if((t&V)===0){y(e,E);var n=d,r=Te;d=e,Te=!0;try{(t&($|He))!==0?Pn(e):We(e),Ct(e);var s=Ht(e);e.teardown=typeof s=="function"?s:null,e.wv=Lt;var a}finally{Te=r,d=n}}}async function as(){await Promise.resolve(),yn()}function fs(){return fe.ensure().settled()}function ee(e){var t=e.f,n=(t&m)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(D===null||!ie.call(D,e))){var s=v.deps;if((v.f&Me)!==0)e.rv<Q&&(e.rv=Q,x===null&&s!==null&&s[R]===e?R++:x===null?x=[e]:x.push(e));else{(v.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[v]:ie.call(a,v)||a.push(v)}}}if(se&&B.has(e))return B.get(e);if(n){var l=e;if(se){var o=l.v;return((l.f&E)===0&&l.reactions!==null||Vt(l))&&(o=ze(l)),B.set(l,o),o}var f=(l.f&O)===0&&!M&&v!==null&&(Te||(v.f&O)!==0),i=(l.f&ve)===0;me(l)&&(f&&(l.f|=O),Tt(l)),f&&!i&&(At(l),qt(l))}if(I?.has(e))return I.get(e);if((e.f&U)!==0)throw e.v;return e.v}function qt(e){if(e.f|=O,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&m)!==0&&(t.f&O)===0&&(At(t),qt(t))}function Vt(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(B.has(t)||(t.f&m)!==0&&Vt(t))return!0;return!1}function Ut(e){var t=M;try{return M=!0,e()}finally{M=t}}function is(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ye(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ye(n)}}}function Ye(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ye(e[r],t)}catch{}const n=ot(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Kt(n);for(let s in r){const a=r[s].get;if(a)try{a.call(e)}catch{}}}}}function Hn(e){p===null&&Ve(),Ee&&p.l!==null?qn(p).m.push(e):In(()=>{const t=Ut(e);if(typeof t=="function")return t})}function ls(e){p===null&&Ve(),Hn(()=>()=>Ut(e))}function qn(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{Rn as $,p as A,zr as B,_t as C,In as D,Ae as E,Ut as F,Zt as G,ln as H,Gn as I,is as J,Ke as K,Rr as L,Zr as M,Kr as N,w as O,as as P,Wr as Q,nt as R,he as S,Fr as T,at as U,Mr as V,$n as W,yn as X,Un as Y,Pr as Z,Hn as _,gr as a,Gr as a$,kr as a0,rs as a1,K as a2,Ln as a3,ns as a4,ss as a5,Vr as a6,on as a7,Pe as a8,te as a9,xe as aA,hn as aB,v as aC,je as aD,Se as aE,nr as aF,br as aG,Cn as aH,Ze as aI,Ur as aJ,Nn as aK,vr as aL,dr as aM,ke as aN,Xe as aO,ve as aP,jr as aQ,Ue as aR,er as aS,kn as aT,Xr as aU,Vn as aV,un as aW,Be as aX,Fn as aY,pr as aZ,wr as a_,pe as aa,tr as ab,ur as ac,se as ad,d as ae,V as af,cr as ag,Ee as ah,or as ai,lr as aj,gn as ak,_r as al,$e as am,Bn as an,ce as ao,Ot as ap,Ie as aq,Wt as ar,hr as as,fe as at,y as au,T as av,Y as aw,F as ax,wn as ay,z as az,es as b,Qn as b0,ar as b1,sr as b2,rr as b3,ir as b4,Bt as b5,zn as b6,P as b7,L as b8,fr as b9,Jn as ba,Kn as bb,Xt as bc,ts as bd,Er as be,Lr as bf,mt as bg,yr as bh,Wn as bi,Br as bj,b as bk,On as bl,cn as bm,ot as bn,Xn as bo,Kt as bp,ls as bq,zt as br,be as bs,ne as bt,Or as bu,Dr as bv,$r as bw,_n as bx,fs as by,oe as c,mr as d,S as e,Hr as f,Re as g,G as h,Jt as i,de as j,Z as k,Ne as l,Nr as m,Ir as n,Yr as o,Cr as p,qr as q,Sr as r,xr as s,Ar as t,Tr as u,Jr as v,Qr as w,q as x,ee as y,H as z};
|
|
1
|
+
var Bt=Array.isArray,Gt=Array.prototype.indexOf,ie=Array.prototype.includes,Vn=Array.from,Un=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,zt=Object.prototype,$t=Array.prototype,ot=Object.getPrototypeOf,et=Object.isExtensible;function Bn(e){return typeof e=="function"}const Xt=()=>{};function Gn(e){return e()}function Zt(e){for(var t=0;t<e.length;t++)e[t]()}function ut(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Kn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const m=2,ae=4,le=8,He=1<<24,$=16,L=32,X=64,Wt=128,O=512,E=1024,T=2048,F=4096,P=8192,V=16384,ve=32768,Ae=65536,tt=1<<17,Jt=1<<18,de=1<<19,ct=1<<20,zn=1<<25,re=65536,Me=1<<21,qe=1<<22,U=1<<23,te=Symbol("$state"),$n=Symbol("legacy props"),Xn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Wn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Jn=1,ke=3,_t=8;function Ve(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Qt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qn(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function en(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function tn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function nn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function er(){throw new Error("https://svelte.dev/e/hydration_failed")}function tr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function sn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function an(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function nr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const rr=1,sr=2,ar=4,fr=8,ir=16,lr=1,or=2,ur=4,cr=8,_r=16,vr=1,dr=2,ln="[",on="[!",hr="[?",un="]",Ue={},b=Symbol(),cn="http://www.w3.org/1999/xhtml",pr="http://www.w3.org/2000/svg",wr="http://www.w3.org/1998/Math/MathML",yr="@attach";function Be(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Er(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function br(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let G=!1;function mr(e){G=e}let S;function oe(e){if(e===null)throw Be(),Ue;return S=e}function gr(){return oe(Z(S))}function Tr(e){if(G){if(Z(S)!==null)throw Be(),Ue;S=e}}function Ar(e=1){if(G){for(var t=e,n=S;t--;)n=Z(n);S=n}}function xr(e=!0){for(var t=0,n=S;;){if(n.nodeType===_t){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===ln||r===on||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Sr(e){if(!e||e.nodeType!==_t)throw Be(),Ue;return e.data}function vt(e){return e===this.v}function _n(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function dt(e){return!_n(e,this.v)}let Ee=!1;function Rr(){Ee=!0}let p=null;function xe(e){p=e}function Nr(e){return Oe().get(e)}function kr(e,t){return Oe().set(e,t),t}function Or(e){return Oe().has(e)}function Dr(){return Oe()}function Cr(e,t=!1,n){p={p,i:!1,c:null,e:null,s:e,x:null,l:Ee&&!t?{s:null,u:null,$:[]}:null}}function Ir(e){var t=p,n=t.e;if(n!==null){t.e=null;for(var r of n)Dt(r)}return e!==void 0&&(t.x=e),t.i=!0,p=t.p,e??{}}function be(){return!Ee||p!==null&&p.l===null}function Oe(e){return p===null&&Ve(),p.c??=new Map(vn(p)||void 0)}function vn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let J=[];function ht(){var e=J;J=[],Zt(e)}function Pe(e){if(J.length===0&&!we){var t=J;queueMicrotask(()=>{t===J&&ht()})}J.push(e)}function dn(){for(;J.length>0;)ht()}function hn(e){var t=d;if(t===null)return v.f|=U,e;if((t.f&ve)===0&&(t.f&ae)===0)throw e;Se(e,t)}function Se(e,t){for(;t!==null;){if((t.f&Wt)!==0){if((t.f&ve)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const pn=-7169;function y(e,t){e.f=e.f&pn|t}function Ge(e){(e.f&O)!==0||e.deps===null?y(e,E):y(e,F)}function pt(e){if(e!==null)for(const t of e)(t.f&m)===0||(t.f&re)===0||(t.f^=re,pt(t.deps))}function wn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&F)!==0&&n.add(e),pt(e.deps),y(e,E)}const ge=new Set;let w=null,nt=null,I=null,A=[],De=null,we=!1,ue=null;class fe{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#a=0;#f=null;#i=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#a>0}skip_effect(t){this.#e.has(t)||this.#e.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#e.get(t);if(n){this.#e.delete(t);for(var r of n.d)y(r,T),Y(r);for(r of n.m)y(r,F),Y(r)}}process(t){A=[],this.apply();var n=ue=[],r=[];for(const s of t)this.#u(s,n,r);if(ue=null,this.#o()){this.#c(r),this.#c(n);for(const[s,a]of this.#e)bt(s,a)}else{nt=this,w=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),rt(r),rt(n),this.#i.clear(),this.#n.clear(),nt=null,this.#f?.resolve()}I=null}#u(t,n,r){t.f^=E;for(var s=t.first;s!==null;){var a=s.f,l=(a&(L|X))!==0,o=l&&(a&E)!==0,f=o||(a&P)!==0||this.#e.has(s);if(!f&&s.fn!==null){l?s.f^=E:(a&ae)!==0?n.push(s):me(s)&&((a&$)!==0&&this.#n.add(s),_e(s));var i=s.first;if(i!==null){s=i;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#c(t){for(var n=0;n<t.length;n+=1)wn(t[n],this.#i,this.#n)}capture(t,n){n!==b&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){w=this,this.apply()}deactivate(){w===this&&(w=null,I=null)}flush(){if(A.length>0)w=this,wt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#f?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(ge.size>1){this.previous.clear();var t=w,n=I,r=!0;for(const a of ge){if(a===this){r=!1;continue}const l=[];for(const[f,i]of this.current){if(a.current.has(f))if(r&&i!==a.current.get(f))a.current.set(f,i);else continue;l.push(f)}if(l.length===0)continue;const o=[...a.current.keys()].filter(f=>!this.current.has(f));if(o.length>0){var s=A;A=[];const f=new Set,i=new Map;for(const u of l)yt(u,o,f,i);if(A.length>0){w=a,a.apply();for(const u of A)a.#u(u,[],[]);a.deactivate()}A=s}}w=t,I=n}this.#e.clear(),ge.delete(this)}increment(t){this.#r+=1,t&&(this.#a+=1)}decrement(t){this.#r-=1,t&&(this.#a-=1),!this.#l&&(this.#l=!0,Pe(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#i)this.#n.delete(t),y(t,T),Y(t);for(const t of this.#n)y(t,F),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#f??=ut()).promise}static ensure(){if(w===null){const t=w=new fe;ge.add(w),we||Pe(()=>{w===t&&t.flush()})}return w}apply(){}}function yn(e){var t=we;we=!0;try{for(var n;;){if(dn(),A.length===0&&(w?.flush(),A.length===0))return De=null,n;wt()}}finally{we=t}}function wt(){var e=null;try{for(var t=0;A.length>0;){var n=fe.ensure();if(t++>1e3){var r,s;En()}n.process(A),B.clear()}}finally{A=[],De=null,ue=null}}function En(){try{rn()}catch(e){Se(e,De)}}let j=null;function rt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|P))===0&&me(r)&&(j=new Set,_e(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&It(r),j?.size>0)){B.clear();for(const s of j){if((s.f&(V|P))!==0)continue;const a=[s];let l=s.parent;for(;l!==null;)j.has(l)&&(j.delete(l),a.push(l)),l=l.parent;for(let o=a.length-1;o>=0;o--){const f=a[o];(f.f&(V|P))===0&&_e(f)}}j.clear()}}j=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;(a&m)!==0?yt(s,t,n,r):(a&(qe|$))!==0&&(a&T)===0&&Et(s,t,r)&&(y(s,T),Y(s))}}function Et(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(ie.call(t,s))return!0;if((s.f&m)!==0&&Et(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=De=e,n=t.b;if(n?.is_pending&&(e.f&(ae|le|He))!==0&&(e.f&ve)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(ue!==null&&t===d&&(e.f&le)===0)return;if((r&(X|L))!==0){if((r&E)===0)return;t.f^=E}}A.push(t)}function bt(e,t){if(!((e.f&L)!==0&&(e.f&E)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&F)!==0&&t.m.push(e),y(e,E);for(var n=e.first;n!==null;)bt(n,t),n=n.next}}function mt(e,t,n,r){const s=be()?Ke:gn;var a=e.filter(c=>!c.settled);if(n.length===0&&a.length===0){r(t.map(s));return}var l=d,o=bn(),f=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(c=>c.promise)):null;function i(c){o();try{r(c)}catch(_){(l.f&V)===0&&Se(_,l)}Fe()}if(n.length===0){f.then(()=>i(t.map(s)));return}function u(){o(),Promise.all(n.map(c=>mn(c))).then(c=>i([...t.map(s),...c])).catch(c=>Se(c,l))}f?f.then(u):u()}function bn(){var e=d,t=v,n=p,r=w;return function(a=!0){ce(e),z(t),xe(n),a&&r?.activate()}}function Fe(e=!0){ce(null),z(null),xe(null),e&&w?.deactivate()}function gt(){var e=d.b,t=w,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Ke(e){var t=m|T,n=v!==null&&(v.f&m)!==0?v:null;return d!==null&&(d.f|=de),{ctx:p,deps:null,effects:null,equals:vt,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:n??d,ac:null}}function mn(e,t,n){d===null&&Qt();var s=void 0,a=$e(b),l=!v,o=new Map;return Mn(()=>{var f=ut();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(Fe)}catch(_){f.reject(_),Fe()}var i=w;if(l){var u=gt();o.get(i)?.reject(W),o.delete(i),o.set(i,f)}const c=(_,g=void 0)=>{if(i.activate(),g)g!==W&&(a.f|=U,je(a,g));else{(a.f&U)!==0&&(a.f^=U),je(a,_);for(const[h,C]of o){if(o.delete(h),h===i)break;C.reject(W)}}u&&u()};f.promise.then(c,_=>c(null,_||"unknown"))}),Cn(()=>{for(const f of o.values())f.reject(W)}),new Promise(f=>{function i(u){function c(){u===s?f(a):i(s)}u.then(c,c)}i(s)})}function Mr(e){const t=Ke(e);return Ft(t),t}function gn(e){const t=Ke(e);return t.equals=dt,t}function Tn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)K(t[n])}}function An(e){for(var t=e.parent;t!==null;){if((t.f&m)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function ze(e){var t,n=d;ce(An(e));try{e.f&=~re,Tn(e),t=Ht(e)}finally{ce(n)}return t}function Tt(e){var t=ze(e);if(!e.equals(t)&&(e.wv=jt(),(!w?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){y(e,E);return}se||(I!==null?(Ot()||w?.is_fork)&&I.set(e,t):Ge(e))}function xn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=Xt,t.ac=null,ye(t,0),We(t))}function At(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&_e(t)}let Le=new Set;const B=new Map;let xt=!1;function $e(e,t){var n={f:0,v:e,reactions:null,equals:vt,rv:0,wv:0};return n}function H(e,t){const n=$e(e);return Ft(n),n}function Pr(e,t=!1,n=!0){const r=$e(e);return t||(r.equals=dt),Ee&&n&&p!==null&&p.l!==null&&(p.l.s??=[]).push(r),r}function q(e,t,n=!1){v!==null&&(!M||(v.f&tt)!==0)&&be()&&(v.f&(m|$|qe|tt))!==0&&(D===null||!ie.call(D,e))&&fn();let r=n?he(t):t;return je(e,r)}function je(e,t){if(!e.equals(t)){var n=e.v;se?B.set(e,t):B.set(e,n),e.v=t;var r=fe.ensure();if(r.capture(e,n),(e.f&m)!==0){const s=e;(e.f&T)!==0&&ze(s),Ge(s)}e.wv=jt(),St(e,T),be()&&d!==null&&(d.f&E)!==0&&(d.f&(L|X))===0&&(k===null?jn([e]):k.push(e)),!r.is_fork&&Le.size>0&&!xt&&Sn()}return t}function Sn(){xt=!1;for(const e of Le)(e.f&E)!==0&&y(e,F),me(e)&&_e(e);Le.clear()}function Fr(e,t=1){var n=ee(e),r=t===1?n++:n--;return q(e,n),r}function Ie(e){q(e,e.v+1)}function St(e,t){var n=e.reactions;if(n!==null)for(var r=be(),s=n.length,a=0;a<s;a++){var l=n[a],o=l.f;if(!(!r&&l===d)){var f=(o&T)===0;if(f&&y(l,t),(o&m)!==0){var i=l;I?.delete(i),(o&re)===0&&(o&O&&(l.f|=re),St(i,F))}else f&&((o&$)!==0&&j!==null&&j.add(l),Y(l))}}}function he(e){if(typeof e!="object"||e===null||te in e)return e;const t=ot(e);if(t!==zt&&t!==$t)return e;var n=new Map,r=Bt(e),s=H(0),a=ne,l=o=>{if(ne===a)return o();var f=v,i=ne;z(null),lt(a);var u=o();return z(f),lt(i),u};return r&&n.set("length",H(e.length)),new Proxy(e,{defineProperty(o,f,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&sn();var u=n.get(f);return u===void 0?l(()=>{var c=H(i.value);return n.set(f,c),c}):q(u,i.value,!0),!0},deleteProperty(o,f){var i=n.get(f);if(i===void 0){if(f in o){const u=l(()=>H(b));n.set(f,u),Ie(s)}}else q(i,b),Ie(s);return!0},get(o,f,i){if(f===te)return e;var u=n.get(f),c=f in o;if(u===void 0&&(!c||pe(o,f)?.writable)&&(u=l(()=>{var g=he(c?o[f]:b),h=H(g);return h}),n.set(f,u)),u!==void 0){var _=ee(u);return _===b?void 0:_}return Reflect.get(o,f,i)},getOwnPropertyDescriptor(o,f){var i=Reflect.getOwnPropertyDescriptor(o,f);if(i&&"value"in i){var u=n.get(f);u&&(i.value=ee(u))}else if(i===void 0){var c=n.get(f),_=c?.v;if(c!==void 0&&_!==b)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return i},has(o,f){if(f===te)return!0;var i=n.get(f),u=i!==void 0&&i.v!==b||Reflect.has(o,f);if(i!==void 0||d!==null&&(!u||pe(o,f)?.writable)){i===void 0&&(i=l(()=>{var _=u?he(o[f]):b,g=H(_);return g}),n.set(f,i));var c=ee(i);if(c===b)return!1}return u},set(o,f,i,u){var c=n.get(f),_=f in o;if(r&&f==="length")for(var g=i;g<c.v;g+=1){var h=n.get(g+"");h!==void 0?q(h,b):g in o&&(h=l(()=>H(b)),n.set(g+"",h))}if(c===void 0)(!_||pe(o,f)?.writable)&&(c=l(()=>H(void 0)),q(c,he(i)),n.set(f,c));else{_=c.v!==b;var C=l(()=>he(i));q(c,C)}var Je=Reflect.getOwnPropertyDescriptor(o,f);if(Je?.set&&Je.set.call(u,i),!_){if(r&&typeof f=="string"){var Qe=n.get("length"),Ce=Number(f);Number.isInteger(Ce)&&Ce>=Qe.v&&q(Qe,Ce+1)}Ie(s)}return!0},ownKeys(o){ee(s);var f=Reflect.ownKeys(o).filter(c=>{var _=n.get(c);return _===void 0||_.v!==b});for(var[i,u]of n)u.v!==b&&!(i in o)&&f.push(i);return f},setPrototypeOf(){an()}})}function st(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function Lr(e,t){return Object.is(st(e),st(t))}var at,Rn,Nn,Rt,Nt;function jr(){if(at===void 0){at=window,Rn=document,Nn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Rt=pe(t,"firstChild").get,Nt=pe(t,"nextSibling").get,et(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),et(n)&&(n.__t=void 0)}}function Re(e=""){return document.createTextNode(e)}function Ne(e){return Rt.call(e)}function Z(e){return Nt.call(e)}function Yr(e,t){if(!G)return Ne(e);var n=Ne(S);if(n===null)n=S.appendChild(Re());else if(t&&n.nodeType!==ke){var r=Re();return n?.before(r),oe(r),r}return t&&Xe(n),oe(n),n}function Hr(e,t=!1){if(!G){var n=Ne(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==ke){var r=Re();return S?.before(r),oe(r),r}Xe(S)}return S}function qr(e,t=1,n=!1){let r=G?S:e;for(var s;t--;)s=r,r=Z(r);if(!G)return r;if(n){if(r?.nodeType!==ke){var a=Re();return r===null?s?.after(a):r.before(a),oe(a),a}Xe(r)}return oe(r),r}function kn(e){e.textContent=""}function Vr(){return!1}function Ur(e,t,n){return document.createElementNS(t??cn,e,void 0)}function Xe(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===ke;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Br(e,t){if(t){const n=document.body;e.autofocus=!0,Pe(()=>{document.activeElement===n&&e.focus()})}}function Gr(e){G&&Ne(e)!==null&&kn(e)}let ft=!1;function On(){ft||(ft=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ze(e){var t=v,n=d;z(null),ce(null);try{return e()}finally{z(t),ce(n)}}function Kr(e,t,n,r=n){e.addEventListener(t,()=>Ze(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),On()}function kt(e){d===null&&(v===null&&nn(),tn()),se&&en()}function Dn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t){var n=d;n!==null&&(n.f&P)!==0&&(e|=P);var r={ctx:p,deps:null,nodes:null,f:e|T|O,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&ae)!==0)ue!==null?ue.push(r):Y(r);else if(t!==null){try{_e(r)}catch(l){throw K(r),l}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&de)===0&&(s=s.first,(e&$)!==0&&(e&Ae)!==0&&s!==null&&(s.f|=Ae))}if(s!==null&&(s.parent=n,n!==null&&Dn(s,n),v!==null&&(v.f&m)!==0&&(e&X)===0)){var a=v;(a.effects??=[]).push(s)}return r}function Ot(){return v!==null&&!M}function Cn(e){const t=N(le,null);return y(t,E),t.teardown=e,t}function In(e){kt();var t=d.f,n=!v&&(t&L)!==0&&(t&ve)===0;if(n){var r=p;(r.e??=[]).push(e)}else return Dt(e)}function Dt(e){return N(ae|ct,e)}function zr(e){return kt(),N(le|ct,e)}function $r(e){fe.ensure();const t=N(X|de,e);return()=>{K(t)}}function Xr(e){fe.ensure();const t=N(X|de,e);return(n={})=>new Promise(r=>{n.outro?Ln(t,()=>{K(t),r(void 0)}):(K(t),r(void 0))})}function Zr(e){return N(ae,e)}function Mn(e){return N(qe|de,e)}function Wr(e,t=0){return N(le|t,e)}function Jr(e,t=[],n=[],r=[]){mt(r,t,n,s=>{N(le,()=>e(...s.map(ee)))})}function Qr(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=gt();mt(r,t,n,a=>{N(ae,()=>e(...a.map(ee))),s&&s()})}function es(e,t=0){var n=N($|t,e);return n}function ts(e,t=0){var n=N(He|t,e);return n}function ns(e){return N(L|de,e)}function Ct(e){var t=e.teardown;if(t!==null){const n=se,r=v;it(!0),z(null);try{t.call(null)}finally{it(n),z(r)}}}function We(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Ze(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:K(n,t),n=r}}function Pn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&K(t),t=n}}function K(e,t=!0){var n=!1;(t||(e.f&Jt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Fn(e.nodes.start,e.nodes.end),n=!0),We(e,t&&!n),ye(e,0),y(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();Ct(e);var s=e.parent;s!==null&&s.first!==null&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Fn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ln(e,t,n=!0){var r=[];Mt(e,r,!0);var s=()=>{n&&K(e),t&&t()},a=r.length;if(a>0){var l=()=>--a||s();for(var o of r)o.out(l)}else s()}function Mt(e,t,n){if((e.f&P)===0){e.f^=P;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var a=s.next,l=(s.f&Ae)!==0||(s.f&L)!==0&&(e.f&$)!==0;Mt(s,t,l?n:!1),s=a}}}function rs(e){Pt(e,!0)}function Pt(e,t){if((e.f&P)!==0){e.f^=P,(e.f&E)===0&&(y(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Ae)!==0||(n.f&L)!==0;Pt(n,s?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||t)&&l.in()}}function ss(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Z(n);t.append(n),n=s}}let Te=!1,se=!1;function it(e){se=e}let v=null,M=!1;function z(e){v=e}let d=null;function ce(e){d=e}let D=null;function Ft(e){v!==null&&(D===null?D=[e]:D.push(e))}let x=null,R=0,k=null;function jn(e){k=e}let Lt=1,Q=0,ne=Q;function lt(e){ne=e}function jt(){return++Lt}function me(e){var t=e.f;if((t&T)!==0)return!0;if(t&m&&(e.f&=~re),(t&F)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var a=n[s];if(me(a)&&Tt(a),a.wv>e.wv)return!0}(t&O)!==0&&I===null&&y(e,E)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!(D!==null&&ie.call(D,e)))for(var s=0;s<r.length;s++){var a=r[s];(a.f&m)!==0?Yt(a,t,!1):t===a&&(n?y(a,T):(a.f&E)!==0&&y(a,F),Y(a))}}function Ht(e){var t=x,n=R,r=k,s=v,a=D,l=p,o=M,f=ne,i=e.f;x=null,R=0,k=null,v=(i&(L|X))===0?e:null,D=null,xe(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Ze(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Me;var u=e.fn,c=u();e.f|=ve;var _=e.deps,g=w?.is_fork;if(x!==null){var h;if(g||ye(e,R),_!==null&&R>0)for(_.length=R+x.length,h=0;h<x.length;h++)_[R+h]=x[h];else e.deps=_=x;if(Ot()&&(e.f&O)!==0)for(h=R;h<_.length;h++)(_[h].reactions??=[]).push(e)}else!g&&_!==null&&R<_.length&&(ye(e,R),_.length=R);if(be()&&k!==null&&!M&&_!==null&&(e.f&(m|F|T))===0)for(h=0;h<k.length;h++)Yt(k[h],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let C=0;C<n;C+=1)s.deps[C].rv=Q;if(t!==null)for(const C of t)C.rv=Q;k!==null&&(r===null?r=k:r.push(...k))}return(e.f&U)!==0&&(e.f^=U),c}catch(C){return hn(C)}finally{e.f^=Me,x=t,R=n,k=r,v=s,D=a,xe(l),M=o,ne=f}}function Yn(e,t){let n=t.reactions;if(n!==null){var r=Gt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&m)!==0&&(x===null||!ie.call(x,t))){var a=t;(a.f&O)!==0&&(a.f^=O,a.f&=~re),Ge(a),xn(a),ye(a,0)}}function ye(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Yn(e,n[r])}function _e(e){var t=e.f;if((t&V)===0){y(e,E);var n=d,r=Te;d=e,Te=!0;try{(t&($|He))!==0?Pn(e):We(e),Ct(e);var s=Ht(e);e.teardown=typeof s=="function"?s:null,e.wv=Lt;var a}finally{Te=r,d=n}}}async function as(){await Promise.resolve(),yn()}function fs(){return fe.ensure().settled()}function ee(e){var t=e.f,n=(t&m)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(D===null||!ie.call(D,e))){var s=v.deps;if((v.f&Me)!==0)e.rv<Q&&(e.rv=Q,x===null&&s!==null&&s[R]===e?R++:x===null?x=[e]:x.push(e));else{(v.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[v]:ie.call(a,v)||a.push(v)}}}if(se&&B.has(e))return B.get(e);if(n){var l=e;if(se){var o=l.v;return((l.f&E)===0&&l.reactions!==null||Vt(l))&&(o=ze(l)),B.set(l,o),o}var f=(l.f&O)===0&&!M&&v!==null&&(Te||(v.f&O)!==0),i=(l.f&ve)===0;me(l)&&(f&&(l.f|=O),Tt(l)),f&&!i&&(At(l),qt(l))}if(I?.has(e))return I.get(e);if((e.f&U)!==0)throw e.v;return e.v}function qt(e){if(e.f|=O,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&m)!==0&&(t.f&O)===0&&(At(t),qt(t))}function Vt(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(B.has(t)||(t.f&m)!==0&&Vt(t))return!0;return!1}function Ut(e){var t=M;try{return M=!0,e()}finally{M=t}}function is(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ye(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ye(n)}}}function Ye(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ye(e[r],t)}catch{}const n=ot(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Kt(n);for(let s in r){const a=r[s].get;if(a)try{a.call(e)}catch{}}}}}function Hn(e){p===null&&Ve(),Ee&&p.l!==null?qn(p).m.push(e):In(()=>{const t=Ut(e);if(typeof t=="function")return t})}function ls(e){p===null&&Ve(),Hn(()=>()=>Ut(e))}function qn(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{Rn as $,p as A,zr as B,_t as C,In as D,Ae as E,Ut as F,Zt as G,ln as H,Gn as I,is as J,Ke as K,Rr as L,Zr as M,Kr as N,w as O,as as P,Wr as Q,nt as R,he as S,Fr as T,at as U,Mr as V,$n as W,yn as X,Un as Y,Pr as Z,Hn as _,gr as a,wr as a$,rs as a0,K as a1,Ln as a2,ns as a3,ss as a4,Vr as a5,on as a6,Pe as a7,te as a8,pe as a9,z as aA,xe as aB,hn as aC,v as aD,je as aE,Se as aF,nr as aG,br as aH,Cn as aI,Ze as aJ,Ur as aK,Nn as aL,vr as aM,dr as aN,ke as aO,Xe as aP,ve as aQ,jr as aR,Ue as aS,er as aT,kn as aU,Xr as aV,Vn as aW,un as aX,Be as aY,Fn as aZ,pr as a_,tr as aa,ur as ab,se as ac,d as ad,V as ae,cr as af,Ee as ag,or as ah,lr as ai,gn as aj,_r as ak,$e as al,Bn as am,ce as an,kr as ao,ls as ap,Ot as aq,Ie as ar,Wt as as,hr as at,fe as au,y as av,T as aw,Y as ax,F as ay,wn as az,es as b,Gr as b0,Qn as b1,ar as b2,sr as b3,rr as b4,ir as b5,Bt as b6,zn as b7,P as b8,L as b9,fr as ba,Jn as bb,Kn as bc,Xt as bd,ts as be,Er as bf,Lr as bg,mt as bh,yr as bi,Wn as bj,Br as bk,b as bl,On as bm,cn as bn,ot as bo,Xn as bp,Kt as bq,zt as br,be as bs,ne as bt,Or as bu,Dr as bv,$r as bw,_n as bx,fs as by,oe as c,mr as d,S as e,Hr as f,Re as g,G as h,Jt as i,de as j,Z as k,Ne as l,Nr as m,Ir as n,Yr as o,Cr as p,qr as q,Sr as r,xr as s,Ar as t,Tr as u,Jr as v,Qr as w,q as x,ee as y,H as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as y,b as u,i as _,j as g,h as t,C as o,k as i,d as l,c as d,e as p,l as m}from"./
|
|
1
|
+
import{g as y,b as u,i as _,j as g,h as t,C as o,k as i,d as l,c as d,e as p,l as m}from"./D-tW7Byc.js";function C(n,r){let s=null,E=t;var a;if(t){s=p;for(var e=m(document.head);e!==null&&(e.nodeType!==o||e.data!==n);)e=i(e);if(e===null)l(!1);else{var f=i(e);e.remove(),d(f)}}t||(a=document.head.appendChild(y()));try{u(()=>r(a),_|g)}finally{E&&(l(!0),d(s))}}export{C as h};
|