studiograph 1.3.48-next.42 → 1.3.48-next.43
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/web/_app/immutable/chunks/BMK03Xoe.js +1 -0
- package/dist/web/_app/immutable/chunks/{BIlYguvq.js → BOa5iSBo.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CKldh8Tn.js → BRhMPTP9.js} +1 -1
- package/dist/web/_app/immutable/chunks/{1weX2xGq.js → BRnt8Lop.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DbsYPEGz.js → BWWg-nX8.js} +1 -1
- package/dist/web/_app/immutable/chunks/{By9rDOp_.js → BuJutz_3.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Dmd8KLpx.js → Bysr-I-i.js} +2 -2
- package/dist/web/_app/immutable/chunks/{Dk0i9UmR.js → C4o2cQ8V.js} +1 -1
- package/dist/web/_app/immutable/chunks/{D6wJv_RM.js → CsY9BjvE.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BuIgDCCg.js → D_IJHCMU.js} +1 -1
- package/dist/web/_app/immutable/chunks/{ScUs_u08.js → DaY9NWsg.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BEYLecml.js → DpQdzvMm.js} +1 -1
- package/dist/web/_app/immutable/chunks/{x2lqZe2V.js → FA6kc071.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Dv9o_3OO.js → LysT-6Mx.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BjjJ715M.js → RyvJIClq.js} +1 -1
- package/dist/web/_app/immutable/chunks/{hQysbljX.js → SSF58cUT.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.Cex3E9IV.js → app.B2FnrXVh.js} +2 -2
- package/dist/web/_app/immutable/entry/start.Cl6NcWm3.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.aklrwdnH.js → 0.T91QzfA2.js} +2 -2
- package/dist/web/_app/immutable/nodes/{1.Cw_iiZqP.js → 1.DAAXrX7Y.js} +1 -1
- package/dist/web/_app/immutable/nodes/{10.BOg6eWHc.js → 10.CAqPmx2-.js} +1 -1
- package/dist/web/_app/immutable/nodes/{11.BMHqqIon.js → 11.DlJbPi8N.js} +1 -1
- package/dist/web/_app/immutable/nodes/{12.Ndtr66Pf.js → 12.C0yed80F.js} +1 -1
- package/dist/web/_app/immutable/nodes/{2.DEjlqgpp.js → 2.SPoI-rLX.js} +18 -18
- package/dist/web/_app/immutable/nodes/{3.26Ek-lDD.js → 3.ByWt7UZ4.js} +3 -3
- package/dist/web/_app/immutable/nodes/{4.Do8ZEBFG.js → 4.Bq7Y332L.js} +3 -3
- package/dist/web/_app/immutable/nodes/{5.BKuHPgTm.js → 5.BfcJ0XSB.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.DnSZF-Yo.js → 6.CW49AeH-.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.DTRG-Wq6.js → 7.DQobLGuv.js} +1 -1
- package/dist/web/_app/immutable/nodes/{8.w8Cnn9fu.js → 8.DnS-iWkW.js} +1 -1
- package/dist/web/_app/immutable/nodes/{9.BblaW9Ua.js → 9.CqUlEh20.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/dist/web/_app/immutable/chunks/DD_IjhIj.js +0 -1
- package/dist/web/_app/immutable/entry/start.A48NPUjY.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./DsnmJJEf.js";import{i as w}from"./DpgUPK2a.js";import{p as x,l as f,s as u,d,g as l,a as L,c as g,n as z,r as v,b as E,m as _,t as N}from"./txOdadJq.js";import{a as b,s as R,f as T}from"./9gtwoV4P.js";import{l as h,p as C,i as $}from"./BCLL87Av.js";import{a as k}from"./ypcxmEdT.js";var Y=T("<title> </title>"),B=T('<svg><!><path d="M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"></path></svg>');function W(t,r){const a=h(r,["children","$$slots","$$events","$$legacy"]),A=h(a,["size","title"]);x(r,!1);const i=_(),p=_();let m=C(r,"size",8,16),s=C(r,"title",8,void 0);f(()=>(d(a),d(s())),()=>{u(i,a["aria-label"]||a["aria-labelledby"]||s())}),f(()=>(l(i),d(a)),()=>{u(p,{"aria-hidden":l(i)?void 0:!0,role:l(i)?"img":void 0,focusable:Number(a.tabindex)===0?!0:void 0})}),L(),w();var o=B();k(o,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:m(),height:m(),...l(p),...A}));var y=g(o);{var O=n=>{var c=Y(),P=g(c,!0);v(c),N(()=>R(P,s())),b(n,c)};$(y,n=>{s()&&n(O)})}z(),v(o),b(t,o),E()}const U=[{name:"Red",color:"#FE3C3C"},{name:"Rose",color:"#C06A6A"},{name:"Orange",color:"#CC7013"},{name:"Sand",color:"#AB8630"},{name:"Pistachio",color:"#5A9A08"},{name:"Mint",color:"#369770"},{name:"Teal",color:"#289795"},{name:"Sky",color:"#4289C4"},{name:"Slate",color:"#718599"},{name:"Violet",color:"#7C7CD9"},{name:"Lilac",color:"#B267F3"},{name:"Orchid",color:"#B269C0"},{name:"Pink",color:"#DC6CD4"}],e=Object.fromEntries(U.map(t=>[t.name,t.color])),M={project:e.Sky,organization:e.Slate,person:e.Rose,meeting:e.Teal,deal:e.Sand,deliverable:e.Orange,decision:e.Orchid,dataset:e.Slate,process:e.Lilac,deck:e.Teal,doc:e.Orchid,document:e.Pink,note:e.Sand,publication:e.Orange,reference:e.Mint,task:e.Lilac,role:e.Rose,"practice-area":e.Lilac,"case-study":e.Pistachio,guideline:e.Pistachio,skill:e.Pistachio},S="#5c5c66";function q(t){return t?M[t]??S:S}const j={person:"people","practice-area":"practice-areas","case-study":"case-studies",process:"processes"};function J(t){return j[t]??t+"s"}function Q(t){return t.replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const X=Object.keys(M);var D=T("<title> </title>"),F=T('<svg><!><path d="M24,6H8A2,2,0,0,0,6,8V24a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"></path></svg>');function ee(t,r){const a=h(r,["children","$$slots","$$events","$$legacy"]),A=h(a,["size","title"]);x(r,!1);const i=_(),p=_();let m=C(r,"size",8,16),s=C(r,"title",8,void 0);f(()=>(d(a),d(s())),()=>{u(i,a["aria-label"]||a["aria-labelledby"]||s())}),f(()=>(l(i),d(a)),()=>{u(p,{"aria-hidden":l(i)?void 0:!0,role:l(i)?"img":void 0,focusable:Number(a.tabindex)===0?!0:void 0})}),L(),w();var o=F();k(o,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:m(),height:m(),...l(p),...A}));var y=g(o);{var O=n=>{var c=D(),P=g(c,!0);v(c),N(()=>R(P,s())),b(n,c)};$(y,n=>{s()&&n(O)})}z(),v(o),b(t,o),E()}export{X as A,ee as S,W as a,U as b,q as e,Q as f,J as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as n,g as e,z as M,e as i}from"./txOdadJq.js";import{g as $}from"./
|
|
1
|
+
import{s as n,g as e,z as M,e as i}from"./txOdadJq.js";import{g as $}from"./DaY9NWsg.js";import{c as I}from"./CoIXzWkc.js";import{apiFetch as T}from"./DFYOFE3o.js";let o=i("idle"),g=i(!1),u=i(null),d=i(null),c=i(null),s=i(""),f=i(null),m=i(0),p=null;const q={get state(){return e(o)},get isElectron(){return e(g)},get activeEntityId(){return e(u)},get activeRepo(){return e(d)},get meetingTitle(){return e(s)},get platform(){return e(f)},get elapsedSeconds(){return e(m)},get recordingStartTime(){return e(c)},handleElectronReady(){n(g,!0),console.log("[Meeting] Electron detected")},async handleRecordingStarted(t){if(e(o)!=="idle")return;const r=t.repo||await R();if(!r){console.error("[Meeting] No collection configured for meetings");return}n(s,t.meetingTitle||"",!0),n(f,t.platform||null,!0),n(d,r,!0),n(c,new Date,!0),n(o,"recording"),n(m,0),p=setInterval(()=>{M(m)},1e3);const l=h(e(s)||"Meeting",e(c));try{await I(r,"meeting",l,{name:e(s)||`Meeting ${v(e(c))}`,date:e(c).toISOString().slice(0,10),attendees:(t.attendees||[]).filter(a=>!a.isSelf).map(a=>`[[${S(a.name)}]]`),tags:["auto-transcribed",t.platform].filter(Boolean)},""),n(u,l,!0),$(`/${r}/meeting/${l}`),window.postMessage({type:"sg:entity-created",repo:r,entityType:"meeting",entityId:l},"*"),console.log(`[Meeting] Created entity ${l}, navigating`)}catch(a){console.error("[Meeting] Failed to create entity:",a),n(o,"idle"),y()}},async handleRecordingStopped(t){if(e(o)!=="recording")return;n(o,"stopping"),y();const r=E();window.postMessage({type:"sg:stop-ack",entityId:e(u),repo:e(d),memo:r},"*"),n(o,"processing"),console.log(`[Meeting] Stop acknowledged, memo length: ${r.length}`)},startRecording(){e(g)&&window.postMessage({type:"sg:start-recording"},"*")},stopRecording(){!e(g)||e(o)!=="recording"||window.postMessage({type:"sg:stop-recording"},"*")},reset(){n(o,"idle"),n(u,null),n(d,null),n(c,null),n(s,""),n(f,null),n(m,0),y()}};function y(){p&&(clearInterval(p),p=null)}function S(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function h(t,r){const l=r.toISOString().slice(0,10),a=r.toTimeString().slice(0,5).replace(":",""),w=S(t);return`${l}-${w}-${a}`}function v(t){return t.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function E(){const t=document.querySelector(".cm-content");if(t)return t.textContent||"";const r=document.querySelector(".entity-editor textarea");return r?r.value:""}async function R(){try{const t=await T("/api/preferences/settings");if(t.default_meeting_collection)return t.default_meeting_collection}catch{}return null}export{q as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./DsnmJJEf.js";import{i as Ot}from"./DpgUPK2a.js";import{br as Te,j as Fe,k as De,o as Ve,p as A,l as gt,s as P,d as lt,g as o,a as Rt,c as T,n as Tt,r as F,b as M,m as vt,t as ct,u as y,i as Ft,P as He,e as z,f as w,I as j,bs as Ee,O as Ke,h as mt,V as Be}from"./txOdadJq.js";import{a as c,s as Ct,f as bt,p as st,c as k,b as H,m as ze,u as Le,o as Ue,t as qe}from"./9gtwoV4P.js";import{B as We,l as yt,p as d,i as D,r as J,s as Q}from"./BCLL87Av.js";import{a as L,s as x,f as Lt,b as Ut}from"./ypcxmEdT.js";import{C as xt,a as nt,O as dt,w as ot,S as Pt,E as wt,P as Kt,f as b,V as fe,c as Dt,h as qt,j as it,m as W,A as Ge,W as Ye,X as je,D as Vt,Y as Je,L as ut,K as ft,Z as At,_ as Wt,$ as Gt,a0 as Yt,a1 as jt,a2 as ge,a3 as ve,a4 as me,a5 as ye,d as Mt,o as Bt,a6 as be,M as Xe,N as Ze,a7 as Qe,a8 as $e,a9 as tr,aa as er,ab as rr,ac as or,ad as sr,ae as nr,af as ir,ag as ar,ah as lr,ai as dr,aj as hr,ak as ur,al as cr,am as pr,an as fr,ao as gr,ap as ue,J as _e,aq as vr,ar as Ce,n as q,k as Pe,l as we,as as mr,at as yr,t as br,v as _r,x as Cr,y as Pr,z as ce,au as wr,av as Nr,p as Ne,aw as kr,ax as Sr,F as ke,ay as Ir,az as Or,s as xr,r as Ar}from"./CUbaOWk8.js";import{c as rt}from"./DerefRkG.js";import{c as ht}from"./BI-a4gre.js";import{r as Jt}from"./1weX2xGq.js";import{e as Mr}from"./BEYLecml.js";import{w as Rr}from"./-wxjF91G.js";const Tr=Symbol("NaN");function Fr(a,t,e){De&&Ve();var r=new We(a),s=!Te();Fe(()=>{var n=t();n!==n&&(n=Tr),s&&n!==null&&typeof n=="object"&&(n={}),r.ensure(n,e)})}var Dr=bt("<title> </title>"),Vr=bt('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function fs(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=Vr();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=Dr(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}var Hr=bt("<title> </title>"),Er=bt('<svg><!><path d="M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20 V26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z"></path></svg>');function gs(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=Er();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=Hr(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}var Kr=bt("<title> </title>"),Br=bt('<svg><!><path d="M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"></path></svg>');function zr(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=Br();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=Kr(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}class Lr{#t=()=>{};#e=y(()=>this.#t());constructor(t,e){let r;e!==void 0&&(r=e),this.#t=()=>{try{return r}finally{r=t()}}}get current(){return o(this.#e)}}function Ur(a){Ft(()=>He(()=>a()))}const qr=qt({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),pt=new xt("Dialog.Root | AlertDialog.Root");class Xt{static create(t){const e=pt.getOr(null);return pt.set(new Xt(t,e))}opts;#t=z(null);get triggerNode(){return o(this.#t)}set triggerNode(t){P(this.#t,t,!0)}#e=z(null);get contentNode(){return o(this.#e)}set contentNode(t){P(this.#e,t,!0)}#r=z(null);get overlayNode(){return o(this.#r)}set overlayNode(t){P(this.#r,t,!0)}#o=z(null);get descriptionNode(){return o(this.#o)}set descriptionNode(t){P(this.#o,t,!0)}#s=z(void 0);get contentId(){return o(this.#s)}set contentId(t){P(this.#s,t,!0)}#n=z(void 0);get titleId(){return o(this.#n)}set titleId(t){P(this.#n,t,!0)}#i=z(void 0);get triggerId(){return o(this.#i)}set triggerId(t){P(this.#i,t,!0)}#a=z(void 0);get descriptionId(){return o(this.#a)}set descriptionId(t){P(this.#a,t,!0)}#l=z(null);get cancelNode(){return o(this.#l)}set cancelNode(t){P(this.#l,t,!0)}#d=z(0);get nestedOpenCount(){return o(this.#d)}set nestedOpenCount(t){P(this.#d,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Kt({ref:b(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Kt({ref:b(()=>this.overlayNode),open:this.opts.open,enabled:!0}),ot(()=>this.opts.open.current,r=>{this.parent&&(r?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),fe(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>qr.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#h=y(()=>({"data-state":Dt(this.opts.open.current)}));get sharedProps(){return o(this.#h)}set sharedProps(t){P(this.#h,t)}}class Zt{static create(t){return new Zt(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Pt||t.key===wt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class Se{static create(t){return new Se(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class Qt{static create(t){return new Qt(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=nt(this.opts.ref),ot.pre(()=>this.opts.id.current,r=>{this.root.titleId=r})}#t=y(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class Ie{static create(t){return new Ie(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=nt(this.opts.ref,r=>{this.root.descriptionNode=r}),ot.pre(()=>this.opts.id.current,r=>{this.root.descriptionId=r})}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class $t{static create(t){return new $t(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref,r=>{this.root.contentNode=r,this.root.contentId=r?.id})}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":dt(this.root.nestedOpenCount>0),"data-nested":dt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class te{static create(t){return new te(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref,r=>this.root.overlayNode=r)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":dt(this.root.nestedOpenCount>0),"data-nested":dt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class Oe{static create(t){return new Oe(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref,r=>this.root.cancelNode=r),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Pt||t.key===wt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}var Wr=H("<div><!></div>");function Gr(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"level",3,2),l=J(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const u=Qt.create({id:b(()=>r()),level:b(()=>n()),ref:b(()=>s(),i=>s(i))}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=i=>{var h=k(),v=w(h);x(v,()=>t.child,()=>({props:o(p)})),c(i,h)},f=i=>{var h=Wr();L(h,()=>({...o(p)}));var v=T(h);x(v,()=>t.children??j),F(h),c(i,h)};D(m,i=>{t.child?i(g):i(f,!1)})}c(a,_),M()}function Yr(a,t){var e=k(),r=w(e);Fr(r,()=>t.children,s=>{var n=k(),l=w(n);x(l,()=>t.children??j),c(s,n)}),c(a,e)}const jr=new xt("BitsConfig");function Jr(){const a=new Xr(null,{});return jr.getOr(a).opts}class Xr{opts;constructor(t,e){const r=Zr(t,e);this.opts={defaultPortalTo:r(s=>s.defaultPortalTo),defaultLocale:r(s=>s.defaultLocale)}}}function Zr(a,t){return e=>b(()=>{const s=e(t)?.current;if(s!==void 0)return s;if(a!==null)return e(a.opts)?.current})}function xe(a,t){return e=>{const r=Jr();return b(()=>{const s=e();if(s!==void 0)return s;const n=a(r).current;return n!==void 0?n:t})}}const vs=xe(a=>a.defaultLocale,"en"),Qr=xe(a=>a.defaultPortalTo,"body");function ee(a,t){A(t,!0);const e=Qr(()=>t.to),r=Ee();let s=y(n);function n(){if(!Ge||t.disabled)return null;let g=null;return typeof e.current=="string"?g=document.querySelector(e.current):g=e.current,g}let l;function u(){l&&(Le(l),l=null)}ot([()=>o(s),()=>t.disabled],([g,f])=>{if(!g||f){u();return}return l=ze(Yr,{target:g,props:{children:t.children},context:r}),()=>{u()}});var p=k(),_=w(p);{var m=g=>{var f=k(),i=w(f);x(i,()=>t.children??j),c(g,f)};D(_,g=>{t.disabled&&g(m)})}c(a,p),M()}var $r=H("<div><!></div>");function to(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"forceMount",3,!1),n=d(t,"ref",15,null),l=J(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const u=te.create({id:b(()=>r()),ref:b(()=>n(),f=>n(f))}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=f=>{var i=k(),h=w(i);{var v=C=>{var S=k(),O=w(S);{let I=y(()=>({props:W(o(p)),...u.snippetProps}));x(O,()=>t.child,()=>o(I))}c(C,S)},N=C=>{var S=$r();L(S,I=>({...I}),[()=>W(o(p))]);var O=T(S);x(O,()=>t.children??j,()=>u.snippetProps),F(S),c(C,S)};D(h,C=>{t.child?C(v):C(N,!1)})}c(f,i)};D(m,f=>{(u.shouldRender||s())&&f(g)})}c(a,_),M()}class eo{#t;#e=y(()=>this.#t.candidateValues());#r;constructor(t){this.#t=t,this.#r=Ye("",{afterMs:1e3,getWindow:this.#t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!this.#t.enabled()||!o(this.#e).length)return;this.#r.current=this.#r.current+t;const e=this.#t.getCurrentItem(),r=o(this.#e).find(u=>u===e)??"",s=o(this.#e).map(u=>u??""),n=je(s,this.#r.current,r),l=o(this.#e).find(u=>u===n);return l&&this.#t.onMatch(l),l}resetTypeahead(){this.#r.current=""}}const pe=[Xe,be,Ze,Qe,$e,tr,er,rr,wt,or,sr,nr,ir,ar,lr,dr,hr,ur,cr,pr,fr],ro=[ft,Wt,Gt],oo=[ut,Yt,jt],Ae=[...ro,...oo],so=qt({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),Nt=new xt("Select.Root | Combobox.Root"),no=new xt("Select.Content | Combobox.Content");class Me{opts;#t=z(!1);get touchedInput(){return o(this.#t)}set touchedInput(t){P(this.#t,t,!0)}#e=z(null);get inputNode(){return o(this.#e)}set inputNode(t){P(this.#e,t,!0)}#r=z(null);get contentNode(){return o(this.#r)}set contentNode(t){P(this.#r,t,!0)}contentPresence;#o=z(null);get viewportNode(){return o(this.#o)}set viewportNode(t){P(this.#o,t,!0)}#s=z(null);get triggerNode(){return o(this.#s)}set triggerNode(t){P(this.#s,t,!0)}#n=z("");get valueId(){return o(this.#n)}set valueId(t){P(this.#n,t,!0)}#i=z(null);get highlightedNode(){return o(this.#i)}set highlightedNode(t){P(this.#i,t,!0)}#a=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return o(this.#a)}set highlightedValue(t){P(this.#a,t)}#l=y(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return o(this.#l)}set highlightedId(t){P(this.#l,t)}#d=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return o(this.#d)}set highlightedLabel(t){P(this.#d,t)}#h=z(!1);get contentIsPositioned(){return o(this.#h)}set contentIsPositioned(t){P(this.#h,t,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new Vt(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new Kt({ref:b(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Ke(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&this.scrollHighlightedNodeIntoView(t)}scrollHighlightedNodeIntoView(t){!this.viewportNode||!this.contentIsPositioned||t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();e=e.filter(s=>{if(!this.viewportNode)return!1;const n=s.getBoundingClientRect();return n.right<=r.right&&n.left>=r.left&&n.bottom<=r.bottom&&n.top>=r.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(r=>r.dataset.value===t)??null}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=t=>so.getAttr(t,this.isCombobox?"combobox":void 0)}class io extends Me{opts;isMulti=!1;#t=y(()=>this.opts.value.current!=="");get hasValue(){return o(this.#t)}set hasValue(t){P(this.#t,t)}#e=y(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":"");get currentLabel(){return o(this.#e)}set currentLabel(t){P(this.#e,t)}#r=y(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return o(this.#r)}set candidateLabels(t){P(this.#r,t)}#o=y(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return o(this.#o)}set dataTypeaheadEnabled(t){P(this.#o,t)}constructor(t){super(t),this.opts=t,Ft(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ot(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current===t}toggleItem(t,e=t){const r=this.includesItem(t)?"":t;this.opts.value.current=r,r!==""&&(this.opts.inputValue.current=e)}setInitialHighlightedNode(){_e(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class ao extends Me{opts;isMulti=!0;#t=y(()=>this.opts.value.current.length>0);get hasValue(){return o(this.#t)}set hasValue(t){P(this.#t,t)}constructor(t){super(t),this.opts=t,Ft(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ot(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,e=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(r=>r!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=e}setInitialHighlightedNode(){_e(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class lo{static create(t){const{type:e,...r}=t,s=e==="single"?new io(r):new ao(r);return Nt.set(s)}}class Re{static create(t){return new Re(t,Nt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.inputNode=r),this.root.domContext=new Vt(t.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),ot([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([r,s],[n])=>{s&&(Array.isArray(r)&&Array.isArray(n)?r.length===0&&n.length!==0&&(this.root.opts.inputValue.current=""):r===""&&n!==""&&(this.root.opts.inputValue.current=""))})}onkeydown(t){if(this.root.isUsingKeyboard=!0,t.key!==be){if((t.key===ut||t.key===ft)&&t.preventDefault(),!this.root.opts.open.current){if(pe.includes(t.key)||t.key===At||t.key===gr&&this.root.opts.inputValue.current===""||(this.root.handleOpen(),this.root.hasValue))return;const e=this.root.getCandidateNodes();if(!e.length)return;if(t.key===ft){const r=e[0];this.root.setHighlightedNode(r)}else if(t.key===ut){const r=e[e.length-1];this.root.setHighlightedNode(r)}return}if(t.key===At){this.root.handleClose();return}if(t.key===wt&&!t.isComposing){t.preventDefault();const e=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e&&this.root.handleClose()}if(t.key===ut&&t.altKey&&this.root.handleClose(),Ae.includes(t.key)){t.preventDefault();const e=this.root.getCandidateNodes(),r=this.root.highlightedNode,s=r?e.indexOf(r):-1,n=this.root.opts.loop.current;let l;if(t.key===ft?l=ge(e,s,n):t.key===ut?l=ve(e,s,n):t.key===Yt?l=me(e,s,10,n):t.key===Wt?l=ye(e,s,10,n):t.key===Gt?l=e[0]:t.key===jt&&(l=e[e.length-1]),!l)return;this.root.setHighlightedNode(l);return}pe.includes(t.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(t){this.root.opts.inputValue.current=t.currentTarget.value,this.root.setHighlightedToFirstCandidate()}#t=y(()=>({id:this.opts.id.current,role:"combobox",disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":"list","aria-expanded":Mt(this.root.opts.open.current),"data-state":Dt(this.root.opts.open.current),"data-disabled":dt(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr("input")]:"",...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class re{static create(t){return new re(t,Nt.get())}opts;root;attachment;#t;#e;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.triggerNode=r),this.root.domContext=new Vt(t.ref),this.#t=new Je({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#e=new eo({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const s=this.root.opts.items.current.find(n=>n.label===r);s&&(this.root.opts.value.current=s.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#e.resetTypeahead(),this.#t.resetTypeahead()}#o(t){this.#r()}#s(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===ut||t.key===ft)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===wt||t.key===Pt||t.key===ft||t.key===ut)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#e.handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const l=this.root.getCandidateNodes();if(!l.length)return;if(t.key===ft){const u=l[0];this.root.setHighlightedNode(u)}else if(t.key===ut){const u=l[l.length-1];this.root.setHighlightedNode(u)}return}if(t.key===At){this.root.handleClose();return}if((t.key===wt||t.key===Pt&&this.#t.search==="")&&!t.isComposing&&(t.preventDefault(),this.#s()))return;if(t.key===ut&&t.altKey&&this.root.handleClose(),Ae.includes(t.key)){t.preventDefault();const l=this.root.getCandidateNodes(),u=this.root.highlightedNode,p=u?l.indexOf(u):-1,_=this.root.opts.loop.current;let m;if(t.key===ft?m=ge(l,p,_):t.key===ut?m=ve(l,p,_):t.key===Yt?m=me(l,p,10,_):t.key===Wt?m=ye(l,p,10,_):t.key===Gt?m=l[0]:t.key===jt&&(m=l[l.length-1]),!m)return;this.root.setHighlightedNode(m);return}const e=t.ctrlKey||t.altKey||t.metaKey,r=t.key.length===1,s=t.key===Pt,n=this.root.getCandidateNodes();if(t.key!==At){if(!e&&(r||s)){!this.#t.handleTypeaheadSearch(t.key,n)&&s&&(t.preventDefault(),this.#s());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e?.hasPointerCapture(t.pointerId)&&e?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#o(t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#o(t):this.root.handleClose()))}#n=y(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Mt(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Dt(this.root.opts.open.current),"data-disabled":dt(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return o(this.#n)}set props(t){P(this.#n,t)}}class oe{static create(t){return no.set(new oe(t,Nt.get()))}opts;root;attachment;#t=z(!1);get isPositioned(){return o(this.#t)}set isPositioned(t){P(this.#t,t,!0)}domContext;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.contentNode=r),this.domContext=new Vt(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),fe(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),ot(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),ot([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(t){this.root.isUsingKeyboard=!1}#e=y(()=>Bt(this.root.isCombobox?"combobox":"select"));onInteractOutside=t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#r)}set snippetProps(t){P(this.#r,t)}#o=y(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Dt(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...o(this.#e)},onpointermove:this.onpointermove,...this.attachment}));get props(){return o(this.#o)}set props(t){P(this.#o,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}}class se{static create(t){return new se(t,Nt.get())}opts;root;attachment;#t=y(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return o(this.#t)}set isSelected(t){P(this.#t,t)}#e=y(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return o(this.#e)}set isHighlighted(t){P(this.#e,t)}prevHighlighted=new Lr(()=>this.isHighlighted);#r=z(!1);get mounted(){return o(this.#r)}set mounted(t){P(this.#r,t,!0)}constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref),ot([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),ot(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}#o=y(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return o(this.#o)}set snippetProps(t){P(this.#o,t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!vr){Ue(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#s=y(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":dt(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return o(this.#s)}set props(t){P(this.#s,t)}}class ne{static create(t){return new ne(t,Nt.get())}opts;root;#t=y(()=>this.root.opts.name.current!=="");get shouldRender(){return o(this.#t)}set shouldRender(t){P(this.#t,t)}constructor(t,e){this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#e=y(()=>({disabled:ue(this.root.opts.disabled.current),required:ue(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}}function Et(a,t){A(t,!0);let e=d(t,"value",15);const r=ne.create({value:b(()=>e())});var s=k(),n=w(s);{var l=u=>{Ce(u,Q(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return e()},set value(p){e(p)}}))};D(n,u=>{r.shouldRender&&u(l)})}c(a,s),M()}var ho=H("<div><div><!></div></div>"),uo=H("<div><div><!></div></div>");function co(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"forceMount",3,!1),l=d(t,"side",3,"bottom"),u=d(t,"onInteractOutside",3,q),p=d(t,"onEscapeKeydown",3,q),_=d(t,"preventScroll",3,!1),m=J(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const g=oe.create({id:b(()=>r()),ref:b(()=>s(),C=>s(C)),onInteractOutside:b(()=>u()),onEscapeKeydown:b(()=>p())}),f=y(()=>W(m,g.props));var i=k(),h=w(i);{var v=C=>{Pe(C,Q(()=>o(f),()=>g.popperProps,{get ref(){return g.opts.ref},get side(){return l()},get enabled(){return g.root.opts.open.current},get id(){return r()},get preventScroll(){return _()},forceMount:!0,get shouldRender(){return g.shouldRender},popper:(O,I)=>{let V=()=>I?.().props,U=()=>I?.().wrapperProps;const R=y(()=>W(V(),{style:g.props.style},{style:t.style}));var G=k(),$=w(G);{var Z=K=>{var B=k(),Y=w(B);{let E=y(()=>({props:o(R),wrapperProps:U(),...g.snippetProps}));x(Y,()=>t.child,()=>o(E))}c(K,B)},at=K=>{var B=ho();L(B,()=>({...U()}));var Y=T(B);L(Y,()=>({...o(R)}));var E=T(Y);x(E,()=>t.children??j),F(Y),F(B),c(K,B)};D($,K=>{t.child?K(Z):K(at,!1)})}c(O,G)},$$slots:{popper:!0}}))},N=C=>{we(C,Q(()=>o(f),()=>g.popperProps,{get ref(){return g.opts.ref},get side(){return l()},get open(){return g.root.opts.open.current},get id(){return r()},get preventScroll(){return _()},forceMount:!1,get shouldRender(){return g.shouldRender},popper:(O,I)=>{let V=()=>I?.().props,U=()=>I?.().wrapperProps;const R=y(()=>W(V(),{style:g.props.style},{style:t.style}));var G=k(),$=w(G);{var Z=K=>{var B=k(),Y=w(B);{let E=y(()=>({props:o(R),wrapperProps:U(),...g.snippetProps}));x(Y,()=>t.child,()=>o(E))}c(K,B)},at=K=>{var B=uo();L(B,()=>({...U()}));var Y=T(B);L(Y,()=>({...o(R)}));var E=T(Y);x(E,()=>t.children??j),F(Y),F(B),c(K,B)};D($,K=>{t.child?K(Z):K(at,!1)})}c(O,G)},$$slots:{popper:!0}}))};D(h,C=>{n()?C(v):n()||C(N,1)})}c(a,i),M()}function po(a,t){A(t,!0);let e=d(t,"mounted",15,!1),r=d(t,"onMountedChange",3,q);Ur(()=>(e(!0),r()(!0),()=>{e(!1),r()(!1)})),M()}var fo=H("<div><!></div>"),go=H("<!> <!>",1);function vo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"label",19,()=>t.value),l=d(t,"disabled",3,!1),u=d(t,"onHighlight",3,q),p=d(t,"onUnhighlight",3,q),_=J(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const m=se.create({id:b(()=>r()),ref:b(()=>s(),C=>s(C)),value:b(()=>t.value),disabled:b(()=>l()),label:b(()=>n()),onHighlight:b(()=>u()),onUnhighlight:b(()=>p())}),g=y(()=>W(_,m.props));var f=go(),i=w(f);{var h=C=>{var S=k(),O=w(S);{let I=y(()=>({props:o(g),...m.snippetProps}));x(O,()=>t.child,()=>o(I))}c(C,S)},v=C=>{var S=fo();L(S,()=>({...o(g)}));var O=T(S);x(O,()=>t.children??j,()=>m.snippetProps),F(S),c(C,S)};D(i,C=>{t.child?C(h):C(v,!1)})}var N=mt(i,2);po(N,{get mounted(){return m.mounted},set mounted(C){m.mounted=C}}),c(a,f),M()}var mo=H("<div><!></div>");function yo(a,t){const e=st();A(t,!0);let r=d(t,"ref",15,null),s=d(t,"id",19,()=>it(e)),n=d(t,"disabled",3,!1),l=d(t,"onSelect",3,q),u=d(t,"closeOnSelect",3,!0),p=J(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const _=mr.create({id:b(()=>s()),disabled:b(()=>n()),onSelect:b(()=>l()),ref:b(()=>r(),v=>r(v)),closeOnSelect:b(()=>u())}),m=y(()=>W(p,_.props));var g=k(),f=w(g);{var i=v=>{var N=k(),C=w(N);x(C,()=>t.child,()=>({props:o(m)})),c(v,N)},h=v=>{var N=mo();L(N,()=>({...o(m)}));var C=T(N);x(C,()=>t.children??j),F(N),c(v,N)};D(f,v=>{t.child?v(i):v(h,!1)})}c(a,g),M()}var bo=H("<div><!></div>");function _o(a,t){const e=st();A(t,!0);let r=d(t,"ref",15,null),s=d(t,"id",19,()=>it(e)),n=J(t,["$$slots","$$events","$$legacy","ref","id","child","children"]);const l=yr.create({id:b(()=>s()),ref:b(()=>r(),f=>r(f))}),u=y(()=>W(n,l.props));var p=k(),_=w(p);{var m=f=>{var i=k(),h=w(i);x(h,()=>t.child,()=>({props:o(u)})),c(f,i)},g=f=>{var i=bo();L(i,()=>({...o(u)}));var h=T(i);x(h,()=>t.children??j),F(i),c(f,i)};D(_,f=>{t.child?f(m):f(g,!1)})}c(a,p),M()}function Co(a,t){A(t,!0);let e=d(t,"open",15,!1),r=d(t,"onOpenChange",3,q),s=d(t,"onOpenChangeComplete",3,q);Xt.create({variant:b(()=>"dialog"),open:b(()=>e(),u=>{e(u),r()(u)}),onOpenChangeComplete:b(()=>s())});var n=k(),l=w(n);x(l,()=>t.children??j),c(a,n),M()}var Po=H("<button><!></button>");function wo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"disabled",3,!1),l=J(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const u=Zt.create({variant:b(()=>"close"),id:b(()=>r()),ref:b(()=>s(),i=>s(i)),disabled:b(()=>!!n())}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=i=>{var h=k(),v=w(h);x(v,()=>t.child,()=>({props:o(p)})),c(i,h)},f=i=>{var h=Po();L(h,()=>({...o(p)}));var v=T(h);x(v,()=>t.children??j),F(h),c(i,h)};D(m,i=>{t.child?i(g):i(f,!1)})}c(a,_),M()}var No=H("<!> <!>",1),ko=H("<!> <div><!></div>",1);function So(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"forceMount",3,!1),l=d(t,"onCloseAutoFocus",3,q),u=d(t,"onOpenAutoFocus",3,q),p=d(t,"onEscapeKeydown",3,q),_=d(t,"onInteractOutside",3,q),m=d(t,"trapFocus",3,!0),g=d(t,"preventScroll",3,!0),f=d(t,"restoreScrollDelay",3,null),i=J(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const h=$t.create({id:b(()=>r()),ref:b(()=>s(),O=>s(O))}),v=y(()=>W(i,h.props));var N=k(),C=w(N);{var S=O=>{br(O,{get ref(){return h.opts.ref},loop:!0,get trapFocus(){return m()},get enabled(){return h.root.opts.open.current},get onOpenAutoFocus(){return u()},get onCloseAutoFocus(){return l()},focusScope:(V,U)=>{let R=()=>U?.().props;_r(V,Q(()=>o(v),{get enabled(){return h.root.opts.open.current},get ref(){return h.opts.ref},onEscapeKeydown:G=>{p()(G),!G.defaultPrevented&&h.root.handleClose()},children:(G,$)=>{Cr(G,Q(()=>o(v),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},onInteractOutside:Z=>{_()(Z),!Z.defaultPrevented&&h.root.handleClose()},children:(Z,at)=>{Pr(Z,Q(()=>o(v),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},children:(K,B)=>{var Y=k(),E=w(Y);{var X=tt=>{var kt=No(),St=w(kt);{var It=_t=>{ce(_t,{get preventScroll(){return g()},get restoreScrollDelay(){return f()}})};D(St,_t=>{h.root.opts.open.current&&_t(It)})}var Ht=mt(St,2);{let _t=y(()=>({props:W(o(v),R()),...h.snippetProps}));x(Ht,()=>t.child,()=>o(_t))}c(tt,kt)},et=tt=>{var kt=ko(),St=w(kt);ce(St,{get preventScroll(){return g()}});var It=mt(St,2);L(It,_t=>({..._t}),[()=>W(o(v),R())]);var Ht=T(It);x(Ht,()=>t.children??j),F(It),c(tt,kt)};D(E,tt=>{t.child?tt(X):tt(et,!1)})}c(K,Y)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};D(C,O=>{(h.shouldRender||n())&&O(S)})}c(a,N),M()}function Io(a,t){A(t,!0);let e=d(t,"open",15,!1),r=d(t,"dir",3,"ltr"),s=d(t,"onOpenChange",3,q),n=d(t,"onOpenChangeComplete",3,q),l=d(t,"_internal_variant",3,"dropdown-menu");const u=wr.create({variant:b(()=>l()),dir:b(()=>r()),onClose:()=>{e(!1),s()(!1)}});Nr.create({open:b(()=>e(),p=>{e(p),s()(p)}),onOpenChangeComplete:b(()=>n())},u),Ne(a,{children:(p,_)=>{var m=k(),g=w(m);x(g,()=>t.children??j),c(p,m)},$$slots:{default:!0}}),M()}var Oo=H("<div><div><!></div></div>"),xo=H("<div><div><!></div></div>");function Ao(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"loop",3,!0),l=d(t,"onInteractOutside",3,q),u=d(t,"onEscapeKeydown",3,q),p=d(t,"onCloseAutoFocus",3,q),_=d(t,"forceMount",3,!1),m=d(t,"trapFocus",3,!1),g=J(t,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const f=kr.create({id:b(()=>r()),loop:b(()=>n()),ref:b(()=>s(),I=>s(I)),onCloseAutoFocus:b(()=>p())}),i=y(()=>W(g,f.props));function h(I){if(f.handleInteractOutside(I),!I.defaultPrevented&&(l()(I),!I.defaultPrevented)){if(I.target&&I.target instanceof Element){const V=`[${f.parentMenu.root.getBitsAttr("sub-content")}]`;if(I.target.closest(V))return}f.parentMenu.onClose()}}function v(I){u()(I),!I.defaultPrevented&&f.parentMenu.onClose()}var N=k(),C=w(N);{var S=I=>{Pe(I,Q(()=>o(i),()=>f.popperProps,{get ref(){return f.opts.ref},get enabled(){return f.parentMenu.opts.open.current},onInteractOutside:h,onEscapeKeydown:v,get trapFocus(){return m()},get loop(){return n()},forceMount:!0,get id(){return r()},get shouldRender(){return f.shouldRender},popper:(U,R)=>{let G=()=>R?.().props,$=()=>R?.().wrapperProps;const Z=y(()=>W(G(),{style:Bt("dropdown-menu")},{style:t.style}));var at=k(),K=w(at);{var B=E=>{var X=k(),et=w(X);{let tt=y(()=>({props:o(Z),wrapperProps:$(),...f.snippetProps}));x(et,()=>t.child,()=>o(tt))}c(E,X)},Y=E=>{var X=Oo();L(X,()=>({...$()}));var et=T(X);L(et,()=>({...o(Z)}));var tt=T(et);x(tt,()=>t.children??j),F(et),F(X),c(E,X)};D(K,E=>{t.child?E(B):E(Y,!1)})}c(U,at)},$$slots:{popper:!0}}))},O=I=>{we(I,Q(()=>o(i),()=>f.popperProps,{get ref(){return f.opts.ref},get open(){return f.parentMenu.opts.open.current},onInteractOutside:h,onEscapeKeydown:v,get trapFocus(){return m()},get loop(){return n()},forceMount:!1,get id(){return r()},get shouldRender(){return f.shouldRender},popper:(U,R)=>{let G=()=>R?.().props,$=()=>R?.().wrapperProps;const Z=y(()=>W(G(),{style:Bt("dropdown-menu")},{style:t.style}));var at=k(),K=w(at);{var B=E=>{var X=k(),et=w(X);{let tt=y(()=>({props:o(Z),wrapperProps:$(),...f.snippetProps}));x(et,()=>t.child,()=>o(tt))}c(E,X)},Y=E=>{var X=xo();L(X,()=>({...$()}));var et=T(X);L(et,()=>({...o(Z)}));var tt=T(et);x(tt,()=>t.children??j),F(et),F(X),c(E,X)};D(K,E=>{t.child?E(B):E(Y,!1)})}c(U,at)},$$slots:{popper:!0}}))};D(C,I=>{_()?I(S):_()||I(O,1)})}c(a,N),M()}var Mo=H("<button><!></button>");function Ro(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"disabled",3,!1),l=d(t,"type",3,"button"),u=J(t,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const p=Sr.create({id:b(()=>r()),disabled:b(()=>n()??!1),ref:b(()=>s(),m=>s(m))}),_=y(()=>W(u,p.props,{type:l()}));ke(a,{get id(){return r()},get ref(){return p.opts.ref},children:(m,g)=>{var f=k(),i=w(f);{var h=N=>{var C=k(),S=w(C);x(S,()=>t.child,()=>({props:o(_)})),c(N,C)},v=N=>{var C=Mo();L(C,()=>({...o(_)}));var S=T(C);x(S,()=>t.children??j),F(C),c(N,C)};D(i,N=>{t.child?N(h):N(v,!1)})}c(m,f)},$$slots:{default:!0}}),M()}const zt=qt({component:"radio-group",parts:["root","item"]}),ie=new xt("RadioGroup.Root");class ae{static create(t){return ie.set(new ae(t))}opts;#t=y(()=>this.opts.value.current!=="");get hasValue(){return o(this.#t)}set hasValue(t){P(this.#t,t)}rovingFocusGroup;attachment;constructor(t){this.opts=t,this.attachment=nt(this.opts.ref),this.rovingFocusGroup=new Ir({rootNode:this.opts.ref,candidateAttr:zt.item,loop:this.opts.loop,orientation:this.opts.orientation})}isChecked(t){return this.opts.value.current===t}setValue(t){this.opts.value.current=t}#e=y(()=>({id:this.opts.id.current,role:"radiogroup","aria-required":Mt(this.opts.required.current),"aria-disabled":Mt(this.opts.disabled.current),"aria-readonly":this.opts.readonly.current?"true":void 0,"data-disabled":dt(this.opts.disabled.current),"data-readonly":dt(this.opts.readonly.current),"data-orientation":this.opts.orientation.current,[zt.root]:"",...this.attachment}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}}class le{static create(t){return new le(t,ie.get())}opts;root;attachment;#t=y(()=>this.root.opts.value.current===this.opts.value.current);get checked(){return o(this.#t)}set checked(t){P(this.#t,t)}#e=y(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=y(()=>this.root.opts.readonly.current);#o=y(()=>this.root.isChecked(this.opts.value.current));#s=z(-1);constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref),this.opts.value.current===this.root.opts.value.current?(this.root.rovingFocusGroup.setCurrentTabStopId(this.opts.id.current),P(this.#s,0)):this.root.opts.value.current||P(this.#s,0),Ft(()=>{P(this.#s,this.root.rovingFocusGroup.getTabIndex(this.opts.ref.current),!0)}),ot([()=>this.opts.value.current,()=>this.root.opts.value.current],()=>{this.opts.value.current===this.root.opts.value.current&&(this.root.rovingFocusGroup.setCurrentTabStopId(this.opts.id.current),P(this.#s,0))}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onfocus=this.onfocus.bind(this)}onclick(t){this.opts.disabled.current||o(this.#r)||this.root.setValue(this.opts.value.current)}onfocus(t){!this.root.hasValue||o(this.#r)||this.root.setValue(this.opts.value.current)}onkeydown(t){if(!o(this.#e)){if(t.key===Pt){t.preventDefault(),o(this.#r)||this.root.setValue(this.opts.value.current);return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,t,!0)}}#n=y(()=>({checked:o(this.#o)}));get snippetProps(){return o(this.#n)}set snippetProps(t){P(this.#n,t)}#i=y(()=>({id:this.opts.id.current,disabled:o(this.#e)?!0:void 0,"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":dt(o(this.#e)),"data-readonly":dt(o(this.#r)),"data-state":o(this.#o)?"checked":"unchecked","aria-checked":Or(o(this.#o),!1),[zt.item]:"",type:"button",role:"radio",tabindex:o(this.#s),onkeydown:this.onkeydown,onfocus:this.onfocus,onclick:this.onclick,...this.attachment}));get props(){return o(this.#i)}set props(t){P(this.#i,t)}}class de{static create(){return new de(ie.get())}root;#t=y(()=>this.root.opts.name.current!==void 0);get shouldRender(){return o(this.#t)}set shouldRender(t){P(this.#t,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){this.root.rovingFocusGroup.focusCurrentTabStop()}#e=y(()=>({name:this.root.opts.name.current,value:this.root.opts.value.current,required:this.root.opts.required.current,disabled:this.root.opts.disabled.current,onfocus:this.onfocus}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}}function To(a,t){A(t,!1);const e=de.create();Ot();var r=k(),s=w(r);{var n=l=>{Ce(l,Q(()=>e.props))};D(s,l=>{e.shouldRender&&l(n)})}c(a,r),M()}var Fo=H("<div><!></div>"),Do=H("<!> <!>",1);function Vo(a,t){const e=st();A(t,!0);let r=d(t,"disabled",3,!1),s=d(t,"value",15,""),n=d(t,"ref",15,null),l=d(t,"orientation",3,"vertical"),u=d(t,"loop",3,!0),p=d(t,"name",3,void 0),_=d(t,"required",3,!1),m=d(t,"readonly",3,!1),g=d(t,"id",19,()=>it(e)),f=d(t,"onValueChange",3,q),i=J(t,["$$slots","$$events","$$legacy","disabled","children","child","value","ref","orientation","loop","name","required","readonly","id","onValueChange"]);const h=ae.create({orientation:b(()=>l()),disabled:b(()=>r()),loop:b(()=>u()),name:b(()=>p()),required:b(()=>_()),readonly:b(()=>m()),id:b(()=>g()),value:b(()=>s(),V=>{V!==s()&&(s(V),f()?.(V))}),ref:b(()=>n(),V=>n(V))}),v=y(()=>W(i,h.props));var N=Do(),C=w(N);{var S=V=>{var U=k(),R=w(U);x(R,()=>t.child,()=>({props:o(v)})),c(V,U)},O=V=>{var U=Fo();L(U,()=>({...o(v)}));var R=T(U);x(R,()=>t.children??j),F(U),c(V,U)};D(C,V=>{t.child?V(S):V(O,!1)})}var I=mt(C,2);To(I,{}),c(a,N),M()}var Ho=H("<button><!></button>");function Eo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"disabled",3,!1),n=d(t,"ref",15,null),l=J(t,["$$slots","$$events","$$legacy","id","children","child","value","disabled","ref"]);const u=le.create({value:b(()=>t.value),disabled:b(()=>s()??!1),id:b(()=>r()),ref:b(()=>n(),i=>n(i))}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=i=>{var h=k(),v=w(h);{let N=y(()=>({props:o(p),...u.snippetProps}));x(v,()=>t.child,()=>o(N))}c(i,h)},f=i=>{var h=Ho();L(h,()=>({...o(p)}));var v=T(h);x(v,()=>t.children??j,()=>u.snippetProps),F(h),c(i,h)};D(m,i=>{t.child?i(g):i(f,!1)})}c(a,_),M()}var Ko=H("<!> <!>",1);function Bo(a,t){A(t,!0);let e=d(t,"value",15),r=d(t,"onValueChange",3,q),s=d(t,"name",3,""),n=d(t,"disabled",3,!1),l=d(t,"open",15,!1),u=d(t,"onOpenChange",3,q),p=d(t,"onOpenChangeComplete",3,q),_=d(t,"loop",3,!1),m=d(t,"scrollAlignment",3,"nearest"),g=d(t,"required",3,!1),f=d(t,"items",19,()=>[]),i=d(t,"allowDeselect",3,!1);function h(){e()===void 0&&e(t.type==="single"?"":[])}h(),ot.pre(()=>e(),()=>{h()});let v=z("");const N=lo.create({type:t.type,value:b(()=>e(),R=>{e(R),r()(R)}),disabled:b(()=>n()),required:b(()=>g()),open:b(()=>l(),R=>{l(R),u()(R)}),loop:b(()=>_()),scrollAlignment:b(()=>m()),name:b(()=>s()),isCombobox:!1,items:b(()=>f()),allowDeselect:b(()=>i()),inputValue:b(()=>o(v),R=>P(v,R,!0)),onOpenChangeComplete:b(()=>p())});var C=Ko(),S=w(C);Ne(S,{children:(R,G)=>{var $=k(),Z=w($);x(Z,()=>t.children??j),c(R,$)},$$slots:{default:!0}});var O=mt(S,2);{var I=R=>{var G=k(),$=w(G);{var Z=K=>{Et(K,{get autocomplete(){return t.autocomplete}})},at=K=>{var B=k(),Y=w(B);Mr(Y,16,()=>N.opts.value.current,E=>E,(E,X)=>{Et(E,{get value(){return X},get autocomplete(){return t.autocomplete}})}),c(K,B)};D($,K=>{N.opts.value.current.length===0?K(Z):K(at,!1)})}c(R,G)},V=y(()=>Array.isArray(N.opts.value.current)),U=R=>{Et(R,{get autocomplete(){return t.autocomplete},get value(){return N.opts.value.current},set value(G){N.opts.value.current=G}})};D(O,R=>{o(V)?R(I):R(U,!1)})}c(a,C),M()}var zo=H("<button><!></button>");function Lo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"type",3,"button"),l=J(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const u=re.create({id:b(()=>r()),ref:b(()=>s(),g=>s(g))}),p=y(()=>W(l,u.props,{type:n()}));var _=k(),m=w(_);rt(m,()=>ke,(g,f)=>{f(g,{get id(){return r()},get ref(){return u.opts.ref},children:(i,h)=>{var v=k(),N=w(v);{var C=O=>{var I=k(),V=w(I);x(V,()=>t.child,()=>({props:o(p)})),c(O,I)},S=O=>{var I=zo();L(I,()=>({...o(p)}));var V=T(I);x(V,()=>t.children??j),F(I),c(O,I)};D(N,O=>{t.child?O(C):O(S,!1)})}c(i,v)},$$slots:{default:!0}})}),c(a,_),M()}const ms=Io,ys=Ro,bs=ee,_s=Ao,Cs=yo,Ps=_o;function ws(a,t){A(t,!0);let e=d(t,"ref",15,null),r=d(t,"value",15,""),s=J(t,["$$slots","$$events","$$legacy","ref","class","value"]);var n=k(),l=w(n);{let u=y(()=>ht("grid gap-0.5 w-full",t.class));rt(l,()=>Vo,(p,_)=>{_(p,Q({"data-slot":"radio-group",get class(){return o(u)}},()=>s,{get ref(){return e()},set ref(m){e(m)},get value(){return r()},set value(m){r(m)}}))})}c(a,n),M()}var Uo=H('<span class="radio-dot svelte-l8hbh2"></span>');function Ns(a,t){A(t,!0);let e=d(t,"ref",15,null),r=J(t,["$$slots","$$events","$$legacy","ref","class"]);var s=k(),n=w(s);{const l=(p,_)=>{let m=()=>_?.().checked;var g=k(),f=w(g);{var i=h=>{var v=Uo();c(h,v)};D(f,h=>{m()&&h(i)})}c(p,g)};let u=y(()=>ht("radio-item",t.class));rt(n,()=>Eo,(p,_)=>{_(p,Q({"data-slot":"radio-group-item",get class(){return o(u)}},()=>r,{get ref(){return e()},set ref(m){e(m)},children:l,$$slots:{default:!0}}))})}c(a,s),M()}function qo(){let a=z(Be({})),t=null,e=null;function r(i,h,v){e&&(clearInterval(e),e=null),t=`${i}/${h}/${v}`,n("enter",i,h,v),e=setInterval(()=>{t&&n("heartbeat",i,h,v)},3e4)}function s(){if(e&&(clearInterval(e),e=null),t){const[i,h,v]=t.split("/");i&&h&&v&&n("leave",i,h,v),t=null}}function n(i,h,v,N){Jt.send({type:"presence",action:i,repo:h,entityType:v,entityId:N})}function l(i){const h=`${i.repo}/${i.entityType}/${i.entityId}`,v=o(a)[h]??[];if(i.action==="leave")o(a)[h]=v.filter(N=>N.id!==i.user.id);else{const N=v.findIndex(C=>C.id===i.user.id);N>=0?(v[N]=i.user,o(a)[h]=[...v]):o(a)[h]=[...v,i.user]}}function u(){if(P(a,{},!0),!t)return;const[i,h,v]=t.split("/");i&&h&&v&&n("enter",i,h,v)}function p(i,h,v,N){const C=`${i}/${h}/${v}`,S=o(a)[C]??[];return N?S.filter(O=>O.id!==N):S}function _(i,h){const v=new Map;for(const[N,C]of Object.entries(o(a)))if(N.startsWith(i))for(const S of C)(!h||S.id!==h)&&v.set(S.id,S);return[...v.values()]}function m(i,h){return _(`${i}/`,h)}function g(i){const h=new Map;for(const v of Object.values(o(a)))for(const N of v)(!i||N.id!==i)&&h.set(N.id,N);return[...h.values()]}const f=y(()=>{const i=new Map;for(const h of Object.values(o(a)))for(const v of h)i.set(v.id,v);return[...i.values()]});return{enter:r,leave:s,handlePresenceEvent:l,resetAndResend:u,getPresence:p,getPresenceByPrefix:_,getRepoPresence:m,getAllUsers:g,get allUsers(){return o(f)}}}const he=qo();Jt.setPresenceHandler(a=>he.handlePresenceEvent(a));Jt.addConnectHandler(()=>he.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>he.leave());var Wo=H('<span class="select-placeholder"> </span>'),Go=H('<span class="select-label"><!></span> <!>',1);function ks(a,t){A(t,!0);let e=d(t,"placeholder",3,"Select..."),r=d(t,"size",3,"default"),s=J(t,["$$slots","$$events","$$legacy","children","value","placeholder","class","size"]);var n=k(),l=w(n);{let u=y(()=>ht("select-trigger",r()==="sm"&&"select-trigger-sm",t.class));rt(l,()=>Lo,(p,_)=>{_(p,Q({get class(){return o(u)}},()=>s,{children:(m,g)=>{var f=Go(),i=w(f),h=T(i);{var v=O=>{var I=k(),V=w(I);x(V,()=>t.children),c(O,I)},N=O=>{var I=qe();ct(()=>Ct(I,t.value)),c(O,I)},C=O=>{var I=Wo(),V=T(I,!0);F(I),ct(()=>Ct(V,e())),c(O,I)};D(h,O=>{t.children?O(v):t.value?O(N,1):O(C,!1)})}F(i);var S=mt(i,2);{let O=y(()=>r()==="sm"?12:14);zr(S,{get size(){return o(O)},class:"select-chevron"})}c(m,f)},$$slots:{default:!0}}))})}c(a,n),M()}function Ss(a,t){A(t,!0);let e=d(t,"side",3,"bottom"),r=d(t,"sideOffset",3,4),s=J(t,["$$slots","$$events","$$legacy","children","class","side","sideOffset"]);var n=k(),l=w(n);rt(l,()=>ee,(u,p)=>{p(u,{children:(_,m)=>{var g=k(),f=w(g);{let i=y(()=>ht("select-content",t.class));rt(f,()=>co,(h,v)=>{v(h,Q({get class(){return o(i)},get side(){return e()},get sideOffset(){return r()}},()=>s,{children:(N,C)=>{var S=k(),O=w(S);x(O,()=>t.children),c(N,S)},$$slots:{default:!0}}))})}c(_,g)},$$slots:{default:!0}})}),c(a,n),M()}var Yo=H('<span class="select-item-text"> </span>'),jo=H("<!> <!>",1);function Is(a,t){A(t,!0);let e=d(t,"disabled",3,!1),r=J(t,["$$slots","$$events","$$legacy","value","label","disabled","class","content"]);var s=k(),n=w(s);{const l=(p,_)=>{let m=()=>_?.().selected;var g=jo(),f=w(g);{var i=C=>{var S=k(),O=w(S);x(O,()=>t.content,()=>({selected:m()})),c(C,S)},h=C=>{var S=Yo(),O=T(S,!0);F(S),ct(()=>Ct(O,t.label??t.value)),c(C,S)};D(f,C=>{t.content?C(i):C(h,!1)})}var v=mt(f,2);{var N=C=>{xr(C,{size:12,class:"select-item-check"})};D(v,C=>{m()&&C(N)})}c(p,g)};let u=y(()=>ht("select-item",t.class));rt(n,()=>vo,(p,_)=>{_(p,Q({get value(){return t.value},get label(){return t.label},get disabled(){return e()},get class(){return o(u)}},()=>r,{children:l,$$slots:{default:!0}}))})}c(a,s),M()}const Os=Bo;function xs(a,t){A(t,!0);let e=d(t,"open",15,!1),r=J(t,["$$slots","$$events","$$legacy","open","onOpenChange","children"]);var s=k(),n=w(s);rt(n,()=>Co,(l,u)=>{u(l,Q({get onOpenChange(){return t.onOpenChange}},()=>r,{get open(){return e()},set open(p){e(p)},children:(p,_)=>{var m=k(),g=w(m);x(g,()=>t.children),c(p,m)},$$slots:{default:!0}}))}),c(a,s),M()}var Jo=H("<!> <!>",1);function As(a,t){A(t,!0);let e=d(t,"size",3,"md"),r=J(t,["$$slots","$$events","$$legacy","children","class","size"]);var s=k(),n=w(s);rt(n,()=>ee,(l,u)=>{u(l,{children:(p,_)=>{var m=Jo(),g=w(m);rt(g,()=>to,(i,h)=>{h(i,{class:"dialog-overlay"})});var f=mt(g,2);{let i=y(()=>ht("dialog-content",`dialog-${e()}`,t.class));rt(f,()=>So,(h,v)=>{v(h,Q({get class(){return o(i)}},()=>r,{children:(N,C)=>{var S=k(),O=w(S);x(O,()=>t.children),c(N,S)},$$slots:{default:!0}}))})}c(p,m)},$$slots:{default:!0}})}),c(a,s),M()}var Xo=H("<div><!></div>");function Ms(a,t){A(t,!0);var e=Xo(),r=T(e);x(r,()=>t.children),F(e),ct(s=>Ut(e,1,s),[()=>Lt(ht("dialog-header",t.class))]),c(a,e),M()}function Rs(a,t){A(t,!0);var e=k(),r=w(e);{let s=y(()=>ht("dialog-title",t.class));rt(r,()=>Gr,(n,l)=>{l(n,{get class(){return o(s)},children:(u,p)=>{var _=k(),m=w(_);x(m,()=>t.children),c(u,_)},$$slots:{default:!0}})})}c(a,e),M()}var Zo=H("<div><!></div>");function Ts(a,t){A(t,!0);var e=Zo(),r=T(e);x(r,()=>t.children),F(e),ct(s=>Ut(e,1,s),[()=>Lt(ht("dialog-body",t.class))]),c(a,e),M()}var Qo=H("<div><!></div>");function Fs(a,t){A(t,!0);var e=Qo(),r=T(e);x(r,()=>t.children),F(e),ct(s=>Ut(e,1,s),[()=>Lt(ht("dialog-footer",t.class))]),c(a,e),M()}function Ds(a,t){A(t,!0);var e=k(),r=w(e);{let s=y(()=>ht("dialog-close-btn",t.class));rt(r,()=>wo,(n,l)=>{l(n,{get class(){return o(s)},children:(u,p)=>{Ar(u,{size:16})},$$slots:{default:!0}})})}c(a,e),M()}function $o(a){const t=a.replace(/^\[\[|\]\]$/g,"").split("|")[0].trim();if(!t)return null;for(const e of Rr.repos){const r=e.entities.find(s=>s.id===t);if(r)return{id:r.id,title:r.title,entityType:r.entityType,repo:e.name,url:`/${e.name}/${r.entityType}/${r.id}`}}return null}function Vs(a){if(!a)return[];const t=a.replace(/\[\[|\]\]/g,"").split(",").map(r=>r.trim()).filter(Boolean),e=[];for(const r of t){const s=$o(r);s&&e.push(s)}return e}function Hs(a){const t=a.replace(/^\[\[|\]\]$/g,""),e=t.indexOf("|");if(e!==-1){const r=t.slice(e+1).trim();if(r)return r}return t.split("|")[0].trim().replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())}var ts=bt("<title> </title>"),es=bt('<svg><!><path d="M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"></path></svg>');function Es(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=es();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=ts(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}export{Oe as A,Gr as B,zr as C,As as D,to as E,vs as F,lo as G,Et as H,Cs as I,Re as J,oe as K,vo as L,bs as P,ws as R,Ps as S,ys as T,Ms as a,Ds as b,Ts as c,Rs as d,Fs as e,Hs as f,xs as g,_s as h,ms as i,fs as j,Fr as k,Ns as l,Vs as m,Es as n,ks as o,he as p,Ss as q,$o as r,Os as s,Is as t,gs as u,Xt as v,Se as w,$t as x,Ie as y,ee as z};
|
|
1
|
+
import"./DsnmJJEf.js";import{i as Ot}from"./DpgUPK2a.js";import{br as Te,j as Fe,k as De,o as Ve,p as A,l as gt,s as P,d as lt,g as o,a as Rt,c as T,n as Tt,r as F,b as M,m as vt,t as ct,u as y,i as Ft,P as He,e as z,f as w,I as j,bs as Ee,O as Ke,h as mt,V as Be}from"./txOdadJq.js";import{a as c,s as Ct,f as bt,p as st,c as k,b as H,m as ze,u as Le,o as Ue,t as qe}from"./9gtwoV4P.js";import{B as We,l as yt,p as d,i as D,r as J,s as Q}from"./BCLL87Av.js";import{a as L,s as x,f as Lt,b as Ut}from"./ypcxmEdT.js";import{C as xt,a as nt,O as dt,w as ot,S as Pt,E as wt,P as Kt,f as b,V as fe,c as Dt,h as qt,j as it,m as W,A as Ge,W as Ye,X as je,D as Vt,Y as Je,L as ut,K as ft,Z as At,_ as Wt,$ as Gt,a0 as Yt,a1 as jt,a2 as ge,a3 as ve,a4 as me,a5 as ye,d as Mt,o as Bt,a6 as be,M as Xe,N as Ze,a7 as Qe,a8 as $e,a9 as tr,aa as er,ab as rr,ac as or,ad as sr,ae as nr,af as ir,ag as ar,ah as lr,ai as dr,aj as hr,ak as ur,al as cr,am as pr,an as fr,ao as gr,ap as ue,J as _e,aq as vr,ar as Ce,n as q,k as Pe,l as we,as as mr,at as yr,t as br,v as _r,x as Cr,y as Pr,z as ce,au as wr,av as Nr,p as Ne,aw as kr,ax as Sr,F as ke,ay as Ir,az as Or,s as xr,r as Ar}from"./CUbaOWk8.js";import{c as rt}from"./DerefRkG.js";import{c as ht}from"./BI-a4gre.js";import{r as Jt}from"./BRnt8Lop.js";import{e as Mr}from"./DpQdzvMm.js";import{w as Rr}from"./-wxjF91G.js";const Tr=Symbol("NaN");function Fr(a,t,e){De&&Ve();var r=new We(a),s=!Te();Fe(()=>{var n=t();n!==n&&(n=Tr),s&&n!==null&&typeof n=="object"&&(n={}),r.ensure(n,e)})}var Dr=bt("<title> </title>"),Vr=bt('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function fs(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=Vr();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=Dr(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}var Hr=bt("<title> </title>"),Er=bt('<svg><!><path d="M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20 V26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z"></path></svg>');function gs(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=Er();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=Hr(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}var Kr=bt("<title> </title>"),Br=bt('<svg><!><path d="M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"></path></svg>');function zr(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=Br();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=Kr(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}class Lr{#t=()=>{};#e=y(()=>this.#t());constructor(t,e){let r;e!==void 0&&(r=e),this.#t=()=>{try{return r}finally{r=t()}}}get current(){return o(this.#e)}}function Ur(a){Ft(()=>He(()=>a()))}const qr=qt({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),pt=new xt("Dialog.Root | AlertDialog.Root");class Xt{static create(t){const e=pt.getOr(null);return pt.set(new Xt(t,e))}opts;#t=z(null);get triggerNode(){return o(this.#t)}set triggerNode(t){P(this.#t,t,!0)}#e=z(null);get contentNode(){return o(this.#e)}set contentNode(t){P(this.#e,t,!0)}#r=z(null);get overlayNode(){return o(this.#r)}set overlayNode(t){P(this.#r,t,!0)}#o=z(null);get descriptionNode(){return o(this.#o)}set descriptionNode(t){P(this.#o,t,!0)}#s=z(void 0);get contentId(){return o(this.#s)}set contentId(t){P(this.#s,t,!0)}#n=z(void 0);get titleId(){return o(this.#n)}set titleId(t){P(this.#n,t,!0)}#i=z(void 0);get triggerId(){return o(this.#i)}set triggerId(t){P(this.#i,t,!0)}#a=z(void 0);get descriptionId(){return o(this.#a)}set descriptionId(t){P(this.#a,t,!0)}#l=z(null);get cancelNode(){return o(this.#l)}set cancelNode(t){P(this.#l,t,!0)}#d=z(0);get nestedOpenCount(){return o(this.#d)}set nestedOpenCount(t){P(this.#d,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Kt({ref:b(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Kt({ref:b(()=>this.overlayNode),open:this.opts.open,enabled:!0}),ot(()=>this.opts.open.current,r=>{this.parent&&(r?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),fe(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>qr.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#h=y(()=>({"data-state":Dt(this.opts.open.current)}));get sharedProps(){return o(this.#h)}set sharedProps(t){P(this.#h,t)}}class Zt{static create(t){return new Zt(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Pt||t.key===wt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class Se{static create(t){return new Se(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class Qt{static create(t){return new Qt(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=nt(this.opts.ref),ot.pre(()=>this.opts.id.current,r=>{this.root.titleId=r})}#t=y(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class Ie{static create(t){return new Ie(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=nt(this.opts.ref,r=>{this.root.descriptionNode=r}),ot.pre(()=>this.opts.id.current,r=>{this.root.descriptionId=r})}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class $t{static create(t){return new $t(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref,r=>{this.root.contentNode=r,this.root.contentId=r?.id})}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":dt(this.root.nestedOpenCount>0),"data-nested":dt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class te{static create(t){return new te(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref,r=>this.root.overlayNode=r)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":dt(this.root.nestedOpenCount>0),"data-nested":dt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class Oe{static create(t){return new Oe(t,pt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref,r=>this.root.cancelNode=r),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Pt||t.key===wt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}var Wr=H("<div><!></div>");function Gr(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"level",3,2),l=J(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const u=Qt.create({id:b(()=>r()),level:b(()=>n()),ref:b(()=>s(),i=>s(i))}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=i=>{var h=k(),v=w(h);x(v,()=>t.child,()=>({props:o(p)})),c(i,h)},f=i=>{var h=Wr();L(h,()=>({...o(p)}));var v=T(h);x(v,()=>t.children??j),F(h),c(i,h)};D(m,i=>{t.child?i(g):i(f,!1)})}c(a,_),M()}function Yr(a,t){var e=k(),r=w(e);Fr(r,()=>t.children,s=>{var n=k(),l=w(n);x(l,()=>t.children??j),c(s,n)}),c(a,e)}const jr=new xt("BitsConfig");function Jr(){const a=new Xr(null,{});return jr.getOr(a).opts}class Xr{opts;constructor(t,e){const r=Zr(t,e);this.opts={defaultPortalTo:r(s=>s.defaultPortalTo),defaultLocale:r(s=>s.defaultLocale)}}}function Zr(a,t){return e=>b(()=>{const s=e(t)?.current;if(s!==void 0)return s;if(a!==null)return e(a.opts)?.current})}function xe(a,t){return e=>{const r=Jr();return b(()=>{const s=e();if(s!==void 0)return s;const n=a(r).current;return n!==void 0?n:t})}}const vs=xe(a=>a.defaultLocale,"en"),Qr=xe(a=>a.defaultPortalTo,"body");function ee(a,t){A(t,!0);const e=Qr(()=>t.to),r=Ee();let s=y(n);function n(){if(!Ge||t.disabled)return null;let g=null;return typeof e.current=="string"?g=document.querySelector(e.current):g=e.current,g}let l;function u(){l&&(Le(l),l=null)}ot([()=>o(s),()=>t.disabled],([g,f])=>{if(!g||f){u();return}return l=ze(Yr,{target:g,props:{children:t.children},context:r}),()=>{u()}});var p=k(),_=w(p);{var m=g=>{var f=k(),i=w(f);x(i,()=>t.children??j),c(g,f)};D(_,g=>{t.disabled&&g(m)})}c(a,p),M()}var $r=H("<div><!></div>");function to(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"forceMount",3,!1),n=d(t,"ref",15,null),l=J(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const u=te.create({id:b(()=>r()),ref:b(()=>n(),f=>n(f))}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=f=>{var i=k(),h=w(i);{var v=C=>{var S=k(),O=w(S);{let I=y(()=>({props:W(o(p)),...u.snippetProps}));x(O,()=>t.child,()=>o(I))}c(C,S)},N=C=>{var S=$r();L(S,I=>({...I}),[()=>W(o(p))]);var O=T(S);x(O,()=>t.children??j,()=>u.snippetProps),F(S),c(C,S)};D(h,C=>{t.child?C(v):C(N,!1)})}c(f,i)};D(m,f=>{(u.shouldRender||s())&&f(g)})}c(a,_),M()}class eo{#t;#e=y(()=>this.#t.candidateValues());#r;constructor(t){this.#t=t,this.#r=Ye("",{afterMs:1e3,getWindow:this.#t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!this.#t.enabled()||!o(this.#e).length)return;this.#r.current=this.#r.current+t;const e=this.#t.getCurrentItem(),r=o(this.#e).find(u=>u===e)??"",s=o(this.#e).map(u=>u??""),n=je(s,this.#r.current,r),l=o(this.#e).find(u=>u===n);return l&&this.#t.onMatch(l),l}resetTypeahead(){this.#r.current=""}}const pe=[Xe,be,Ze,Qe,$e,tr,er,rr,wt,or,sr,nr,ir,ar,lr,dr,hr,ur,cr,pr,fr],ro=[ft,Wt,Gt],oo=[ut,Yt,jt],Ae=[...ro,...oo],so=qt({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),Nt=new xt("Select.Root | Combobox.Root"),no=new xt("Select.Content | Combobox.Content");class Me{opts;#t=z(!1);get touchedInput(){return o(this.#t)}set touchedInput(t){P(this.#t,t,!0)}#e=z(null);get inputNode(){return o(this.#e)}set inputNode(t){P(this.#e,t,!0)}#r=z(null);get contentNode(){return o(this.#r)}set contentNode(t){P(this.#r,t,!0)}contentPresence;#o=z(null);get viewportNode(){return o(this.#o)}set viewportNode(t){P(this.#o,t,!0)}#s=z(null);get triggerNode(){return o(this.#s)}set triggerNode(t){P(this.#s,t,!0)}#n=z("");get valueId(){return o(this.#n)}set valueId(t){P(this.#n,t,!0)}#i=z(null);get highlightedNode(){return o(this.#i)}set highlightedNode(t){P(this.#i,t,!0)}#a=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return o(this.#a)}set highlightedValue(t){P(this.#a,t)}#l=y(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return o(this.#l)}set highlightedId(t){P(this.#l,t)}#d=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return o(this.#d)}set highlightedLabel(t){P(this.#d,t)}#h=z(!1);get contentIsPositioned(){return o(this.#h)}set contentIsPositioned(t){P(this.#h,t,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new Vt(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new Kt({ref:b(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Ke(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&this.scrollHighlightedNodeIntoView(t)}scrollHighlightedNodeIntoView(t){!this.viewportNode||!this.contentIsPositioned||t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();e=e.filter(s=>{if(!this.viewportNode)return!1;const n=s.getBoundingClientRect();return n.right<=r.right&&n.left>=r.left&&n.bottom<=r.bottom&&n.top>=r.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(r=>r.dataset.value===t)??null}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=t=>so.getAttr(t,this.isCombobox?"combobox":void 0)}class io extends Me{opts;isMulti=!1;#t=y(()=>this.opts.value.current!=="");get hasValue(){return o(this.#t)}set hasValue(t){P(this.#t,t)}#e=y(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":"");get currentLabel(){return o(this.#e)}set currentLabel(t){P(this.#e,t)}#r=y(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return o(this.#r)}set candidateLabels(t){P(this.#r,t)}#o=y(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return o(this.#o)}set dataTypeaheadEnabled(t){P(this.#o,t)}constructor(t){super(t),this.opts=t,Ft(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ot(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current===t}toggleItem(t,e=t){const r=this.includesItem(t)?"":t;this.opts.value.current=r,r!==""&&(this.opts.inputValue.current=e)}setInitialHighlightedNode(){_e(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class ao extends Me{opts;isMulti=!0;#t=y(()=>this.opts.value.current.length>0);get hasValue(){return o(this.#t)}set hasValue(t){P(this.#t,t)}constructor(t){super(t),this.opts=t,Ft(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ot(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,e=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(r=>r!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=e}setInitialHighlightedNode(){_e(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class lo{static create(t){const{type:e,...r}=t,s=e==="single"?new io(r):new ao(r);return Nt.set(s)}}class Re{static create(t){return new Re(t,Nt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.inputNode=r),this.root.domContext=new Vt(t.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),ot([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([r,s],[n])=>{s&&(Array.isArray(r)&&Array.isArray(n)?r.length===0&&n.length!==0&&(this.root.opts.inputValue.current=""):r===""&&n!==""&&(this.root.opts.inputValue.current=""))})}onkeydown(t){if(this.root.isUsingKeyboard=!0,t.key!==be){if((t.key===ut||t.key===ft)&&t.preventDefault(),!this.root.opts.open.current){if(pe.includes(t.key)||t.key===At||t.key===gr&&this.root.opts.inputValue.current===""||(this.root.handleOpen(),this.root.hasValue))return;const e=this.root.getCandidateNodes();if(!e.length)return;if(t.key===ft){const r=e[0];this.root.setHighlightedNode(r)}else if(t.key===ut){const r=e[e.length-1];this.root.setHighlightedNode(r)}return}if(t.key===At){this.root.handleClose();return}if(t.key===wt&&!t.isComposing){t.preventDefault();const e=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e&&this.root.handleClose()}if(t.key===ut&&t.altKey&&this.root.handleClose(),Ae.includes(t.key)){t.preventDefault();const e=this.root.getCandidateNodes(),r=this.root.highlightedNode,s=r?e.indexOf(r):-1,n=this.root.opts.loop.current;let l;if(t.key===ft?l=ge(e,s,n):t.key===ut?l=ve(e,s,n):t.key===Yt?l=me(e,s,10,n):t.key===Wt?l=ye(e,s,10,n):t.key===Gt?l=e[0]:t.key===jt&&(l=e[e.length-1]),!l)return;this.root.setHighlightedNode(l);return}pe.includes(t.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(t){this.root.opts.inputValue.current=t.currentTarget.value,this.root.setHighlightedToFirstCandidate()}#t=y(()=>({id:this.opts.id.current,role:"combobox",disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":"list","aria-expanded":Mt(this.root.opts.open.current),"data-state":Dt(this.root.opts.open.current),"data-disabled":dt(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr("input")]:"",...this.attachment}));get props(){return o(this.#t)}set props(t){P(this.#t,t)}}class re{static create(t){return new re(t,Nt.get())}opts;root;attachment;#t;#e;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.triggerNode=r),this.root.domContext=new Vt(t.ref),this.#t=new Je({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#e=new eo({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const s=this.root.opts.items.current.find(n=>n.label===r);s&&(this.root.opts.value.current=s.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#e.resetTypeahead(),this.#t.resetTypeahead()}#o(t){this.#r()}#s(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===ut||t.key===ft)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===wt||t.key===Pt||t.key===ft||t.key===ut)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#e.handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const l=this.root.getCandidateNodes();if(!l.length)return;if(t.key===ft){const u=l[0];this.root.setHighlightedNode(u)}else if(t.key===ut){const u=l[l.length-1];this.root.setHighlightedNode(u)}return}if(t.key===At){this.root.handleClose();return}if((t.key===wt||t.key===Pt&&this.#t.search==="")&&!t.isComposing&&(t.preventDefault(),this.#s()))return;if(t.key===ut&&t.altKey&&this.root.handleClose(),Ae.includes(t.key)){t.preventDefault();const l=this.root.getCandidateNodes(),u=this.root.highlightedNode,p=u?l.indexOf(u):-1,_=this.root.opts.loop.current;let m;if(t.key===ft?m=ge(l,p,_):t.key===ut?m=ve(l,p,_):t.key===Yt?m=me(l,p,10,_):t.key===Wt?m=ye(l,p,10,_):t.key===Gt?m=l[0]:t.key===jt&&(m=l[l.length-1]),!m)return;this.root.setHighlightedNode(m);return}const e=t.ctrlKey||t.altKey||t.metaKey,r=t.key.length===1,s=t.key===Pt,n=this.root.getCandidateNodes();if(t.key!==At){if(!e&&(r||s)){!this.#t.handleTypeaheadSearch(t.key,n)&&s&&(t.preventDefault(),this.#s());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e?.hasPointerCapture(t.pointerId)&&e?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#o(t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#o(t):this.root.handleClose()))}#n=y(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Mt(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Dt(this.root.opts.open.current),"data-disabled":dt(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return o(this.#n)}set props(t){P(this.#n,t)}}class oe{static create(t){return no.set(new oe(t,Nt.get()))}opts;root;attachment;#t=z(!1);get isPositioned(){return o(this.#t)}set isPositioned(t){P(this.#t,t,!0)}domContext;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.contentNode=r),this.domContext=new Vt(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),fe(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),ot(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),ot([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(t){this.root.isUsingKeyboard=!1}#e=y(()=>Bt(this.root.isCombobox?"combobox":"select"));onInteractOutside=t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#r)}set snippetProps(t){P(this.#r,t)}#o=y(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Dt(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...o(this.#e)},onpointermove:this.onpointermove,...this.attachment}));get props(){return o(this.#o)}set props(t){P(this.#o,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}}class se{static create(t){return new se(t,Nt.get())}opts;root;attachment;#t=y(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return o(this.#t)}set isSelected(t){P(this.#t,t)}#e=y(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return o(this.#e)}set isHighlighted(t){P(this.#e,t)}prevHighlighted=new Lr(()=>this.isHighlighted);#r=z(!1);get mounted(){return o(this.#r)}set mounted(t){P(this.#r,t,!0)}constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref),ot([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),ot(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}#o=y(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return o(this.#o)}set snippetProps(t){P(this.#o,t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!vr){Ue(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#s=y(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":dt(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return o(this.#s)}set props(t){P(this.#s,t)}}class ne{static create(t){return new ne(t,Nt.get())}opts;root;#t=y(()=>this.root.opts.name.current!=="");get shouldRender(){return o(this.#t)}set shouldRender(t){P(this.#t,t)}constructor(t,e){this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#e=y(()=>({disabled:ue(this.root.opts.disabled.current),required:ue(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}}function Et(a,t){A(t,!0);let e=d(t,"value",15);const r=ne.create({value:b(()=>e())});var s=k(),n=w(s);{var l=u=>{Ce(u,Q(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return e()},set value(p){e(p)}}))};D(n,u=>{r.shouldRender&&u(l)})}c(a,s),M()}var ho=H("<div><div><!></div></div>"),uo=H("<div><div><!></div></div>");function co(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"forceMount",3,!1),l=d(t,"side",3,"bottom"),u=d(t,"onInteractOutside",3,q),p=d(t,"onEscapeKeydown",3,q),_=d(t,"preventScroll",3,!1),m=J(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const g=oe.create({id:b(()=>r()),ref:b(()=>s(),C=>s(C)),onInteractOutside:b(()=>u()),onEscapeKeydown:b(()=>p())}),f=y(()=>W(m,g.props));var i=k(),h=w(i);{var v=C=>{Pe(C,Q(()=>o(f),()=>g.popperProps,{get ref(){return g.opts.ref},get side(){return l()},get enabled(){return g.root.opts.open.current},get id(){return r()},get preventScroll(){return _()},forceMount:!0,get shouldRender(){return g.shouldRender},popper:(O,I)=>{let V=()=>I?.().props,U=()=>I?.().wrapperProps;const R=y(()=>W(V(),{style:g.props.style},{style:t.style}));var G=k(),$=w(G);{var Z=K=>{var B=k(),Y=w(B);{let E=y(()=>({props:o(R),wrapperProps:U(),...g.snippetProps}));x(Y,()=>t.child,()=>o(E))}c(K,B)},at=K=>{var B=ho();L(B,()=>({...U()}));var Y=T(B);L(Y,()=>({...o(R)}));var E=T(Y);x(E,()=>t.children??j),F(Y),F(B),c(K,B)};D($,K=>{t.child?K(Z):K(at,!1)})}c(O,G)},$$slots:{popper:!0}}))},N=C=>{we(C,Q(()=>o(f),()=>g.popperProps,{get ref(){return g.opts.ref},get side(){return l()},get open(){return g.root.opts.open.current},get id(){return r()},get preventScroll(){return _()},forceMount:!1,get shouldRender(){return g.shouldRender},popper:(O,I)=>{let V=()=>I?.().props,U=()=>I?.().wrapperProps;const R=y(()=>W(V(),{style:g.props.style},{style:t.style}));var G=k(),$=w(G);{var Z=K=>{var B=k(),Y=w(B);{let E=y(()=>({props:o(R),wrapperProps:U(),...g.snippetProps}));x(Y,()=>t.child,()=>o(E))}c(K,B)},at=K=>{var B=uo();L(B,()=>({...U()}));var Y=T(B);L(Y,()=>({...o(R)}));var E=T(Y);x(E,()=>t.children??j),F(Y),F(B),c(K,B)};D($,K=>{t.child?K(Z):K(at,!1)})}c(O,G)},$$slots:{popper:!0}}))};D(h,C=>{n()?C(v):n()||C(N,1)})}c(a,i),M()}function po(a,t){A(t,!0);let e=d(t,"mounted",15,!1),r=d(t,"onMountedChange",3,q);Ur(()=>(e(!0),r()(!0),()=>{e(!1),r()(!1)})),M()}var fo=H("<div><!></div>"),go=H("<!> <!>",1);function vo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"label",19,()=>t.value),l=d(t,"disabled",3,!1),u=d(t,"onHighlight",3,q),p=d(t,"onUnhighlight",3,q),_=J(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const m=se.create({id:b(()=>r()),ref:b(()=>s(),C=>s(C)),value:b(()=>t.value),disabled:b(()=>l()),label:b(()=>n()),onHighlight:b(()=>u()),onUnhighlight:b(()=>p())}),g=y(()=>W(_,m.props));var f=go(),i=w(f);{var h=C=>{var S=k(),O=w(S);{let I=y(()=>({props:o(g),...m.snippetProps}));x(O,()=>t.child,()=>o(I))}c(C,S)},v=C=>{var S=fo();L(S,()=>({...o(g)}));var O=T(S);x(O,()=>t.children??j,()=>m.snippetProps),F(S),c(C,S)};D(i,C=>{t.child?C(h):C(v,!1)})}var N=mt(i,2);po(N,{get mounted(){return m.mounted},set mounted(C){m.mounted=C}}),c(a,f),M()}var mo=H("<div><!></div>");function yo(a,t){const e=st();A(t,!0);let r=d(t,"ref",15,null),s=d(t,"id",19,()=>it(e)),n=d(t,"disabled",3,!1),l=d(t,"onSelect",3,q),u=d(t,"closeOnSelect",3,!0),p=J(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const _=mr.create({id:b(()=>s()),disabled:b(()=>n()),onSelect:b(()=>l()),ref:b(()=>r(),v=>r(v)),closeOnSelect:b(()=>u())}),m=y(()=>W(p,_.props));var g=k(),f=w(g);{var i=v=>{var N=k(),C=w(N);x(C,()=>t.child,()=>({props:o(m)})),c(v,N)},h=v=>{var N=mo();L(N,()=>({...o(m)}));var C=T(N);x(C,()=>t.children??j),F(N),c(v,N)};D(f,v=>{t.child?v(i):v(h,!1)})}c(a,g),M()}var bo=H("<div><!></div>");function _o(a,t){const e=st();A(t,!0);let r=d(t,"ref",15,null),s=d(t,"id",19,()=>it(e)),n=J(t,["$$slots","$$events","$$legacy","ref","id","child","children"]);const l=yr.create({id:b(()=>s()),ref:b(()=>r(),f=>r(f))}),u=y(()=>W(n,l.props));var p=k(),_=w(p);{var m=f=>{var i=k(),h=w(i);x(h,()=>t.child,()=>({props:o(u)})),c(f,i)},g=f=>{var i=bo();L(i,()=>({...o(u)}));var h=T(i);x(h,()=>t.children??j),F(i),c(f,i)};D(_,f=>{t.child?f(m):f(g,!1)})}c(a,p),M()}function Co(a,t){A(t,!0);let e=d(t,"open",15,!1),r=d(t,"onOpenChange",3,q),s=d(t,"onOpenChangeComplete",3,q);Xt.create({variant:b(()=>"dialog"),open:b(()=>e(),u=>{e(u),r()(u)}),onOpenChangeComplete:b(()=>s())});var n=k(),l=w(n);x(l,()=>t.children??j),c(a,n),M()}var Po=H("<button><!></button>");function wo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"disabled",3,!1),l=J(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const u=Zt.create({variant:b(()=>"close"),id:b(()=>r()),ref:b(()=>s(),i=>s(i)),disabled:b(()=>!!n())}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=i=>{var h=k(),v=w(h);x(v,()=>t.child,()=>({props:o(p)})),c(i,h)},f=i=>{var h=Po();L(h,()=>({...o(p)}));var v=T(h);x(v,()=>t.children??j),F(h),c(i,h)};D(m,i=>{t.child?i(g):i(f,!1)})}c(a,_),M()}var No=H("<!> <!>",1),ko=H("<!> <div><!></div>",1);function So(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"forceMount",3,!1),l=d(t,"onCloseAutoFocus",3,q),u=d(t,"onOpenAutoFocus",3,q),p=d(t,"onEscapeKeydown",3,q),_=d(t,"onInteractOutside",3,q),m=d(t,"trapFocus",3,!0),g=d(t,"preventScroll",3,!0),f=d(t,"restoreScrollDelay",3,null),i=J(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const h=$t.create({id:b(()=>r()),ref:b(()=>s(),O=>s(O))}),v=y(()=>W(i,h.props));var N=k(),C=w(N);{var S=O=>{br(O,{get ref(){return h.opts.ref},loop:!0,get trapFocus(){return m()},get enabled(){return h.root.opts.open.current},get onOpenAutoFocus(){return u()},get onCloseAutoFocus(){return l()},focusScope:(V,U)=>{let R=()=>U?.().props;_r(V,Q(()=>o(v),{get enabled(){return h.root.opts.open.current},get ref(){return h.opts.ref},onEscapeKeydown:G=>{p()(G),!G.defaultPrevented&&h.root.handleClose()},children:(G,$)=>{Cr(G,Q(()=>o(v),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},onInteractOutside:Z=>{_()(Z),!Z.defaultPrevented&&h.root.handleClose()},children:(Z,at)=>{Pr(Z,Q(()=>o(v),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},children:(K,B)=>{var Y=k(),E=w(Y);{var X=tt=>{var kt=No(),St=w(kt);{var It=_t=>{ce(_t,{get preventScroll(){return g()},get restoreScrollDelay(){return f()}})};D(St,_t=>{h.root.opts.open.current&&_t(It)})}var Ht=mt(St,2);{let _t=y(()=>({props:W(o(v),R()),...h.snippetProps}));x(Ht,()=>t.child,()=>o(_t))}c(tt,kt)},et=tt=>{var kt=ko(),St=w(kt);ce(St,{get preventScroll(){return g()}});var It=mt(St,2);L(It,_t=>({..._t}),[()=>W(o(v),R())]);var Ht=T(It);x(Ht,()=>t.children??j),F(It),c(tt,kt)};D(E,tt=>{t.child?tt(X):tt(et,!1)})}c(K,Y)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};D(C,O=>{(h.shouldRender||n())&&O(S)})}c(a,N),M()}function Io(a,t){A(t,!0);let e=d(t,"open",15,!1),r=d(t,"dir",3,"ltr"),s=d(t,"onOpenChange",3,q),n=d(t,"onOpenChangeComplete",3,q),l=d(t,"_internal_variant",3,"dropdown-menu");const u=wr.create({variant:b(()=>l()),dir:b(()=>r()),onClose:()=>{e(!1),s()(!1)}});Nr.create({open:b(()=>e(),p=>{e(p),s()(p)}),onOpenChangeComplete:b(()=>n())},u),Ne(a,{children:(p,_)=>{var m=k(),g=w(m);x(g,()=>t.children??j),c(p,m)},$$slots:{default:!0}}),M()}var Oo=H("<div><div><!></div></div>"),xo=H("<div><div><!></div></div>");function Ao(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"loop",3,!0),l=d(t,"onInteractOutside",3,q),u=d(t,"onEscapeKeydown",3,q),p=d(t,"onCloseAutoFocus",3,q),_=d(t,"forceMount",3,!1),m=d(t,"trapFocus",3,!1),g=J(t,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const f=kr.create({id:b(()=>r()),loop:b(()=>n()),ref:b(()=>s(),I=>s(I)),onCloseAutoFocus:b(()=>p())}),i=y(()=>W(g,f.props));function h(I){if(f.handleInteractOutside(I),!I.defaultPrevented&&(l()(I),!I.defaultPrevented)){if(I.target&&I.target instanceof Element){const V=`[${f.parentMenu.root.getBitsAttr("sub-content")}]`;if(I.target.closest(V))return}f.parentMenu.onClose()}}function v(I){u()(I),!I.defaultPrevented&&f.parentMenu.onClose()}var N=k(),C=w(N);{var S=I=>{Pe(I,Q(()=>o(i),()=>f.popperProps,{get ref(){return f.opts.ref},get enabled(){return f.parentMenu.opts.open.current},onInteractOutside:h,onEscapeKeydown:v,get trapFocus(){return m()},get loop(){return n()},forceMount:!0,get id(){return r()},get shouldRender(){return f.shouldRender},popper:(U,R)=>{let G=()=>R?.().props,$=()=>R?.().wrapperProps;const Z=y(()=>W(G(),{style:Bt("dropdown-menu")},{style:t.style}));var at=k(),K=w(at);{var B=E=>{var X=k(),et=w(X);{let tt=y(()=>({props:o(Z),wrapperProps:$(),...f.snippetProps}));x(et,()=>t.child,()=>o(tt))}c(E,X)},Y=E=>{var X=Oo();L(X,()=>({...$()}));var et=T(X);L(et,()=>({...o(Z)}));var tt=T(et);x(tt,()=>t.children??j),F(et),F(X),c(E,X)};D(K,E=>{t.child?E(B):E(Y,!1)})}c(U,at)},$$slots:{popper:!0}}))},O=I=>{we(I,Q(()=>o(i),()=>f.popperProps,{get ref(){return f.opts.ref},get open(){return f.parentMenu.opts.open.current},onInteractOutside:h,onEscapeKeydown:v,get trapFocus(){return m()},get loop(){return n()},forceMount:!1,get id(){return r()},get shouldRender(){return f.shouldRender},popper:(U,R)=>{let G=()=>R?.().props,$=()=>R?.().wrapperProps;const Z=y(()=>W(G(),{style:Bt("dropdown-menu")},{style:t.style}));var at=k(),K=w(at);{var B=E=>{var X=k(),et=w(X);{let tt=y(()=>({props:o(Z),wrapperProps:$(),...f.snippetProps}));x(et,()=>t.child,()=>o(tt))}c(E,X)},Y=E=>{var X=xo();L(X,()=>({...$()}));var et=T(X);L(et,()=>({...o(Z)}));var tt=T(et);x(tt,()=>t.children??j),F(et),F(X),c(E,X)};D(K,E=>{t.child?E(B):E(Y,!1)})}c(U,at)},$$slots:{popper:!0}}))};D(C,I=>{_()?I(S):_()||I(O,1)})}c(a,N),M()}var Mo=H("<button><!></button>");function Ro(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"disabled",3,!1),l=d(t,"type",3,"button"),u=J(t,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const p=Sr.create({id:b(()=>r()),disabled:b(()=>n()??!1),ref:b(()=>s(),m=>s(m))}),_=y(()=>W(u,p.props,{type:l()}));ke(a,{get id(){return r()},get ref(){return p.opts.ref},children:(m,g)=>{var f=k(),i=w(f);{var h=N=>{var C=k(),S=w(C);x(S,()=>t.child,()=>({props:o(_)})),c(N,C)},v=N=>{var C=Mo();L(C,()=>({...o(_)}));var S=T(C);x(S,()=>t.children??j),F(C),c(N,C)};D(i,N=>{t.child?N(h):N(v,!1)})}c(m,f)},$$slots:{default:!0}}),M()}const zt=qt({component:"radio-group",parts:["root","item"]}),ie=new xt("RadioGroup.Root");class ae{static create(t){return ie.set(new ae(t))}opts;#t=y(()=>this.opts.value.current!=="");get hasValue(){return o(this.#t)}set hasValue(t){P(this.#t,t)}rovingFocusGroup;attachment;constructor(t){this.opts=t,this.attachment=nt(this.opts.ref),this.rovingFocusGroup=new Ir({rootNode:this.opts.ref,candidateAttr:zt.item,loop:this.opts.loop,orientation:this.opts.orientation})}isChecked(t){return this.opts.value.current===t}setValue(t){this.opts.value.current=t}#e=y(()=>({id:this.opts.id.current,role:"radiogroup","aria-required":Mt(this.opts.required.current),"aria-disabled":Mt(this.opts.disabled.current),"aria-readonly":this.opts.readonly.current?"true":void 0,"data-disabled":dt(this.opts.disabled.current),"data-readonly":dt(this.opts.readonly.current),"data-orientation":this.opts.orientation.current,[zt.root]:"",...this.attachment}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}}class le{static create(t){return new le(t,ie.get())}opts;root;attachment;#t=y(()=>this.root.opts.value.current===this.opts.value.current);get checked(){return o(this.#t)}set checked(t){P(this.#t,t)}#e=y(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=y(()=>this.root.opts.readonly.current);#o=y(()=>this.root.isChecked(this.opts.value.current));#s=z(-1);constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(this.opts.ref),this.opts.value.current===this.root.opts.value.current?(this.root.rovingFocusGroup.setCurrentTabStopId(this.opts.id.current),P(this.#s,0)):this.root.opts.value.current||P(this.#s,0),Ft(()=>{P(this.#s,this.root.rovingFocusGroup.getTabIndex(this.opts.ref.current),!0)}),ot([()=>this.opts.value.current,()=>this.root.opts.value.current],()=>{this.opts.value.current===this.root.opts.value.current&&(this.root.rovingFocusGroup.setCurrentTabStopId(this.opts.id.current),P(this.#s,0))}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onfocus=this.onfocus.bind(this)}onclick(t){this.opts.disabled.current||o(this.#r)||this.root.setValue(this.opts.value.current)}onfocus(t){!this.root.hasValue||o(this.#r)||this.root.setValue(this.opts.value.current)}onkeydown(t){if(!o(this.#e)){if(t.key===Pt){t.preventDefault(),o(this.#r)||this.root.setValue(this.opts.value.current);return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,t,!0)}}#n=y(()=>({checked:o(this.#o)}));get snippetProps(){return o(this.#n)}set snippetProps(t){P(this.#n,t)}#i=y(()=>({id:this.opts.id.current,disabled:o(this.#e)?!0:void 0,"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":dt(o(this.#e)),"data-readonly":dt(o(this.#r)),"data-state":o(this.#o)?"checked":"unchecked","aria-checked":Or(o(this.#o),!1),[zt.item]:"",type:"button",role:"radio",tabindex:o(this.#s),onkeydown:this.onkeydown,onfocus:this.onfocus,onclick:this.onclick,...this.attachment}));get props(){return o(this.#i)}set props(t){P(this.#i,t)}}class de{static create(){return new de(ie.get())}root;#t=y(()=>this.root.opts.name.current!==void 0);get shouldRender(){return o(this.#t)}set shouldRender(t){P(this.#t,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){this.root.rovingFocusGroup.focusCurrentTabStop()}#e=y(()=>({name:this.root.opts.name.current,value:this.root.opts.value.current,required:this.root.opts.required.current,disabled:this.root.opts.disabled.current,onfocus:this.onfocus}));get props(){return o(this.#e)}set props(t){P(this.#e,t)}}function To(a,t){A(t,!1);const e=de.create();Ot();var r=k(),s=w(r);{var n=l=>{Ce(l,Q(()=>e.props))};D(s,l=>{e.shouldRender&&l(n)})}c(a,r),M()}var Fo=H("<div><!></div>"),Do=H("<!> <!>",1);function Vo(a,t){const e=st();A(t,!0);let r=d(t,"disabled",3,!1),s=d(t,"value",15,""),n=d(t,"ref",15,null),l=d(t,"orientation",3,"vertical"),u=d(t,"loop",3,!0),p=d(t,"name",3,void 0),_=d(t,"required",3,!1),m=d(t,"readonly",3,!1),g=d(t,"id",19,()=>it(e)),f=d(t,"onValueChange",3,q),i=J(t,["$$slots","$$events","$$legacy","disabled","children","child","value","ref","orientation","loop","name","required","readonly","id","onValueChange"]);const h=ae.create({orientation:b(()=>l()),disabled:b(()=>r()),loop:b(()=>u()),name:b(()=>p()),required:b(()=>_()),readonly:b(()=>m()),id:b(()=>g()),value:b(()=>s(),V=>{V!==s()&&(s(V),f()?.(V))}),ref:b(()=>n(),V=>n(V))}),v=y(()=>W(i,h.props));var N=Do(),C=w(N);{var S=V=>{var U=k(),R=w(U);x(R,()=>t.child,()=>({props:o(v)})),c(V,U)},O=V=>{var U=Fo();L(U,()=>({...o(v)}));var R=T(U);x(R,()=>t.children??j),F(U),c(V,U)};D(C,V=>{t.child?V(S):V(O,!1)})}var I=mt(C,2);To(I,{}),c(a,N),M()}var Ho=H("<button><!></button>");function Eo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"disabled",3,!1),n=d(t,"ref",15,null),l=J(t,["$$slots","$$events","$$legacy","id","children","child","value","disabled","ref"]);const u=le.create({value:b(()=>t.value),disabled:b(()=>s()??!1),id:b(()=>r()),ref:b(()=>n(),i=>n(i))}),p=y(()=>W(l,u.props));var _=k(),m=w(_);{var g=i=>{var h=k(),v=w(h);{let N=y(()=>({props:o(p),...u.snippetProps}));x(v,()=>t.child,()=>o(N))}c(i,h)},f=i=>{var h=Ho();L(h,()=>({...o(p)}));var v=T(h);x(v,()=>t.children??j,()=>u.snippetProps),F(h),c(i,h)};D(m,i=>{t.child?i(g):i(f,!1)})}c(a,_),M()}var Ko=H("<!> <!>",1);function Bo(a,t){A(t,!0);let e=d(t,"value",15),r=d(t,"onValueChange",3,q),s=d(t,"name",3,""),n=d(t,"disabled",3,!1),l=d(t,"open",15,!1),u=d(t,"onOpenChange",3,q),p=d(t,"onOpenChangeComplete",3,q),_=d(t,"loop",3,!1),m=d(t,"scrollAlignment",3,"nearest"),g=d(t,"required",3,!1),f=d(t,"items",19,()=>[]),i=d(t,"allowDeselect",3,!1);function h(){e()===void 0&&e(t.type==="single"?"":[])}h(),ot.pre(()=>e(),()=>{h()});let v=z("");const N=lo.create({type:t.type,value:b(()=>e(),R=>{e(R),r()(R)}),disabled:b(()=>n()),required:b(()=>g()),open:b(()=>l(),R=>{l(R),u()(R)}),loop:b(()=>_()),scrollAlignment:b(()=>m()),name:b(()=>s()),isCombobox:!1,items:b(()=>f()),allowDeselect:b(()=>i()),inputValue:b(()=>o(v),R=>P(v,R,!0)),onOpenChangeComplete:b(()=>p())});var C=Ko(),S=w(C);Ne(S,{children:(R,G)=>{var $=k(),Z=w($);x(Z,()=>t.children??j),c(R,$)},$$slots:{default:!0}});var O=mt(S,2);{var I=R=>{var G=k(),$=w(G);{var Z=K=>{Et(K,{get autocomplete(){return t.autocomplete}})},at=K=>{var B=k(),Y=w(B);Mr(Y,16,()=>N.opts.value.current,E=>E,(E,X)=>{Et(E,{get value(){return X},get autocomplete(){return t.autocomplete}})}),c(K,B)};D($,K=>{N.opts.value.current.length===0?K(Z):K(at,!1)})}c(R,G)},V=y(()=>Array.isArray(N.opts.value.current)),U=R=>{Et(R,{get autocomplete(){return t.autocomplete},get value(){return N.opts.value.current},set value(G){N.opts.value.current=G}})};D(O,R=>{o(V)?R(I):R(U,!1)})}c(a,C),M()}var zo=H("<button><!></button>");function Lo(a,t){const e=st();A(t,!0);let r=d(t,"id",19,()=>it(e)),s=d(t,"ref",15,null),n=d(t,"type",3,"button"),l=J(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const u=re.create({id:b(()=>r()),ref:b(()=>s(),g=>s(g))}),p=y(()=>W(l,u.props,{type:n()}));var _=k(),m=w(_);rt(m,()=>ke,(g,f)=>{f(g,{get id(){return r()},get ref(){return u.opts.ref},children:(i,h)=>{var v=k(),N=w(v);{var C=O=>{var I=k(),V=w(I);x(V,()=>t.child,()=>({props:o(p)})),c(O,I)},S=O=>{var I=zo();L(I,()=>({...o(p)}));var V=T(I);x(V,()=>t.children??j),F(I),c(O,I)};D(N,O=>{t.child?O(C):O(S,!1)})}c(i,v)},$$slots:{default:!0}})}),c(a,_),M()}const ms=Io,ys=Ro,bs=ee,_s=Ao,Cs=yo,Ps=_o;function ws(a,t){A(t,!0);let e=d(t,"ref",15,null),r=d(t,"value",15,""),s=J(t,["$$slots","$$events","$$legacy","ref","class","value"]);var n=k(),l=w(n);{let u=y(()=>ht("grid gap-0.5 w-full",t.class));rt(l,()=>Vo,(p,_)=>{_(p,Q({"data-slot":"radio-group",get class(){return o(u)}},()=>s,{get ref(){return e()},set ref(m){e(m)},get value(){return r()},set value(m){r(m)}}))})}c(a,n),M()}var Uo=H('<span class="radio-dot svelte-l8hbh2"></span>');function Ns(a,t){A(t,!0);let e=d(t,"ref",15,null),r=J(t,["$$slots","$$events","$$legacy","ref","class"]);var s=k(),n=w(s);{const l=(p,_)=>{let m=()=>_?.().checked;var g=k(),f=w(g);{var i=h=>{var v=Uo();c(h,v)};D(f,h=>{m()&&h(i)})}c(p,g)};let u=y(()=>ht("radio-item",t.class));rt(n,()=>Eo,(p,_)=>{_(p,Q({"data-slot":"radio-group-item",get class(){return o(u)}},()=>r,{get ref(){return e()},set ref(m){e(m)},children:l,$$slots:{default:!0}}))})}c(a,s),M()}function qo(){let a=z(Be({})),t=null,e=null;function r(i,h,v){e&&(clearInterval(e),e=null),t=`${i}/${h}/${v}`,n("enter",i,h,v),e=setInterval(()=>{t&&n("heartbeat",i,h,v)},3e4)}function s(){if(e&&(clearInterval(e),e=null),t){const[i,h,v]=t.split("/");i&&h&&v&&n("leave",i,h,v),t=null}}function n(i,h,v,N){Jt.send({type:"presence",action:i,repo:h,entityType:v,entityId:N})}function l(i){const h=`${i.repo}/${i.entityType}/${i.entityId}`,v=o(a)[h]??[];if(i.action==="leave")o(a)[h]=v.filter(N=>N.id!==i.user.id);else{const N=v.findIndex(C=>C.id===i.user.id);N>=0?(v[N]=i.user,o(a)[h]=[...v]):o(a)[h]=[...v,i.user]}}function u(){if(P(a,{},!0),!t)return;const[i,h,v]=t.split("/");i&&h&&v&&n("enter",i,h,v)}function p(i,h,v,N){const C=`${i}/${h}/${v}`,S=o(a)[C]??[];return N?S.filter(O=>O.id!==N):S}function _(i,h){const v=new Map;for(const[N,C]of Object.entries(o(a)))if(N.startsWith(i))for(const S of C)(!h||S.id!==h)&&v.set(S.id,S);return[...v.values()]}function m(i,h){return _(`${i}/`,h)}function g(i){const h=new Map;for(const v of Object.values(o(a)))for(const N of v)(!i||N.id!==i)&&h.set(N.id,N);return[...h.values()]}const f=y(()=>{const i=new Map;for(const h of Object.values(o(a)))for(const v of h)i.set(v.id,v);return[...i.values()]});return{enter:r,leave:s,handlePresenceEvent:l,resetAndResend:u,getPresence:p,getPresenceByPrefix:_,getRepoPresence:m,getAllUsers:g,get allUsers(){return o(f)}}}const he=qo();Jt.setPresenceHandler(a=>he.handlePresenceEvent(a));Jt.addConnectHandler(()=>he.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>he.leave());var Wo=H('<span class="select-placeholder"> </span>'),Go=H('<span class="select-label"><!></span> <!>',1);function ks(a,t){A(t,!0);let e=d(t,"placeholder",3,"Select..."),r=d(t,"size",3,"default"),s=J(t,["$$slots","$$events","$$legacy","children","value","placeholder","class","size"]);var n=k(),l=w(n);{let u=y(()=>ht("select-trigger",r()==="sm"&&"select-trigger-sm",t.class));rt(l,()=>Lo,(p,_)=>{_(p,Q({get class(){return o(u)}},()=>s,{children:(m,g)=>{var f=Go(),i=w(f),h=T(i);{var v=O=>{var I=k(),V=w(I);x(V,()=>t.children),c(O,I)},N=O=>{var I=qe();ct(()=>Ct(I,t.value)),c(O,I)},C=O=>{var I=Wo(),V=T(I,!0);F(I),ct(()=>Ct(V,e())),c(O,I)};D(h,O=>{t.children?O(v):t.value?O(N,1):O(C,!1)})}F(i);var S=mt(i,2);{let O=y(()=>r()==="sm"?12:14);zr(S,{get size(){return o(O)},class:"select-chevron"})}c(m,f)},$$slots:{default:!0}}))})}c(a,n),M()}function Ss(a,t){A(t,!0);let e=d(t,"side",3,"bottom"),r=d(t,"sideOffset",3,4),s=J(t,["$$slots","$$events","$$legacy","children","class","side","sideOffset"]);var n=k(),l=w(n);rt(l,()=>ee,(u,p)=>{p(u,{children:(_,m)=>{var g=k(),f=w(g);{let i=y(()=>ht("select-content",t.class));rt(f,()=>co,(h,v)=>{v(h,Q({get class(){return o(i)},get side(){return e()},get sideOffset(){return r()}},()=>s,{children:(N,C)=>{var S=k(),O=w(S);x(O,()=>t.children),c(N,S)},$$slots:{default:!0}}))})}c(_,g)},$$slots:{default:!0}})}),c(a,n),M()}var Yo=H('<span class="select-item-text"> </span>'),jo=H("<!> <!>",1);function Is(a,t){A(t,!0);let e=d(t,"disabled",3,!1),r=J(t,["$$slots","$$events","$$legacy","value","label","disabled","class","content"]);var s=k(),n=w(s);{const l=(p,_)=>{let m=()=>_?.().selected;var g=jo(),f=w(g);{var i=C=>{var S=k(),O=w(S);x(O,()=>t.content,()=>({selected:m()})),c(C,S)},h=C=>{var S=Yo(),O=T(S,!0);F(S),ct(()=>Ct(O,t.label??t.value)),c(C,S)};D(f,C=>{t.content?C(i):C(h,!1)})}var v=mt(f,2);{var N=C=>{xr(C,{size:12,class:"select-item-check"})};D(v,C=>{m()&&C(N)})}c(p,g)};let u=y(()=>ht("select-item",t.class));rt(n,()=>vo,(p,_)=>{_(p,Q({get value(){return t.value},get label(){return t.label},get disabled(){return e()},get class(){return o(u)}},()=>r,{children:l,$$slots:{default:!0}}))})}c(a,s),M()}const Os=Bo;function xs(a,t){A(t,!0);let e=d(t,"open",15,!1),r=J(t,["$$slots","$$events","$$legacy","open","onOpenChange","children"]);var s=k(),n=w(s);rt(n,()=>Co,(l,u)=>{u(l,Q({get onOpenChange(){return t.onOpenChange}},()=>r,{get open(){return e()},set open(p){e(p)},children:(p,_)=>{var m=k(),g=w(m);x(g,()=>t.children),c(p,m)},$$slots:{default:!0}}))}),c(a,s),M()}var Jo=H("<!> <!>",1);function As(a,t){A(t,!0);let e=d(t,"size",3,"md"),r=J(t,["$$slots","$$events","$$legacy","children","class","size"]);var s=k(),n=w(s);rt(n,()=>ee,(l,u)=>{u(l,{children:(p,_)=>{var m=Jo(),g=w(m);rt(g,()=>to,(i,h)=>{h(i,{class:"dialog-overlay"})});var f=mt(g,2);{let i=y(()=>ht("dialog-content",`dialog-${e()}`,t.class));rt(f,()=>So,(h,v)=>{v(h,Q({get class(){return o(i)}},()=>r,{children:(N,C)=>{var S=k(),O=w(S);x(O,()=>t.children),c(N,S)},$$slots:{default:!0}}))})}c(p,m)},$$slots:{default:!0}})}),c(a,s),M()}var Xo=H("<div><!></div>");function Ms(a,t){A(t,!0);var e=Xo(),r=T(e);x(r,()=>t.children),F(e),ct(s=>Ut(e,1,s),[()=>Lt(ht("dialog-header",t.class))]),c(a,e),M()}function Rs(a,t){A(t,!0);var e=k(),r=w(e);{let s=y(()=>ht("dialog-title",t.class));rt(r,()=>Gr,(n,l)=>{l(n,{get class(){return o(s)},children:(u,p)=>{var _=k(),m=w(_);x(m,()=>t.children),c(u,_)},$$slots:{default:!0}})})}c(a,e),M()}var Zo=H("<div><!></div>");function Ts(a,t){A(t,!0);var e=Zo(),r=T(e);x(r,()=>t.children),F(e),ct(s=>Ut(e,1,s),[()=>Lt(ht("dialog-body",t.class))]),c(a,e),M()}var Qo=H("<div><!></div>");function Fs(a,t){A(t,!0);var e=Qo(),r=T(e);x(r,()=>t.children),F(e),ct(s=>Ut(e,1,s),[()=>Lt(ht("dialog-footer",t.class))]),c(a,e),M()}function Ds(a,t){A(t,!0);var e=k(),r=w(e);{let s=y(()=>ht("dialog-close-btn",t.class));rt(r,()=>wo,(n,l)=>{l(n,{get class(){return o(s)},children:(u,p)=>{Ar(u,{size:16})},$$slots:{default:!0}})})}c(a,e),M()}function $o(a){const t=a.replace(/^\[\[|\]\]$/g,"").split("|")[0].trim();if(!t)return null;for(const e of Rr.repos){const r=e.entities.find(s=>s.id===t);if(r)return{id:r.id,title:r.title,entityType:r.entityType,repo:e.name,url:`/${e.name}/${r.entityType}/${r.id}`}}return null}function Vs(a){if(!a)return[];const t=a.replace(/\[\[|\]\]/g,"").split(",").map(r=>r.trim()).filter(Boolean),e=[];for(const r of t){const s=$o(r);s&&e.push(s)}return e}function Hs(a){const t=a.replace(/^\[\[|\]\]$/g,""),e=t.indexOf("|");if(e!==-1){const r=t.slice(e+1).trim();if(r)return r}return t.split("|")[0].trim().replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())}var ts=bt("<title> </title>"),es=bt('<svg><!><path d="M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"></path></svg>');function Es(a,t){const e=yt(t,["children","$$slots","$$events","$$legacy"]),r=yt(e,["size","title"]);A(t,!1);const s=vt(),n=vt();let l=d(t,"size",8,16),u=d(t,"title",8,void 0);gt(()=>(lt(e),lt(u())),()=>{P(s,e["aria-label"]||e["aria-labelledby"]||u())}),gt(()=>(o(s),lt(e)),()=>{P(n,{"aria-hidden":o(s)?void 0:!0,role:o(s)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Rt(),Ot();var p=es();L(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:l(),height:l(),...o(n),...r}));var _=T(p);{var m=g=>{var f=ts(),i=T(f,!0);F(f),ct(()=>Ct(i,u())),c(g,f)};D(_,g=>{u()&&g(m)})}Tt(),F(p),c(a,p),M()}export{Oe as A,Gr as B,zr as C,As as D,to as E,vs as F,lo as G,Et as H,Cs as I,Re as J,oe as K,vo as L,bs as P,ws as R,Ps as S,ys as T,Ms as a,Ds as b,Ts as c,Rs as d,Fs as e,Hs as f,xs as g,_s as h,ms as i,fs as j,Fr as k,Ns as l,Vs as m,Es as n,ks as o,he as p,Ss as q,$o as r,Os as s,Is as t,gs as u,Xt as v,Se as w,$t as x,Ie as y,ee as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DsoI6Vso.js","./txOdadJq.js","./CoIXzWkc.js","./DFYOFE3o.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as V}from"./PPVm8Dsz.js";import{g as T,s as a,e as S}from"./txOdadJq.js";import{i as Y}from"./
|
|
2
|
+
import{_ as V}from"./PPVm8Dsz.js";import{g as T,s as a,e as S}from"./txOdadJq.js";import{i as Y}from"./DaY9NWsg.js";import{w as u}from"./-wxjF91G.js";import{a as Z}from"./BbSP3Sm9.js";import{n as h}from"./BwrgIV17.js";import{u as U}from"./CoIXzWkc.js";import{t as s}from"./QFQ05a0D.js";const q=800;function K(){let e=S(!1),n=S(null),r=S(null),t=null,o=null,l=!1;function J(d,y,f,c){t&&t.repo===d&&t.type===y&&t.id===f?(c.data!==void 0&&(t.payload.data=c.data),c.content!==void 0&&(t.payload.content=c.content)):t={repo:d,type:y,id:f,payload:{...c}},j()}function j(){o&&clearTimeout(o),o=setTimeout(E,q)}async function E(){if(o=null,!l&&t){const{repo:d,type:y,id:f,payload:c}=t;t=null,l=!0,a(e,!0),a(r,null);try{if(await U(d,y,f,c),a(n,new Date,!0),c.data?.name){const g=u.repos.find(H=>H.name===d)?.entities.find(H=>H.id===f);g&&(g.title=c.data.name)}}catch(p){a(r,p.message??"Save failed",!0);const g=p.status??p.statusCode;(!g||g>=500)&&(t={repo:d,type:y,id:f,payload:c})}finally{a(e,!1),l=!1,t&&E()}}}function z(){o&&(clearTimeout(o),o=null),t&&E()}async function G(d,y,f,c){a(e,!0),a(r,null);try{const p=await U(d,y,f,c);return a(n,new Date,!0),p}catch(p){return a(r,p.message??"Save failed",!0),null}finally{a(e,!1)}}function L(){a(r,null),a(n,null),t=null,o&&(clearTimeout(o),o=null)}return{get saving(){return T(e)},get lastSaved(){return T(n)},get error(){return T(r)},get hasPending(){return!!(t||l)},scheduleAutoSave:J,flush:z,saveEntity:G,reset:L}}const Q=K();let i=null,I=null,O=null,M=null,C=null,D=null,N=null,P=null,W=null,R=null,F=[],$=null,w=1e3,k=S(!1),B=S(null);const m=new Map,_={},A={};function b(e,n){m.delete(e);const r=n.entities.length,t=r===1?`${e} updated ${n.entities[0]}`:`${e} updated ${r} entities`;s(t)}function X(e){for(const[n,r]of m)r.repo===e&&(clearTimeout(r.timer),m.delete(n))}function v(e){const n=Z.user?.displayName;if(e.type==="sync_progress"){const r=_[e.repo];if(r){const t=e.message.trim(),o=t.match(/^Syncing from source:\s*(.+)$/i);o&&(A[e.repo]=`Syncing ${o[1].trim()}…`);const l=A[e.repo]??`Syncing ${e.repo}…`;s.loading(l,{id:r,description:t,duration:36e5})}return}if(e.type==="entity_change"){if(n&&e.actor===n&&e.source==="api"){u.refreshEntities(e.repo);return}if(u.refreshEntities(e.repo),h.selectedRepo===e.repo&&h.selectedType===e.entityType&&h.selectedId===e.entityId){Q.hasPending?s(`${e.actor} also saved changes to this entity`):Y();return}const t=m.get(e.actor);if(t)clearTimeout(t.timer),t.entities.includes(e.entityId)||t.entities.push(e.entityId),t.timer=setTimeout(()=>b(e.actor,t),1e4);else{const o={entities:[e.entityId],repo:e.repo,timer:setTimeout(()=>b(e.actor,o),1e4)};m.set(e.actor,o)}return}if(e.type==="session_commit"){if(n&&e.actor===n){a(B,e.timestamp,!0);return}const r=e.entities.length,t=r===1?`${e.actor} saved changes to ${e.entities[0]}`:`${e.actor} saved ${r} changes in ${e.repo}`;s(t),u.refreshEntities(e.repo);return}if(e.type==="sync_complete"){if(X(e.repo),!_[e.repo]){const r=e.created+e.updated+e.deleted,t=r===0?`Sync complete · no changes in ${e.repo}`:`Sync complete · ${r} ${r===1?"entity":"entities"} from ${e.source}`;s.success(t)}u.refreshEntities(e.repo);return}if(e.type==="collection_created"){s(`${e.actor} created folder ${e.repo}`),u.refreshEntities(e.repo);return}if(e.type==="collection_deleted"){s(`${e.actor} deleted folder ${e.repo}`);return}if(e.type==="repo_sync"){s(`${e.actor} pushed to ${e.repo}`),u.refreshEntities(e.repo);return}if(e.type==="collection_message"){M?.(e);return}if(e.type==="message_update"){C?.(e);return}if(e.type==="collection_agent_thinking"){D?.(e);return}if(e.type==="workspace_message"){P?.(e);return}if(e.type==="workspace_message_update"){W?.(e);return}if(e.type==="workspace_agent_thinking"){R?.(e);return}if(e.type==="user_mention"){N?.(e);return}if(e.type==="presence"){I?.(e);return}if(e.type==="online"){O?.(e);return}if(e.type==="insights_updated"||e.type==="briefing_updated"){V(()=>import("./DsoI6Vso.js"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(r=>r.insightsStore.load());return}if(e.type==="access_granted"){u.onFolderAccessGranted(e.repo);return}if(e.type==="access_revoked"){h.selectedRepo===e.repo&&h.deselect(),u.onFolderAccessRevoked(e.repo);return}}function x(){if(typeof window>"u"||i&&(i.readyState===WebSocket.OPEN||i.readyState===WebSocket.CONNECTING))return;const e=window.location.protocol==="https:"?"wss:":"ws:",n=(()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}})(),r=`${e}//${window.location.host}/ws?tz=${encodeURIComponent(n)}`;i=new WebSocket(r),i.binaryType="arraybuffer",i.onopen=()=>{a(k,!0),w=1e3,u.refreshAll();for(const t of F)t()},i.onmessage=t=>{if(!(t.data instanceof ArrayBuffer))try{const o=JSON.parse(t.data);if(o?.type==="ping"){i?.send(JSON.stringify({type:"pong"}));return}const l=o;l.type&&l.type!=="toast"&&v(l)}catch{}},i.onclose=()=>{a(k,!1),i=null,$=setTimeout(()=>{w=Math.min(w*2,1e4),x()},w)},i.onerror=()=>{}}function ee(){$&&(clearTimeout($),$=null),i&&(i.close(),i=null),a(k,!1);for(const[,e]of m)clearTimeout(e.timer);m.clear()}function te(e,n=4e3){s(e,{duration:n})}function re(e,n){const r=crypto.randomUUID();return n?.loading?s.loading(e,{id:r,duration:36e5}):s(e,{id:r}),r}function ne(e,n,r){if(r?.loading){s.loading(n,{id:e});return}/failed|error/i.test(n)?s.error(n,{id:e,duration:r?.duration??6e3}):s.success(n,{id:e,duration:r?.duration??4e3})}function oe(e){const n=crypto.randomUUID();_[e]=n,s.loading(`Syncing ${e}…`,{id:n,duration:36e5})}function ie(e,n,r){const t=_[e];t&&(delete _[e],delete A[e],r?s.error(n,{id:t,duration:6e3}):s.success(n,{id:t,duration:4e3}))}function se(e){I=e}function ae(e){O=e}function ce(e){M=e}function le(e){C=e}function ue(e){D=e}function de(e){N=e}function fe(e){P=e}function pe(e){W=e}function ye(e){R=e}function me(e){F.push(e)}function ge(e){i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify(e))}const He={get connected(){return T(k)},get lastAutoSaved(){return T(B)},get ws(){return i},connect:x,disconnect:ee,showToast:te,showPersistentToast:re,updateToast:ne,startSyncToast:oe,finishSyncToast:ie,send:ge,setPresenceHandler:se,setOnlineHandler:ae,setMessagesHandler:ce,setMessageUpdateHandler:le,setAgentThinkingHandler:ue,setUserMentionHandler:de,setWorkspaceMessagesHandler:fe,setWorkspaceMessageUpdateHandler:pe,setWorkspaceAgentThinkingHandler:ye,addConnectHandler:me};export{Q as e,He as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./DsnmJJEf.js";import{i as ae}from"./DpgUPK2a.js";import{p as b,l as C,s as $,d as y,g as i,a as re,c as A,n as E,r as p,b as x,m as S,t as R,f as m,I as le,u as F,h as ie,e as $e}from"./txOdadJq.js";import{a as u,s as N,f as Z,c as z,p as we,b as k,t as be}from"./9gtwoV4P.js";import{l as O,p as c,i as D,r as L,s as V,b as Ce}from"./BCLL87Av.js";import{a as H,s as Y}from"./ypcxmEdT.js";import{c as M}from"./DerefRkG.js";import{n as se,f as B,j as ye,m as de,t as Oe,u as Ze,v as Le,x as De,y as Fe,z as Pe}from"./CUbaOWk8.js";import{v as He,w as Ve,A as Be,x as Ee,y as Re,z as Ne,B as Ye,E as ke}from"./CKldh8Tn.js";import{c as Q,a as xe}from"./BI-a4gre.js";var Ie=Z("<title> </title>"),Ke=Z('<svg><!><path d="M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z"></path><path d="M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z"></path></svg>');function Rt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=Ke();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=Ie(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}var Te=Z("<title> </title>"),je=Z('<svg><!><path d="M5.24,22.51l1.43-1.42A14.06,14.06,0,0,1,3.07,16C5.1,10.93,10.7,7,16,7a12.38,12.38,0,0,1,4,.72l1.55-1.56A14.72,14.72,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16,16,0,0,0,5.24,22.51Z"></path><path d="M12,15.73a4,4,0,0,1,3.7-3.7l1.81-1.82a6,6,0,0,0-7.33,7.33Z"></path><path d="M30.94,15.66A16.4,16.4,0,0,0,25.2,8.22L30,3.41,28.59,2,2,28.59,3.41,30l5.1-5.1A15.29,15.29,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM20,16a4,4,0,0,1-6,3.44L19.44,14A4,4,0,0,1,20,16Zm-4,9a13.05,13.05,0,0,1-6-1.58l2.54-2.54a6,6,0,0,0,8.35-8.35l2.87-2.87A14.54,14.54,0,0,1,28.93,16C26.9,21.07,21.3,25,16,25Z"></path></svg>');function Nt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=je();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=Te(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(3),p(l),u(d,l),x()}var We=Z("<title> </title>"),qe=Z('<svg><!><circle cx="8" cy="16" r="2"></circle><circle cx="16" cy="16" r="2"></circle><circle cx="24" cy="16" r="2"></circle></svg>');function Yt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=qe();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=We(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(3),p(l),u(d,l),x()}var Ge=Z("<title> </title>"),Je=Z('<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 kt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=Je();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=Ge(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}function Qe(d,e){b(e,!0);let t=c(e,"open",15,!1),f=c(e,"onOpenChange",3,se),a=c(e,"onOpenChangeComplete",3,se);He.create({variant:B(()=>"alert-dialog"),open:B(()=>t(),r=>{t(r),f()(r)}),onOpenChangeComplete:B(()=>a())});var s=z(),n=m(s);Y(n,()=>e.children??le),u(d,s),x()}var Ue=k("<button><!></button>");function Xe(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=L(e,["$$slots","$$events","$$legacy","children","child","id","ref"]);const n=Ve.create({id:B(()=>f()),ref:B(()=>a(),o=>a(o))}),r=F(()=>de(s,n.props));var l=z(),h=m(l);{var _=o=>{var v=z(),P=m(v);Y(P,()=>e.child,()=>({props:i(r)})),u(o,v)},g=o=>{var v=Ue();H(v,()=>({...i(r)}));var P=A(v);Y(P,()=>e.children??le),p(v),u(o,v)};D(h,o=>{e.child?o(_):o(g,!1)})}u(d,l),x()}var et=k("<button><!></button>");function tt(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=c(e,"disabled",3,!1),n=L(e,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const r=Be.create({id:B(()=>f()),ref:B(()=>a(),v=>a(v)),disabled:B(()=>!!s())}),l=F(()=>de(n,r.props));var h=z(),_=m(h);{var g=v=>{var P=z(),w=m(P);Y(w,()=>e.child,()=>({props:i(l)})),u(v,P)},o=v=>{var P=et();H(P,()=>({...i(l)}));var w=A(P);Y(w,()=>e.children??le),p(P),u(v,P)};D(_,v=>{e.child?v(g):v(o,!1)})}u(d,h),x()}var at=k("<!> <!>",1),rt=k("<!> <div><!></div>",1);function lt(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=c(e,"forceMount",3,!1),n=c(e,"interactOutsideBehavior",3,"ignore"),r=c(e,"onCloseAutoFocus",3,se),l=c(e,"onEscapeKeydown",3,se),h=c(e,"onOpenAutoFocus",3,se),_=c(e,"onInteractOutside",3,se),g=c(e,"preventScroll",3,!0),o=c(e,"trapFocus",3,!0),v=c(e,"restoreScrollDelay",3,null),P=L(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const w=Ee.create({id:B(()=>f()),ref:B(()=>a(),X=>a(X))}),U=F(()=>de(P,w.props));var Ae=z(),ge=m(Ae);{var he=X=>{Oe(X,{get ref(){return w.opts.ref},loop:!0,get trapFocus(){return o()},get enabled(){return w.root.opts.open.current},get onCloseAutoFocus(){return r()},onOpenAutoFocus:K=>{h()(K),!K.defaultPrevented&&(K.preventDefault(),Ze(0,()=>w.opts.ref.current?.focus()))},focusScope:(K,ce)=>{let me=()=>ce?.().props;Le(K,V(()=>i(U),{get enabled(){return w.root.opts.open.current},get ref(){return w.opts.ref},onEscapeKeydown:I=>{l()(I),!I.defaultPrevented&&w.root.handleClose()},children:(I,ne)=>{De(I,V(()=>i(U),{get ref(){return w.opts.ref},get enabled(){return w.root.opts.open.current},get interactOutsideBehavior(){return n()},onInteractOutside:W=>{_()(W),!W.defaultPrevented&&w.root.handleClose()},children:(W,q)=>{Fe(W,V(()=>i(U),{get ref(){return w.opts.ref},get enabled(){return w.root.opts.open.current},children:(T,G)=>{var J=z(),j=m(J);{var ee=oe=>{var ue=at(),fe=m(ue);{var ve=te=>{Pe(te,{get preventScroll(){return g()},get restoreScrollDelay(){return v()}})};D(fe,te=>{w.root.opts.open.current&&te(ve)})}var pe=ie(fe,2);{let te=F(()=>({props:de(i(U),me()),...w.snippetProps}));Y(pe,()=>e.child,()=>i(te))}u(oe,ue)},Se=oe=>{var ue=rt(),fe=m(ue);Pe(fe,{get preventScroll(){return g()}});var ve=ie(fe,2);H(ve,te=>({...te}),[()=>de(i(U),me())]);var pe=A(ve);Y(pe,()=>e.children??le),p(ve),u(oe,ue)};D(j,oe=>{e.child?oe(ee):oe(Se,!1)})}u(T,J)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};D(ge,X=>{(w.shouldRender||s())&&X(he)})}u(d,Ae),x()}var nt=k("<div><!></div>");function ot(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=L(e,["$$slots","$$events","$$legacy","id","children","child","ref"]);const n=Re.create({id:B(()=>f()),ref:B(()=>a(),o=>a(o))}),r=F(()=>de(s,n.props));var l=z(),h=m(l);{var _=o=>{var v=z(),P=m(v);Y(P,()=>e.child,()=>({props:i(r)})),u(o,v)},g=o=>{var v=nt();H(v,()=>({...i(r)}));var P=A(v);Y(P,()=>e.children??le),p(v),u(o,v)};D(h,o=>{e.child?o(_):o(g,!1)})}u(d,l),x()}var st=Z("<title> </title>"),it=Z('<svg><!><path d="M28,8H16L12.59,4.59A2,2,0,0,0,11.17,4H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM22,26H14V25a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1Zm6,0H24V25a3,3,0,0,0-3-3H15a3,3,0,0,0-3,3v1H4V6h7.17l3.42,3.41.58.59H28Z"></path><path d="M14,17a4,4,0,1,0,4-4A4,4,0,0,0,14,17Zm4-2a2,2,0,1,1-2,2A2,2,0,0,1,18,15Z"></path></svg>');function It(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=it();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=st(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}var dt=Z("<title> </title>"),ct=Z('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function Kt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=ct();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=dt(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}function ut(d,e){b(e,!0);let t=c(e,"open",15,!1),f=L(e,["$$slots","$$events","$$legacy","open"]);var a=z(),s=m(a);M(s,()=>Qe,(n,r)=>{r(n,V(()=>f,{get open(){return t()},set open(l){t(l)}}))}),u(d,a),x()}function ft(d,e){let t=L(e,["$$slots","$$events","$$legacy"]);var f=z(),a=m(f);M(a,()=>Ne,(s,n)=>{n(s,V(()=>t))}),u(d,f)}function vt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>Q("text-lg font-semibold",e.class));M(s,()=>Ye,(r,l)=>{l(r,V({"data-slot":"alert-dialog-title",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}function gt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>e.class||Q(xe()));M(s,()=>Xe,(r,l)=>{l(r,V({"data-slot":"alert-dialog-action",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}function ht(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>e.class||Q(xe({variant:"ghost"})));M(s,()=>tt,(r,l)=>{l(r,V({"data-slot":"alert-dialog-cancel",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}var _t=k("<div><!></div>");function mt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=_t();H(a,n=>({"data-slot":"alert-dialog-footer",class:n,...f}),[()=>Q("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class)]);var s=A(a);Y(s,()=>e.children??le),p(a),Ce(a,n=>t(n),()=>t()),u(d,a),x()}var bt=k("<div><!></div>");function xt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=bt();H(a,n=>({"data-slot":"alert-dialog-header",class:n,...f}),[()=>Q("flex flex-col gap-2 text-center sm:text-start",e.class)]);var s=A(a);Y(s,()=>e.children??le),p(a),Ce(a,n=>t(n),()=>t()),u(d,a),x()}function wt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>Q("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/50",e.class));M(s,()=>ke,(r,l)=>{l(r,V({"data-slot":"alert-dialog-overlay",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}var yt=k("<!> <!>",1);function At(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class","portalProps"]);ft(d,V(()=>e.portalProps,{children:(a,s)=>{var n=yt(),r=m(n);wt(r,{});var l=ie(r,2);{let h=F(()=>Q("bg-[var(--color-bg-elevated)] border-[var(--color-border)] text-[var(--color-text-primary)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[1001] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e.class));M(l,()=>lt,(_,g)=>{g(_,V({"data-slot":"alert-dialog-content",get class(){return i(h)}},()=>f,{get ref(){return t()},set ref(o){t(o)}}))})}u(a,n)},$$slots:{default:!0}})),x()}function pt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>Q("text-[var(--color-text-secondary)] text-sm",e.class));M(s,()=>ot,(r,l)=>{l(r,V({"data-slot":"alert-dialog-description",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}var Pt=k("<!> <!>",1),zt=k("<!> <!>",1),Mt=k("<!> <!>",1);function Tt(d,e){b(e,!0);let t=c(e,"open",15),f=c(e,"confirmLabel",3,"Confirm"),a=c(e,"cancelLabel",3,"Cancel"),s=c(e,"destructive",3,!1);var n=z(),r=m(n);M(r,()=>ut,(l,h)=>{h(l,{onOpenChange:_=>{_||e.oncancel()},get open(){return t()},set open(_){t(_)},children:(_,g)=>{var o=z(),v=m(o);M(v,()=>At,(P,w)=>{w(P,{children:(U,Ae)=>{var ge=Mt(),he=m(ge);M(he,()=>xt,(_e,K)=>{K(_e,{children:(ce,me)=>{var I=Pt(),ne=m(I);M(ne,()=>vt,(q,T)=>{T(q,{children:(G,J)=>{E();var j=be();R(()=>N(j,e.title)),u(G,j)},$$slots:{default:!0}})});var W=ie(ne,2);M(W,()=>pt,(q,T)=>{T(q,{children:(G,J)=>{E();var j=be();R(()=>N(j,e.message)),u(G,j)},$$slots:{default:!0}})}),u(ce,I)},$$slots:{default:!0}})});var X=ie(he,2);M(X,()=>mt,(_e,K)=>{K(_e,{children:(ce,me)=>{var I=zt(),ne=m(I);{let q=F(()=>xe({variant:"ghost"}));M(ne,()=>ht,(T,G)=>{G(T,{get class(){return i(q)},get onclick(){return e.oncancel},children:(J,j)=>{E();var ee=be();R(()=>N(ee,a())),u(J,ee)},$$slots:{default:!0}})})}var W=ie(ne,2);{let q=F(()=>xe({variant:s()?"destructive":"accent"}));M(W,()=>gt,(T,G)=>{G(T,{get class(){return i(q)},get onclick(){return e.onconfirm},children:(J,j)=>{E();var ee=be();R(()=>N(ee,f())),u(J,ee)},$$slots:{default:!0}})})}u(ce,I)},$$slots:{default:!0}})}),u(U,ge)},$$slots:{default:!0}})}),u(_,o)},$$slots:{default:!0}})}),u(d,n),x()}var $t=Z("<title> </title>"),Ct=Z('<svg><!><path d="M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"></path><path d="M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"></path></svg>');function jt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=Ct();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=$t(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}let ze=$e(null),Me=$e(null);const Wt={get view(){return i(ze)},set view(d){$(ze,d,!0)},get entity(){return i(Me)},set entity(d){$(Me,d,!0)}};export{Tt as C,ot as D,kt as E,It as F,jt as L,Yt as O,Kt as T,Nt as V,Rt as a,Wt as f};
|
|
1
|
+
import"./DsnmJJEf.js";import{i as ae}from"./DpgUPK2a.js";import{p as b,l as C,s as $,d as y,g as i,a as re,c as A,n as E,r as p,b as x,m as S,t as R,f as m,I as le,u as F,h as ie,e as $e}from"./txOdadJq.js";import{a as u,s as N,f as Z,c as z,p as we,b as k,t as be}from"./9gtwoV4P.js";import{l as O,p as c,i as D,r as L,s as V,b as Ce}from"./BCLL87Av.js";import{a as H,s as Y}from"./ypcxmEdT.js";import{c as M}from"./DerefRkG.js";import{n as se,f as B,j as ye,m as de,t as Oe,u as Ze,v as Le,x as De,y as Fe,z as Pe}from"./CUbaOWk8.js";import{v as He,w as Ve,A as Be,x as Ee,y as Re,z as Ne,B as Ye,E as ke}from"./BRhMPTP9.js";import{c as Q,a as xe}from"./BI-a4gre.js";var Ie=Z("<title> </title>"),Ke=Z('<svg><!><path d="M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z"></path><path d="M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z"></path></svg>');function Rt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=Ke();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=Ie(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}var Te=Z("<title> </title>"),je=Z('<svg><!><path d="M5.24,22.51l1.43-1.42A14.06,14.06,0,0,1,3.07,16C5.1,10.93,10.7,7,16,7a12.38,12.38,0,0,1,4,.72l1.55-1.56A14.72,14.72,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16,16,0,0,0,5.24,22.51Z"></path><path d="M12,15.73a4,4,0,0,1,3.7-3.7l1.81-1.82a6,6,0,0,0-7.33,7.33Z"></path><path d="M30.94,15.66A16.4,16.4,0,0,0,25.2,8.22L30,3.41,28.59,2,2,28.59,3.41,30l5.1-5.1A15.29,15.29,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM20,16a4,4,0,0,1-6,3.44L19.44,14A4,4,0,0,1,20,16Zm-4,9a13.05,13.05,0,0,1-6-1.58l2.54-2.54a6,6,0,0,0,8.35-8.35l2.87-2.87A14.54,14.54,0,0,1,28.93,16C26.9,21.07,21.3,25,16,25Z"></path></svg>');function Nt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=je();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=Te(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(3),p(l),u(d,l),x()}var We=Z("<title> </title>"),qe=Z('<svg><!><circle cx="8" cy="16" r="2"></circle><circle cx="16" cy="16" r="2"></circle><circle cx="24" cy="16" r="2"></circle></svg>');function Yt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=qe();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=We(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(3),p(l),u(d,l),x()}var Ge=Z("<title> </title>"),Je=Z('<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 kt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=Je();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=Ge(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}function Qe(d,e){b(e,!0);let t=c(e,"open",15,!1),f=c(e,"onOpenChange",3,se),a=c(e,"onOpenChangeComplete",3,se);He.create({variant:B(()=>"alert-dialog"),open:B(()=>t(),r=>{t(r),f()(r)}),onOpenChangeComplete:B(()=>a())});var s=z(),n=m(s);Y(n,()=>e.children??le),u(d,s),x()}var Ue=k("<button><!></button>");function Xe(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=L(e,["$$slots","$$events","$$legacy","children","child","id","ref"]);const n=Ve.create({id:B(()=>f()),ref:B(()=>a(),o=>a(o))}),r=F(()=>de(s,n.props));var l=z(),h=m(l);{var _=o=>{var v=z(),P=m(v);Y(P,()=>e.child,()=>({props:i(r)})),u(o,v)},g=o=>{var v=Ue();H(v,()=>({...i(r)}));var P=A(v);Y(P,()=>e.children??le),p(v),u(o,v)};D(h,o=>{e.child?o(_):o(g,!1)})}u(d,l),x()}var et=k("<button><!></button>");function tt(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=c(e,"disabled",3,!1),n=L(e,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const r=Be.create({id:B(()=>f()),ref:B(()=>a(),v=>a(v)),disabled:B(()=>!!s())}),l=F(()=>de(n,r.props));var h=z(),_=m(h);{var g=v=>{var P=z(),w=m(P);Y(w,()=>e.child,()=>({props:i(l)})),u(v,P)},o=v=>{var P=et();H(P,()=>({...i(l)}));var w=A(P);Y(w,()=>e.children??le),p(P),u(v,P)};D(_,v=>{e.child?v(g):v(o,!1)})}u(d,h),x()}var at=k("<!> <!>",1),rt=k("<!> <div><!></div>",1);function lt(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=c(e,"forceMount",3,!1),n=c(e,"interactOutsideBehavior",3,"ignore"),r=c(e,"onCloseAutoFocus",3,se),l=c(e,"onEscapeKeydown",3,se),h=c(e,"onOpenAutoFocus",3,se),_=c(e,"onInteractOutside",3,se),g=c(e,"preventScroll",3,!0),o=c(e,"trapFocus",3,!0),v=c(e,"restoreScrollDelay",3,null),P=L(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const w=Ee.create({id:B(()=>f()),ref:B(()=>a(),X=>a(X))}),U=F(()=>de(P,w.props));var Ae=z(),ge=m(Ae);{var he=X=>{Oe(X,{get ref(){return w.opts.ref},loop:!0,get trapFocus(){return o()},get enabled(){return w.root.opts.open.current},get onCloseAutoFocus(){return r()},onOpenAutoFocus:K=>{h()(K),!K.defaultPrevented&&(K.preventDefault(),Ze(0,()=>w.opts.ref.current?.focus()))},focusScope:(K,ce)=>{let me=()=>ce?.().props;Le(K,V(()=>i(U),{get enabled(){return w.root.opts.open.current},get ref(){return w.opts.ref},onEscapeKeydown:I=>{l()(I),!I.defaultPrevented&&w.root.handleClose()},children:(I,ne)=>{De(I,V(()=>i(U),{get ref(){return w.opts.ref},get enabled(){return w.root.opts.open.current},get interactOutsideBehavior(){return n()},onInteractOutside:W=>{_()(W),!W.defaultPrevented&&w.root.handleClose()},children:(W,q)=>{Fe(W,V(()=>i(U),{get ref(){return w.opts.ref},get enabled(){return w.root.opts.open.current},children:(T,G)=>{var J=z(),j=m(J);{var ee=oe=>{var ue=at(),fe=m(ue);{var ve=te=>{Pe(te,{get preventScroll(){return g()},get restoreScrollDelay(){return v()}})};D(fe,te=>{w.root.opts.open.current&&te(ve)})}var pe=ie(fe,2);{let te=F(()=>({props:de(i(U),me()),...w.snippetProps}));Y(pe,()=>e.child,()=>i(te))}u(oe,ue)},Se=oe=>{var ue=rt(),fe=m(ue);Pe(fe,{get preventScroll(){return g()}});var ve=ie(fe,2);H(ve,te=>({...te}),[()=>de(i(U),me())]);var pe=A(ve);Y(pe,()=>e.children??le),p(ve),u(oe,ue)};D(j,oe=>{e.child?oe(ee):oe(Se,!1)})}u(T,J)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};D(ge,X=>{(w.shouldRender||s())&&X(he)})}u(d,Ae),x()}var nt=k("<div><!></div>");function ot(d,e){const t=we();b(e,!0);let f=c(e,"id",19,()=>ye(t)),a=c(e,"ref",15,null),s=L(e,["$$slots","$$events","$$legacy","id","children","child","ref"]);const n=Re.create({id:B(()=>f()),ref:B(()=>a(),o=>a(o))}),r=F(()=>de(s,n.props));var l=z(),h=m(l);{var _=o=>{var v=z(),P=m(v);Y(P,()=>e.child,()=>({props:i(r)})),u(o,v)},g=o=>{var v=nt();H(v,()=>({...i(r)}));var P=A(v);Y(P,()=>e.children??le),p(v),u(o,v)};D(h,o=>{e.child?o(_):o(g,!1)})}u(d,l),x()}var st=Z("<title> </title>"),it=Z('<svg><!><path d="M28,8H16L12.59,4.59A2,2,0,0,0,11.17,4H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM22,26H14V25a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1Zm6,0H24V25a3,3,0,0,0-3-3H15a3,3,0,0,0-3,3v1H4V6h7.17l3.42,3.41.58.59H28Z"></path><path d="M14,17a4,4,0,1,0,4-4A4,4,0,0,0,14,17Zm4-2a2,2,0,1,1-2,2A2,2,0,0,1,18,15Z"></path></svg>');function It(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=it();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=st(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}var dt=Z("<title> </title>"),ct=Z('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function Kt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=ct();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=dt(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}function ut(d,e){b(e,!0);let t=c(e,"open",15,!1),f=L(e,["$$slots","$$events","$$legacy","open"]);var a=z(),s=m(a);M(s,()=>Qe,(n,r)=>{r(n,V(()=>f,{get open(){return t()},set open(l){t(l)}}))}),u(d,a),x()}function ft(d,e){let t=L(e,["$$slots","$$events","$$legacy"]);var f=z(),a=m(f);M(a,()=>Ne,(s,n)=>{n(s,V(()=>t))}),u(d,f)}function vt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>Q("text-lg font-semibold",e.class));M(s,()=>Ye,(r,l)=>{l(r,V({"data-slot":"alert-dialog-title",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}function gt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>e.class||Q(xe()));M(s,()=>Xe,(r,l)=>{l(r,V({"data-slot":"alert-dialog-action",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}function ht(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>e.class||Q(xe({variant:"ghost"})));M(s,()=>tt,(r,l)=>{l(r,V({"data-slot":"alert-dialog-cancel",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}var _t=k("<div><!></div>");function mt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=_t();H(a,n=>({"data-slot":"alert-dialog-footer",class:n,...f}),[()=>Q("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class)]);var s=A(a);Y(s,()=>e.children??le),p(a),Ce(a,n=>t(n),()=>t()),u(d,a),x()}var bt=k("<div><!></div>");function xt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=bt();H(a,n=>({"data-slot":"alert-dialog-header",class:n,...f}),[()=>Q("flex flex-col gap-2 text-center sm:text-start",e.class)]);var s=A(a);Y(s,()=>e.children??le),p(a),Ce(a,n=>t(n),()=>t()),u(d,a),x()}function wt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>Q("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/50",e.class));M(s,()=>ke,(r,l)=>{l(r,V({"data-slot":"alert-dialog-overlay",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}var yt=k("<!> <!>",1);function At(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class","portalProps"]);ft(d,V(()=>e.portalProps,{children:(a,s)=>{var n=yt(),r=m(n);wt(r,{});var l=ie(r,2);{let h=F(()=>Q("bg-[var(--color-bg-elevated)] border-[var(--color-border)] text-[var(--color-text-primary)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[1001] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e.class));M(l,()=>lt,(_,g)=>{g(_,V({"data-slot":"alert-dialog-content",get class(){return i(h)}},()=>f,{get ref(){return t()},set ref(o){t(o)}}))})}u(a,n)},$$slots:{default:!0}})),x()}function pt(d,e){b(e,!0);let t=c(e,"ref",15,null),f=L(e,["$$slots","$$events","$$legacy","ref","class"]);var a=z(),s=m(a);{let n=F(()=>Q("text-[var(--color-text-secondary)] text-sm",e.class));M(s,()=>ot,(r,l)=>{l(r,V({"data-slot":"alert-dialog-description",get class(){return i(n)}},()=>f,{get ref(){return t()},set ref(h){t(h)}}))})}u(d,a),x()}var Pt=k("<!> <!>",1),zt=k("<!> <!>",1),Mt=k("<!> <!>",1);function Tt(d,e){b(e,!0);let t=c(e,"open",15),f=c(e,"confirmLabel",3,"Confirm"),a=c(e,"cancelLabel",3,"Cancel"),s=c(e,"destructive",3,!1);var n=z(),r=m(n);M(r,()=>ut,(l,h)=>{h(l,{onOpenChange:_=>{_||e.oncancel()},get open(){return t()},set open(_){t(_)},children:(_,g)=>{var o=z(),v=m(o);M(v,()=>At,(P,w)=>{w(P,{children:(U,Ae)=>{var ge=Mt(),he=m(ge);M(he,()=>xt,(_e,K)=>{K(_e,{children:(ce,me)=>{var I=Pt(),ne=m(I);M(ne,()=>vt,(q,T)=>{T(q,{children:(G,J)=>{E();var j=be();R(()=>N(j,e.title)),u(G,j)},$$slots:{default:!0}})});var W=ie(ne,2);M(W,()=>pt,(q,T)=>{T(q,{children:(G,J)=>{E();var j=be();R(()=>N(j,e.message)),u(G,j)},$$slots:{default:!0}})}),u(ce,I)},$$slots:{default:!0}})});var X=ie(he,2);M(X,()=>mt,(_e,K)=>{K(_e,{children:(ce,me)=>{var I=zt(),ne=m(I);{let q=F(()=>xe({variant:"ghost"}));M(ne,()=>ht,(T,G)=>{G(T,{get class(){return i(q)},get onclick(){return e.oncancel},children:(J,j)=>{E();var ee=be();R(()=>N(ee,a())),u(J,ee)},$$slots:{default:!0}})})}var W=ie(ne,2);{let q=F(()=>xe({variant:s()?"destructive":"accent"}));M(W,()=>gt,(T,G)=>{G(T,{get class(){return i(q)},get onclick(){return e.onconfirm},children:(J,j)=>{E();var ee=be();R(()=>N(ee,f())),u(J,ee)},$$slots:{default:!0}})})}u(ce,I)},$$slots:{default:!0}})}),u(U,ge)},$$slots:{default:!0}})}),u(_,o)},$$slots:{default:!0}})}),u(d,n),x()}var $t=Z("<title> </title>"),Ct=Z('<svg><!><path d="M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"></path><path d="M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"></path></svg>');function jt(d,e){const t=O(e,["children","$$slots","$$events","$$legacy"]),f=O(t,["size","title"]);b(e,!1);const a=S(),s=S();let n=c(e,"size",8,16),r=c(e,"title",8,void 0);C(()=>(y(t),y(r())),()=>{$(a,t["aria-label"]||t["aria-labelledby"]||r())}),C(()=>(i(a),y(t)),()=>{$(s,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),re(),ae();var l=Ct();H(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(s),...f}));var h=A(l);{var _=g=>{var o=$t(),v=A(o,!0);p(o),R(()=>N(v,r())),u(g,o)};D(h,g=>{r()&&g(_)})}E(2),p(l),u(d,l),x()}let ze=$e(null),Me=$e(null);const Wt={get view(){return i(ze)},set view(d){$(ze,d,!0)},get entity(){return i(Me)},set entity(d){$(Me,d,!0)}};export{Tt as C,ot as D,kt as E,It as F,jt as L,Yt as O,Kt as T,Nt as V,Rt as a,Wt as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./
|
|
1
|
+
import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./BRnt8Lop.js";const T=3e4;class $ extends _{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=b();this.getLocalState()!==null&&T/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&T<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&Y(this,s,"timeout")},P(T/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:b()});const i=[],u=[],r=[],f=[];n===null?f.push(e):c==null?n!=null&&i.push(e):(u.push(e),W(c,n)||r.push(e)),(i.length>0||r.length>0||f.length>0)&&this.emit("change",[{added:i,updated:r,removed:f},"local"]),this.emit("update",[{added:i,updated:u,removed:f},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const Y=(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 i=t.meta.get(c);t.meta.set(c,{clock:i.clock+1,lastUpdated:b()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},H=(t,n,e=t.states)=>{const s=n.length,a=A();m(a,s);for(let c=0;c<s;c++){const i=n[c],u=e.get(i)||null,r=t.meta.get(i).clock;m(a,i),m(a,r),G(a,JSON.stringify(u))}return k(a)},tt=(t,n,e)=>{const s=j(n),a=b(),c=[],i=[],u=[],r=[],f=I(s);for(let w=0;w<f;w++){const d=I(s);let y=I(s);const h=JSON.parse(q(s)),g=t.meta.get(d),U=t.states.get(d),S=g===void 0?0:g.clock;(S<y||S===y&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?y++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:y,lastUpdated:a}),g===void 0&&h!==null?c.push(d):g!==void 0&&h===null?r.push(d):h!==null&&(W(h,U)||u.push(d),i.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||i.length>0||r.length>0)&&t.emit("update",[{added:c,updated:i,removed:r},e])},B=0,M=1,N=2,et=(t,n)=>{m(t,B);const e=R(n);V(t,e)},nt=(t,n,e)=>{m(t,M),V(t,K(n,e))},st=(t,n,e)=>nt(n,e,C(t)),F=(t,n,e,s)=>{try{z(n,C(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},at=(t,n)=>{m(t,N),V(t,n)},ct=F,ot=(t,n,e,s,a)=>{const c=I(t);switch(c){case B:st(t,n,e);break;case M:F(t,e,s,a);break;case N:ct(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},L=0,x=1;function it(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 lt(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 ut(t,n){const e=new Q,s=e.getText("content"),a=new $(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,i=!1,u=!1;function r(){return O.ws??null}function f(o,p){const l=r();!l||l.readyState!==WebSocket.OPEN||l.send(it(t,o,p))}function w(){const o=A();et(o,e),f(L,k(o))}function d(o){const p=o??[e.clientID],l=H(a,p);f(x,l)}function y(o){if(i||typeof o.data=="string")return;const p=o.data instanceof ArrayBuffer?o.data:null;if(!p)return;const l=lt(p);if(!(!l||l.docName!==t))if(l.msgType===L){const v=j(l.payload),D=X(v),E=A();ot(v,E,e,"ws-server"),Z(E)>0&&f(L,k(E)),!u&&(D===M||D===N)&&(u=!0,S.synced=!0)}else l.msgType===x&&tt(a,l.payload,"ws-server")}function h(o,p){if(i||p==="ws-server")return;const l=A();at(l,o),f(L,k(l))}function g({added:o,updated:p,removed:l},v){if(i||v==="ws-server")return;const D=o.concat(p,l);d(D)}function U(){if(i)return;const o=r();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=y,o.addEventListener("message",c),w(),d())}const S={ydoc:e,ytext:s,awareness:a,synced:!1,destroy:J};e.on("update",h),a.on("update",g),U(),O.addConnectHandler(U);function J(){if(i)return;i=!0,Y(a,[e.clientID],"local"),d([e.clientID]);const o=r();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",h),a.off("update",g),a.destroy(),e.destroy()}return S}export{ut as createCollabSession};
|