studiograph 1.3.3-next.44 → 1.3.3-next.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/ws.js +4 -0
- package/dist/server/routes/ws.js.map +1 -1
- package/dist/server/ws-hub.d.ts +2 -0
- package/dist/server/ws-hub.js +25 -7
- package/dist/server/ws-hub.js.map +1 -1
- package/dist/web/_app/immutable/chunks/{DII_SN9D.js → B_f3TTMe.js} +1 -1
- package/dist/web/_app/immutable/chunks/CjIxLDPU.js +1 -0
- package/dist/web/_app/immutable/chunks/{DpxM1q3q.js → DC7fInVe.js} +1 -1
- package/dist/web/_app/immutable/chunks/DnkBJSv0.js +1 -0
- package/dist/web/_app/immutable/chunks/{D9J8Z5kZ.js → ZfbXz_Pn.js} +1 -1
- package/dist/web/_app/immutable/chunks/{TrmskfZb.js → fERaTxO8.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Bo-1rGDb.js → iPNLRmeh.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CKGBr1Y7.js → xpxYMk1B.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.BEYMCpg3.js → app.BTG7hUi-.js} +2 -2
- package/dist/web/_app/immutable/entry/start.D9Q1A7zB.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.iPG0JOAg.js → 0.DqoUwK9Q.js} +1 -1
- package/dist/web/_app/immutable/nodes/{1.D6cK2Pr-.js → 1.D0ZU8wER.js} +1 -1
- package/dist/web/_app/immutable/nodes/{2.DpBgbZ0N.js → 2.ZmRB-Y4O.js} +1 -1
- package/dist/web/_app/immutable/nodes/{3.iE_kbSKq.js → 3.CCOEoTic.js} +1 -1
- package/dist/web/_app/immutable/nodes/{4.5sjHIhaw.js → 4.BZNuGuCX.js} +1 -1
- package/dist/web/_app/immutable/nodes/{5.C_pXg3bZ.js → 5.BR5q7rsf.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.WE-oeVL-.js → 6.tNo__M9O.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.CYdR_aF1.js → 7.B64E8mxd.js} +1 -1
- package/dist/web/_app/immutable/nodes/{8.BJokQUI9.js → 8.D6ESLwqY.js} +1 -1
- package/dist/web/_app/immutable/nodes/{9.C4WV07Xe.js → 9.i77t88kM.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/BYHOExo0.js +0 -1
- package/dist/web/_app/immutable/chunks/B_H7mdOW.js +0 -1
- package/dist/web/_app/immutable/entry/start.BcbxXC7z.js +0 -1
package/dist/server/routes/ws.js
CHANGED
|
@@ -44,6 +44,10 @@ export async function registerWsRoute(fastify, wsHub, authService) {
|
|
|
44
44
|
function handleClientMessage(wsHub, socket, raw, userId, userName) {
|
|
45
45
|
try {
|
|
46
46
|
const msg = JSON.parse(typeof raw === 'string' ? raw : raw.toString());
|
|
47
|
+
if (msg?.type === 'pong') {
|
|
48
|
+
wsHub.handlePong(socket);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
47
51
|
if (msg?.type === 'presence' && msg.action && msg.repo && msg.entityType && msg.entityId) {
|
|
48
52
|
wsHub.handlePresence(msg.action, msg.repo, msg.entityType, msg.entityId, { id: userId, name: userName });
|
|
49
53
|
// On enter: immediately send back current presence so the client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws.js","sourceRoot":"","sources":["../../../src/server/routes/ws.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAwB,EACxB,KAAY,EACZ,WAAwB;IAExB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACtD,qDAAqD;QACrD,MAAM,OAAO,GAAG,GAAG,CAAC,OAA6C,CAAC;QAClE,MAAM,aAAa,GAAG,OAAO,EAAE,CAA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AAC,IAAI,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC7E,IAAI,IAAI,CAAC,EAAE,KAAK,MAAM;wBAAE,SAAS,CAAC,YAAY;oBAC9C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;wBACzB,IAAI,EAAE,UAAU;wBAChB,MAAM,EAAE,OAAO;wBACf,IAAI,EAAE,GAAG,CAAC,IAAI;wBACd,UAAU,EAAE,GAAG,CAAC,UAAU;wBAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ;wBACtB,IAAI;wBACJ,SAAS,EAAE,GAAG;qBACf,CAAC,CAAC,CAAC;gBACN,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,4BAA4B;IAC9B,CAAC;AACH,CAAC"}
|
package/dist/server/ws-hub.d.ts
CHANGED
|
@@ -112,6 +112,8 @@ export declare class WsHub {
|
|
|
112
112
|
broadcast(event: WsEvent): void;
|
|
113
113
|
/** Send an event directly to all connections belonging to a specific user, bypassing repo filtering. */
|
|
114
114
|
broadcastToUser(userId: string, event: WsEvent): void;
|
|
115
|
+
/** Record an app-level pong from a client (called by ws route on message). */
|
|
116
|
+
handlePong(ws: WebSocket): void;
|
|
115
117
|
get connectionCount(): number;
|
|
116
118
|
destroy(): void;
|
|
117
119
|
private canReceive;
|
package/dist/server/ws-hub.js
CHANGED
|
@@ -21,7 +21,9 @@ export class WsHub {
|
|
|
21
21
|
// userId → { user info, connection count } for online tracking
|
|
22
22
|
onlineMap = new Map();
|
|
23
23
|
constructor() {
|
|
24
|
-
// Ping all clients every 30s; terminate any that
|
|
24
|
+
// Ping all clients every 30s; terminate any that haven't responded in 90s.
|
|
25
|
+
// Uses application-level ping/pong (JSON messages) instead of WS ping frames
|
|
26
|
+
// because Railway's proxy answers WS ping frames on behalf of sleeping clients.
|
|
25
27
|
this.heartbeatTimer = setInterval(() => {
|
|
26
28
|
const now = Date.now();
|
|
27
29
|
for (const client of this.clients) {
|
|
@@ -29,14 +31,16 @@ export class WsHub {
|
|
|
29
31
|
this.clients.delete(client);
|
|
30
32
|
continue;
|
|
31
33
|
}
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
+
if (now - client.lastPongAt > 90_000) {
|
|
35
|
+
console.log(`[ws-hub] terminated (no pong for 90s): ${client.user?.displayName ?? 'anon'}`);
|
|
34
36
|
client.ws.terminate();
|
|
35
37
|
this.clients.delete(client);
|
|
36
38
|
continue;
|
|
37
39
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
try {
|
|
41
|
+
client.ws.send(JSON.stringify({ type: 'ping' }));
|
|
42
|
+
}
|
|
43
|
+
catch { /* non-fatal */ }
|
|
40
44
|
}
|
|
41
45
|
// Clean stale presence
|
|
42
46
|
for (const [entityKey, users] of this.presenceMap) {
|
|
@@ -56,20 +60,21 @@ export class WsHub {
|
|
|
56
60
|
ws,
|
|
57
61
|
user,
|
|
58
62
|
collections: collections ? new Set(collections) : null,
|
|
59
|
-
|
|
63
|
+
lastPongAt: Date.now(),
|
|
60
64
|
};
|
|
61
65
|
this.clients.add(client);
|
|
62
|
-
ws.on('pong', () => { client.alive = true; });
|
|
63
66
|
// Track online status (ref-counted for multiple tabs)
|
|
64
67
|
if (user) {
|
|
65
68
|
const uid = String(user.id);
|
|
66
69
|
const existing = this.onlineMap.get(uid);
|
|
67
70
|
if (existing) {
|
|
68
71
|
existing.count++;
|
|
72
|
+
console.log(`[ws-hub] connected: ${user.displayName} (tab ${existing.count}, total online: ${this.onlineMap.size})`);
|
|
69
73
|
}
|
|
70
74
|
else {
|
|
71
75
|
const onlineUser = { id: uid, name: user.displayName };
|
|
72
76
|
this.onlineMap.set(uid, { user: onlineUser, count: 1 });
|
|
77
|
+
console.log(`[ws-hub] connected: ${user.displayName} (new, total online: ${this.onlineMap.size})`);
|
|
73
78
|
this.broadcastOnline('join', onlineUser, ws); // broadcast to others (not new client)
|
|
74
79
|
}
|
|
75
80
|
this.sendOnlineSnapshot(ws); // send current online roster to new client
|
|
@@ -83,8 +88,12 @@ export class WsHub {
|
|
|
83
88
|
entry.count--;
|
|
84
89
|
if (entry.count === 0) {
|
|
85
90
|
this.onlineMap.delete(uid);
|
|
91
|
+
console.log(`[ws-hub] disconnected: ${user.displayName} (total online: ${this.onlineMap.size})`);
|
|
86
92
|
this.broadcastOnline('leave', entry.user);
|
|
87
93
|
}
|
|
94
|
+
else {
|
|
95
|
+
console.log(`[ws-hub] tab closed: ${user.displayName} (${entry.count} tab(s) remain)`);
|
|
96
|
+
}
|
|
88
97
|
}
|
|
89
98
|
this.clearUserPresence(uid, user.displayName, collections);
|
|
90
99
|
}
|
|
@@ -209,6 +218,15 @@ export class WsHub {
|
|
|
209
218
|
client.ws.send(payload);
|
|
210
219
|
}
|
|
211
220
|
}
|
|
221
|
+
/** Record an app-level pong from a client (called by ws route on message). */
|
|
222
|
+
handlePong(ws) {
|
|
223
|
+
for (const client of this.clients) {
|
|
224
|
+
if (client.ws === ws) {
|
|
225
|
+
client.lastPongAt = Date.now();
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
212
230
|
get connectionCount() {
|
|
213
231
|
return this.clients.size;
|
|
214
232
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-hub.js","sourceRoot":"","sources":["../../src/server/ws-hub.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuGH,MAAM,iBAAiB,GAAG,MAAM,CAAC,CAAC,gDAAgD;AAElF,yDAAyD;AACzD,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAC3F,SAAS,aAAa,CAAC,MAAc;IACnC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EA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{V as A,y as g,z as N,S as Rt,D as G,x as C,p as dt,f as et,bd as ht,n as gt,_ as Se,q as Pe}from"./D-tW7Byc.js";import{e as mt}from"./ByFfmBEu.js";import{p as O,i as Lt,s as kt,r as St}from"./EhE2EcYu.js";import{d as Ce,s as $,C as It,c as Fe,e as Dt,u as ae,f as Ee,i as Re,g as De,w as jt,h as Be,j as R,m as ce,F as Te,S as qt,E as We,D as Me,T as Le}from"./CKGBr1Y7.js";function ke(e){return typeof e=="function"}function Zt(e){return ke(e)?e():e}class Ie{#t={width:0,height:0};#n=!1;#i;#o;#e;#a=A(()=>(g(this.#r)?.(),this.getSize().width));#s=A(()=>(g(this.#r)?.(),this.getSize().height));#r=A(()=>{const t=Zt(this.#o);if(t)return Oe(n=>{if(!this.#e)return;const i=new this.#e.ResizeObserver(r=>{this.#n=!0;for(const s of r){const o=this.#i.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,l)=>Math.max(c,l.inlineSize),0),this.#t.height=a.reduce((c,l)=>Math.max(c,l.blockSize),0)}n()});return i.observe(t),()=>{this.#n=!1,i.disconnect()}})});constructor(t,n={box:"border-box"}){this.#e=n.window??Ce,this.#i=n,this.#o=t,this.#t={width:0,height:0}}calculateSize(){const t=Zt(this.#o);if(!t||!this.#e)return;const n=t.offsetWidth,i=t.offsetHeight;if(this.#i.box==="border-box")return{width:n,height:i};const r=this.#e.getComputedStyle(t),s=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),o=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),a=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),c=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),l=n-s-a,d=i-o-c;return{width:l,height:d}}getSize(){return this.#n?this.#t:this.calculateSize()??this.#t}get current(){return g(this.#r)?.(),this.getSize()}get width(){return g(this.#a)}get height(){return g(this.#s)}}const He=["top","right","bottom","left"],nt=Math.min,k=Math.max,pt=Math.round,yt=Math.floor,Y=e=>({x:e,y:e}),_e={left:"right",right:"left",bottom:"top",top:"bottom"},Ne={start:"end",end:"start"};function Tt(e,t,n){return k(e,nt(t,n))}function q(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Ht(e){return e==="x"?"y":"x"}function _t(e){return e==="y"?"height":"width"}const Ve=new Set(["top","bottom"]);function X(e){return Ve.has(Z(e))?"y":"x"}function Nt(e){return Ht(X(e))}function ze(e,t,n){n===void 0&&(n=!1);const i=lt(e),r=Nt(e),s=_t(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=vt(o)),[o,vt(o)]}function Ke(e){const t=vt(e);return[Wt(e),t,Wt(t)]}function Wt(e){return e.replace(/start|end/g,t=>Ne[t])}const Jt=["left","right"],Qt=["right","left"],Xe=["top","bottom"],Ye=["bottom","top"];function Ue(e,t,n){switch(e){case"top":case"bottom":return n?t?Qt:Jt:t?Jt:Qt;case"left":case"right":return t?Xe:Ye;default:return[]}}function je(e,t,n,i){const r=lt(e);let s=Ue(Z(e),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),t&&(s=s.concat(s.map(Wt)))),s}function vt(e){return e.replace(/left|right|bottom|top/g,t=>_e[t])}function qe(e){return{top:0,right:0,bottom:0,left:0,...e}}function le(e){return typeof e!="number"?qe(e):{top:e,right:e,bottom:e,left:e}}function xt(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function Gt(e,t,n){let{reference:i,floating:r}=e;const s=X(t),o=Nt(t),a=_t(o),c=Z(t),l=s==="y",d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let f;switch(c){case"top":f={x:d,y:i.y-r.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:u};break;case"left":f={x:i.x-r.width,y:u};break;default:f={x:i.x,y:i.y}}switch(lt(t)){case"start":f[o]-=h*(n&&l?-1:1);break;case"end":f[o]+=h*(n&&l?-1:1);break}return f}async function Ze(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=q(t,e),m=le(f),y=a[h?u==="floating"?"reference":"floating":u],p=xt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),b=u==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),v=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=xt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:c}):b);return{top:(p.top-S.top+m.top)/v.y,bottom:(S.bottom-p.bottom+m.bottom)/v.y,left:(p.left-S.left+m.left)/v.x,right:(S.right-p.right+m.right)/v.x}}const Je=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=Gt(l,i,c),h=i,f={},m=0;for(let y=0;y<a.length;y++){var w;const{name:p,fn:b}=a[y],{x,y:v,data:S,reset:P}=await b({x:d,y:u,initialPlacement:i,placement:h,strategy:r,middlewareData:f,rects:l,platform:{...o,detectOverflow:(w=o.detectOverflow)!=null?w:Ze},elements:{reference:e,floating:t}});d=x??d,u=v??u,f={...f,[p]:{...f[p],...S}},P&&m<=50&&(m++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(l=P.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:d,y:u}=Gt(l,h,c)),y=-1)}return{x:d,y:u,placement:h,strategy:r,middlewareData:f}},Qe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=q(e,t)||{};if(l==null)return{};const u=le(d),h={x:n,y:i},f=Nt(r),m=_t(f),w=await o.getDimensions(l),y=f==="y",p=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[f]-h[f]-s.floating[m],S=h[f]-s.reference[f],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let F=P?P[x]:0;(!F||!await(o.isElement==null?void 0:o.isElement(P)))&&(F=a.floating[x]||s.floating[m]);const W=v/2-S/2,E=F/2-w[m]/2-1,D=nt(u[p],E),_=nt(u[b],E),T=D,K=F-w[m]-_,B=F/2-w[m]/2+W,J=Tt(T,B,K),H=!c.arrow&<(r)!=null&&B!==J&&s.reference[m]/2-(B<T?D:_)-w[m]/2<0,M=H?B<T?B-T:B-K:0;return{[f]:h[f]+M,data:{[f]:J,centerOffset:B-J-M,...H&&{alignmentOffset:M}},reset:H}}}),Ge=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...y}=q(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=Z(r),b=X(a),x=Z(a)===a,v=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=h||(x||!w?[vt(a)]:Ke(a)),P=m!=="none";!h&&P&&S.push(...je(a,w,m,v));const F=[a,...S],W=await c.detectOverflow(t,y),E=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&E.push(W[p]),u){const B=ze(r,o,v);E.push(W[B[0]],W[B[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(B=>B<=0)){var _,T;const B=(((_=s.flip)==null?void 0:_.index)||0)+1,J=F[B];if(J&&(!(u==="alignment"?b!==X(J):!1)||D.every(L=>X(L.placement)===b?L.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:J}};let H=(T=D.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:T.placement;if(!H)switch(f){case"bestFit":{var K;const M=(K=D.filter(L=>{if(P){const Q=X(L.placement);return Q===b||Q==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Q=>Q>0).reduce((Q,be)=>Q+be,0)]).sort((L,Q)=>L[1]-Q[1])[0])==null?void 0:K[0];M&&(H=M);break}case"initialPlacement":H=a;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function $t(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function te(e){return He.some(t=>e[t]>=0)}const $e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...s}=q(e,t);switch(r){case"referenceHidden":{const o=await i.detectOverflow(t,{...s,elementContext:"reference"}),a=$t(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:te(a)}}}case"escaped":{const o=await i.detectOverflow(t,{...s,altBoundary:!0}),a=$t(o,n.floating);return{data:{escapedOffsets:a,escaped:te(a)}}}default:return{}}}}},ue=new Set(["left","top"]);async function tn(e,t){const{placement:n,platform:i,elements:r}=e,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Z(n),a=lt(n),c=X(n)==="y",l=ue.has(o)?-1:1,d=s&&c?-1:1,u=q(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),c?{x:f*d,y:h*l}:{x:h*l,y:f*d}}const en=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=t,c=await tn(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:o}}}}},nn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:p=>{let{x:b,y:x}=p;return{x:b,y:x}}},...l}=q(e,t),d={x:n,y:i},u=await s.detectOverflow(t,l),h=X(Z(r)),f=Ht(h);let m=d[f],w=d[h];if(o){const p=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=m+u[p],v=m-u[b];m=Tt(x,m,v)}if(a){const p=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=w+u[p],v=w-u[b];w=Tt(x,w,v)}const y=c.fn({...t,[f]:m,[h]:w});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[f]:o,[h]:a}}}}}},rn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=q(e,t),d={x:n,y:i},u=X(r),h=Ht(u);let f=d[h],m=d[u];const w=q(a,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=h==="y"?"height":"width",v=s.reference[h]-s.floating[x]+y.mainAxis,S=s.reference[h]+s.reference[x]-y.mainAxis;f<v?f=v:f>S&&(f=S)}if(l){var p,b;const x=h==="y"?"width":"height",v=ue.has(Z(r)),S=s.reference[u]-s.floating[x]+(v&&((p=o.offset)==null?void 0:p[u])||0)+(v?0:y.crossAxis),P=s.reference[u]+s.reference[x]+(v?0:((b=o.offset)==null?void 0:b[u])||0)-(v?y.crossAxis:0);m<S?m=S:m>P&&(m=P)}return{[h]:f,[u]:m}}}},on=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...l}=q(e,t),d=await o.detectOverflow(t,l),u=Z(r),h=lt(r),f=X(r)==="y",{width:m,height:w}=s.floating;let y,p;u==="top"||u==="bottom"?(y=u,p=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(p=u,y=h==="end"?"top":"bottom");const b=w-d.top-d.bottom,x=m-d.left-d.right,v=nt(w-d[y],b),S=nt(m-d[p],x),P=!t.middlewareData.shift;let F=v,W=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(W=x),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(F=b),P&&!h){const D=k(d.left,0),_=k(d.right,0),T=k(d.top,0),K=k(d.bottom,0);f?W=m-2*(D!==0||_!==0?D+_:k(d.left,d.right)):F=w-2*(T!==0||K!==0?T+K:k(d.top,d.bottom))}await c({...t,availableWidth:W,availableHeight:F});const E=await o.getDimensions(a.floating);return m!==E.width||w!==E.height?{reset:{rects:!0}}:{}}}};function Pt(){return typeof window<"u"}function ut(e){return fe(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function j(e){var t;return(t=(fe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fe(e){return Pt()?e instanceof Node||e instanceof I(e).Node:!1}function V(e){return Pt()?e instanceof Element||e instanceof I(e).Element:!1}function U(e){return Pt()?e instanceof HTMLElement||e instanceof I(e).HTMLElement:!1}function ee(e){return!Pt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}const sn=new Set(["inline","contents"]);function wt(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!sn.has(r)}const an=new Set(["table","td","th"]);function cn(e){return an.has(ut(e))}const ln=[":popover-open",":modal"];function Ct(e){return ln.some(t=>{try{return e.matches(t)}catch{return!1}})}const un=["transform","translate","scale","rotate","perspective"],fn=["transform","translate","scale","rotate","perspective","filter"],dn=["paint","layout","strict","content"];function Vt(e){const t=zt(),n=V(e)?z(e):e;return un.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fn.some(i=>(n.willChange||"").includes(i))||dn.some(i=>(n.contain||"").includes(i))}function hn(e){let t=it(e);for(;U(t)&&!ct(t);){if(Vt(t))return t;if(Ct(t))return null;t=it(t)}return null}function zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gn=new Set(["html","body","#document"]);function ct(e){return gn.has(ut(e))}function z(e){return I(e).getComputedStyle(e)}function Ft(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function it(e){if(ut(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ee(e)&&e.host||j(e);return ee(t)?t.host:t}function de(e){const t=it(e);return ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&wt(t)?t:de(t)}function ft(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=de(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),o=I(r);if(s){const a=Mt(o);return t.concat(o,o.visualViewport||[],wt(r)?r:[],a&&n?ft(a):[])}return t.concat(r,ft(r,[],n))}function Mt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function he(e){const t=z(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=U(e),s=r?e.offsetWidth:n,o=r?e.offsetHeight:i,a=pt(n)!==s||pt(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function Kt(e){return V(e)?e:e.contextElement}function at(e){const t=Kt(e);if(!U(t))return Y(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=he(t);let o=(s?pt(n.width):n.width)/i,a=(s?pt(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const mn=Y(0);function ge(e){const t=I(e);return!zt()||!t.visualViewport?mn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function ot(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Kt(e);let o=Y(1);t&&(i?V(i)&&(o=at(i)):o=at(e));const a=wn(s,n,i)?ge(s):Y(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,d=r.width/o.x,u=r.height/o.y;if(s){const h=I(s),f=i&&V(i)?I(i):i;let m=h,w=Mt(m);for(;w&&i&&f!==m;){const y=at(w),p=w.getBoundingClientRect(),b=z(w),x=p.left+(w.clientLeft+parseFloat(b.paddingLeft))*y.x,v=p.top+(w.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,u*=y.y,c+=x,l+=v,m=I(w),w=Mt(m)}}return xt({width:d,height:u,x:c,y:l})}function Et(e,t){const n=Ft(e).scrollLeft;return t?t.left+n:ot(j(e)).left+n}function me(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Et(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function yn(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",o=j(i),a=t?Ct(t.floating):!1;if(i===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Y(1);const d=Y(0),u=U(i);if((u||!u&&!s)&&((ut(i)!=="body"||wt(o))&&(c=Ft(i)),U(i))){const f=ot(i);l=at(i),d.x=f.x+i.clientLeft,d.y=f.y+i.clientTop}const h=o&&!u&&!s?me(o,c):Y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-c.scrollTop*l.y+d.y+h.y}}function pn(e){return Array.from(e.getClientRects())}function vn(e){const t=j(e),n=Ft(e),i=e.ownerDocument.body,r=k(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=k(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Et(e);const a=-n.scrollTop;return z(i).direction==="rtl"&&(o+=k(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const ne=25;function xn(e,t){const n=I(e),i=j(e),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,c=0;if(r){s=r.width,o=r.height;const d=zt();(!d||d&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}const l=Et(i);if(l<=0){const d=i.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(i.clientWidth-u.clientWidth-f);m<=ne&&(s-=m)}else l<=ne&&(s+=l);return{width:s,height:o,x:a,y:c}}const bn=new Set(["absolute","fixed"]);function On(e,t){const n=ot(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=U(e)?at(e):Y(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=r*s.x,l=i*s.y;return{width:o,height:a,x:c,y:l}}function ie(e,t,n){let i;if(t==="viewport")i=xn(e,n);else if(t==="document")i=vn(j(e));else if(V(t))i=On(t,n);else{const r=ge(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return xt(i)}function we(e,t){const n=it(e);return n===t||!V(n)||ct(n)?!1:z(n).position==="fixed"||we(n,t)}function An(e,t){const n=t.get(e);if(n)return n;let i=ft(e,[],!1).filter(a=>V(a)&&ut(a)!=="body"),r=null;const s=z(e).position==="fixed";let o=s?it(e):e;for(;V(o)&&!ct(o);){const a=z(o),c=Vt(o);!c&&a.position==="fixed"&&(r=null),(s?!c&&!r:!c&&a.position==="static"&&!!r&&bn.has(r.position)||wt(o)&&!c&&we(e,o))?i=i.filter(d=>d!==o):r=a,o=it(o)}return t.set(e,i),i}function Sn(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?Ct(t)?[]:An(t,this._c):[].concat(n),i],a=o[0],c=o.reduce((l,d)=>{const u=ie(t,d,r);return l.top=k(u.top,l.top),l.right=nt(u.right,l.right),l.bottom=nt(u.bottom,l.bottom),l.left=k(u.left,l.left),l},ie(t,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pn(e){const{width:t,height:n}=he(e);return{width:t,height:n}}function Cn(e,t,n){const i=U(t),r=j(t),s=n==="fixed",o=ot(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Y(0);function l(){c.x=Et(r)}if(i||!i&&!s)if((ut(t)!=="body"||wt(r))&&(a=Ft(t)),i){const f=ot(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else r&&l();s&&!i&&r&&l();const d=r&&!i&&!s?me(r,a):Y(0),u=o.left+a.scrollLeft-c.x-d.x,h=o.top+a.scrollTop-c.y-d.y;return{x:u,y:h,width:o.width,height:o.height}}function Bt(e){return z(e).position==="static"}function re(e,t){if(!U(e)||z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return j(e)===n&&(n=n.ownerDocument.body),n}function ye(e,t){const n=I(e);if(Ct(e))return n;if(!U(e)){let r=it(e);for(;r&&!ct(r);){if(V(r)&&!Bt(r))return r;r=it(r)}return n}let i=re(e,t);for(;i&&cn(i)&&Bt(i);)i=re(i,t);return i&&ct(i)&&Bt(i)&&!Vt(i)?n:i||hn(e)||n}const Fn=async function(e){const t=this.getOffsetParent||ye,n=this.getDimensions,i=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function En(e){return z(e).direction==="rtl"}const Rn={convertOffsetParentRelativeRectToViewportRelativeRect:yn,getDocumentElement:j,getClippingRect:Sn,getOffsetParent:ye,getElementRects:Fn,getClientRects:pn,getDimensions:Pn,getScale:at,isElement:V,isRTL:En};function pe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dn(e,t){let n=null,i;const r=j(e);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:h,height:f}=l;if(a||t(),!h||!f)return;const m=yt(u),w=yt(r.clientWidth-(d+h)),y=yt(r.clientHeight-(u+f)),p=yt(d),x={rootMargin:-m+"px "+-w+"px "+-y+"px "+-p+"px",threshold:k(0,nt(1,c))||1};let v=!0;function S(P){const F=P[0].intersectionRatio;if(F!==c){if(!v)return o();F?o(!1,F):i=setTimeout(()=>{o(!1,1e-7)},1e3)}F===1&&!pe(l,e.getBoundingClientRect())&&o(),v=!1}try{n=new IntersectionObserver(S,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return o(!0),s}function Bn(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,l=Kt(e),d=r||s?[...l?ft(l):[],...ft(t)]:[];d.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const u=l&&a?Dn(l,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(p=>{let[b]=p;b&&b.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let m,w=c?ot(e):null;c&&y();function y(){const p=ot(e);w&&!pe(w,p)&&n(),w=p,m=requestAnimationFrame(y)}return n(),()=>{var p;d.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u?.(),(p=f)==null||p.disconnect(),f=null,c&&cancelAnimationFrame(m)}}const Tn=en,Wn=nn,Mn=Ge,Ln=on,kn=$e,In=Qe,Hn=rn,_n=(e,t,n)=>{const i=new Map,r={platform:Rn,...n},s={...r.platform,_c:i};return Je(e,t,{...r,platform:s})};function rt(e){return typeof e=="function"?e():e}function ve(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oe(e,t){const n=ve(e);return Math.round(t*n)/n}function ei(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Nn(e){const t=e.whileElementsMounted,n=A(()=>rt(e.open)??!0),i=A(()=>rt(e.middleware)),r=A(()=>rt(e.transform)??!0),s=A(()=>rt(e.placement)??"bottom"),o=A(()=>rt(e.strategy)??"absolute"),a=A(()=>rt(e.sideOffset)??0),c=A(()=>rt(e.alignOffset)??0),l=e.reference;let d=N(0),u=N(0);const h=$(null);let f=N(Rt(g(o))),m=N(Rt(g(s))),w=N(Rt({})),y=N(!1),p=!1;const b=A(()=>{const E=h.current?oe(h.current,g(d)):g(d),D=h.current?oe(h.current,g(u)):g(u);return g(r)?{position:g(f),left:"0",top:"0",transform:`translate(${E}px, ${D}px)`,...h.current&&ve(h.current)>=1.5&&{willChange:"transform"}}:{position:g(f),left:`${E}px`,top:`${D}px`}});let x;function v(){l.current===null||h.current===null||_n(l.current,h.current,{middleware:g(i),placement:g(s),strategy:g(o)}).then(E=>{const D=l.current;if(Vn(D)){C(w,{...g(w),hide:{...g(w).hide,referenceHidden:!0}},!0);return}if(!g(n)&&g(d)!==0&&g(u)!==0){const T=Math.max(Math.abs(g(a)),Math.abs(g(c)),15);if(E.x<=T&&E.y<=T)return}C(d,E.x,!0),C(u,E.y,!0),C(f,E.strategy,!0),C(m,E.placement,!0),C(w,E.middlewareData,!0),C(y,!0)})}function S(){typeof x=="function"&&(x(),x=void 0)}function P(){if(S(),t===void 0){v();return}g(n)&&(l.current===null||h.current===null||(x=t(l.current,h.current,v)))}function F(){g(n)||C(y,!1)}function W(){return[g(i),g(s),g(o),g(a),g(c),g(n)]}return G(()=>{t===void 0&&g(n)&&v()}),G(P),G(()=>{if(t!==void 0){if(W(),!g(n)){p=!1;return}if(!g(y)){p=!1;return}if(!p){p=!0;return}v()}}),G(F),G(()=>S),{floating:h,reference:l,get strategy(){return g(f)},get placement(){return g(m)},get middlewareData(){return g(w)},get isPositioned(){return g(y)},get floatingStyles(){return g(b)},get update(){return v}}}function Vn(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const zn={top:"bottom",right:"left",bottom:"top",left:"right"},Xt=new It("Floating.Root"),se=new It("Floating.Content"),Yt=new It("Floating.Root");class bt{static create(t=!1){return t?Yt.set(new bt):Xt.set(new bt)}anchorNode=$(null);customAnchorNode=$(null);triggerNode=$(null);constructor(){G(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class Ot{static create(t,n=!1){return n?se.set(new Ot(t,Yt.get())):se.set(new Ot(t,Xt.get()))}opts;root;contentRef=$(null);wrapperRef=$(null);arrowRef=$(null);contentAttachment=Dt(this.contentRef);wrapperAttachment=Dt(this.wrapperRef);arrowAttachment=Dt(this.arrowRef);arrowId=$(ae());#t=A(()=>{if(typeof this.opts.style=="string")return Ee(this.opts.style);if(!this.opts.style)return{}});#n=void 0;#i=new Ie(()=>this.arrowRef.current??void 0);#o=A(()=>this.#i?.width??0);#e=A(()=>this.#i?.height??0);#a=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#r=A(()=>g(this.#s).length>0);get hasExplicitBoundaries(){return g(this.#r)}set hasExplicitBoundaries(t){C(this.#r,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:g(this.#s).filter(Re),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return g(this.#c)}set detectOverflowOptions(t){C(this.#c,t)}#l=N(void 0);#u=N(void 0);#f=N(void 0);#d=N(void 0);#h=A(()=>[Tn({mainAxis:this.opts.sideOffset.current+g(this.#e),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Wn({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?Hn():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Mn({...this.detectOverflowOptions}),Ln({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:r,height:s}=t.reference;C(this.#l,n,!0),C(this.#u,i,!0),C(this.#f,r,!0),C(this.#d,s,!0)}}),this.arrowRef.current&&In({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Kn({arrowWidth:g(this.#o),arrowHeight:g(this.#e)}),this.opts.hideWhenDetached.current&&kn({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return g(this.#h)}set middleware(t){C(this.#h,t)}floating;#g=A(()=>Xn(this.floating.placement));get placedSide(){return g(this.#g)}set placedSide(t){C(this.#g,t)}#m=A(()=>Yn(this.floating.placement));get placedAlign(){return g(this.#m)}set placedAlign(t){C(this.#m,t)}#w=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return g(this.#w)}set arrowX(t){C(this.#w,t)}#y=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return g(this.#y)}set arrowY(t){C(this.#y,t)}#p=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return g(this.#p)}set cannotCenterArrow(t){C(this.#p,t)}#v=N();get contentZIndex(){return g(this.#v)}set contentZIndex(t){C(this.#v,t,!0)}#x=A(()=>zn[this.placedSide]);get arrowBaseSide(){return g(this.#x)}set arrowBaseSide(t){C(this.#x,t)}#b=A(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${g(this.#l)}px`,"--bits-floating-available-height":`${g(this.#u)}px`,"--bits-floating-anchor-width":`${g(this.#f)}px`,"--bits-floating-anchor-height":`${g(this.#d)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...g(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return g(this.#b)}set wrapperProps(t){C(this.#b,t)}#O=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:De({...g(this.#t)}),...this.contentAttachment}));get props(){return g(this.#O)}set props(t){C(this.#O,t)}#A=A(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return g(this.#A)}set arrowStyle(t){C(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#n=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),jt(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),this.floating=Nn({strategy:()=>this.opts.strategy.current,placement:()=>g(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>Bn(...i,{animationFrame:this.#n?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),G(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),jt(()=>this.contentRef.current,i=>{if(!i||!this.opts.enabled.current)return;const r=Be(i),s=r.requestAnimationFrame(()=>{if(this.contentRef.current!==i||!this.opts.enabled.current)return;const o=r.getComputedStyle(i).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{r.cancelAnimationFrame(s)}}),G(()=>{this.floating.floating.current=this.wrapperRef.current})}}class At{static create(t,n=!1){return n?new At(t,Yt.get()):new At(t,Xt.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Fe(t.virtualEl.current):n.triggerNode=t.ref}}function Kn(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,d]=Ut(n),u={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+a/2,f=(r.arrow?.y??0)+c/2;let m="",w="";return l==="bottom"?(m=o?u:`${h}px`,w=`${-c}px`):l==="top"?(m=o?u:`${h}px`,w=`${i.floating.height+c}px`):l==="right"?(m=`${-c}px`,w=o?u:`${f}px`):l==="left"&&(m=`${i.floating.width+c}px`,w=o?u:`${f}px`),{data:{x:m,y:w}}}}}function Ut(e){const[t,n="center"]=e.split("-");return[t,n]}function Xn(e){return Ut(e)[0]}function Yn(e){return Ut(e)[1]}function ni(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);bt.create(n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function ii(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);At.create({id:R(()=>t.id),virtualEl:R(()=>t.virtualEl),ref:t.ref},n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function Un(e,t){dt(t,!0);let n=O(t,"side",3,"bottom"),i=O(t,"sideOffset",3,0),r=O(t,"align",3,"center"),s=O(t,"alignOffset",3,0),o=O(t,"arrowPadding",3,0),a=O(t,"avoidCollisions",3,!0),c=O(t,"collisionBoundary",19,()=>[]),l=O(t,"collisionPadding",3,0),d=O(t,"hideWhenDetached",3,!1),u=O(t,"onPlaced",3,()=>{}),h=O(t,"sticky",3,"partial"),f=O(t,"updatePositionStrategy",3,"optimized"),m=O(t,"strategy",3,"fixed"),w=O(t,"dir",3,"ltr"),y=O(t,"style",19,()=>({})),p=O(t,"wrapperId",19,ae),b=O(t,"customAnchor",3,null),x=O(t,"tooltip",3,!1);const v=Ot.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>r()),alignOffset:R(()=>s()),id:R(()=>t.id),arrowPadding:R(()=>o()),avoidCollisions:R(()=>a()),collisionBoundary:R(()=>c()),collisionPadding:R(()=>l()),hideWhenDetached:R(()=>d()),onPlaced:R(()=>u()),sticky:R(()=>h()),updatePositionStrategy:R(()=>f()),strategy:R(()=>m()),dir:R(()=>w()),style:R(()=>y()),enabled:R(()=>t.enabled),wrapperId:R(()=>p()),customAnchor:R(()=>b())},x()),S=A(()=>ce(v.wrapperProps,{style:{pointerEvents:"auto"}}));var P=st(),F=et(P);mt(F,()=>t.content??ht,()=>({props:v.props,wrapperProps:g(S)})),tt(e,P),gt()}function jn(e,t){dt(t,!0),Se(()=>{t.onPlaced?.()});var n=st(),i=et(n);mt(i,()=>t.content??ht,()=>({props:{},wrapperProps:{}})),tt(e,n),gt()}function qn(e,t){let n=O(t,"isStatic",3,!1),i=St(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var r=st(),s=et(r);{var o=c=>{jn(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Un(c,kt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};Lt(s,c=>{n()?c(o):c(a,!1)})}tt(e,r)}var Zn=Ae("<!> <!>",1);function xe(e,t){dt(t,!0);let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=O(t,"tooltip",3,!1),c=O(t,"contentPointerEvents",3,"auto"),l=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);qn(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(u,h)=>{let f=()=>h?.().props,m=()=>h?.().wrapperProps;var w=Zn(),y=et(w);{var p=v=>{qt(v,{get preventScroll(){return t.preventScroll}})},b=v=>{qt(v,{get preventScroll(){return t.preventScroll}})};Lt(y,v=>{t.forceMount&&t.enabled?v(p):t.forceMount||v(b,1)})}var x=Pe(y,2);Te(x,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return i()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(S,P)=>{let F=()=>P?.().props;We(S,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(W,E)=>{Me(W,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return r()},get enabled(){return t.enabled},get ref(){return t.ref},children:(_,T)=>{let K=()=>T?.().props;Le(_,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(B,J)=>{var H=st(),M=et(H);{let L=A(()=>({props:ce(l,f(),K(),F(),{style:{pointerEvents:c()}}),wrapperProps:m()}));mt(M,()=>t.popper??ht,()=>g(L))}tt(B,H)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),tt(u,w)},$$slots:{content:!0}}),gt()}function ri(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=st(),l=et(c);{var d=u=>{xe(u,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Lt(l,u=>{t.shouldRender&&u(d)})}tt(e,c)}function oi(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);xe(e,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}export{ni as F,oi as P,ri as a,ii as b,ei as g};
|
|
1
|
+
import{k as Oe,c as st,a as tt,f as Ae}from"./CjKjQEMp.js";import{V as A,y as g,z as N,S as Rt,D as G,x as C,p as dt,f as et,bd as ht,n as gt,_ as Se,q as Pe}from"./D-tW7Byc.js";import{e as mt}from"./ByFfmBEu.js";import{p as O,i as Lt,s as kt,r as St}from"./EhE2EcYu.js";import{d as Ce,s as $,C as It,c as Fe,e as Dt,u as ae,f as Ee,i as Re,g as De,w as jt,h as Be,j as R,m as ce,F as Te,S as qt,E as We,D as Me,T as Le}from"./xpxYMk1B.js";function ke(e){return typeof e=="function"}function Zt(e){return ke(e)?e():e}class Ie{#t={width:0,height:0};#n=!1;#i;#o;#e;#a=A(()=>(g(this.#r)?.(),this.getSize().width));#s=A(()=>(g(this.#r)?.(),this.getSize().height));#r=A(()=>{const t=Zt(this.#o);if(t)return Oe(n=>{if(!this.#e)return;const i=new this.#e.ResizeObserver(r=>{this.#n=!0;for(const s of r){const o=this.#i.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,l)=>Math.max(c,l.inlineSize),0),this.#t.height=a.reduce((c,l)=>Math.max(c,l.blockSize),0)}n()});return i.observe(t),()=>{this.#n=!1,i.disconnect()}})});constructor(t,n={box:"border-box"}){this.#e=n.window??Ce,this.#i=n,this.#o=t,this.#t={width:0,height:0}}calculateSize(){const t=Zt(this.#o);if(!t||!this.#e)return;const n=t.offsetWidth,i=t.offsetHeight;if(this.#i.box==="border-box")return{width:n,height:i};const r=this.#e.getComputedStyle(t),s=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),o=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),a=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),c=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),l=n-s-a,d=i-o-c;return{width:l,height:d}}getSize(){return this.#n?this.#t:this.calculateSize()??this.#t}get current(){return g(this.#r)?.(),this.getSize()}get width(){return g(this.#a)}get height(){return g(this.#s)}}const He=["top","right","bottom","left"],nt=Math.min,k=Math.max,pt=Math.round,yt=Math.floor,Y=e=>({x:e,y:e}),_e={left:"right",right:"left",bottom:"top",top:"bottom"},Ne={start:"end",end:"start"};function Tt(e,t,n){return k(e,nt(t,n))}function q(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Ht(e){return e==="x"?"y":"x"}function _t(e){return e==="y"?"height":"width"}const Ve=new Set(["top","bottom"]);function X(e){return Ve.has(Z(e))?"y":"x"}function Nt(e){return Ht(X(e))}function ze(e,t,n){n===void 0&&(n=!1);const i=lt(e),r=Nt(e),s=_t(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=vt(o)),[o,vt(o)]}function Ke(e){const t=vt(e);return[Wt(e),t,Wt(t)]}function Wt(e){return e.replace(/start|end/g,t=>Ne[t])}const Jt=["left","right"],Qt=["right","left"],Xe=["top","bottom"],Ye=["bottom","top"];function Ue(e,t,n){switch(e){case"top":case"bottom":return n?t?Qt:Jt:t?Jt:Qt;case"left":case"right":return t?Xe:Ye;default:return[]}}function je(e,t,n,i){const r=lt(e);let s=Ue(Z(e),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),t&&(s=s.concat(s.map(Wt)))),s}function vt(e){return e.replace(/left|right|bottom|top/g,t=>_e[t])}function qe(e){return{top:0,right:0,bottom:0,left:0,...e}}function le(e){return typeof e!="number"?qe(e):{top:e,right:e,bottom:e,left:e}}function xt(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function Gt(e,t,n){let{reference:i,floating:r}=e;const s=X(t),o=Nt(t),a=_t(o),c=Z(t),l=s==="y",d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let f;switch(c){case"top":f={x:d,y:i.y-r.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:u};break;case"left":f={x:i.x-r.width,y:u};break;default:f={x:i.x,y:i.y}}switch(lt(t)){case"start":f[o]-=h*(n&&l?-1:1);break;case"end":f[o]+=h*(n&&l?-1:1);break}return f}async function Ze(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=q(t,e),m=le(f),y=a[h?u==="floating"?"reference":"floating":u],p=xt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),b=u==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),v=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=xt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:c}):b);return{top:(p.top-S.top+m.top)/v.y,bottom:(S.bottom-p.bottom+m.bottom)/v.y,left:(p.left-S.left+m.left)/v.x,right:(S.right-p.right+m.right)/v.x}}const Je=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=Gt(l,i,c),h=i,f={},m=0;for(let y=0;y<a.length;y++){var w;const{name:p,fn:b}=a[y],{x,y:v,data:S,reset:P}=await b({x:d,y:u,initialPlacement:i,placement:h,strategy:r,middlewareData:f,rects:l,platform:{...o,detectOverflow:(w=o.detectOverflow)!=null?w:Ze},elements:{reference:e,floating:t}});d=x??d,u=v??u,f={...f,[p]:{...f[p],...S}},P&&m<=50&&(m++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(l=P.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:d,y:u}=Gt(l,h,c)),y=-1)}return{x:d,y:u,placement:h,strategy:r,middlewareData:f}},Qe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=q(e,t)||{};if(l==null)return{};const u=le(d),h={x:n,y:i},f=Nt(r),m=_t(f),w=await o.getDimensions(l),y=f==="y",p=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[f]-h[f]-s.floating[m],S=h[f]-s.reference[f],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let F=P?P[x]:0;(!F||!await(o.isElement==null?void 0:o.isElement(P)))&&(F=a.floating[x]||s.floating[m]);const W=v/2-S/2,E=F/2-w[m]/2-1,D=nt(u[p],E),_=nt(u[b],E),T=D,K=F-w[m]-_,B=F/2-w[m]/2+W,J=Tt(T,B,K),H=!c.arrow&<(r)!=null&&B!==J&&s.reference[m]/2-(B<T?D:_)-w[m]/2<0,M=H?B<T?B-T:B-K:0;return{[f]:h[f]+M,data:{[f]:J,centerOffset:B-J-M,...H&&{alignmentOffset:M}},reset:H}}}),Ge=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...y}=q(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=Z(r),b=X(a),x=Z(a)===a,v=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=h||(x||!w?[vt(a)]:Ke(a)),P=m!=="none";!h&&P&&S.push(...je(a,w,m,v));const F=[a,...S],W=await c.detectOverflow(t,y),E=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&E.push(W[p]),u){const B=ze(r,o,v);E.push(W[B[0]],W[B[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(B=>B<=0)){var _,T;const B=(((_=s.flip)==null?void 0:_.index)||0)+1,J=F[B];if(J&&(!(u==="alignment"?b!==X(J):!1)||D.every(L=>X(L.placement)===b?L.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:J}};let H=(T=D.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:T.placement;if(!H)switch(f){case"bestFit":{var K;const M=(K=D.filter(L=>{if(P){const Q=X(L.placement);return Q===b||Q==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Q=>Q>0).reduce((Q,be)=>Q+be,0)]).sort((L,Q)=>L[1]-Q[1])[0])==null?void 0:K[0];M&&(H=M);break}case"initialPlacement":H=a;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function $t(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function te(e){return He.some(t=>e[t]>=0)}const $e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...s}=q(e,t);switch(r){case"referenceHidden":{const o=await i.detectOverflow(t,{...s,elementContext:"reference"}),a=$t(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:te(a)}}}case"escaped":{const o=await i.detectOverflow(t,{...s,altBoundary:!0}),a=$t(o,n.floating);return{data:{escapedOffsets:a,escaped:te(a)}}}default:return{}}}}},ue=new Set(["left","top"]);async function tn(e,t){const{placement:n,platform:i,elements:r}=e,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Z(n),a=lt(n),c=X(n)==="y",l=ue.has(o)?-1:1,d=s&&c?-1:1,u=q(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),c?{x:f*d,y:h*l}:{x:h*l,y:f*d}}const en=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=t,c=await tn(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:o}}}}},nn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:p=>{let{x:b,y:x}=p;return{x:b,y:x}}},...l}=q(e,t),d={x:n,y:i},u=await s.detectOverflow(t,l),h=X(Z(r)),f=Ht(h);let m=d[f],w=d[h];if(o){const p=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=m+u[p],v=m-u[b];m=Tt(x,m,v)}if(a){const p=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=w+u[p],v=w-u[b];w=Tt(x,w,v)}const y=c.fn({...t,[f]:m,[h]:w});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[f]:o,[h]:a}}}}}},rn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=q(e,t),d={x:n,y:i},u=X(r),h=Ht(u);let f=d[h],m=d[u];const w=q(a,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=h==="y"?"height":"width",v=s.reference[h]-s.floating[x]+y.mainAxis,S=s.reference[h]+s.reference[x]-y.mainAxis;f<v?f=v:f>S&&(f=S)}if(l){var p,b;const x=h==="y"?"width":"height",v=ue.has(Z(r)),S=s.reference[u]-s.floating[x]+(v&&((p=o.offset)==null?void 0:p[u])||0)+(v?0:y.crossAxis),P=s.reference[u]+s.reference[x]+(v?0:((b=o.offset)==null?void 0:b[u])||0)-(v?y.crossAxis:0);m<S?m=S:m>P&&(m=P)}return{[h]:f,[u]:m}}}},on=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...l}=q(e,t),d=await o.detectOverflow(t,l),u=Z(r),h=lt(r),f=X(r)==="y",{width:m,height:w}=s.floating;let y,p;u==="top"||u==="bottom"?(y=u,p=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(p=u,y=h==="end"?"top":"bottom");const b=w-d.top-d.bottom,x=m-d.left-d.right,v=nt(w-d[y],b),S=nt(m-d[p],x),P=!t.middlewareData.shift;let F=v,W=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(W=x),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(F=b),P&&!h){const D=k(d.left,0),_=k(d.right,0),T=k(d.top,0),K=k(d.bottom,0);f?W=m-2*(D!==0||_!==0?D+_:k(d.left,d.right)):F=w-2*(T!==0||K!==0?T+K:k(d.top,d.bottom))}await c({...t,availableWidth:W,availableHeight:F});const E=await o.getDimensions(a.floating);return m!==E.width||w!==E.height?{reset:{rects:!0}}:{}}}};function Pt(){return typeof window<"u"}function ut(e){return fe(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function j(e){var t;return(t=(fe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fe(e){return Pt()?e instanceof Node||e instanceof I(e).Node:!1}function V(e){return Pt()?e instanceof Element||e instanceof I(e).Element:!1}function U(e){return Pt()?e instanceof HTMLElement||e instanceof I(e).HTMLElement:!1}function ee(e){return!Pt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}const sn=new Set(["inline","contents"]);function wt(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!sn.has(r)}const an=new Set(["table","td","th"]);function cn(e){return an.has(ut(e))}const ln=[":popover-open",":modal"];function Ct(e){return ln.some(t=>{try{return e.matches(t)}catch{return!1}})}const un=["transform","translate","scale","rotate","perspective"],fn=["transform","translate","scale","rotate","perspective","filter"],dn=["paint","layout","strict","content"];function Vt(e){const t=zt(),n=V(e)?z(e):e;return un.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fn.some(i=>(n.willChange||"").includes(i))||dn.some(i=>(n.contain||"").includes(i))}function hn(e){let t=it(e);for(;U(t)&&!ct(t);){if(Vt(t))return t;if(Ct(t))return null;t=it(t)}return null}function zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gn=new Set(["html","body","#document"]);function ct(e){return gn.has(ut(e))}function z(e){return I(e).getComputedStyle(e)}function Ft(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function it(e){if(ut(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ee(e)&&e.host||j(e);return ee(t)?t.host:t}function de(e){const t=it(e);return ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&wt(t)?t:de(t)}function ft(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=de(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),o=I(r);if(s){const a=Mt(o);return t.concat(o,o.visualViewport||[],wt(r)?r:[],a&&n?ft(a):[])}return t.concat(r,ft(r,[],n))}function Mt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function he(e){const t=z(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=U(e),s=r?e.offsetWidth:n,o=r?e.offsetHeight:i,a=pt(n)!==s||pt(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function Kt(e){return V(e)?e:e.contextElement}function at(e){const t=Kt(e);if(!U(t))return Y(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=he(t);let o=(s?pt(n.width):n.width)/i,a=(s?pt(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const mn=Y(0);function ge(e){const t=I(e);return!zt()||!t.visualViewport?mn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function ot(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Kt(e);let o=Y(1);t&&(i?V(i)&&(o=at(i)):o=at(e));const a=wn(s,n,i)?ge(s):Y(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,d=r.width/o.x,u=r.height/o.y;if(s){const h=I(s),f=i&&V(i)?I(i):i;let m=h,w=Mt(m);for(;w&&i&&f!==m;){const y=at(w),p=w.getBoundingClientRect(),b=z(w),x=p.left+(w.clientLeft+parseFloat(b.paddingLeft))*y.x,v=p.top+(w.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,u*=y.y,c+=x,l+=v,m=I(w),w=Mt(m)}}return xt({width:d,height:u,x:c,y:l})}function Et(e,t){const n=Ft(e).scrollLeft;return t?t.left+n:ot(j(e)).left+n}function me(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Et(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function yn(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",o=j(i),a=t?Ct(t.floating):!1;if(i===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Y(1);const d=Y(0),u=U(i);if((u||!u&&!s)&&((ut(i)!=="body"||wt(o))&&(c=Ft(i)),U(i))){const f=ot(i);l=at(i),d.x=f.x+i.clientLeft,d.y=f.y+i.clientTop}const h=o&&!u&&!s?me(o,c):Y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-c.scrollTop*l.y+d.y+h.y}}function pn(e){return Array.from(e.getClientRects())}function vn(e){const t=j(e),n=Ft(e),i=e.ownerDocument.body,r=k(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=k(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Et(e);const a=-n.scrollTop;return z(i).direction==="rtl"&&(o+=k(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const ne=25;function xn(e,t){const n=I(e),i=j(e),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,c=0;if(r){s=r.width,o=r.height;const d=zt();(!d||d&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}const l=Et(i);if(l<=0){const d=i.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(i.clientWidth-u.clientWidth-f);m<=ne&&(s-=m)}else l<=ne&&(s+=l);return{width:s,height:o,x:a,y:c}}const bn=new Set(["absolute","fixed"]);function On(e,t){const n=ot(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=U(e)?at(e):Y(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=r*s.x,l=i*s.y;return{width:o,height:a,x:c,y:l}}function ie(e,t,n){let i;if(t==="viewport")i=xn(e,n);else if(t==="document")i=vn(j(e));else if(V(t))i=On(t,n);else{const r=ge(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return xt(i)}function we(e,t){const n=it(e);return n===t||!V(n)||ct(n)?!1:z(n).position==="fixed"||we(n,t)}function An(e,t){const n=t.get(e);if(n)return n;let i=ft(e,[],!1).filter(a=>V(a)&&ut(a)!=="body"),r=null;const s=z(e).position==="fixed";let o=s?it(e):e;for(;V(o)&&!ct(o);){const a=z(o),c=Vt(o);!c&&a.position==="fixed"&&(r=null),(s?!c&&!r:!c&&a.position==="static"&&!!r&&bn.has(r.position)||wt(o)&&!c&&we(e,o))?i=i.filter(d=>d!==o):r=a,o=it(o)}return t.set(e,i),i}function Sn(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?Ct(t)?[]:An(t,this._c):[].concat(n),i],a=o[0],c=o.reduce((l,d)=>{const u=ie(t,d,r);return l.top=k(u.top,l.top),l.right=nt(u.right,l.right),l.bottom=nt(u.bottom,l.bottom),l.left=k(u.left,l.left),l},ie(t,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pn(e){const{width:t,height:n}=he(e);return{width:t,height:n}}function Cn(e,t,n){const i=U(t),r=j(t),s=n==="fixed",o=ot(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Y(0);function l(){c.x=Et(r)}if(i||!i&&!s)if((ut(t)!=="body"||wt(r))&&(a=Ft(t)),i){const f=ot(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else r&&l();s&&!i&&r&&l();const d=r&&!i&&!s?me(r,a):Y(0),u=o.left+a.scrollLeft-c.x-d.x,h=o.top+a.scrollTop-c.y-d.y;return{x:u,y:h,width:o.width,height:o.height}}function Bt(e){return z(e).position==="static"}function re(e,t){if(!U(e)||z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return j(e)===n&&(n=n.ownerDocument.body),n}function ye(e,t){const n=I(e);if(Ct(e))return n;if(!U(e)){let r=it(e);for(;r&&!ct(r);){if(V(r)&&!Bt(r))return r;r=it(r)}return n}let i=re(e,t);for(;i&&cn(i)&&Bt(i);)i=re(i,t);return i&&ct(i)&&Bt(i)&&!Vt(i)?n:i||hn(e)||n}const Fn=async function(e){const t=this.getOffsetParent||ye,n=this.getDimensions,i=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function En(e){return z(e).direction==="rtl"}const Rn={convertOffsetParentRelativeRectToViewportRelativeRect:yn,getDocumentElement:j,getClippingRect:Sn,getOffsetParent:ye,getElementRects:Fn,getClientRects:pn,getDimensions:Pn,getScale:at,isElement:V,isRTL:En};function pe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dn(e,t){let n=null,i;const r=j(e);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:h,height:f}=l;if(a||t(),!h||!f)return;const m=yt(u),w=yt(r.clientWidth-(d+h)),y=yt(r.clientHeight-(u+f)),p=yt(d),x={rootMargin:-m+"px "+-w+"px "+-y+"px "+-p+"px",threshold:k(0,nt(1,c))||1};let v=!0;function S(P){const F=P[0].intersectionRatio;if(F!==c){if(!v)return o();F?o(!1,F):i=setTimeout(()=>{o(!1,1e-7)},1e3)}F===1&&!pe(l,e.getBoundingClientRect())&&o(),v=!1}try{n=new IntersectionObserver(S,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return o(!0),s}function Bn(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,l=Kt(e),d=r||s?[...l?ft(l):[],...ft(t)]:[];d.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const u=l&&a?Dn(l,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(p=>{let[b]=p;b&&b.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let m,w=c?ot(e):null;c&&y();function y(){const p=ot(e);w&&!pe(w,p)&&n(),w=p,m=requestAnimationFrame(y)}return n(),()=>{var p;d.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u?.(),(p=f)==null||p.disconnect(),f=null,c&&cancelAnimationFrame(m)}}const Tn=en,Wn=nn,Mn=Ge,Ln=on,kn=$e,In=Qe,Hn=rn,_n=(e,t,n)=>{const i=new Map,r={platform:Rn,...n},s={...r.platform,_c:i};return Je(e,t,{...r,platform:s})};function rt(e){return typeof e=="function"?e():e}function ve(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oe(e,t){const n=ve(e);return Math.round(t*n)/n}function ei(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Nn(e){const t=e.whileElementsMounted,n=A(()=>rt(e.open)??!0),i=A(()=>rt(e.middleware)),r=A(()=>rt(e.transform)??!0),s=A(()=>rt(e.placement)??"bottom"),o=A(()=>rt(e.strategy)??"absolute"),a=A(()=>rt(e.sideOffset)??0),c=A(()=>rt(e.alignOffset)??0),l=e.reference;let d=N(0),u=N(0);const h=$(null);let f=N(Rt(g(o))),m=N(Rt(g(s))),w=N(Rt({})),y=N(!1),p=!1;const b=A(()=>{const E=h.current?oe(h.current,g(d)):g(d),D=h.current?oe(h.current,g(u)):g(u);return g(r)?{position:g(f),left:"0",top:"0",transform:`translate(${E}px, ${D}px)`,...h.current&&ve(h.current)>=1.5&&{willChange:"transform"}}:{position:g(f),left:`${E}px`,top:`${D}px`}});let x;function v(){l.current===null||h.current===null||_n(l.current,h.current,{middleware:g(i),placement:g(s),strategy:g(o)}).then(E=>{const D=l.current;if(Vn(D)){C(w,{...g(w),hide:{...g(w).hide,referenceHidden:!0}},!0);return}if(!g(n)&&g(d)!==0&&g(u)!==0){const T=Math.max(Math.abs(g(a)),Math.abs(g(c)),15);if(E.x<=T&&E.y<=T)return}C(d,E.x,!0),C(u,E.y,!0),C(f,E.strategy,!0),C(m,E.placement,!0),C(w,E.middlewareData,!0),C(y,!0)})}function S(){typeof x=="function"&&(x(),x=void 0)}function P(){if(S(),t===void 0){v();return}g(n)&&(l.current===null||h.current===null||(x=t(l.current,h.current,v)))}function F(){g(n)||C(y,!1)}function W(){return[g(i),g(s),g(o),g(a),g(c),g(n)]}return G(()=>{t===void 0&&g(n)&&v()}),G(P),G(()=>{if(t!==void 0){if(W(),!g(n)){p=!1;return}if(!g(y)){p=!1;return}if(!p){p=!0;return}v()}}),G(F),G(()=>S),{floating:h,reference:l,get strategy(){return g(f)},get placement(){return g(m)},get middlewareData(){return g(w)},get isPositioned(){return g(y)},get floatingStyles(){return g(b)},get update(){return v}}}function Vn(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const zn={top:"bottom",right:"left",bottom:"top",left:"right"},Xt=new It("Floating.Root"),se=new It("Floating.Content"),Yt=new It("Floating.Root");class bt{static create(t=!1){return t?Yt.set(new bt):Xt.set(new bt)}anchorNode=$(null);customAnchorNode=$(null);triggerNode=$(null);constructor(){G(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class Ot{static create(t,n=!1){return n?se.set(new Ot(t,Yt.get())):se.set(new Ot(t,Xt.get()))}opts;root;contentRef=$(null);wrapperRef=$(null);arrowRef=$(null);contentAttachment=Dt(this.contentRef);wrapperAttachment=Dt(this.wrapperRef);arrowAttachment=Dt(this.arrowRef);arrowId=$(ae());#t=A(()=>{if(typeof this.opts.style=="string")return Ee(this.opts.style);if(!this.opts.style)return{}});#n=void 0;#i=new Ie(()=>this.arrowRef.current??void 0);#o=A(()=>this.#i?.width??0);#e=A(()=>this.#i?.height??0);#a=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#r=A(()=>g(this.#s).length>0);get hasExplicitBoundaries(){return g(this.#r)}set hasExplicitBoundaries(t){C(this.#r,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:g(this.#s).filter(Re),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return g(this.#c)}set detectOverflowOptions(t){C(this.#c,t)}#l=N(void 0);#u=N(void 0);#f=N(void 0);#d=N(void 0);#h=A(()=>[Tn({mainAxis:this.opts.sideOffset.current+g(this.#e),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Wn({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?Hn():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Mn({...this.detectOverflowOptions}),Ln({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:r,height:s}=t.reference;C(this.#l,n,!0),C(this.#u,i,!0),C(this.#f,r,!0),C(this.#d,s,!0)}}),this.arrowRef.current&&In({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Kn({arrowWidth:g(this.#o),arrowHeight:g(this.#e)}),this.opts.hideWhenDetached.current&&kn({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return g(this.#h)}set middleware(t){C(this.#h,t)}floating;#g=A(()=>Xn(this.floating.placement));get placedSide(){return g(this.#g)}set placedSide(t){C(this.#g,t)}#m=A(()=>Yn(this.floating.placement));get placedAlign(){return g(this.#m)}set placedAlign(t){C(this.#m,t)}#w=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return g(this.#w)}set arrowX(t){C(this.#w,t)}#y=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return g(this.#y)}set arrowY(t){C(this.#y,t)}#p=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return g(this.#p)}set cannotCenterArrow(t){C(this.#p,t)}#v=N();get contentZIndex(){return g(this.#v)}set contentZIndex(t){C(this.#v,t,!0)}#x=A(()=>zn[this.placedSide]);get arrowBaseSide(){return g(this.#x)}set arrowBaseSide(t){C(this.#x,t)}#b=A(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${g(this.#l)}px`,"--bits-floating-available-height":`${g(this.#u)}px`,"--bits-floating-anchor-width":`${g(this.#f)}px`,"--bits-floating-anchor-height":`${g(this.#d)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...g(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return g(this.#b)}set wrapperProps(t){C(this.#b,t)}#O=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:De({...g(this.#t)}),...this.contentAttachment}));get props(){return g(this.#O)}set props(t){C(this.#O,t)}#A=A(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return g(this.#A)}set arrowStyle(t){C(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#n=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),jt(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),this.floating=Nn({strategy:()=>this.opts.strategy.current,placement:()=>g(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>Bn(...i,{animationFrame:this.#n?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),G(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),jt(()=>this.contentRef.current,i=>{if(!i||!this.opts.enabled.current)return;const r=Be(i),s=r.requestAnimationFrame(()=>{if(this.contentRef.current!==i||!this.opts.enabled.current)return;const o=r.getComputedStyle(i).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{r.cancelAnimationFrame(s)}}),G(()=>{this.floating.floating.current=this.wrapperRef.current})}}class At{static create(t,n=!1){return n?new At(t,Yt.get()):new At(t,Xt.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Fe(t.virtualEl.current):n.triggerNode=t.ref}}function Kn(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,d]=Ut(n),u={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+a/2,f=(r.arrow?.y??0)+c/2;let m="",w="";return l==="bottom"?(m=o?u:`${h}px`,w=`${-c}px`):l==="top"?(m=o?u:`${h}px`,w=`${i.floating.height+c}px`):l==="right"?(m=`${-c}px`,w=o?u:`${f}px`):l==="left"&&(m=`${i.floating.width+c}px`,w=o?u:`${f}px`),{data:{x:m,y:w}}}}}function Ut(e){const[t,n="center"]=e.split("-");return[t,n]}function Xn(e){return Ut(e)[0]}function Yn(e){return Ut(e)[1]}function ni(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);bt.create(n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function ii(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);At.create({id:R(()=>t.id),virtualEl:R(()=>t.virtualEl),ref:t.ref},n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function Un(e,t){dt(t,!0);let n=O(t,"side",3,"bottom"),i=O(t,"sideOffset",3,0),r=O(t,"align",3,"center"),s=O(t,"alignOffset",3,0),o=O(t,"arrowPadding",3,0),a=O(t,"avoidCollisions",3,!0),c=O(t,"collisionBoundary",19,()=>[]),l=O(t,"collisionPadding",3,0),d=O(t,"hideWhenDetached",3,!1),u=O(t,"onPlaced",3,()=>{}),h=O(t,"sticky",3,"partial"),f=O(t,"updatePositionStrategy",3,"optimized"),m=O(t,"strategy",3,"fixed"),w=O(t,"dir",3,"ltr"),y=O(t,"style",19,()=>({})),p=O(t,"wrapperId",19,ae),b=O(t,"customAnchor",3,null),x=O(t,"tooltip",3,!1);const v=Ot.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>r()),alignOffset:R(()=>s()),id:R(()=>t.id),arrowPadding:R(()=>o()),avoidCollisions:R(()=>a()),collisionBoundary:R(()=>c()),collisionPadding:R(()=>l()),hideWhenDetached:R(()=>d()),onPlaced:R(()=>u()),sticky:R(()=>h()),updatePositionStrategy:R(()=>f()),strategy:R(()=>m()),dir:R(()=>w()),style:R(()=>y()),enabled:R(()=>t.enabled),wrapperId:R(()=>p()),customAnchor:R(()=>b())},x()),S=A(()=>ce(v.wrapperProps,{style:{pointerEvents:"auto"}}));var P=st(),F=et(P);mt(F,()=>t.content??ht,()=>({props:v.props,wrapperProps:g(S)})),tt(e,P),gt()}function jn(e,t){dt(t,!0),Se(()=>{t.onPlaced?.()});var n=st(),i=et(n);mt(i,()=>t.content??ht,()=>({props:{},wrapperProps:{}})),tt(e,n),gt()}function qn(e,t){let n=O(t,"isStatic",3,!1),i=St(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var r=st(),s=et(r);{var o=c=>{jn(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Un(c,kt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};Lt(s,c=>{n()?c(o):c(a,!1)})}tt(e,r)}var Zn=Ae("<!> <!>",1);function xe(e,t){dt(t,!0);let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=O(t,"tooltip",3,!1),c=O(t,"contentPointerEvents",3,"auto"),l=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);qn(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(u,h)=>{let f=()=>h?.().props,m=()=>h?.().wrapperProps;var w=Zn(),y=et(w);{var p=v=>{qt(v,{get preventScroll(){return t.preventScroll}})},b=v=>{qt(v,{get preventScroll(){return t.preventScroll}})};Lt(y,v=>{t.forceMount&&t.enabled?v(p):t.forceMount||v(b,1)})}var x=Pe(y,2);Te(x,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return i()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(S,P)=>{let F=()=>P?.().props;We(S,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(W,E)=>{Me(W,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return r()},get enabled(){return t.enabled},get ref(){return t.ref},children:(_,T)=>{let K=()=>T?.().props;Le(_,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(B,J)=>{var H=st(),M=et(H);{let L=A(()=>({props:ce(l,f(),K(),F(),{style:{pointerEvents:c()}}),wrapperProps:m()}));mt(M,()=>t.popper??ht,()=>g(L))}tt(B,H)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),tt(u,w)},$$slots:{content:!0}}),gt()}function ri(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=st(),l=et(c);{var d=u=>{xe(u,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Lt(l,u=>{t.shouldRender&&u(d)})}tt(e,c)}function oi(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);xe(e,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}export{ni as F,oi as P,ri as a,ii as b,ei as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as j,b as ye,y as p,aE as ue,O as Me,a3 as ie,b1 as Oe,a5 as xe,b2 as $e,aj as Pe,b3 as Re,al as ce,b4 as De,b5 as He,Z as ze,h as T,c as B,l as Ee,a as ee,b6 as Fe,aW as oe,r as We,a6 as Be,s as fe,d as q,e as R,C as Ve,aX as Le,b7 as I,a0 as we,a2 as Se,b8 as ae,a7 as Ue,b9 as Ge,ba as Je,aU as qe,a1 as Xe,k as Ye,bb as Ke,E as Ze,aK as je,a_ as Qe,ad as et,aI as tt,x as c,z as C,S as nt,p as rt,J as F,F as de,o as at,f as X,q as it,u as st,n as ot,V as lt,bc as ut}from"./D-tW7Byc.js";import{i as ct}from"./DnkBJSv0.js";import{j as pe,u as he,w as M,k as ft,a as dt,b as ge}from"./ByFfmBEu.js";import{g as pt,i as ht,c as Y,a as V,j as gt}from"./CjKjQEMp.js";import{i as mt}from"./eEhMI0BQ.js";import{B as _t,l as L,p as W,s as ne}from"./EhE2EcYu.js";function vt(e,t){return t}function yt(e,t,n){for(var r=[],s=t.length,u,i=t.length,f=0;f<s;f++){let E=t[f];Se(E,()=>{if(u){if(u.pending.delete(E),u.done.add(E),u.pending.size===0){var g=e.outrogroups;se(oe(u.done)),g.delete(u),g.size===0&&(e.outrogroups=null)}}else i-=1},!1)}if(i===0){var d=r.length===0&&n!==null;if(d){var m=n,o=m.parentNode;qe(o),o.append(m),e.items.clear()}se(t,!d)}else u={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(u)}function se(e,t=!0){for(var n=0;n<e.length;n++)Xe(e[n],t)}var me;function $t(e,t,n,r,s,u=null){var i=e,f=new Map,d=(t&$e)!==0;if(d){var m=e;i=T?B(Ee(m)):m.appendChild(j())}T&&ee();var o=null,E=Pe(()=>{var l=n();return Fe(l)?l:l==null?[]:oe(l)}),g,_=!0;function y(){a.fallback=o,Et(a,g,i,t,r),o!==null&&(g.length===0?(o.f&I)===0?we(o):(o.f^=I,J(o,null,i)):Se(o,()=>{o=null}))}var h=ye(()=>{g=p(E);var l=g.length;let v=!1;if(T){var $=We(i)===Be;$!==(l===0)&&(i=fe(),B(i),q(!1),v=!0)}for(var w=new Set,k=Me,H=xe(),N=0;N<l;N+=1){T&&R.nodeType===Ve&&R.data===Le&&(i=R,v=!0,q(!1));var x=g[N],z=r(x,N),S=_?null:f.get(z);S?(S.v&&ue(S.v,x),S.i&&ue(S.i,N),H&&k.unskip_effect(S.e)):(S=wt(f,_?i:me??=j(),x,z,N,s,t,n),_||(S.e.f|=I),f.set(z,S)),w.add(z)}if(l===0&&u&&!o&&(_?o=ie(()=>u(i)):(o=ie(()=>u(me??=j())),o.f|=I)),l>w.size&&Oe(),T&&l>0&&B(fe()),!_)if(H){for(const[Ie,Ae]of f)w.has(Ie)||k.skip_effect(Ae.e);k.oncommit(y),k.ondiscard(()=>{})}else y();v&&q(!0),p(E)}),a={effect:h,items:f,outrogroups:null,fallback:o};_=!1,T&&(i=R)}function U(e){for(;e!==null&&(e.f&Ge)===0;)e=e.next;return e}function Et(e,t,n,r,s){var u=(r&Je)!==0,i=t.length,f=e.items,d=U(e.effect.first),m,o=null,E,g=[],_=[],y,h,a,l;if(u)for(l=0;l<i;l+=1)y=t[l],h=s(y,l),a=f.get(h).e,(a.f&I)===0&&(a.nodes?.a?.measure(),(E??=new Set).add(a));for(l=0;l<i;l+=1){if(y=t[l],h=s(y,l),a=f.get(h).e,e.outrogroups!==null)for(const S of e.outrogroups)S.pending.delete(a),S.done.delete(a);if((a.f&I)!==0)if(a.f^=I,a===d)J(a,null,n);else{var v=o?o.next:d;a===e.effect.last&&(e.effect.last=a.prev),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),A(e,o,a),A(e,a,v),J(a,v,n),o=a,g=[],_=[],d=U(o.next);continue}if((a.f&ae)!==0&&(we(a),u&&(a.nodes?.a?.unfix(),(E??=new Set).delete(a))),a!==d){if(m!==void 0&&m.has(a)){if(g.length<_.length){var $=_[0],w;o=$.prev;var k=g[0],H=g[g.length-1];for(w=0;w<g.length;w+=1)J(g[w],$,n);for(w=0;w<_.length;w+=1)m.delete(_[w]);A(e,k.prev,H.next),A(e,o,k),A(e,H,$),d=$,o=H,l-=1,g=[],_=[]}else m.delete(a),J(a,d,n),A(e,a.prev,a.next),A(e,a,o===null?e.effect.first:o.next),A(e,o,a),o=a;continue}for(g=[],_=[];d!==null&&d!==a;)(m??=new Set).add(d),_.push(d),d=U(d.next);if(d===null)continue}(a.f&I)===0&&g.push(a),o=a,d=U(a.next)}if(e.outrogroups!==null){for(const S of e.outrogroups)S.pending.size===0&&(se(oe(S.done)),e.outrogroups?.delete(S));e.outrogroups.size===0&&(e.outrogroups=null)}if(d!==null||m!==void 0){var N=[];if(m!==void 0)for(a of m)(a.f&ae)===0&&N.push(a);for(;d!==null;)(d.f&ae)===0&&d!==e.fallback&&N.push(d),d=U(d.next);var x=N.length;if(x>0){var z=(r&$e)!==0&&i===0?n:null;if(u){for(l=0;l<x;l+=1)N[l].nodes?.a?.measure();for(l=0;l<x;l+=1)N[l].nodes?.a?.fix()}yt(e,N,z)}}u&&Ue(()=>{if(E!==void 0)for(a of E)a.nodes?.a?.apply()})}function wt(e,t,n,r,s,u,i,f){var d=(i&De)!==0?(i&He)===0?ze(n,!1,!1):ce(n):null,m=(i&Re)!==0?ce(s):null;return{v:d,i:m,e:ie(()=>(u(t,d??n,m??s,f),()=>{e.delete(r)}))}}function J(e,t,n){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end,u=t&&(t.f&I)===0?t.nodes.start:n;r!==null;){var i=Ye(r);if(u.before(r),r===s)return;r=i}}function A(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function K(e,t,n,r,s){T&&ee();var u=t.$$slots?.[n],i=!1;u===!0&&(u=t.children,i=!0),u===void 0||u(e,i?()=>r:r)}function St(e,t,n,r,s,u){let i=T;T&&ee();var f=null;T&&R.nodeType===Ke&&(f=R,ee());var d=T?R:e,m=new _t(d,!1);ye(()=>{const o=t()||null;var E=n||o==="svg"?Qe:void 0;if(o===null){m.ensure(null,null);return}return m.ensure(o,g=>{if(o){if(f=T?f:je(o,E),pt(f,f),r){T&&ht(o)&&f.append(document.createComment(""));var _=T?Ee(f):f.appendChild(j());T&&(_===null?q(!1):B(_)),r(f,_)}et.nodes.end=f,g.before(f)}T&&B(g)}),()=>{}},Ze),tt(()=>{}),i&&(q(!0),B(d))}function Tt(){let e=C(null),t=C(null),n=C(null),r=C(null),s=C("entity"),u=C(null),i=C("general");function f(y,h){p(e)&&(p(e)!==y||p(n)!==h)&&pe(p(e)).catch(()=>{})}function d(y,h,a,l){f(y,a),c(e,y,!0),c(t,h,!0),c(n,a,!0),c(r,l??null,!0)}function m(){c(s,"entity")}function o(){c(s,"graph")}function E(){c(s,"settings")}function g(y,h,a){p(n)===a&&p(e)===y?(c(e,null),c(t,null),c(n,null)):(c(e,y,!0),c(t,h,!0),c(n,a,!0)),c(r,null)}function _(){p(e)&&pe(p(e)).catch(()=>{}),c(e,null),c(t,null),c(n,null),c(r,null)}return{get selectedRepo(){return p(e)},get selectedType(){return p(t)},get selectedId(){return p(n)},get selectedSubPath(){return p(r)},get activeView(){return p(s)},get entityPath(){return p(e)&&p(t)&&p(n)?`/${p(e)}/${p(t)}/${p(n)}`:null},get hoveredEntityId(){return p(u)},set hoveredEntityId(y){c(u,y,!0)},get settingsTab(){return p(i)},set settingsTab(y){c(i,y,!0)},select:d,deselect:_,selectOnGraph:g,showEntity:m,showGraph:o,showSettings:E}}const G=Tt(),bt=800;function Nt(){let e=C(!1),t=C(null),n=C(null),r=null,s=null,u=null,i=!1;function f(h,a,l,v){r&&r.repo===h&&r.type===a&&r.id===l?(v.data!==void 0&&(r.payload.data=v.data),v.content!==void 0&&(r.payload.content=v.content)):r={repo:h,type:a,id:l,payload:{...v}},s=null,m()}function d(h,a,l,v,$){s={repo:h,type:a,id:l,filePath:v,content:$},r=null,m()}function m(){u&&clearTimeout(u),u=setTimeout(o,bt)}async function o(){if(u=null,!i){if(r){const{repo:h,type:a,id:l,payload:v}=r;r=null,i=!0,c(e,!0),c(n,null);try{if(await he(h,a,l,v),c(t,new Date,!0),v.data?.name){const w=M.repos.find(k=>k.name===h)?.entities.find(k=>k.id===l);w&&(w.title=v.data.name)}}catch($){c(n,$.message??"Save failed",!0),r={repo:h,type:a,id:l,payload:v}}finally{c(e,!1),i=!1,(r||s)&&o()}}else if(s){const{repo:h,type:a,id:l,filePath:v,content:$}=s;s=null,i=!0,c(e,!0),c(n,null);try{await ft(h,a,l,v,$),c(t,new Date,!0)}catch(w){c(n,w.message??"Save failed",!0),s={repo:h,type:a,id:l,filePath:v,content:$}}finally{c(e,!1),i=!1,(r||s)&&o()}}}}function E(){}function g(){u&&(clearTimeout(u),u=null),(r||s)&&o()}async function _(h,a,l,v){c(e,!0),c(n,null);try{const $=await he(h,a,l,v);return c(t,new Date,!0),$}catch($){return c(n,$.message??"Save failed",!0),null}finally{c(e,!1)}}function y(){c(n,null),c(t,null),r=null,s=null,u&&(clearTimeout(u),u=null)}return{get saving(){return p(e)},get lastSaved(){return p(t)},get error(){return p(n)},get hasPending(){return!!(r||s||i)},scheduleAutoSave:f,scheduleContentFileSave:d,flush:g,saveEntity:_,reset:y}}const Ct=Nt();let O=C(nt([])),b=null,Te=null,be=null,Ne=[],Q=null,Z=1e3,te=C(!1),Ce=C(null);const D=new Map;function P(e,t){const n=crypto.randomUUID();c(O,[...p(O),{id:n,message:e,event:t,dismissed:!1}].slice(-3),!0),setTimeout(()=>le(n),5e3)}function _e(e,t){D.delete(e);const n=t.entities.length,r=n===1?`${e} updated ${t.entities[0]}`:`${e} updated ${n} entities`;P(r,{type:"entity_change",action:"updated",repo:t.repo,entityType:"",entityId:t.entities[0],actor:e,source:"api",timestamp:new Date().toISOString()})}function kt(e){for(const[t,n]of D)n.repo===e&&(clearTimeout(n.timer),D.delete(t))}function It(e){const t=dt.user?.displayName;if(e.type==="entity_change"){if(t&&e.actor===t&&e.source==="api"){M.refreshEntities(e.repo);return}M.refreshEntities(e.repo),G.selectedRepo===e.repo&&G.selectedType===e.entityType&&G.selectedId===e.entityId&&(Ct.hasPending?P(`${e.actor} also saved changes to this entity`,e):ct());const r=D.get(e.actor);if(r)clearTimeout(r.timer),r.entities.push(e.entityId),r.timer=setTimeout(()=>_e(e.actor,r),5e3);else{const s={entities:[e.entityId],repo:e.repo,timer:setTimeout(()=>_e(e.actor,s),5e3)};D.set(e.actor,s)}return}if(e.type==="session_commit"){if(t&&e.actor===t){c(Ce,e.timestamp,!0);return}const n=e.entities.length,r=n===1?`${e.actor} saved changes to ${e.entities[0]}`:`${e.actor} saved ${n} changes in ${e.repo}`;P(r,e),M.refreshEntities(e.repo);return}if(e.type==="sync_complete"){kt(e.repo);const n=e.created+e.updated+e.deleted,r=n===0?`Sync complete · no changes in ${e.repo}`:`Sync complete · ${n} ${n===1?"entity":"entities"} from ${e.source}`;P(r,e),M.refreshEntities(e.repo);return}if(e.type==="collection_created"){P(`${e.actor} created collection ${e.repo}`,e),M.refreshEntities(e.repo);return}if(e.type==="collection_deleted"){P(`${e.actor} deleted collection ${e.repo}`,e);return}if(e.type==="repo_sync"){P(`${e.actor} pushed to ${e.repo}`,e),M.refreshEntities(e.repo);return}if(e.type==="presence"){Te?.(e);return}if(e.type==="online"){be?.(e);return}if(e.type==="access_granted"||e.type==="access_revoked"){e.type==="access_revoked"&&G.selectedRepo===e.repo&&G.deselect(),M.load();return}}function le(e){c(O,p(O).filter(t=>t.id!==e),!0)}function ke(){if(typeof window>"u"||b&&(b.readyState===WebSocket.OPEN||b.readyState===WebSocket.CONNECTING))return;const t=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;b=new WebSocket(t),b.onopen=()=>{c(te,!0),Z=1e3;for(const n of Ne)n()},b.onmessage=n=>{try{const r=JSON.parse(n.data);if(r?.type==="ping"){b?.send(JSON.stringify({type:"pong"}));return}const s=r;s.type&&s.type!=="toast"&&It(s)}catch{}},b.onclose=()=>{c(te,!1),b=null,Q=setTimeout(()=>{Z=Math.min(Z*2,3e4),ke()},Z)},b.onerror=()=>{}}function At(){Q&&(clearTimeout(Q),Q=null),b&&(b.close(),b=null),c(te,!1),c(O,[],!0);for(const[,e]of D)clearTimeout(e.timer);D.clear()}function Mt(e,t=4e3){const n=`toast-${Date.now()}`;c(O,[...p(O),{id:n,message:e,event:{type:"toast"},dismissed:!1}].slice(-3),!0),setTimeout(()=>le(n),t)}function Ot(e){Te=e}function xt(e){be=e}function Pt(e){Ne.push(e)}function Rt(e){b?.readyState===WebSocket.OPEN&&b.send(JSON.stringify(e))}const Gt={get notifications(){return p(O)},get connected(){return p(te)},get lastAutoSaved(){return p(Ce)},connect:ke,disconnect:At,dismiss:le,showToast:Mt,send:Rt,setPresenceHandler:Ot,setOnlineHandler:xt,addConnectHandler:Pt};const Dt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Ht=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ve=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var zt=gt("<svg><!><!></svg>");function re(e,t){const n=L(t,["children","$$slots","$$events","$$legacy"]),r=L(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);rt(t,!1);let s=W(t,"name",8,void 0),u=W(t,"color",8,"currentColor"),i=W(t,"size",8,24),f=W(t,"strokeWidth",8,2),d=W(t,"absoluteStrokeWidth",8,!1),m=W(t,"iconNode",24,()=>[]);mt();var o=zt();ge(o,(_,y,h)=>({...Dt,..._,...r,width:i(),height:i(),stroke:u(),"stroke-width":y,class:h}),[()=>Ht(r)?void 0:{"aria-hidden":"true"},()=>(F(d()),F(f()),F(i()),de(()=>d()?Number(f())*24/Number(i()):f())),()=>(F(ve),F(s()),F(n),de(()=>ve("lucide-icon","lucide",s()?`lucide-${s()}`:"",n.class)))]);var E=at(o);$t(E,1,m,vt,(_,y)=>{var h=lt(()=>ut(p(y),2));let a=()=>p(h)[0],l=()=>p(h)[1];var v=Y(),$=X(v);St($,a,!0,(w,k)=>{ge(w,()=>({...l()}))}),V(_,v)});var g=it(E);K(g,t,"default",{}),st(o),V(e,o),ot()}function Jt(e,t){const n=L(t,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];re(e,ne({name:"x"},()=>n,{get iconNode(){return r},children:(s,u)=>{var i=Y(),f=X(i);K(f,t,"default",{}),V(s,i)},$$slots:{default:!0}}))}function qt(e,t){const n=L(t,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];re(e,ne({name:"plus"},()=>n,{get iconNode(){return r},children:(s,u)=>{var i=Y(),f=X(i);K(f,t,"default",{}),V(s,i)},$$slots:{default:!0}}))}function Xt(e,t){const n=L(t,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];re(e,ne({name:"trash-2"},()=>n,{get iconNode(){return r},children:(s,u)=>{var i=Y(),f=X(i);K(f,t,"default",{}),V(s,i)},$$slots:{default:!0}}))}function Yt(e,t){const n=L(t,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];re(e,ne({name:"refresh-cw"},()=>n,{get iconNode(){return r},children:(s,u)=>{var i=Y(),f=X(i);K(f,t,"default",{}),V(s,i)},$$slots:{default:!0}}))}export{re as I,qt as P,Yt as R,Xt as T,Jt as X,$t as a,St as b,Ct as e,vt as i,G as n,Gt as r,K as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BVBRzmeQ.js","./Cs5oz2oJ.js","./B1y7Wy5O.js","./D2aTbzFm.js","./BXuvR8Ks.js","./0oxpWEgM.js","./BPUy9_sS.js","./DWSjaG46.js","./D-tW7Byc.js","./Bk7i2AGK.js","./ByFfmBEu.js","./CjKjQEMp.js","./EhE2EcYu.js","./CaITTL5o.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{q as nt,c as H,a as s,f as E,d as Dt,b as Ce,e as Xe,t as yt,s as G}from"./CjKjQEMp.js";import{M as Xt,F as Zt,p as Ae,f as C,n as ze,y as e,o as f,bd as He,u as o,V as Q,z as Me,S as ht,D as wt,P as $t,q as U,x as P,t as Re,v as ae,U as ea,T as at,m as ta,_ as aa,ap as na}from"./D-tW7Byc.js";import{p as I,i as ne,r as st,s as Te,b as xt,l as Ue}from"./EhE2EcYu.js";import{a as Ee,i as De,I as We,s as Be,T as sa,P as St}from"./BYHOExo0.js";import{c as Fe}from"./Dpn7ZAUg.js";import{e as we,b as Ve,r as kt,B as Le,s as Tt,w as At,i as ra,l as ft,g as oa}from"./ByFfmBEu.js";import{b as zt}from"./BV_9Nfp2.js";import{g as ia}from"./B_H7mdOW.js";import{k as rt,n as Ke,M as la,j as X,m as qe,l as ca,o as da,q as ua,t as va,v as fa,P as pa,x as _a}from"./CKGBr1Y7.js";import{F as ma,P as ga,a as ya,g as Ct,b as ha}from"./DII_SN9D.js";import"./eEhMI0BQ.js";import{C as wa}from"./D9J8Z5kZ.js";import{_ as Se}from"./PPVm8Dsz.js";function ka(l,t,r){Xt(()=>{var c=Zt(()=>t(l,r?.())||{});if(c?.destroy)return()=>c.destroy()})}var xa=E("<div><!></div>");function Pa(l,t){const r=nt();Ae(t,!0);let c=I(t,"ref",15,null),d=I(t,"id",19,()=>rt(r)),v=I(t,"disabled",3,!1),i=I(t,"onSelect",3,Ke),u=I(t,"closeOnSelect",3,!0),M=st(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const h=la.create({id:X(()=>d()),disabled:X(()=>v()),onSelect:X(()=>i()),ref:X(()=>c(),g=>c(g)),closeOnSelect:X(()=>u())}),B=Q(()=>qe(M,h.props));var x=H(),_=C(x);{var Y=g=>{var T=H(),J=C(T);we(J,()=>t.child,()=>({props:e(B)})),s(g,T)},m=g=>{var T=xa();Ve(T,()=>({...e(B)}));var J=f(T);we(J,()=>t.children??He),o(T),s(g,T)};ne(_,g=>{t.child?g(Y):g(m,!1)})}s(l,x),ze()}var ba=E("<div><!></div>");function Sa(l,t){const r=nt();Ae(t,!0);let c=I(t,"ref",15,null),d=I(t,"id",19,()=>rt(r)),v=st(t,["$$slots","$$events","$$legacy","ref","id","child","children"]);const i=ca.create({id:X(()=>d()),ref:X(()=>c(),_=>c(_))}),u=Q(()=>qe(v,i.props));var M=H(),h=C(M);{var B=_=>{var Y=H(),m=C(Y);we(m,()=>t.child,()=>({props:e(u)})),s(_,Y)},x=_=>{var Y=ba();Ve(Y,()=>({...e(u)}));var m=f(Y);we(m,()=>t.children??He),o(Y),s(_,Y)};ne(h,_=>{t.child?_(B):_(x,!1)})}s(l,M),ze()}function Ca(l,t){Ae(t,!0);let r=I(t,"open",15,!1),c=I(t,"dir",3,"ltr"),d=I(t,"onOpenChange",3,Ke),v=I(t,"onOpenChangeComplete",3,Ke),i=I(t,"_internal_variant",3,"dropdown-menu");const u=da.create({variant:X(()=>i()),dir:X(()=>c()),onClose:()=>{r(!1),d()(!1)}});ua.create({open:X(()=>r(),M=>{r(M),d()(M)}),onOpenChangeComplete:X(()=>v())},u),ma(l,{children:(M,h)=>{var B=H(),x=C(B);we(x,()=>t.children??He),s(M,B)},$$slots:{default:!0}}),ze()}var Ea=E("<div><div><!></div></div>"),Ma=E("<div><div><!></div></div>");function Da(l,t){const r=nt();Ae(t,!0);let c=I(t,"id",19,()=>rt(r)),d=I(t,"ref",15,null),v=I(t,"loop",3,!0),i=I(t,"onInteractOutside",3,Ke),u=I(t,"onEscapeKeydown",3,Ke),M=I(t,"onCloseAutoFocus",3,Ke),h=I(t,"forceMount",3,!1),B=I(t,"trapFocus",3,!1),x=st(t,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const _=va.create({id:X(()=>c()),loop:X(()=>v()),ref:X(()=>d(),R=>d(R)),onCloseAutoFocus:X(()=>M())}),Y=Q(()=>qe(x,_.props));function m(R){if(_.handleInteractOutside(R),!R.defaultPrevented&&(i()(R),!R.defaultPrevented)){if(R.target&&R.target instanceof Element){const ke=`[${_.parentMenu.root.getBitsAttr("sub-content")}]`;if(R.target.closest(ke))return}_.parentMenu.onClose()}}function g(R){u()(R),!R.defaultPrevented&&_.parentMenu.onClose()}var T=H(),J=C(T);{var se=R=>{ga(R,Te(()=>e(Y),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:g,get trapFocus(){return B()},get loop(){return v()},forceMount:!0,get id(){return c()},get shouldRender(){return _.shouldRender},popper:(p,b)=>{let ce=()=>b?.().props,$=()=>b?.().wrapperProps;const re=Q(()=>qe(ce(),{style:Ct("dropdown-menu")},{style:t.style}));var K=H(),oe=C(K);{var de=y=>{var w=H(),O=C(w);{let j=Q(()=>({props:e(re),wrapperProps:$(),..._.snippetProps}));we(O,()=>t.child,()=>e(j))}s(y,w)},S=y=>{var w=Ea();Ve(w,()=>({...$()}));var O=f(w);Ve(O,()=>({...e(re)}));var j=f(O);we(j,()=>t.children??He),o(O),o(w),s(y,w)};ne(oe,y=>{t.child?y(de):y(S,!1)})}s(p,K)},$$slots:{popper:!0}}))},Ie=R=>{ya(R,Te(()=>e(Y),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:g,get trapFocus(){return B()},get loop(){return v()},forceMount:!1,get id(){return c()},get shouldRender(){return _.shouldRender},popper:(p,b)=>{let ce=()=>b?.().props,$=()=>b?.().wrapperProps;const re=Q(()=>qe(ce(),{style:Ct("dropdown-menu")},{style:t.style}));var K=H(),oe=C(K);{var de=y=>{var w=H(),O=C(w);{let j=Q(()=>({props:e(re),wrapperProps:$(),..._.snippetProps}));we(O,()=>t.child,()=>e(j))}s(y,w)},S=y=>{var w=Ma();Ve(w,()=>({...$()}));var O=f(w);Ve(O,()=>({...e(re)}));var j=f(O);we(j,()=>t.children??He),o(O),o(w),s(y,w)};ne(oe,y=>{t.child?y(de):y(S,!1)})}s(p,K)},$$slots:{popper:!0}}))};ne(J,R=>{h()?R(se):h()||R(Ie,1)})}s(l,T),ze()}var Ta=E("<button><!></button>");function Aa(l,t){const r=nt();Ae(t,!0);let c=I(t,"id",19,()=>rt(r)),d=I(t,"ref",15,null),v=I(t,"disabled",3,!1),i=I(t,"type",3,"button"),u=st(t,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const M=fa.create({id:X(()=>c()),disabled:X(()=>v()??!1),ref:X(()=>d(),B=>d(B))}),h=Q(()=>qe(u,M.props,{type:i()}));ha(l,{get id(){return c()},get ref(){return M.opts.ref},children:(B,x)=>{var _=H(),Y=C(_);{var m=T=>{var J=H(),se=C(J);we(se,()=>t.child,()=>({props:e(h)})),s(T,J)},g=T=>{var J=Ta();Ve(J,()=>({...e(h)}));var se=f(J);we(se,()=>t.children??He),o(J),s(T,J)};ne(Y,T=>{t.child?T(m):T(g,!1)})}s(B,_)},$$slots:{default:!0}}),ze()}var za=E('<span class="chip svelte-84vb17"> <!></span>'),Ia=E('<div><span class="entity-title svelte-84vb17"> </span> <span class="entity-meta svelte-84vb17"><span class="entity-type-badge svelte-84vb17"> </span> <span class="entity-repo svelte-84vb17"> </span></span></div>'),Oa=E('<div class="dropdown svelte-84vb17"></div>'),Fa=E('<div class="autocomplete svelte-84vb17"><div class="input-row svelte-84vb17"><!> <input class="ac-input svelte-84vb17" type="text" placeholder="Search entities..."/></div> <!></div>');function La(l,t){Ae(t,!0);let r=I(t,"multi",3,!1),c=Me(""),d=Me(0),v;const i=Q(()=>At.repos.flatMap(p=>p.entities.map(b=>({id:b.id,title:b.title,entityType:b.entityType,repo:p.name})))),u=Q(()=>()=>{const p=e(c).toLowerCase().trim();return p?e(i).filter(b=>b.title.toLowerCase().includes(p)||b.id.toLowerCase().includes(p)).slice(0,20):e(i).slice(0,20)}),M=Array.isArray(t.value)?[...t.value]:t.value?[t.value]:[];let h=Me(ht(M));wt(()=>{$t().then(()=>v?.focus())});function B(p){r()?(e(h).includes(p)||P(h,[...e(h),p],!0),P(c,""),P(d,0),v?.focus()):t.onselect(p)}function x(p){P(h,e(h).filter(b=>b!==p),!0)}function _(){e(h).length===M.length&&e(h).every((b,ce)=>b===M[ce])?t.oncancel():t.onselect(e(h))}function Y(p){const b=e(u)();p.key==="ArrowDown"?(p.preventDefault(),P(d,Math.min(e(d)+1,b.length-1),!0)):p.key==="ArrowUp"?(p.preventDefault(),P(d,Math.max(e(d)-1,0),!0)):p.key==="Enter"?(p.preventDefault(),b.length>0?B(b[e(d)].id):r()&&_()):p.key==="Escape"?r()&&e(h).length>0?_():t.oncancel():p.key==="Backspace"&&!e(c)&&r()&&e(h).length>0&&P(h,e(h).slice(0,-1),!0)}var m=Fa(),g=f(m),T=f(g);{var J=p=>{var b=H(),ce=C(b);Ee(ce,17,()=>e(h),De,($,re)=>{var K=za(),oe=f(K),de=U(oe);Le(de,{variant:"ghost",size:"icon",class:"chip-remove",onclick:()=>x(e(re)),children:(S,y)=>{Re();var w=yt("×");s(S,w)},$$slots:{default:!0}}),o(K),ae(()=>G(oe,`${e(re)??""} `)),s($,K)}),s(p,b)};ne(T,p=>{r()&&p(J)})}var se=U(T,2);kt(se),xt(se,p=>v=p,()=>v),o(g);var Ie=U(g,2);{var R=p=>{var b=Oa();Ee(b,21,()=>e(u)(),De,(ce,$,re)=>{var K=Ia();let oe;var de=f(K),S=f(de,!0);o(de);var y=U(de,2),w=f(y),O=f(w,!0);o(w);var j=U(w,2),Ne=f(j,!0);o(j),o(y),o(K),ae(()=>{oe=Tt(K,1,"dropdown-item svelte-84vb17",null,oe,{highlighted:re===e(d)}),G(S,e($).title),G(O,e($).entityType),G(Ne,e($).repo)}),Ce("mousedown",K,Ye=>{Ye.preventDefault(),B(e($).id)}),Xe("mouseenter",K,()=>P(d,re,!0)),s(ce,K)}),o(b),s(p,b)},ke=Q(()=>e(u)().length>0);ne(Ie,p=>{e(ke)&&p(R)})}o(m),Ce("keydown",se,Y),Xe("blur",se,()=>{setTimeout(()=>{r()&&e(h).length>0?_():r()||t.oncancel()},150)}),zt(se,()=>e(c),p=>P(c,p)),s(l,m),ze()}Dt(["keydown","mousedown"]);const Va=Ca,Na=Aa,Ra=pa,Ka=Da,Et=Pa,qa=Sa;function pt(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M12 4v16"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}],["path",{d:"M9 20h6"}]];We(l,Te({name:"type"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function _t(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]];We(l,Te({name:"calendar"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function mt(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"1"}]];We(l,Te({name:"circle-dot"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function gt(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];We(l,Te({name:"link"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function Ha(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}]];We(l,Te({name:"tag"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function Ua(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"m15 18-6-6 6-6"}]];We(l,Te({name:"chevron-left"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}var Wa=E('<span class="ip-menu-check svelte-x7sio8"><!></span>'),Ba=E('<span class="ip-menu-item-icon svelte-x7sio8"><!></span> <span> </span> <!>',1),Ya=E('<span class="ip-menu-item-icon svelte-x7sio8"><!></span> <span>Remove</span>',1),ja=E("<!> <!> <!>",1),Ja=E("<!> <!>",1),Ga=E('<input class="ip-edit-input svelte-x7sio8" type="text"/>'),Qa=E('<span class="ip-status-dot svelte-x7sio8"></span> ',1),Xa=E('<div class="ip-status-wrap svelte-x7sio8"><div class="ip-status-value svelte-x7sio8"><span class="ip-status-dot svelte-x7sio8"></span> <span class="ip-status-text svelte-x7sio8"> </span></div> <div class="ip-status-dropdown svelte-x7sio8"></div></div>'),Za=E('<span class="ip-cal-wd svelte-x7sio8"> </span>'),$a=E('<div class="ip-cal-week svelte-x7sio8"></div>'),en=E('<div class="ip-cal-wrap svelte-x7sio8"><span class="ip-date-text svelte-x7sio8"> </span> <div class="ip-cal-dropdown svelte-x7sio8"><div class="ip-cal-header svelte-x7sio8"><!> <span class="ip-cal-title svelte-x7sio8"> </span> <!></div> <div class="ip-cal-weekdays svelte-x7sio8"></div> <!></div></div>'),tn=E('<span class="ip-badge svelte-x7sio8"> </span>'),an=E('<div class="ip-wikilink-group svelte-x7sio8"></div>'),nn=E('<div class="ip-status-value svelte-x7sio8"><span class="ip-status-dot svelte-x7sio8"></span> <span class="ip-status-text svelte-x7sio8"> </span></div>'),sn=E('<span class="ip-date-text svelte-x7sio8"> </span>'),rn=E('<a class="ip-url-link svelte-x7sio8" target="_blank" rel="noopener noreferrer"> </a>'),on=E('<span class="ip-text-value svelte-x7sio8"> </span>'),ln=E('<div><div class="ip-icon svelte-x7sio8"><!></div> <div class="ip-key svelte-x7sio8"> </div> <div class="ip-value svelte-x7sio8"><!></div></div>'),cn=E('<div class="ip-row ip-add-row svelte-x7sio8"><div class="ip-icon svelte-x7sio8"><!></div> <div class="ip-key svelte-x7sio8"><input class="ip-add-key-input svelte-x7sio8" type="text" placeholder="Property name"/></div> <div class="ip-value svelte-x7sio8"></div></div>'),dn=E("<!> <span>Add property</span>",1),un=E('<div class="inline-properties svelte-x7sio8"><!> <!></div>');function zn(l,t){Ae(t,!0);let r=I(t,"editable",3,!1);const c=[{type:"text",label:"Text"},{type:"date",label:"Date"},{type:"status",label:"Status"},{type:"wikilink",label:"Link"}],d=["active","inactive","in-progress","completed","draft","archived","current","former","won","lost","open","closed"];let v=Me(null),i=Me(!1),u=Me(""),M=Me(void 0);function h(n){switch(n.toLowerCase()){case"active":case"current":case"won":return"#3ecf8e";case"in-progress":case"open":return"#f0c246";case"inactive":case"lost":case"closed":case"former":return"#e54d4d";default:return"#5c5c66"}}function B(n){for(const a of At.repos){const W=a.entities.find(ue=>ue.id===n);if(W){ia(`/${a.name}/${W.entityType}/${W.id}`);return}}}function x(n){return typeof n.value=="string"?n.value:n.value[0]}function _(n){return/^https?:\/\//.test(n)}function Y(n){try{return new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return n}}let m=Me(ht(new Date().getFullYear())),g=Me(ht(new Date().getMonth()));const T=["Su","Mo","Tu","We","Th","Fr","Sa"],J=["January","February","March","April","May","June","July","August","September","October","November","December"];function se(n,a){const W=new Date(n,a,1).getDay(),ue=new Date(n,a+1,0).getDate(),xe=new Date(n,a,0).getDate(),le=[];let ie=[];for(let ge=W-1;ge>=0;ge--){const je=xe-ge,Oe=a===0?11:a-1,ot=a===0?n-1:n;ie.push({day:je,month:Oe,year:ot,outside:!0})}for(let ge=1;ge<=ue;ge++)ie.push({day:ge,month:a,year:n,outside:!1}),ie.length===7&&(le.push(ie),ie=[]);if(ie.length>0){const ge=a===11?0:a+1,je=a===11?n+1:n;let Oe=1;for(;ie.length<7;)ie.push({day:Oe++,month:ge,year:je,outside:!0});le.push(ie)}return le}function Ie(n){const a=new Date;return n.day===a.getDate()&&n.month===a.getMonth()&&n.year===a.getFullYear()}function R(n,a){const W=a.slice(0,10).split("-");return n.year===+W[0]&&n.month===+W[1]-1&&n.day===+W[2]}function ke(){e(g)===0?(P(g,11),at(m,-1)):at(g,-1)}function p(){e(g)===11?(P(g,0),at(m)):at(g)}function b(n){try{const a=n.slice(0,10).split("-");P(m,+a[0]),P(g,+a[1]-1)}catch{const a=new Date;P(m,a.getFullYear(),!0),P(g,a.getMonth(),!0)}}function ce(n){requestAnimationFrame(()=>{n.focus(),n.select()})}function $(n){!r()||n.type==="badge"||(n.type==="date"&&b(x(n)),P(v,n.key,!0))}function re(n,a){t.onedit&&t.onedit(n,a),P(v,null)}function K(n,a){const W=`${a.year}-${String(a.month+1).padStart(2,"0")}-${String(a.day).padStart(2,"0")}`;t.onedit&&t.onedit(n,W),P(v,null)}function oe(n,a){t.ontypechange&&t.ontypechange(n,a)}function de(n){P(v,null),t.onremove&&t.onremove(n)}function S(){P(i,!0),P(u,""),requestAnimationFrame(()=>e(M)?.focus())}function y(){const n=e(u).trim();n&&t.onadd&&t.onadd(n,""),P(i,!1),P(u,"")}function w(){P(i,!1),P(u,"")}function O(n){n.key==="Enter"?(n.preventDefault(),y()):n.key==="Escape"&&w()}var j=un();Xe("click",ea,()=>{P(v,null)});var Ne=f(j);Ee(Ne,17,()=>t.properties,n=>n.key,(n,a)=>{const W=Q(()=>e(v)===e(a).key);var ue=ln();let xe;var le=f(ue),ie=f(le);{var ge=L=>{var F=H(),V=C(F);Fe(V,()=>Va,(ve,ye)=>{ye(ve,{children:(_e,Pe)=>{var fe=Ja(),A=C(fe);Fe(A,()=>Na,(z,k)=>{k(z,{class:"ip-icon-trigger",children:(D,N)=>{var q=H(),pe=C(q);{var ee=Z=>{_t(Z,{size:14})},be=Z=>{mt(Z,{size:14})},Je=Z=>{gt(Z,{size:14})},Ze=Z=>{pt(Z,{size:14})};ne(pe,Z=>{e(a).type==="date"?Z(ee):e(a).type==="status"?Z(be,1):e(a).type==="wikilink"?Z(Je,2):Z(Ze,!1)})}s(D,q)},$$slots:{default:!0}})});var me=U(A,2);Fe(me,()=>Ra,(z,k)=>{k(z,{children:(D,N)=>{var q=H(),pe=C(q);Fe(pe,()=>Ka,(ee,be)=>{be(ee,{class:"ip-menu-content",sideOffset:4,align:"start",children:(Je,Ze)=>{var Z=ja(),lt=C(Z);Ee(lt,17,()=>c,De,(Qe,he)=>{var $e=H(),Pt=C($e);Fe(Pt,()=>Et,(et,tt)=>{tt(et,{class:"ip-menu-item",onSelect:()=>oe(e(a).key,e(he).type),children:(ct,yn)=>{var bt=Ba(),dt=C(bt),Ht=f(dt);{var Ut=te=>{pt(te,{size:13})},Wt=te=>{_t(te,{size:13})},Bt=te=>{mt(te,{size:13})},Yt=te=>{gt(te,{size:13})};ne(Ht,te=>{e(he).type==="text"?te(Ut):e(he).type==="date"?te(Wt,1):e(he).type==="status"?te(Bt,2):e(he).type==="wikilink"&&te(Yt,3)})}o(dt);var ut=U(dt,2),jt=f(ut,!0);o(ut);var Jt=U(ut,2);{var Gt=te=>{var vt=Wa(),Qt=f(vt);wa(Qt,{size:12}),o(vt),s(te,vt)};ne(Jt,te=>{e(a).type===e(he).type&&te(Gt)})}ae(()=>G(jt,e(he).label)),s(ct,bt)},$$slots:{default:!0}})}),s(Qe,$e)});var Ge=U(lt,2);Fe(Ge,()=>qa,(Qe,he)=>{he(Qe,{class:"ip-menu-sep"})});var qt=U(Ge,2);Fe(qt,()=>Et,(Qe,he)=>{he(Qe,{class:"ip-menu-item ip-menu-destructive",onSelect:()=>de(e(a).key),children:($e,Pt)=>{var et=Ya(),tt=C(et),ct=f(tt);sa(ct,{size:13}),o(tt),Re(2),s($e,et)},$$slots:{default:!0}})}),s(Je,Z)},$$slots:{default:!0}})}),s(D,q)},$$slots:{default:!0}})}),s(_e,fe)},$$slots:{default:!0}})}),s(L,F)},je=L=>{var F=H(),V=C(F);{var ve=A=>{_t(A,{size:14})},ye=A=>{mt(A,{size:14})},_e=A=>{gt(A,{size:14})},Pe=A=>{Ha(A,{size:14})},fe=A=>{pt(A,{size:14})};ne(V,A=>{e(a).type==="date"?A(ve):e(a).type==="status"?A(ye,1):e(a).type==="wikilink"?A(_e,2):e(a).type==="badge"?A(Pe,3):A(fe,!1)})}s(L,F)};ne(ie,L=>{r()&&e(a).type!=="badge"?L(ge):L(je,!1)})}o(le);var Oe=U(le,2),ot=f(Oe,!0);o(Oe);var it=U(Oe,2),Ft=f(it);{var Lt=L=>{var F=Ga();kt(F),ka(F,V=>ce?.(V)),ae(V=>ra(F,V),[()=>x(e(a))]),Xe("blur",F,V=>{const ve=V.currentTarget.value;ve!==x(e(a))&&t.onedit?.(e(a).key,ve),P(v,null)}),Ce("keydown",F,V=>{V.key==="Enter"?V.currentTarget.blur():V.key==="Escape"&&(V.currentTarget.value=x(e(a)),P(v,null))}),s(L,F)},Vt=L=>{var F=Xa(),V=f(F),ve=f(V);let ye;var _e=U(ve,2),Pe=f(_e,!0);o(_e),o(V);var fe=U(V,2);Ee(fe,21,()=>d,De,(A,me)=>{{let z=Q(()=>x(e(a))===e(me)?"selected":"");Le(A,{variant:"ghost",get class(){return`ip-status-option ${e(z)??""}`},onclick:()=>re(e(a).key,e(me)),children:(k,D)=>{var N=Qa(),q=C(N);let pe;var ee=U(q);ae(be=>{pe=ft(q,"",pe,be),G(ee,` ${e(me)??""}`)},[()=>({background:h(e(me))})]),s(k,N)},$$slots:{default:!0}})}}),o(fe),o(F),ae((A,me)=>{ye=ft(ve,"",ye,A),G(Pe,me)},[()=>({background:h(x(e(a)))}),()=>x(e(a))]),Ce("click",F,A=>A.stopPropagation()),s(L,F)},Nt=L=>{var F=en(),V=f(F),ve=f(V,!0);o(V);var ye=U(V,2),_e=f(ye),Pe=f(_e);Le(Pe,{variant:"ghost",size:"icon",class:"ip-cal-nav",onclick:ke,children:(D,N)=>{Ua(D,{size:14})},$$slots:{default:!0}});var fe=U(Pe,2),A=f(fe);o(fe);var me=U(fe,2);Le(me,{variant:"ghost",size:"icon",class:"ip-cal-nav",onclick:p,children:(D,N)=>{_a(D,{size:14})},$$slots:{default:!0}}),o(_e);var z=U(_e,2);Ee(z,21,()=>T,De,(D,N)=>{var q=Za(),pe=f(q,!0);o(q),ae(()=>G(pe,e(N))),s(D,q)}),o(z);var k=U(z,2);Ee(k,17,()=>se(e(m),e(g)),De,(D,N)=>{var q=$a();Ee(q,21,()=>e(N),De,(pe,ee)=>{{let be=Q(()=>e(ee).outside?"outside":""),Je=Q(()=>Ie(e(ee))?"today":""),Ze=Q(()=>R(e(ee),x(e(a)))?"selected":"");Le(pe,{variant:"ghost",get class(){return`ip-cal-day ${e(be)??""} ${e(Je)??""} ${e(Ze)??""}`},onclick:()=>K(e(a).key,e(ee)),children:(Z,lt)=>{Re();var Ge=yt();ae(()=>G(Ge,e(ee).day)),s(Z,Ge)},$$slots:{default:!0}})}}),o(q),s(D,q)}),o(ye),o(F),ae(D=>{G(ve,D),G(A,`${J[e(g)]??""} ${e(m)??""}`)},[()=>Y(x(e(a)))]),Ce("click",F,D=>D.stopPropagation()),s(L,F)},Rt=L=>{{let F=Q(()=>Array.isArray(e(a).value));La(L,{get value(){return e(a).value},get multi(){return e(F)},onselect:V=>{t.onedit?.(e(a).key,V),P(v,null)},oncancel:()=>{P(v,null)}})}},Kt=L=>{var F=H(),V=C(F);{var ve=z=>{var k=tn(),D=f(k,!0);o(k),ae(N=>G(D,N),[()=>x(e(a))]),s(z,k)},ye=z=>{var k=an();Ee(k,21,()=>Array.isArray(e(a).value)?e(a).value:[e(a).value],De,(D,N)=>{Le(D,{variant:"ghost",class:"ip-wikilink-chip",onclick:q=>{q.stopPropagation(),B(e(N))},children:(q,pe)=>{Re();var ee=yt();ae(()=>G(ee,e(N))),s(q,ee)},$$slots:{default:!0}})}),o(k),s(z,k)},_e=z=>{var k=nn(),D=f(k);let N;var q=U(D,2),pe=f(q,!0);o(q),o(k),ae((ee,be)=>{N=ft(D,"",N,ee),G(pe,be)},[()=>({background:h(x(e(a)))}),()=>x(e(a))]),s(z,k)},Pe=z=>{var k=sn(),D=f(k,!0);o(k),ae(N=>G(D,N),[()=>Y(x(e(a)))]),s(z,k)},fe=z=>{var k=rn(),D=f(k,!0);o(k),ae((N,q)=>{oa(k,"href",N),G(D,q)},[()=>x(e(a)),()=>x(e(a))]),Ce("click",k,N=>N.stopPropagation()),s(z,k)},A=Q(()=>_(x(e(a)))),me=z=>{var k=on(),D=f(k,!0);o(k),ae(N=>G(D,N),[()=>x(e(a))]),s(z,k)};ne(V,z=>{e(a).type==="badge"?z(ve):e(a).type==="wikilink"?z(ye,1):e(a).type==="status"?z(_e,2):e(a).type==="date"?z(Pe,3):e(A)?z(fe,4):z(me,!1)})}s(L,F)};ne(Ft,L=>{e(W)&&e(a).type==="text"?L(Lt):e(W)&&e(a).type==="status"?L(Vt,1):e(W)&&e(a).type==="date"?L(Nt,2):e(W)&&e(a).type==="wikilink"?L(Rt,3):L(Kt,!1)})}o(it),o(ue),ae(()=>{xe=Tt(ue,1,"ip-row svelte-x7sio8",null,xe,{"ip-focused":e(W)}),G(ot,e(a).key)}),Ce("click",le,L=>L.stopPropagation()),Ce("click",it,L=>{L.stopPropagation(),$(e(a))}),s(n,ue)});var Ye=U(Ne,2);{var It=n=>{var a=cn(),W=f(a),ue=f(W);St(ue,{size:14}),o(W);var xe=U(W,2),le=f(xe);kt(le),xt(le,ie=>P(M,ie),()=>e(M)),o(xe),Re(2),o(a),Ce("keydown",le,O),Xe("blur",le,w),zt(le,()=>e(u),ie=>P(u,ie)),s(n,a)},Ot=n=>{Le(n,{variant:"ghost",class:"ip-add-btn",onclick:a=>{a.stopPropagation(),S()},children:(a,W)=>{var ue=dn(),xe=C(ue);St(xe,{size:14}),Re(2),s(a,ue)},$$slots:{default:!0}})};ne(Ye,n=>{e(i)?n(It):r()&&n(Ot,1)})}o(j),s(l,j),ze()}Dt(["click","keydown"]);var vn=E('<div class="editor-wrap svelte-ok7wy5"><div class="cm-container svelte-ok7wy5"></div></div>');function In(l,t){Ae(t,!0);let r=I(t,"readonly",3,!0),c=I(t,"resetKey",3,0);const d=ta("theme");let v,i=null,u=t.content,M=!1,h=null;function B(m,g){return m.theme({"&":{backgroundColor:"transparent",color:"var(--color-text-primary)",fontSize:"15px",fontFamily:"var(--font-sans)"},".cm-content":{padding:"32px 40px",fontFamily:"var(--font-sans)",caretColor:"var(--color-accent)",lineHeight:"1.6"},".cm-cursor":{borderLeftColor:"var(--color-accent)"},".cm-selectionBackground":{backgroundColor:g?"rgba(110,110,232,0.2)":"rgba(110,110,232,0.15)"},"&.cm-focused .cm-selectionBackground":{backgroundColor:g?"rgba(110,110,232,0.3)":"rgba(110,110,232,0.2)"},".cm-gutters":{display:"none"},".cm-activeLine":{backgroundColor:"transparent"},".cm-line":{padding:"0"},".cm-header-1":{fontSize:"22px",fontWeight:"600"},".cm-header-2":{fontSize:"16px",fontWeight:"600"},".cm-header-3":{fontSize:"15px",fontWeight:"600"},".cm-formatting":{color:"var(--color-text-tertiary)",opacity:"0.5"},".cm-link":{color:"var(--color-link)",textDecoration:"none"}},{dark:g})}async function x(m){h=m??null,i&&(i.destroy(),i=null);const{EditorState:g}=await Se(async()=>{const{EditorState:S}=await import("./Cs5oz2oJ.js");return{EditorState:S}},[],import.meta.url),{EditorView:T,keymap:J}=await Se(async()=>{const{EditorView:S,keymap:y}=await import("./BVBRzmeQ.js").then(w=>w.i);return{EditorView:S,keymap:y}},__vite__mapDeps([0,1]),import.meta.url),{markdown:se}=await Se(async()=>{const{markdown:S}=await import("./B1y7Wy5O.js");return{markdown:S}},__vite__mapDeps([2,1,0,3,4,5]),import.meta.url),{syntaxHighlighting:Ie,HighlightStyle:R}=await Se(async()=>{const{syntaxHighlighting:S,HighlightStyle:y}=await import("./D2aTbzFm.js");return{syntaxHighlighting:S,HighlightStyle:y}},__vite__mapDeps([3,4,1,0]),import.meta.url),{tags:ke}=await Se(async()=>{const{tags:S}=await import("./BXuvR8Ks.js").then(y=>y.i);return{tags:S}},[],import.meta.url),{livePreviewPlugin:p,livePreviewTheme:b}=await Se(async()=>{const{livePreviewPlugin:S,livePreviewTheme:y}=await import("./BPUy9_sS.js");return{livePreviewPlugin:S,livePreviewTheme:y}},__vite__mapDeps([6,0,1,3,4]),import.meta.url),ce=d.current==="dark",$=B(T,ce),re=R.define([{tag:ke.processingInstruction,color:"var(--color-text-tertiary)",opacity:"0.7"}]),K=[se(),$,Ie(re),p,b,T.lineWrapping];r()&&K.push(g.readOnly.of(!0));let oe=!1;if(m)try{const{collab:S}=await Se(async()=>{const{collab:O}=await import("./DWSjaG46.js");return{collab:O}},__vite__mapDeps([7,8,9]),import.meta.url),{auth:y}=await Se(async()=>{const{auth:O}=await import("./ByFfmBEu.js").then(j=>j.C);return{auth:O}},__vite__mapDeps([10,8,11,12]),import.meta.url),w=S.connect(m);if(w&&S.status!=="unavailable"){const O=y.user?.displayName??"Anonymous",j=getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim()||"#4f8ef7";w.awareness.setLocalStateField("user",{name:O,color:j});const{yCollab:Ne}=await Se(async()=>{const{yCollab:Ye}=await import("./CaITTL5o.js");return{yCollab:Ye}},__vite__mapDeps([13,9,0,1]),import.meta.url);K.push(Ne(w.yText,w.awareness)),h=m,oe=!0}}catch{}t.onchange&&!oe&&K.push(T.updateListener.of(S=>{if(S.docChanged&&!M){const y=S.state.doc.toString();u=y,t.onchange(y)}})),K.push(T.domEventHandlers({click(S){const y=S.target;if(t.onwikilinkclick){const O=y.closest(".cm-live-wikilink");if(O){S.preventDefault();const j=O.textContent?.replace(/^\[{1,2}|\]{1,2}$/g,"").trim();return j&&t.onwikilinkclick(j),!0}}const w=y.closest(".cm-live-link");if(w){const O=w.getAttribute("data-href");if(O)return S.preventDefault(),window.open(O,"_blank","noopener,noreferrer"),!0}return!1}})),t.onsave&&K.push(J.of([{key:"Mod-s",run:()=>(t.onsave(),!0)}]));const de=g.create({doc:oe?"":t.content,extensions:K});i=new T({state:de,parent:v}),u=t.content}aa(()=>{x(t.collabDocName)}),wt(()=>{const m=t.collabDocName;m!==h&&v&&x(m)}),wt(()=>{if(c(),i&&!h&&t.content!==u){u=t.content;const m=v.closest(".document-scroll"),g=m?.scrollTop??0;M=!0,i.dispatch({changes:{from:0,to:i.state.doc.length,insert:t.content}}),M=!1,m&&requestAnimationFrame(()=>{m.scrollTop=g})}}),na(()=>{i?.destroy()});var _=vn(),Y=f(_);xt(Y,m=>v=m,()=>v),o(_),s(l,_),ze()}const fn=/^\d{4}-\d{2}-\d{2}/,pn=new Set(["active","inactive","in-progress","completed","draft","archived","current","former","contractor","client","partner","won","lost","open","closed"]),_n=new Set(["entity_type","format"]),mn=new Set(["entity_id","created_at","updated_at","created_by","updated_by"]);function On(l,t){const r=[];for(const[c,d]of Object.entries(l)){if(mn.has(c)||d==null)continue;const v=gn(c,d);v&&r.push(v)}return r}function gn(l,t){if(_n.has(l))return{key:l,value:String(t).toUpperCase(),type:"badge"};if(l==="status")return{key:l,value:String(t),type:"status"};if(Array.isArray(t)){const d=t.map(String),v=d.some(u=>/^\[\[.+?\]\]$/.test(u)),i=d.map(u=>{const M=u.match(/^\[\[(.+?)\]\]$/);return M?M[1]:u});return v||i.every(u=>Mt(u))?{key:l,value:i,type:"wikilink"}:{key:l,value:d.join(", "),type:"text"}}const r=String(t),c=r.match(/^\[\[(.+?)\]\]$/);return c?{key:l,value:c[1],type:"wikilink"}:fn.test(r)?{key:l,value:r,type:"date"}:pn.has(r.toLowerCase())?{key:l,value:r,type:"status"}:Mt(r)&&!r.includes(" ")?{key:l,value:r,type:"wikilink"}:{key:l,value:r,type:"text"}}function Mt(l){return/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(l)&&l.includes("-")}export{In as C,zn as I,On as t};
|
|
2
|
+
import{q as nt,c as H,a as s,f as E,d as Dt,b as Ce,e as Xe,t as yt,s as G}from"./CjKjQEMp.js";import{M as Xt,F as Zt,p as Ae,f as C,n as ze,y as e,o as f,bd as He,u as o,V as Q,z as Me,S as ht,D as wt,P as $t,q as U,x as P,t as Re,v as ae,U as ea,T as at,m as ta,_ as aa,ap as na}from"./D-tW7Byc.js";import{p as I,i as ne,r as st,s as Te,b as xt,l as Ue}from"./EhE2EcYu.js";import{a as Ee,i as De,I as We,s as Be,T as sa,P as St}from"./CjIxLDPU.js";import{c as Fe}from"./Dpn7ZAUg.js";import{e as we,b as Ve,r as kt,B as Le,s as Tt,w as At,i as ra,l as ft,g as oa}from"./ByFfmBEu.js";import{b as zt}from"./BV_9Nfp2.js";import{g as ia}from"./DnkBJSv0.js";import{k as rt,n as Ke,M as la,j as X,m as qe,l as ca,o as da,q as ua,t as va,v as fa,P as pa,x as _a}from"./xpxYMk1B.js";import{F as ma,P as ga,a as ya,g as Ct,b as ha}from"./B_f3TTMe.js";import"./eEhMI0BQ.js";import{C as wa}from"./ZfbXz_Pn.js";import{_ as Se}from"./PPVm8Dsz.js";function ka(l,t,r){Xt(()=>{var c=Zt(()=>t(l,r?.())||{});if(c?.destroy)return()=>c.destroy()})}var xa=E("<div><!></div>");function Pa(l,t){const r=nt();Ae(t,!0);let c=I(t,"ref",15,null),d=I(t,"id",19,()=>rt(r)),v=I(t,"disabled",3,!1),i=I(t,"onSelect",3,Ke),u=I(t,"closeOnSelect",3,!0),M=st(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const h=la.create({id:X(()=>d()),disabled:X(()=>v()),onSelect:X(()=>i()),ref:X(()=>c(),g=>c(g)),closeOnSelect:X(()=>u())}),B=Q(()=>qe(M,h.props));var x=H(),_=C(x);{var Y=g=>{var T=H(),J=C(T);we(J,()=>t.child,()=>({props:e(B)})),s(g,T)},m=g=>{var T=xa();Ve(T,()=>({...e(B)}));var J=f(T);we(J,()=>t.children??He),o(T),s(g,T)};ne(_,g=>{t.child?g(Y):g(m,!1)})}s(l,x),ze()}var ba=E("<div><!></div>");function Sa(l,t){const r=nt();Ae(t,!0);let c=I(t,"ref",15,null),d=I(t,"id",19,()=>rt(r)),v=st(t,["$$slots","$$events","$$legacy","ref","id","child","children"]);const i=ca.create({id:X(()=>d()),ref:X(()=>c(),_=>c(_))}),u=Q(()=>qe(v,i.props));var M=H(),h=C(M);{var B=_=>{var Y=H(),m=C(Y);we(m,()=>t.child,()=>({props:e(u)})),s(_,Y)},x=_=>{var Y=ba();Ve(Y,()=>({...e(u)}));var m=f(Y);we(m,()=>t.children??He),o(Y),s(_,Y)};ne(h,_=>{t.child?_(B):_(x,!1)})}s(l,M),ze()}function Ca(l,t){Ae(t,!0);let r=I(t,"open",15,!1),c=I(t,"dir",3,"ltr"),d=I(t,"onOpenChange",3,Ke),v=I(t,"onOpenChangeComplete",3,Ke),i=I(t,"_internal_variant",3,"dropdown-menu");const u=da.create({variant:X(()=>i()),dir:X(()=>c()),onClose:()=>{r(!1),d()(!1)}});ua.create({open:X(()=>r(),M=>{r(M),d()(M)}),onOpenChangeComplete:X(()=>v())},u),ma(l,{children:(M,h)=>{var B=H(),x=C(B);we(x,()=>t.children??He),s(M,B)},$$slots:{default:!0}}),ze()}var Ea=E("<div><div><!></div></div>"),Ma=E("<div><div><!></div></div>");function Da(l,t){const r=nt();Ae(t,!0);let c=I(t,"id",19,()=>rt(r)),d=I(t,"ref",15,null),v=I(t,"loop",3,!0),i=I(t,"onInteractOutside",3,Ke),u=I(t,"onEscapeKeydown",3,Ke),M=I(t,"onCloseAutoFocus",3,Ke),h=I(t,"forceMount",3,!1),B=I(t,"trapFocus",3,!1),x=st(t,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const _=va.create({id:X(()=>c()),loop:X(()=>v()),ref:X(()=>d(),R=>d(R)),onCloseAutoFocus:X(()=>M())}),Y=Q(()=>qe(x,_.props));function m(R){if(_.handleInteractOutside(R),!R.defaultPrevented&&(i()(R),!R.defaultPrevented)){if(R.target&&R.target instanceof Element){const ke=`[${_.parentMenu.root.getBitsAttr("sub-content")}]`;if(R.target.closest(ke))return}_.parentMenu.onClose()}}function g(R){u()(R),!R.defaultPrevented&&_.parentMenu.onClose()}var T=H(),J=C(T);{var se=R=>{ga(R,Te(()=>e(Y),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:g,get trapFocus(){return B()},get loop(){return v()},forceMount:!0,get id(){return c()},get shouldRender(){return _.shouldRender},popper:(p,b)=>{let ce=()=>b?.().props,$=()=>b?.().wrapperProps;const re=Q(()=>qe(ce(),{style:Ct("dropdown-menu")},{style:t.style}));var K=H(),oe=C(K);{var de=y=>{var w=H(),O=C(w);{let j=Q(()=>({props:e(re),wrapperProps:$(),..._.snippetProps}));we(O,()=>t.child,()=>e(j))}s(y,w)},S=y=>{var w=Ea();Ve(w,()=>({...$()}));var O=f(w);Ve(O,()=>({...e(re)}));var j=f(O);we(j,()=>t.children??He),o(O),o(w),s(y,w)};ne(oe,y=>{t.child?y(de):y(S,!1)})}s(p,K)},$$slots:{popper:!0}}))},Ie=R=>{ya(R,Te(()=>e(Y),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:g,get trapFocus(){return B()},get loop(){return v()},forceMount:!1,get id(){return c()},get shouldRender(){return _.shouldRender},popper:(p,b)=>{let ce=()=>b?.().props,$=()=>b?.().wrapperProps;const re=Q(()=>qe(ce(),{style:Ct("dropdown-menu")},{style:t.style}));var K=H(),oe=C(K);{var de=y=>{var w=H(),O=C(w);{let j=Q(()=>({props:e(re),wrapperProps:$(),..._.snippetProps}));we(O,()=>t.child,()=>e(j))}s(y,w)},S=y=>{var w=Ma();Ve(w,()=>({...$()}));var O=f(w);Ve(O,()=>({...e(re)}));var j=f(O);we(j,()=>t.children??He),o(O),o(w),s(y,w)};ne(oe,y=>{t.child?y(de):y(S,!1)})}s(p,K)},$$slots:{popper:!0}}))};ne(J,R=>{h()?R(se):h()||R(Ie,1)})}s(l,T),ze()}var Ta=E("<button><!></button>");function Aa(l,t){const r=nt();Ae(t,!0);let c=I(t,"id",19,()=>rt(r)),d=I(t,"ref",15,null),v=I(t,"disabled",3,!1),i=I(t,"type",3,"button"),u=st(t,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const M=fa.create({id:X(()=>c()),disabled:X(()=>v()??!1),ref:X(()=>d(),B=>d(B))}),h=Q(()=>qe(u,M.props,{type:i()}));ha(l,{get id(){return c()},get ref(){return M.opts.ref},children:(B,x)=>{var _=H(),Y=C(_);{var m=T=>{var J=H(),se=C(J);we(se,()=>t.child,()=>({props:e(h)})),s(T,J)},g=T=>{var J=Ta();Ve(J,()=>({...e(h)}));var se=f(J);we(se,()=>t.children??He),o(J),s(T,J)};ne(Y,T=>{t.child?T(m):T(g,!1)})}s(B,_)},$$slots:{default:!0}}),ze()}var za=E('<span class="chip svelte-84vb17"> <!></span>'),Ia=E('<div><span class="entity-title svelte-84vb17"> </span> <span class="entity-meta svelte-84vb17"><span class="entity-type-badge svelte-84vb17"> </span> <span class="entity-repo svelte-84vb17"> </span></span></div>'),Oa=E('<div class="dropdown svelte-84vb17"></div>'),Fa=E('<div class="autocomplete svelte-84vb17"><div class="input-row svelte-84vb17"><!> <input class="ac-input svelte-84vb17" type="text" placeholder="Search entities..."/></div> <!></div>');function La(l,t){Ae(t,!0);let r=I(t,"multi",3,!1),c=Me(""),d=Me(0),v;const i=Q(()=>At.repos.flatMap(p=>p.entities.map(b=>({id:b.id,title:b.title,entityType:b.entityType,repo:p.name})))),u=Q(()=>()=>{const p=e(c).toLowerCase().trim();return p?e(i).filter(b=>b.title.toLowerCase().includes(p)||b.id.toLowerCase().includes(p)).slice(0,20):e(i).slice(0,20)}),M=Array.isArray(t.value)?[...t.value]:t.value?[t.value]:[];let h=Me(ht(M));wt(()=>{$t().then(()=>v?.focus())});function B(p){r()?(e(h).includes(p)||P(h,[...e(h),p],!0),P(c,""),P(d,0),v?.focus()):t.onselect(p)}function x(p){P(h,e(h).filter(b=>b!==p),!0)}function _(){e(h).length===M.length&&e(h).every((b,ce)=>b===M[ce])?t.oncancel():t.onselect(e(h))}function Y(p){const b=e(u)();p.key==="ArrowDown"?(p.preventDefault(),P(d,Math.min(e(d)+1,b.length-1),!0)):p.key==="ArrowUp"?(p.preventDefault(),P(d,Math.max(e(d)-1,0),!0)):p.key==="Enter"?(p.preventDefault(),b.length>0?B(b[e(d)].id):r()&&_()):p.key==="Escape"?r()&&e(h).length>0?_():t.oncancel():p.key==="Backspace"&&!e(c)&&r()&&e(h).length>0&&P(h,e(h).slice(0,-1),!0)}var m=Fa(),g=f(m),T=f(g);{var J=p=>{var b=H(),ce=C(b);Ee(ce,17,()=>e(h),De,($,re)=>{var K=za(),oe=f(K),de=U(oe);Le(de,{variant:"ghost",size:"icon",class:"chip-remove",onclick:()=>x(e(re)),children:(S,y)=>{Re();var w=yt("×");s(S,w)},$$slots:{default:!0}}),o(K),ae(()=>G(oe,`${e(re)??""} `)),s($,K)}),s(p,b)};ne(T,p=>{r()&&p(J)})}var se=U(T,2);kt(se),xt(se,p=>v=p,()=>v),o(g);var Ie=U(g,2);{var R=p=>{var b=Oa();Ee(b,21,()=>e(u)(),De,(ce,$,re)=>{var K=Ia();let oe;var de=f(K),S=f(de,!0);o(de);var y=U(de,2),w=f(y),O=f(w,!0);o(w);var j=U(w,2),Ne=f(j,!0);o(j),o(y),o(K),ae(()=>{oe=Tt(K,1,"dropdown-item svelte-84vb17",null,oe,{highlighted:re===e(d)}),G(S,e($).title),G(O,e($).entityType),G(Ne,e($).repo)}),Ce("mousedown",K,Ye=>{Ye.preventDefault(),B(e($).id)}),Xe("mouseenter",K,()=>P(d,re,!0)),s(ce,K)}),o(b),s(p,b)},ke=Q(()=>e(u)().length>0);ne(Ie,p=>{e(ke)&&p(R)})}o(m),Ce("keydown",se,Y),Xe("blur",se,()=>{setTimeout(()=>{r()&&e(h).length>0?_():r()||t.oncancel()},150)}),zt(se,()=>e(c),p=>P(c,p)),s(l,m),ze()}Dt(["keydown","mousedown"]);const Va=Ca,Na=Aa,Ra=pa,Ka=Da,Et=Pa,qa=Sa;function pt(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M12 4v16"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}],["path",{d:"M9 20h6"}]];We(l,Te({name:"type"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function _t(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]];We(l,Te({name:"calendar"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function mt(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"1"}]];We(l,Te({name:"circle-dot"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function gt(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];We(l,Te({name:"link"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function Ha(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}]];We(l,Te({name:"tag"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}function Ua(l,t){const r=Ue(t,["children","$$slots","$$events","$$legacy"]);const c=[["path",{d:"m15 18-6-6 6-6"}]];We(l,Te({name:"chevron-left"},()=>r,{get iconNode(){return c},children:(d,v)=>{var i=H(),u=C(i);Be(u,t,"default",{}),s(d,i)},$$slots:{default:!0}}))}var Wa=E('<span class="ip-menu-check svelte-x7sio8"><!></span>'),Ba=E('<span class="ip-menu-item-icon svelte-x7sio8"><!></span> <span> </span> <!>',1),Ya=E('<span class="ip-menu-item-icon svelte-x7sio8"><!></span> <span>Remove</span>',1),ja=E("<!> <!> <!>",1),Ja=E("<!> <!>",1),Ga=E('<input class="ip-edit-input svelte-x7sio8" type="text"/>'),Qa=E('<span class="ip-status-dot svelte-x7sio8"></span> ',1),Xa=E('<div class="ip-status-wrap svelte-x7sio8"><div class="ip-status-value svelte-x7sio8"><span class="ip-status-dot svelte-x7sio8"></span> <span class="ip-status-text svelte-x7sio8"> </span></div> <div class="ip-status-dropdown svelte-x7sio8"></div></div>'),Za=E('<span class="ip-cal-wd svelte-x7sio8"> </span>'),$a=E('<div class="ip-cal-week svelte-x7sio8"></div>'),en=E('<div class="ip-cal-wrap svelte-x7sio8"><span class="ip-date-text svelte-x7sio8"> </span> <div class="ip-cal-dropdown svelte-x7sio8"><div class="ip-cal-header svelte-x7sio8"><!> <span class="ip-cal-title svelte-x7sio8"> </span> <!></div> <div class="ip-cal-weekdays svelte-x7sio8"></div> <!></div></div>'),tn=E('<span class="ip-badge svelte-x7sio8"> </span>'),an=E('<div class="ip-wikilink-group svelte-x7sio8"></div>'),nn=E('<div class="ip-status-value svelte-x7sio8"><span class="ip-status-dot svelte-x7sio8"></span> <span class="ip-status-text svelte-x7sio8"> </span></div>'),sn=E('<span class="ip-date-text svelte-x7sio8"> </span>'),rn=E('<a class="ip-url-link svelte-x7sio8" target="_blank" rel="noopener noreferrer"> </a>'),on=E('<span class="ip-text-value svelte-x7sio8"> </span>'),ln=E('<div><div class="ip-icon svelte-x7sio8"><!></div> <div class="ip-key svelte-x7sio8"> </div> <div class="ip-value svelte-x7sio8"><!></div></div>'),cn=E('<div class="ip-row ip-add-row svelte-x7sio8"><div class="ip-icon svelte-x7sio8"><!></div> <div class="ip-key svelte-x7sio8"><input class="ip-add-key-input svelte-x7sio8" type="text" placeholder="Property name"/></div> <div class="ip-value svelte-x7sio8"></div></div>'),dn=E("<!> <span>Add property</span>",1),un=E('<div class="inline-properties svelte-x7sio8"><!> <!></div>');function zn(l,t){Ae(t,!0);let r=I(t,"editable",3,!1);const c=[{type:"text",label:"Text"},{type:"date",label:"Date"},{type:"status",label:"Status"},{type:"wikilink",label:"Link"}],d=["active","inactive","in-progress","completed","draft","archived","current","former","won","lost","open","closed"];let v=Me(null),i=Me(!1),u=Me(""),M=Me(void 0);function h(n){switch(n.toLowerCase()){case"active":case"current":case"won":return"#3ecf8e";case"in-progress":case"open":return"#f0c246";case"inactive":case"lost":case"closed":case"former":return"#e54d4d";default:return"#5c5c66"}}function B(n){for(const a of At.repos){const W=a.entities.find(ue=>ue.id===n);if(W){ia(`/${a.name}/${W.entityType}/${W.id}`);return}}}function x(n){return typeof n.value=="string"?n.value:n.value[0]}function _(n){return/^https?:\/\//.test(n)}function Y(n){try{return new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return n}}let m=Me(ht(new Date().getFullYear())),g=Me(ht(new Date().getMonth()));const T=["Su","Mo","Tu","We","Th","Fr","Sa"],J=["January","February","March","April","May","June","July","August","September","October","November","December"];function se(n,a){const W=new Date(n,a,1).getDay(),ue=new Date(n,a+1,0).getDate(),xe=new Date(n,a,0).getDate(),le=[];let ie=[];for(let ge=W-1;ge>=0;ge--){const je=xe-ge,Oe=a===0?11:a-1,ot=a===0?n-1:n;ie.push({day:je,month:Oe,year:ot,outside:!0})}for(let ge=1;ge<=ue;ge++)ie.push({day:ge,month:a,year:n,outside:!1}),ie.length===7&&(le.push(ie),ie=[]);if(ie.length>0){const ge=a===11?0:a+1,je=a===11?n+1:n;let Oe=1;for(;ie.length<7;)ie.push({day:Oe++,month:ge,year:je,outside:!0});le.push(ie)}return le}function Ie(n){const a=new Date;return n.day===a.getDate()&&n.month===a.getMonth()&&n.year===a.getFullYear()}function R(n,a){const W=a.slice(0,10).split("-");return n.year===+W[0]&&n.month===+W[1]-1&&n.day===+W[2]}function ke(){e(g)===0?(P(g,11),at(m,-1)):at(g,-1)}function p(){e(g)===11?(P(g,0),at(m)):at(g)}function b(n){try{const a=n.slice(0,10).split("-");P(m,+a[0]),P(g,+a[1]-1)}catch{const a=new Date;P(m,a.getFullYear(),!0),P(g,a.getMonth(),!0)}}function ce(n){requestAnimationFrame(()=>{n.focus(),n.select()})}function $(n){!r()||n.type==="badge"||(n.type==="date"&&b(x(n)),P(v,n.key,!0))}function re(n,a){t.onedit&&t.onedit(n,a),P(v,null)}function K(n,a){const W=`${a.year}-${String(a.month+1).padStart(2,"0")}-${String(a.day).padStart(2,"0")}`;t.onedit&&t.onedit(n,W),P(v,null)}function oe(n,a){t.ontypechange&&t.ontypechange(n,a)}function de(n){P(v,null),t.onremove&&t.onremove(n)}function S(){P(i,!0),P(u,""),requestAnimationFrame(()=>e(M)?.focus())}function y(){const n=e(u).trim();n&&t.onadd&&t.onadd(n,""),P(i,!1),P(u,"")}function w(){P(i,!1),P(u,"")}function O(n){n.key==="Enter"?(n.preventDefault(),y()):n.key==="Escape"&&w()}var j=un();Xe("click",ea,()=>{P(v,null)});var Ne=f(j);Ee(Ne,17,()=>t.properties,n=>n.key,(n,a)=>{const W=Q(()=>e(v)===e(a).key);var ue=ln();let xe;var le=f(ue),ie=f(le);{var ge=L=>{var F=H(),V=C(F);Fe(V,()=>Va,(ve,ye)=>{ye(ve,{children:(_e,Pe)=>{var fe=Ja(),A=C(fe);Fe(A,()=>Na,(z,k)=>{k(z,{class:"ip-icon-trigger",children:(D,N)=>{var q=H(),pe=C(q);{var ee=Z=>{_t(Z,{size:14})},be=Z=>{mt(Z,{size:14})},Je=Z=>{gt(Z,{size:14})},Ze=Z=>{pt(Z,{size:14})};ne(pe,Z=>{e(a).type==="date"?Z(ee):e(a).type==="status"?Z(be,1):e(a).type==="wikilink"?Z(Je,2):Z(Ze,!1)})}s(D,q)},$$slots:{default:!0}})});var me=U(A,2);Fe(me,()=>Ra,(z,k)=>{k(z,{children:(D,N)=>{var q=H(),pe=C(q);Fe(pe,()=>Ka,(ee,be)=>{be(ee,{class:"ip-menu-content",sideOffset:4,align:"start",children:(Je,Ze)=>{var Z=ja(),lt=C(Z);Ee(lt,17,()=>c,De,(Qe,he)=>{var $e=H(),Pt=C($e);Fe(Pt,()=>Et,(et,tt)=>{tt(et,{class:"ip-menu-item",onSelect:()=>oe(e(a).key,e(he).type),children:(ct,yn)=>{var bt=Ba(),dt=C(bt),Ht=f(dt);{var Ut=te=>{pt(te,{size:13})},Wt=te=>{_t(te,{size:13})},Bt=te=>{mt(te,{size:13})},Yt=te=>{gt(te,{size:13})};ne(Ht,te=>{e(he).type==="text"?te(Ut):e(he).type==="date"?te(Wt,1):e(he).type==="status"?te(Bt,2):e(he).type==="wikilink"&&te(Yt,3)})}o(dt);var ut=U(dt,2),jt=f(ut,!0);o(ut);var Jt=U(ut,2);{var Gt=te=>{var vt=Wa(),Qt=f(vt);wa(Qt,{size:12}),o(vt),s(te,vt)};ne(Jt,te=>{e(a).type===e(he).type&&te(Gt)})}ae(()=>G(jt,e(he).label)),s(ct,bt)},$$slots:{default:!0}})}),s(Qe,$e)});var Ge=U(lt,2);Fe(Ge,()=>qa,(Qe,he)=>{he(Qe,{class:"ip-menu-sep"})});var qt=U(Ge,2);Fe(qt,()=>Et,(Qe,he)=>{he(Qe,{class:"ip-menu-item ip-menu-destructive",onSelect:()=>de(e(a).key),children:($e,Pt)=>{var et=Ya(),tt=C(et),ct=f(tt);sa(ct,{size:13}),o(tt),Re(2),s($e,et)},$$slots:{default:!0}})}),s(Je,Z)},$$slots:{default:!0}})}),s(D,q)},$$slots:{default:!0}})}),s(_e,fe)},$$slots:{default:!0}})}),s(L,F)},je=L=>{var F=H(),V=C(F);{var ve=A=>{_t(A,{size:14})},ye=A=>{mt(A,{size:14})},_e=A=>{gt(A,{size:14})},Pe=A=>{Ha(A,{size:14})},fe=A=>{pt(A,{size:14})};ne(V,A=>{e(a).type==="date"?A(ve):e(a).type==="status"?A(ye,1):e(a).type==="wikilink"?A(_e,2):e(a).type==="badge"?A(Pe,3):A(fe,!1)})}s(L,F)};ne(ie,L=>{r()&&e(a).type!=="badge"?L(ge):L(je,!1)})}o(le);var Oe=U(le,2),ot=f(Oe,!0);o(Oe);var it=U(Oe,2),Ft=f(it);{var Lt=L=>{var F=Ga();kt(F),ka(F,V=>ce?.(V)),ae(V=>ra(F,V),[()=>x(e(a))]),Xe("blur",F,V=>{const ve=V.currentTarget.value;ve!==x(e(a))&&t.onedit?.(e(a).key,ve),P(v,null)}),Ce("keydown",F,V=>{V.key==="Enter"?V.currentTarget.blur():V.key==="Escape"&&(V.currentTarget.value=x(e(a)),P(v,null))}),s(L,F)},Vt=L=>{var F=Xa(),V=f(F),ve=f(V);let ye;var _e=U(ve,2),Pe=f(_e,!0);o(_e),o(V);var fe=U(V,2);Ee(fe,21,()=>d,De,(A,me)=>{{let z=Q(()=>x(e(a))===e(me)?"selected":"");Le(A,{variant:"ghost",get class(){return`ip-status-option ${e(z)??""}`},onclick:()=>re(e(a).key,e(me)),children:(k,D)=>{var N=Qa(),q=C(N);let pe;var ee=U(q);ae(be=>{pe=ft(q,"",pe,be),G(ee,` ${e(me)??""}`)},[()=>({background:h(e(me))})]),s(k,N)},$$slots:{default:!0}})}}),o(fe),o(F),ae((A,me)=>{ye=ft(ve,"",ye,A),G(Pe,me)},[()=>({background:h(x(e(a)))}),()=>x(e(a))]),Ce("click",F,A=>A.stopPropagation()),s(L,F)},Nt=L=>{var F=en(),V=f(F),ve=f(V,!0);o(V);var ye=U(V,2),_e=f(ye),Pe=f(_e);Le(Pe,{variant:"ghost",size:"icon",class:"ip-cal-nav",onclick:ke,children:(D,N)=>{Ua(D,{size:14})},$$slots:{default:!0}});var fe=U(Pe,2),A=f(fe);o(fe);var me=U(fe,2);Le(me,{variant:"ghost",size:"icon",class:"ip-cal-nav",onclick:p,children:(D,N)=>{_a(D,{size:14})},$$slots:{default:!0}}),o(_e);var z=U(_e,2);Ee(z,21,()=>T,De,(D,N)=>{var q=Za(),pe=f(q,!0);o(q),ae(()=>G(pe,e(N))),s(D,q)}),o(z);var k=U(z,2);Ee(k,17,()=>se(e(m),e(g)),De,(D,N)=>{var q=$a();Ee(q,21,()=>e(N),De,(pe,ee)=>{{let be=Q(()=>e(ee).outside?"outside":""),Je=Q(()=>Ie(e(ee))?"today":""),Ze=Q(()=>R(e(ee),x(e(a)))?"selected":"");Le(pe,{variant:"ghost",get class(){return`ip-cal-day ${e(be)??""} ${e(Je)??""} ${e(Ze)??""}`},onclick:()=>K(e(a).key,e(ee)),children:(Z,lt)=>{Re();var Ge=yt();ae(()=>G(Ge,e(ee).day)),s(Z,Ge)},$$slots:{default:!0}})}}),o(q),s(D,q)}),o(ye),o(F),ae(D=>{G(ve,D),G(A,`${J[e(g)]??""} ${e(m)??""}`)},[()=>Y(x(e(a)))]),Ce("click",F,D=>D.stopPropagation()),s(L,F)},Rt=L=>{{let F=Q(()=>Array.isArray(e(a).value));La(L,{get value(){return e(a).value},get multi(){return e(F)},onselect:V=>{t.onedit?.(e(a).key,V),P(v,null)},oncancel:()=>{P(v,null)}})}},Kt=L=>{var F=H(),V=C(F);{var ve=z=>{var k=tn(),D=f(k,!0);o(k),ae(N=>G(D,N),[()=>x(e(a))]),s(z,k)},ye=z=>{var k=an();Ee(k,21,()=>Array.isArray(e(a).value)?e(a).value:[e(a).value],De,(D,N)=>{Le(D,{variant:"ghost",class:"ip-wikilink-chip",onclick:q=>{q.stopPropagation(),B(e(N))},children:(q,pe)=>{Re();var ee=yt();ae(()=>G(ee,e(N))),s(q,ee)},$$slots:{default:!0}})}),o(k),s(z,k)},_e=z=>{var k=nn(),D=f(k);let N;var q=U(D,2),pe=f(q,!0);o(q),o(k),ae((ee,be)=>{N=ft(D,"",N,ee),G(pe,be)},[()=>({background:h(x(e(a)))}),()=>x(e(a))]),s(z,k)},Pe=z=>{var k=sn(),D=f(k,!0);o(k),ae(N=>G(D,N),[()=>Y(x(e(a)))]),s(z,k)},fe=z=>{var k=rn(),D=f(k,!0);o(k),ae((N,q)=>{oa(k,"href",N),G(D,q)},[()=>x(e(a)),()=>x(e(a))]),Ce("click",k,N=>N.stopPropagation()),s(z,k)},A=Q(()=>_(x(e(a)))),me=z=>{var k=on(),D=f(k,!0);o(k),ae(N=>G(D,N),[()=>x(e(a))]),s(z,k)};ne(V,z=>{e(a).type==="badge"?z(ve):e(a).type==="wikilink"?z(ye,1):e(a).type==="status"?z(_e,2):e(a).type==="date"?z(Pe,3):e(A)?z(fe,4):z(me,!1)})}s(L,F)};ne(Ft,L=>{e(W)&&e(a).type==="text"?L(Lt):e(W)&&e(a).type==="status"?L(Vt,1):e(W)&&e(a).type==="date"?L(Nt,2):e(W)&&e(a).type==="wikilink"?L(Rt,3):L(Kt,!1)})}o(it),o(ue),ae(()=>{xe=Tt(ue,1,"ip-row svelte-x7sio8",null,xe,{"ip-focused":e(W)}),G(ot,e(a).key)}),Ce("click",le,L=>L.stopPropagation()),Ce("click",it,L=>{L.stopPropagation(),$(e(a))}),s(n,ue)});var Ye=U(Ne,2);{var It=n=>{var a=cn(),W=f(a),ue=f(W);St(ue,{size:14}),o(W);var xe=U(W,2),le=f(xe);kt(le),xt(le,ie=>P(M,ie),()=>e(M)),o(xe),Re(2),o(a),Ce("keydown",le,O),Xe("blur",le,w),zt(le,()=>e(u),ie=>P(u,ie)),s(n,a)},Ot=n=>{Le(n,{variant:"ghost",class:"ip-add-btn",onclick:a=>{a.stopPropagation(),S()},children:(a,W)=>{var ue=dn(),xe=C(ue);St(xe,{size:14}),Re(2),s(a,ue)},$$slots:{default:!0}})};ne(Ye,n=>{e(i)?n(It):r()&&n(Ot,1)})}o(j),s(l,j),ze()}Dt(["click","keydown"]);var vn=E('<div class="editor-wrap svelte-ok7wy5"><div class="cm-container svelte-ok7wy5"></div></div>');function In(l,t){Ae(t,!0);let r=I(t,"readonly",3,!0),c=I(t,"resetKey",3,0);const d=ta("theme");let v,i=null,u=t.content,M=!1,h=null;function B(m,g){return m.theme({"&":{backgroundColor:"transparent",color:"var(--color-text-primary)",fontSize:"15px",fontFamily:"var(--font-sans)"},".cm-content":{padding:"32px 40px",fontFamily:"var(--font-sans)",caretColor:"var(--color-accent)",lineHeight:"1.6"},".cm-cursor":{borderLeftColor:"var(--color-accent)"},".cm-selectionBackground":{backgroundColor:g?"rgba(110,110,232,0.2)":"rgba(110,110,232,0.15)"},"&.cm-focused .cm-selectionBackground":{backgroundColor:g?"rgba(110,110,232,0.3)":"rgba(110,110,232,0.2)"},".cm-gutters":{display:"none"},".cm-activeLine":{backgroundColor:"transparent"},".cm-line":{padding:"0"},".cm-header-1":{fontSize:"22px",fontWeight:"600"},".cm-header-2":{fontSize:"16px",fontWeight:"600"},".cm-header-3":{fontSize:"15px",fontWeight:"600"},".cm-formatting":{color:"var(--color-text-tertiary)",opacity:"0.5"},".cm-link":{color:"var(--color-link)",textDecoration:"none"}},{dark:g})}async function x(m){h=m??null,i&&(i.destroy(),i=null);const{EditorState:g}=await Se(async()=>{const{EditorState:S}=await import("./Cs5oz2oJ.js");return{EditorState:S}},[],import.meta.url),{EditorView:T,keymap:J}=await Se(async()=>{const{EditorView:S,keymap:y}=await import("./BVBRzmeQ.js").then(w=>w.i);return{EditorView:S,keymap:y}},__vite__mapDeps([0,1]),import.meta.url),{markdown:se}=await Se(async()=>{const{markdown:S}=await import("./B1y7Wy5O.js");return{markdown:S}},__vite__mapDeps([2,1,0,3,4,5]),import.meta.url),{syntaxHighlighting:Ie,HighlightStyle:R}=await Se(async()=>{const{syntaxHighlighting:S,HighlightStyle:y}=await import("./D2aTbzFm.js");return{syntaxHighlighting:S,HighlightStyle:y}},__vite__mapDeps([3,4,1,0]),import.meta.url),{tags:ke}=await Se(async()=>{const{tags:S}=await import("./BXuvR8Ks.js").then(y=>y.i);return{tags:S}},[],import.meta.url),{livePreviewPlugin:p,livePreviewTheme:b}=await Se(async()=>{const{livePreviewPlugin:S,livePreviewTheme:y}=await import("./BPUy9_sS.js");return{livePreviewPlugin:S,livePreviewTheme:y}},__vite__mapDeps([6,0,1,3,4]),import.meta.url),ce=d.current==="dark",$=B(T,ce),re=R.define([{tag:ke.processingInstruction,color:"var(--color-text-tertiary)",opacity:"0.7"}]),K=[se(),$,Ie(re),p,b,T.lineWrapping];r()&&K.push(g.readOnly.of(!0));let oe=!1;if(m)try{const{collab:S}=await Se(async()=>{const{collab:O}=await import("./DWSjaG46.js");return{collab:O}},__vite__mapDeps([7,8,9]),import.meta.url),{auth:y}=await Se(async()=>{const{auth:O}=await import("./ByFfmBEu.js").then(j=>j.C);return{auth:O}},__vite__mapDeps([10,8,11,12]),import.meta.url),w=S.connect(m);if(w&&S.status!=="unavailable"){const O=y.user?.displayName??"Anonymous",j=getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim()||"#4f8ef7";w.awareness.setLocalStateField("user",{name:O,color:j});const{yCollab:Ne}=await Se(async()=>{const{yCollab:Ye}=await import("./CaITTL5o.js");return{yCollab:Ye}},__vite__mapDeps([13,9,0,1]),import.meta.url);K.push(Ne(w.yText,w.awareness)),h=m,oe=!0}}catch{}t.onchange&&!oe&&K.push(T.updateListener.of(S=>{if(S.docChanged&&!M){const y=S.state.doc.toString();u=y,t.onchange(y)}})),K.push(T.domEventHandlers({click(S){const y=S.target;if(t.onwikilinkclick){const O=y.closest(".cm-live-wikilink");if(O){S.preventDefault();const j=O.textContent?.replace(/^\[{1,2}|\]{1,2}$/g,"").trim();return j&&t.onwikilinkclick(j),!0}}const w=y.closest(".cm-live-link");if(w){const O=w.getAttribute("data-href");if(O)return S.preventDefault(),window.open(O,"_blank","noopener,noreferrer"),!0}return!1}})),t.onsave&&K.push(J.of([{key:"Mod-s",run:()=>(t.onsave(),!0)}]));const de=g.create({doc:oe?"":t.content,extensions:K});i=new T({state:de,parent:v}),u=t.content}aa(()=>{x(t.collabDocName)}),wt(()=>{const m=t.collabDocName;m!==h&&v&&x(m)}),wt(()=>{if(c(),i&&!h&&t.content!==u){u=t.content;const m=v.closest(".document-scroll"),g=m?.scrollTop??0;M=!0,i.dispatch({changes:{from:0,to:i.state.doc.length,insert:t.content}}),M=!1,m&&requestAnimationFrame(()=>{m.scrollTop=g})}}),na(()=>{i?.destroy()});var _=vn(),Y=f(_);xt(Y,m=>v=m,()=>v),o(_),s(l,_),ze()}const fn=/^\d{4}-\d{2}-\d{2}/,pn=new Set(["active","inactive","in-progress","completed","draft","archived","current","former","contractor","client","partner","won","lost","open","closed"]),_n=new Set(["entity_type","format"]),mn=new Set(["entity_id","created_at","updated_at","created_by","updated_by"]);function On(l,t){const r=[];for(const[c,d]of Object.entries(l)){if(mn.has(c)||d==null)continue;const v=gn(c,d);v&&r.push(v)}return r}function gn(l,t){if(_n.has(l))return{key:l,value:String(t).toUpperCase(),type:"badge"};if(l==="status")return{key:l,value:String(t),type:"status"};if(Array.isArray(t)){const d=t.map(String),v=d.some(u=>/^\[\[.+?\]\]$/.test(u)),i=d.map(u=>{const M=u.match(/^\[\[(.+?)\]\]$/);return M?M[1]:u});return v||i.every(u=>Mt(u))?{key:l,value:i,type:"wikilink"}:{key:l,value:d.join(", "),type:"text"}}const r=String(t),c=r.match(/^\[\[(.+?)\]\]$/);return c?{key:l,value:c[1],type:"wikilink"}:fn.test(r)?{key:l,value:r,type:"date"}:pn.has(r.toLowerCase())?{key:l,value:r,type:"status"}:Mt(r)&&!r.includes(" ")?{key:l,value:r,type:"wikilink"}:{key:l,value:r,type:"text"}}function Mt(l){return/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(l)&&l.includes("-")}export{In as C,zn as I,On as t};
|