studiograph 1.3.44-next.0 → 1.3.44-next.2
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/agent/tools/graph-tools.d.ts +58 -0
- package/dist/agent/tools/graph-tools.js +92 -0
- package/dist/agent/tools/graph-tools.js.map +1 -1
- package/dist/core/graph.js +13 -6
- package/dist/core/graph.js.map +1 -1
- package/dist/core/validation.d.ts +12 -30
- package/dist/core/validation.js +2 -5
- package/dist/core/validation.js.map +1 -1
- package/dist/integrations/linear.js +13 -3
- package/dist/integrations/linear.js.map +1 -1
- package/dist/mcp/tools.d.ts +2 -1
- package/dist/mcp/tools.js +80 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/server/index.js +40 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/graph-api.js +91 -6
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/insights-api.d.ts +7 -3
- package/dist/server/routes/insights-api.js +46 -21
- package/dist/server/routes/insights-api.js.map +1 -1
- package/dist/server/routes/mcp.d.ts +2 -1
- package/dist/server/routes/mcp.js +2 -2
- package/dist/server/routes/mcp.js.map +1 -1
- package/dist/server/routes/views-api.d.ts +10 -0
- package/dist/server/routes/views-api.js +66 -0
- package/dist/server/routes/views-api.js.map +1 -0
- package/dist/server/ws-hub.d.ts +6 -1
- package/dist/server/ws-hub.js.map +1 -1
- package/dist/services/auth-service.d.ts +31 -0
- package/dist/services/auth-service.js +100 -0
- package/dist/services/auth-service.js.map +1 -1
- package/dist/services/insights.d.ts +18 -11
- package/dist/services/insights.js +121 -77
- package/dist/services/insights.js.map +1 -1
- package/dist/services/sync/collection-sync.js +1 -0
- package/dist/services/sync/collection-sync.js.map +1 -1
- package/dist/services/sync/structured-extractor.js +26 -5
- package/dist/services/sync/structured-extractor.js.map +1 -1
- package/dist/services/sync/types.d.ts +4 -0
- package/dist/web/_app/immutable/assets/{0.Bzn6qb0O.css → 0.n3qM-DRk.css} +1 -1
- package/dist/web/_app/immutable/assets/3.zsEg_MDN.css +1 -0
- package/dist/web/_app/immutable/assets/{7.X0WUW64S.css → 7.5LBMlZdT.css} +1 -1
- package/dist/web/_app/immutable/assets/8.DfcI2i9H.css +1 -0
- package/dist/web/_app/immutable/assets/Toaster.rN8r_Hzv.css +1 -0
- package/dist/web/_app/immutable/assets/ViewToolbar.BX74Ki7U.css +1 -0
- package/dist/web/_app/immutable/assets/checkbox.D6tMDJWk.css +1 -0
- package/dist/web/_app/immutable/chunks/0rsp5-Up.js +1 -0
- package/dist/web/_app/immutable/chunks/0wBGAod7.js +1 -0
- package/dist/web/_app/immutable/chunks/APIqItee.js +1 -0
- package/dist/web/_app/immutable/chunks/B3NI-DOv.js +1 -0
- package/dist/web/_app/immutable/chunks/BAAbylyg.js +1 -0
- package/dist/web/_app/immutable/chunks/BHue2Ock.js +1 -0
- package/dist/web/_app/immutable/chunks/BPXdu_FX.js +1 -0
- package/dist/web/_app/immutable/chunks/BU2bHQbQ.js +4 -0
- package/dist/web/_app/immutable/chunks/BUcIsKRk.js +1 -0
- package/dist/web/_app/immutable/chunks/BgBJ0u3M.js +1 -0
- package/dist/web/_app/immutable/chunks/Bnl5ADsW.js +1 -0
- package/dist/web/_app/immutable/chunks/Bs4ovbtO.js +2 -0
- package/dist/web/_app/immutable/chunks/Bt5_mycY.js +1 -0
- package/dist/web/_app/immutable/chunks/By_Wtb5J.js +1 -0
- package/dist/web/_app/immutable/chunks/{Bt7P6UBm.js → CFtRXHDP.js} +2 -2
- package/dist/web/_app/immutable/chunks/CRnhIQbv.js +1 -0
- package/dist/web/_app/immutable/chunks/CSzKZPD4.js +1 -0
- package/dist/web/_app/immutable/chunks/CdeYcEuU.js +1 -0
- package/dist/web/_app/immutable/chunks/D-yNNNdf.js +1 -0
- package/dist/web/_app/immutable/chunks/DC9z5DEo.js +1 -0
- package/dist/web/_app/immutable/chunks/DCVmM0L5.js +1 -0
- package/dist/web/_app/immutable/chunks/DHtLlmE0.js +1 -0
- package/dist/web/_app/immutable/chunks/DQ5NTKSo.js +1 -0
- package/dist/web/_app/immutable/chunks/{QOJagAiA.js → DQJwHeKh.js} +1 -1
- package/dist/web/_app/immutable/chunks/DQYNi3YK.js +5 -0
- package/dist/web/_app/immutable/chunks/{BBDMeJL4.js → DSh-OF2y.js} +1 -1
- package/dist/web/_app/immutable/chunks/DSkxw4Ss.js +1 -0
- package/dist/web/_app/immutable/chunks/{Dtbtl5su.js → DT3KtxWU.js} +1 -1
- package/dist/web/_app/immutable/chunks/DVx_0hnZ.js +1 -0
- package/dist/web/_app/immutable/chunks/DiWKchgv.js +1 -0
- package/dist/web/_app/immutable/chunks/Diui_MO0.js +1 -0
- package/dist/web/_app/immutable/chunks/DodWDTE5.js +1 -0
- package/dist/web/_app/immutable/chunks/KHKAD2Ng.js +1 -0
- package/dist/web/_app/immutable/chunks/{C8t_lVji.js → Sk0ODu4Y.js} +1 -1
- package/dist/web/_app/immutable/chunks/azUmHUDT.js +1 -0
- package/dist/web/_app/immutable/chunks/{yEDUbZbk.js → b0XUoOIH.js} +2 -2
- package/dist/web/_app/immutable/chunks/lsAKkphT.js +1 -0
- package/dist/web/_app/immutable/chunks/vZ2iBqLE.js +1 -0
- package/dist/web/_app/immutable/entry/app.DA5OyPOi.js +2 -0
- package/dist/web/_app/immutable/entry/start.DTjSVtws.js +1 -0
- package/dist/web/_app/immutable/nodes/0.BIvpQ3Qk.js +2 -0
- package/dist/web/_app/immutable/nodes/1.y3j9wcQE.js +1 -0
- package/dist/web/_app/immutable/nodes/{9.DlSjDUl0.js → 10.D03BZcr1.js} +1 -1
- package/dist/web/_app/immutable/nodes/2.Du0xZVQg.js +84 -0
- package/dist/web/_app/immutable/nodes/3.weQEi2lI.js +1 -0
- package/dist/web/_app/immutable/nodes/4.DJyhWznw.js +11 -0
- package/dist/web/_app/immutable/nodes/{5.BZZysw6z.js → 5.CipwuwB3.js} +2 -2
- package/dist/web/_app/immutable/nodes/6.Daxwm3Lw.js +2 -0
- package/dist/web/_app/immutable/nodes/7.TxeJDMtw.js +2 -0
- package/dist/web/_app/immutable/nodes/8.DWNdmB4l.js +1 -0
- package/dist/web/_app/immutable/nodes/{8.CZ7vB_Pl.js → 9.BuTZk7Le.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +11 -12
- package/package.json +1 -1
- package/dist/web/_app/immutable/assets/3.CHSDCrUY.css +0 -1
- package/dist/web/_app/immutable/assets/ViewToolbar.39HnhXNY.css +0 -1
- package/dist/web/_app/immutable/chunks/3ONneP0Z.js +0 -1
- package/dist/web/_app/immutable/chunks/8aEH9o48.js +0 -1
- package/dist/web/_app/immutable/chunks/B3cbqYdb.js +0 -1
- package/dist/web/_app/immutable/chunks/BMrbs3EC.js +0 -1
- package/dist/web/_app/immutable/chunks/BQZlAX3A.js +0 -1
- package/dist/web/_app/immutable/chunks/BmP3yl81.js +0 -1
- package/dist/web/_app/immutable/chunks/C8IfoK2g.js +0 -1
- package/dist/web/_app/immutable/chunks/CClliU_-.js +0 -4
- package/dist/web/_app/immutable/chunks/CDs3H3KT.js +0 -1
- package/dist/web/_app/immutable/chunks/CRbsz2jz.js +0 -1
- package/dist/web/_app/immutable/chunks/CWmHQEyb.js +0 -1
- package/dist/web/_app/immutable/chunks/CpAdcarq.js +0 -1
- package/dist/web/_app/immutable/chunks/CpXgbTWt.js +0 -1
- package/dist/web/_app/immutable/chunks/DYpjUIN_.js +0 -1
- package/dist/web/_app/immutable/chunks/Ddpk8P2X.js +0 -1
- package/dist/web/_app/immutable/chunks/DvqvTNdq.js +0 -1
- package/dist/web/_app/immutable/chunks/Dx6YFABE.js +0 -1
- package/dist/web/_app/immutable/chunks/Iwcm6r7d.js +0 -1
- package/dist/web/_app/immutable/chunks/Zf7H0ZZc.js +0 -5
- package/dist/web/_app/immutable/chunks/qvfhHbjx.js +0 -1
- package/dist/web/_app/immutable/entry/app.oDy7ig5b.js +0 -2
- package/dist/web/_app/immutable/entry/start.Cz7A2G8_.js +0 -1
- package/dist/web/_app/immutable/nodes/0.BuWS-_Tw.js +0 -2
- package/dist/web/_app/immutable/nodes/1.ClV7Vf9J.js +0 -1
- package/dist/web/_app/immutable/nodes/2.Dg3m027a.js +0 -84
- package/dist/web/_app/immutable/nodes/3.9iNkY9mM.js +0 -1
- package/dist/web/_app/immutable/nodes/4.UG11YFmx.js +0 -11
- package/dist/web/_app/immutable/nodes/6.LCPXZT0S.js +0 -2
- package/dist/web/_app/immutable/nodes/7.kgjplPpk.js +0 -2
- /package/dist/web/_app/immutable/assets/{9.BUrHkYry.css → 10.BUrHkYry.css} +0 -0
- /package/dist/web/_app/immutable/assets/{8.CT4xL4K3.css → 9.CT4xL4K3.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as B,f as F,g as A,e as V,w as S,a as J,t as v,c as D,r as L,b as _,d as N,h as E,i as P,j as G,k as O,l as q,D as R,m as z}from"./CLFba8FK.js";import{r as M}from"./
|
|
1
|
+
import{O as B,f as F,g as A,e as V,w as S,a as J,t as v,c as D,r as L,b as _,d as N,h as E,i as P,j as G,k as O,l as q,D as R,m as z}from"./CLFba8FK.js";import{r as M}from"./Bs4ovbtO.js";const b=3e4;class K extends B{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=A();this.getLocalState()!==null&&b/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&b<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&x(this,s,"timeout")},F(b/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:A()});const l=[],u=[],r=[],p=[];n===null?p.push(e):c==null?n!=null&&l.push(e):(u.push(e),V(c,n)||r.push(e)),(l.length>0||r.length>0||p.length>0)&&this.emit("change",[{added:l,updated:r,removed:p},"local"]),this.emit("update",[{added:l,updated:u,removed:p},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const x=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const l=t.meta.get(c);t.meta.set(c,{clock:l.clock+1,lastUpdated:A()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},Q=(t,n,e=t.states)=>{const s=n.length,a=D();S(a,s);for(let c=0;c<s;c++){const l=n[c],u=e.get(l)||null,r=t.meta.get(l).clock;S(a,l),S(a,r),J(a,JSON.stringify(u))}return v(a)},X=(t,n,e)=>{const s=N(n),a=A(),c=[],l=[],u=[],r=[],p=L(s);for(let m=0;m<p;m++){const d=L(s);let g=L(s);const h=JSON.parse(_(s)),y=t.meta.get(d),k=t.states.get(d),o=y===void 0?0:y.clock;(o<g||o===g&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?g++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:g,lastUpdated:a}),y===void 0&&h!==null?c.push(d):y!==void 0&&h===null?r.push(d):h!==null&&(V(h,k)||u.push(d),l.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||l.length>0||r.length>0)&&t.emit("update",[{added:c,updated:l,removed:r},e])},W=0,j=1,C=2,Z=(t,n)=>{S(t,W);const e=P(n);E(t,e)},$=(t,n,e)=>{S(t,j),E(t,q(n,e))},H=(t,n,e)=>$(n,e,O(t)),Y=(t,n,e,s)=>{try{G(n,O(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},tt=(t,n)=>{S(t,C),E(t,n)},et=Y,nt=(t,n,e,s,a)=>{const c=L(t);switch(c){case W:H(t,n,e);break;case j:Y(t,e,s,a);break;case C:et(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},U=0,T=1;function st(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function at(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function lt(t,n){const e=new R,s=e.getText("content"),a=new K(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,l=!1;function u(){return M.ws??null}function r(o,f){const i=u();!i||i.readyState!==WebSocket.OPEN||i.send(st(t,o,f))}function p(){const o=D();Z(o,e),r(U,v(o))}function m(o){const f=o??[e.clientID],i=Q(a,f);r(T,i)}function d(o){if(l||typeof o.data=="string")return;const f=o.data instanceof ArrayBuffer?o.data:null;if(!f)return;const i=at(f);if(!(!i||i.docName!==t))if(i.msgType===U){const I=N(i.payload),w=D();nt(I,w,e,"ws-server"),z(w)>0&&r(U,v(w))}else i.msgType===T&&X(a,i.payload,"ws-server")}function g(o,f){if(l||f==="ws-server")return;const i=D();tt(i,o),r(U,v(i))}function h({added:o,updated:f,removed:i},I){if(l||I==="ws-server")return;const w=o.concat(f,i);m(w)}function y(){if(l)return;const o=u();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=d,o.addEventListener("message",c),p(),m())}e.on("update",g),a.on("update",h),y(),M.addConnectHandler(y);function k(){if(l)return;l=!0,x(a,[e.clientID],"local"),m([e.clientID]);const o=u();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",g),a.off("update",h),a.destroy(),e.destroy()}return{ydoc:e,ytext:s,awareness:a,destroy:k}}export{lt as createCollabSession};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as R,s as Dn,f as pe,l as Nn,o as I,c as _,m as Vr,u as Kr,b as Hr}from"./b0XUoOIH.js";import{i as Ln}from"./vZ2iBqLE.js";import{aM as Ur,i as jr,j as Yr,bx as Gr,h as Xr,e as P,by as cn,P as qr,g as d,s as b,aY as kt,p as Y,l as Jt,d as At,a as Bn,c as Qt,n as _n,r as $t,b as G,m as te,t as Wn,a4 as A,f as Et,aW as Zr,a1 as un,aV as Jr,a6 as Qr,a2 as B,a7 as Pe,aE as $r,a0 as N,ae as Q,bz as ti,bA as zn,aD as ei,a3 as ni}from"./DSh-OF2y.js";import{B as ri,i as Mt}from"./DT3KtxWU.js";import{a as Vn,s as $}from"./CRnhIQbv.js";import{l as ee,p as y,s as Be,r as me}from"./D-yNNNdf.js";import{b as Ee}from"./CFtRXHDP.js";function ii(){return Symbol(Ur)}const oi=Symbol("NaN");function si(e,t,n){jr&&Yr();var r=new ri(e),i=!Gr();Xr(()=>{var s=t();s!==s&&(s=oi),i&&s!==null&&typeof s=="object"&&(s={}),r.ensure(s,n)})}class ai extends Map{#t=new Map;#e=P(0);#n=P(0);#r=cn||-1;constructor(t){if(super(),t){for(var[n,r]of t)super.set(n,r);this.#n.v=super.size}}#i(t){return cn===this.#r?P(t):qr(t)}has(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else return d(this.#e),!1;return d(r),!0}forEach(t,n){this.#o(),super.forEach(t,n)}get(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else{d(this.#e);return}return d(r),super.get(t)}set(t,n){var r=this.#t,i=r.get(t),s=super.get(t),o=super.set(t,n),a=this.#e;if(i===void 0)i=this.#i(0),r.set(t,i),b(this.#n,super.size),kt(a);else if(s!==n){kt(i);var c=a.reactions===null?null:new Set(a.reactions),u=c===null||!i.reactions?.every(f=>c.has(f));u&&kt(a)}return o}delete(t){var n=this.#t,r=n.get(t),i=super.delete(t);return r!==void 0&&(n.delete(t),b(r,-1)),i&&(b(this.#n,super.size),kt(this.#e)),i}clear(){if(super.size!==0){super.clear();var t=this.#t;b(this.#n,0);for(var n of t.values())b(n,-1);kt(this.#e),t.clear()}}#o(){d(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var n of super.keys())if(!t.has(n)){var r=this.#i(0);t.set(n,r)}}for([,r]of this.#t)d(r)}keys(){return d(this.#e),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#n),super.size}}var ci=pe("<title> </title>"),ui=pe('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function Wa(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=ui();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=ci(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}function li(e){return typeof e=="function"}function Vt(e){return e!==null&&typeof e=="object"}const fi=["string","number","bigint","boolean"];function Me(e){return e==null||fi.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Me(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Tt=Symbol("box"),be=Symbol("is-writable");function x(e,t){const n=A(e);return t?{[Tt]:!0,[be]:!0,get current(){return d(n)},set current(r){t(r)}}:{[Tt]:!0,get current(){return e()}}}function Kt(e){return Vt(e)&&Tt in e}function _e(e){return Kt(e)&&be in e}function Kn(e){return Kt(e)?e:li(e)?x(e):et(e)}function di(e){return Object.entries(e).reduce((t,[n,r])=>Kt(r)?(_e(r)?Object.defineProperty(t,n,{get(){return r.current},set(i){r.current=i}}):Object.defineProperty(t,n,{get(){return r.current}}),t):Object.assign(t,{[n]:r}),{})}function hi(e){return _e(e)?{[Tt]:!0,get current(){return e.current}}:e}function et(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}function xt(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}xt.from=Kn;xt.with=x;xt.flatten=di;xt.readonly=hi;xt.isBox=Kt;xt.isWritableBox=_e;function Hn(...e){return function(t){for(const n of e)if(n){if(t.defaultPrevented)return;typeof n=="function"?n.call(this,t):n.current?.call(this,t)}}}var ln=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gi=/\n/g,pi=/^\s*/,mi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bi=/^:\s*/,vi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yi=/^[;\s]*/,wi=/^\s+|\s+$/g,xi=`
|
|
2
|
+
`,fn="/",dn="*",bt="",Si="comment",Ai="declaration";function Ei(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var p=m.match(gi);p&&(n+=p.length);var v=m.lastIndexOf(xi);r=~v?m.length-v:r+m.length}function s(){var m={line:n,column:r};return function(p){return p.position=new o(m),u(),p}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var p=new Error(t.source+":"+n+":"+r+": "+m);if(p.reason=m,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}function c(m){var p=m.exec(e);if(p){var v=p[0];return i(v),e=e.slice(v.length),p}}function u(){c(pi)}function f(m){var p;for(m=m||[];p=l();)p!==!1&&m.push(p);return m}function l(){var m=s();if(!(fn!=e.charAt(0)||dn!=e.charAt(1))){for(var p=2;bt!=e.charAt(p)&&(dn!=e.charAt(p)||fn!=e.charAt(p+1));)++p;if(p+=2,bt===e.charAt(p-1))return a("End of comment missing");var v=e.slice(2,p-2);return r+=2,i(v),e=e.slice(p),r+=2,m({type:Si,comment:v})}}function g(){var m=s(),p=c(mi);if(p){if(l(),!c(bi))return a("property missing ':'");var v=c(vi),w=m({type:Ai,property:hn(p[0].replace(ln,bt)),value:v?hn(v[0].replace(ln,bt)):bt});return c(yi),w}}function h(){var m=[];f(m);for(var p;p=g();)p!==!1&&(m.push(p),f(m));return m}return u(),h()}function hn(e){return e?e.replace(wi,bt):bt}function Oi(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Ei(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}const Ti=/\d/,Ci=["-","_","/","."];function Pi(e=""){if(!Ti.test(e))return e!==e.toLowerCase()}function Mi(e){const t=[];let n="",r,i;for(const s of e){const o=Ci.includes(s);if(o===!0){t.push(n),n="",r=void 0;continue}const a=Pi(s);if(i===!1){if(r===!1&&a===!0){t.push(n),n=s,r=a;continue}if(r===!0&&a===!1&&n.length>1){const c=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,r=a;continue}}n+=s,r=a,i=o}return t.push(n),t}function Un(e){return e?Mi(e).map(t=>Ri(t)).join(""):""}function Fi(e){return Ii(Un(e||""))}function Ri(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ii(e){return e?e[0].toLowerCase()+e.slice(1):""}function Bt(e){if(!e)return{};const t={};function n(r,i){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[Un(r)]=i;return}if(r.startsWith("--")){t[r]=i;return}t[Fi(r)]=i}return Oi(e,n),t}function vt(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function ki(e,t){const n=RegExp(e,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(n)?r.replace(n,t):r}}const Di=ki(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Ni(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Di(t)}: ${e[t]};`).join(`
|
|
3
|
+
`)}function jn(e={}){return Ni(e).replace(`
|
|
4
|
+
`," ")}const Li=["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"],Bi=new Set(Li);function _i(e){return Bi.has(e)}function ve(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const r=e[n];if(r){for(const i of Object.keys(r)){const s=t[i],o=r[i],a=typeof s=="function",c=typeof o=="function";if(a&&_i(i)){const u=s,f=o;t[i]=Hn(u,f)}else if(a&&c)t[i]=vt(s,o);else if(i==="class"){const u=Me(s),f=Me(o);u&&f?t[i]=Ee(s,o):u?t[i]=Ee(s):f&&(t[i]=Ee(o))}else if(i==="style"){const u=typeof s=="object",f=typeof o=="object",l=typeof s=="string",g=typeof o=="string";if(u&&f)t[i]={...s,...o};else if(u&&g){const h=Bt(o);t[i]={...s,...h}}else if(l&&f){const h=Bt(s);t[i]={...h,...o}}else if(l&&g){const h=Bt(s),m=Bt(o);t[i]={...h,...m}}else u?t[i]=s:f?t[i]=o:l?t[i]=s:g&&(t[i]=o)}else t[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(r)){const s=t[i],o=r[i];t[i]=o!==void 0?o:s}}}return typeof t.style=="object"&&(t.style=jn(t.style).replaceAll(`
|
|
5
|
+
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Yn=typeof window<"u"?window:void 0;function Wi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class zi{#t;#e;constructor(t={}){const{window:n=Yn,document:r=n?.document}=t;n!==void 0&&(this.#t=r,this.#e=Nn(i=>{const s=I(n,"focusin",i),o=I(n,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#e?.(),this.#t?Wi(this.#t):null}}new zi;function Vi(e){return typeof e=="function"}class St{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Zr(this.#e)}get(){const t=un(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const n=un(this.#e);return n===void 0?t:n}set(t){return Jr(this.#e,t)}}function Ki(e,t){switch(e){case"post":B(t);break;case"pre":Qr(t);break}}function Gn(e,t,n,r={}){const{lazy:i=!1}=r;let s=!i,o=Array.isArray(e)?[]:void 0;Ki(t,()=>{const a=Array.isArray(e)?e.map(u=>u()):e();if(!s){s=!0,o=a;return}const c=Pe(()=>n(a,o));return o=a,c})}function z(e,t,n){Gn(e,"post",t,n)}function Hi(e,t,n){Gn(e,"pre",t,n)}z.pre=Hi;function gn(e){return Vi(e)?e():e}class Ui{#t={width:0,height:0};#e=!1;#n;#r;#i;#o=A(()=>(d(this.#s)?.(),this.getSize().width));#a=A(()=>(d(this.#s)?.(),this.getSize().height));#s=A(()=>{const t=gn(this.#r);if(t)return Nn(n=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(i=>{this.#e=!0;for(const s of i){const o=this.#n.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,u)=>Math.max(c,u.inlineSize),0),this.#t.height=a.reduce((c,u)=>Math.max(c,u.blockSize),0)}n()});return r.observe(t),()=>{this.#e=!1,r.disconnect()}})});constructor(t,n={box:"border-box"}){this.#i=n.window??Yn,this.#n=n,this.#r=t,this.#t={width:0,height:0}}calculateSize(){const t=gn(this.#r);if(!t||!this.#i)return;const n=t.offsetWidth,r=t.offsetHeight;if(this.#n.box==="border-box")return{width:n,height:r};const i=this.#i.getComputedStyle(t),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),c=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=n-s-a,f=r-o-c;return{width:u,height:f}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return d(this.#s)?.(),this.getSize()}get width(){return d(this.#o)}get height(){return d(this.#a)}}function Ft(e){B(()=>()=>{e()})}function ji(e,t){return setTimeout(t,e)}function nt(e){$r().then(e)}const Yi=1,Gi=9,Xi=11;function Fe(e){return Vt(e)&&e.nodeType===Yi&&typeof e.nodeName=="string"}function Xn(e){return Vt(e)&&e.nodeType===Gi}function qi(e){return Vt(e)&&e.constructor?.name==="VisualViewport"}function Zi(e){return Vt(e)&&e.nodeType!==void 0}function qn(e){return Zi(e)&&e.nodeType===Xi&&"host"in e}function Ji(e,t){if(!e||!t||!Fe(e)||!Fe(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&qn(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ht(e){return Xn(e)?e:qi(e)?e.document:e?.ownerDocument??document}function We(e){return qn(e)?We(e.host):Xn(e)?e.defaultView??window:Fe(e)?e.ownerDocument?.defaultView??window:window}function Qi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class ze{element;#t=A(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#t)}set root(t){b(this.#t,t)}constructor(t){typeof t=="function"?this.element=x(t):this.element=t}getDocument=()=>Ht(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Qi(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,n)=>this.getWindow().setTimeout(t,n);clearTimeout=t=>this.getWindow().clearTimeout(t)}function ht(e,t){return{[ii()]:n=>Kt(e)?(e.current=n,Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e(null),t?.(null))})}}function Ve(e){return e?"true":"false"}function Zn(e){return e?"":void 0}function za(e){return e?!0:void 0}function Ke(e){return e?"open":"closed"}function Va(e,t){return t?"mixed":e?"true":"false"}class $i{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(n=>[n,this.getAttr(n)]))}getAttr(t,n){return n?`data-${n}-${t}`:`${this.#e}${t}`}selector(t,n){return`[${this.getAttr(t,n)}]`}}function to(e){const t=new $i(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Wt="ArrowDown",Ut="ArrowLeft",jt="ArrowRight",ne="ArrowUp",Jn="End",Qn="Enter",eo="Escape",$n="Home",no="PageDown",ro="PageUp",ye=" ",io="Tab";function oo(e){return window.getComputedStyle(e).getPropertyValue("direction")}function so(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Ut:jt,vertical:Wt}[t]}function ao(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?jt:Ut,vertical:ne}[t]}function co(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:so(e,t),prevKey:ao(e,t)}}const tr=typeof document<"u",pn=uo();function uo(){return tr&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ot(e){return e instanceof HTMLElement}function Re(e){return e instanceof Element}function er(e){return e instanceof Element||e instanceof SVGElement}function Ka(e){return e.pointerType==="touch"}function lo(e){return e!==null}function fo(e){return e instanceof HTMLInputElement&&"select"in e}class ho{#t;#e=xt(null);constructor(t){this.#t=t}getCandidateNodes(){return this.#t.rootNode.current?this.#t.candidateSelector?Array.from(this.#t.rootNode.current.querySelectorAll(this.#t.candidateSelector)):this.#t.candidateAttr?Array.from(this.#t.rootNode.current.querySelectorAll(`[${this.#t.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const t=this.getCandidateNodes();t.length&&t[0]?.focus()}handleKeydown(t,n,r=!1){const i=this.#t.rootNode.current;if(!i||!t)return;const s=this.getCandidateNodes();if(!s.length)return;const o=s.indexOf(t),a=oo(i),{nextKey:c,prevKey:u}=co(a,this.#t.orientation.current),f=this.#t.loop.current,l={[c]:o+1,[u]:o-1,[$n]:0,[Jn]:s.length-1};if(r){const m=c===Wt?jt:Wt,p=u===ne?Ut:ne;l[m]=o+1,l[p]=o-1}let g=l[n.key];if(g===void 0)return;n.preventDefault(),g<0&&f?g=s.length-1:g===s.length&&f&&(g=0);const h=s[g];if(h)return h.focus(),this.#e.current=h.id,this.#t.onCandidateFocus?.(h),h}getTabIndex(t){const n=this.getCandidateNodes(),r=this.#e.current!==null;return t&&!r&&n[0]===t?(this.#e.current=t.id,0):t?.id===this.#e.current?0:-1}setCurrentTabStopId(t){this.#e.current=t}focusCurrentTabStop(){const t=this.#e.current;if(!t)return;const n=this.#t.rootNode.current?.querySelector(`#${t}`);!n||!ot(n)||n.focus()}}class go{#t;#e=null;constructor(t){this.#t=t,Ft(()=>this.#n())}#n(){this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null)}run(t){this.#n();const n=this.#t.ref.current;if(n){if(typeof n.getAnimations!="function"){this.#r(t);return}this.#e=window.requestAnimationFrame(()=>{const r=n.getAnimations();if(r.length===0){this.#r(t);return}Promise.allSettled(r.map(i=>i.finished)).then(()=>{this.#r(t)})})}}#r(t){const n=()=>{t()};this.#t.afterTick?nt(n):n()}}class po{#t;#e;#n;#r=P(!1);constructor(t){this.#t=t,b(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new go({ref:this.#t.ref,afterTick:this.#t.open}),z(()=>this.#t.open.current,n=>{n&&b(this.#r,!0),this.#e&&this.#n.run(()=>{n===this.#t.open.current&&(this.#t.open.current||b(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return d(this.#r)}}function W(){}function Ha(e,t){return`bits-${e}`}function mo(e,t){var n=_(),r=N(n);si(r,()=>t.children,i=>{var s=_(),o=N(s);$(o,()=>t.children??Q),R(i,s)}),R(e,n)}const bo=new St("BitsConfig");function vo(){const e=new yo(null,{});return bo.getOr(e).opts}class yo{opts;constructor(t,n){const r=wo(t,n);this.opts={defaultPortalTo:r(i=>i.defaultPortalTo),defaultLocale:r(i=>i.defaultLocale)}}}function wo(e,t){return n=>x(()=>{const i=n(t)?.current;if(i!==void 0)return i;if(e!==null)return n(e.opts)?.current})}function xo(e,t){return n=>{const r=vo();return x(()=>{const i=n();if(i!==void 0)return i;const s=e(r).current;return s!==void 0?s:t})}}const So=xo(e=>e.defaultPortalTo,"body");function Ua(e,t){Y(t,!0);const n=So(()=>t.to),r=ti();let i=A(s);function s(){if(!tr||t.disabled)return null;let l=null;return typeof n.current=="string"?l=document.querySelector(n.current):l=n.current,l}let o;function a(){o&&(Kr(o),o=null)}z([()=>d(i),()=>t.disabled],([l,g])=>{if(!l||g){a();return}return o=Vr(mo,{target:l,props:{children:t.children},context:r}),()=>{a()}});var c=_(),u=N(c);{var f=l=>{var g=_(),h=N(g);$(h,()=>t.children??Q),R(l,g)};Mt(u,l=>{t.disabled&&l(f)})}R(e,c),G()}class Ao{eventName;options;constructor(t,n={bubbles:!0,cancelable:!0}){this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const r=this.createEvent(n);return t.dispatchEvent(r),r}listen(t,n,r){const i=s=>{n(s)};return I(t,this.eventName,i,r)}}function mn(e,t=500){let n=null;const r=(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function nr(e,t){return e===t||e.contains(t)}function rr(e){return e?.ownerDocument??document}function Eo(e,t){const{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}const Ie=[Qn,ye],Oo=[Wt,ro,$n],ir=[ne,no,Jn],To=[...Oo,...ir],Co={ltr:[...Ie,jt],rtl:[...Ie,Ut]},ja={ltr:[Ut],rtl:[jt]};function re(e){return e.pointerType==="mouse"}function Po(e,{select:t=!1}={}){if(!e||!e.focus)return;const n=Ht(e);if(n.activeElement===e)return;const r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&fo(e)&&t&&e.select()}function Mo(e,{select:t=!1}={},n){const r=n();for(const i of e)if(Po(i,{select:t}),n()!==r)return!0}let Dt=P(!1);class dt{static _refs=0;static _cleanup;constructor(){B(()=>(dt._refs===0&&(dt._cleanup=zn(()=>{const t=[],n=i=>{b(Dt,!1)},r=i=>{b(Dt,!0)};return t.push(I(document,"pointerdown",n,{capture:!0}),I(document,"pointermove",n,{capture:!0}),I(document,"keydown",r,{capture:!0})),vt(...t)})),dt._refs++,()=>{dt._refs--,dt._refs===0&&(b(Dt,!1),dt._cleanup?.())}))}get current(){return d(Dt)}set current(t){b(Dt,t,!0)}}var or=["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] *)"],ie=or.join(","),sr=typeof Element>"u",yt=sr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oe=!sr&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},se=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",o=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):se(t.parentNode));return o},Fo=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ar=function(t,n,r){if(se(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ie));return n&&yt.call(t,ie)&&i.unshift(t),i=i.filter(r),i},ae=function(t,n,r){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!se(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,u=ae(c,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var f=yt.call(o,ie);f&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var l=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!se(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(l&&g){var h=ae(l===!0?o.children:l.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:o,candidates:h})}else s.unshift.apply(s,o.children)}}return i},cr=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ur=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Fo(t))&&!cr(t)?0:t.tabIndex},Ro=function(t,n){var r=ur(t);return r<0&&n&&!cr(t)?0:r},Io=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lr=function(t){return t.tagName==="INPUT"},ko=function(t){return lr(t)&&t.type==="hidden"},Do=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},No=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Lo=function(t){if(!t.name)return!0;var n=t.form||oe(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){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",o.message),!1}var s=No(i,t.form);return!s||s===t},Bo=function(t){return lr(t)&&t.type==="radio"},_o=function(t){return Bo(t)&&!Lo(t)},Wo=function(t){var n,r=t&&oe(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var o,a,c;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&i;){var u,f,l;r=oe(i),i=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=i)!==null&&f!==void 0&&(l=f.ownerDocument)!==null&&l!==void 0&&l.contains(i))}}return s},bn=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},zo=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var o=yt.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yt.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var u=t.parentElement,f=oe(t);if(u&&!u.shadowRoot&&i(u)===!0)return bn(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=c}if(Wo(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bn(t);return!1},Vo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},ce=function(t,n){return!(n.disabled||ko(n)||zo(n,t)||Do(n)||Vo(n))},ke=function(t,n){return!(_o(n)||ur(n)<0||!ce(t,n))},Ko=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},fr=function(t){var n=[],r=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,c=Ro(a,o),u=o?fr(i.candidates):a;c===0?o?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:i,isScope:o,content:u})}),r.sort(Io).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},dr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ke.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ko}):r=ar(t,n.includeContainer,ke.bind(null,n)),fr(r)},hr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ce.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=ar(t,n.includeContainer,ce.bind(null,n)),r},He=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,ie)===!1?!1:ke(n,t)},Ho=or.concat("iframe:not([inert]):not([inert] *)").join(","),gr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,Ho)===!1?!1:ce(n,t)};function _t(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Uo(e,t){if(!He(e,_t()))return jo(e,t);const n=Ht(e),r=dr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function jo(e,t){const n=Ht(e);if(!gr(e,_t()))return n.body;const r=hr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(o=>He(o,_t()))??n.body}function Yo(e,t){return e.length!==t.length?!1:e.every((n,r)=>pr(n,t[r]))}function pr(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?Yo(e,t):typeof e=="object"&&typeof t=="object"?Go(e,t):Object.is(e,t)}function Go(e,t){if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||!pr(e[i],t[i]))return!1;return!0}function Ya(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function Ga(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function Xa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function qa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function mr(e,t,n){const r=t.toLowerCase();if(r.endsWith(" ")){const l=r.slice(0,-1);if(e.filter(p=>p.toLowerCase().startsWith(l)).length<=1)return mr(e,l,n);const h=n?.toLowerCase();if(h&&h.startsWith(l)&&h.charAt(l.length)===" "&&t.trim()===l)return n;const m=e.filter(p=>p.toLowerCase().startsWith(r));if(m.length>0){const p=n?e.indexOf(n):-1;return vn(m,Math.max(p,0)).find(O=>O!==n)||n}}const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=s.toLowerCase(),a=n?e.indexOf(n):-1;let c=vn(e,Math.max(a,0));s.length===1&&(c=c.filter(l=>l!==n));const f=c.find(l=>l?.toLowerCase().startsWith(o));return f!==n?f:void 0}function vn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Xo={afterMs:1e4,onChange:W};function br(e,t){const{afterMs:n,onChange:r,getWindow:i}={...Xo,...t};let s=null,o=P(Et(e));function a(){return i().setTimeout(()=>{b(o,e,!0),r?.(e)},n)}return B(()=>()=>{s&&i().clearTimeout(s)}),x(()=>d(o),c=>{b(o,c,!0),r?.(c),s&&i().clearTimeout(s),s=a()})}class qo{#t;#e;#n=A(()=>this.#t.onMatch?this.#t.onMatch:t=>t.focus());#r=A(()=>this.#t.getCurrentItem?this.#t.getCurrentItem:this.#t.getActiveElement);constructor(t){this.#t=t,this.#e=br("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,n){if(!n.length)return;this.#e.current=this.#e.current+t;const r=d(this.#r)(),i=n.find(c=>c===r)?.textContent?.trim()??"",s=n.map(c=>c.textContent?.trim()??""),o=mr(s,this.#e.current,i),a=n.find(c=>c.textContent?.trim()===o);return a&&d(this.#n)(a),a}resetTypeahead(){this.#e.current=""}get search(){return this.#e.current}}class Zo{#t;#e;#n;#r=P(null);constructor(t){this.#t=t,this.#e=A(()=>this.#t.enabled()),this.#n=br(!1,{afterMs:t.transitTimeout??300,onChange:n=>{d(this.#e)&&this.#t.setIsPointerInTransit?.(n)},getWindow:()=>We(this.#t.triggerNode())}),z([t.triggerNode,t.contentNode,t.enabled],([n,r,i])=>{if(!n||!r||!i)return;const s=a=>{this.#o(a,r)},o=a=>{this.#o(a,n)};return vt(I(n,"pointerleave",s),I(r,"pointerleave",o))}),z(()=>d(this.#r),()=>{const n=i=>{if(!d(this.#r))return;const s=i.target;if(!Re(s))return;const o={x:i.clientX,y:i.clientY},a=t.triggerNode()?.contains(s)||t.contentNode()?.contains(s),c=!ts(o,d(this.#r));a?this.#i():c&&(this.#i(),t.onPointerExit())},r=Ht(t.triggerNode()??t.contentNode());if(r)return I(r,"pointermove",n)})}#i(){b(this.#r,null),this.#n.current=!1}#o(t,n){const r=t.currentTarget;if(!ot(r))return;const i={x:t.clientX,y:t.clientY},s=Jo(i,r.getBoundingClientRect()),o=Qo(i,s),a=$o(n.getBoundingClientRect()),c=es([...o,...a]);b(this.#r,c,!0),this.#n.current=!0}}function Jo(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qo(e,t,n=5){const r=n*1.5;switch(t){case"top":return[{x:e.x-n,y:e.y+n},{x:e.x,y:e.y-r},{x:e.x+n,y:e.y+n}];case"bottom":return[{x:e.x-n,y:e.y-n},{x:e.x,y:e.y+r},{x:e.x+n,y:e.y-n}];case"left":return[{x:e.x+n,y:e.y-n},{x:e.x-r,y:e.y},{x:e.x+n,y:e.y+n}];case"right":return[{x:e.x-n,y:e.y-n},{x:e.x+r,y:e.y},{x:e.x-n,y:e.y+n}]}}function $o(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ts(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s].x,c=t[s].y,u=t[o].x,f=t[o].y;c>r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function es(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ns(t)}function ns(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const rs="data-context-menu-trigger",is="data-context-menu-content",vr=new St("Menu.Root"),Ct=new St("Menu.Root | Menu.Sub"),Ue=new St("Menu.Content"),yr=new Ao("bitsmenuopen",{bubbles:!1,cancelable:!0}),os=to({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class wr{static create(t){const n=new wr(t);return vr.set(n)}opts;isUsingKeyboard=new dt;#t=P(!1);get ignoreCloseAutoFocus(){return d(this.#t)}set ignoreCloseAutoFocus(t){b(this.#t,t,!0)}#e=P(!1);get isPointerInTransit(){return d(this.#e)}set isPointerInTransit(t){b(this.#e,t,!0)}constructor(t){this.opts=t}getBitsAttr=t=>os.getAttr(t,this.opts.variant.current)}class je{static create(t,n){return Ct.set(new je(t,n,null))}opts;root;parentMenu;contentId=x(()=>"");#t=P(null);get contentNode(){return d(this.#t)}set contentNode(t){b(this.#t,t,!0)}contentPresence;#e=P(null);get triggerNode(){return d(this.#e)}set triggerNode(t){b(this.#e,t,!0)}constructor(t,n,r){this.opts=t,this.root=n,this.parentMenu=r,this.contentPresence=new po({ref:x(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),r&&z(()=>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 xr{static create(t){return Ue.set(new xr(t,Ct.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#t=P("");get search(){return d(this.#t)}set search(t){b(this.#t,t,!0)}#e=0;#n;#r=P(!1);get mounted(){return d(this.#r)}set mounted(t){b(this.#r,t,!0)}#i;constructor(t,n){this.opts=t,this.parentMenu=n,this.domContext=new ze(t.ref),this.attachment=ht(this.opts.ref,r=>{this.parentMenu.contentNode!==r&&(this.parentMenu.contentNode=r)}),n.contentId=t.id,this.#i=t.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 Zo({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 qo({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new ho({rootNode:x(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:x(()=>"vertical")}),z(()=>this.parentMenu.contentNode,r=>{if(!r)return;const i=()=>{nt(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return yr.listen(r,i)}),B(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#e)})}#o(){const t=this.parentMenu.contentNode;return t?Array.from(t.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#a(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=t=>{this.opts.onCloseAutoFocus.current?.(t),!(t.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&He(this.parentMenu.triggerNode)&&(t.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(t){let n=this.parentMenu;for(;n.parentMenu!==null;)n=n.parentMenu;if(!n.triggerNode)return;t.preventDefault();const r=Uo(n.triggerNode,t.shiftKey?"prev":"next");r?(this.parentMenu.root.ignoreCloseAutoFocus=!0,n.onClose(),nt(()=>{r.focus(),nt(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){if(t.defaultPrevented)return;if(t.key===io){this.handleTabKeyDown(t);return}const n=t.target,r=t.currentTarget;if(!ot(n)||!ot(r))return;const i=n.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,s=t.ctrlKey||t.altKey||t.metaKey,o=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(n,t)||t.code==="Space")return;const c=this.#o();i&&!s&&o&&this.#n(t.key,c),t.target?.id===this.parentMenu.contentId.current&&To.includes(t.key)&&(t.preventDefault(),ir.includes(t.key)&&c.reverse(),Mo(c,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){Re(t.currentTarget)&&Re(t.target)&&(t.currentTarget.contains?.(t.target)||(this.domContext.getWindow().clearTimeout(this.#e),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&nt(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#a()}onItemLeave(t){if(t.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(t){if(!er(t.target))return;const n=this.parentMenu.triggerNode?.id;if(t.target.id===n){t.preventDefault();return}t.target.closest(`#${n}`)&&t.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#s=A(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return d(this.#s)}set snippetProps(t){b(this.#s,t)}#c=A(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":Ke(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 d(this.#c)}set props(t){b(this.#c,t)}popperProps={onCloseAutoFocus:t=>this.onCloseAutoFocus(t)}}class Sr{opts;content;attachment;#t=P(!1);constructor(t,n){this.opts=t,this.content=n,this.attachment=ht(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(t){if(!t.defaultPrevented&&re(t))if(this.opts.disabled.current)this.content.onItemLeave(t);else{if(this.content.onItemEnter())return;const r=t.currentTarget;if(!ot(r))return;r.focus()}}onpointerleave(t){t.defaultPrevented||re(t)&&this.content.onItemLeave(t)}onfocus(t){nt(()=>{t.defaultPrevented||this.opts.disabled.current||b(this.#t,!0)})}onblur(t){nt(()=>{t.defaultPrevented||b(this.#t,!1)})}#e=A(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":Ve(this.opts.disabled.current),"data-disabled":Zn(this.opts.disabled.current),"data-highlighted":d(this.#t)?"":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 d(this.#e)}set props(t){b(this.#e,t)}}class Ar{static create(t){const n=new Sr(t,Ue.get());return new Ar(t,n)}opts;item;root;#t=!1;constructor(t,n){this.opts=t,this.item=n,this.root=n.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)}#e(){if(this.item.opts.disabled.current)return;const t=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(t),t.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(t){const n=this.item.content.search!=="";if(!(this.item.opts.disabled.current||n&&t.key===ye)&&Ie.includes(t.key)){if(!ot(t.currentTarget))return;t.currentTarget.click(),t.preventDefault()}}onclick(t){this.item.opts.disabled.current||this.#e()}onpointerup(t){if(!t.defaultPrevented&&!this.#t){if(!ot(t.currentTarget))return;t.currentTarget?.click()}}onpointerdown(t){this.#t=!0}#n=A(()=>ve(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Er{static create(t){const n=Ue.get(),r=new Sr(t,n),i=Ct.get();return new Er(t,r,n,i)}opts;item;content;submenu;attachment;#t=null;constructor(t,n,r,i){this.opts=t,this.item=n,this.content=r,this.submenu=i,this.attachment=ht(this.opts.ref,s=>this.submenu.triggerNode=s),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Ft(()=>{this.#e()})}#e(){this.#t!==null&&(this.content.domContext.getWindow().clearTimeout(this.#t),this.#t=null)}onpointermove(t){re(t)&&!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#t&&!this.content.parentMenu.root.isPointerInTransit&&(this.#t=this.content.domContext.setTimeout(()=>{this.submenu.onOpen(),this.#e()},this.opts.openDelay.current))}onpointerleave(t){re(t)&&this.#e()}onkeydown(t){const n=this.content.search!=="";this.item.opts.disabled.current||n&&t.key===ye||Co[this.submenu.root.opts.dir.current].includes(t.key)&&(t.currentTarget.click(),t.preventDefault())}onclick(t){if(this.item.opts.disabled.current||!ot(t.currentTarget))return;t.currentTarget.focus();const n=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(n),this.submenu.opts.open.current||(this.submenu.onOpen(),nt(()=>{const r=this.submenu.contentNode;r&&yr.dispatch(r)}))}#n=A(()=>ve({"aria-haspopup":"menu","aria-expanded":Ve(this.submenu.opts.open.current),"data-state":Ke(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Or{static create(t){return new Or(t,vr.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=ht(this.opts.ref)}#t=A(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){b(this.#t,t)}}class Tr{static create(t){return new Tr(t,Ct.get())}opts;parentMenu;attachment;constructor(t,n){this.opts=t,this.parentMenu=n,this.attachment=ht(this.opts.ref,r=>this.parentMenu.triggerNode=r)}onclick=t=>{this.opts.disabled.current||t.detail!==0||(this.parentMenu.toggleOpen(),t.preventDefault())};onpointerdown=t=>{if(!this.opts.disabled.current){if(t.pointerType==="touch")return t.preventDefault();t.button===0&&t.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||t.preventDefault())}};onpointerup=t=>{this.opts.disabled.current||t.pointerType==="touch"&&(t.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=t=>{if(!this.opts.disabled.current){if(t.key===ye||t.key===Qn){this.parentMenu.toggleOpen(),t.preventDefault();return}t.key===Wt&&(this.parentMenu.onOpen(),t.preventDefault())}};#t=A(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#e=A(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Ve(this.parentMenu.opts.open.current),"aria-controls":d(this.#t),"data-disabled":Zn(this.opts.disabled.current),"data-state":Ke(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 d(this.#e)}set props(t){b(this.#e,t)}}class Za{static create(t){const n=Ct.get();return Ct.set(new je(t,n.root,n))}}globalThis.bitsDismissableLayers??=new Map;class Ye{static create(t){return new Ye(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#i=!1;#o=void 0;#a;#s=W;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#a=t.onFocusOutside,B(()=>{this.#o=rr(this.opts.ref.current)});let n=W;const r=()=>{this.#d(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),n()};z([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return ji(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),n(),n=this.#f())}),r}),Ft(()=>{this.#d.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#s(),n()})}#c=t=>{t.defaultPrevented||this.opts.ref.current&&nt(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#f(){return vt(I(this.#o,"pointerdown",vt(this.#h,this.#p),{capture:!0}),I(this.#o,"pointerdown",vt(this.#g,this.#u)),I(this.#o,"focusin",this.#c))}#l=t=>{let n=t;n.defaultPrevented&&(n=yn(t)),this.#t.current(t)};#u=mn(t=>{if(!this.opts.ref.current){this.#s();return}const n=this.opts.isValidEvent.current(t,this.opts.ref.current)||cs(t,this.opts.ref.current);if(!this.#r||this.#b()||!n){this.#s();return}let r=t;if(r.defaultPrevented&&(r=yn(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#s();return}t.pointerType==="touch"?(this.#s(),this.#s=I(this.#o,"click",this.#l,{once:!0})):this.#t.current(r)},10);#h=t=>{this.#n[t.type]=!0};#g=t=>{this.#n[t.type]=!1};#p=()=>{this.opts.ref.current&&(this.#r=as(this.opts.ref.current))};#m=t=>this.opts.ref.current?nr(this.opts.ref.current,t):!1;#d=mn(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#b(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}}function ss(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function as(e){const t=[...globalThis.bitsDismissableLayers],n=ss(t);if(n)return n[0].opts.ref.current===e;const[r]=t[0];return r.opts.ref.current===e}function cs(e,t){const n=e.target;if(!er(n))return!1;const r=!!n.closest(`[${rs}]`);if("button"in e&&e.button>0&&!r)return!1;if("button"in e&&e.button===0&&r)return!0;const i=!!t.closest(`[${is}]`);return r&&i?!1:rr(n).documentElement.contains(n)&&!nr(t,n)&&Eo(e,t)}function yn(e){const t=e.currentTarget,n=e.target;let r;e instanceof PointerEvent?r=new PointerEvent(e.type,e):r=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(r,{get:(o,a)=>a==="currentTarget"?t:a==="target"?n:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:e[a]})}function us(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"onInteractOutside",3,W),i=y(t,"onFocusOutside",3,W),s=y(t,"isValidEvent",3,()=>!1);const o=Ye.create({id:x(()=>t.id),interactOutsideBehavior:x(()=>n()),onInteractOutside:x(()=>r()),enabled:x(()=>t.enabled),onFocusOutside:x(()=>i()),isValidEvent:x(()=>s()),ref:t.ref});var a=_(),c=N(a);$(c,()=>t.children??Q,()=>({props:o.props})),R(e,a),G()}globalThis.bitsEscapeLayers??=new Map;class Ge{static create(t){return new Ge(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ze(this.opts.ref);let n=W;z(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=this.#t()),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>I(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==eo||!ls(this))return;const n=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(n)}}function ls(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(n)return n[0]===e;const[r]=t[0];return r===e}function fs(e,t){Y(t,!0);let n=y(t,"escapeKeydownBehavior",3,"close"),r=y(t,"onEscapeKeydown",3,W);Ge.create({escapeKeydownBehavior:x(()=>n()),onEscapeKeydown:x(()=>r()),enabled:x(()=>t.enabled),ref:t.ref});var i=_(),s=N(i);$(s,()=>t.children??Q),R(e,i),G()}class Xe{static instance;#t=et([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new Xe),this.instance}register(t){const n=this.getActive();n&&n!==t&&n.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(t,r),this.#t.current=this.#t.current.filter(i=>i!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(r=>r!==t);const n=this.getActive();n&&n.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,n){this.#e.set(t,n)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,n){this.#n.set(t,n)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}class qe{#t=!1;#e=null;#n=Xe.getInstance();#r=[];#i;constructor(t){this.#i=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#c(),this.#a()}unmount(){this.#e&&(this.#o(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#a(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const n=this.#l();n?(n.focus(),this.#n.setFocusMemory(this,n)):this.#e.focus()})}#s(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const n=this.#n.getPreFocusMemory(this);if(n&&document.contains(n))try{n.focus()}catch{document.body.focus()}}}#c(){if(!this.#e||!this.#i.trap.current)return;const t=this.#e,n=t.ownerDocument,r=o=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=o.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&gr(u))o.preventDefault(),u.focus();else{const f=this.#l(),l=this.#u()[0];(f||l||t).focus()}}},i=o=>{if(!this.#i.loop||this.#t||o.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#f();if(a.length===0)return;const c=a[0],u=a[a.length-1];!o.shiftKey&&n.activeElement===u?(o.preventDefault(),c.focus()):o.shiftKey&&n.activeElement===c&&(o.preventDefault(),u.focus())};this.#r.push(I(n,"focusin",r,{capture:!0}),I(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#n.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#l(),c=this.#u()[0],u=a||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>s.disconnect())}#f(){return this.#e?dr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#l(){return this.#f()[0]||null}#u(){return this.#e?hr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return z([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new qe(t)),n.mount(r)):n&&(n.unmount(),n=null)}),Ft(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}}function ds(e,t){Y(t,!0);let n=y(t,"enabled",3,!1),r=y(t,"trapFocus",3,!1),i=y(t,"loop",3,!1),s=y(t,"onCloseAutoFocus",3,W),o=y(t,"onOpenAutoFocus",3,W);const a=qe.use({enabled:x(()=>n()),trap:x(()=>r()),loop:i(),onCloseAutoFocus:x(()=>s()),onOpenAutoFocus:x(()=>o()),ref:t.ref});var c=_(),u=N(c);$(u,()=>t.focusScope??Q,()=>({props:a.props})),R(e,c),G()}globalThis.bitsTextSelectionLayers??=new Map;class Ze{static create(t){return new Ze(t)}opts;domContext;#t=W;constructor(t){this.opts=t,this.domContext=new ze(t.ref);let n=W;z(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=this.#e()),()=>{n(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return vt(I(this.domContext.getDocument(),"pointerdown",this.#n),I(this.domContext.getDocument(),"pointerup",Hn(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const n=this.opts.ref.current,r=t.target;!ot(n)||!ot(r)||!this.opts.enabled.current||!gs(this)||!Ji(n,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=hs(n,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=W}}const wn=e=>e.style.userSelect||e.style.webkitUserSelect;function hs(e,t){const n=wn(t),r=wn(e);return Gt(t,"none"),Gt(e,"text"),()=>{Gt(t,n),Gt(e,r)}}function Gt(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function gs(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function ps(e,t){Y(t,!0);let n=y(t,"preventOverflowTextSelection",3,!0),r=y(t,"onPointerDown",3,W),i=y(t,"onPointerUp",3,W);Ze.create({id:x(()=>t.id),onPointerDown:x(()=>r()),onPointerUp:x(()=>i()),enabled:x(()=>t.enabled&&n()),ref:t.ref});var s=_(),o=N(s);$(o,()=>t.children??Q),R(e,s),G()}globalThis.bitsIdCounter??={current:0};function Je(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}class ms{#t;#e=0;#n=P();#r;constructor(t){this.#t=t}#i(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),b(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,d(this.#n)===void 0&&(this.#r=zn(()=>{b(this.#n,this.#t(...t),!0)})),B(()=>()=>{this.#i()}),d(this.#n)}}const Zt=new ai;let Xt=P(null),Oe=null,Nt=null,Lt=!1;const xn=x(()=>{for(const e of Zt.values())if(e)return!0;return!1});let Te=null;const bs=new ms(()=>{function e(){document.body.setAttribute("style",d(Xt)??""),document.body.style.removeProperty("--scrollbar-width"),pn&&Oe?.(),b(Xt,null)}function t(){Nt!==null&&(window.clearTimeout(Nt),Nt=null)}function n(i,s){t(),Lt=!0,Te=Date.now();const o=Te,a=()=>{Nt=null,Te===o&&(Cr(Zt)?Lt=!1:(Lt=!1,s()))},c=i===null?24:i;Nt=window.setTimeout(a,c)}function r(){d(Xt)===null&&Zt.size===0&&!Lt&&b(Xt,document.body.getAttribute("style"),!0)}return z(()=>xn.current,()=>{if(!xn.current)return;r(),Lt=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",pn&&(Oe=I(document,"touchmove",f=>{f.target===document.documentElement&&(f.touches.length>1||f.preventDefault())},{passive:!1})),nt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Ft(()=>()=>{Oe?.()}),{get lockMap(){return Zt},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class vs{#t=Je();#e;#n=()=>null;#r;locked;constructor(t,n=()=>null){this.#e=t,this.#n=n,this.#r=bs.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=x(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),Ft(()=>{if(this.#r.lockMap.delete(this.#t),Cr(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function Cr(e){for(const[t,n]of e)if(n)return!0;return!1}function Sn(e,t){Y(t,!0);let n=y(t,"preventScroll",3,!0),r=y(t,"restoreScrollDelay",3,null);n()&&new vs(n(),()=>r()),G()}const ys=["top","right","bottom","left"],gt=Math.min,U=Math.max,ue=Math.round,qt=Math.floor,it=e=>({x:e,y:e}),ws={left:"right",right:"left",bottom:"top",top:"bottom"},xs={start:"end",end:"start"};function De(e,t,n){return U(e,gt(t,n))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function Qe(e){return e==="x"?"y":"x"}function $e(e){return e==="y"?"height":"width"}const Ss=new Set(["top","bottom"]);function rt(e){return Ss.has(ut(e))?"y":"x"}function tn(e){return Qe(rt(e))}function As(e,t,n){n===void 0&&(n=!1);const r=Rt(e),i=tn(e),s=$e(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=le(o)),[o,le(o)]}function Es(e){const t=le(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>xs[t])}const An=["left","right"],En=["right","left"],Os=["top","bottom"],Ts=["bottom","top"];function Cs(e,t,n){switch(e){case"top":case"bottom":return n?t?En:An:t?An:En;case"left":case"right":return t?Os:Ts;default:return[]}}function Ps(e,t,n,r){const i=Rt(e);let s=Cs(ut(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ne)))),s}function le(e){return e.replace(/left|right|bottom|top/g,t=>ws[t])}function Ms(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pr(e){return typeof e!="number"?Ms(e):{top:e,right:e,bottom:e,left:e}}function fe(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function On(e,t,n){let{reference:r,floating:i}=e;const s=rt(t),o=tn(t),a=$e(o),c=ut(t),u=s==="y",f=r.x+r.width/2-i.width/2,l=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let h;switch(c){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:l};break;case"left":h={x:r.x-i.width,y:l};break;default:h={x:r.x,y:r.y}}switch(Rt(t)){case"start":h[o]-=g*(n&&u?-1:1);break;case"end":h[o]+=g*(n&&u?-1:1);break}return h}async function Fs(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:g=!1,padding:h=0}=ct(t,e),m=Pr(h),v=a[g?l==="floating"?"reference":"floating":l],w=fe(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),O=l==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},T=fe(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:E,strategy:c}):O);return{top:(w.top-T.top+m.top)/S.y,bottom:(T.bottom-w.bottom+m.bottom)/S.y,left:(w.left-T.left+m.left)/S.x,right:(T.right-w.right+m.right)/S.x}}const Rs=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:l}=On(u,r,c),g=r,h={},m=0;for(let v=0;v<a.length;v++){var p;const{name:w,fn:O}=a[v],{x:E,y:S,data:T,reset:C}=await O({x:f,y:l,initialPlacement:r,placement:g,strategy:i,middlewareData:h,rects:u,platform:{...o,detectOverflow:(p=o.detectOverflow)!=null?p:Fs},elements:{reference:e,floating:t}});f=E??f,l=S??l,h={...h,[w]:{...h[w],...T}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:f,y:l}=On(u,g,c)),v=-1)}return{x:f,y:l,placement:g,strategy:i,middlewareData:h}},Is=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=ct(e,t)||{};if(u==null)return{};const l=Pr(f),g={x:n,y:r},h=tn(i),m=$e(h),p=await o.getDimensions(u),v=h==="y",w=v?"top":"left",O=v?"bottom":"right",E=v?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-g[h]-s.floating[m],T=g[h]-s.reference[h],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=C?C[E]:0;(!M||!await(o.isElement==null?void 0:o.isElement(C)))&&(M=a.floating[E]||s.floating[m]);const V=S/2-T/2,F=M/2-p[m]/2-1,k=gt(l[w],F),q=gt(l[O],F),L=k,tt=M-p[m]-q,D=M/2-p[m]/2+V,lt=De(L,D,tt),X=!c.arrow&&Rt(i)!=null&&D!==lt&&s.reference[m]/2-(D<L?k:q)-p[m]/2<0,K=X?D<L?D-L:D-tt:0;return{[h]:g[h]+K,data:{[h]:lt,centerOffset:D-lt-K,...X&&{alignmentOffset:K}},reset:X}}}),ks=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=ct(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=ut(i),O=rt(a),E=ut(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),T=g||(E||!p?[le(a)]:Es(a)),C=m!=="none";!g&&C&&T.push(...Ps(a,p,m,S));const M=[a,...T],V=await c.detectOverflow(t,v),F=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&F.push(V[w]),l){const D=As(i,o,S);F.push(V[D[0]],V[D[1]])}if(k=[...k,{placement:i,overflows:F}],!F.every(D=>D<=0)){var q,L;const D=(((q=s.flip)==null?void 0:q.index)||0)+1,lt=M[D];if(lt&&(!(l==="alignment"?O!==rt(lt):!1)||k.every(H=>rt(H.placement)===O?H.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:lt}};let X=(L=k.filter(K=>K.overflows[0]<=0).sort((K,H)=>K.overflows[1]-H.overflows[1])[0])==null?void 0:L.placement;if(!X)switch(h){case"bestFit":{var tt;const K=(tt=k.filter(H=>{if(C){const ft=rt(H.placement);return ft===O||ft==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ft=>ft>0).reduce((ft,zr)=>ft+zr,0)]).sort((H,ft)=>H[1]-ft[1])[0])==null?void 0:tt[0];K&&(X=K);break}case"initialPlacement":X=a;break}if(i!==X)return{reset:{placement:X}}}return{}}}};function Tn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cn(e){return ys.some(t=>e[t]>=0)}const Ds=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=ct(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Tn(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Cn(a)}}}case"escaped":{const o=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Tn(o,n.floating);return{data:{escapedOffsets:a,escaped:Cn(a)}}}default:return{}}}}},Mr=new Set(["left","top"]);async function Ns(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ut(n),a=Rt(n),c=rt(n)==="y",u=Mr.has(o)?-1:1,f=s&&c?-1:1,l=ct(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:m}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*f,y:g*u}:{x:g*u,y:h*f}}const Ls=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,c=await Ns(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},Bs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:O,y:E}=w;return{x:O,y:E}}},...u}=ct(e,t),f={x:n,y:r},l=await s.detectOverflow(t,u),g=rt(ut(i)),h=Qe(g);let m=f[h],p=f[g];if(o){const w=h==="y"?"top":"left",O=h==="y"?"bottom":"right",E=m+l[w],S=m-l[O];m=De(E,m,S)}if(a){const w=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=p+l[w],S=p-l[O];p=De(E,p,S)}const v=c.fn({...t,[h]:m,[g]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:o,[g]:a}}}}}},_s=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=ct(e,t),f={x:n,y:r},l=rt(i),g=Qe(l);let h=f[g],m=f[l];const p=ct(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const E=g==="y"?"height":"width",S=s.reference[g]-s.floating[E]+v.mainAxis,T=s.reference[g]+s.reference[E]-v.mainAxis;h<S?h=S:h>T&&(h=T)}if(u){var w,O;const E=g==="y"?"width":"height",S=Mr.has(ut(i)),T=s.reference[l]-s.floating[E]+(S&&((w=o.offset)==null?void 0:w[l])||0)+(S?0:v.crossAxis),C=s.reference[l]+s.reference[E]+(S?0:((O=o.offset)==null?void 0:O[l])||0)-(S?v.crossAxis:0);m<T?m=T:m>C&&(m=C)}return{[g]:h,[l]:m}}}},Ws=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...u}=ct(e,t),f=await o.detectOverflow(t,u),l=ut(i),g=Rt(i),h=rt(i)==="y",{width:m,height:p}=s.floating;let v,w;l==="top"||l==="bottom"?(v=l,w=g===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=l,v=g==="end"?"top":"bottom");const O=p-f.top-f.bottom,E=m-f.left-f.right,S=gt(p-f[v],O),T=gt(m-f[w],E),C=!t.middlewareData.shift;let M=S,V=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(V=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=O),C&&!g){const k=U(f.left,0),q=U(f.right,0),L=U(f.top,0),tt=U(f.bottom,0);h?V=m-2*(k!==0||q!==0?k+q:U(f.left,f.right)):M=p-2*(L!==0||tt!==0?L+tt:U(f.top,f.bottom))}await c({...t,availableWidth:V,availableHeight:M});const F=await o.getDimensions(a.floating);return m!==F.width||p!==F.height?{reset:{rects:!0}}:{}}}};function we(){return typeof window<"u"}function It(e){return Fr(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function at(e){var t;return(t=(Fr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fr(e){return we()?e instanceof Node||e instanceof j(e).Node:!1}function Z(e){return we()?e instanceof Element||e instanceof j(e).Element:!1}function st(e){return we()?e instanceof HTMLElement||e instanceof j(e).HTMLElement:!1}function Pn(e){return!we()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}const zs=new Set(["inline","contents"]);function Yt(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zs.has(i)}const Vs=new Set(["table","td","th"]);function Ks(e){return Vs.has(It(e))}const Hs=[":popover-open",":modal"];function xe(e){return Hs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Us=["transform","translate","scale","rotate","perspective"],js=["transform","translate","scale","rotate","perspective","filter"],Ys=["paint","layout","strict","content"];function en(e){const t=nn(),n=Z(e)?J(e):e;return Us.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||js.some(r=>(n.willChange||"").includes(r))||Ys.some(r=>(n.contain||"").includes(r))}function Gs(e){let t=pt(e);for(;st(t)&&!Pt(t);){if(en(t))return t;if(xe(t))return null;t=pt(t)}return null}function nn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xs=new Set(["html","body","#document"]);function Pt(e){return Xs.has(It(e))}function J(e){return j(e).getComputedStyle(e)}function Se(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pt(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||at(e);return Pn(t)?t.host:t}function Rr(e){const t=pt(e);return Pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Yt(t)?t:Rr(t)}function zt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Rr(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=j(i);if(s){const a=Le(o);return t.concat(o,o.visualViewport||[],Yt(i)?i:[],a&&n?zt(a):[])}return t.concat(i,zt(i,[],n))}function Le(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ir(e){const t=J(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=st(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=ue(n)!==s||ue(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function rn(e){return Z(e)?e:e.contextElement}function Ot(e){const t=rn(e);if(!st(t))return it(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Ir(t);let o=(s?ue(n.width):n.width)/r,a=(s?ue(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const qs=it(0);function kr(e){const t=j(e);return!nn()||!t.visualViewport?qs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==j(e)?!1:t}function wt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=rn(e);let o=it(1);t&&(r?Z(r)&&(o=Ot(r)):o=Ot(e));const a=Zs(s,n,r)?kr(s):it(0);let c=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,f=i.width/o.x,l=i.height/o.y;if(s){const g=j(s),h=r&&Z(r)?j(r):r;let m=g,p=Le(m);for(;p&&r&&h!==m;){const v=Ot(p),w=p.getBoundingClientRect(),O=J(p),E=w.left+(p.clientLeft+parseFloat(O.paddingLeft))*v.x,S=w.top+(p.clientTop+parseFloat(O.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,l*=v.y,c+=E,u+=S,m=j(p),p=Le(m)}}return fe({width:f,height:l,x:c,y:u})}function Ae(e,t){const n=Se(e).scrollLeft;return t?t.left+n:wt(at(e)).left+n}function Dr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ae(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Js(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=at(r),a=t?xe(t.floating):!1;if(r===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=it(1);const f=it(0),l=st(r);if((l||!l&&!s)&&((It(r)!=="body"||Yt(o))&&(c=Se(r)),st(r))){const h=wt(r);u=Ot(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const g=o&&!l&&!s?Dr(o,c):it(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-c.scrollTop*u.y+f.y+g.y}}function Qs(e){return Array.from(e.getClientRects())}function $s(e){const t=at(e),n=Se(e),r=e.ownerDocument.body,i=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ae(e);const a=-n.scrollTop;return J(r).direction==="rtl"&&(o+=U(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const Mn=25;function ta(e,t){const n=j(e),r=at(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const f=nn();(!f||f&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}const u=Ae(r);if(u<=0){const f=r.ownerDocument,l=f.body,g=getComputedStyle(l),h=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,m=Math.abs(r.clientWidth-l.clientWidth-h);m<=Mn&&(s-=m)}else u<=Mn&&(s+=u);return{width:s,height:o,x:a,y:c}}const ea=new Set(["absolute","fixed"]);function na(e,t){const n=wt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=st(e)?Ot(e):it(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:o,height:a,x:c,y:u}}function Fn(e,t,n){let r;if(t==="viewport")r=ta(e,n);else if(t==="document")r=$s(at(e));else if(Z(t))r=na(t,n);else{const i=kr(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return fe(r)}function Nr(e,t){const n=pt(e);return n===t||!Z(n)||Pt(n)?!1:J(n).position==="fixed"||Nr(n,t)}function ra(e,t){const n=t.get(e);if(n)return n;let r=zt(e,[],!1).filter(a=>Z(a)&&It(a)!=="body"),i=null;const s=J(e).position==="fixed";let o=s?pt(e):e;for(;Z(o)&&!Pt(o);){const a=J(o),c=en(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&ea.has(i.position)||Yt(o)&&!c&&Nr(e,o))?r=r.filter(f=>f!==o):i=a,o=pt(o)}return t.set(e,r),r}function ia(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?xe(t)?[]:ra(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,f)=>{const l=Fn(t,f,i);return u.top=U(l.top,u.top),u.right=gt(l.right,u.right),u.bottom=gt(l.bottom,u.bottom),u.left=U(l.left,u.left),u},Fn(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function oa(e){const{width:t,height:n}=Ir(e);return{width:t,height:n}}function sa(e,t,n){const r=st(t),i=at(t),s=n==="fixed",o=wt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=it(0);function u(){c.x=Ae(i)}if(r||!r&&!s)if((It(t)!=="body"||Yt(i))&&(a=Se(t)),r){const h=wt(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&u();s&&!r&&i&&u();const f=i&&!r&&!s?Dr(i,a):it(0),l=o.left+a.scrollLeft-c.x-f.x,g=o.top+a.scrollTop-c.y-f.y;return{x:l,y:g,width:o.width,height:o.height}}function Ce(e){return J(e).position==="static"}function Rn(e,t){if(!st(e)||J(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return at(e)===n&&(n=n.ownerDocument.body),n}function Lr(e,t){const n=j(e);if(xe(e))return n;if(!st(e)){let i=pt(e);for(;i&&!Pt(i);){if(Z(i)&&!Ce(i))return i;i=pt(i)}return n}let r=Rn(e,t);for(;r&&Ks(r)&&Ce(r);)r=Rn(r,t);return r&&Pt(r)&&Ce(r)&&!en(r)?n:r||Gs(e)||n}const aa=async function(e){const t=this.getOffsetParent||Lr,n=this.getDimensions,r=await n(e.floating);return{reference:sa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ca(e){return J(e).direction==="rtl"}const ua={convertOffsetParentRelativeRectToViewportRelativeRect:Js,getDocumentElement:at,getClippingRect:ia,getOffsetParent:Lr,getElementRects:aa,getClientRects:Qs,getDimensions:oa,getScale:Ot,isElement:Z,isRTL:ca};function Br(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function la(e,t){let n=null,r;const i=at(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:l,width:g,height:h}=u;if(a||t(),!g||!h)return;const m=qt(l),p=qt(i.clientWidth-(f+g)),v=qt(i.clientHeight-(l+h)),w=qt(f),E={rootMargin:-m+"px "+-p+"px "+-v+"px "+-w+"px",threshold:U(0,gt(1,c))||1};let S=!0;function T(C){const M=C[0].intersectionRatio;if(M!==c){if(!S)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!Br(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,E)}n.observe(e)}return o(!0),s}function fa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=rn(e),f=i||s?[...u?zt(u):[],...zt(t)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const l=u&&a?la(u,n):null;let g=-1,h=null;o&&(h=new ResizeObserver(w=>{let[O]=w;O&&O.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?wt(e):null;c&&v();function v(){const w=wt(e);p&&!Br(p,w)&&n(),p=w,m=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(O=>{i&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),l?.(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const da=Ls,ha=Bs,ga=ks,pa=Ws,ma=Ds,ba=Is,va=_s,ya=(e,t,n)=>{const r=new Map,i={platform:ua,...n},s={...i.platform,_c:r};return Rs(e,t,{...i,platform:s})};function mt(e){return typeof e=="function"?e():e}function _r(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function In(e,t){const n=_r(e);return Math.round(t*n)/n}function Ja(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function wa(e){const t=e.whileElementsMounted,n=A(()=>mt(e.open)??!0),r=A(()=>mt(e.middleware)),i=A(()=>mt(e.transform)??!0),s=A(()=>mt(e.placement)??"bottom"),o=A(()=>mt(e.strategy)??"absolute"),a=A(()=>mt(e.sideOffset)??0),c=A(()=>mt(e.alignOffset)??0),u=e.reference;let f=P(0),l=P(0);const g=et(null);let h=P(Et(d(o))),m=P(Et(d(s))),p=P(Et({})),v=P(!1),w=!1;const O=A(()=>{const F=g.current?In(g.current,d(f)):d(f),k=g.current?In(g.current,d(l)):d(l);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${F}px, ${k}px)`,...g.current&&_r(g.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${F}px`,top:`${k}px`}});let E;function S(){u.current===null||g.current===null||ya(u.current,g.current,{middleware:d(r),placement:d(s),strategy:d(o)}).then(F=>{const k=u.current;if(xa(k)){b(p,{...d(p),hide:{...d(p).hide,referenceHidden:!0}},!0);return}if(!d(n)&&d(f)!==0&&d(l)!==0){const L=Math.max(Math.abs(d(a)),Math.abs(d(c)),15);if(F.x<=L&&F.y<=L)return}b(f,F.x,!0),b(l,F.y,!0),b(h,F.strategy,!0),b(m,F.placement,!0),b(p,F.middlewareData,!0),b(v,!0)})}function T(){typeof E=="function"&&(E(),E=void 0)}function C(){if(T(),t===void 0){S();return}d(n)&&(u.current===null||g.current===null||(E=t(u.current,g.current,S)))}function M(){d(n)||b(v,!1)}function V(){return[d(r),d(s),d(o),d(a),d(c),d(n)]}return B(()=>{t===void 0&&d(n)&&S()}),B(C),B(()=>{if(t!==void 0){if(V(),!d(n)){w=!1;return}if(!d(v)){w=!1;return}if(!w){w=!0;return}S()}}),B(M),B(()=>T),{floating:g,reference:u,get strategy(){return d(h)},get placement(){return d(m)},get middlewareData(){return d(p)},get isPositioned(){return d(v)},get floatingStyles(){return d(O)},get update(){return S}}}function xa(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Sa={top:"bottom",right:"left",bottom:"top",left:"right"},on=new St("Floating.Root"),kn=new St("Floating.Content"),sn=new St("Floating.Root");class de{static create(t=!1){return t?sn.set(new de):on.set(new de)}anchorNode=et(null);customAnchorNode=et(null);triggerNode=et(null);constructor(){B(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class he{static create(t,n=!1){return n?kn.set(new he(t,sn.get())):kn.set(new he(t,on.get()))}opts;root;contentRef=et(null);wrapperRef=et(null);arrowRef=et(null);contentAttachment=ht(this.contentRef);wrapperAttachment=ht(this.wrapperRef);arrowAttachment=ht(this.arrowRef);arrowId=et(Je());#t=A(()=>{if(typeof this.opts.style=="string")return Bt(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#n=new Ui(()=>this.arrowRef.current??void 0);#r=A(()=>this.#n?.width??0);#i=A(()=>this.#n?.height??0);#o=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=A(()=>d(this.#a).length>0);get hasExplicitBoundaries(){return d(this.#s)}set hasExplicitBoundaries(t){b(this.#s,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#a).filter(lo),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#c)}set detectOverflowOptions(t){b(this.#c,t)}#f=P(void 0);#l=P(void 0);#u=P(void 0);#h=P(void 0);#g=A(()=>[da({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&ha({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?va():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ga({...this.detectOverflowOptions}),pa({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:r})=>{const{width:i,height:s}=t.reference;b(this.#f,n,!0),b(this.#l,r,!0),b(this.#u,i,!0),b(this.#h,s,!0)}}),this.arrowRef.current&&ba({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Aa({arrowWidth:d(this.#r),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&ma({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#g)}set middleware(t){b(this.#g,t)}floating;#p=A(()=>Ea(this.floating.placement));get placedSide(){return d(this.#p)}set placedSide(t){b(this.#p,t)}#m=A(()=>Oa(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){b(this.#m,t)}#d=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#d)}set arrowX(t){b(this.#d,t)}#b=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#b)}set arrowY(t){b(this.#b,t)}#v=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#v)}set cannotCenterArrow(t){b(this.#v,t)}#y=P();get contentZIndex(){return d(this.#y)}set contentZIndex(t){b(this.#y,t,!0)}#w=A(()=>Sa[this.placedSide]);get arrowBaseSide(){return d(this.#w)}set arrowBaseSide(t){b(this.#w,t)}#x=A(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${d(this.#f)}px`,"--bits-floating-available-height":`${d(this.#l)}px`,"--bits-floating-anchor-width":`${d(this.#u)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#x)}set wrapperProps(t){b(this.#x,t)}#S=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:jn({...d(this.#t)}),...this.contentAttachment}));get props(){return d(this.#S)}set props(t){b(this.#S,t)}#A=A(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return d(this.#A)}set arrowStyle(t){b(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),z(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=wa({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#o),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>fa(...r,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),B(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),z(()=>this.contentRef.current,r=>{if(!r||!this.opts.enabled.current)return;const i=We(r),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==r||!this.opts.enabled.current)return;const o=i.getComputedStyle(r).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),B(()=>{this.floating.floating.current=this.wrapperRef.current})}}class ge{static create(t,n=!1){return n?new ge(t,sn.get()):new ge(t,on.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Kn(t.virtualEl.current):n.triggerNode=t.ref}}function Aa(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=an(n),l={start:"0%",center:"50%",end:"100%"}[f],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=o?l:`${g}px`,p=`${-c}px`):u==="top"?(m=o?l:`${g}px`,p=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=o?l:`${h}px`):u==="left"&&(m=`${r.floating.width+c}px`,p=o?l:`${h}px`),{data:{x:m,y:p}}}}}function an(e){const[t,n="center"]=e.split("-");return[t,n]}function Ea(e){return an(e)[0]}function Oa(e){return an(e)[1]}function Qa(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);de.create(n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function $a(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);ge.create({id:x(()=>t.id),virtualEl:x(()=>t.virtualEl),ref:t.ref},n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function Ta(e,t){Y(t,!0);let n=y(t,"side",3,"bottom"),r=y(t,"sideOffset",3,0),i=y(t,"align",3,"center"),s=y(t,"alignOffset",3,0),o=y(t,"arrowPadding",3,0),a=y(t,"avoidCollisions",3,!0),c=y(t,"collisionBoundary",19,()=>[]),u=y(t,"collisionPadding",3,0),f=y(t,"hideWhenDetached",3,!1),l=y(t,"onPlaced",3,()=>{}),g=y(t,"sticky",3,"partial"),h=y(t,"updatePositionStrategy",3,"optimized"),m=y(t,"strategy",3,"fixed"),p=y(t,"dir",3,"ltr"),v=y(t,"style",19,()=>({})),w=y(t,"wrapperId",19,Je),O=y(t,"customAnchor",3,null),E=y(t,"tooltip",3,!1);const S=he.create({side:x(()=>n()),sideOffset:x(()=>r()),align:x(()=>i()),alignOffset:x(()=>s()),id:x(()=>t.id),arrowPadding:x(()=>o()),avoidCollisions:x(()=>a()),collisionBoundary:x(()=>c()),collisionPadding:x(()=>u()),hideWhenDetached:x(()=>f()),onPlaced:x(()=>l()),sticky:x(()=>g()),updatePositionStrategy:x(()=>h()),strategy:x(()=>m()),dir:x(()=>p()),style:x(()=>v()),enabled:x(()=>t.enabled),wrapperId:x(()=>w()),customAnchor:x(()=>O())},E()),T=A(()=>ve(S.wrapperProps,{style:{pointerEvents:"auto"}}));var C=_(),M=N(C);$(M,()=>t.content??Q,()=>({props:S.props,wrapperProps:d(T)})),R(e,C),G()}function Ca(e,t){Y(t,!0),ei(()=>{t.onPlaced?.()});var n=_(),r=N(n);$(r,()=>t.content??Q,()=>({props:{},wrapperProps:{}})),R(e,n),G()}function Pa(e,t){let n=y(t,"isStatic",3,!1),r=me(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var i=_(),s=N(i);{var o=c=>{Ca(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Ta(c,Be({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};Mt(s,c=>{n()?c(o):c(a,!1)})}R(e,i)}var Ma=Hr("<!> <!>",1);function Wr(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=y(t,"tooltip",3,!1),c=y(t,"contentPointerEvents",3,"auto"),u=me(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);Pa(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(l,g)=>{let h=()=>g?.().props,m=()=>g?.().wrapperProps;var p=Ma(),v=N(p);{var w=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})},O=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})};Mt(v,S=>{t.forceMount&&t.enabled?S(w):t.forceMount||S(O,1)})}var E=ni(v,2);ds(E,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(T,C)=>{let M=()=>C?.().props;fs(T,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(V,F)=>{us(V,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(q,L)=>{let tt=()=>L?.().props;ps(q,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(D,lt)=>{var X=_(),K=N(X);{let H=A(()=>({props:ve(u,h(),tt(),M(),{style:{pointerEvents:c()}}),wrapperProps:m()}));$(K,()=>t.popper??Q,()=>d(H))}R(D,X)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),R(l,p)},$$slots:{content:!0}}),G()}function tc(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=_(),u=N(c);{var f=l=>{Wr(l,Be({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Mt(u,l=>{t.shouldRender&&l(f)})}R(e,c)}function ec(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Wr(e,Be({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var Fa=pe("<title> </title>"),Ra=pe('<svg><!><path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"></path></svg>');function nc(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=Ra();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=Fa(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}export{qo as $,po as A,to as B,St as C,Tr as D,Qn as E,Qa as F,Wa as G,ds as H,fs as I,us as J,Sn as K,Zn as L,Za as M,Ft as N,ji as O,ec as P,nt as Q,ho as R,ja as S,ps as T,Yo as U,si as V,nc as W,jn as X,Va as Y,br as Z,mr as _,Ar as a,ne as a0,Wt as a1,io as a2,ro as a3,$n as a4,no as a5,Jn as a6,Ya as a7,Ga as a8,Xa as a9,qa as aa,pn as ab,za as ac,ai as ad,x as b,Ha as c,Or as d,xr as e,tc as f,yr as g,Ja as h,ot as i,Er as j,$a as k,wr as l,ve as m,W as n,je as o,Ua as p,Ht as q,Re as r,ht as s,ze as t,Ka as u,ye as v,z as w,Ke as x,Ve as y,He as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Kt=Array.isArray,Xt=Array.prototype.indexOf,oe=Array.prototype.includes,zn=Array.from,Gn=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyDescriptors,Wt=Object.prototype,Jt=Array.prototype,_t=Object.getPrototypeOf,rt=Object.isExtensible;function $n(e){return typeof e=="function"}const ye=()=>{};function Kn(e){return e()}function Qt(e){for(var t=0;t<e.length;t++)e[t]()}function vt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Xn(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 g=2,ie=4,ue=8,Be=1<<24,K=16,L=32,X=64,en=128,k=512,y=1024,T=2048,P=4096,F=8192,V=16384,de=32768,Se=65536,st=1<<17,tn=1<<18,he=1<<19,dt=1<<20,Zn=1<<25,re=65536,Le=1<<21,Ue=1<<22,B=1<<23,te=Symbol("$state"),Wn=Symbol("legacy props"),Jn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},er=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),tr=1,Ce=3,ht=8;function ze(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function nn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function nr(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function rn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function an(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rr(){throw new Error("https://svelte.dev/e/hydration_failed")}function sr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function on(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ir=1,ar=2,lr=4,or=8,ur=16,cr=1,_r=2,vr=4,dr=8,hr=16,pr=1,br=2,cn="[",_n="[!",wr="[?",vn="]",Ge={},E=Symbol(),dn="http://www.w3.org/1999/xhtml",yr="http://www.w3.org/2000/svg",Er="http://www.w3.org/1998/Math/MathML",gr="@attach";function $e(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function mr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Tr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let z=!1;function Ar(e){z=e}let S;function ce(e){if(e===null)throw $e(),Ge;return S=e}function xr(){return ce(Z(S))}function Sr(e){if(z){if(Z(S)!==null)throw $e(),Ge;S=e}}function Rr(e=1){if(z){for(var t=e,n=S;t--;)n=Z(n);S=n}}function Nr(e=!0){for(var t=0,n=S;;){if(n.nodeType===ht){var r=n.data;if(r===vn){if(t===0)return n;t-=1}else(r===cn||r===_n||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Or(e){if(!e||e.nodeType!==ht)throw $e(),Ge;return e.data}function pt(e){return e===this.v}function bt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function wt(e){return!bt(e,this.v)}let me=!1;function kr(){me=!0}let h=null;function Re(e){h=e}function Cr(e){return De().get(e)}function Dr(e,t){return De().set(e,t),t}function Ir(e){return De().has(e)}function Mr(){return De()}function Pr(e,t=!1,n){h={p:h,i:!1,c:null,e:null,s:e,x:null,l:me&&!t?{s:null,u:null,$:[]}:null}}function Fr(e){var t=h,n=t.e;if(n!==null){t.e=null;for(var r of n)Pt(r)}return e!==void 0&&(t.x=e),t.i=!0,h=t.p,e??{}}function Te(){return!me||h!==null&&h.l===null}function De(e){return h===null&&ze(),h.c??=new Map(hn(h)||void 0)}function hn(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 yt(){var e=J;J=[],Qt(e)}function je(e){if(J.length===0&&!Ee){var t=J;queueMicrotask(()=>{t===J&&yt()})}J.push(e)}function pn(){for(;J.length>0;)yt()}function bn(e){var t=d;if(t===null)return v.f|=B,e;if((t.f&de)===0&&(t.f&ie)===0)throw e;Ne(e,t)}function Ne(e,t){for(;t!==null;){if((t.f&en)!==0){if((t.f&de)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const wn=-7169;function w(e,t){e.f=e.f&wn|t}function Ke(e){(e.f&k)!==0||e.deps===null?w(e,y):w(e,P)}function Et(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&re)===0||(t.f^=re,Et(t.deps))}function yn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&P)!==0&&n.add(e),Et(e.deps),w(e,y)}const Ae=new Set;let b=null,ft=null,I=null,A=[],Ie=null,Ee=!1,_e=null;class ae{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#f=0;#i=null;#a=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#f>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)w(r,T),Y(r);for(r of n.m)w(r,P),Y(r)}}process(t){A=[],this.apply();var n=_e=[],r=[];for(const s of t)this.#u(s,n,r);if(_e=null,this.#o()){this.#c(r),this.#c(n);for(const[s,f]of this.#e)At(s,f)}else{ft=this,b=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),it(r),it(n),this.#a.clear(),this.#n.clear(),ft=null,this.#i?.resolve()}I=null}#u(t,n,r){t.f^=y;for(var s=t.first;s!==null;){var f=s.f,o=(f&(L|X))!==0,l=o&&(f&y)!==0,i=l||(f&F)!==0||this.#e.has(s);if(!i&&s.fn!==null){o?s.f^=y:(f&ie)!==0?n.push(s):pe(s)&&((f&K)!==0&&this.#n.add(s),fe(s));var a=s.first;if(a!==null){s=a;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)yn(t[n],this.#a,this.#n)}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&B)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){b=this,this.apply()}deactivate(){b===this&&(b=null,I=null)}flush(){if(A.length>0)b=this,gt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#i?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(Ae.size>1){this.previous.clear();var t=b,n=I,r=!0;for(const f of Ae){if(f===this){r=!1;continue}const o=[];for(const[i,a]of this.current){if(f.current.has(i))if(r&&a!==f.current.get(i))f.current.set(i,a);else continue;o.push(i)}if(o.length===0)continue;const l=[...f.current.keys()].filter(i=>!this.current.has(i));if(l.length>0){var s=A;A=[];const i=new Set,a=new Map;for(const u of o)mt(u,l,i,a);if(A.length>0){b=f,f.apply();for(const u of A)f.#u(u,[],[]);f.deactivate()}A=s}}b=t,I=n}this.#e.clear(),Ae.delete(this)}increment(t){this.#r+=1,t&&(this.#f+=1)}decrement(t){this.#r-=1,t&&(this.#f-=1),!this.#l&&(this.#l=!0,je(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#a)this.#n.delete(t),w(t,T),Y(t);for(const t of this.#n)w(t,P),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#i??=vt()).promise}static ensure(){if(b===null){const t=b=new ae;Ae.add(b),Ee||je(()=>{b===t&&t.flush()})}return b}apply(){}}function En(e){var t=Ee;Ee=!0;try{for(var n;;){if(pn(),A.length===0&&(b?.flush(),A.length===0))return Ie=null,n;gt()}}finally{Ee=t}}function gt(){var e=null;try{for(var t=0;A.length>0;){var n=ae.ensure();if(t++>1e3){var r,s;gn()}n.process(A),U.clear()}}finally{A=[],Ie=null,_e=null}}function gn(){try{an()}catch(e){Ne(e,Ie)}}let j=null;function it(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|F))===0&&pe(r)&&(j=new Set,fe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jt(r),j?.size>0)){U.clear();for(const s of j){if((s.f&(V|F))!==0)continue;const f=[s];let o=s.parent;for(;o!==null;)j.has(o)&&(j.delete(o),f.push(o)),o=o.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(V|F))===0&&fe(i)}}j.clear()}}j=null}}function mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?mt(s,t,n,r):(f&(Ue|K))!==0&&(f&T)===0&&Tt(s,t,r)&&(w(s,T),Y(s))}}function Tt(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(oe.call(t,s))return!0;if((s.f&g)!==0&&Tt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=Ie=e,n=t.b;if(n?.is_pending&&(e.f&(ie|ue|Be))!==0&&(e.f&de)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(_e!==null&&t===d&&(e.f&ue)===0)return;if((r&(X|L))!==0){if((r&y)===0)return;t.f^=y}}A.push(t)}function At(e,t){if(!((e.f&L)!==0&&(e.f&y)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&P)!==0&&t.m.push(e),w(e,y);for(var n=e.first;n!==null;)At(n,t),n=n.next}}function xt(e,t,n,r){const s=Te()?Xe:An;var f=e.filter(c=>!c.settled);if(n.length===0&&f.length===0){r(t.map(s));return}var o=d,l=mn(),i=f.length===1?f[0].promise:f.length>1?Promise.all(f.map(c=>c.promise)):null;function a(c){l();try{r(c)}catch(_){(o.f&V)===0&&Ne(_,o)}Ye()}if(n.length===0){i.then(()=>a(t.map(s)));return}function u(){l(),Promise.all(n.map(c=>Tn(c))).then(c=>a([...t.map(s),...c])).catch(c=>Ne(c,o))}i?i.then(u):u()}function mn(){var e=d,t=v,n=h,r=b;return function(f=!0){ve(e),$(t),Re(n),f&&r?.activate()}}function Ye(e=!0){ve(null),$(null),Re(null),e&&b?.deactivate()}function St(){var e=d.b,t=b,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Xe(e){var t=g|T,n=v!==null&&(v.f&g)!==0?v:null;return d!==null&&(d.f|=he),{ctx:h,deps:null,effects:null,equals:pt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??d,ac:null}}function Tn(e,t,n){d===null&&nn();var s=void 0,f=We(E),o=!v,l=new Map;return Fn(()=>{var i=vt();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).finally(Ye)}catch(_){i.reject(_),Ye()}var a=b;if(o){var u=St();l.get(a)?.reject(W),l.delete(a),l.set(a,i)}const c=(_,m=void 0)=>{if(a.activate(),m)m!==W&&(f.f|=B,He(f,m));else{(f.f&B)!==0&&(f.f^=B),He(f,_);for(const[p,D]of l){if(l.delete(p),p===a)break;D.reject(W)}}u&&u()};i.promise.then(c,_=>c(null,_||"unknown"))}),Mn(()=>{for(const i of l.values())i.reject(W)}),new Promise(i=>{function a(u){function c(){u===s?i(f):a(s)}u.then(c,c)}a(s)})}function Lr(e){const t=Xe(e);return Ht(t),t}function An(e){const t=Xe(e);return t.equals=wt,t}function xn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)G(t[n])}}function Sn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function Ze(e){var t,n=d;ve(Sn(e));try{e.f&=~re,xn(e),t=zt(e)}finally{ve(n)}return t}function Rt(e){var t=Ze(e);if(!e.equals(t)&&(e.wv=Bt(),(!b?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){w(e,y);return}se||(I!==null?(Mt()||b?.is_fork)&&I.set(e,t):Ke(e))}function Rn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=ye,t.ac=null,ge(t,0),et(t))}function Nt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&fe(t)}let qe=new Set;const U=new Map;let Ot=!1;function We(e,t){var n={f:0,v:e,reactions:null,equals:pt,rv:0,wv:0};return n}function q(e,t){const n=We(e);return Ht(n),n}function jr(e,t=!1,n=!0){const r=We(e);return t||(r.equals=wt),me&&n&&h!==null&&h.l!==null&&(h.l.s??=[]).push(r),r}function H(e,t,n=!1){v!==null&&(!M||(v.f&st)!==0)&&Te()&&(v.f&(g|K|Ue|st))!==0&&(C===null||!oe.call(C,e))&&un();let r=n?be(t):t;return He(e,r)}function He(e,t){if(!e.equals(t)){var n=e.v;se?U.set(e,t):U.set(e,n),e.v=t;var r=ae.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&T)!==0&&Ze(s),Ke(s)}e.wv=Bt(),kt(e,T),Te()&&d!==null&&(d.f&y)!==0&&(d.f&(L|X))===0&&(O===null?qn([e]):O.push(e)),!r.is_fork&&qe.size>0&&!Ot&&Nn()}return t}function Nn(){Ot=!1;for(const e of qe)(e.f&y)!==0&&w(e,P),pe(e)&&fe(e);qe.clear()}function Yr(e,t=1){var n=ee(e),r=t===1?n++:n--;return H(e,n),r}function Fe(e){H(e,e.v+1)}function kt(e,t){var n=e.reactions;if(n!==null)for(var r=Te(),s=n.length,f=0;f<s;f++){var o=n[f],l=o.f;if(!(!r&&o===d)){var i=(l&T)===0;if(i&&w(o,t),(l&g)!==0){var a=o;I?.delete(a),(l&re)===0&&(l&k&&(o.f|=re),kt(a,P))}else i&&((l&K)!==0&&j!==null&&j.add(o),Y(o))}}}function be(e){if(typeof e!="object"||e===null||te in e)return e;const t=_t(e);if(t!==Wt&&t!==Jt)return e;var n=new Map,r=Kt(e),s=q(0),f=ne,o=l=>{if(ne===f)return l();var i=v,a=ne;$(null),ct(f);var u=l();return $(i),ct(a),u};return r&&n.set("length",q(e.length)),new Proxy(e,{defineProperty(l,i,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&ln();var u=n.get(i);return u===void 0?o(()=>{var c=q(a.value);return n.set(i,c),c}):H(u,a.value,!0),!0},deleteProperty(l,i){var a=n.get(i);if(a===void 0){if(i in l){const u=o(()=>q(E));n.set(i,u),Fe(s)}}else H(a,E),Fe(s);return!0},get(l,i,a){if(i===te)return e;var u=n.get(i),c=i in l;if(u===void 0&&(!c||we(l,i)?.writable)&&(u=o(()=>{var m=be(c?l[i]:E),p=q(m);return p}),n.set(i,u)),u!==void 0){var _=ee(u);return _===E?void 0:_}return Reflect.get(l,i,a)},getOwnPropertyDescriptor(l,i){var a=Reflect.getOwnPropertyDescriptor(l,i);if(a&&"value"in a){var u=n.get(i);u&&(a.value=ee(u))}else if(a===void 0){var c=n.get(i),_=c?.v;if(c!==void 0&&_!==E)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return a},has(l,i){if(i===te)return!0;var a=n.get(i),u=a!==void 0&&a.v!==E||Reflect.has(l,i);if(a!==void 0||d!==null&&(!u||we(l,i)?.writable)){a===void 0&&(a=o(()=>{var _=u?be(l[i]):E,m=q(_);return m}),n.set(i,a));var c=ee(a);if(c===E)return!1}return u},set(l,i,a,u){var c=n.get(i),_=i in l;if(r&&i==="length")for(var m=a;m<c.v;m+=1){var p=n.get(m+"");p!==void 0?H(p,E):m in l&&(p=o(()=>q(E)),n.set(m+"",p))}if(c===void 0)(!_||we(l,i)?.writable)&&(c=o(()=>q(void 0)),H(c,be(a)),n.set(i,c));else{_=c.v!==E;var D=o(()=>be(a));H(c,D)}var tt=Reflect.getOwnPropertyDescriptor(l,i);if(tt?.set&&tt.set.call(u,a),!_){if(r&&typeof i=="string"){var nt=n.get("length"),Pe=Number(i);Number.isInteger(Pe)&&Pe>=nt.v&&H(nt,Pe+1)}Fe(s)}return!0},ownKeys(l){ee(s);var i=Reflect.ownKeys(l).filter(c=>{var _=n.get(c);return _===void 0||_.v!==E});for(var[a,u]of n)u.v!==E&&!(a in l)&&i.push(a);return i},setPrototypeOf(){on()}})}function at(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function qr(e,t){return Object.is(at(e),at(t))}var lt,On,kn,Ct,Dt;function Hr(){if(lt===void 0){lt=window,On=document,kn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ct=we(t,"firstChild").get,Dt=we(t,"nextSibling").get,rt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rt(n)&&(n.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function ke(e){return Ct.call(e)}function Z(e){return Dt.call(e)}function Vr(e,t){if(!z)return ke(e);var n=ke(S);if(n===null)n=S.appendChild(Oe());else if(t&&n.nodeType!==Ce){var r=Oe();return n?.before(r),ce(r),r}return t&&Je(n),ce(n),n}function Br(e,t=!1){if(!z){var n=ke(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==Ce){var r=Oe();return S?.before(r),ce(r),r}Je(S)}return S}function Ur(e,t=1,n=!1){let r=z?S:e;for(var s;t--;)s=r,r=Z(r);if(!z)return r;if(n){if(r?.nodeType!==Ce){var f=Oe();return r===null?s?.after(f):r.before(f),ce(f),f}Je(r)}return ce(r),r}function Cn(e){e.textContent=""}function zr(){return!1}function Gr(e,t,n){return document.createElementNS(t??dn,e,void 0)}function Je(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ce;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,je(()=>{document.activeElement===n&&e.focus()})}}function Kr(e){z&&ke(e)!==null&&Cn(e)}let ot=!1;function Dn(){ot||(ot=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Qe(e){var t=v,n=d;$(null),ve(null);try{return e()}finally{$(t),ve(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Dn()}function It(e){d===null&&(v===null&&fn(),sn()),se&&rn()}function In(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&F)!==0&&(e|=F);var r={ctx:h,deps:null,nodes:null,f:e|T|k,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&ie)!==0)_e!==null?_e.push(r):Y(r);else if(t!==null){try{fe(r)}catch(o){throw G(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&he)===0&&(s=s.first,(e&K)!==0&&(e&Se)!==0&&s!==null&&(s.f|=Se))}if(s!==null&&(s.parent=n,n!==null&&In(s,n),v!==null&&(v.f&g)!==0&&(e&X)===0)){var f=v;(f.effects??=[]).push(s)}return r}function Mt(){return v!==null&&!M}function Mn(e){const t=N(ue,null);return w(t,y),t.teardown=e,t}function Pn(e){It();var t=d.f,n=!v&&(t&L)!==0&&(t&de)===0;if(n){var r=h;(r.e??=[]).push(e)}else return Pt(e)}function Pt(e){return N(ie|dt,e)}function Zr(e){return It(),N(ue|dt,e)}function Wr(e){ae.ensure();const t=N(X|he,e);return()=>{G(t)}}function Jr(e){ae.ensure();const t=N(X|he,e);return(n={})=>new Promise(r=>{n.outro?Yn(t,()=>{G(t),r(void 0)}):(G(t),r(void 0))})}function Qr(e){return N(ie,e)}function es(e,t){var n=h,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Ft(()=>{e(),!r.ran&&(r.ran=!0,Me(t))})}function ts(){var e=h;Ft(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&y)!==0&&n.deps!==null&&w(n,P),pe(n)&&fe(n),t.ran=!1}})}function Fn(e){return N(Ue|he,e)}function Ft(e,t=0){return N(ue|t,e)}function ns(e,t=[],n=[],r=[]){xt(r,t,n,s=>{N(ue,()=>e(...s.map(ee)))})}function rs(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=St();xt(r,t,n,f=>{N(ie,()=>e(...f.map(ee))),s&&s()})}function ss(e,t=0){var n=N(K|t,e);return n}function fs(e,t=0){var n=N(Be|t,e);return n}function is(e){return N(L|he,e)}function Lt(e){var t=e.teardown;if(t!==null){const n=se,r=v;ut(!0),$(null);try{t.call(null)}finally{ut(n),$(r)}}}function et(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Qe(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:G(n,t),n=r}}function Ln(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&G(t),t=n}}function G(e,t=!0){var n=!1;(t||(e.f&tn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(jn(e.nodes.start,e.nodes.end),n=!0),et(e,t&&!n),ge(e,0),w(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Lt(e);var s=e.parent;s!==null&&s.first!==null&&jt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function jn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function jt(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 Yn(e,t,n=!0){var r=[];Yt(e,r,!0);var s=()=>{n&&G(e),t&&t()},f=r.length;if(f>0){var o=()=>--f||s();for(var l of r)l.out(o)}else s()}function Yt(e,t,n){if((e.f&F)===0){e.f^=F;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var f=s.next,o=(s.f&Se)!==0||(s.f&L)!==0&&(e.f&K)!==0;Yt(s,t,o?n:!1),s=f}}}function as(e){qt(e,!0)}function qt(e,t){if((e.f&F)!==0){e.f^=F,(e.f&y)===0&&(w(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Se)!==0||(n.f&L)!==0;qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const o of f)(o.is_global||t)&&o.in()}}function ls(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 xe=!1,se=!1;function ut(e){se=e}let v=null,M=!1;function $(e){v=e}let d=null;function ve(e){d=e}let C=null;function Ht(e){v!==null&&(C===null?C=[e]:C.push(e))}let x=null,R=0,O=null;function qn(e){O=e}let Vt=1,Q=0,ne=Q;function ct(e){ne=e}function Bt(){return++Vt}function pe(e){var t=e.f;if((t&T)!==0)return!0;if(t&g&&(e.f&=~re),(t&P)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(pe(f)&&Rt(f),f.wv>e.wv)return!0}(t&k)!==0&&I===null&&w(e,y)}return!1}function Ut(e,t,n=!0){var r=e.reactions;if(r!==null&&!(C!==null&&oe.call(C,e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?Ut(f,t,!1):t===f&&(n?w(f,T):(f.f&y)!==0&&w(f,P),Y(f))}}function zt(e){var t=x,n=R,r=O,s=v,f=C,o=h,l=M,i=ne,a=e.f;x=null,R=0,O=null,v=(a&(L|X))===0?e:null,C=null,Re(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Qe(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Le;var u=e.fn,c=u();e.f|=de;var _=e.deps,m=b?.is_fork;if(x!==null){var p;if(m||ge(e,R),_!==null&&R>0)for(_.length=R+x.length,p=0;p<x.length;p++)_[R+p]=x[p];else e.deps=_=x;if(Mt()&&(e.f&k)!==0)for(p=R;p<_.length;p++)(_[p].reactions??=[]).push(e)}else!m&&_!==null&&R<_.length&&(ge(e,R),_.length=R);if(Te()&&O!==null&&!M&&_!==null&&(e.f&(g|P|T))===0)for(p=0;p<O.length;p++)Ut(O[p],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let D=0;D<n;D+=1)s.deps[D].rv=Q;if(t!==null)for(const D of t)D.rv=Q;O!==null&&(r===null?r=O:r.push(...O))}return(e.f&B)!==0&&(e.f^=B),c}catch(D){return bn(D)}finally{e.f^=Le,x=t,R=n,O=r,v=s,C=f,Re(o),M=l,ne=i}}function Hn(e,t){let n=t.reactions;if(n!==null){var r=Xt.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&g)!==0&&(x===null||!oe.call(x,t))){var f=t;(f.f&k)!==0&&(f.f^=k,f.f&=~re),Ke(f),Rn(f),ge(f,0)}}function ge(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hn(e,n[r])}function fe(e){var t=e.f;if((t&V)===0){w(e,y);var n=d,r=xe;d=e,xe=!0;try{(t&(K|Be))!==0?Ln(e):et(e),Lt(e);var s=zt(e);e.teardown=typeof s=="function"?s:null,e.wv=Vt;var f}finally{xe=r,d=n}}}async function os(){await Promise.resolve(),En()}function us(){return ae.ensure().settled()}function ee(e){var t=e.f,n=(t&g)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(C===null||!oe.call(C,e))){var s=v.deps;if((v.f&Le)!==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 f=e.reactions;f===null?e.reactions=[v]:oe.call(f,v)||f.push(v)}}}if(se&&U.has(e))return U.get(e);if(n){var o=e;if(se){var l=o.v;return((o.f&y)===0&&o.reactions!==null||$t(o))&&(l=Ze(o)),U.set(o,l),l}var i=(o.f&k)===0&&!M&&v!==null&&(xe||(v.f&k)!==0),a=(o.f&de)===0;pe(o)&&(i&&(o.f|=k),Rt(o)),i&&!a&&(Nt(o),Gt(o))}if(I?.has(e))return I.get(e);if((e.f&B)!==0)throw e.v;return e.v}function Gt(e){if(e.f|=k,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&k)===0&&(Nt(t),Gt(t))}function $t(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(U.has(t)||(t.f&g)!==0&&$t(t))return!0;return!1}function Me(e){var t=M;try{return M=!0,e()}finally{M=t}}function cs(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ve(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ve(n)}}}function Ve(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{Ve(e[r],t)}catch{}const n=_t(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Zt(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function Vn(e,t,n){if(e==null)return t(void 0),ye;const r=Me(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const le=[];function _s(e,t=ye){let n=null;const r=new Set;function s(l){if(bt(e,l)&&(e=l,n)){const i=!le.length;for(const a of r)a[1](),le.push(a,e);if(i){for(let a=0;a<le.length;a+=2)le[a][0](le[a+1]);le.length=0}}}function f(l){s(l(e))}function o(l,i=ye){const a=[l,i];return r.add(a),r.size===1&&(n=t(s,f)||ye),l(e),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:s,update:f,subscribe:o}}function vs(e){let t;return Vn(e,n=>t=n)(),t}function Bn(e){h===null&&ze(),me&&h.l!==null?Un(h).m.push(e):Pn(()=>{const t=Me(e);if(typeof t=="function")return t})}function ds(e){h===null&&ze(),Bn(()=>()=>Me(e))}function Un(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{Xr as $,Zn as A,is as B,ht as C,nr as D,Se as E,zr as F,An as G,cn as H,Kt as I,zn as J,ir as K,ur as L,We as M,ar as N,as as O,Yn as P,F as Q,L as R,Cn as S,G as T,je as U,Z as V,lr as W,or as X,q as Y,tn as Z,he as _,ts as a,T as a$,os as a0,Me as a1,Ft as a2,ft as a3,Br as a4,Ur as a5,h as a6,Zr as a7,Pn as a8,Kn as a9,Yr as aA,ve as aB,Cr as aC,ls as aD,Qr as aE,En as aF,Bn as aG,ds as aH,fs as aI,mr as aJ,qr as aK,xt as aL,dn as aM,_t as aN,gr as aO,Zt as aP,er as aQ,$r as aR,E as aS,Dn as aT,Jn as aU,Mt as aV,Fe as aW,en as aX,wr as aY,ae as aZ,w as a_,Qt as aa,Xe as ab,kr as ac,rs as ad,Lr as ae,On as af,be as ag,ye as ah,Vn as ai,vs as aj,Mn as ak,Gn as al,we as am,sr as an,vr as ao,se as ap,d as aq,V as ar,dr as as,me as at,_r as au,cr as av,$n as aw,te as ax,Wn as ay,hr as az,Fr as b,Y as b0,P as b1,yn as b2,$ as b3,Re as b4,bn as b5,v as b6,Ne as b7,fr as b8,Tr as b9,Mr as bA,Wr as bB,us as bC,Qe as ba,Gr as bb,kn as bc,pr as bd,br as be,Ce as bf,Je as bg,de as bh,Hr as bi,Ge as bj,rr as bk,Jr as bl,$e as bm,_s as bn,Ir as bo,Dr as bp,lt as bq,Xn as br,Wt as bs,tr as bt,yr as bu,Kr as bv,jn as bw,Er as bx,Te as by,ne as bz,Vr as c,cs as d,ss as e,xr as f,ee as g,z as h,Or as i,Nr as j,ce as k,es as l,jr as m,Rr as n,Ar as o,Pr as p,S as q,Sr as r,H as s,ns as t,Oe as u,ke as v,_n as w,vn as x,He as y,b as z};
|
|
1
|
+
var Kt=Array.isArray,Xt=Array.prototype.indexOf,oe=Array.prototype.includes,zn=Array.from,Gn=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyDescriptors,Wt=Object.prototype,Jt=Array.prototype,_t=Object.getPrototypeOf,rt=Object.isExtensible;function $n(e){return typeof e=="function"}const ye=()=>{};function Kn(e){return e()}function Qt(e){for(var t=0;t<e.length;t++)e[t]()}function vt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Xn(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 g=2,ie=4,ue=8,Be=1<<24,K=16,L=32,X=64,en=128,k=512,y=1024,T=2048,P=4096,F=8192,V=16384,de=32768,Se=65536,st=1<<17,tn=1<<18,he=1<<19,dt=1<<20,Zn=1<<25,re=65536,Le=1<<21,Ue=1<<22,B=1<<23,te=Symbol("$state"),Wn=Symbol("legacy props"),Jn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},er=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),tr=1,Ce=3,ht=8;function ze(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function nn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function nr(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function rn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function an(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rr(){throw new Error("https://svelte.dev/e/hydration_failed")}function sr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function on(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ir=1,ar=2,lr=4,or=8,ur=16,cr=1,_r=2,vr=4,dr=8,hr=16,pr=1,br=2,cn="[",_n="[!",wr="[?",vn="]",Ge={},E=Symbol(),dn="http://www.w3.org/1999/xhtml",yr="http://www.w3.org/2000/svg",Er="http://www.w3.org/1998/Math/MathML",gr="@attach";function $e(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function mr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Tr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let z=!1;function Ar(e){z=e}let S;function ce(e){if(e===null)throw $e(),Ge;return S=e}function xr(){return ce(Z(S))}function Sr(e){if(z){if(Z(S)!==null)throw $e(),Ge;S=e}}function Rr(e=1){if(z){for(var t=e,n=S;t--;)n=Z(n);S=n}}function Nr(e=!0){for(var t=0,n=S;;){if(n.nodeType===ht){var r=n.data;if(r===vn){if(t===0)return n;t-=1}else(r===cn||r===_n||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Or(e){if(!e||e.nodeType!==ht)throw $e(),Ge;return e.data}function pt(e){return e===this.v}function bt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function wt(e){return!bt(e,this.v)}let me=!1;function kr(){me=!0}let h=null;function Re(e){h=e}function Cr(e){return De().get(e)}function Dr(e,t){return De().set(e,t),t}function Ir(e){return De().has(e)}function Mr(){return De()}function Pr(e,t=!1,n){h={p:h,i:!1,c:null,e:null,s:e,x:null,l:me&&!t?{s:null,u:null,$:[]}:null}}function Fr(e){var t=h,n=t.e;if(n!==null){t.e=null;for(var r of n)Pt(r)}return e!==void 0&&(t.x=e),t.i=!0,h=t.p,e??{}}function Te(){return!me||h!==null&&h.l===null}function De(e){return h===null&&ze(),h.c??=new Map(hn(h)||void 0)}function hn(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 yt(){var e=J;J=[],Qt(e)}function je(e){if(J.length===0&&!Ee){var t=J;queueMicrotask(()=>{t===J&&yt()})}J.push(e)}function pn(){for(;J.length>0;)yt()}function bn(e){var t=d;if(t===null)return v.f|=B,e;if((t.f&de)===0&&(t.f&ie)===0)throw e;Ne(e,t)}function Ne(e,t){for(;t!==null;){if((t.f&en)!==0){if((t.f&de)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const wn=-7169;function w(e,t){e.f=e.f&wn|t}function Ke(e){(e.f&k)!==0||e.deps===null?w(e,y):w(e,P)}function Et(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&re)===0||(t.f^=re,Et(t.deps))}function yn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&P)!==0&&n.add(e),Et(e.deps),w(e,y)}const Ae=new Set;let b=null,ft=null,I=null,A=[],Ie=null,Ee=!1,_e=null;class ae{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#f=0;#i=null;#a=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#f>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)w(r,T),Y(r);for(r of n.m)w(r,P),Y(r)}}process(t){A=[],this.apply();var n=_e=[],r=[];for(const s of t)this.#u(s,n,r);if(_e=null,this.#o()){this.#c(r),this.#c(n);for(const[s,f]of this.#e)At(s,f)}else{ft=this,b=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),it(r),it(n),this.#a.clear(),this.#n.clear(),ft=null,this.#i?.resolve()}I=null}#u(t,n,r){t.f^=y;for(var s=t.first;s!==null;){var f=s.f,o=(f&(L|X))!==0,l=o&&(f&y)!==0,i=l||(f&F)!==0||this.#e.has(s);if(!i&&s.fn!==null){o?s.f^=y:(f&ie)!==0?n.push(s):pe(s)&&((f&K)!==0&&this.#n.add(s),fe(s));var a=s.first;if(a!==null){s=a;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)yn(t[n],this.#a,this.#n)}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&B)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){b=this,this.apply()}deactivate(){b===this&&(b=null,I=null)}flush(){if(A.length>0)b=this,gt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#i?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(Ae.size>1){this.previous.clear();var t=b,n=I,r=!0;for(const f of Ae){if(f===this){r=!1;continue}const o=[];for(const[i,a]of this.current){if(f.current.has(i))if(r&&a!==f.current.get(i))f.current.set(i,a);else continue;o.push(i)}if(o.length===0)continue;const l=[...f.current.keys()].filter(i=>!this.current.has(i));if(l.length>0){var s=A;A=[];const i=new Set,a=new Map;for(const u of o)mt(u,l,i,a);if(A.length>0){b=f,f.apply();for(const u of A)f.#u(u,[],[]);f.deactivate()}A=s}}b=t,I=n}this.#e.clear(),Ae.delete(this)}increment(t){this.#r+=1,t&&(this.#f+=1)}decrement(t){this.#r-=1,t&&(this.#f-=1),!this.#l&&(this.#l=!0,je(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#a)this.#n.delete(t),w(t,T),Y(t);for(const t of this.#n)w(t,P),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#i??=vt()).promise}static ensure(){if(b===null){const t=b=new ae;Ae.add(b),Ee||je(()=>{b===t&&t.flush()})}return b}apply(){}}function En(e){var t=Ee;Ee=!0;try{for(var n;;){if(pn(),A.length===0&&(b?.flush(),A.length===0))return Ie=null,n;gt()}}finally{Ee=t}}function gt(){var e=null;try{for(var t=0;A.length>0;){var n=ae.ensure();if(t++>1e3){var r,s;gn()}n.process(A),U.clear()}}finally{A=[],Ie=null,_e=null}}function gn(){try{an()}catch(e){Ne(e,Ie)}}let j=null;function it(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|F))===0&&pe(r)&&(j=new Set,fe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jt(r),j?.size>0)){U.clear();for(const s of j){if((s.f&(V|F))!==0)continue;const f=[s];let o=s.parent;for(;o!==null;)j.has(o)&&(j.delete(o),f.push(o)),o=o.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(V|F))===0&&fe(i)}}j.clear()}}j=null}}function mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?mt(s,t,n,r):(f&(Ue|K))!==0&&(f&T)===0&&Tt(s,t,r)&&(w(s,T),Y(s))}}function Tt(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(oe.call(t,s))return!0;if((s.f&g)!==0&&Tt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=Ie=e,n=t.b;if(n?.is_pending&&(e.f&(ie|ue|Be))!==0&&(e.f&de)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(_e!==null&&t===d&&(e.f&ue)===0)return;if((r&(X|L))!==0){if((r&y)===0)return;t.f^=y}}A.push(t)}function At(e,t){if(!((e.f&L)!==0&&(e.f&y)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&P)!==0&&t.m.push(e),w(e,y);for(var n=e.first;n!==null;)At(n,t),n=n.next}}function xt(e,t,n,r){const s=Te()?Xe:An;var f=e.filter(c=>!c.settled);if(n.length===0&&f.length===0){r(t.map(s));return}var o=d,l=mn(),i=f.length===1?f[0].promise:f.length>1?Promise.all(f.map(c=>c.promise)):null;function a(c){l();try{r(c)}catch(_){(o.f&V)===0&&Ne(_,o)}Ye()}if(n.length===0){i.then(()=>a(t.map(s)));return}function u(){l(),Promise.all(n.map(c=>Tn(c))).then(c=>a([...t.map(s),...c])).catch(c=>Ne(c,o))}i?i.then(u):u()}function mn(){var e=d,t=v,n=h,r=b;return function(f=!0){ve(e),$(t),Re(n),f&&r?.activate()}}function Ye(e=!0){ve(null),$(null),Re(null),e&&b?.deactivate()}function St(){var e=d.b,t=b,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Xe(e){var t=g|T,n=v!==null&&(v.f&g)!==0?v:null;return d!==null&&(d.f|=he),{ctx:h,deps:null,effects:null,equals:pt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??d,ac:null}}function Tn(e,t,n){d===null&&nn();var s=void 0,f=We(E),o=!v,l=new Map;return Fn(()=>{var i=vt();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).finally(Ye)}catch(_){i.reject(_),Ye()}var a=b;if(o){var u=St();l.get(a)?.reject(W),l.delete(a),l.set(a,i)}const c=(_,m=void 0)=>{if(a.activate(),m)m!==W&&(f.f|=B,He(f,m));else{(f.f&B)!==0&&(f.f^=B),He(f,_);for(const[p,D]of l){if(l.delete(p),p===a)break;D.reject(W)}}u&&u()};i.promise.then(c,_=>c(null,_||"unknown"))}),Mn(()=>{for(const i of l.values())i.reject(W)}),new Promise(i=>{function a(u){function c(){u===s?i(f):a(s)}u.then(c,c)}a(s)})}function Lr(e){const t=Xe(e);return Ht(t),t}function An(e){const t=Xe(e);return t.equals=wt,t}function xn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)G(t[n])}}function Sn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function Ze(e){var t,n=d;ve(Sn(e));try{e.f&=~re,xn(e),t=zt(e)}finally{ve(n)}return t}function Rt(e){var t=Ze(e);if(!e.equals(t)&&(e.wv=Bt(),(!b?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){w(e,y);return}se||(I!==null?(Mt()||b?.is_fork)&&I.set(e,t):Ke(e))}function Rn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=ye,t.ac=null,ge(t,0),et(t))}function Nt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&fe(t)}let qe=new Set;const U=new Map;let Ot=!1;function We(e,t){var n={f:0,v:e,reactions:null,equals:pt,rv:0,wv:0};return n}function q(e,t){const n=We(e);return Ht(n),n}function jr(e,t=!1,n=!0){const r=We(e);return t||(r.equals=wt),me&&n&&h!==null&&h.l!==null&&(h.l.s??=[]).push(r),r}function H(e,t,n=!1){v!==null&&(!M||(v.f&st)!==0)&&Te()&&(v.f&(g|K|Ue|st))!==0&&(C===null||!oe.call(C,e))&&un();let r=n?be(t):t;return He(e,r)}function He(e,t){if(!e.equals(t)){var n=e.v;se?U.set(e,t):U.set(e,n),e.v=t;var r=ae.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&T)!==0&&Ze(s),Ke(s)}e.wv=Bt(),kt(e,T),Te()&&d!==null&&(d.f&y)!==0&&(d.f&(L|X))===0&&(O===null?qn([e]):O.push(e)),!r.is_fork&&qe.size>0&&!Ot&&Nn()}return t}function Nn(){Ot=!1;for(const e of qe)(e.f&y)!==0&&w(e,P),pe(e)&&fe(e);qe.clear()}function Yr(e,t=1){var n=ee(e),r=t===1?n++:n--;return H(e,n),r}function Fe(e){H(e,e.v+1)}function kt(e,t){var n=e.reactions;if(n!==null)for(var r=Te(),s=n.length,f=0;f<s;f++){var o=n[f],l=o.f;if(!(!r&&o===d)){var i=(l&T)===0;if(i&&w(o,t),(l&g)!==0){var a=o;I?.delete(a),(l&re)===0&&(l&k&&(o.f|=re),kt(a,P))}else i&&((l&K)!==0&&j!==null&&j.add(o),Y(o))}}}function be(e){if(typeof e!="object"||e===null||te in e)return e;const t=_t(e);if(t!==Wt&&t!==Jt)return e;var n=new Map,r=Kt(e),s=q(0),f=ne,o=l=>{if(ne===f)return l();var i=v,a=ne;$(null),ct(f);var u=l();return $(i),ct(a),u};return r&&n.set("length",q(e.length)),new Proxy(e,{defineProperty(l,i,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&ln();var u=n.get(i);return u===void 0?o(()=>{var c=q(a.value);return n.set(i,c),c}):H(u,a.value,!0),!0},deleteProperty(l,i){var a=n.get(i);if(a===void 0){if(i in l){const u=o(()=>q(E));n.set(i,u),Fe(s)}}else H(a,E),Fe(s);return!0},get(l,i,a){if(i===te)return e;var u=n.get(i),c=i in l;if(u===void 0&&(!c||we(l,i)?.writable)&&(u=o(()=>{var m=be(c?l[i]:E),p=q(m);return p}),n.set(i,u)),u!==void 0){var _=ee(u);return _===E?void 0:_}return Reflect.get(l,i,a)},getOwnPropertyDescriptor(l,i){var a=Reflect.getOwnPropertyDescriptor(l,i);if(a&&"value"in a){var u=n.get(i);u&&(a.value=ee(u))}else if(a===void 0){var c=n.get(i),_=c?.v;if(c!==void 0&&_!==E)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return a},has(l,i){if(i===te)return!0;var a=n.get(i),u=a!==void 0&&a.v!==E||Reflect.has(l,i);if(a!==void 0||d!==null&&(!u||we(l,i)?.writable)){a===void 0&&(a=o(()=>{var _=u?be(l[i]):E,m=q(_);return m}),n.set(i,a));var c=ee(a);if(c===E)return!1}return u},set(l,i,a,u){var c=n.get(i),_=i in l;if(r&&i==="length")for(var m=a;m<c.v;m+=1){var p=n.get(m+"");p!==void 0?H(p,E):m in l&&(p=o(()=>q(E)),n.set(m+"",p))}if(c===void 0)(!_||we(l,i)?.writable)&&(c=o(()=>q(void 0)),H(c,be(a)),n.set(i,c));else{_=c.v!==E;var D=o(()=>be(a));H(c,D)}var tt=Reflect.getOwnPropertyDescriptor(l,i);if(tt?.set&&tt.set.call(u,a),!_){if(r&&typeof i=="string"){var nt=n.get("length"),Pe=Number(i);Number.isInteger(Pe)&&Pe>=nt.v&&H(nt,Pe+1)}Fe(s)}return!0},ownKeys(l){ee(s);var i=Reflect.ownKeys(l).filter(c=>{var _=n.get(c);return _===void 0||_.v!==E});for(var[a,u]of n)u.v!==E&&!(a in l)&&i.push(a);return i},setPrototypeOf(){on()}})}function at(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function qr(e,t){return Object.is(at(e),at(t))}var lt,On,kn,Ct,Dt;function Hr(){if(lt===void 0){lt=window,On=document,kn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ct=we(t,"firstChild").get,Dt=we(t,"nextSibling").get,rt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rt(n)&&(n.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function ke(e){return Ct.call(e)}function Z(e){return Dt.call(e)}function Vr(e,t){if(!z)return ke(e);var n=ke(S);if(n===null)n=S.appendChild(Oe());else if(t&&n.nodeType!==Ce){var r=Oe();return n?.before(r),ce(r),r}return t&&Je(n),ce(n),n}function Br(e,t=!1){if(!z){var n=ke(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==Ce){var r=Oe();return S?.before(r),ce(r),r}Je(S)}return S}function Ur(e,t=1,n=!1){let r=z?S:e;for(var s;t--;)s=r,r=Z(r);if(!z)return r;if(n){if(r?.nodeType!==Ce){var f=Oe();return r===null?s?.after(f):r.before(f),ce(f),f}Je(r)}return ce(r),r}function Cn(e){e.textContent=""}function zr(){return!1}function Gr(e,t,n){return document.createElementNS(t??dn,e,void 0)}function Je(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ce;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,je(()=>{document.activeElement===n&&e.focus()})}}function Kr(e){z&&ke(e)!==null&&Cn(e)}let ot=!1;function Dn(){ot||(ot=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Qe(e){var t=v,n=d;$(null),ve(null);try{return e()}finally{$(t),ve(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Dn()}function It(e){d===null&&(v===null&&fn(),sn()),se&&rn()}function In(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&F)!==0&&(e|=F);var r={ctx:h,deps:null,nodes:null,f:e|T|k,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&ie)!==0)_e!==null?_e.push(r):Y(r);else if(t!==null){try{fe(r)}catch(o){throw G(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&he)===0&&(s=s.first,(e&K)!==0&&(e&Se)!==0&&s!==null&&(s.f|=Se))}if(s!==null&&(s.parent=n,n!==null&&In(s,n),v!==null&&(v.f&g)!==0&&(e&X)===0)){var f=v;(f.effects??=[]).push(s)}return r}function Mt(){return v!==null&&!M}function Mn(e){const t=N(ue,null);return w(t,y),t.teardown=e,t}function Pn(e){It();var t=d.f,n=!v&&(t&L)!==0&&(t&de)===0;if(n){var r=h;(r.e??=[]).push(e)}else return Pt(e)}function Pt(e){return N(ie|dt,e)}function Zr(e){return It(),N(ue|dt,e)}function Wr(e){ae.ensure();const t=N(X|he,e);return()=>{G(t)}}function Jr(e){ae.ensure();const t=N(X|he,e);return(n={})=>new Promise(r=>{n.outro?Yn(t,()=>{G(t),r(void 0)}):(G(t),r(void 0))})}function Qr(e){return N(ie,e)}function es(e,t){var n=h,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Ft(()=>{e(),!r.ran&&(r.ran=!0,Me(t))})}function ts(){var e=h;Ft(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&y)!==0&&n.deps!==null&&w(n,P),pe(n)&&fe(n),t.ran=!1}})}function Fn(e){return N(Ue|he,e)}function Ft(e,t=0){return N(ue|t,e)}function ns(e,t=[],n=[],r=[]){xt(r,t,n,s=>{N(ue,()=>e(...s.map(ee)))})}function rs(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=St();xt(r,t,n,f=>{N(ie,()=>e(...f.map(ee))),s&&s()})}function ss(e,t=0){var n=N(K|t,e);return n}function fs(e,t=0){var n=N(Be|t,e);return n}function is(e){return N(L|he,e)}function Lt(e){var t=e.teardown;if(t!==null){const n=se,r=v;ut(!0),$(null);try{t.call(null)}finally{ut(n),$(r)}}}function et(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Qe(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:G(n,t),n=r}}function Ln(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&G(t),t=n}}function G(e,t=!0){var n=!1;(t||(e.f&tn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(jn(e.nodes.start,e.nodes.end),n=!0),et(e,t&&!n),ge(e,0),w(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Lt(e);var s=e.parent;s!==null&&s.first!==null&&jt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function jn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function jt(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 Yn(e,t,n=!0){var r=[];Yt(e,r,!0);var s=()=>{n&&G(e),t&&t()},f=r.length;if(f>0){var o=()=>--f||s();for(var l of r)l.out(o)}else s()}function Yt(e,t,n){if((e.f&F)===0){e.f^=F;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var f=s.next,o=(s.f&Se)!==0||(s.f&L)!==0&&(e.f&K)!==0;Yt(s,t,o?n:!1),s=f}}}function as(e){qt(e,!0)}function qt(e,t){if((e.f&F)!==0){e.f^=F,(e.f&y)===0&&(w(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Se)!==0||(n.f&L)!==0;qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const o of f)(o.is_global||t)&&o.in()}}function ls(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 xe=!1,se=!1;function ut(e){se=e}let v=null,M=!1;function $(e){v=e}let d=null;function ve(e){d=e}let C=null;function Ht(e){v!==null&&(C===null?C=[e]:C.push(e))}let x=null,R=0,O=null;function qn(e){O=e}let Vt=1,Q=0,ne=Q;function ct(e){ne=e}function Bt(){return++Vt}function pe(e){var t=e.f;if((t&T)!==0)return!0;if(t&g&&(e.f&=~re),(t&P)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(pe(f)&&Rt(f),f.wv>e.wv)return!0}(t&k)!==0&&I===null&&w(e,y)}return!1}function Ut(e,t,n=!0){var r=e.reactions;if(r!==null&&!(C!==null&&oe.call(C,e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?Ut(f,t,!1):t===f&&(n?w(f,T):(f.f&y)!==0&&w(f,P),Y(f))}}function zt(e){var t=x,n=R,r=O,s=v,f=C,o=h,l=M,i=ne,a=e.f;x=null,R=0,O=null,v=(a&(L|X))===0?e:null,C=null,Re(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Qe(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Le;var u=e.fn,c=u();e.f|=de;var _=e.deps,m=b?.is_fork;if(x!==null){var p;if(m||ge(e,R),_!==null&&R>0)for(_.length=R+x.length,p=0;p<x.length;p++)_[R+p]=x[p];else e.deps=_=x;if(Mt()&&(e.f&k)!==0)for(p=R;p<_.length;p++)(_[p].reactions??=[]).push(e)}else!m&&_!==null&&R<_.length&&(ge(e,R),_.length=R);if(Te()&&O!==null&&!M&&_!==null&&(e.f&(g|P|T))===0)for(p=0;p<O.length;p++)Ut(O[p],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let D=0;D<n;D+=1)s.deps[D].rv=Q;if(t!==null)for(const D of t)D.rv=Q;O!==null&&(r===null?r=O:r.push(...O))}return(e.f&B)!==0&&(e.f^=B),c}catch(D){return bn(D)}finally{e.f^=Le,x=t,R=n,O=r,v=s,C=f,Re(o),M=l,ne=i}}function Hn(e,t){let n=t.reactions;if(n!==null){var r=Xt.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&g)!==0&&(x===null||!oe.call(x,t))){var f=t;(f.f&k)!==0&&(f.f^=k,f.f&=~re),Ke(f),Rn(f),ge(f,0)}}function ge(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hn(e,n[r])}function fe(e){var t=e.f;if((t&V)===0){w(e,y);var n=d,r=xe;d=e,xe=!0;try{(t&(K|Be))!==0?Ln(e):et(e),Lt(e);var s=zt(e);e.teardown=typeof s=="function"?s:null,e.wv=Vt;var f}finally{xe=r,d=n}}}async function os(){await Promise.resolve(),En()}function us(){return ae.ensure().settled()}function ee(e){var t=e.f,n=(t&g)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(C===null||!oe.call(C,e))){var s=v.deps;if((v.f&Le)!==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 f=e.reactions;f===null?e.reactions=[v]:oe.call(f,v)||f.push(v)}}}if(se&&U.has(e))return U.get(e);if(n){var o=e;if(se){var l=o.v;return((o.f&y)===0&&o.reactions!==null||$t(o))&&(l=Ze(o)),U.set(o,l),l}var i=(o.f&k)===0&&!M&&v!==null&&(xe||(v.f&k)!==0),a=(o.f&de)===0;pe(o)&&(i&&(o.f|=k),Rt(o)),i&&!a&&(Nt(o),Gt(o))}if(I?.has(e))return I.get(e);if((e.f&B)!==0)throw e.v;return e.v}function Gt(e){if(e.f|=k,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&k)===0&&(Nt(t),Gt(t))}function $t(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(U.has(t)||(t.f&g)!==0&&$t(t))return!0;return!1}function Me(e){var t=M;try{return M=!0,e()}finally{M=t}}function cs(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ve(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ve(n)}}}function Ve(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{Ve(e[r],t)}catch{}const n=_t(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Zt(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function Vn(e,t,n){if(e==null)return t(void 0),ye;const r=Me(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const le=[];function _s(e,t=ye){let n=null;const r=new Set;function s(l){if(bt(e,l)&&(e=l,n)){const i=!le.length;for(const a of r)a[1](),le.push(a,e);if(i){for(let a=0;a<le.length;a+=2)le[a][0](le[a+1]);le.length=0}}}function f(l){s(l(e))}function o(l,i=ye){const a=[l,i];return r.add(a),r.size===1&&(n=t(s,f)||ye),l(e),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:s,update:f,subscribe:o}}function vs(e){let t;return Vn(e,n=>t=n)(),t}function Bn(e){h===null&&ze(),me&&h.l!==null?Un(h).m.push(e):Pn(()=>{const t=Me(e);if(typeof t=="function")return t})}function ds(e){h===null&&ze(),Bn(()=>()=>Me(e))}function Un(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{he as $,vn as A,He as B,ht as C,b as D,Se as E,Zn as F,is as G,cn as H,nr as I,zr as J,An as K,Kt as L,zn as M,ir as N,ur as O,We as P,ar as Q,as as R,Yn as S,F as T,je as U,L as V,or as W,Cn as X,G as Y,Z,tn as _,ts as a,ae as a$,Br as a0,Cr as a1,Pn as a2,Ur as a3,Lr as a4,h as a5,Zr as a6,Me as a7,Kn as a8,Qt as a9,Qr as aA,Ft as aB,En as aC,Bn as aD,os as aE,ds as aF,fs as aG,mr as aH,qr as aI,xt as aJ,dn as aK,_t as aL,gr as aM,Zt as aN,er as aO,$r as aP,E as aQ,Dn as aR,Jn as aS,Xr as aT,ft as aU,Dr as aV,Ir as aW,Mt as aX,Fe as aY,en as aZ,wr as a_,Xe as aa,kr as ab,rs as ac,On as ad,ye as ae,Vn as af,vs as ag,Mn as ah,Gn as ai,we as aj,sr as ak,vr as al,se as am,d as an,V as ao,dr as ap,me as aq,_r as ar,cr as as,$n as at,te as au,Wn as av,Yr as aw,ve as ax,hr as ay,ls as az,Fr as b,w as b0,T as b1,Y as b2,P as b3,yn as b4,$ as b5,Re as b6,bn as b7,v as b8,Ne as b9,Wr as bA,_s as bB,us as bC,fr as ba,Tr as bb,Qe as bc,Gr as bd,kn as be,pr as bf,br as bg,Ce as bh,Je as bi,de as bj,Hr as bk,Ge as bl,rr as bm,Jr as bn,$e as bo,tr as bp,yr as bq,Kr as br,Wt as bs,lt as bt,Xn as bu,jn as bv,Er as bw,Te as bx,ne as by,Mr as bz,Vr as c,cs as d,q as e,be as f,ee as g,ss as h,z as i,xr as j,Or as k,es as l,jr as m,Rr as n,Nr as o,Pr as p,ce as q,Sr as r,H as s,ns as t,Ar as u,S as v,Oe as w,lr as x,ke as y,_n as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as m,f as w,s as u,g as o,a4 as rt}from"./DSh-OF2y.js";import{a as d}from"./CFtRXHDP.js";function it(){return d("/api/workspace")}function at(e){return d("/api/workspace",{method:"PUT",body:JSON.stringify(e)})}function Ct(){return d("/api/workspace/mcp-config")}function J(){return d("/api/repos")}function st(e,i,s,f){return d("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,display_name:i||void 0,description:s,...f?{private:!0}:{}})})}function ct(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,display_name:s||void 0})})}function lt(e){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}function ut(){return d("/api/apps")}function dt(e){return d(`/api/repos/${encodeURIComponent(e)}/entities?summary=true`)}function wt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`)}function Et(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/entities`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,data:f,content:c})})}function St(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"DELETE"})}function bt(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"PUT",body:JSON.stringify(f)})}function It(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/change-type`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,newType:f})})}function $t(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/transfer`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,targetRepo:f,mode:c})})}function Tt(){return d("/api/insights")}function kt(){return d("/api/insights/generate",{method:"POST"})}function vt(){return d("/api/preferences")}function Pt(e){return d("/api/preferences",{method:"PUT",body:JSON.stringify(e)})}function Ut(){return d("/api/views")}function Rt(e,i){return d("/api/views",{method:"POST",body:JSON.stringify({name:e,config:i})})}function Lt(e,i){return d(`/api/views/${e}`,{method:"PUT",body:JSON.stringify(i)})}function At(e){return d(`/api/views/${e}`,{method:"DELETE"})}function Ot(e){return d(`/api/repos/${encodeURIComponent(e)}/commit`,{method:"POST"})}function pt(e){return e.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function M(e,i){return i||e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}const ft="#e05050";function D(e){if(typeof document>"u")return;const i=e||ft,s=parseInt(i.slice(1,3),16),f=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16),E=[document.documentElement,document.querySelector("[data-theme]")].filter(Boolean);for(const h of E)h.style.setProperty("--color-accent",i),h.style.setProperty("--color-accent-hover",mt(i,15)),h.style.setProperty("--color-accent-muted",`rgba(${s}, ${f}, ${c}, 0.08)`),h.style.setProperty("--color-link",j(i,15)),h.style.setProperty("--color-badge-bg",`rgba(${s}, ${f}, ${c}, 0.1)`),h.style.setProperty("--color-badge-text",j(i,20))}function mt(e,i){const s=Math.max(0,Math.round(parseInt(e.slice(1,3),16)*(1-i/100))),f=Math.max(0,Math.round(parseInt(e.slice(3,5),16)*(1-i/100))),c=Math.max(0,Math.round(parseInt(e.slice(5,7),16)*(1-i/100)));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function j(e,i){const s=Math.min(255,Math.round(parseInt(e.slice(1,3),16)+(255-parseInt(e.slice(1,3),16))*i/100)),f=Math.min(255,Math.round(parseInt(e.slice(3,5),16)+(255-parseInt(e.slice(3,5),16))*i/100)),c=Math.min(255,Math.round(parseInt(e.slice(5,7),16)+(255-parseInt(e.slice(5,7),16))*i/100));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function yt(){let e=m(""),i=m(null),s=m(null),f=m(!1),c=m(w([]));const E={};let h=m(w([])),v=m(!1),P=m(null),g=m(w({})),U=w({}),R=w({}),$=w({}),_=m(0),F=m(null),C=m(""),T=null,S=m(0),b=m(0),x=m("alpha");async function W(){u(v,!0),u(P,null),u(S,0),u(b,0);try{const[t,n,r]=await Promise.all([J(),ut().catch(()=>[]),it().catch(()=>({name:""}))]);u(h,n,!0),u(e,r.name,!0),u(i,r.about??null,!0),u(s,r.accent_color??null,!0),u(f,!0),D(o(s)),u(c,t.map(a=>({name:a.name,displayName:M(a.name,a.display_name),type:a.type,private:a.private,sync:a.sync,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(o(c).map(a=>I(a.name)))}catch(t){u(P,t.message,!0)}finally{u(v,!1)}}function V(t,n,r){const a=o(c).find(l=>l.name===t);a&&(a.entities=a.entities.filter(l=>!(l.id===r&&l.entityType===n)),a.count=a.entities.length)}async function Q(t){o(c).find(r=>r.name===t)&&await I(t,!0)}async function B(){u(S,0),u(b,0),await Promise.all(o(c).map(t=>I(t.name,!0)))}async function I(t,n=!1){const r=o(c).find(l=>l.name===t);if(!r||r.loading||!n&&r.loaded)return;const a=(E[t]??0)+1;E[t]=a,n||(r.loading=!0);try{const l=await dt(t);if(E[t]!==a)return;let y=0,L=0;for(const p of l)y+=p.document?.wikilinks?.length??0,L+=p.subContentCount??0;u(S,o(S)+y),u(b,o(b)+L);const A=new Set(["name","created_at","updated_at"]);r.entities=l.filter(p=>!p.id.toLowerCase().startsWith("readme")).map(p=>({id:p.id,title:p.data?.name??pt(p.id),entityType:p.entityType,repo:t,hasSubContent:!!p.hasSubContent,wikilinks:p.document?.wikilinks??[],createdAt:p.data?.created_at??null,updatedAt:p.data?.updated_at??null,fields:Object.fromEntries(Object.entries(p.data??{}).filter(([O])=>!A.has(O))),status:p.data?.status??void 0,priority:p.data?.priority??void 0,assignee:p.data?.assignee??void 0,dueDate:p.data?.due_date??void 0})).sort((p,O)=>p.title.localeCompare(O.title)),r.count=r.entities.length,r.loaded=!0}catch(l){console.error(`Failed to load entities for ${t}:`,l)}finally{r.loading=!1}}function K(t){o(g)[t]=!o(g)[t]}function q(t){return o(g)[t]??!1}function k(t,n,r){return`${t}/${n}/${r}`}function H(t,n,r){const a=k(t,n,r),l=U[a]??!1;U[a]=!l,!l&&!R[a]?.loaded&&z(t,n,r)}function N(t,n,r){return U[k(t,n,r)]??!1}function Y(t,n,r){return R[k(t,n,r)]??{entries:[],loading:!1,loaded:!1}}async function z(t,n,r){const a=k(t,n,r);R[a]={entries:[],loading:!1,loaded:!0}}function G(t){const n=o(C).trim().toLowerCase();if(!n)return t;const r=[];for(const a of t){const l=a.entities.filter(y=>y.title.toLowerCase().includes(n)||y.id.toLowerCase().includes(n));l.length>0&&r.push({...a,entities:l,count:l.length})}return r}function X(t){if(t&&!o(C)?T={...o(g)}:!t&&o(C)&&T&&(u(g,T,!0),T=null),u(C,t,!0),t){const n=t.trim().toLowerCase();for(const r of o(c)){const a=r.entities.some(l=>l.title.toLowerCase().includes(n)||l.id.toLowerCase().includes(n));o(g)[r.name]=a}}}function Z(t){const n=t.startsWith("type:");$[t]=!($[t]??n)}function tt(t){return $[t]??!1}function et(t){return $[t]===!1}const nt=rt(()=>o(c).reduce((t,n)=>t+(n.count??0),0));function ot(t){return o(h).find(n=>n.entityTypes.includes(t))}return{get name(){return o(e)},get about(){return o(i)},get accentColor(){return o(s)},get nameLoaded(){return o(f)},async updateWorkspace(t){t.accent_color!==void 0&&(u(s,t.accent_color,!0),D(t.accent_color)),await at(t),t.name?.trim()&&u(e,t.name.trim(),!0),typeof t.about=="string"&&u(i,t.about,!0)},get repos(){return o(c)},get apps(){return o(h)},get loading(){return o(v)},get error(){return o(P)},get totalEntities(){return o(nt)},get totalLinks(){return o(S)},get totalFiles(){return o(b)},get hasTasks(){return o(c).some(t=>t.entities.some(n=>n.entityType==="task"))},get sortedRepos(){const t=[...o(c)].sort((n,r)=>n.name.localeCompare(r.name));return G(t)},get filteredIds(){const t=o(C).trim().toLowerCase();if(!t)return null;const n=new Set;for(const r of o(c))for(const a of r.entities)(a.title.toLowerCase().includes(t)||a.id.toLowerCase().includes(t))&&n.add(a.id);return n},get filterQuery(){return o(C)},setFilterQuery:X,get sortMode(){return o(x)},set sortMode(t){u(x,t,!0)},get recentEntities(){const t=o(C).trim().toLowerCase();let n=[];for(const r of o(c))for(const a of r.entities)t&&!a.title.toLowerCase().includes(t)&&!a.id.toLowerCase().includes(t)||n.push(a);return n.sort((r,a)=>{const l=r.updatedAt??"";return(a.updatedAt??"").localeCompare(l)})},get sidebarScrollTop(){return o(_)},set sidebarScrollTop(t){u(_,t,!0)},get lastAutoExpandedFor(){return o(F)},set lastAutoExpandedFor(t){u(F,t,!0)},load:W,loadEntities:I,removeEntity:V,refreshEntities:Q,refreshAll:B,toggleRepo:K,isExpanded:q,toggleEntity:H,isEntityExpanded:N,getEntityContents:Y,toggleFolder:Z,isFolderExpanded:tt,isFolderCollapsed:et,getAppForEntityType:ot,async renameCollectionTo(t,n,r){await ct(t,n,r);const a=o(c).find(l=>l.name===t);a&&(a.name=n,a.displayName=r||M(n),o(g)[t]&&(o(g)[n]=!0,delete o(g)[t]))},async removeCollection(t){await lt(t),u(c,o(c).filter(n=>n.name!==t),!0),delete o(g)[t]},async addCollection(t,n,r,a){await st(t,n,r,a);const l=await J();u(c,l.map(y=>o(c).find(A=>A.name===y.name)??{name:y.name,displayName:M(y.name,y.display_name),type:y.type,private:y.private,count:null,entities:[],loading:!1,loaded:!1}),!0),o(g)[t]=!0,await I(t)}}}const Mt=yt();export{Ot as a,Tt as b,Rt as c,At as d,vt as e,Ut as f,kt as g,wt as h,bt as i,Ct as j,It as k,St as l,Et as m,Pt as s,$t as t,Lt as u,Mt as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{R as k,Y as u,S as A,w as _,G as v,D as g,i as l,v as T,az as m,J as S,h as E,j as R,E as w,k as D,H as M,z as B,o as F,q as N,u as b,aA as Y,aB as x,a7 as H,U as I,au as O}from"./DSh-OF2y.js";class q{anchor;#e=new Map;#t=new Map;#s=new Map;#a=new Set;#i=!0;constructor(s,t=!0){this.anchor=s,this.#i=t}#r=s=>{if(this.#e.has(s)){var t=this.#e.get(s),a=this.#t.get(t);if(a)k(a),this.#a.delete(t);else{var i=this.#s.get(t);i&&(this.#t.set(t,i.effect),this.#s.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),a=i.effect)}for(const[e,f]of this.#e){if(this.#e.delete(e),e===s)break;const r=this.#s.get(f);r&&(u(r.effect),this.#s.delete(f))}for(const[e,f]of this.#t){if(e===t||this.#a.has(e))continue;const r=()=>{if(Array.from(this.#e.values()).includes(e)){var c=document.createDocumentFragment();m(f,c),c.append(_()),this.#s.set(e,{effect:f,fragment:c})}else u(f);this.#a.delete(e),this.#t.delete(e)};this.#i||!a?(this.#a.add(e),A(f,r,!1)):r()}}};#f=s=>{this.#e.delete(s);const t=Array.from(this.#e.values());for(const[a,i]of this.#s)t.includes(a)||(u(i.effect),this.#s.delete(a))};ensure(s,t){var a=g,i=S();if(t&&!this.#t.has(s)&&!this.#s.has(s))if(i){var e=document.createDocumentFragment(),f=_();e.append(f),this.#s.set(s,{effect:v(()=>t(f)),fragment:e})}else this.#t.set(s,v(()=>t(this.anchor)));if(this.#e.set(a,s),i){for(const[r,h]of this.#t)r===s?a.unskip_effect(h):a.skip_effect(h);for(const[r,h]of this.#s)r===s?a.unskip_effect(h.effect):a.skip_effect(h.effect);a.oncommit(this.#r),a.ondiscard(this.#f)}else l&&(this.anchor=T),this.#r(a)}}function C(n,s,t=!1){var a;l&&(a=T,R());var i=new q(n),e=t?w:0;function f(r,h){if(l){var c=D(a),o;if(c===M?o=0:c===B?o=!1:o=parseInt(c.substring(1)),r!==o){var d=F();N(d),i.anchor=d,b(!1),i.ensure(r,h),b(!0);return}}i.ensure(r,h)}E(()=>{var r=!1;s((h,c=0)=>{r=!0,f(c,h)}),r||f(!1,null)},e)}function p(n,s){return n===s||n?.[O]===s}function L(n={},s,t,a){return Y(()=>{var i,e;return x(()=>{i=e,e=[],H(()=>{n!==t(...e)&&(s(n,...e),i&&p(t(...i),n)&&s(null,...i))})}),()=>{I(()=>{e&&p(t(...e),n)&&s(null,...e)})}}),n}export{q as B,L as b,C as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as r,f as y,g as s,s as e}from"./DSh-OF2y.js";import{s as u,g as b,b as p,e as w}from"./DSkxw4Ss.js";function A(){let a=r(y([])),n=r(null),o=r(!1),l=r(!1),i=r(""),g=r(!1);async function f(){try{const[t,m]=await Promise.all([p(),w()]);e(a,t.insights??[],!0),e(n,t.generatedAt??null,!0),e(i,m.home_brief??"",!0),e(l,!0),e(g,!0)}catch(t){console.error("Failed to load insights:",t)}}async function c(){e(o,!0);try{const t=await b();e(a,t.insights??[],!0),e(n,t.generatedAt??null,!0),e(l,!0)}catch(t){console.error("Failed to generate insights:",t)}finally{e(o,!1)}}async function h(t){e(i,t,!0),await u({home_brief:t})}async function d(){await u({home_brief:""}),e(i,""),e(a,[],!0),e(n,null)}return{get insights(){return s(a)},get generatedAt(){return s(n)},get loading(){return s(o)},get loaded(){return s(l)},get homeBrief(){return s(i)},get briefLoaded(){return s(g)},load:f,generate:c,saveBrief:h,reset:d}}const P=A();export{P as insightsStore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,s as M,f as h}from"./b0XUoOIH.js";import{i as A}from"./vZ2iBqLE.js";import{p as B,l as v,s as u,d as n,g as s,a as C,c as p,n as N,r as m,b as P,m as g,t as R}from"./DSh-OF2y.js";import{i as Y}from"./DT3KtxWU.js";import{a as k}from"./CRnhIQbv.js";import{l as _,p as b}from"./D-yNNNdf.js";var D=h("<title> </title>"),U=h('<svg><!><path d="M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"></path></svg>');function K(w,t){const e=_(t,["children","$$slots","$$events","$$legacy"]),x=_(e,["size","title"]);B(t,!1);const a=g(),d=g();let f=b(t,"size",8,16),r=b(t,"title",8,void 0);v(()=>(n(e),n(r())),()=>{u(a,e["aria-label"]||e["aria-labelledby"]||r())}),v(()=>(s(a),n(e)),()=>{u(d,{"aria-hidden":s(a)?void 0:!0,role:s(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),C(),A();var i=U();k(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...s(d),...x}));var z=p(i);{var $=l=>{var o=D(),y=p(o,!0);m(o),R(()=>M(y,r())),c(l,o)};Y(z,l=>{r()&&l($)})}N(),m(i),c(w,i),P()}var j=h("<title> </title>"),q=h('<svg><!><path d="M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"></path></svg>');function L(w,t){const e=_(t,["children","$$slots","$$events","$$legacy"]),x=_(e,["size","title"]);B(t,!1);const a=g(),d=g();let f=b(t,"size",8,16),r=b(t,"title",8,void 0);v(()=>(n(e),n(r())),()=>{u(a,e["aria-label"]||e["aria-labelledby"]||r())}),v(()=>(s(a),n(e)),()=>{u(d,{"aria-hidden":s(a)?void 0:!0,role:s(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),C(),A();var i=q();k(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...s(d),...x}));var z=p(i);{var $=l=>{var o=j(),y=p(o,!0);m(o),R(()=>M(y,r())),c(l,o)};Y(z,l=>{r()&&l($)})}N(),m(i),c(w,i),P()}export{K as A,L as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,a,f as l}from"./b0XUoOIH.js";import{a0 as w}from"./DSh-OF2y.js";import{i as n}from"./DT3KtxWU.js";import{p as d}from"./D-yNNNdf.js";import{L as b,T as k}from"./BUcIsKRk.js";import{t as y}from"./Bs4ovbtO.js";import{u as S}from"./Bs4ovbtO.js";var u=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),x=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),_=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),z=l('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function H(s,v){const t=d(v,"type",3,"success");var e=m(),c=w(e);{var i=o=>{var r=u();a(o,r)},p=o=>{var r=x();a(o,r)},h=o=>{var r=_();a(o,r)},g=o=>{var r=z();a(o,r)},f=o=>{};n(c,o=>{t()==="success"?o(i):t()==="error"?o(p,1):t()==="info"?o(h,2):t()==="warning"?o(g,3):o(f,!1)})}a(s,e)}export{H as Icon,b as Loader,k as Toaster,y as toast,S as useSonner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as A}from"./BAAbylyg.js";import{a as f,s as M,f as x}from"./b0XUoOIH.js";import{i as k}from"./vZ2iBqLE.js";import{p as B,l as u,s as b,d as p,g as o,a as C,c as g,n as N,r as m,b as P,m as _,t as R}from"./DSh-OF2y.js";import{i as S}from"./DT3KtxWU.js";import{a as Y}from"./CRnhIQbv.js";import{l as v,p as h}from"./D-yNNNdf.js";const j=()=>{const e=A;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},L={subscribe(e){return j().page.subscribe(e)}};var q=x("<title> </title>"),D=x('<svg><!><path d="M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"></path></svg>');function O(e,s){const t=v(s,["children","$$slots","$$events","$$legacy"]),w=v(t,["size","title"]);B(s,!1);const a=_(),c=_();let d=h(s,"size",8,16),r=h(s,"title",8,void 0);u(()=>(p(t),p(r())),()=>{b(a,t["aria-label"]||t["aria-labelledby"]||r())}),u(()=>(o(a),p(t)),()=>{b(c,{"aria-hidden":o(a)?void 0:!0,role:o(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),C(),k();var i=D();Y(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...o(c),...w}));var y=g(i);{var z=n=>{var l=q(),$=g(l,!0);m(l),R(()=>M($,r())),f(n,l)};S(y,n=>{r()&&n(z)})}N(),m(i),f(e,i),P()}export{O as A,L as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as p,a as l,p as _e,b as H,s as pe,f as se}from"./b0XUoOIH.js";import{p as h,a0 as v,ae as le,b,g as f,a3 as G,c as w,r as A,a4 as J,t as N,l as te,s as re,d as Y,a as me,n as he,m as oe}from"./DSh-OF2y.js";import{s as m,a as ie}from"./CRnhIQbv.js";import{c as V}from"./DCVmM0L5.js";import{p as s,s as E,r as L,l as ae}from"./D-yNNNdf.js";import{D as be,h as ye,i as Ce,j as De}from"./BHue2Ock.js";import{n as x,b as K,c as Pe,H as Se,I as Oe,J as Fe,T as xe,K as ne,m as q,p as we}from"./DQYNi3YK.js";import{c as R}from"./DQ5NTKSo.js";import{i as B}from"./DT3KtxWU.js";import{c as Q,s as U}from"./CFtRXHDP.js";import{i as Ae}from"./vZ2iBqLE.js";function He(a,e){h(e,!0);let t=s(e,"open",15,!1),n=s(e,"onOpenChange",3,x),r=s(e,"onOpenChangeComplete",3,x);be.create({variant:K(()=>"dialog"),open:K(()=>t(),i=>{t(i),n()(i)}),onOpenChangeComplete:K(()=>r())});var c=p(),u=v(c);m(u,()=>e.children??le),l(a,c),b()}var ze=H("<!> <!>",1),Me=H("<!> <div><!></div>",1);function Ie(a,e){const t=_e();h(e,!0);let n=s(e,"id",19,()=>Pe(t)),r=s(e,"ref",15,null),c=s(e,"forceMount",3,!1),u=s(e,"onCloseAutoFocus",3,x),i=s(e,"onOpenAutoFocus",3,x),d=s(e,"onEscapeKeydown",3,x),y=s(e,"onInteractOutside",3,x),g=s(e,"trapFocus",3,!0),_=s(e,"preventScroll",3,!0),C=s(e,"restoreScrollDelay",3,null),D=L(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const o=ye.create({id:K(()=>n()),ref:K(()=>r(),S=>r(S))}),P=J(()=>q(D,o.props));var k=p(),X=v(k);{var T=S=>{Se(S,{get ref(){return o.opts.ref},loop:!0,get trapFocus(){return g()},get enabled(){return o.root.opts.open.current},get onOpenAutoFocus(){return i()},get onCloseAutoFocus(){return u()},focusScope:(ce,de)=>{let $=()=>de?.().props;Oe(ce,E(()=>f(P),{get enabled(){return o.root.opts.open.current},get ref(){return o.opts.ref},onEscapeKeydown:Z=>{d()(Z),!Z.defaultPrevented&&o.root.handleClose()},children:(Z,je)=>{Fe(Z,E(()=>f(P),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},onInteractOutside:j=>{y()(j),!j.defaultPrevented&&o.root.handleClose()},children:(j,Be)=>{xe(j,E(()=>f(P),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},children:(ue,Je)=>{var ee=p(),fe=v(ee);{var ve=F=>{var z=ze(),M=v(z);{var I=O=>{ne(O,{get preventScroll(){return _()},get restoreScrollDelay(){return C()}})};B(M,O=>{o.root.opts.open.current&&O(I)})}var W=G(M,2);{let O=J(()=>({props:q(f(P),$()),...o.snippetProps}));m(W,()=>e.child,()=>f(O))}l(F,z)},ge=F=>{var z=Me(),M=v(z);ne(M,{get preventScroll(){return _()}});var I=G(M,2);ie(I,O=>({...O}),[()=>q(f(P),$())]);var W=w(I);m(W,()=>e.children??le),A(I),l(F,z)};B(fe,F=>{e.child?F(ve):F(ge,!1)})}l(ue,ee)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};B(X,S=>{(o.shouldRender||c())&&S(T)})}l(a,k),b()}function tt(a,e){h(e,!0);let t=s(e,"open",15,!1),n=L(e,["$$slots","$$events","$$legacy","open","onOpenChange","children"]);var r=p(),c=v(r);V(c,()=>He,(u,i)=>{i(u,E({get onOpenChange(){return e.onOpenChange}},()=>n,{get open(){return t()},set open(d){t(d)},children:(d,y)=>{var g=p(),_=v(g);m(_,()=>e.children),l(d,g)},$$slots:{default:!0}}))}),l(a,r),b()}var Ve=H("<!> <!>",1);function rt(a,e){h(e,!0);let t=s(e,"size",3,"md"),n=L(e,["$$slots","$$events","$$legacy","children","class","size"]);var r=p(),c=v(r);V(c,()=>we,(u,i)=>{i(u,{children:(d,y)=>{var g=Ve(),_=v(g);V(_,()=>Ce,(D,o)=>{o(D,{class:"dialog-overlay"})});var C=G(_,2);{let D=J(()=>R("dialog-content",`dialog-${t()}`,e.class));V(C,()=>Ie,(o,P)=>{P(o,E({get class(){return f(D)}},()=>n,{children:(k,X)=>{var T=p(),S=v(T);m(S,()=>e.children),l(k,T)},$$slots:{default:!0}}))})}l(d,g)},$$slots:{default:!0}})}),l(a,r),b()}var Ee=H("<div><!></div>");function ot(a,e){h(e,!0);var t=Ee(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-header",e.class))]),l(a,t),b()}function at(a,e){h(e,!0);var t=p(),n=v(t);{let r=J(()=>R("dialog-title",e.class));V(n,()=>De,(c,u)=>{u(c,{get class(){return f(r)},children:(i,d)=>{var y=p(),g=v(y);m(g,()=>e.children),l(i,y)},$$slots:{default:!0}})})}l(a,t),b()}var Ke=H("<div><!></div>");function nt(a,e){h(e,!0);var t=Ke(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-body",e.class))]),l(a,t),b()}var Re=H("<div><!></div>");function st(a,e){h(e,!0);var t=Re(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-footer",e.class))]),l(a,t),b()}var ke=se("<title> </title>"),Te=se('<svg><!><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"></path></svg>');function lt(a,e){const t=ae(e,["children","$$slots","$$events","$$legacy"]),n=ae(t,["size","title"]);h(e,!1);const r=oe(),c=oe();let u=s(e,"size",8,16),i=s(e,"title",8,void 0);te(()=>(Y(t),Y(i())),()=>{re(r,t["aria-label"]||t["aria-labelledby"]||i())}),te(()=>(f(r),Y(t)),()=>{re(c,{"aria-hidden":f(r)?void 0:!0,role:f(r)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),me(),Ae();var d=Te();ie(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:u(),height:u(),...f(c),...n}));var y=w(d);{var g=_=>{var C=ke(),D=w(C,!0);A(C),N(()=>pe(D,i())),l(_,C)};B(y,_=>{i()&&_(g)})}he(2),A(d),l(a,d),b()}export{lt as C,rt as D,ot as a,at as b,nt as c,st as d,tt as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as n,
|
|
1
|
+
import{g as n,e as o,s as t}from"./DSh-OF2y.js";import{a as u}from"./CFtRXHDP.js";function f(){return u("/api/auth/status")}function p(){return u("/api/auth/me")}function g(e,a){return u("/api/auth/login",{method:"POST",body:JSON.stringify({email:e,password:a})})}function S(){return u("/api/auth/logout",{method:"POST"})}function b(e,a,r){return u("/api/auth/setup",{method:"POST",body:JSON.stringify({email:e,password:a,displayName:r})})}function w(){return u("/api/auth/users")}function O(e,a,r,i){return u("/api/auth/users",{method:"POST",body:JSON.stringify({email:e,password:a,displayName:r,role:i})})}function N(e){return u(`/api/auth/users/${e}`,{method:"DELETE"})}function P(e,a){return u(`/api/auth/users/${e}/password`,{method:"PATCH",body:JSON.stringify({password:a})})}let l=o(null),d=o(!1),c=o(!1),s=o(!0),h=o("");const m={get user(){return n(l)},get authEnabled(){return n(d)},get needsSetup(){return n(c)},get loading(){return n(s)},get workspaceName(){return n(h)},async checkAuth(){t(s,!0);try{const e=await f();if(t(d,e.authEnabled,!0),t(c,e.userCount===0),e.workspaceName&&t(h,e.workspaceName,!0),n(c))return t(s,!1),{authenticated:!1,authEnabled:!1,needsSetup:!0};if(!e.authEnabled)return t(s,!1),{authenticated:!0,authEnabled:!1,needsSetup:!1};try{const{user:a}=await p();return t(l,a,!0),t(s,!1),{authenticated:!0,authEnabled:!0,needsSetup:!1}}catch{return t(l,null),t(s,!1),{authenticated:!1,authEnabled:!0,needsSetup:!1}}}catch{return t(s,!1),{authenticated:!0,authEnabled:!1,needsSetup:!1}}},async login(e,a){const{user:r}=await g(e,a);return t(l,r,!0),t(d,!0),r},async setup(e,a,r){const{user:i}=await b(e,a,r);return t(l,i,!0),t(d,!0),t(c,!1),i},async logout(){await S(),t(l,null)}},T=Object.freeze(Object.defineProperty({__proto__:null,auth:m},Symbol.toStringTag,{value:"Module"}));export{m as a,T as b,O as c,N as d,w as l,P as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f,s as V,f as b}from"./b0XUoOIH.js";import{i as $}from"./vZ2iBqLE.js";import{p as y,l as p,s as v,d,g as r,a as L,c as h,n as C,r as u,b as A,m,t as B}from"./DSh-OF2y.js";import{i as E}from"./DT3KtxWU.js";import{a as N}from"./CRnhIQbv.js";import{l as g,p as _}from"./D-yNNNdf.js";var P=b("<title> </title>"),R=b('<svg><!><path d="M12 12H14V24H12z"></path><path d="M18 12H20V24H18z"></path><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"></path><path d="M12 2H20V4H12z"></path></svg>');function G(z,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),x=g(e,["size","title"]);y(t,!1);const a=m(),n=m();let c=_(t,"size",8,16),i=_(t,"title",8,void 0);p(()=>(d(e),d(i())),()=>{v(a,e["aria-label"]||e["aria-labelledby"]||i())}),p(()=>(r(a),d(e)),()=>{v(n,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),L(),$();var s=R();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...r(n),...x}));var M=h(s);{var w=l=>{var o=P(),H=h(o,!0);u(o),B(()=>V(H,i())),f(l,o)};E(M,l=>{i()&&l(w)})}C(4),u(s),f(z,s),A()}var T=b("<title> </title>"),Y=b('<svg><!><path d="M2 26H30V28H2z"></path><path d="M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6 l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z"></path></svg>');function I(z,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),x=g(e,["size","title"]);y(t,!1);const a=m(),n=m();let c=_(t,"size",8,16),i=_(t,"title",8,void 0);p(()=>(d(e),d(i())),()=>{v(a,e["aria-label"]||e["aria-labelledby"]||i())}),p(()=>(r(a),d(e)),()=>{v(n,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),L(),$();var s=Y();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...r(n),...x}));var M=h(s);{var w=l=>{var o=T(),H=h(o,!0);u(o),B(()=>V(H,i())),f(l,o)};E(M,l=>{i()&&l(w)})}C(2),u(s),f(z,s),A()}export{I as E,G as T};
|