studiograph 1.3.46-next.1 → 1.3.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/routes/auth-api.js +8 -1
- package/dist/server/routes/auth-api.js.map +1 -1
- package/dist/web/_app/immutable/chunks/{j4bvNFcQ.js → BI8HVuKu.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Cxx6o9Oj.js → BO9dsUba.js} +1 -1
- package/dist/web/_app/immutable/chunks/{B6V-uubx.js → CXAIHzUX.js} +1 -1
- package/dist/web/_app/immutable/chunks/{2WDlSsLm.js → CaQ0MRCC.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BvrZK1hH.js → DF6CqIgb.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Dtc6nSB5.js → DUScXtWD.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DoWxyhBj.js → DYsIuENi.js} +1 -1
- package/dist/web/_app/immutable/chunks/{YLG0-nJz.js → Dnnz2_is.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DdAR16ep.js → DviMV1EY.js} +1 -1
- package/dist/web/_app/immutable/chunks/FdYTYKiQ.js +1 -0
- package/dist/web/_app/immutable/entry/{app.BxYr7SqD.js → app.CaogB_bT.js} +2 -2
- package/dist/web/_app/immutable/entry/start.wZ7yhkXM.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.DAJB6oNy.js → 0.Cq712UJU.js} +2 -2
- package/dist/web/_app/immutable/nodes/{1.C1zO3grb.js → 1.Cf_Sxi8f.js} +1 -1
- package/dist/web/_app/immutable/nodes/{10.CF8Nuncc.js → 10.EhMTpB-W.js} +1 -1
- package/dist/web/_app/immutable/nodes/{2.CFrM-7uS.js → 2.pdWVc6Tw.js} +3 -3
- package/dist/web/_app/immutable/nodes/{3.DFMmYUhw.js → 3.DP7cSzLO.js} +1 -1
- package/dist/web/_app/immutable/nodes/{4.BJ6W6_eE.js → 4.BASs7ojR.js} +4 -4
- package/dist/web/_app/immutable/nodes/{5.Dtq0UmKQ.js → 5.ZimC-3ag.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.DfCeBULz.js → 6.CnZ2TeIl.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.BWD8NBDu.js → 7.hxwrWQeK.js} +1 -1
- package/dist/web/_app/immutable/nodes/{8.gPodSJtk.js → 8.DEJ5W3rM.js} +1 -1
- package/dist/web/_app/immutable/nodes/{9.B6AHrZqQ.js → 9.CIrEHtYu.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/DvXcXwP6.js +0 -1
- package/dist/web/_app/immutable/entry/start.C_zGdWDX.js +0 -1
|
@@ -154,7 +154,14 @@ export async function registerAuthApiRoutes(fastify, authService, workspaceName)
|
|
|
154
154
|
secure,
|
|
155
155
|
maxAge: 7 * 24 * 60 * 60, // 7 days
|
|
156
156
|
});
|
|
157
|
-
|
|
157
|
+
// Include the token in the response body when requested via
|
|
158
|
+
// X-Return-Token header (used by Chrome extension and other
|
|
159
|
+
// API clients that can't use cookies across origins).
|
|
160
|
+
const returnToken = req.headers['x-return-token'] === '1';
|
|
161
|
+
return reply.send({
|
|
162
|
+
user: result.user,
|
|
163
|
+
...(returnToken ? { token: result.token } : {}),
|
|
164
|
+
});
|
|
158
165
|
});
|
|
159
166
|
// POST /api/auth/logout — clear session cookie
|
|
160
167
|
fastify.post('/api/auth/logout', async (_req, reply) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-api.js","sourceRoot":"","sources":["../../../src/server/routes/auth-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,4BAA4B;AAC5B,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;AAOhD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAwB,CAAC;AAEtD,gGAAgG;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,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as ae,c as A,a as d,b as B,s as ee,f as me,t as ne}from"./iDtAARVW.js";import{p as G,h as S,b as N,g as i,c as U,ad as X,r as z,u as L,e as Pe,f as ye,s as de,l as fe,d as le,a as be,n as te,m as ve,t as re,i as ie}from"./CT6oIU-C.js";import{b as K,a as j}from"./CmCtpZ1Y.js";import{i as q}from"./72bZS3G9.js";import{p as s,r as oe,s as pe,l as _e}from"./cLyZlkXv.js";import{f as se,n as J,M as Me,h as b,m as Q,j as we,k as Ce,l as Se,F as xe,o as Oe,P as Ae,p as Fe,q as ge,D as Ie,r as Re,t as ke,A as Ee,u as Le,v as Ke,x as He,y as Te,z as Ue,B as ze,G as De}from"./CJUKmosC.js";import{r as ce}from"./
|
|
1
|
+
import{p as ae,c as A,a as d,b as B,s as ee,f as me,t as ne}from"./iDtAARVW.js";import{p as G,h as S,b as N,g as i,c as U,ad as X,r as z,u as L,e as Pe,f as ye,s as de,l as fe,d as le,a as be,n as te,m as ve,t as re,i as ie}from"./CT6oIU-C.js";import{b as K,a as j}from"./CmCtpZ1Y.js";import{i as q}from"./72bZS3G9.js";import{p as s,r as oe,s as pe,l as _e}from"./cLyZlkXv.js";import{f as se,n as J,M as Me,h as b,m as Q,j as we,k as Ce,l as Se,F as xe,o as Oe,P as Ae,p as Fe,q as ge,D as Ie,r as Re,t as ke,A as Ee,u as Le,v as Ke,x as He,y as Te,z as Ue,B as ze,G as De}from"./CJUKmosC.js";import{r as ce}from"./DUScXtWD.js";import{i as je}from"./Y90OgS-9.js";import{c as D}from"./CXH6iFbA.js";import{a as he}from"./BS2rFAVq.js";var Be=B("<div><!></div>");function Ve(c,e){const l=ae();G(e,!0);let h=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=s(e,"disabled",3,!1),M=s(e,"onSelect",3,J),P=s(e,"closeOnSelect",3,!0),f=oe(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const w=Me.create({id:b(()=>p()),disabled:b(()=>_()),onSelect:b(()=>M()),ref:b(()=>h(),r=>h(r)),closeOnSelect:b(()=>P())}),u=L(()=>Q(f,w.props));var x=A(),a=S(x);{var t=r=>{var o=A(),m=S(o);K(m,()=>e.child,()=>({props:i(u)})),d(r,o)},n=r=>{var o=Be();j(o,()=>({...i(u)}));var m=U(o);K(m,()=>e.children??X),z(o),d(r,o)};q(a,r=>{e.child?r(t):r(n,!1)})}d(c,x),N()}var Ze=B("<div><!></div>");function We(c,e){const l=ae();G(e,!0);let h=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=oe(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const M=we.create({id:b(()=>p()),ref:b(()=>h(),a=>h(a))}),P=L(()=>Q(_,M.props));var f=A(),w=S(f);{var u=a=>{var t=A(),n=S(t);K(n,()=>e.child,()=>({props:i(P)})),d(a,t)},x=a=>{var t=Ze();j(t,()=>({...i(P)}));var n=U(t);K(n,()=>e.children??X),z(t),d(a,t)};q(w,a=>{e.child?a(u):a(x,!1)})}d(c,f),N()}function qe(c,e){G(e,!0);let l=s(e,"open",15,!1),h=s(e,"dir",3,"ltr"),p=s(e,"onOpenChange",3,J),_=s(e,"onOpenChangeComplete",3,J),M=s(e,"_internal_variant",3,"dropdown-menu");const P=Ce.create({variant:b(()=>M()),dir:b(()=>h()),onClose:()=>{l(!1),p()(!1)}});Se.create({open:b(()=>l(),f=>{l(f),p()(f)}),onOpenChangeComplete:b(()=>_())},P),xe(c,{children:(f,w)=>{var u=A(),x=S(u);K(x,()=>e.children??X),d(f,u)},$$slots:{default:!0}}),N()}var Ge=B("<div><div><!></div></div>"),Ne=B("<div><div><!></div></div>");function Ye(c,e){const l=ae();G(e,!0);let h=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"loop",3,!0),M=s(e,"onInteractOutside",3,J),P=s(e,"onEscapeKeydown",3,J),f=s(e,"onCloseAutoFocus",3,J),w=s(e,"forceMount",3,!1),u=s(e,"trapFocus",3,!1),x=oe(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const a=Oe.create({id:b(()=>h()),loop:b(()=>_()),ref:b(()=>p(),g=>p(g)),onCloseAutoFocus:b(()=>f())}),t=L(()=>Q(x,a.props));function n(g){if(a.handleInteractOutside(g),!g.defaultPrevented&&(M()(g),!g.defaultPrevented)){if(g.target&&g.target instanceof Element){const V=`[${a.parentMenu.root.getBitsAttr("sub-content")}]`;if(g.target.closest(V))return}a.parentMenu.onClose()}}function r(g){P()(g),!g.defaultPrevented&&a.parentMenu.onClose()}var o=A(),m=S(o);{var O=g=>{Ae(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get enabled(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!0,get id(){return h()},get shouldRender(){return a.shouldRender},popper:(Z,H)=>{let $=()=>H?.().props,F=()=>H?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));K(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ge();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);K(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))},Y=g=>{Fe(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get open(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!1,get id(){return h()},get shouldRender(){return a.shouldRender},popper:(Z,H)=>{let $=()=>H?.().props,F=()=>H?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));K(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ne();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);K(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))};q(m,g=>{w()?g(O):w()||g(Y,1)})}d(c,o),N()}var Je=B("<button><!></button>");function Qe(c,e){const l=ae();G(e,!0);let h=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"disabled",3,!1),M=s(e,"type",3,"button"),P=oe(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const f=Ie.create({id:b(()=>h()),disabled:b(()=>_()??!1),ref:b(()=>p(),u=>p(u))}),w=L(()=>Q(P,f.props,{type:M()}));Re(c,{get id(){return h()},get ref(){return f.opts.ref},children:(u,x)=>{var a=A(),t=S(a);{var n=o=>{var m=A(),O=S(m);K(O,()=>e.child,()=>({props:i(w)})),d(o,m)},r=o=>{var m=Je();j(m,()=>({...i(w)}));var O=U(m);K(O,()=>e.children??X),z(m),d(o,m)};q(t,o=>{e.child?o(n):o(r,!1)})}d(u,a)},$$slots:{default:!0}}),N()}const pt=qe,_t=Qe,gt=ke,ht=Ye,mt=Ve,Pt=We;function Xe(){let c=Pe(ye({})),e=null,l=null;function h(t,n,r){l&&(clearInterval(l),l=null),e=`${t}/${n}/${r}`,_("enter",t,n,r),l=setInterval(()=>{e&&_("heartbeat",t,n,r)},3e4)}function p(){if(l&&(clearInterval(l),l=null),e){const[t,n,r]=e.split("/");t&&n&&r&&_("leave",t,n,r),e=null}}function _(t,n,r,o){ce.send({type:"presence",action:t,repo:n,entityType:r,entityId:o})}function M(t){const n=`${t.repo}/${t.entityType}/${t.entityId}`,r=i(c)[n]??[];if(t.action==="leave")i(c)[n]=r.filter(o=>o.id!==t.user.id);else{const o=r.findIndex(m=>m.id===t.user.id);o>=0?(r[o]=t.user,i(c)[n]=[...r]):i(c)[n]=[...r,t.user]}}function P(){if(de(c,{},!0),!e)return;const[t,n,r]=e.split("/");t&&n&&r&&_("enter",t,n,r)}function f(t,n,r,o){const m=`${t}/${n}/${r}`,O=i(c)[m]??[];return o?O.filter(Y=>Y.id!==o):O}function w(t,n){const r=new Map;for(const[o,m]of Object.entries(i(c)))if(o.startsWith(t))for(const O of m)(!n||O.id!==n)&&r.set(O.id,O);return[...r.values()]}function u(t,n){return w(`${t}/`,n)}function x(t){const n=new Map;for(const r of Object.values(i(c)))for(const o of r)(!t||o.id!==t)&&n.set(o.id,o);return[...n.values()]}const a=L(()=>{const t=new Map;for(const n of Object.values(i(c)))for(const r of n)t.set(r.id,r);return[...t.values()]});return{enter:h,leave:p,handlePresenceEvent:M,resetAndResend:P,getPresence:f,getPresenceByPrefix:w,getRepoPresence:u,getAllUsers:x,get allUsers(){return i(a)}}}const ue=Xe();ce.setPresenceHandler(c=>ue.handlePresenceEvent(c));ce.addConnectHandler(()=>ue.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>ue.leave());var $e=me("<title> </title>"),et=me('<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 yt(c,e){const l=_e(e,["children","$$slots","$$events","$$legacy"]),h=_e(l,["size","title"]);G(e,!1);const p=ve(),_=ve();let M=s(e,"size",8,16),P=s(e,"title",8,void 0);fe(()=>(le(l),le(P())),()=>{de(p,l["aria-label"]||l["aria-labelledby"]||P())}),fe(()=>(i(p),le(l)),()=>{de(_,{"aria-hidden":i(p)?void 0:!0,role:i(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),be(),je();var f=et();j(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:M(),height:M(),...i(_),...h}));var w=U(f);{var u=x=>{var a=$e(),t=U(a,!0);z(a),re(()=>ee(t,P())),d(x,a)};q(w,x=>{P()&&x(u)})}te(2),z(f),d(c,f),N()}var tt=B("<!> <!>",1),rt=B("<!> <!>",1),nt=B("<!> <!>",1);function bt(c,e){G(e,!0);let l=s(e,"open",15),h=s(e,"confirmLabel",3,"Confirm"),p=s(e,"cancelLabel",3,"Cancel"),_=s(e,"destructive",3,!1);var M=A(),P=S(M);D(P,()=>De,(f,w)=>{w(f,{onOpenChange:u=>{u||e.oncancel()},get open(){return l()},set open(u){l(u)},children:(u,x)=>{var a=A(),t=S(a);D(t,()=>Ee,(n,r)=>{r(n,{children:(o,m)=>{var O=nt(),Y=S(O);D(Y,()=>Le,(V,Z)=>{Z(V,{children:(H,$)=>{var F=tt(),I=S(F);D(I,()=>Ke,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.title)),d(E,v)},$$slots:{default:!0}})});var T=ie(I,2);D(T,()=>He,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.message)),d(E,v)},$$slots:{default:!0}})}),d(H,F)},$$slots:{default:!0}})});var g=ie(Y,2);D(g,()=>Te,(V,Z)=>{Z(V,{children:(H,$)=>{var F=rt(),I=S(F);{let R=L(()=>he({variant:"ghost"}));D(I,()=>Ue,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.oncancel},children:(y,v)=>{te();var C=ne();re(()=>ee(C,p())),d(y,C)},$$slots:{default:!0}})})}var T=ie(I,2);{let R=L(()=>he({variant:_()?"destructive":"accent"}));D(T,()=>ze,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.onconfirm},children:(y,v)=>{te();var C=ne();re(()=>ee(C,h())),d(y,C)},$$slots:{default:!0}})})}d(H,F)},$$slots:{default:!0}})}),d(o,O)},$$slots:{default:!0}})}),d(u,a)},$$slots:{default:!0}})}),d(c,M),N()}export{ht as C,mt as I,gt as P,pt as R,Pt as S,_t as T,yt as a,bt as b,ue as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,a,f as l}from"./iDtAARVW.js";import{h as w}from"./CT6oIU-C.js";import{i as n}from"./72bZS3G9.js";import{p as d}from"./cLyZlkXv.js";import{L as b,T as k}from"./
|
|
1
|
+
import{c as m,a,f as l}from"./iDtAARVW.js";import{h as w}from"./CT6oIU-C.js";import{i as n}from"./72bZS3G9.js";import{p as d}from"./cLyZlkXv.js";import{L as b,T as k}from"./Dnnz2_is.js";import{t as y}from"./DUScXtWD.js";import{u as S}from"./DUScXtWD.js";var u=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),x=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),_=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),z=l('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function H(s,v){const t=d(v,"type",3,"success");var e=m(),c=w(e);{var i=o=>{var r=u();a(o,r)},p=o=>{var r=x();a(o,r)},h=o=>{var r=_();a(o,r)},g=o=>{var r=z();a(o,r)},f=o=>{};n(c,o=>{t()==="success"?o(i):t()==="error"?o(p,1):t()==="info"?o(h,2):t()==="warning"?o(g,3):o(f,!1)})}a(s,e)}export{H as Icon,b as Loader,k as Toaster,y as toast,S as useSonner};
|
|
@@ -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"./DUScXtWD.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as St,p as he,c as j,a as u,b as D,s as Tt,f as Vt,d as ve,g as X,t as Nt,e as me}from"./iDtAARVW.js";import{e as F,s as d,g as o,u as O,p as _t,h as H,b as yt,c as y,ad as Kt,r as C,l as Ht,d as ot,a as Ut,n as U,m as At,t as ut,aC as ge,a5 as be,i as z}from"./CT6oIU-C.js";import{b as dt,a as ct,r as _e,s as ye}from"./CmCtpZ1Y.js";import{i as N,b as Ce}from"./72bZS3G9.js";import{e as we}from"./CDV5Q7RN.js";import{c as q}from"./CXH6iFbA.js";import{s as Wt}from"./DGbA7IXh.js";import{b as Pe,B as xe}from"./BS2rFAVq.js";import{p as v,s as ne,r as ue,l as Mt}from"./cLyZlkXv.js";import{g as re}from"./DvXcXwP6.js";import{i as Zt}from"./Y90OgS-9.js";import{A as Te,C as se}from"./vSaooFHB.js";import{n as et}from"./4Hhzb6pv.js";import{v as Bt}from"./BvrZK1hH.js";import{w as He}from"./CJ8__CWt.js";import{w as Qt,H as Ae,I as bt,C as Me,a as de,J as Ve,K as Lt,E as Ie,S as Oe,L as ce,c as ke,N as De,O as ie,h as k,d as ze,f as pe,n as xt,P as Fe,p as Ee,m as $t,q as ae,r as Se,F as Ne,A as We,u as Be,v as $e,x as Ke,y as Le,z as Ye,B as Xe,G as qe}from"./CJUKmosC.js";function jt(m,t){const[e,s]=m;let n=!1;const r=t.length;for(let h=0,i=r-1;h<r;i=h++){const[f,x]=t[h]??[0,0],[_,c]=t[i]??[0,0];x>=s!=c>=s&&e<=(_-f)*(s-x)/(c-x)+f&&(n=!n)}return n}function Gt(m,t){return m[0]>=t.left&&m[0]<=t.right&&m[1]>=t.top&&m[1]<=t.bottom}function le(m,t){const e=m.left+m.width/2,s=m.top+m.height/2,n=t.left+t.width/2,r=t.top+t.height/2,h=n-e,i=r-s;return Math.abs(h)>Math.abs(i)?h>0?"right":"left":i>0?"bottom":"top"}class je{#t;#n;#s;#r=null;#e=null;#l=[];#h=null;#o=null;#i=null;#a(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#d(){this.#a(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#r||!this.#e)&&(this.#u(),this.#t.onPointerExit())})}#c(){this.#i!==null&&(clearTimeout(this.#i),this.#i=null)}#f(){this.#s!==null&&(this.#c(),this.#i=window.setTimeout(()=>{this.#i=null,!(!this.#r||!this.#e)&&(this.#u(),this.#t.onPointerExit())},this.#s))}constructor(t){this.#t=t,this.#n=t.buffer??1;const e=t.transitIntentTimeout;this.#s=typeof e=="number"&&e>0?e:null,Qt([t.triggerNode,t.contentNode,t.enabled],([s,n,r])=>{if(!s||!n||!r){this.#h=null,this.#u();return}this.#h&&this.#h!==s&&this.#u(),this.#h=s;const h=Ae(s),i=a=>{this.#v([a.clientX,a.clientY],s,n)},f=a=>{const p=a.relatedTarget;if(bt(p)&&n.contains(p))return;const T=this.#t.ignoredTargets?.()??[];bt(p)&&T.some(E=>E===p||E.contains(p))||(this.#l=bt(p)&&T.length>0?T.filter(E=>p.contains(E)):[],this.#r=[a.clientX,a.clientY],this.#e="content",this.#d())},x=()=>{this.#u()},_=()=>{this.#u()},c=a=>{const p=a.relatedTarget;bt(p)&&s.contains(p)||(this.#r=[a.clientX,a.clientY],this.#e="trigger",this.#d())};return[St(h,"pointermove",i),St(s,"pointerleave",f),St(s,"pointerenter",x),St(n,"pointerenter",_),St(n,"pointerleave",c)].reduce((a,p)=>()=>{a(),p()},()=>{})})}#v(t,e,s){if(!this.#r||!this.#e)return;this.#a(),this.#f();const n=e.getBoundingClientRect(),r=s.getBoundingClientRect();if(this.#e==="content"&&Gt(t,r)){this.#u();return}if(this.#e==="trigger"&&Gt(t,n)){this.#u();return}if(this.#e==="content"&&this.#l.length>0)for(const _ of this.#l){const c=_.getBoundingClientRect();if(Gt(t,c))return;const a=le(n,c),p=this.#p(n,c,a);if(p&&jt(t,p))return}const h=le(n,r),i=this.#p(n,r,h);if(i&&jt(t,i))return;const f=this.#e==="content"?r:n,x=this.#m(this.#r,f,h,this.#e);jt(t,x)||(this.#u(),this.#t.onPointerExit())}#u(){this.#r=null,this.#e=null,this.#l=[],this.#a(),this.#c()}#p(t,e,s){const n=this.#n;switch(s){case"top":return[[Math.min(t.left,e.left)-n,t.top],[Math.min(t.left,e.left)-n,e.bottom],[Math.max(t.right,e.right)+n,e.bottom],[Math.max(t.right,e.right)+n,t.top]];case"bottom":return[[Math.min(t.left,e.left)-n,t.bottom],[Math.min(t.left,e.left)-n,e.top],[Math.max(t.right,e.right)+n,e.top],[Math.max(t.right,e.right)+n,t.bottom]];case"left":return[[t.left,Math.min(t.top,e.top)-n],[e.right,Math.min(t.top,e.top)-n],[e.right,Math.max(t.bottom,e.bottom)+n],[t.left,Math.max(t.bottom,e.bottom)+n]];case"right":return[[t.right,Math.min(t.top,e.top)-n],[e.left,Math.min(t.top,e.top)-n],[e.left,Math.max(t.bottom,e.bottom)+n],[t.right,Math.max(t.bottom,e.bottom)+n]]}}#m(t,e,s,n){const r=this.#n*4,[h,i]=t;switch(n==="trigger"?this.#g(s):s){case"top":return[[h-r,i+r],[h+r,i+r],[e.right+r,e.bottom],[e.right+r,e.top],[e.left-r,e.top],[e.left-r,e.bottom]];case"bottom":return[[h-r,i-r],[h+r,i-r],[e.right+r,e.top],[e.right+r,e.bottom],[e.left-r,e.bottom],[e.left-r,e.top]];case"left":return[[h+r,i-r],[h+r,i+r],[e.right,e.bottom+r],[e.left,e.bottom+r],[e.left,e.top-r],[e.right,e.top-r]];case"right":return[[h-r,i-r],[h-r,i+r],[e.left,e.bottom+r],[e.right,e.bottom+r],[e.right,e.top-r],[e.left,e.top-r]]}}#g(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const Jt=ze({component:"popover",parts:["root","trigger","content","close","overlay"]}),Rt=new Me("Popover.Root");class te{static create(t){return Rt.set(new te(t))}opts;#t=F(null);get contentNode(){return o(this.#t)}set contentNode(t){d(this.#t,t,!0)}contentPresence;#n=F(null);get triggerNode(){return o(this.#n)}set triggerNode(t){d(this.#n,t,!0)}#s=F(null);get overlayNode(){return o(this.#s)}set overlayNode(t){d(this.#s,t,!0)}overlayPresence;#r=F(!1);get openedViaHover(){return o(this.#r)}set openedViaHover(t){d(this.#r,t,!0)}#e=F(!1);get hasInteractedWithContent(){return o(this.#e)}set hasInteractedWithContent(t){d(this.#e,t,!0)}#l=F(!1);get hoverCooldown(){return o(this.#l)}set hoverCooldown(t){d(this.#l,t,!0)}#h=F(0);get closeDelay(){return o(this.#h)}set closeDelay(t){d(this.#h,t,!0)}#o=null;#i=null;constructor(t){this.opts=t,this.contentPresence=new ie({ref:k(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ie({ref:k(()=>this.overlayNode),open:this.opts.open}),Qt(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#a())})}setDomContext(t){this.#i=t}#a(){this.#o!==null&&this.#i&&(this.#i.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#a(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#a(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#a(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#a(),this.closeDelay<=0?this.opts.open.current=!1:this.#i&&(this.#o=this.#i.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#a()}markInteraction(){this.hasInteractedWithContent=!0,this.#a()}}class ee{static create(t){return new ee(t,Rt.get())}opts;root;attachment;domContext;#t=null;#n=null;#s=F(!1);constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.triggerNode=s),this.domContext=new Ve(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Qt(()=>this.opts.closeDelay.current,s=>{this.root.closeDelay=s})}#r(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#e(){this.#n!==null&&(this.domContext.clearTimeout(this.#n),this.#n=null)}#l(){this.#r(),this.#e()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||Lt(t)||(d(this.#s,!0),this.#e(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const e=this.opts.openDelay.current;e<=0?this.root.handleHoverOpen():this.#t=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#t=null},e)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(Lt(t)||(d(this.#s,!1),this.#r(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#l(),o(this.#s)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}o(this.#s)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key===Ie||t.key===Oe)&&(t.preventDefault(),this.#l(),this.root.toggleOpen())}#h(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=O(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ke(this.root.opts.open.current),"data-state":ce(this.root.opts.open.current),"aria-controls":this.#h(),[Jt.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#o)}set props(t){d(this.#o,t)}}class oe{static create(t){return new oe(t,Rt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.contentNode=s),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new je({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const e=t.target;bt(e)&&De(e)&&this.root.markInteraction()}onpointerenter(t){Lt(t)||this.root.cancelDelayedClose()}onpointerleave(t){Lt(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!bt(t.target))return;const e=t.target.closest(Jt.selector("trigger"));if(!(e&&e===this.root.triggerNode)){if(this.opts.customAnchor.current){if(bt(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const s=document.querySelector(this.opts.customAnchor.current);if(s&&s.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#t=O(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){d(this.#t,t)}#n=O(()=>({id:this.opts.id.current,tabindex:-1,"data-state":ce(this.root.opts.open.current),[Jt.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#n)}set props(t){d(this.#n,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var Ge=D("<div><div><!></div></div>"),Je=D("<div><div><!></div></div>");function Ue(m,t){const e=he();_t(t,!0);let s=v(t,"ref",15,null),n=v(t,"id",19,()=>pe(e)),r=v(t,"forceMount",3,!1),h=v(t,"onOpenAutoFocus",3,xt),i=v(t,"onCloseAutoFocus",3,xt),f=v(t,"onEscapeKeydown",3,xt),x=v(t,"onInteractOutside",3,xt),_=v(t,"trapFocus",3,!0),c=v(t,"preventScroll",3,!1),a=v(t,"customAnchor",3,null),p=ue(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const T=oe.create({id:k(()=>n()),ref:k(()=>s(),V=>s(V)),onInteractOutside:k(()=>x()),onEscapeKeydown:k(()=>f()),customAnchor:k(()=>a())}),E=O(()=>$t(p,T.props)),Ct=O(()=>_()&&T.shouldTrapFocus);function wt(V){T.shouldTrapFocus||V.preventDefault(),h()(V)}var W=j(),G=H(W);{var K=V=>{Fe(V,ne(()=>o(E),()=>T.popperProps,{get ref(){return T.opts.ref},get enabled(){return T.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return c()},loop:!0,forceMount:!0,get customAnchor(){return a()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return T.shouldRender},popper:(pt,rt)=>{let ft=()=>rt?.().props,st=()=>rt?.().wrapperProps;const it=O(()=>$t(ft(),{style:ae("popover")},{style:t.style}));var at=j(),Ot=H(at);{var kt=M=>{var A=j(),S=H(A);{let Z=O(()=>({props:o(it),wrapperProps:st(),...T.snippetProps}));dt(S,()=>t.child,()=>o(Z))}u(M,A)},Pt=M=>{var A=Ge();ct(A,()=>({...st()}));var S=y(A);ct(S,()=>({...o(it)}));var Z=y(S);dt(Z,()=>t.children??Kt),C(S),C(A),u(M,A)};N(Ot,M=>{t.child?M(kt):M(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))},nt=V=>{Ee(V,ne(()=>o(E),()=>T.popperProps,{get ref(){return T.opts.ref},get open(){return T.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return c()},loop:!0,forceMount:!1,get customAnchor(){return a()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return T.shouldRender},popper:(pt,rt)=>{let ft=()=>rt?.().props,st=()=>rt?.().wrapperProps;const it=O(()=>$t(ft(),{style:ae("popover")},{style:t.style}));var at=j(),Ot=H(at);{var kt=M=>{var A=j(),S=H(A);{let Z=O(()=>({props:o(it),wrapperProps:st(),...T.snippetProps}));dt(S,()=>t.child,()=>o(Z))}u(M,A)},Pt=M=>{var A=Je();ct(A,()=>({...st()}));var S=y(A);ct(S,()=>({...o(it)}));var Z=y(S);dt(Z,()=>t.children??Kt),C(S),C(A),u(M,A)};N(Ot,M=>{t.child?M(kt):M(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))};N(G,V=>{r()?V(K):r()||V(nt,1)})}u(m,W),yt()}var Ze=D("<button><!></button>");function Qe(m,t){const e=he();_t(t,!0);let s=v(t,"id",19,()=>pe(e)),n=v(t,"ref",15,null),r=v(t,"type",3,"button"),h=v(t,"disabled",3,!1),i=v(t,"openOnHover",3,!1),f=v(t,"openDelay",3,700),x=v(t,"closeDelay",3,300),_=ue(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const c=ee.create({id:k(()=>s()),ref:k(()=>n(),p=>n(p)),disabled:k(()=>!!h()),openOnHover:k(()=>i()),openDelay:k(()=>f()),closeDelay:k(()=>x())}),a=O(()=>$t(_,c.props,{type:r()}));Se(m,{get id(){return s()},get ref(){return c.opts.ref},children:(p,T)=>{var E=j(),Ct=H(E);{var wt=G=>{var K=j(),nt=H(K);dt(nt,()=>t.child,()=>({props:o(a)})),u(G,K)},W=G=>{var K=Ze();ct(K,()=>({...o(a)}));var nt=y(K);dt(nt,()=>t.children??Kt),C(K),u(G,K)};N(Ct,G=>{t.child?G(wt):G(W,!1)})}u(p,E)},$$slots:{default:!0}}),yt()}function Re(m,t){_t(t,!0);let e=v(t,"open",15,!1),s=v(t,"onOpenChange",3,xt),n=v(t,"onOpenChangeComplete",3,xt);te.create({open:k(()=>e(),r=>{e(r),s()(r)}),onOpenChangeComplete:k(()=>n())}),Ne(m,{children:(r,h)=>{var i=j(),f=H(i);dt(f,()=>t.children??Kt),u(r,i)},$$slots:{default:!0}}),yt()}var to=Vt("<title> </title>"),eo=Vt('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function oo(m,t){const e=Mt(t,["children","$$slots","$$events","$$legacy"]),s=Mt(e,["size","title"]);_t(t,!1);const n=At(),r=At();let h=v(t,"size",8,16),i=v(t,"title",8,void 0);Ht(()=>(ot(e),ot(i())),()=>{d(n,e["aria-label"]||e["aria-labelledby"]||i())}),Ht(()=>(o(n),ot(e)),()=>{d(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Ut(),Zt();var f=eo();ct(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:h(),height:h(),...o(r),...s}));var x=y(f);{var _=c=>{var a=to(),p=y(a,!0);C(a),ut(()=>Tt(p,i())),u(c,a)};N(x,c=>{i()&&c(_)})}U(3),C(f),u(m,f),yt()}var no=Vt("<title> </title>"),ro=Vt('<svg><!><path d="M10 6H28V8H10z"></path><path d="M10 24H28V26H10z"></path><path d="M10 15H28V17H10z"></path><path d="M4 15H6V17H4z"></path><path d="M4 6H6V8H4z"></path><path d="M4 24H6V26H4z"></path></svg>');function so(m,t){const e=Mt(t,["children","$$slots","$$events","$$legacy"]),s=Mt(e,["size","title"]);_t(t,!1);const n=At(),r=At();let h=v(t,"size",8,16),i=v(t,"title",8,void 0);Ht(()=>(ot(e),ot(i())),()=>{d(n,e["aria-label"]||e["aria-labelledby"]||i())}),Ht(()=>(o(n),ot(e)),()=>{d(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Ut(),Zt();var f=ro();ct(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:h(),height:h(),...o(r),...s}));var x=y(f);{var _=c=>{var a=no(),p=y(a,!0);C(a),ut(()=>Tt(p,i())),u(c,a)};N(x,c=>{i()&&c(_)})}U(6),C(f),u(m,f),yt()}var io=Vt("<title> </title>"),ao=Vt('<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 lo(m,t){const e=Mt(t,["children","$$slots","$$events","$$legacy"]),s=Mt(e,["size","title"]);_t(t,!1);const n=At(),r=At();let h=v(t,"size",8,16),i=v(t,"title",8,void 0);Ht(()=>(ot(e),ot(i())),()=>{d(n,e["aria-label"]||e["aria-labelledby"]||i())}),Ht(()=>(o(n),ot(e)),()=>{d(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Ut(),Zt();var f=ao();ct(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:h(),height:h(),...o(r),...s}));var x=y(f);{var _=c=>{var a=io(),p=y(a,!0);C(a),ut(()=>Tt(p,i())),u(c,a)};N(x,c=>{i()&&c(_)})}U(),C(f),u(m,f),yt()}const ho=Re,uo=Qe,co=Ue;var po=D('<div class="tab active svelte-r6dy5f"><input class="tab-rename-input svelte-r6dy5f"/></div>'),fo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),vo=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),mo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),go=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),bo=D("<!> <span>New View</span>",1),_o=D('<button class="add-view-option svelte-r6dy5f"><!> List</button> <button class="add-view-option svelte-r6dy5f"><!> Calendar</button>',1),yo=D("<!> <!>",1),Co=D("<!> <!>",1),wo=D("<!> <!>",1),Po=D("<!> <!>",1),xo=D('<div class="tab-bar svelte-r6dy5f"><div class="tabs-scroll svelte-r6dy5f"><button><span class="tab-label svelte-r6dy5f">Home</span></button> <button><span class="tab-label svelte-r6dy5f">Graph</span></button> <!> <!> <!></div> <div class="bar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function $o(m,t){_t(t,!0);let e=v(t,"activeView",3,"entity");const s=ge("chat");function n(l){re(l,{noScroll:!0})}const r=O(()=>et.selectedId!==null),h=O(()=>{if(!et.selectedRepo||!et.selectedId)return"";for(const l of He.repos){if(l.name!==et.selectedRepo)continue;const g=l.entities.find(w=>w.id===et.selectedId);if(g)return g.title}return et.selectedId.replace(/-/g," ").replace(/\b\w/g,l=>l.toUpperCase())});function i(){et.deselect(),n("/")}let f=F(!1);async function x(l){d(f,!1);const g=l==="calendar"?"Calendar":"List",w=await Bt.create(g,l);re(`/views/${w.id}`)}let _=F(null),c=F(""),a=F(null),p=F(!1);function T(l){d(p,!1),d(_,l.id,!0),d(c,l.name,!0)}be(()=>{o(_)&&o(a)&&(o(a).focus(),o(a).select(),setTimeout(()=>{d(p,!0)},50))});function E(){o(p)&&(o(_)&&o(c).trim()&&Bt.update(o(_),{name:o(c).trim()}),d(_,null),d(p,!1))}function Ct(){d(_,null),d(p,!1)}function wt(l){l.key==="Enter"&&(l.preventDefault(),d(p,!0),E()),l.key==="Escape"&&(l.preventDefault(),Ct())}let W=F(null);function G(l,g){l.stopPropagation(),d(W,g,!0)}async function K(){o(W)&&(await Bt.remove(o(W).id),d(W,null))}var nt=xo(),V=H(nt),It=y(V),pt=y(It);let rt;var ft=z(pt,2);let st;var it=z(ft,2);we(it,17,()=>Bt.views,l=>l.id,(l,g)=>{var w=j(),Q=H(w);{var R=B=>{var I=po(),b=y(I);_e(b),Ce(b,P=>d(a,P),()=>o(a)),C(I),ut(P=>ye(b,"size",P),[()=>Math.max(o(c).length,1)]),X("keydown",b,wt),X("input",b,P=>{d(c,P.currentTarget.value,!0)}),me("blur",b,E),Pe(b,()=>o(c),P=>d(c,P)),u(B,I)},tt=B=>{const I=O(()=>e()==="view"&&et.activeViewId===o(g).id);var b=vo();let P;var lt=y(b),$=y(lt,!0);C(lt);var L=z(lt,2);{var Dt=Y=>{var J=fo(),zt=y(J);se(zt,{size:12}),C(J),X("click",J,Yt=>G(Yt,o(g))),u(Y,J)};N(L,Y=>{o(I)&&Y(Dt)})}C(b),ut(()=>{P=Wt(b,1,"tab svelte-r6dy5f",null,P,{"tab-permanent":!o(I),active:o(I)}),Tt($,o(g).name)}),X("click",b,()=>n(`/views/${o(g).id}`)),X("dblclick",b,()=>T(o(g))),u(B,b)};N(Q,B=>{o(_)===o(g).id?B(R):B(tt,!1)})}u(l,w)});var at=z(it,2);{var Ot=l=>{const g=O(()=>e()==="entity"&&o(r));var w=go();let Q;var R=y(w),tt=y(R,!0);C(R);var B=z(R,2);{var I=b=>{var P=mo(),lt=y(P);se(lt,{size:12}),C(P),X("click",P,$=>{$.stopPropagation(),i()}),u(b,P)};N(B,b=>{o(g)&&b(I)})}C(w),ut(()=>{Q=Wt(w,1,"tab svelte-r6dy5f",null,Q,{"tab-permanent":!o(g),active:o(g)}),Tt(tt,o(h))}),X("click",w,()=>n(et.entityPath??"/")),u(l,w)};N(at,l=>{o(r)&&l(Ot)})}var kt=z(at,2);q(kt,()=>ho,(l,g)=>{g(l,{get open(){return o(f)},set open(w){d(f,w,!0)},children:(w,Q)=>{var R=yo(),tt=H(R);q(tt,()=>uo,(I,b)=>{b(I,{class:"new-view-btn",title:"New view",children:(P,lt)=>{var $=bo(),L=H($);Te(L,{size:16}),U(2),u(P,$)},$$slots:{default:!0}})});var B=z(tt,2);q(B,()=>co,(I,b)=>{b(I,{class:"add-view-menu",sideOffset:4,align:"start",children:(P,lt)=>{var $=_o(),L=H($),Dt=y(L);so(Dt,{size:14}),U(),C(L);var Y=z(L,2),J=y(Y);lo(J,{size:14}),U(),C(Y),X("click",L,()=>x("list")),X("click",Y,()=>x("calendar")),u(P,$)},$$slots:{default:!0}})}),u(w,R)},$$slots:{default:!0}})}),C(It);var Pt=z(It,2),M=y(Pt);{var A=l=>{var g=j(),w=H(g);dt(w,()=>t.right),u(l,g)};N(M,l=>{t.right&&l(A)})}var S=z(M,2);{var Z=l=>{xe(l,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return s.toggle},children:(g,w)=>{oo(g,{size:14})},$$slots:{default:!0}})};N(S,l=>{s.open||l(Z)})}C(Pt),C(V);var fe=z(V,2);{let l=O(()=>!!o(W));q(fe,()=>qe,(g,w)=>{w(g,{get open(){return o(l)},onOpenChange:Q=>{Q||d(W,null)},children:(Q,R)=>{var tt=j(),B=H(tt);q(B,()=>We,(I,b)=>{b(I,{children:(P,lt)=>{var $=Po(),L=H($);q(L,()=>Be,(Y,J)=>{J(Y,{children:(zt,Yt)=>{var Ft=Co(),Et=H(Ft);q(Et,()=>$e,(vt,mt)=>{mt(vt,{children:(gt,qt)=>{U();var ht=Nt("Delete view?");u(gt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);q(Xt,()=>Ke,(vt,mt)=>{mt(vt,{children:(gt,qt)=>{U();var ht=Nt();ut(()=>Tt(ht,`The view "${o(W)?.name??""}" will be permanently deleted.`)),u(gt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})});var Dt=z(L,2);q(Dt,()=>Le,(Y,J)=>{J(Y,{children:(zt,Yt)=>{var Ft=wo(),Et=H(Ft);q(Et,()=>Ye,(vt,mt)=>{mt(vt,{children:(gt,qt)=>{U();var ht=Nt("Cancel");u(gt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);q(Xt,()=>Xe,(vt,mt)=>{mt(vt,{onclick:K,children:(gt,qt)=>{U();var ht=Nt("Delete");u(gt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})}),u(P,$)},$$slots:{default:!0}})}),u(Q,tt)},$$slots:{default:!0}})})}ut(()=>{rt=Wt(pt,1,"tab tab-permanent svelte-r6dy5f",null,rt,{active:e()==="home"}),st=Wt(ft,1,"tab tab-permanent svelte-r6dy5f",null,st,{active:e()==="graph"})}),X("click",pt,()=>n("/")),X("click",ft,()=>e()!=="graph"&&n("/graph")),u(m,nt),yt()}ve(["click","keydown","input","dblclick"]);export{co as C,ho as R,uo as T,$o as V,lo as a};
|
|
1
|
+
import{o as St,p as he,c as j,a as u,b as D,s as Tt,f as Vt,d as ve,g as X,t as Nt,e as me}from"./iDtAARVW.js";import{e as F,s as d,g as o,u as O,p as _t,h as H,b as yt,c as y,ad as Kt,r as C,l as Ht,d as ot,a as Ut,n as U,m as At,t as ut,aC as ge,a5 as be,i as z}from"./CT6oIU-C.js";import{b as dt,a as ct,r as _e,s as ye}from"./CmCtpZ1Y.js";import{i as N,b as Ce}from"./72bZS3G9.js";import{e as we}from"./CDV5Q7RN.js";import{c as q}from"./CXH6iFbA.js";import{s as Wt}from"./DGbA7IXh.js";import{b as Pe,B as xe}from"./BS2rFAVq.js";import{p as v,s as ne,r as ue,l as Mt}from"./cLyZlkXv.js";import{g as re}from"./FdYTYKiQ.js";import{i as Zt}from"./Y90OgS-9.js";import{A as Te,C as se}from"./vSaooFHB.js";import{n as et}from"./4Hhzb6pv.js";import{v as Bt}from"./DF6CqIgb.js";import{w as He}from"./CJ8__CWt.js";import{w as Qt,H as Ae,I as bt,C as Me,a as de,J as Ve,K as Lt,E as Ie,S as Oe,L as ce,c as ke,N as De,O as ie,h as k,d as ze,f as pe,n as xt,P as Fe,p as Ee,m as $t,q as ae,r as Se,F as Ne,A as We,u as Be,v as $e,x as Ke,y as Le,z as Ye,B as Xe,G as qe}from"./CJUKmosC.js";function jt(m,t){const[e,s]=m;let n=!1;const r=t.length;for(let h=0,i=r-1;h<r;i=h++){const[f,x]=t[h]??[0,0],[_,c]=t[i]??[0,0];x>=s!=c>=s&&e<=(_-f)*(s-x)/(c-x)+f&&(n=!n)}return n}function Gt(m,t){return m[0]>=t.left&&m[0]<=t.right&&m[1]>=t.top&&m[1]<=t.bottom}function le(m,t){const e=m.left+m.width/2,s=m.top+m.height/2,n=t.left+t.width/2,r=t.top+t.height/2,h=n-e,i=r-s;return Math.abs(h)>Math.abs(i)?h>0?"right":"left":i>0?"bottom":"top"}class je{#t;#n;#s;#r=null;#e=null;#l=[];#h=null;#o=null;#i=null;#a(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#d(){this.#a(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#r||!this.#e)&&(this.#u(),this.#t.onPointerExit())})}#c(){this.#i!==null&&(clearTimeout(this.#i),this.#i=null)}#f(){this.#s!==null&&(this.#c(),this.#i=window.setTimeout(()=>{this.#i=null,!(!this.#r||!this.#e)&&(this.#u(),this.#t.onPointerExit())},this.#s))}constructor(t){this.#t=t,this.#n=t.buffer??1;const e=t.transitIntentTimeout;this.#s=typeof e=="number"&&e>0?e:null,Qt([t.triggerNode,t.contentNode,t.enabled],([s,n,r])=>{if(!s||!n||!r){this.#h=null,this.#u();return}this.#h&&this.#h!==s&&this.#u(),this.#h=s;const h=Ae(s),i=a=>{this.#v([a.clientX,a.clientY],s,n)},f=a=>{const p=a.relatedTarget;if(bt(p)&&n.contains(p))return;const T=this.#t.ignoredTargets?.()??[];bt(p)&&T.some(E=>E===p||E.contains(p))||(this.#l=bt(p)&&T.length>0?T.filter(E=>p.contains(E)):[],this.#r=[a.clientX,a.clientY],this.#e="content",this.#d())},x=()=>{this.#u()},_=()=>{this.#u()},c=a=>{const p=a.relatedTarget;bt(p)&&s.contains(p)||(this.#r=[a.clientX,a.clientY],this.#e="trigger",this.#d())};return[St(h,"pointermove",i),St(s,"pointerleave",f),St(s,"pointerenter",x),St(n,"pointerenter",_),St(n,"pointerleave",c)].reduce((a,p)=>()=>{a(),p()},()=>{})})}#v(t,e,s){if(!this.#r||!this.#e)return;this.#a(),this.#f();const n=e.getBoundingClientRect(),r=s.getBoundingClientRect();if(this.#e==="content"&&Gt(t,r)){this.#u();return}if(this.#e==="trigger"&&Gt(t,n)){this.#u();return}if(this.#e==="content"&&this.#l.length>0)for(const _ of this.#l){const c=_.getBoundingClientRect();if(Gt(t,c))return;const a=le(n,c),p=this.#p(n,c,a);if(p&&jt(t,p))return}const h=le(n,r),i=this.#p(n,r,h);if(i&&jt(t,i))return;const f=this.#e==="content"?r:n,x=this.#m(this.#r,f,h,this.#e);jt(t,x)||(this.#u(),this.#t.onPointerExit())}#u(){this.#r=null,this.#e=null,this.#l=[],this.#a(),this.#c()}#p(t,e,s){const n=this.#n;switch(s){case"top":return[[Math.min(t.left,e.left)-n,t.top],[Math.min(t.left,e.left)-n,e.bottom],[Math.max(t.right,e.right)+n,e.bottom],[Math.max(t.right,e.right)+n,t.top]];case"bottom":return[[Math.min(t.left,e.left)-n,t.bottom],[Math.min(t.left,e.left)-n,e.top],[Math.max(t.right,e.right)+n,e.top],[Math.max(t.right,e.right)+n,t.bottom]];case"left":return[[t.left,Math.min(t.top,e.top)-n],[e.right,Math.min(t.top,e.top)-n],[e.right,Math.max(t.bottom,e.bottom)+n],[t.left,Math.max(t.bottom,e.bottom)+n]];case"right":return[[t.right,Math.min(t.top,e.top)-n],[e.left,Math.min(t.top,e.top)-n],[e.left,Math.max(t.bottom,e.bottom)+n],[t.right,Math.max(t.bottom,e.bottom)+n]]}}#m(t,e,s,n){const r=this.#n*4,[h,i]=t;switch(n==="trigger"?this.#g(s):s){case"top":return[[h-r,i+r],[h+r,i+r],[e.right+r,e.bottom],[e.right+r,e.top],[e.left-r,e.top],[e.left-r,e.bottom]];case"bottom":return[[h-r,i-r],[h+r,i-r],[e.right+r,e.top],[e.right+r,e.bottom],[e.left-r,e.bottom],[e.left-r,e.top]];case"left":return[[h+r,i-r],[h+r,i+r],[e.right,e.bottom+r],[e.left,e.bottom+r],[e.left,e.top-r],[e.right,e.top-r]];case"right":return[[h-r,i-r],[h-r,i+r],[e.left,e.bottom+r],[e.right,e.bottom+r],[e.right,e.top-r],[e.left,e.top-r]]}}#g(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const Jt=ze({component:"popover",parts:["root","trigger","content","close","overlay"]}),Rt=new Me("Popover.Root");class te{static create(t){return Rt.set(new te(t))}opts;#t=F(null);get contentNode(){return o(this.#t)}set contentNode(t){d(this.#t,t,!0)}contentPresence;#n=F(null);get triggerNode(){return o(this.#n)}set triggerNode(t){d(this.#n,t,!0)}#s=F(null);get overlayNode(){return o(this.#s)}set overlayNode(t){d(this.#s,t,!0)}overlayPresence;#r=F(!1);get openedViaHover(){return o(this.#r)}set openedViaHover(t){d(this.#r,t,!0)}#e=F(!1);get hasInteractedWithContent(){return o(this.#e)}set hasInteractedWithContent(t){d(this.#e,t,!0)}#l=F(!1);get hoverCooldown(){return o(this.#l)}set hoverCooldown(t){d(this.#l,t,!0)}#h=F(0);get closeDelay(){return o(this.#h)}set closeDelay(t){d(this.#h,t,!0)}#o=null;#i=null;constructor(t){this.opts=t,this.contentPresence=new ie({ref:k(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ie({ref:k(()=>this.overlayNode),open:this.opts.open}),Qt(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#a())})}setDomContext(t){this.#i=t}#a(){this.#o!==null&&this.#i&&(this.#i.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#a(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#a(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#a(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#a(),this.closeDelay<=0?this.opts.open.current=!1:this.#i&&(this.#o=this.#i.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#a()}markInteraction(){this.hasInteractedWithContent=!0,this.#a()}}class ee{static create(t){return new ee(t,Rt.get())}opts;root;attachment;domContext;#t=null;#n=null;#s=F(!1);constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.triggerNode=s),this.domContext=new Ve(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Qt(()=>this.opts.closeDelay.current,s=>{this.root.closeDelay=s})}#r(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#e(){this.#n!==null&&(this.domContext.clearTimeout(this.#n),this.#n=null)}#l(){this.#r(),this.#e()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||Lt(t)||(d(this.#s,!0),this.#e(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const e=this.opts.openDelay.current;e<=0?this.root.handleHoverOpen():this.#t=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#t=null},e)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(Lt(t)||(d(this.#s,!1),this.#r(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#l(),o(this.#s)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}o(this.#s)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key===Ie||t.key===Oe)&&(t.preventDefault(),this.#l(),this.root.toggleOpen())}#h(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=O(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ke(this.root.opts.open.current),"data-state":ce(this.root.opts.open.current),"aria-controls":this.#h(),[Jt.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#o)}set props(t){d(this.#o,t)}}class oe{static create(t){return new oe(t,Rt.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=de(this.opts.ref,s=>this.root.contentNode=s),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new je({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const e=t.target;bt(e)&&De(e)&&this.root.markInteraction()}onpointerenter(t){Lt(t)||this.root.cancelDelayedClose()}onpointerleave(t){Lt(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!bt(t.target))return;const e=t.target.closest(Jt.selector("trigger"));if(!(e&&e===this.root.triggerNode)){if(this.opts.customAnchor.current){if(bt(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const s=document.querySelector(this.opts.customAnchor.current);if(s&&s.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#t=O(()=>({open:this.root.opts.open.current}));get snippetProps(){return o(this.#t)}set snippetProps(t){d(this.#t,t)}#n=O(()=>({id:this.opts.id.current,tabindex:-1,"data-state":ce(this.root.opts.open.current),[Jt.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return o(this.#n)}set props(t){d(this.#n,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var Ge=D("<div><div><!></div></div>"),Je=D("<div><div><!></div></div>");function Ue(m,t){const e=he();_t(t,!0);let s=v(t,"ref",15,null),n=v(t,"id",19,()=>pe(e)),r=v(t,"forceMount",3,!1),h=v(t,"onOpenAutoFocus",3,xt),i=v(t,"onCloseAutoFocus",3,xt),f=v(t,"onEscapeKeydown",3,xt),x=v(t,"onInteractOutside",3,xt),_=v(t,"trapFocus",3,!0),c=v(t,"preventScroll",3,!1),a=v(t,"customAnchor",3,null),p=ue(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const T=oe.create({id:k(()=>n()),ref:k(()=>s(),V=>s(V)),onInteractOutside:k(()=>x()),onEscapeKeydown:k(()=>f()),customAnchor:k(()=>a())}),E=O(()=>$t(p,T.props)),Ct=O(()=>_()&&T.shouldTrapFocus);function wt(V){T.shouldTrapFocus||V.preventDefault(),h()(V)}var W=j(),G=H(W);{var K=V=>{Fe(V,ne(()=>o(E),()=>T.popperProps,{get ref(){return T.opts.ref},get enabled(){return T.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return c()},loop:!0,forceMount:!0,get customAnchor(){return a()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return T.shouldRender},popper:(pt,rt)=>{let ft=()=>rt?.().props,st=()=>rt?.().wrapperProps;const it=O(()=>$t(ft(),{style:ae("popover")},{style:t.style}));var at=j(),Ot=H(at);{var kt=M=>{var A=j(),S=H(A);{let Z=O(()=>({props:o(it),wrapperProps:st(),...T.snippetProps}));dt(S,()=>t.child,()=>o(Z))}u(M,A)},Pt=M=>{var A=Ge();ct(A,()=>({...st()}));var S=y(A);ct(S,()=>({...o(it)}));var Z=y(S);dt(Z,()=>t.children??Kt),C(S),C(A),u(M,A)};N(Ot,M=>{t.child?M(kt):M(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))},nt=V=>{Ee(V,ne(()=>o(E),()=>T.popperProps,{get ref(){return T.opts.ref},get open(){return T.root.opts.open.current},get id(){return n()},get trapFocus(){return o(Ct)},get preventScroll(){return c()},loop:!0,forceMount:!1,get customAnchor(){return a()},onOpenAutoFocus:wt,get onCloseAutoFocus(){return i()},get shouldRender(){return T.shouldRender},popper:(pt,rt)=>{let ft=()=>rt?.().props,st=()=>rt?.().wrapperProps;const it=O(()=>$t(ft(),{style:ae("popover")},{style:t.style}));var at=j(),Ot=H(at);{var kt=M=>{var A=j(),S=H(A);{let Z=O(()=>({props:o(it),wrapperProps:st(),...T.snippetProps}));dt(S,()=>t.child,()=>o(Z))}u(M,A)},Pt=M=>{var A=Je();ct(A,()=>({...st()}));var S=y(A);ct(S,()=>({...o(it)}));var Z=y(S);dt(Z,()=>t.children??Kt),C(S),C(A),u(M,A)};N(Ot,M=>{t.child?M(kt):M(Pt,!1)})}u(pt,at)},$$slots:{popper:!0}}))};N(G,V=>{r()?V(K):r()||V(nt,1)})}u(m,W),yt()}var Ze=D("<button><!></button>");function Qe(m,t){const e=he();_t(t,!0);let s=v(t,"id",19,()=>pe(e)),n=v(t,"ref",15,null),r=v(t,"type",3,"button"),h=v(t,"disabled",3,!1),i=v(t,"openOnHover",3,!1),f=v(t,"openDelay",3,700),x=v(t,"closeDelay",3,300),_=ue(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const c=ee.create({id:k(()=>s()),ref:k(()=>n(),p=>n(p)),disabled:k(()=>!!h()),openOnHover:k(()=>i()),openDelay:k(()=>f()),closeDelay:k(()=>x())}),a=O(()=>$t(_,c.props,{type:r()}));Se(m,{get id(){return s()},get ref(){return c.opts.ref},children:(p,T)=>{var E=j(),Ct=H(E);{var wt=G=>{var K=j(),nt=H(K);dt(nt,()=>t.child,()=>({props:o(a)})),u(G,K)},W=G=>{var K=Ze();ct(K,()=>({...o(a)}));var nt=y(K);dt(nt,()=>t.children??Kt),C(K),u(G,K)};N(Ct,G=>{t.child?G(wt):G(W,!1)})}u(p,E)},$$slots:{default:!0}}),yt()}function Re(m,t){_t(t,!0);let e=v(t,"open",15,!1),s=v(t,"onOpenChange",3,xt),n=v(t,"onOpenChangeComplete",3,xt);te.create({open:k(()=>e(),r=>{e(r),s()(r)}),onOpenChangeComplete:k(()=>n())}),Ne(m,{children:(r,h)=>{var i=j(),f=H(i);dt(f,()=>t.children??Kt),u(r,i)},$$slots:{default:!0}}),yt()}var to=Vt("<title> </title>"),eo=Vt('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function oo(m,t){const e=Mt(t,["children","$$slots","$$events","$$legacy"]),s=Mt(e,["size","title"]);_t(t,!1);const n=At(),r=At();let h=v(t,"size",8,16),i=v(t,"title",8,void 0);Ht(()=>(ot(e),ot(i())),()=>{d(n,e["aria-label"]||e["aria-labelledby"]||i())}),Ht(()=>(o(n),ot(e)),()=>{d(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Ut(),Zt();var f=eo();ct(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:h(),height:h(),...o(r),...s}));var x=y(f);{var _=c=>{var a=to(),p=y(a,!0);C(a),ut(()=>Tt(p,i())),u(c,a)};N(x,c=>{i()&&c(_)})}U(3),C(f),u(m,f),yt()}var no=Vt("<title> </title>"),ro=Vt('<svg><!><path d="M10 6H28V8H10z"></path><path d="M10 24H28V26H10z"></path><path d="M10 15H28V17H10z"></path><path d="M4 15H6V17H4z"></path><path d="M4 6H6V8H4z"></path><path d="M4 24H6V26H4z"></path></svg>');function so(m,t){const e=Mt(t,["children","$$slots","$$events","$$legacy"]),s=Mt(e,["size","title"]);_t(t,!1);const n=At(),r=At();let h=v(t,"size",8,16),i=v(t,"title",8,void 0);Ht(()=>(ot(e),ot(i())),()=>{d(n,e["aria-label"]||e["aria-labelledby"]||i())}),Ht(()=>(o(n),ot(e)),()=>{d(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Ut(),Zt();var f=ro();ct(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:h(),height:h(),...o(r),...s}));var x=y(f);{var _=c=>{var a=no(),p=y(a,!0);C(a),ut(()=>Tt(p,i())),u(c,a)};N(x,c=>{i()&&c(_)})}U(6),C(f),u(m,f),yt()}var io=Vt("<title> </title>"),ao=Vt('<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 lo(m,t){const e=Mt(t,["children","$$slots","$$events","$$legacy"]),s=Mt(e,["size","title"]);_t(t,!1);const n=At(),r=At();let h=v(t,"size",8,16),i=v(t,"title",8,void 0);Ht(()=>(ot(e),ot(i())),()=>{d(n,e["aria-label"]||e["aria-labelledby"]||i())}),Ht(()=>(o(n),ot(e)),()=>{d(r,{"aria-hidden":o(n)?void 0:!0,role:o(n)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Ut(),Zt();var f=ao();ct(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:h(),height:h(),...o(r),...s}));var x=y(f);{var _=c=>{var a=io(),p=y(a,!0);C(a),ut(()=>Tt(p,i())),u(c,a)};N(x,c=>{i()&&c(_)})}U(),C(f),u(m,f),yt()}const ho=Re,uo=Qe,co=Ue;var po=D('<div class="tab active svelte-r6dy5f"><input class="tab-rename-input svelte-r6dy5f"/></div>'),fo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),vo=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),mo=D('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),go=D('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),bo=D("<!> <span>New View</span>",1),_o=D('<button class="add-view-option svelte-r6dy5f"><!> List</button> <button class="add-view-option svelte-r6dy5f"><!> Calendar</button>',1),yo=D("<!> <!>",1),Co=D("<!> <!>",1),wo=D("<!> <!>",1),Po=D("<!> <!>",1),xo=D('<div class="tab-bar svelte-r6dy5f"><div class="tabs-scroll svelte-r6dy5f"><button><span class="tab-label svelte-r6dy5f">Home</span></button> <button><span class="tab-label svelte-r6dy5f">Graph</span></button> <!> <!> <!></div> <div class="bar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function $o(m,t){_t(t,!0);let e=v(t,"activeView",3,"entity");const s=ge("chat");function n(l){re(l,{noScroll:!0})}const r=O(()=>et.selectedId!==null),h=O(()=>{if(!et.selectedRepo||!et.selectedId)return"";for(const l of He.repos){if(l.name!==et.selectedRepo)continue;const g=l.entities.find(w=>w.id===et.selectedId);if(g)return g.title}return et.selectedId.replace(/-/g," ").replace(/\b\w/g,l=>l.toUpperCase())});function i(){et.deselect(),n("/")}let f=F(!1);async function x(l){d(f,!1);const g=l==="calendar"?"Calendar":"List",w=await Bt.create(g,l);re(`/views/${w.id}`)}let _=F(null),c=F(""),a=F(null),p=F(!1);function T(l){d(p,!1),d(_,l.id,!0),d(c,l.name,!0)}be(()=>{o(_)&&o(a)&&(o(a).focus(),o(a).select(),setTimeout(()=>{d(p,!0)},50))});function E(){o(p)&&(o(_)&&o(c).trim()&&Bt.update(o(_),{name:o(c).trim()}),d(_,null),d(p,!1))}function Ct(){d(_,null),d(p,!1)}function wt(l){l.key==="Enter"&&(l.preventDefault(),d(p,!0),E()),l.key==="Escape"&&(l.preventDefault(),Ct())}let W=F(null);function G(l,g){l.stopPropagation(),d(W,g,!0)}async function K(){o(W)&&(await Bt.remove(o(W).id),d(W,null))}var nt=xo(),V=H(nt),It=y(V),pt=y(It);let rt;var ft=z(pt,2);let st;var it=z(ft,2);we(it,17,()=>Bt.views,l=>l.id,(l,g)=>{var w=j(),Q=H(w);{var R=B=>{var I=po(),b=y(I);_e(b),Ce(b,P=>d(a,P),()=>o(a)),C(I),ut(P=>ye(b,"size",P),[()=>Math.max(o(c).length,1)]),X("keydown",b,wt),X("input",b,P=>{d(c,P.currentTarget.value,!0)}),me("blur",b,E),Pe(b,()=>o(c),P=>d(c,P)),u(B,I)},tt=B=>{const I=O(()=>e()==="view"&&et.activeViewId===o(g).id);var b=vo();let P;var lt=y(b),$=y(lt,!0);C(lt);var L=z(lt,2);{var Dt=Y=>{var J=fo(),zt=y(J);se(zt,{size:12}),C(J),X("click",J,Yt=>G(Yt,o(g))),u(Y,J)};N(L,Y=>{o(I)&&Y(Dt)})}C(b),ut(()=>{P=Wt(b,1,"tab svelte-r6dy5f",null,P,{"tab-permanent":!o(I),active:o(I)}),Tt($,o(g).name)}),X("click",b,()=>n(`/views/${o(g).id}`)),X("dblclick",b,()=>T(o(g))),u(B,b)};N(Q,B=>{o(_)===o(g).id?B(R):B(tt,!1)})}u(l,w)});var at=z(it,2);{var Ot=l=>{const g=O(()=>e()==="entity"&&o(r));var w=go();let Q;var R=y(w),tt=y(R,!0);C(R);var B=z(R,2);{var I=b=>{var P=mo(),lt=y(P);se(lt,{size:12}),C(P),X("click",P,$=>{$.stopPropagation(),i()}),u(b,P)};N(B,b=>{o(g)&&b(I)})}C(w),ut(()=>{Q=Wt(w,1,"tab svelte-r6dy5f",null,Q,{"tab-permanent":!o(g),active:o(g)}),Tt(tt,o(h))}),X("click",w,()=>n(et.entityPath??"/")),u(l,w)};N(at,l=>{o(r)&&l(Ot)})}var kt=z(at,2);q(kt,()=>ho,(l,g)=>{g(l,{get open(){return o(f)},set open(w){d(f,w,!0)},children:(w,Q)=>{var R=yo(),tt=H(R);q(tt,()=>uo,(I,b)=>{b(I,{class:"new-view-btn",title:"New view",children:(P,lt)=>{var $=bo(),L=H($);Te(L,{size:16}),U(2),u(P,$)},$$slots:{default:!0}})});var B=z(tt,2);q(B,()=>co,(I,b)=>{b(I,{class:"add-view-menu",sideOffset:4,align:"start",children:(P,lt)=>{var $=_o(),L=H($),Dt=y(L);so(Dt,{size:14}),U(),C(L);var Y=z(L,2),J=y(Y);lo(J,{size:14}),U(),C(Y),X("click",L,()=>x("list")),X("click",Y,()=>x("calendar")),u(P,$)},$$slots:{default:!0}})}),u(w,R)},$$slots:{default:!0}})}),C(It);var Pt=z(It,2),M=y(Pt);{var A=l=>{var g=j(),w=H(g);dt(w,()=>t.right),u(l,g)};N(M,l=>{t.right&&l(A)})}var S=z(M,2);{var Z=l=>{xe(l,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return s.toggle},children:(g,w)=>{oo(g,{size:14})},$$slots:{default:!0}})};N(S,l=>{s.open||l(Z)})}C(Pt),C(V);var fe=z(V,2);{let l=O(()=>!!o(W));q(fe,()=>qe,(g,w)=>{w(g,{get open(){return o(l)},onOpenChange:Q=>{Q||d(W,null)},children:(Q,R)=>{var tt=j(),B=H(tt);q(B,()=>We,(I,b)=>{b(I,{children:(P,lt)=>{var $=Po(),L=H($);q(L,()=>Be,(Y,J)=>{J(Y,{children:(zt,Yt)=>{var Ft=Co(),Et=H(Ft);q(Et,()=>$e,(vt,mt)=>{mt(vt,{children:(gt,qt)=>{U();var ht=Nt("Delete view?");u(gt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);q(Xt,()=>Ke,(vt,mt)=>{mt(vt,{children:(gt,qt)=>{U();var ht=Nt();ut(()=>Tt(ht,`The view "${o(W)?.name??""}" will be permanently deleted.`)),u(gt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})});var Dt=z(L,2);q(Dt,()=>Le,(Y,J)=>{J(Y,{children:(zt,Yt)=>{var Ft=wo(),Et=H(Ft);q(Et,()=>Ye,(vt,mt)=>{mt(vt,{children:(gt,qt)=>{U();var ht=Nt("Cancel");u(gt,ht)},$$slots:{default:!0}})});var Xt=z(Et,2);q(Xt,()=>Xe,(vt,mt)=>{mt(vt,{onclick:K,children:(gt,qt)=>{U();var ht=Nt("Delete");u(gt,ht)},$$slots:{default:!0}})}),u(zt,Ft)},$$slots:{default:!0}})}),u(P,$)},$$slots:{default:!0}})}),u(Q,tt)},$$slots:{default:!0}})})}ut(()=>{rt=Wt(pt,1,"tab tab-permanent svelte-r6dy5f",null,rt,{active:e()==="home"}),st=Wt(ft,1,"tab tab-permanent svelte-r6dy5f",null,st,{active:e()==="graph"})}),X("click",pt,()=>n("/")),X("click",ft,()=>e()!=="graph"&&n("/graph")),u(m,nt),yt()}ve(["click","keydown","input","dblclick"]);export{co as C,ho as R,uo as T,$o as V,lo as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as i,f as y,g as r,s as n}from"./CT6oIU-C.js";import{g as l}from"./
|
|
1
|
+
import{e as i,f as y,g as r,s as n}from"./CT6oIU-C.js";import{g as l}from"./FdYTYKiQ.js";import{d as v,u as V,c as F,f as h}from"./CJ8__CWt.js";const d={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function x(){let a=i(y([])),o=i(null),c=i(!1);async function w(){try{n(a,await h(),!0),n(c,!0)}catch(e){console.error("Failed to load views:",e)}}async function f(e,t="list"){const s=t==="calendar"?{...d,calendar:{dateField:"due_date",year:new Date().getFullYear(),month:new Date().getMonth()+1}}:d,u=await F(e,s,t);return n(a,[...r(a),u],!0),u}async function g(e,t){await V(e,t),n(a,r(a).map(s=>s.id===e?{...s,...t}:s),!0)}async function m(e){if(await v(e),n(a,r(a).filter(t=>t.id!==e),!0),r(o)===e){const t=r(a)[0];t?(n(o,t.id,!0),l(`/views/${t.id}`,{replaceState:!0})):(n(o,null),l("/",{replaceState:!0}))}}function p(e){n(o,e,!0)}return{get views(){return r(a)},get activeViewId(){return r(o)},get loaded(){return r(c)},load:w,create:f,update:g,remove:m,setActive:p}}const D=x();export{D as v};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BTX2Jr8_.js","./CT6oIU-C.js","./CJ8__CWt.js","./DGbA7IXh.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as Y}from"./PPVm8Dsz.js";import{aY as G,aC as A,aX as X,e as S,f as P,g,s as c,a6 as D,u as q}from"./CT6oIU-C.js";import{i as z}from"./
|
|
2
|
+
import{_ as Y}from"./PPVm8Dsz.js";import{aY as G,aC as A,aX as X,e as S,f as P,g,s as c,a6 as D,u as q}from"./CT6oIU-C.js";import{i as z}from"./FdYTYKiQ.js";import{i as H,w as h}from"./CJ8__CWt.js";import{a as K}from"./DbbB6Up5.js";import{n as $}from"./4Hhzb6pv.js";import{l as Q,o as N}from"./iDtAARVW.js";function At(...t){return t.filter(Boolean).join(" ")}const Z=typeof document<"u",v=typeof window<"u"?window:void 0;function tt(t){let e=t.activeElement;for(;e?.shadowRoot;){const s=e.shadowRoot.activeElement;if(s===e)break;e=s}return e}class et{#e;#t;constructor(e={}){const{window:s=v,document:i=s?.document}=e;s!==void 0&&(this.#e=i,this.#t=Q(n=>{const r=N(s,"focusin",n),o=N(s,"focusout",n);return()=>{r(),o()}}))}get current(){return this.#t?.(),this.#e?tt(this.#e):null}}new et;class st{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return G(this.#t)}get(){const e=A(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const s=A(this.#t);return s===void 0?e:s}set(e){return X(this.#t,e)}}const it=new st("<Toaster/>");let U=0;class nt{#e=S(P([]));get toasts(){return g(this.#e)}set toasts(e){c(this.#e,e,!0)}#t=S(P([]));get heights(){return g(this.#t)}set heights(e){c(this.#t,e,!0)}#s=e=>{const s=this.toasts.findIndex(i=>i.id===e);return s===-1?null:s};addToast=e=>{Z&&this.toasts.unshift(e)};updateToast=({id:e,data:s,type:i,message:n})=>{const r=this.toasts.findIndex(f=>f.id===e),o=this.toasts[r];this.toasts[r]={...o,...s,id:e,title:n,type:i,updated:!0}};create=e=>{const{message:s,...i}=e,n=typeof e?.id=="number"||e.id&&e.id?.length>0?e.id:U++,r=e.dismissible!==void 0?e.dismissible:e.dismissable!==void 0?e.dismissable:!0,o=e.type===void 0?"default":e.type;return D(()=>{this.toasts.find(E=>E.id===n)?this.updateToast({id:n,data:e,type:o,message:s,dismissible:r}):this.addToast({...i,id:n,title:s,dismissible:r,type:o})}),n};dismiss=e=>(D(()=>{if(e===void 0){this.toasts=this.toasts.map(i=>({...i,dismiss:!0}));return}const s=this.toasts.findIndex(i=>i.id===e);this.toasts[s]&&(this.toasts[s]={...this.toasts[s],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}const s=this.#s(e);if(s!==null)return this.toasts.splice(s,1),e};message=(e,s)=>this.create({...s,type:"default",message:e});error=(e,s)=>this.create({...s,type:"error",message:e});success=(e,s)=>this.create({...s,type:"success",message:e});info=(e,s)=>this.create({...s,type:"info",message:e});warning=(e,s)=>this.create({...s,type:"warning",message:e});loading=(e,s)=>this.create({...s,type:"loading",message:e});promise=(e,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:e,type:"loading",message:typeof s.loading=="string"?s.loading:s.loading()}));const n=e instanceof Promise?e:e();let r=i!==void 0;return n.then(o=>{if(typeof o=="object"&&o&&"ok"in o&&typeof o.ok=="boolean"&&!o.ok){r=!1;const f=rt(o);this.create({id:i,type:"error",message:f})}else if(s.success!==void 0){r=!1;const f=typeof s.success=="function"?s.success(o):s.success;this.create({id:i,type:"success",message:f})}}).catch(o=>{if(s.error!==void 0){r=!1;const f=typeof s.error=="function"?s.error(o):s.error;this.create({id:i,type:"error",message:f})}}).finally(()=>{r&&(this.dismiss(i),i=void 0),s.finally?.()}),i};custom=(e,s)=>{const i=s?.id||U++;return this.create({component:e,id:i,...s}),i};removeHeight=e=>{this.heights=this.heights.filter(s=>s.toastId!==e)};setHeight=e=>{const s=this.#s(e.toastId);if(s===null){this.heights.push(e);return}this.heights[s]=e};reset=()=>{this.toasts=[],this.heights=[]}}function rt(t){return t&&typeof t=="object"&&"status"in t?`HTTP error! Status: ${t.status}`:`Error! ${t}`}const d=new nt;function ot(t,e){return d.create({message:t,...e})}class Pt{#e=q(()=>d.toasts.filter(e=>!e.dismiss));get toasts(){return g(this.#e)}}function Dt(){return it.get()}const ct=ot,u=Object.assign(ct,{success:d.success,info:d.info,warning:d.warning,error:d.error,custom:d.custom,message:d.message,promise:d.promise,dismiss:d.dismiss,loading:d.loading,getActiveToasts:()=>d.toasts.filter(t=>!t.dismiss)}),at=800;function ut(){let t=S(!1),e=S(null),s=S(null),i=null,n=null,r=!1;function o(p,w,m,l){i&&i.repo===p&&i.type===w&&i.id===m?(l.data!==void 0&&(i.payload.data=l.data),l.content!==void 0&&(i.payload.content=l.content)):i={repo:p,type:w,id:m,payload:{...l}},f()}function f(){n&&clearTimeout(n),n=setTimeout(E,at)}async function E(){if(n=null,!r&&i){const{repo:p,type:w,id:m,payload:l}=i;i=null,r=!0,c(t,!0),c(s,null);try{if(await H(p,w,m,l),c(e,new Date,!0),l.data?.name){const b=h.repos.find(C=>C.name===p)?.entities.find(C=>C.id===m);b&&(b.title=l.data.name)}}catch(y){c(s,y.message??"Save failed",!0);const b=y.status??y.statusCode;(!b||b>=500)&&(i={repo:p,type:w,id:m,payload:l})}finally{c(t,!1),r=!1,i&&E()}}}function J(){n&&(clearTimeout(n),n=null),i&&E()}async function L(p,w,m,l){c(t,!0),c(s,null);try{const y=await H(p,w,m,l);return c(e,new Date,!0),y}catch(y){return c(s,y.message??"Save failed",!0),null}finally{c(t,!1)}}function V(){c(s,null),c(e,null),i=null,n&&(clearTimeout(n),n=null)}return{get saving(){return g(t)},get lastSaved(){return g(e)},get error(){return g(s)},get hasPending(){return!!(i||r)},scheduleAutoSave:o,flush:J,saveEntity:L,reset:V}}const lt=ut();let a=null,B=null,R=null,F=[],I=null,_=1e3,k=S(!1),W=S(null);const T=new Map,x={},O={};function j(t,e){T.delete(t);const s=e.entities.length,i=s===1?`${t} updated ${e.entities[0]}`:`${t} updated ${s} entities`;u(i)}function dt(t){for(const[e,s]of T)s.repo===t&&(clearTimeout(s.timer),T.delete(e))}function ft(t){const e=K.user?.displayName;if(t.type==="sync_progress"){const s=x[t.repo];if(s){const i=t.message.trim(),n=i.match(/^Syncing from source:\s*(.+)$/i);n&&(O[t.repo]=`Syncing ${n[1].trim()}…`);const r=O[t.repo]??`Syncing ${t.repo}…`;u.loading(r,{id:s,description:i,duration:36e5})}return}if(t.type==="entity_change"){if(e&&t.actor===e&&t.source==="api"){h.refreshEntities(t.repo);return}if(h.refreshEntities(t.repo),$.selectedRepo===t.repo&&$.selectedType===t.entityType&&$.selectedId===t.entityId){lt.hasPending?u(`${t.actor} also saved changes to this entity`):z();return}const i=T.get(t.actor);if(i)clearTimeout(i.timer),i.entities.includes(t.entityId)||i.entities.push(t.entityId),i.timer=setTimeout(()=>j(t.actor,i),1e4);else{const n={entities:[t.entityId],repo:t.repo,timer:setTimeout(()=>j(t.actor,n),1e4)};T.set(t.actor,n)}return}if(t.type==="session_commit"){if(e&&t.actor===e){c(W,t.timestamp,!0);return}const s=t.entities.length,i=s===1?`${t.actor} saved changes to ${t.entities[0]}`:`${t.actor} saved ${s} changes in ${t.repo}`;u(i),h.refreshEntities(t.repo);return}if(t.type==="sync_complete"){if(dt(t.repo),!x[t.repo]){const s=t.created+t.updated+t.deleted,i=s===0?`Sync complete · no changes in ${t.repo}`:`Sync complete · ${s} ${s===1?"entity":"entities"} from ${t.source}`;u.success(i)}h.refreshEntities(t.repo);return}if(t.type==="collection_created"){u(`${t.actor} created collection ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="collection_deleted"){u(`${t.actor} deleted collection ${t.repo}`);return}if(t.type==="repo_sync"){u(`${t.actor} pushed to ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="presence"){B?.(t);return}if(t.type==="online"){R?.(t);return}if(t.type==="insights_updated"){Y(()=>import("./BTX2Jr8_.js"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(s=>s.insightsStore.load());return}if(t.type==="access_granted"||t.type==="access_revoked"){t.type==="access_revoked"&&$.selectedRepo===t.repo&&$.deselect(),h.load();return}}function M(){if(typeof window>"u"||a&&(a.readyState===WebSocket.OPEN||a.readyState===WebSocket.CONNECTING))return;const e=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;a=new WebSocket(e),a.binaryType="arraybuffer",a.onopen=()=>{c(k,!0),_=1e3,h.refreshAll();for(const s of F)s()},a.onmessage=s=>{if(!(s.data instanceof ArrayBuffer))try{const i=JSON.parse(s.data);if(i?.type==="ping"){a?.send(JSON.stringify({type:"pong"}));return}const n=i;n.type&&n.type!=="toast"&&ft(n)}catch{}},a.onclose=()=>{c(k,!1),a=null,I=setTimeout(()=>{_=Math.min(_*2,1e4),M()},_)},a.onerror=()=>{}}function ht(){I&&(clearTimeout(I),I=null),a&&(a.close(),a=null),c(k,!1);for(const[,t]of T)clearTimeout(t.timer);T.clear()}function pt(t,e=4e3){u(t,{duration:e})}function mt(t,e){const s=crypto.randomUUID();return e?.loading?u.loading(t,{id:s,duration:36e5}):u(t,{id:s}),s}function yt(t,e,s){if(s?.loading){u.loading(e,{id:t});return}/failed|error/i.test(e)?u.error(e,{id:t,duration:s?.duration??6e3}):u.success(e,{id:t,duration:s?.duration??4e3})}function gt(t){const e=crypto.randomUUID();x[t]=e,u.loading(`Syncing ${t}…`,{id:e,duration:36e5})}function wt(t,e,s){const i=x[t];i&&(delete x[t],delete O[t],s?u.error(e,{id:i,duration:6e3}):u.success(e,{id:i,duration:4e3}))}function St(t){B=t}function Tt(t){R=t}function Et(t){F.push(t)}function bt(t){a?.readyState===WebSocket.OPEN&&a.send(JSON.stringify(t))}const Ht={get connected(){return g(k)},get lastAutoSaved(){return g(W)},get ws(){return a},connect:M,disconnect:ht,showToast:pt,showPersistentToast:mt,updateToast:yt,startSyncToast:gt,finishSyncToast:wt,send:bt,setPresenceHandler:St,setOnlineHandler:Tt,addConnectHandler:Et};export{Pt as S,d as a,At as c,lt as e,Ht as r,it as s,u as t,Dt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./
|
|
1
|
+
import{s as e}from"./FdYTYKiQ.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b as G,o as ye,g as Ct,e as Me,c as b,d as Ee,t as he,s as Yt,f as Ft}from"./iDtAARVW.js";import{p as fe,c as J,r as Y,t as K,b as ve,e as A,f as we,a5 as ht,s as r,g as e,a6 as Xt,aE as xe,i as Lt,u as l,ad as lt,h}from"./CT6oIU-C.js";import{i as B,b as Ie}from"./72bZS3G9.js";import{e as ue}from"./CDV5Q7RN.js";import{s as y,c as le,b as p,a as Pe,S as Ae}from"./CmCtpZ1Y.js";import{p as T,s as ce,r as Ce}from"./cLyZlkXv.js";import{a as O,c as it,s as Le,S as He}from"./Dtc6nSB5.js";import{c as Tt}from"./CXH6iFbA.js";import{c as st,s as rt}from"./DGbA7IXh.js";import"./Y90OgS-9.js";const Oe=Array(12).fill(0);var ke=G('<div class="sonner-loading-bar"></div>'),Ne=G('<div><div class="sonner-spinner"></div></div>');function Re(_,t){fe(t,!0);var C=Ne(),k=J(C);ue(k,23,()=>Oe,($,tt)=>`spinner-bar-${tt}`,($,tt)=>{var ct=ke();a($,ct)}),Y(k),Y(C),K($=>{rt(C,1,$),y(C,"data-visible",t.visible)},[()=>st(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),a(_,C),ve()}function Zt(_){return _.label!==void 0}function Fe(){let _=A(we(typeof document<"u"?document.hidden:!1));return ht(()=>ye(document,"visibilitychange",()=>{r(_,document.hidden,!0)})),{get current(){return e(_)}}}const be=4e3,ze=14,We=45,Ue=200,Ve=.05,je={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Ke(_){const[t,C]=_.split("-"),k=[];return t&&k.push(t),C&&k.push(C),k}function _e(_){return 1/(1.5+Math.abs(_)/20)}var Ye=G("<div><!></div>"),Ze=G('<button data-close-button=""><!></button>'),Ge=G('<div data-icon=""><!> <!></div>'),Xe=G('<div data-description=""><!></div>'),Qe=G('<button data-button="" data-cancel=""> </button>'),qe=G('<button data-button=""> </button>'),Je=G('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),pe=G('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function $e(_,t){fe(t,!0);const C=s=>{var c=b(),v=h(c);{var w=g=>{var L=Ye(),It=J(L);p(It,()=>t.loadingIcon),Y(L),K(Rt=>{rt(L,1,Rt),y(L,"data-visible",e(S)==="loading")},[()=>st(it(e(j)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),a(g,L)},x=g=>{{let L=l(()=>it(e(j)?.loader,t.toast.classes?.loader)),It=l(()=>e(S)==="loading");Re(g,{get class(){return e(L)},get visible(){return e(It)}})}};B(v,g=>{t.loadingIcon?g(w):g(x,!1)})}a(s,c)};let k=T(t,"cancelButtonStyle",3,""),$=T(t,"actionButtonStyle",3,""),tt=T(t,"descriptionClass",3,""),ct=T(t,"unstyled",3,!1),Bt=T(t,"defaultRichColors",3,!1);const St={...je};let V=A(!1),N=A(!1),Dt=A(!1),Ht=A(!1),Ot=A(!1),W=A(0),dt=A(0),Mt=t.toast.duration||t.duration||be,Z=A(void 0),et=A(null),kt=A(null);const Qt=l(()=>t.index===0),qt=l(()=>t.index+1<=t.visibleToasts),S=l(()=>t.toast.type),U=l(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Et=l(()=>t.toast.class||""),yt=l(()=>t.toast.descriptionClass||""),ut=l(()=>O.heights.findIndex(s=>s.toastId===t.toast.id)||0),ft=l(()=>t.toast.closeButton??t.closeButton),wt=l(()=>t.toast.duration??t.duration??be);let bt=null;const zt=l(()=>t.position.split("-")),Jt=l(()=>O.heights.reduce((s,c,v)=>v>=e(ut)?s:s+c.height,0)),pt=Fe(),$t=l(()=>t.toast.invert||t.invert),Nt=l(()=>e(S)==="loading"),j=l(()=>({...St,...t.classes})),te=l(()=>t.toast.title),ee=l(()=>t.toast.description);let vt=A(0),Wt=A(0);const Pt=l(()=>Math.round(e(ut)*ze+e(Jt)));ht(()=>{e(te),e(ee);let s;t.expanded||t.expandByDefault?s=1:s=1-t.index*Ve;const c=Xt(()=>e(Z));if(c===void 0)return;c.style.setProperty("height","auto");const v=c.offsetHeight,w=c.getBoundingClientRect().height,x=Math.round(w/s+Number.EPSILON&100)/100;c.style.removeProperty("height");let g;Math.abs(x-v)<1?g=x:g=v,r(dt,g,!0),O.setHeight({toastId:t.toast.id,height:g})});function n(){r(N,!0),r(W,e(Pt),!0),O.removeHeight(t.toast.id),setTimeout(()=>{O.remove(t.toast.id)},Ue)}let M;const nt=l(()=>t.toast.promise&&e(S)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function at(){r(vt,new Date().getTime(),!0),M=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),n()},Mt)}function xt(){if(e(Wt)<e(vt)){const s=new Date().getTime()-e(vt);Mt=Mt-s}r(Wt,new Date().getTime(),!0)}ht(()=>{t.toast.updated&&(clearTimeout(M),Mt=e(wt),at())}),ht(()=>(e(nt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&pt.current?xt():at()),()=>clearTimeout(M))),xe(()=>{r(V,!0);const s=e(Z)?.getBoundingClientRect().height;return r(dt,s,!0),O.setHeight({toastId:t.toast.id,height:s}),()=>{O.removeHeight(t.toast.id)}}),ht(()=>{t.toast.delete&&Xt(()=>{n(),t.toast.onDismiss?.(t.toast)})});const ne=s=>{if(e(Nt))return;r(W,e(Pt),!0);const c=s.target;c.setPointerCapture(s.pointerId),c.tagName!=="BUTTON"&&(r(Dt,!0),bt={x:s.clientX,y:s.clientY})},me=()=>{if(e(Ht)||!e(U))return;bt=null;const s=Number(e(Z)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),c=Number(e(Z)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),v=new Date().getTime()-0,w=e(et)==="x"?s:c,x=Math.abs(w)/v;if(Math.abs(w)>=We||x>.11){r(W,e(Pt),!0),t.toast.onDismiss?.(t.toast),e(et)==="x"?r(kt,s>0?"right":"left",!0):r(kt,c>0?"down":"up",!0),n(),r(Ht,!0);return}else e(Z)?.style.setProperty("--swipe-amount-x","0px"),e(Z)?.style.setProperty("--swipe-amount-y","0px");r(Ot,!1),r(Dt,!1),r(et,null)},Ut=s=>{if(!bt||!e(U)||(window.getSelection()?.toString().length??-1)>0)return;const v=s.clientY-bt.y,w=s.clientX-bt.x,x=t.swipeDirections??Ke(t.position);!e(et)&&(Math.abs(w)>1||Math.abs(v)>1)&&r(et,Math.abs(w)>Math.abs(v)?"x":"y",!0);let g={x:0,y:0};if(e(et)==="y"){if(x.includes("top")||x.includes("bottom"))if(x.includes("top")&&v<0||x.includes("bottom")&&v>0)g.y=v;else{const L=v*_e(v);g.y=Math.abs(L)<Math.abs(v)?L:v}}else if(e(et)==="x"&&(x.includes("left")||x.includes("right")))if(x.includes("left")&&w<0||x.includes("right")&&w>0)g.x=w;else{const L=w*_e(w);g.x=Math.abs(L)<Math.abs(w)?L:w}(Math.abs(g.x)>0||Math.abs(g.y)>0)&&r(Ot,!0),e(Z)?.style.setProperty("--swipe-amount-x",`${g.x}px`),e(Z)?.style.setProperty("--swipe-amount-y",`${g.y}px`)},ot=()=>{r(Dt,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(S)==="success"?t.successIcon:e(S)==="error"?t.errorIcon:e(S)==="warning"?t.warningIcon:e(S)==="info"?t.infoIcon:e(S)==="loading"?t.loadingIcon:null);var i=pe();y(i,"tabindex",0);let At;var Vt=J(i);{var ge=s=>{var c=Ze(),v=J(c);p(v,()=>t.closeIcon??lt),Y(c),K(w=>{y(c,"aria-label",t.closeButtonAriaLabel),y(c,"data-disabled",e(Nt)),rt(c,1,w)},[()=>st(it(e(j)?.closeButton,t.toast?.classes?.closeButton))]),Ct("click",c,()=>{e(Nt)||!e(U)||(n(),t.toast.onDismiss?.(t.toast))}),a(s,c)};B(Vt,s=>{e(ft)&&!t.toast.component&&e(S)!=="loading"&&t.closeIcon!==null&&s(ge)})}var ae=Lt(Vt,2);{var oe=s=>{const c=l(()=>t.toast.component);var v=b(),w=h(v);Tt(w,()=>e(c),(x,g)=>{g(x,ce(()=>t.toast.componentProps,{closeToast:n}))}),a(s,v)},ie=s=>{var c=Je(),v=h(c);{var w=u=>{var m=Ge(),o=J(m);{var I=d=>{var f=b(),z=h(f);{var E=_t=>{var Kt=b(),re=h(Kt);Tt(re,()=>t.toast.icon,(H,F)=>{F(H,{})}),a(_t,Kt)},q=_t=>{C(_t)};B(z,_t=>{t.toast.icon?_t(E):_t(q,!1)})}a(d,f)};B(o,d=>{(t.toast.promise||e(S)==="loading")&&d(I)})}var P=Lt(o,2);{var D=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(Se,De)=>{De(Se,{})}),a(H,F)},q=H=>{var F=b(),gt=h(F);p(gt,()=>t.successIcon??lt),a(H,F)},_t=H=>{var F=b(),gt=h(F);p(gt,()=>t.errorIcon??lt),a(H,F)},Kt=H=>{var F=b(),gt=h(F);p(gt,()=>t.warningIcon??lt),a(H,F)},re=H=>{var F=b(),gt=h(F);p(gt,()=>t.infoIcon??lt),a(H,F)};B(z,H=>{t.toast.icon?H(E):e(S)==="success"?H(q,1):e(S)==="error"?H(_t,2):e(S)==="warning"?H(Kt,3):e(S)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(D)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(S)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(mt)!==null||t.toast.icon)&&u(w)})}var x=Lt(v,2),g=J(x),L=J(g);{var It=u=>{var m=b(),o=h(m);{var I=D=>{const d=l(()=>t.toast.title);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.title)),a(D,d)};B(o,D=>{typeof t.toast.title!="string"?D(I):D(P,!1)})}a(u,m)};B(L,u=>{t.toast.title&&u(It)})}Y(g);var Rt=Lt(g,2);{var se=u=>{var m=Xe(),o=J(m);{var I=D=>{const d=l(()=>t.toast.description);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.description)),a(D,d)};B(o,D=>{typeof t.toast.description!="string"?D(I):D(P,!1)})}Y(m),K(D=>rt(m,1,D),[()=>st(it(tt(),e(yt),e(j)?.description,t.toast.classes?.description))]),a(u,m)};B(Rt,u=>{t.toast.description&&u(se)})}Y(x);var jt=Lt(x,2);{var X=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.cancel,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=Qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.cancelButtonStyle??k()),rt(f,1,E),Yt(z,t.toast.cancel.label)},[()=>st(it(e(j)?.cancelButton,t.toast?.classes?.cancelButton))]),Ct("click",f,E=>{Zt(t.toast.cancel)&&e(U)&&(t.toast.cancel?.onClick?.(E),n())}),a(d,f)},D=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(jt,u=>{t.toast.cancel&&u(X)})}var R=Lt(jt,2);{var Q=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.action,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.actionButtonStyle??$()),rt(f,1,E),Yt(z,t.toast.action.label)},[()=>st(it(e(j)?.actionButton,t.toast?.classes?.actionButton))]),Ct("click",f,E=>{Zt(t.toast.action)&&(t.toast.action?.onClick(E),!E.defaultPrevented&&n())}),a(d,f)},D=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(R,u=>{t.toast.action&&u(Q)})}K((u,m)=>{rt(x,1,u),rt(g,1,m)},[()=>st(it(e(j)?.content,t.toast?.classes?.content)),()=>st(it(e(j)?.title,t.toast?.classes?.title))]),a(s,c)};B(ae,s=>{t.toast.component?s(oe):s(ie,!1)})}Y(i),Ie(i,s=>r(Z,s),()=>e(Z)),K((s,c,v)=>{rt(i,1,s),y(i,"aria-live",t.toast.important?"assertive":"polite"),y(i,"data-rich-colors",t.toast.richColors??Bt()),y(i,"data-styled",!(t.toast.component||t.toast.unstyled||ct())),y(i,"data-mounted",e(V)),y(i,"data-promise",c),y(i,"data-swiped",e(Ot)),y(i,"data-removed",e(N)),y(i,"data-visible",e(qt)),y(i,"data-y-position",e(zt)[0]),y(i,"data-x-position",e(zt)[1]),y(i,"data-index",t.index),y(i,"data-front",e(Qt)),y(i,"data-swiping",e(Dt)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(S)),y(i,"data-invert",e($t)),y(i,"data-swipe-out",e(Ht)),y(i,"data-swipe-direction",e(kt)),y(i,"data-expanded",v),At=le(i,`${t.style} ${t.toast.style}`,At,{"--index":t.index,"--toasts-before":t.index,"--z-index":O.toasts.length-t.index,"--offset":`${e(N)?e(W):e(Pt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(dt)}px`})},[()=>st(it(t.class,e(Et),e(j)?.toast,t.toast?.classes?.toast,e(j)?.[e(S)],t.toast?.classes?.[e(S)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(V))]),Ct("pointermove",i,Ut),Ct("pointerup",i,me),Ct("pointerdown",i,ne),Me("dragend",i,ot),a(_,i),ve()}Ee(["pointermove","pointerup","pointerdown","click"]);var tn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function en(_){var t=tn();a(_,t)}var nn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function an(_){var t=nn();a(_,t)}var on=Ft('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function sn(_){var t=on();a(_,t)}var rn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function ln(_){var t=rn();a(_,t)}var cn=Ft('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function dn(_){var t=cn();a(_,t)}const un=3,Te="24px",Be="16px",fn=4e3,vn=356,mn=14,de="dark",Gt="light";function gn(_,t){const C={};return[_,t].forEach((k,$)=>{const tt=$===1,ct=tt?"--mobile-offset":"--offset",Bt=tt?Be:Te;function St(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?St(k):typeof k=="object"?["top","right","bottom","left"].forEach(V=>{const N=k[V];N===void 0?C[`${ct}-${V}`]=Bt:C[`${ct}-${V}`]=typeof N=="number"?`${N}px`:N}):St(Bt)}),C}var hn=G("<ol></ol>"),bn=G('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function En(_,t){fe(t,!0);function C(n){return n!=="system"?n:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?de:Gt}let k=T(t,"invert",3,!1),$=T(t,"position",3,"bottom-right"),tt=T(t,"hotkey",19,()=>["altKey","KeyT"]),ct=T(t,"expand",3,!1),Bt=T(t,"closeButton",3,!1),St=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),Dt=T(t,"richColors",3,!1),Ht=T(t,"duration",3,fn),Ot=T(t,"visibleToasts",3,un),W=T(t,"toastOptions",19,()=>({})),dt=T(t,"dir",7,"auto"),Mt=T(t,"gap",3,mn),Z=T(t,"pauseWhenPageIsHidden",3,!1),et=T(t,"containerAriaLabel",3,"Notifications"),kt=T(t,"closeButtonAriaLabel",3,"Close toast"),Qt=Ce(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function qt(){if(dt()!=="auto")return dt();if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?(Xt(()=>dt(window.getComputedStyle(document.documentElement).direction??"ltr")),dt()):(Xt(()=>dt(n)),n)}const S=l(()=>Array.from(new Set([$(),...O.toasts.filter(n=>n.position).map(n=>n.position)].filter(Boolean))));let U=A(!1),Et=A(!1),yt=A(we(C(N()))),ut=A(void 0),ft=A(null),wt=A(!1);const bt=l(()=>tt().join("+").replace(/Key/g,"").replace(/Digit/g,""));ht(()=>{O.toasts.length<=1&&r(U,!1)}),ht(()=>{const n=O.toasts.filter(M=>M.dismiss&&!M.delete);if(n.length>0){const M=O.toasts.map(nt=>n.find(xt=>xt.id===nt.id)?{...nt,delete:!0}:nt);O.toasts=M}}),ht(()=>()=>{e(ut)&&e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null),r(wt,!1))}),xe(()=>(O.reset(),ye(document,"keydown",M=>{tt().every(at=>M[at]||M.code===at)&&(r(U,!0),e(ut)?.focus()),M.code==="Escape"&&(document.activeElement===e(ut)||e(ut)?.contains(document.activeElement))&&r(U,!1)}))),ht(()=>{if(N()!=="system"&&r(yt,N()),typeof window<"u"){N()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?r(yt,de):r(yt,Gt));const n=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:nt})=>{N()==="system"&&r(yt,nt?de:Gt,!0)};"addEventListener"in n?n.addEventListener("change",M):n.addListener(M)}});const zt=n=>{t.onblur?.(n),e(wt)&&!n.currentTarget.contains(n.relatedTarget)&&(r(wt,!1),e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null)))},Jt=n=>{t.onfocus?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&(e(wt)||(r(wt,!0),r(ft,n.relatedTarget,!0)))},pt=n=>{t.onpointerdown?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&r(Et,!0)},$t=n=>{t.onmouseenter?.(n),r(U,!0)},Nt=n=>{t.onmouseleave?.(n),e(Et)||r(U,!1)},j=n=>{t.onmousemove?.(n),r(U,!0)},te=n=>{t.ondragend?.(n),r(U,!1)},ee=n=>{t.onpointerup?.(n),r(Et,!1)};Le.set(new He);var vt=bn();y(vt,"tabindex",-1);var Wt=J(vt);{var Pt=n=>{var M=b(),nt=h(M);ue(nt,18,()=>e(S),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(St(),V()));var mt=hn();Pe(mt,i=>({tabindex:-1,dir:i,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(yt),"data-y-position":e(Ut).y,"data-x-position":e(Ut).x,style:t.style,onblur:zt,onfocus:Jt,onmouseenter:$t,onmousemove:j,onmouseleave:Nt,ondragend:te,onpointerdown:pt,onpointerup:ee,...Qt,[Ae]:{"--front-toast-height":`${O.heights[0]?.height}px`,"--width":`${vn}px`,"--gap":`${Mt()}px`,"--offset-top":e(ot)["--offset-top"],"--offset-right":e(ot)["--offset-right"],"--offset-bottom":e(ot)["--offset-bottom"],"--offset-left":e(ot)["--offset-left"],"--mobile-offset-top":e(ot)["--mobile-offset-top"],"--mobile-offset-right":e(ot)["--mobile-offset-right"],"--mobile-offset-bottom":e(ot)["--mobile-offset-bottom"],"--mobile-offset-left":e(ot)["--mobile-offset-left"]}}),[qt],void 0,void 0,"svelte-nbs0zk"),ue(mt,23,()=>O.toasts.filter(i=>!i.position&&e(ne)===0||i.position===xt),i=>i.id,(i,At,Vt,ge)=>{{const ae=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.successIcon??lt),a(o,I)},m=o=>{en(o)};B(Q,o=>{t.successIcon?o(u):t.successIcon!==null&&o(m,1)})}a(X,R)},oe=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.errorIcon??lt),a(o,I)},m=o=>{an(o)};B(Q,o=>{t.errorIcon?o(u):t.errorIcon!==null&&o(m,1)})}a(X,R)},ie=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.warningIcon??lt),a(o,I)},m=o=>{sn(o)};B(Q,o=>{t.warningIcon?o(u):t.warningIcon!==null&&o(m,1)})}a(X,R)},s=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.infoIcon??lt),a(o,I)},m=o=>{ln(o)};B(Q,o=>{t.infoIcon?o(u):t.infoIcon!==null&&o(m,1)})}a(X,R)},c=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.closeIcon??lt),a(o,I)},m=o=>{dn(o)};B(Q,o=>{t.closeIcon?o(u):t.closeIcon!==null&&o(m,1)})}a(X,R)};let v=l(()=>W()?.duration??Ht()),w=l(()=>W()?.class??""),x=l(()=>W()?.descriptionClass||""),g=l(()=>W()?.style??""),L=l(()=>W().classes||{}),It=l(()=>W().unstyled??!1),Rt=l(()=>W()?.cancelButtonStyle??""),se=l(()=>W()?.actionButtonStyle??""),jt=l(()=>W()?.closeButtonAriaLabel??kt());$e(i,{get index(){return e(Vt)},get toast(){return e(At)},get defaultRichColors(){return Dt()},get duration(){return e(v)},get class(){return e(w)},get descriptionClass(){return e(x)},get invert(){return k()},get visibleToasts(){return Ot()},get closeButton(){return Bt()},get interacting(){return e(Et)},get position(){return xt},get style(){return e(g)},get classes(){return e(L)},get unstyled(){return e(It)},get cancelButtonStyle(){return e(Rt)},get actionButtonStyle(){return e(se)},get closeButtonAriaLabel(){return e(jt)},get expandByDefault(){return ct()},get expanded(){return e(U)},get pauseWhenPageIsHidden(){return Z()},get loadingIcon(){return t.loadingIcon},successIcon:ae,errorIcon:oe,warningIcon:ie,infoIcon:s,closeIcon:c,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Y(mt),Ie(mt,i=>r(ut,i),()=>e(ut)),K(()=>mt.dir=mt.dir),a(at,mt)}),a(n,M)};B(Wt,n=>{O.toasts.length>0&&n(Pt)})}Y(vt),K(()=>y(vt,"aria-label",`${et()??""} ${e(bt)??""}`)),a(_,vt),ve()}export{Re as L,En as T};
|
|
1
|
+
import{a,b as G,o as ye,g as Ct,e as Me,c as b,d as Ee,t as he,s as Yt,f as Ft}from"./iDtAARVW.js";import{p as fe,c as J,r as Y,t as K,b as ve,e as A,f as we,a5 as ht,s as r,g as e,a6 as Xt,aE as xe,i as Lt,u as l,ad as lt,h}from"./CT6oIU-C.js";import{i as B,b as Ie}from"./72bZS3G9.js";import{e as ue}from"./CDV5Q7RN.js";import{s as y,c as le,b as p,a as Pe,S as Ae}from"./CmCtpZ1Y.js";import{p as T,s as ce,r as Ce}from"./cLyZlkXv.js";import{a as O,c as it,s as Le,S as He}from"./DUScXtWD.js";import{c as Tt}from"./CXH6iFbA.js";import{c as st,s as rt}from"./DGbA7IXh.js";import"./Y90OgS-9.js";const Oe=Array(12).fill(0);var ke=G('<div class="sonner-loading-bar"></div>'),Ne=G('<div><div class="sonner-spinner"></div></div>');function Re(_,t){fe(t,!0);var C=Ne(),k=J(C);ue(k,23,()=>Oe,($,tt)=>`spinner-bar-${tt}`,($,tt)=>{var ct=ke();a($,ct)}),Y(k),Y(C),K($=>{rt(C,1,$),y(C,"data-visible",t.visible)},[()=>st(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),a(_,C),ve()}function Zt(_){return _.label!==void 0}function Fe(){let _=A(we(typeof document<"u"?document.hidden:!1));return ht(()=>ye(document,"visibilitychange",()=>{r(_,document.hidden,!0)})),{get current(){return e(_)}}}const be=4e3,ze=14,We=45,Ue=200,Ve=.05,je={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Ke(_){const[t,C]=_.split("-"),k=[];return t&&k.push(t),C&&k.push(C),k}function _e(_){return 1/(1.5+Math.abs(_)/20)}var Ye=G("<div><!></div>"),Ze=G('<button data-close-button=""><!></button>'),Ge=G('<div data-icon=""><!> <!></div>'),Xe=G('<div data-description=""><!></div>'),Qe=G('<button data-button="" data-cancel=""> </button>'),qe=G('<button data-button=""> </button>'),Je=G('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),pe=G('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function $e(_,t){fe(t,!0);const C=s=>{var c=b(),v=h(c);{var w=g=>{var L=Ye(),It=J(L);p(It,()=>t.loadingIcon),Y(L),K(Rt=>{rt(L,1,Rt),y(L,"data-visible",e(S)==="loading")},[()=>st(it(e(j)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),a(g,L)},x=g=>{{let L=l(()=>it(e(j)?.loader,t.toast.classes?.loader)),It=l(()=>e(S)==="loading");Re(g,{get class(){return e(L)},get visible(){return e(It)}})}};B(v,g=>{t.loadingIcon?g(w):g(x,!1)})}a(s,c)};let k=T(t,"cancelButtonStyle",3,""),$=T(t,"actionButtonStyle",3,""),tt=T(t,"descriptionClass",3,""),ct=T(t,"unstyled",3,!1),Bt=T(t,"defaultRichColors",3,!1);const St={...je};let V=A(!1),N=A(!1),Dt=A(!1),Ht=A(!1),Ot=A(!1),W=A(0),dt=A(0),Mt=t.toast.duration||t.duration||be,Z=A(void 0),et=A(null),kt=A(null);const Qt=l(()=>t.index===0),qt=l(()=>t.index+1<=t.visibleToasts),S=l(()=>t.toast.type),U=l(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Et=l(()=>t.toast.class||""),yt=l(()=>t.toast.descriptionClass||""),ut=l(()=>O.heights.findIndex(s=>s.toastId===t.toast.id)||0),ft=l(()=>t.toast.closeButton??t.closeButton),wt=l(()=>t.toast.duration??t.duration??be);let bt=null;const zt=l(()=>t.position.split("-")),Jt=l(()=>O.heights.reduce((s,c,v)=>v>=e(ut)?s:s+c.height,0)),pt=Fe(),$t=l(()=>t.toast.invert||t.invert),Nt=l(()=>e(S)==="loading"),j=l(()=>({...St,...t.classes})),te=l(()=>t.toast.title),ee=l(()=>t.toast.description);let vt=A(0),Wt=A(0);const Pt=l(()=>Math.round(e(ut)*ze+e(Jt)));ht(()=>{e(te),e(ee);let s;t.expanded||t.expandByDefault?s=1:s=1-t.index*Ve;const c=Xt(()=>e(Z));if(c===void 0)return;c.style.setProperty("height","auto");const v=c.offsetHeight,w=c.getBoundingClientRect().height,x=Math.round(w/s+Number.EPSILON&100)/100;c.style.removeProperty("height");let g;Math.abs(x-v)<1?g=x:g=v,r(dt,g,!0),O.setHeight({toastId:t.toast.id,height:g})});function n(){r(N,!0),r(W,e(Pt),!0),O.removeHeight(t.toast.id),setTimeout(()=>{O.remove(t.toast.id)},Ue)}let M;const nt=l(()=>t.toast.promise&&e(S)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function at(){r(vt,new Date().getTime(),!0),M=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),n()},Mt)}function xt(){if(e(Wt)<e(vt)){const s=new Date().getTime()-e(vt);Mt=Mt-s}r(Wt,new Date().getTime(),!0)}ht(()=>{t.toast.updated&&(clearTimeout(M),Mt=e(wt),at())}),ht(()=>(e(nt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&pt.current?xt():at()),()=>clearTimeout(M))),xe(()=>{r(V,!0);const s=e(Z)?.getBoundingClientRect().height;return r(dt,s,!0),O.setHeight({toastId:t.toast.id,height:s}),()=>{O.removeHeight(t.toast.id)}}),ht(()=>{t.toast.delete&&Xt(()=>{n(),t.toast.onDismiss?.(t.toast)})});const ne=s=>{if(e(Nt))return;r(W,e(Pt),!0);const c=s.target;c.setPointerCapture(s.pointerId),c.tagName!=="BUTTON"&&(r(Dt,!0),bt={x:s.clientX,y:s.clientY})},me=()=>{if(e(Ht)||!e(U))return;bt=null;const s=Number(e(Z)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),c=Number(e(Z)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),v=new Date().getTime()-0,w=e(et)==="x"?s:c,x=Math.abs(w)/v;if(Math.abs(w)>=We||x>.11){r(W,e(Pt),!0),t.toast.onDismiss?.(t.toast),e(et)==="x"?r(kt,s>0?"right":"left",!0):r(kt,c>0?"down":"up",!0),n(),r(Ht,!0);return}else e(Z)?.style.setProperty("--swipe-amount-x","0px"),e(Z)?.style.setProperty("--swipe-amount-y","0px");r(Ot,!1),r(Dt,!1),r(et,null)},Ut=s=>{if(!bt||!e(U)||(window.getSelection()?.toString().length??-1)>0)return;const v=s.clientY-bt.y,w=s.clientX-bt.x,x=t.swipeDirections??Ke(t.position);!e(et)&&(Math.abs(w)>1||Math.abs(v)>1)&&r(et,Math.abs(w)>Math.abs(v)?"x":"y",!0);let g={x:0,y:0};if(e(et)==="y"){if(x.includes("top")||x.includes("bottom"))if(x.includes("top")&&v<0||x.includes("bottom")&&v>0)g.y=v;else{const L=v*_e(v);g.y=Math.abs(L)<Math.abs(v)?L:v}}else if(e(et)==="x"&&(x.includes("left")||x.includes("right")))if(x.includes("left")&&w<0||x.includes("right")&&w>0)g.x=w;else{const L=w*_e(w);g.x=Math.abs(L)<Math.abs(w)?L:w}(Math.abs(g.x)>0||Math.abs(g.y)>0)&&r(Ot,!0),e(Z)?.style.setProperty("--swipe-amount-x",`${g.x}px`),e(Z)?.style.setProperty("--swipe-amount-y",`${g.y}px`)},ot=()=>{r(Dt,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(S)==="success"?t.successIcon:e(S)==="error"?t.errorIcon:e(S)==="warning"?t.warningIcon:e(S)==="info"?t.infoIcon:e(S)==="loading"?t.loadingIcon:null);var i=pe();y(i,"tabindex",0);let At;var Vt=J(i);{var ge=s=>{var c=Ze(),v=J(c);p(v,()=>t.closeIcon??lt),Y(c),K(w=>{y(c,"aria-label",t.closeButtonAriaLabel),y(c,"data-disabled",e(Nt)),rt(c,1,w)},[()=>st(it(e(j)?.closeButton,t.toast?.classes?.closeButton))]),Ct("click",c,()=>{e(Nt)||!e(U)||(n(),t.toast.onDismiss?.(t.toast))}),a(s,c)};B(Vt,s=>{e(ft)&&!t.toast.component&&e(S)!=="loading"&&t.closeIcon!==null&&s(ge)})}var ae=Lt(Vt,2);{var oe=s=>{const c=l(()=>t.toast.component);var v=b(),w=h(v);Tt(w,()=>e(c),(x,g)=>{g(x,ce(()=>t.toast.componentProps,{closeToast:n}))}),a(s,v)},ie=s=>{var c=Je(),v=h(c);{var w=u=>{var m=Ge(),o=J(m);{var I=d=>{var f=b(),z=h(f);{var E=_t=>{var Kt=b(),re=h(Kt);Tt(re,()=>t.toast.icon,(H,F)=>{F(H,{})}),a(_t,Kt)},q=_t=>{C(_t)};B(z,_t=>{t.toast.icon?_t(E):_t(q,!1)})}a(d,f)};B(o,d=>{(t.toast.promise||e(S)==="loading")&&d(I)})}var P=Lt(o,2);{var D=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(Se,De)=>{De(Se,{})}),a(H,F)},q=H=>{var F=b(),gt=h(F);p(gt,()=>t.successIcon??lt),a(H,F)},_t=H=>{var F=b(),gt=h(F);p(gt,()=>t.errorIcon??lt),a(H,F)},Kt=H=>{var F=b(),gt=h(F);p(gt,()=>t.warningIcon??lt),a(H,F)},re=H=>{var F=b(),gt=h(F);p(gt,()=>t.infoIcon??lt),a(H,F)};B(z,H=>{t.toast.icon?H(E):e(S)==="success"?H(q,1):e(S)==="error"?H(_t,2):e(S)==="warning"?H(Kt,3):e(S)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(D)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(S)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(mt)!==null||t.toast.icon)&&u(w)})}var x=Lt(v,2),g=J(x),L=J(g);{var It=u=>{var m=b(),o=h(m);{var I=D=>{const d=l(()=>t.toast.title);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.title)),a(D,d)};B(o,D=>{typeof t.toast.title!="string"?D(I):D(P,!1)})}a(u,m)};B(L,u=>{t.toast.title&&u(It)})}Y(g);var Rt=Lt(g,2);{var se=u=>{var m=Xe(),o=J(m);{var I=D=>{const d=l(()=>t.toast.description);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.description)),a(D,d)};B(o,D=>{typeof t.toast.description!="string"?D(I):D(P,!1)})}Y(m),K(D=>rt(m,1,D),[()=>st(it(tt(),e(yt),e(j)?.description,t.toast.classes?.description))]),a(u,m)};B(Rt,u=>{t.toast.description&&u(se)})}Y(x);var jt=Lt(x,2);{var X=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.cancel,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=Qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.cancelButtonStyle??k()),rt(f,1,E),Yt(z,t.toast.cancel.label)},[()=>st(it(e(j)?.cancelButton,t.toast?.classes?.cancelButton))]),Ct("click",f,E=>{Zt(t.toast.cancel)&&e(U)&&(t.toast.cancel?.onClick?.(E),n())}),a(d,f)},D=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(jt,u=>{t.toast.cancel&&u(X)})}var R=Lt(jt,2);{var Q=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.action,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.actionButtonStyle??$()),rt(f,1,E),Yt(z,t.toast.action.label)},[()=>st(it(e(j)?.actionButton,t.toast?.classes?.actionButton))]),Ct("click",f,E=>{Zt(t.toast.action)&&(t.toast.action?.onClick(E),!E.defaultPrevented&&n())}),a(d,f)},D=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(R,u=>{t.toast.action&&u(Q)})}K((u,m)=>{rt(x,1,u),rt(g,1,m)},[()=>st(it(e(j)?.content,t.toast?.classes?.content)),()=>st(it(e(j)?.title,t.toast?.classes?.title))]),a(s,c)};B(ae,s=>{t.toast.component?s(oe):s(ie,!1)})}Y(i),Ie(i,s=>r(Z,s),()=>e(Z)),K((s,c,v)=>{rt(i,1,s),y(i,"aria-live",t.toast.important?"assertive":"polite"),y(i,"data-rich-colors",t.toast.richColors??Bt()),y(i,"data-styled",!(t.toast.component||t.toast.unstyled||ct())),y(i,"data-mounted",e(V)),y(i,"data-promise",c),y(i,"data-swiped",e(Ot)),y(i,"data-removed",e(N)),y(i,"data-visible",e(qt)),y(i,"data-y-position",e(zt)[0]),y(i,"data-x-position",e(zt)[1]),y(i,"data-index",t.index),y(i,"data-front",e(Qt)),y(i,"data-swiping",e(Dt)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(S)),y(i,"data-invert",e($t)),y(i,"data-swipe-out",e(Ht)),y(i,"data-swipe-direction",e(kt)),y(i,"data-expanded",v),At=le(i,`${t.style} ${t.toast.style}`,At,{"--index":t.index,"--toasts-before":t.index,"--z-index":O.toasts.length-t.index,"--offset":`${e(N)?e(W):e(Pt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(dt)}px`})},[()=>st(it(t.class,e(Et),e(j)?.toast,t.toast?.classes?.toast,e(j)?.[e(S)],t.toast?.classes?.[e(S)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(V))]),Ct("pointermove",i,Ut),Ct("pointerup",i,me),Ct("pointerdown",i,ne),Me("dragend",i,ot),a(_,i),ve()}Ee(["pointermove","pointerup","pointerdown","click"]);var tn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function en(_){var t=tn();a(_,t)}var nn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function an(_){var t=nn();a(_,t)}var on=Ft('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function sn(_){var t=on();a(_,t)}var rn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function ln(_){var t=rn();a(_,t)}var cn=Ft('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function dn(_){var t=cn();a(_,t)}const un=3,Te="24px",Be="16px",fn=4e3,vn=356,mn=14,de="dark",Gt="light";function gn(_,t){const C={};return[_,t].forEach((k,$)=>{const tt=$===1,ct=tt?"--mobile-offset":"--offset",Bt=tt?Be:Te;function St(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?St(k):typeof k=="object"?["top","right","bottom","left"].forEach(V=>{const N=k[V];N===void 0?C[`${ct}-${V}`]=Bt:C[`${ct}-${V}`]=typeof N=="number"?`${N}px`:N}):St(Bt)}),C}var hn=G("<ol></ol>"),bn=G('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function En(_,t){fe(t,!0);function C(n){return n!=="system"?n:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?de:Gt}let k=T(t,"invert",3,!1),$=T(t,"position",3,"bottom-right"),tt=T(t,"hotkey",19,()=>["altKey","KeyT"]),ct=T(t,"expand",3,!1),Bt=T(t,"closeButton",3,!1),St=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),Dt=T(t,"richColors",3,!1),Ht=T(t,"duration",3,fn),Ot=T(t,"visibleToasts",3,un),W=T(t,"toastOptions",19,()=>({})),dt=T(t,"dir",7,"auto"),Mt=T(t,"gap",3,mn),Z=T(t,"pauseWhenPageIsHidden",3,!1),et=T(t,"containerAriaLabel",3,"Notifications"),kt=T(t,"closeButtonAriaLabel",3,"Close toast"),Qt=Ce(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function qt(){if(dt()!=="auto")return dt();if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?(Xt(()=>dt(window.getComputedStyle(document.documentElement).direction??"ltr")),dt()):(Xt(()=>dt(n)),n)}const S=l(()=>Array.from(new Set([$(),...O.toasts.filter(n=>n.position).map(n=>n.position)].filter(Boolean))));let U=A(!1),Et=A(!1),yt=A(we(C(N()))),ut=A(void 0),ft=A(null),wt=A(!1);const bt=l(()=>tt().join("+").replace(/Key/g,"").replace(/Digit/g,""));ht(()=>{O.toasts.length<=1&&r(U,!1)}),ht(()=>{const n=O.toasts.filter(M=>M.dismiss&&!M.delete);if(n.length>0){const M=O.toasts.map(nt=>n.find(xt=>xt.id===nt.id)?{...nt,delete:!0}:nt);O.toasts=M}}),ht(()=>()=>{e(ut)&&e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null),r(wt,!1))}),xe(()=>(O.reset(),ye(document,"keydown",M=>{tt().every(at=>M[at]||M.code===at)&&(r(U,!0),e(ut)?.focus()),M.code==="Escape"&&(document.activeElement===e(ut)||e(ut)?.contains(document.activeElement))&&r(U,!1)}))),ht(()=>{if(N()!=="system"&&r(yt,N()),typeof window<"u"){N()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?r(yt,de):r(yt,Gt));const n=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:nt})=>{N()==="system"&&r(yt,nt?de:Gt,!0)};"addEventListener"in n?n.addEventListener("change",M):n.addListener(M)}});const zt=n=>{t.onblur?.(n),e(wt)&&!n.currentTarget.contains(n.relatedTarget)&&(r(wt,!1),e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null)))},Jt=n=>{t.onfocus?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&(e(wt)||(r(wt,!0),r(ft,n.relatedTarget,!0)))},pt=n=>{t.onpointerdown?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&r(Et,!0)},$t=n=>{t.onmouseenter?.(n),r(U,!0)},Nt=n=>{t.onmouseleave?.(n),e(Et)||r(U,!1)},j=n=>{t.onmousemove?.(n),r(U,!0)},te=n=>{t.ondragend?.(n),r(U,!1)},ee=n=>{t.onpointerup?.(n),r(Et,!1)};Le.set(new He);var vt=bn();y(vt,"tabindex",-1);var Wt=J(vt);{var Pt=n=>{var M=b(),nt=h(M);ue(nt,18,()=>e(S),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(St(),V()));var mt=hn();Pe(mt,i=>({tabindex:-1,dir:i,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(yt),"data-y-position":e(Ut).y,"data-x-position":e(Ut).x,style:t.style,onblur:zt,onfocus:Jt,onmouseenter:$t,onmousemove:j,onmouseleave:Nt,ondragend:te,onpointerdown:pt,onpointerup:ee,...Qt,[Ae]:{"--front-toast-height":`${O.heights[0]?.height}px`,"--width":`${vn}px`,"--gap":`${Mt()}px`,"--offset-top":e(ot)["--offset-top"],"--offset-right":e(ot)["--offset-right"],"--offset-bottom":e(ot)["--offset-bottom"],"--offset-left":e(ot)["--offset-left"],"--mobile-offset-top":e(ot)["--mobile-offset-top"],"--mobile-offset-right":e(ot)["--mobile-offset-right"],"--mobile-offset-bottom":e(ot)["--mobile-offset-bottom"],"--mobile-offset-left":e(ot)["--mobile-offset-left"]}}),[qt],void 0,void 0,"svelte-nbs0zk"),ue(mt,23,()=>O.toasts.filter(i=>!i.position&&e(ne)===0||i.position===xt),i=>i.id,(i,At,Vt,ge)=>{{const ae=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.successIcon??lt),a(o,I)},m=o=>{en(o)};B(Q,o=>{t.successIcon?o(u):t.successIcon!==null&&o(m,1)})}a(X,R)},oe=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.errorIcon??lt),a(o,I)},m=o=>{an(o)};B(Q,o=>{t.errorIcon?o(u):t.errorIcon!==null&&o(m,1)})}a(X,R)},ie=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.warningIcon??lt),a(o,I)},m=o=>{sn(o)};B(Q,o=>{t.warningIcon?o(u):t.warningIcon!==null&&o(m,1)})}a(X,R)},s=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.infoIcon??lt),a(o,I)},m=o=>{ln(o)};B(Q,o=>{t.infoIcon?o(u):t.infoIcon!==null&&o(m,1)})}a(X,R)},c=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.closeIcon??lt),a(o,I)},m=o=>{dn(o)};B(Q,o=>{t.closeIcon?o(u):t.closeIcon!==null&&o(m,1)})}a(X,R)};let v=l(()=>W()?.duration??Ht()),w=l(()=>W()?.class??""),x=l(()=>W()?.descriptionClass||""),g=l(()=>W()?.style??""),L=l(()=>W().classes||{}),It=l(()=>W().unstyled??!1),Rt=l(()=>W()?.cancelButtonStyle??""),se=l(()=>W()?.actionButtonStyle??""),jt=l(()=>W()?.closeButtonAriaLabel??kt());$e(i,{get index(){return e(Vt)},get toast(){return e(At)},get defaultRichColors(){return Dt()},get duration(){return e(v)},get class(){return e(w)},get descriptionClass(){return e(x)},get invert(){return k()},get visibleToasts(){return Ot()},get closeButton(){return Bt()},get interacting(){return e(Et)},get position(){return xt},get style(){return e(g)},get classes(){return e(L)},get unstyled(){return e(It)},get cancelButtonStyle(){return e(Rt)},get actionButtonStyle(){return e(se)},get closeButtonAriaLabel(){return e(jt)},get expandByDefault(){return ct()},get expanded(){return e(U)},get pauseWhenPageIsHidden(){return Z()},get loadingIcon(){return t.loadingIcon},successIcon:ae,errorIcon:oe,warningIcon:ie,infoIcon:s,closeIcon:c,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Y(mt),Ie(mt,i=>r(ut,i),()=>e(ut)),K(()=>mt.dir=mt.dir),a(at,mt)}),a(n,M)};B(Wt,n=>{O.toasts.length>0&&n(Pt)})}Y(vt),K(()=>y(vt,"aria-label",`${et()??""} ${e(bt)??""}`)),a(_,vt),ve()}export{Re as L,En as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as h,f as U,s as a,g as t,av as x}from"./CT6oIU-C.js";import{i as L,g as V}from"./
|
|
1
|
+
import{e as h,f as U,s as a,g as t,av as x}from"./CT6oIU-C.js";import{i as L,g as V}from"./FdYTYKiQ.js";import{n as y}from"./4Hhzb6pv.js";import{w as W}from"./CJ8__CWt.js";function X(g,c,o){fetch("/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:o}).then(async n=>{if(!n.ok){c({type:"error",message:`HTTP ${n.status}`});return}const r=n.body?.getReader();if(!r){c({type:"error",message:"No response body"});return}const p=new TextDecoder;let m="";for(;;){const{done:k,value:O}=await r.read();if(k)break;m+=p.decode(O,{stream:!0});const A=m.split(`
|
|
2
2
|
`);m=A.pop()??"";for(const C of A)if(C.startsWith("data: "))try{const f=JSON.parse(C.slice(6));c(f)}catch{}}}).catch(n=>{n.name!=="AbortError"&&c({type:"error",message:n.message})})}const D="sg-chat-sessions",J="sg-chat-version",z=14;function b(){try{const g=localStorage.getItem(D);if(!g)return[];if(localStorage.getItem(J)==="2")return JSON.parse(g);const n=JSON.parse(g).map(r=>({id:crypto.randomUUID(),createdAt:r.date+"T00:00:00.000Z",updatedAt:r.date+"T00:00:00.000Z",title:r.messages.find(p=>p.role==="user")?.content.slice(0,50)||"New chat",messages:r.messages}));return localStorage.setItem(D,JSON.stringify(n)),localStorage.setItem(J,"2"),n}catch{return[]}}function _(g){const o=[...g].sort((n,r)=>r.updatedAt.localeCompare(n.updatedAt)).slice(0,z);try{localStorage.setItem(D,JSON.stringify(o)),localStorage.setItem(J,"2")}catch{}}function N(g,c){const o=b(),n=c.map(({streaming:p,...m})=>m),r=o.findIndex(p=>p.id===g);r>=0&&(o[r].messages=n,o[r].updatedAt=new Date().toISOString()),_(o)}function B(){const c=b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt))[0];let o=h(U(c?c.messages.map(e=>({...e,streaming:!1})):[])),n=h(U(c?.id??null)),r=h(!1),p=h(0),m=h(0),k=h(0),O=h(null),A=null,C=h(""),f=h(U(!!c));const R=new Set(["create_entity","update_entity","delete_entity","move_entity"]);function M(){$();const e=crypto.randomUUID();a(n,e,!0),a(o,[],!0),a(f,!1)}function E(){if(t(n)&&t(f))return t(n);const e=t(n)||crypto.randomUUID();a(n,e,!0);const i=new Date().toISOString(),d=b();return d.push({id:e,createdAt:i,updatedAt:i,title:"New chat",messages:[]}),_(d),a(f,!0),e}function K(e){if(!e.trim()||t(r))return;a(O,null);const i=E();t(o).push({role:"user",content:e}),t(o).push({role:"agent",content:"",segments:[],streaming:!0}),a(r,!0);const d=b(),l=d.find(s=>s.id===i);l&&l.title==="New chat"&&(l.title=e.slice(0,50),_(d)),N(i,t(o));let T=!1,w=null;A=new AbortController;const G=y.selectedSubPath?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}/${y.selectedSubPath}`:y.selectedId?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}`:null,P=t(o).slice(0,-2).map(s=>({role:s.role==="agent"?"assistant":s.role,content:s.content})),H={message:e,context:G??void 0,sessionId:i,history:P.length>0?P:void 0};X(H,s=>{if(!t(r))return;const u=t(o)[t(o).length-1];if(!u||u.role!=="agent")return;const S=u.segments;switch(s.type){case"token":{u.content+=s.text??"";const I=S[S.length-1];I&&I.type==="text"?I.content+=s.text??"":S.push({type:"text",content:s.text??""}),u.segments=S,x(m);break}case"tool_start":if(s.name){R.has(s.name)&&(T=!0);const I=S[S.length-1];I&&I.type==="tools"?I.names=[...I.names,s.name]:S.push({type:"tools",names:[s.name]}),u.segments=S,x(m)}break;case"mutation":T=!0,s.action==="created"&&s.repo&&s.entityType&&s.entityId&&(w={repo:s.repo,entityType:s.entityType,entityId:s.entityId}),window.StudioChrome?.emitMutation?.({action:s.action,repo:s.repo,entityType:s.entityType,entityId:s.entityId});break;case"highlight":a(O,s.entityIds&&s.entityIds.length>0?new Set(s.entityIds):null,!0);break;case"done":s.message&&!u.content&&(u.content=s.message,u.segments=[{type:"text",content:s.message}]),u.streaming=!1,a(r,!1),N(i,t(o)),T&&(L().then(()=>{x(p)}),W.refreshAll().then(()=>{w&&V(`/${w.repo}/${w.entityType}/${w.entityId}`)}));break;case"error":u.content+=`
|
|
3
3
|
|
|
4
4
|
Error: ${s.message}`,u.streaming=!1,a(r,!1),N(i,t(o));break}},A.signal)}function $(){if(!t(r))return;fetch("/api/chat/abort",{method:"POST",credentials:"include"}).catch(()=>{}),A?.abort(),A=null,a(r,!1);const e=t(o)[t(o).length-1];e?.streaming&&(e.streaming=!1,t(n)&&N(t(n),t(o)))}function Y(){$(),a(o,[],!0),t(n)&&t(f)&&N(t(n),t(o))}function Z(e){const d=b().filter(l=>l.id!==e);if(_(d),t(n)===e){const l=d.sort((T,w)=>w.updatedAt.localeCompare(T.updatedAt));l.length>0?(a(n,l[0].id,!0),a(o,l[0].messages.map(T=>({...T,streaming:!1})),!0),a(f,!0)):(a(n,null),a(o,[],!0),a(f,!1))}}function j(e){const d=b().find(l=>l.id===e);d&&($(),a(n,d.id,!0),a(o,d.messages.map(l=>({...l,streaming:!1})),!0),a(f,!0))}function q(){return b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt)).map(e=>({id:e.id,title:e.title,createdAt:e.createdAt,updatedAt:e.updatedAt,preview:e.messages.find(i=>i.role==="user")?.content.slice(0,80)||"",count:e.messages.length,active:e.id===t(n)}))}return{get messages(){return t(o)},get streaming(){return t(r)},get mutationCount(){return t(p)},get scrollTick(){return t(m)},get forceScroll(){return t(k)},triggerScroll(){x(k)},get highlightedIds(){return t(O)},get activeSessionId(){return t(n)},get draftInput(){return t(C)},set draftInput(e){a(C,e,!0)},send:K,stop:$,clear:Y,newSession:M,deleteSession:Z,getSessions:q,loadSession:j}}const te=B();export{te as chatStore};
|