Files
Stackq/build/client/_app/immutable/chunks/DRlIEfz1.js
T

174 lines
72 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var qr=Object.defineProperty;var ar=e=>{throw TypeError(e)};var Zr=(e,t,n)=>t in e?qr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yt=(e,t,n)=>Zr(e,typeof t!="symbol"?t+"":t,n),lr=(e,t,n)=>t.has(e)||ar("Cannot "+n);var P=(e,t,n)=>(lr(e,t,"read from private field"),n?n.call(e):t.get(e)),N=(e,t,n)=>t.has(e)?ar("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),le=(e,t,n,r)=>(lr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import"./Bzak7iHL.js";import{A as at,h as ft,r as ht,a as u,G as lt,T as gt,b as Z,u as F,g as l,I as Et,ai as Rn,av as Zt,F as L,c as B,f as A,C as R,bh as Hn,a1 as Jr,a2 as Qr,D as z,E as X,az as wt}from"./Dexp9pM5.js";import{c as Gr,o as $r,s as Pt}from"./DZmckTjd.js";import{i as Ot}from"./CRDN6Mh7.js";import{e as to,C as Vn,u as Ar,i as eo,w as cr,g as no,F as ro,S as dr,E as oo,f as io,T as so,n as pe,M as ao,h as lo,j as co,k as uo,l as fo,m as _n,P as ho,o as Bn,D as go,a as vo,b as mo,c as wo,I as po,d as yo,p as ur}from"./iABcLwh6.js";import{c as S}from"./25AjRaeI.js";import{h as xo,B as Ne}from"./BxPgF2w2.js";import{s as Jt,b as bo,c as Mn,d as Po,f as _o,g as I,m as de,h as Kn,a as Oo,e as So}from"./61AlszRR.js";import{a as Tt,s as st,c as $t,r as Ao,d as Tn,e as Co}from"./BKSreT2u.js";import{p as y,b as Se,r as dt,s as St}from"./jOLfEXYH.js";import{B as Fo}from"./B12dZE2q.js";import{a as Eo,C as Do}from"./CsnJU1X_.js";var Ro=Z('<div data-slot="table-container" class="relative w-full overflow-x-auto"><table><!></table></div>');function Bo(e,t){at(t,!0);let n=y(t,"ref",15,null),r=dt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=Ro(),s=ft(o);Tt(s,a=>({"data-slot":"table",class:a,...r}),[()=>$t("w-full caption-bottom text-sm",t.class)]);var i=ft(s);st(i,()=>t.children??gt),ht(s),Se(s,a=>n(a),()=>n()),ht(o),u(e,o),lt()}var Mo=Z("<tbody><!></tbody>");function To(e,t){at(t,!0);let n=y(t,"ref",15,null),r=dt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=Mo();Tt(o,i=>({"data-slot":"table-body",class:i,...r}),[()=>$t("[&_tr:last-child]:border-0",t.class)]);var s=ft(o);st(s,()=>t.children??gt),ht(o),Se(o,i=>n(i),()=>n()),u(e,o),lt()}var Io=Z("<td><!></td>");function xt(e,t){at(t,!0);let n=y(t,"ref",15,null),r=dt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=Io();Tt(o,i=>({"data-slot":"table-cell",class:i,...r}),[()=>$t("bg-clip-padding p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0",t.class)]);var s=ft(o);st(s,()=>t.children??gt),ht(o),Se(o,i=>n(i),()=>n()),u(e,o),lt()}var ko=Z("<th><!></th>");function _t(e,t){at(t,!0);let n=y(t,"ref",15,null),r=dt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=ko();Tt(o,i=>({"data-slot":"table-head",class:i,...r}),[()=>$t("text-foreground h-10 bg-clip-padding px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0",t.class)]);var s=ft(o);st(s,()=>t.children??gt),ht(o),Se(o,i=>n(i),()=>n()),u(e,o),lt()}var Wo=Z("<thead><!></thead>");function Lo(e,t){at(t,!0);let n=y(t,"ref",15,null),r=dt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=Wo();Tt(o,i=>({"data-slot":"table-header",class:i,...r}),[()=>$t("[&_tr]:border-b",t.class)]);var s=ft(o);st(s,()=>t.children??gt),ht(o),Se(o,i=>n(i),()=>n()),u(e,o),lt()}var No=Z("<tr><!></tr>");function In(e,t){at(t,!0);let n=y(t,"ref",15,null),r=dt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=No();Tt(o,i=>({"data-slot":"table-row",class:i,...r}),[()=>$t("hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t.class)]);var s=ft(o);st(s,()=>t.children??gt),ht(o),Se(o,i=>n(i),()=>n()),u(e,o),lt()}function zo(e){return typeof e=="function"}function fr(e){return zo(e)?e():e}var jt,xe,be,Pe,qt,wn,pn,_e;class Ho{constructor(t,n={box:"border-box"}){N(this,jt,{width:0,height:0});N(this,xe,!1);N(this,be);N(this,Pe);N(this,qt);N(this,wn,F(()=>{var t;return(t=l(P(this,_e)))==null||t(),this.getSize().width}));N(this,pn,F(()=>{var t;return(t=l(P(this,_e)))==null||t(),this.getSize().height}));N(this,_e,F(()=>{const t=fr(P(this,Pe));if(t)return Gr(n=>{if(!P(this,qt))return;const r=new(P(this,qt)).ResizeObserver(o=>{le(this,xe,!0);for(const s of o){const i=P(this,be).box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(i)?i:[i];P(this,jt).width=a.reduce((c,d)=>Math.max(c,d.inlineSize),0),P(this,jt).height=a.reduce((c,d)=>Math.max(c,d.blockSize),0)}n()});return r.observe(t),()=>{le(this,xe,!1),r.disconnect()}})}));le(this,qt,n.window??to),le(this,be,n),le(this,Pe,t),le(this,jt,{width:0,height:0})}calculateSize(){const t=fr(P(this,Pe));if(!t||!P(this,qt))return;const n=t.offsetWidth,r=t.offsetHeight;if(P(this,be).box==="border-box")return{width:n,height:r};const o=P(this,qt).getComputedStyle(t),s=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),i=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom),a=parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth),c=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),d=n-s-a,h=r-i-c;return{width:d,height:h}}getSize(){return P(this,xe)?P(this,jt):this.calculateSize()??P(this,jt)}get current(){var t;return(t=l(P(this,_e)))==null||t(),this.getSize()}get width(){return l(P(this,wn))}get height(){return l(P(this,pn))}}jt=new WeakMap,xe=new WeakMap,be=new WeakMap,Pe=new WeakMap,qt=new WeakMap,wn=new WeakMap,pn=new WeakMap,_e=new WeakMap;const Vo=["top","right","bottom","left"],Qt=Math.min,Rt=Math.max,fn=Math.round,un=Math.floor,zt=e=>({x:e,y:e}),Ko={left:"right",right:"left",bottom:"top",top:"bottom"},Uo={start:"end",end:"start"};function Wn(e,t,n){return Rt(e,Qt(t,n))}function Kt(e,t){return typeof e=="function"?e(t):e}function Ut(e){return e.split("-")[0]}function Ae(e){return e.split("-")[1]}function Un(e){return e==="x"?"y":"x"}function Yn(e){return e==="y"?"height":"width"}const Yo=new Set(["top","bottom"]);function Nt(e){return Yo.has(Ut(e))?"y":"x"}function Xn(e){return Un(Nt(e))}function Xo(e,t,n){n===void 0&&(n=!1);const r=Ae(e),o=Xn(e),s=Yn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=hn(i)),[i,hn(i)]}function jo(e){const t=hn(e);return[Ln(e),t,Ln(t)]}function Ln(e){return e.replace(/start|end/g,t=>Uo[t])}const hr=["left","right"],gr=["right","left"],qo=["top","bottom"],Zo=["bottom","top"];function Jo(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:hr:t?hr:gr;case"left":case"right":return t?qo:Zo;default:return[]}}function Qo(e,t,n,r){const o=Ae(e);let s=Jo(Ut(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ln)))),s}function hn(e){return e.replace(/left|right|bottom|top/g,t=>Ko[t])}function Go(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cr(e){return typeof e!="number"?Go(e):{top:e,right:e,bottom:e,left:e}}function gn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function vr(e,t,n){let{reference:r,floating:o}=e;const s=Nt(t),i=Xn(t),a=Yn(i),c=Ut(t),d=s==="y",h=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let v;switch(c){case"top":v={x:h,y:r.y-o.height};break;case"bottom":v={x:h,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:g};break;case"left":v={x:r.x-o.width,y:g};break;default:v={x:r.x,y:r.y}}switch(Ae(t)){case"start":v[i]-=f*(n&&d?-1:1);break;case"end":v[i]+=f*(n&&d?-1:1);break}return v}async function $o(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:f=!1,padding:v=0}=Kt(t,e),m=Cr(v),w=a[f?g==="floating"?"reference":"floating":g],x=gn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:c})),O=g==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=gn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:C,strategy:c}):O);return{top:(x.top-k.top+m.top)/b.y,bottom:(k.bottom-x.bottom+m.bottom)/b.y,left:(x.left-k.left+m.left)/b.x,right:(k.right-x.right+m.right)/b.x}}const ti=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:g}=vr(d,r,c),f=r,v={},m=0;for(let w=0;w<a.length;w++){var p;const{name:x,fn:O}=a[w],{x:C,y:b,data:k,reset:M}=await O({x:h,y:g,initialPlacement:r,placement:f,strategy:o,middlewareData:v,rects:d,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:$o},elements:{reference:e,floating:t}});h=C??h,g=b??g,v={...v,[x]:{...v[x],...k}},M&&m<=50&&(m++,typeof M=="object"&&(M.placement&&(f=M.placement),M.rects&&(d=M.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):M.rects),{x:h,y:g}=vr(d,f,c)),w=-1)}return{x:h,y:g,placement:f,strategy:o,middlewareData:v}},ei=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:d,padding:h=0}=Kt(e,t)||{};if(d==null)return{};const g=Cr(h),f={x:n,y:r},v=Xn(o),m=Yn(v),p=await i.getDimensions(d),w=v==="y",x=w?"top":"left",O=w?"bottom":"right",C=w?"clientHeight":"clientWidth",b=s.reference[m]+s.reference[v]-f[v]-s.floating[m],k=f[v]-s.reference[v],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let E=M?M[C]:0;(!E||!await(i.isElement==null?void 0:i.isElement(M)))&&(E=a.floating[C]||s.floating[m]);const _=b/2-k/2,$=E/2-p[m]/2-1,j=Qt(g[x],$),ut=Qt(g[O],$),it=j,vt=E-p[m]-ut,rt=E/2-p[m]/2+_,nt=Wn(it,rt,vt),H=!c.arrow&&Ae(o)!=null&&rt!==nt&&s.reference[m]/2-(rt<it?j:ut)-p[m]/2<0,tt=H?rt<it?rt-it:rt-vt:0;return{[v]:f[v]+tt,data:{[v]:nt,centerOffset:rt-nt-tt,...H&&{alignmentOffset:tt}},reset:H}}}),ni=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:d}=t,{mainAxis:h=!0,crossAxis:g=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...w}=Kt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Ut(o),O=Nt(a),C=Ut(a)===a,b=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=f||(C||!p?[hn(a)]:jo(a)),M=m!=="none";!f&&M&&k.push(...Qo(a,p,m,b));const E=[a,...k],_=await c.detectOverflow(t,w),$=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&$.push(_[x]),g){const rt=Xo(o,i,b);$.push(_[rt[0]],_[rt[1]])}if(j=[...j,{placement:o,overflows:$}],!$.every(rt=>rt<=0)){var ut,it;const rt=(((ut=s.flip)==null?void 0:ut.index)||0)+1,nt=E[rt];if(nt&&(!(g==="alignment"?O!==Nt(nt):!1)||j.every(et=>Nt(et.placement)===O?et.overflows[0]>0:!0)))return{data:{index:rt,overflows:j},reset:{placement:nt}};let H=(it=j.filter(tt=>tt.overflows[0]<=0).sort((tt,et)=>tt.overflows[1]-et.overflows[1])[0])==null?void 0:it.placement;if(!H)switch(v){case"bestFit":{var vt;const tt=(vt=j.filter(et=>{if(M){const At=Nt(et.placement);return At===O||At==="y"}return!0}).map(et=>[et.placement,et.overflows.filter(At=>At>0).reduce((At,Fe)=>At+Fe,0)]).sort((et,At)=>et[1]-At[1])[0])==null?void 0:vt[0];tt&&(H=tt);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function mr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wr(e){return Vo.some(t=>e[t]>=0)}const ri=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Kt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=mr(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:wr(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=mr(i,n.floating);return{data:{escapedOffsets:a,escaped:wr(a)}}}default:return{}}}}},Fr=new Set(["left","top"]);async function oi(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ut(n),a=Ae(n),c=Nt(n)==="y",d=Fr.has(i)?-1:1,h=s&&c?-1:1,g=Kt(t,e);let{mainAxis:f,crossAxis:v,alignmentAxis:m}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return a&&typeof m=="number"&&(v=a==="end"?m*-1:m),c?{x:v*h,y:f*d}:{x:f*d,y:v*h}}const ii=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await oi(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},si=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:x=>{let{x:O,y:C}=x;return{x:O,y:C}}},...d}=Kt(e,t),h={x:n,y:r},g=await s.detectOverflow(t,d),f=Nt(Ut(o)),v=Un(f);let m=h[v],p=h[f];if(i){const x=v==="y"?"top":"left",O=v==="y"?"bottom":"right",C=m+g[x],b=m-g[O];m=Wn(C,m,b)}if(a){const x=f==="y"?"top":"left",O=f==="y"?"bottom":"right",C=p+g[x],b=p-g[O];p=Wn(C,p,b)}const w=c.fn({...t,[v]:m,[f]:p});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[v]:i,[f]:a}}}}}},ai=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:d=!0}=Kt(e,t),h={x:n,y:r},g=Nt(o),f=Un(g);let v=h[f],m=h[g];const p=Kt(a,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const C=f==="y"?"height":"width",b=s.reference[f]-s.floating[C]+w.mainAxis,k=s.reference[f]+s.reference[C]-w.mainAxis;v<b?v=b:v>k&&(v=k)}if(d){var x,O;const C=f==="y"?"width":"height",b=Fr.has(Ut(o)),k=s.reference[g]-s.floating[C]+(b&&((x=i.offset)==null?void 0:x[g])||0)+(b?0:w.crossAxis),M=s.reference[g]+s.reference[C]+(b?0:((O=i.offset)==null?void 0:O[g])||0)-(b?w.crossAxis:0);m<k?m=k:m>M&&(m=M)}return{[f]:v,[g]:m}}}},li=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...d}=Kt(e,t),h=await i.detectOverflow(t,d),g=Ut(o),f=Ae(o),v=Nt(o)==="y",{width:m,height:p}=s.floating;let w,x;g==="top"||g==="bottom"?(w=g,x=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=g,w=f==="end"?"top":"bottom");const O=p-h.top-h.bottom,C=m-h.left-h.right,b=Qt(p-h[w],O),k=Qt(m-h[x],C),M=!t.middlewareData.shift;let E=b,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=O),M&&!f){const j=Rt(h.left,0),ut=Rt(h.right,0),it=Rt(h.top,0),vt=Rt(h.bottom,0);v?_=m-2*(j!==0||ut!==0?j+ut:Rt(h.left,h.right)):E=p-2*(it!==0||vt!==0?it+vt:Rt(h.top,h.bottom))}await c({...t,availableWidth:_,availableHeight:E});const $=await i.getDimensions(a.floating);return m!==$.width||p!==$.height?{reset:{rects:!0}}:{}}}};function On(){return typeof window<"u"}function Ce(e){return Er(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vt(e){var t;return(t=(Er(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Er(e){return On()?e instanceof Node||e instanceof Bt(e).Node:!1}function kt(e){return On()?e instanceof Element||e instanceof Bt(e).Element:!1}function Ht(e){return On()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function pr(e){return!On()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}const ci=new Set(["inline","contents"]);function cn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ci.has(o)}const di=new Set(["table","td","th"]);function ui(e){return di.has(Ce(e))}const fi=[":popover-open",":modal"];function Sn(e){return fi.some(t=>{try{return e.matches(t)}catch{return!1}})}const hi=["transform","translate","scale","rotate","perspective"],gi=["transform","translate","scale","rotate","perspective","filter"],vi=["paint","layout","strict","content"];function jn(e){const t=qn(),n=kt(e)?Wt(e):e;return hi.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||gi.some(r=>(n.willChange||"").includes(r))||vi.some(r=>(n.contain||"").includes(r))}function mi(e){let t=Gt(e);for(;Ht(t)&&!Oe(t);){if(jn(t))return t;if(Sn(t))return null;t=Gt(t)}return null}function qn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wi=new Set(["html","body","#document"]);function Oe(e){return wi.has(Ce(e))}function Wt(e){return Bt(e).getComputedStyle(e)}function An(e){return kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gt(e){if(Ce(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pr(e)&&e.host||Vt(e);return pr(t)?t.host:t}function Dr(e){const t=Gt(e);return Oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ht(t)&&cn(t)?t:Dr(t)}function ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Dr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Bt(o);if(s){const a=Nn(i);return t.concat(i,i.visualViewport||[],cn(o)?o:[],a&&n?ze(a):[])}return t.concat(o,ze(o,[],n))}function Nn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rr(e){const t=Wt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ht(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=fn(n)!==s||fn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Zn(e){return kt(e)?e:e.contextElement}function ye(e){const t=Zn(e);if(!Ht(t))return zt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Rr(t);let i=(s?fn(n.width):n.width)/r,a=(s?fn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const pi=zt(0);function Br(e){const t=Bt(e);return!qn()||!t.visualViewport?pi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yi(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function ue(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Zn(e);let i=zt(1);t&&(r?kt(r)&&(i=ye(r)):i=ye(e));const a=yi(s,n,r)?Br(s):zt(0);let c=(o.left+a.x)/i.x,d=(o.top+a.y)/i.y,h=o.width/i.x,g=o.height/i.y;if(s){const f=Bt(s),v=r&&kt(r)?Bt(r):r;let m=f,p=Nn(m);for(;p&&r&&v!==m;){const w=ye(p),x=p.getBoundingClientRect(),O=Wt(p),C=x.left+(p.clientLeft+parseFloat(O.paddingLeft))*w.x,b=x.top+(p.clientTop+parseFloat(O.paddingTop))*w.y;c*=w.x,d*=w.y,h*=w.x,g*=w.y,c+=C,d+=b,m=Bt(p),p=Nn(m)}}return gn({width:h,height:g,x:c,y:d})}function Cn(e,t){const n=An(e).scrollLeft;return t?t.left+n:ue(Vt(e)).left+n}function Mr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Cn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function xi(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Vt(r),a=t?Sn(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},d=zt(1);const h=zt(0),g=Ht(r);if((g||!g&&!s)&&((Ce(r)!=="body"||cn(i))&&(c=An(r)),Ht(r))){const v=ue(r);d=ye(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}const f=i&&!g&&!s?Mr(i,c):zt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+h.x+f.x,y:n.y*d.y-c.scrollTop*d.y+h.y+f.y}}function bi(e){return Array.from(e.getClientRects())}function Pi(e){const t=Vt(e),n=An(e),r=e.ownerDocument.body,o=Rt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Rt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Cn(e);const a=-n.scrollTop;return Wt(r).direction==="rtl"&&(i+=Rt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const yr=25;function _i(e,t){const n=Bt(e),r=Vt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const h=qn();(!h||h&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const d=Cn(r);if(d<=0){const h=r.ownerDocument,g=h.body,f=getComputedStyle(g),v=h.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-g.clientWidth-v);m<=yr&&(s-=m)}else d<=yr&&(s+=d);return{width:s,height:i,x:a,y:c}}const Oi=new Set(["absolute","fixed"]);function Si(e,t){const n=ue(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ht(e)?ye(e):zt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,d=r*s.y;return{width:i,height:a,x:c,y:d}}function xr(e,t,n){let r;if(t==="viewport")r=_i(e,n);else if(t==="document")r=Pi(Vt(e));else if(kt(t))r=Si(t,n);else{const o=Br(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return gn(r)}function Tr(e,t){const n=Gt(e);return n===t||!kt(n)||Oe(n)?!1:Wt(n).position==="fixed"||Tr(n,t)}function Ai(e,t){const n=t.get(e);if(n)return n;let r=ze(e,[],!1).filter(a=>kt(a)&&Ce(a)!=="body"),o=null;const s=Wt(e).position==="fixed";let i=s?Gt(e):e;for(;kt(i)&&!Oe(i);){const a=Wt(i),c=jn(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Oi.has(o.position)||cn(i)&&!c&&Tr(e,i))?r=r.filter(h=>h!==i):o=a,i=Gt(i)}return t.set(e,r),r}function Ci(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Sn(t)?[]:Ai(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((d,h)=>{const g=xr(t,h,o);return d.top=Rt(g.top,d.top),d.right=Qt(g.right,d.right),d.bottom=Qt(g.bottom,d.bottom),d.left=Rt(g.left,d.left),d},xr(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fi(e){const{width:t,height:n}=Rr(e);return{width:t,height:n}}function Ei(e,t,n){const r=Ht(t),o=Vt(t),s=n==="fixed",i=ue(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=zt(0);function d(){c.x=Cn(o)}if(r||!r&&!s)if((Ce(t)!=="body"||cn(o))&&(a=An(t)),r){const v=ue(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&d();s&&!r&&o&&d();const h=o&&!r&&!s?Mr(o,a):zt(0),g=i.left+a.scrollLeft-c.x-h.x,f=i.top+a.scrollTop-c.y-h.y;return{x:g,y:f,width:i.width,height:i.height}}function kn(e){return Wt(e).position==="static"}function br(e,t){if(!Ht(e)||Wt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vt(e)===n&&(n=n.ownerDocument.body),n}function Ir(e,t){const n=Bt(e);if(Sn(e))return n;if(!Ht(e)){let o=Gt(e);for(;o&&!Oe(o);){if(kt(o)&&!kn(o))return o;o=Gt(o)}return n}let r=br(e,t);for(;r&&ui(r)&&kn(r);)r=br(r,t);return r&&Oe(r)&&kn(r)&&!jn(r)?n:r||mi(e)||n}const Di=async function(e){const t=this.getOffsetParent||Ir,n=this.getDimensions,r=await n(e.floating);return{reference:Ei(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ri(e){return Wt(e).direction==="rtl"}const Bi={convertOffsetParentRelativeRectToViewportRelativeRect:xi,getDocumentElement:Vt,getClippingRect:Ci,getOffsetParent:Ir,getElementRects:Di,getClientRects:bi,getDimensions:Fi,getScale:ye,isElement:kt,isRTL:Ri};function kr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mi(e,t){let n=null,r;const o=Vt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:h,top:g,width:f,height:v}=d;if(a||t(),!f||!v)return;const m=un(g),p=un(o.clientWidth-(h+f)),w=un(o.clientHeight-(g+v)),x=un(h),C={rootMargin:-m+"px "+-p+"px "+-w+"px "+-x+"px",threshold:Rt(0,Qt(1,c))||1};let b=!0;function k(M){const E=M[0].intersectionRatio;if(E!==c){if(!b)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!kr(d,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,C)}n.observe(e)}return i(!0),s}function Ti(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Zn(e),h=o||s?[...d?ze(d):[],...ze(t)]:[];h.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const g=d&&a?Mi(d,n):null;let f=-1,v=null;i&&(v=new ResizeObserver(x=>{let[O]=x;O&&O.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),d&&!c&&v.observe(d),v.observe(t));let m,p=c?ue(e):null;c&&w();function w(){const x=ue(e);p&&!kr(p,x)&&n(),p=x,m=requestAnimationFrame(w)}return n(),()=>{var x;h.forEach(O=>{o&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),g==null||g(),(x=v)==null||x.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const Ii=ii,ki=si,Wi=ni,Li=li,Ni=ri,zi=ei,Hi=ai,Vi=(e,t,n)=>{const r=new Map,o={platform:Bi,...n},s={...o.platform,_c:r};return ti(e,t,{...o,platform:s})};function ce(e){return typeof e=="function"?e():e}function Wr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pr(e,t){const n=Wr(e);return Math.round(t*n)/n}function _r(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 Ki(e){const t=e.whileElementsMounted,n=F(()=>ce(e.open)??!0),r=F(()=>ce(e.middleware)),o=F(()=>ce(e.transform)??!0),s=F(()=>ce(e.placement)??"bottom"),i=F(()=>ce(e.strategy)??"absolute"),a=F(()=>ce(e.sideOffset)??0),c=F(()=>ce(e.alignOffset)??0),d=e.reference;let h=Et(0),g=Et(0);const f=Jt(null);let v=Et(Rn(l(i))),m=Et(Rn(l(s))),p=Et(Rn({})),w=Et(!1);const x=F(()=>{const E=f.current?Pr(f.current,l(h)):l(h),_=f.current?Pr(f.current,l(g)):l(g);return l(o)?{position:l(v),left:"0",top:"0",transform:`translate(${E}px, ${_}px)`,...f.current&&Wr(f.current)>=1.5&&{willChange:"transform"}}:{position:l(v),left:`${E}px`,top:`${_}px`}});let O;function C(){d.current===null||f.current===null||Vi(d.current,f.current,{middleware:l(r),placement:l(s),strategy:l(i)}).then(E=>{if(!l(n)&&l(h)!==0&&l(g)!==0){const _=Math.max(Math.abs(l(a)),Math.abs(l(c)),15);if(E.x<=_&&E.y<=_)return}L(h,E.x,!0),L(g,E.y,!0),L(v,E.strategy,!0),L(m,E.placement,!0),L(p,E.middlewareData,!0),L(w,!0)})}function b(){typeof O=="function"&&(O(),O=void 0)}function k(){if(b(),t===void 0){C();return}d.current===null||f.current===null||(O=t(d.current,f.current,C))}function M(){l(n)||L(w,!1)}return Zt(C),Zt(k),Zt(M),Zt(()=>b),{floating:f,reference:d,get strategy(){return l(v)},get placement(){return l(m)},get middlewareData(){return l(p)},get isPositioned(){return l(w)},get floatingStyles(){return l(x)},get update(){return C}}}const Ui={top:"bottom",right:"left",bottom:"top",left:"right"},Jn=new Vn("Floating.Root"),Or=new Vn("Floating.Content"),Qn=new Vn("Floating.Root");class vn{constructor(){yt(this,"anchorNode",Jt(null));yt(this,"customAnchorNode",Jt(null));yt(this,"triggerNode",Jt(null));Zt(()=>{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})}static create(t=!1){return t?Qn.set(new vn):Jn.set(new vn)}}var He,yn,Ve,xn,Ke,bn,Ue,Ye,Xe,je,qe,Ze,Je,Qe,Ge,$e,tn,en,nn,rn,on,sn,an,ln;const Pn=class Pn{constructor(t,n){yt(this,"opts");yt(this,"root");yt(this,"contentRef",Jt(null));yt(this,"wrapperRef",Jt(null));yt(this,"arrowRef",Jt(null));yt(this,"contentAttachment",Mn(this.contentRef));yt(this,"wrapperAttachment",Mn(this.wrapperRef));yt(this,"arrowAttachment",Mn(this.arrowRef));yt(this,"arrowId",Jt(Ar()));N(this,He,F(()=>{if(typeof this.opts.style=="string")return Po(this.opts.style);if(!this.opts.style)return{}}));N(this,yn);N(this,Ve,new Ho(()=>this.arrowRef.current??void 0));N(this,xn,F(()=>{var t;return((t=P(this,Ve))==null?void 0:t.width)??0}));N(this,Ke,F(()=>{var t;return((t=P(this,Ve))==null?void 0:t.height)??0}));N(this,bn,F(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));N(this,Ue,F(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));N(this,Ye,F(()=>l(P(this,Ue)).length>0));N(this,Xe,F(()=>({padding:this.opts.collisionPadding.current,boundary:l(P(this,Ue)).filter(eo),altBoundary:this.hasExplicitBoundaries})));N(this,je,Et(void 0));N(this,qe,Et(void 0));N(this,Ze,Et(void 0));N(this,Je,Et(void 0));N(this,Qe,F(()=>[Ii({mainAxis:this.opts.sideOffset.current+l(P(this,Ke)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&ki({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?Hi():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Wi({...this.detectOverflowOptions}),Li({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:s}=t.reference;L(P(this,je),n,!0),L(P(this,qe),r,!0),L(P(this,Ze),o,!0),L(P(this,Je),s,!0)}}),this.arrowRef.current&&zi({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Yi({arrowWidth:l(P(this,xn)),arrowHeight:l(P(this,Ke))}),this.opts.hideWhenDetached.current&&Ni({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));yt(this,"floating");N(this,Ge,F(()=>Xi(this.floating.placement)));N(this,$e,F(()=>ji(this.floating.placement)));N(this,tn,F(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));N(this,en,F(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));N(this,nn,F(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));N(this,rn,Et());N(this,on,F(()=>Ui[this.placedSide]));N(this,sn,F(()=>{var t,n,r;return{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":`${(t=this.floating.middlewareData.transformOrigin)==null?void 0:t.x} ${(n=this.floating.middlewareData.transformOrigin)==null?void 0:n.y}`,"--bits-floating-available-width":`${l(P(this,je))}px`,"--bits-floating-available-height":`${l(P(this,qe))}px`,"--bits-floating-anchor-width":`${l(P(this,Ze))}px`,"--bits-floating-anchor-height":`${l(P(this,Je))}px`,...((r=this.floating.middlewareData.hide)==null?void 0:r.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...l(P(this,He))},dir:this.opts.dir.current,...this.wrapperAttachment}}));N(this,an,F(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:_o({...l(P(this,He))}),...this.contentAttachment})));N(this,ln,F(()=>({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})));this.opts=t,this.root=n,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),cr(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=Ki({strategy:()=>this.opts.strategy.current,placement:()=>l(P(this,bn)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>{var s;return Ti(...r,{animationFrame:((s=P(this,yn))==null?void 0:s.current)==="always"})},open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Zt(()=>{var r;this.floating.isPositioned&&((r=this.opts.onPlaced)==null||r.current())}),cr(()=>this.contentRef.current,r=>{if(!r)return;const o=no(r);this.contentZIndex=o.getComputedStyle(r).zIndex}),Zt(()=>{this.floating.floating.current=this.wrapperRef.current})}static create(t,n=!1){return n?Or.set(new Pn(t,Qn.get())):Or.set(new Pn(t,Jn.get()))}get hasExplicitBoundaries(){return l(P(this,Ye))}set hasExplicitBoundaries(t){L(P(this,Ye),t)}get detectOverflowOptions(){return l(P(this,Xe))}set detectOverflowOptions(t){L(P(this,Xe),t)}get middleware(){return l(P(this,Qe))}set middleware(t){L(P(this,Qe),t)}get placedSide(){return l(P(this,Ge))}set placedSide(t){L(P(this,Ge),t)}get placedAlign(){return l(P(this,$e))}set placedAlign(t){L(P(this,$e),t)}get arrowX(){return l(P(this,tn))}set arrowX(t){L(P(this,tn),t)}get arrowY(){return l(P(this,en))}set arrowY(t){L(P(this,en),t)}get cannotCenterArrow(){return l(P(this,nn))}set cannotCenterArrow(t){L(P(this,nn),t)}get contentZIndex(){return l(P(this,rn))}set contentZIndex(t){L(P(this,rn),t,!0)}get arrowBaseSide(){return l(P(this,on))}set arrowBaseSide(t){L(P(this,on),t)}get wrapperProps(){return l(P(this,sn))}set wrapperProps(t){L(P(this,sn),t)}get props(){return l(P(this,an))}set props(t){L(P(this,an),t)}get arrowStyle(){return l(P(this,ln))}set arrowStyle(t){L(P(this,ln),t)}};He=new WeakMap,yn=new WeakMap,Ve=new WeakMap,xn=new WeakMap,Ke=new WeakMap,bn=new WeakMap,Ue=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,je=new WeakMap,qe=new WeakMap,Ze=new WeakMap,Je=new WeakMap,Qe=new WeakMap,Ge=new WeakMap,$e=new WeakMap,tn=new WeakMap,en=new WeakMap,nn=new WeakMap,rn=new WeakMap,on=new WeakMap,sn=new WeakMap,an=new WeakMap,ln=new WeakMap;let zn=Pn;class mn{constructor(t,n){yt(this,"opts");yt(this,"root");this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=bo(t.virtualEl.current):n.triggerNode=t.ref}static create(t,n=!1){return n?new mn(t,Qn.get()):new mn(t,Jn.get())}}function Yi(e){return{name:"transformOrigin",options:e,fn(t){var w,x,O;const{placement:n,rects:r,middlewareData:o}=t,i=((w=o.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,h]=Gn(n),g={start:"0%",center:"50%",end:"100%"}[h],f=(((x=o.arrow)==null?void 0:x.x)??0)+a/2,v=(((O=o.arrow)==null?void 0:O.y)??0)+c/2;let m="",p="";return d==="bottom"?(m=i?g:`${f}px`,p=`${-c}px`):d==="top"?(m=i?g:`${f}px`,p=`${r.floating.height+c}px`):d==="right"?(m=`${-c}px`,p=i?g:`${v}px`):d==="left"&&(m=`${r.floating.width+c}px`,p=i?g:`${v}px`),{data:{x:m,y:p}}}}}function Gn(e){const[t,n="center"]=e.split("-");return[t,n]}function Xi(e){return Gn(e)[0]}function ji(e){return Gn(e)[1]}function qi(e,t){at(t,!0);let n=y(t,"tooltip",3,!1);vn.create(n());var r=B(),o=A(r);st(o,()=>t.children??gt),u(e,r),lt()}function Zi(e,t){at(t,!0);let n=y(t,"tooltip",3,!1);mn.create({id:I(()=>t.id),virtualEl:I(()=>t.virtualEl),ref:t.ref},n());var r=B(),o=A(r);st(o,()=>t.children??gt),u(e,r),lt()}function Ji(e,t){at(t,!0);let n=y(t,"side",3,"bottom"),r=y(t,"sideOffset",3,0),o=y(t,"align",3,"center"),s=y(t,"alignOffset",3,0),i=y(t,"arrowPadding",3,0),a=y(t,"avoidCollisions",3,!0),c=y(t,"collisionBoundary",19,()=>[]),d=y(t,"collisionPadding",3,0),h=y(t,"hideWhenDetached",3,!1),g=y(t,"onPlaced",3,()=>{}),f=y(t,"sticky",3,"partial"),v=y(t,"updatePositionStrategy",3,"optimized"),m=y(t,"strategy",3,"fixed"),p=y(t,"dir",3,"ltr"),w=y(t,"style",19,()=>({})),x=y(t,"wrapperId",19,Ar),O=y(t,"customAnchor",3,null),C=y(t,"tooltip",3,!1);const b=zn.create({side:I(()=>n()),sideOffset:I(()=>r()),align:I(()=>o()),alignOffset:I(()=>s()),id:I(()=>t.id),arrowPadding:I(()=>i()),avoidCollisions:I(()=>a()),collisionBoundary:I(()=>c()),collisionPadding:I(()=>d()),hideWhenDetached:I(()=>h()),onPlaced:I(()=>g()),sticky:I(()=>f()),updatePositionStrategy:I(()=>v()),strategy:I(()=>m()),dir:I(()=>p()),style:I(()=>w()),enabled:I(()=>t.enabled),wrapperId:I(()=>x()),customAnchor:I(()=>O())},C()),k=F(()=>de(b.wrapperProps,{style:{pointerEvents:"auto"}}));var M=B(),E=A(M);st(E,()=>t.content??gt,()=>({props:b.props,wrapperProps:l(k)})),u(e,M),lt()}function Qi(e,t){at(t,!0),$r(()=>{var o;(o=t.onPlaced)==null||o.call(t)});var n=B(),r=A(n);st(r,()=>t.content??gt,()=>({props:{},wrapperProps:{}})),u(e,n),lt()}function Gi(e,t){let n=y(t,"isStatic",3,!1),r=dt(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var o=B(),s=A(o);{var i=c=>{Qi(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Ji(c,St({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};Ot(s,c=>{n()?c(i):c(a,!1)})}u(e,o)}var $i=Z("<!> <!>",1);function Lr(e,t){at(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),o=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),i=y(t,"isStatic",3,!1),a=y(t,"tooltip",3,!1),c=y(t,"contentPointerEvents",3,"auto"),d=dt(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"]);Gi(e,{get isStatic(){return i()},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:(g,f)=>{let v=()=>f==null?void 0:f().props,m=()=>f==null?void 0:f().wrapperProps;var p=$i(),w=A(p);{var x=b=>{dr(b,{get preventScroll(){return t.preventScroll}})},O=b=>{dr(b,{get preventScroll(){return t.preventScroll}})};Ot(w,b=>{t.forceMount&&t.enabled?b(x):t.forceMount||b(O,1)})}var C=R(w,2);ro(C,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(k,M)=>{let E=()=>M==null?void 0:M().props;oo(k,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(_,$)=>{io(_,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return o()},get enabled(){return t.enabled},get ref(){return t.ref},children:(ut,it)=>{let vt=()=>it==null?void 0:it().props;so(ut,{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:(rt,nt)=>{var H=B(),tt=A(H);{let et=F(()=>({props:de(d,v(),vt(),E(),{style:{pointerEvents:c()}}),wrapperProps:m()}));st(tt,()=>t.popper??gt,()=>l(et))}u(rt,H)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),u(g,p)},$$slots:{content:!0}}),lt()}function ts(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),o=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),i=y(t,"isStatic",3,!1),a=dt(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=B(),d=A(c);{var h=g=>{Lr(g,St({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 i()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Ot(d,g=>{t.shouldRender&&g(h)})}u(e,c)}function es(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),o=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),i=y(t,"isStatic",3,!1),a=dt(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"]);Lr(e,St({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 i()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var ns=Z("<div><!></div>");function rs(e,t){const n=Hn();at(t,!0);let r=y(t,"ref",15,null),o=y(t,"id",19,()=>Kn(n)),s=y(t,"disabled",3,!1),i=y(t,"onSelect",3,pe),a=y(t,"closeOnSelect",3,!0),c=dt(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const d=ao.create({id:I(()=>o()),disabled:I(()=>s()),onSelect:I(()=>i()),ref:I(()=>r(),p=>r(p)),closeOnSelect:I(()=>a())}),h=F(()=>de(c,d.props));var g=B(),f=A(g);{var v=p=>{var w=B(),x=A(w);st(x,()=>t.child,()=>({props:l(h)})),u(p,w)},m=p=>{var w=ns();Tt(w,()=>({...l(h)}));var x=ft(w);st(x,()=>t.children??gt),ht(w),u(p,w)};Ot(f,p=>{t.child?p(v):p(m,!1)})}u(e,g),lt()}function os(e,t){at(t,!0);let n=y(t,"open",15,!1),r=y(t,"dir",3,"ltr"),o=y(t,"onOpenChange",3,pe),s=y(t,"onOpenChangeComplete",3,pe),i=y(t,"_internal_variant",3,"dropdown-menu");const a=lo.create({variant:I(()=>i()),dir:I(()=>r()),onClose:()=>{n(!1),o()(!1)}});co.create({open:I(()=>n(),c=>{n(c),o()(c)}),onOpenChangeComplete:I(()=>s())},a),qi(e,{children:(c,d)=>{var h=B(),g=A(h);st(g,()=>t.children??gt),u(c,h)},$$slots:{default:!0}}),lt()}var is=Z("<div><div><!></div></div>"),ss=Z("<div><div><!></div></div>");function as(e,t){const n=Hn();at(t,!0);let r=y(t,"id",19,()=>Kn(n)),o=y(t,"ref",15,null),s=y(t,"loop",3,!0),i=y(t,"onInteractOutside",3,pe),a=y(t,"onEscapeKeydown",3,pe),c=y(t,"onCloseAutoFocus",3,pe),d=y(t,"forceMount",3,!1),h=y(t,"trapFocus",3,!1),g=dt(t,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const f=uo.create({id:I(()=>r()),loop:I(()=>s()),ref:I(()=>o(),b=>o(b)),onCloseAutoFocus:I(()=>c())}),v=F(()=>de(g,f.props));function m(b){if(f.handleInteractOutside(b),!b.defaultPrevented&&(i()(b),!b.defaultPrevented)){if(b.target&&b.target instanceof Element){const k=`[${f.parentMenu.root.getBitsAttr("sub-content")}]`;if(b.target.closest(k))return}f.parentMenu.onClose()}}function p(b){a()(b),!b.defaultPrevented&&f.parentMenu.onClose()}var w=B(),x=A(w);{var O=b=>{es(b,St(()=>l(v),()=>f.popperProps,{get ref(){return f.opts.ref},get enabled(){return f.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:p,get trapFocus(){return h()},get loop(){return s()},forceMount:!0,get id(){return r()},get shouldRender(){return f.shouldRender},popper:(M,E)=>{let _=()=>E==null?void 0:E().props,$=()=>E==null?void 0:E().wrapperProps;const j=F(()=>de(_(),{style:_r("dropdown-menu")},{style:t.style}));var ut=B(),it=A(ut);{var vt=nt=>{var H=B(),tt=A(H);{let et=F(()=>({props:l(j),wrapperProps:$(),...f.snippetProps}));st(tt,()=>t.child,()=>l(et))}u(nt,H)},rt=nt=>{var H=is();Tt(H,()=>({...$()}));var tt=ft(H);Tt(tt,()=>({...l(j)}));var et=ft(tt);st(et,()=>t.children??gt),ht(tt),ht(H),u(nt,H)};Ot(it,nt=>{t.child?nt(vt):nt(rt,!1)})}u(M,ut)},$$slots:{popper:!0}}))},C=b=>{ts(b,St(()=>l(v),()=>f.popperProps,{get ref(){return f.opts.ref},get open(){return f.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:p,get trapFocus(){return h()},get loop(){return s()},forceMount:!1,get id(){return r()},get shouldRender(){return f.shouldRender},popper:(M,E)=>{let _=()=>E==null?void 0:E().props,$=()=>E==null?void 0:E().wrapperProps;const j=F(()=>de(_(),{style:_r("dropdown-menu")},{style:t.style}));var ut=B(),it=A(ut);{var vt=nt=>{var H=B(),tt=A(H);{let et=F(()=>({props:l(j),wrapperProps:$(),...f.snippetProps}));st(tt,()=>t.child,()=>l(et))}u(nt,H)},rt=nt=>{var H=ss();Tt(H,()=>({...$()}));var tt=ft(H);Tt(tt,()=>({...l(j)}));var et=ft(tt);st(et,()=>t.children??gt),ht(tt),ht(H),u(nt,H)};Ot(it,nt=>{t.child?nt(vt):nt(rt,!1)})}u(M,ut)},$$slots:{popper:!0}}))};Ot(x,b=>{d()?b(O):d()||b(C,1)})}u(e,w),lt()}var ls=Z("<button><!></button>");function cs(e,t){const n=Hn();at(t,!0);let r=y(t,"id",19,()=>Kn(n)),o=y(t,"ref",15,null),s=y(t,"disabled",3,!1),i=y(t,"type",3,"button"),a=dt(t,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const c=fo.create({id:I(()=>r()),disabled:I(()=>s()??!1),ref:I(()=>o(),h=>o(h))}),d=F(()=>de(a,c.props,{type:i()}));Zi(e,{get id(){return r()},get ref(){return c.opts.ref},children:(h,g)=>{var f=B(),v=A(f);{var m=w=>{var x=B(),O=A(x);st(O,()=>t.child,()=>({props:l(d)})),u(w,x)},p=w=>{var x=ls();Tt(x,()=>({...l(d)}));var O=ft(x);st(O,()=>t.children??gt),ht(x),u(w,x)};Ot(v,w=>{t.child?w(m):w(p,!1)})}u(h,f)},$$slots:{default:!0}}),lt()}function ds(e,t){at(t,!0);/**
* @license @lucide/svelte v0.561.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* ---
*
* The MIT License (MIT) (for portions derived from Feather)
*
* Copyright (c) 2013-2023 Cole Bemis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/let n=dt(t,["$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];_n(e,St({name:"ellipsis"},()=>n,{get iconNode(){return r},children:(o,s)=>{var i=B(),a=A(i);st(a,()=>t.children??gt),u(o,i)},$$slots:{default:!0}})),lt()}function us(e,t){at(t,!0);/**
* @license @lucide/svelte v0.561.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* ---
*
* The MIT License (MIT) (for portions derived from Feather)
*
* Copyright (c) 2013-2023 Cole Bemis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/let n=dt(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];_n(e,St({name:"pencil"},()=>n,{get iconNode(){return r},children:(o,s)=>{var i=B(),a=A(i);st(a,()=>t.children??gt),u(o,i)},$$slots:{default:!0}})),lt()}function fs(e,t){at(t,!0);/**
* @license @lucide/svelte v0.561.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* ---
*
* The MIT License (MIT) (for portions derived from Feather)
*
* Copyright (c) 2013-2023 Cole Bemis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/let n=dt(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];_n(e,St({name:"plus"},()=>n,{get iconNode(){return r},children:(o,s)=>{var i=B(),a=A(i);st(a,()=>t.children??gt),u(o,i)},$$slots:{default:!0}})),lt()}function hs(e,t){at(t,!0);/**
* @license @lucide/svelte v0.561.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* ---
*
* The MIT License (MIT) (for portions derived from Feather)
*
* Copyright (c) 2013-2023 Cole Bemis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/let n=dt(t,["$$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"}]];_n(e,St({name:"trash-2"},()=>n,{get iconNode(){return r},children:(o,s)=>{var i=B(),a=A(i);st(a,()=>t.children??gt),u(o,i)},$$slots:{default:!0}})),lt()}function gs(e,t){at(t,!0);let n=y(t,"open",15,!1),r=dt(t,["$$slots","$$events","$$legacy","open"]);var o=B(),s=A(o);S(s,()=>os,(i,a)=>{a(i,St(()=>r,{get open(){return n()},set open(c){n(c)}}))}),u(e,o),lt()}function Nr(e,t){let n=dt(t,["$$slots","$$events","$$legacy"]);var r=B(),o=A(r);S(o,()=>ho,(s,i)=>{i(s,St(()=>n))}),u(e,r)}function vs(e,t){at(t,!0);let n=y(t,"ref",15,null),r=y(t,"sideOffset",3,4),o=dt(t,["$$slots","$$events","$$legacy","ref","sideOffset","portalProps","class"]);Nr(e,St(()=>t.portalProps,{children:(s,i)=>{var a=B(),c=A(a);{let d=F(()=>$t("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md outline-none",t.class));S(c,()=>as,(h,g)=>{g(h,St({"data-slot":"dropdown-menu-content",get sideOffset(){return r()},get class(){return l(d)}},()=>o,{get ref(){return n()},set ref(f){n(f)}}))})}u(s,a)},$$slots:{default:!0}})),lt()}function Sr(e,t){at(t,!0);let n=y(t,"ref",15,null),r=y(t,"variant",3,"default"),o=dt(t,["$$slots","$$events","$$legacy","ref","class","inset","variant"]);var s=B(),i=A(s);{let a=F(()=>$t("data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class));S(i,()=>rs,(c,d)=>{d(c,St({"data-slot":"dropdown-menu-item",get"data-inset"(){return t.inset},get"data-variant"(){return r()},get class(){return l(a)}},()=>o,{get ref(){return n()},set ref(h){n(h)}}))})}u(e,s),lt()}function ms(e,t){at(t,!0);let n=y(t,"ref",15,null),r=dt(t,["$$slots","$$events","$$legacy","ref"]);var o=B(),s=A(o);S(s,()=>cs,(i,a)=>{a(i,St({"data-slot":"dropdown-menu-trigger"},()=>r,{get ref(){return n()},set ref(c){n(c)}}))}),u(e,o),lt()}var ws=Z("<!> New item",1),ps=Z("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ys=Z('<a target="_blank" rel="noopener noreferrer" class="block overflow-hidden rounded border"><img alt="" class="size-14 object-cover" loading="lazy"/></a>'),xs=Z('<span class="text-muted-foreground text-xs">—</span>'),bs=Z('<span class="text-muted-foreground">—</span>'),Ps=Z("<!> <!>",1),_s=Z('<span class="text-muted-foreground">—</span>'),Os=Z("<!> <!>",1),Ss=Z('<span class="text-muted-foreground">No</span>'),As=Z('<span class="font-mono text-xs"> </span>'),Cs=Z('<span class="text-muted-foreground">—</span>'),Fs=Z("<!> Edit",1),Es=Z("<!> Delete",1),Ds=Z('<!> <form method="POST" action="?/delete" class="hidden"><input type="hidden" name="id"/></form> <!>',1),Rs=Z("<!> <!>",1),Bs=Z("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),Ms=Z("<!> <!>",1),Ts=Z("<!> <!>",1),Is=Z("<!> <!>",1),ks=Z('<main class="container mx-auto flex flex-col gap-6 py-8"><div class="flex items-center justify-between"><h1 class="text-2xl font-semibold">Stackq Items</h1> <div class="flex items-center gap-2"><span class="text-muted-foreground text-sm"> </span> <!></div></div> <!> <!></main>');function Qs(e,t){at(t,!0);let n=Et(!1),r=Et(null),o=Et("create");const s=F(()=>{var _;return((_=t.data)==null?void 0:_.items)??[]}),i=F(()=>{var _;return((_=t.data)==null?void 0:_.itemsForParent)??[]}),a="https://pocketbase.ccllc.pro",c="Stackq_Items";function d(_){return _.Image?`${a}/api/files/${c}/${_.id}/${_.Image}`:null}function h(_){return _==null?[]:Array.isArray(_)?_:[_]}function g(_){if(!_)return"—";try{return new Date(_).toLocaleDateString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return _}}function f(){L(r,null),L(o,"create"),L(n,!0)}function v(_){L(r,_,!0),L(o,"update"),L(n,!0)}function m(){L(n,!1),L(r,null)}const p=F(()=>{var _,$,j;return((_=t.data)==null?void 0:_.form)==="create"||(($=t.data)==null?void 0:$.form)==="update"?((j=t.data)==null?void 0:j.error)??null:null});Zt(()=>{var _,$;l(p)&&(((_=t.data)==null?void 0:_.form)==="create"||(($=t.data)==null?void 0:$.form)==="update")&&L(n,!0)});var w=ks();xo("1kn3tit",_=>{Jr(()=>{Qr.title="Items Stackq"})});var x=ft(w),O=R(ft(x),2),C=ft(O),b=ft(C);ht(C);var k=R(C,2);Fo(k,{onclick:f,children:(_,$)=>{var j=ws(),ut=A(j);fs(ut,{class:"mr-2 size-4"}),z(),u(_,j)},$$slots:{default:!0}}),ht(O),ht(x);var M=R(x,2);Eo(M,{children:(_,$)=>{Do(_,{class:"p-0",children:(j,ut)=>{var it=B(),vt=A(it);S(vt,()=>Bo,(rt,nt)=>{nt(rt,{children:(H,tt)=>{var et=Ms(),At=A(et);S(At,()=>Lo,(te,ee)=>{ee(te,{children:(ne,$n)=>{var Yt=B(),fe=A(Yt);S(fe,()=>In,(Ee,re)=>{re(Ee,{children:(Mt,Lt)=>{var Xt=ps(),Ct=A(Xt);S(Ct,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Image");u(U,Y)},$$slots:{default:!0}})});var W=R(Ct,2);S(W,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Item");u(U,Y)},$$slots:{default:!0}})});var oe=R(W,2);S(oe,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("SKU");u(U,Y)},$$slots:{default:!0}})});var De=R(oe,2);S(De,()=>_t,(V,K)=>{K(V,{class:"max-w-[200px]",children:(U,mt)=>{z();var Y=X("Description");u(U,Y)},$$slots:{default:!0}})});var ie=R(De,2);S(ie,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("UOM");u(U,Y)},$$slots:{default:!0}})});var he=R(ie,2);S(he,()=>_t,(V,K)=>{K(V,{class:"text-right",children:(U,mt)=>{z();var Y=X("Cost");u(U,Y)},$$slots:{default:!0}})});var ge=R(he,2);S(ge,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Vendor");u(U,Y)},$$slots:{default:!0}})});var Re=R(ge,2);S(Re,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Catagory");u(U,Y)},$$slots:{default:!0}})});var se=R(Re,2);S(se,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Sub_Catagory");u(U,Y)},$$slots:{default:!0}})});var ve=R(se,2);S(ve,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Has Parent");u(U,Y)},$$slots:{default:!0}})});var ae=R(ve,2);S(ae,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Parent");u(U,Y)},$$slots:{default:!0}})});var Be=R(ae,2);S(Be,()=>_t,(V,K)=>{K(V,{children:(U,mt)=>{z();var Y=X("Stock");u(U,Y)},$$slots:{default:!0}})});var Me=R(Be,2);S(Me,()=>_t,(V,K)=>{K(V,{class:"text-muted-foreground",children:(U,mt)=>{z();var Y=X("created");u(U,Y)},$$slots:{default:!0}})});var Te=R(Me,2);S(Te,()=>_t,(V,K)=>{K(V,{class:"text-muted-foreground",children:(U,mt)=>{z();var Y=X("updated");u(U,Y)},$$slots:{default:!0}})});var dn=R(Te,2);S(dn,()=>_t,(V,K)=>{K(V,{class:"w-[70px]",children:(U,mt)=>{z();var Y=X("Actions");u(U,Y)},$$slots:{default:!0}})}),u(Mt,Xt)},$$slots:{default:!0}})}),u(ne,Yt)},$$slots:{default:!0}})});var Fe=R(At,2);S(Fe,()=>To,(te,ee)=>{ee(te,{children:(ne,$n)=>{var Yt=B(),fe=A(Yt);{var Ee=Mt=>{var Lt=B(),Xt=A(Lt);S(Xt,()=>In,(Ct,W)=>{W(Ct,{children:(oe,De)=>{var ie=B(),he=A(ie);S(he,()=>xt,(ge,Re)=>{Re(ge,{colspan:"15",class:"h-24 text-center text-muted-foreground",children:(se,ve)=>{z();var ae=X("No items. Create one or check PocketBase collection name and auth.");u(se,ae)},$$slots:{default:!0}})}),u(oe,ie)},$$slots:{default:!0}})}),u(Mt,Lt)},re=Mt=>{var Lt=B(),Xt=A(Lt);Bn(Xt,17,()=>l(s),Ct=>Ct.id,(Ct,W)=>{var oe=B(),De=A(oe);S(De,()=>In,(ie,he)=>{he(ie,{children:(ge,Re)=>{var se=Bs(),ve=A(se);S(ve,()=>xt,(J,Q)=>{Q(J,{class:"w-16",children:(G,bt)=>{var D=B(),ot=A(D);{var pt=T=>{var q=ys(),Ft=ft(q);ht(q),wt((Ie,It)=>{Tn(q,"href",Ie),Tn(Ft,"src",It)},[()=>d(l(W)),()=>d(l(W))]),u(T,q)},Dt=F(()=>d(l(W))),ct=T=>{var q=xs();u(T,q)};Ot(ot,T=>{l(Dt)?T(pt):T(ct,!1)})}u(G,D)},$$slots:{default:!0}})});var ae=R(ve,2);S(ae,()=>xt,(J,Q)=>{Q(J,{class:"font-medium",children:(G,bt)=>{z();var D=X();wt(()=>Pt(D,l(W).Item??"—")),u(G,D)},$$slots:{default:!0}})});var Be=R(ae,2);S(Be,()=>xt,(J,Q)=>{Q(J,{class:"font-mono text-xs",children:(G,bt)=>{z();var D=X();wt(()=>Pt(D,l(W).SKU??"—")),u(G,D)},$$slots:{default:!0}})});var Me=R(Be,2);{let J=F(()=>l(W).Description??"");S(Me,()=>xt,(Q,G)=>{G(Q,{class:"max-w-[200px] truncate",get title(){return l(J)},children:(bt,D)=>{z();var ot=X();wt(()=>Pt(ot,l(W).Description??"—")),u(bt,ot)},$$slots:{default:!0}})})}var Te=R(Me,2);S(Te,()=>xt,(J,Q)=>{Q(J,{children:(G,bt)=>{Ne(G,{variant:"outline",children:(D,ot)=>{z();var pt=X();wt(()=>Pt(pt,l(W).UOM??"—")),u(D,pt)},$$slots:{default:!0}})},$$slots:{default:!0}})});var dn=R(Te,2);S(dn,()=>xt,(J,Q)=>{Q(J,{class:"text-right tabular-nums",children:(G,bt)=>{z();var D=X();wt(ot=>Pt(D,ot),[()=>l(W).Cost!=null?Number(l(W).Cost).toLocaleString():"—"]),u(G,D)},$$slots:{default:!0}})});var V=R(dn,2);S(V,()=>xt,(J,Q)=>{Q(J,{class:"text-muted-foreground",children:(G,bt)=>{z();var D=X();wt(()=>Pt(D,l(W).Vendor??"—")),u(G,D)},$$slots:{default:!0}})});var K=R(V,2);S(K,()=>xt,(J,Q)=>{Q(J,{children:(G,bt)=>{var D=Ps(),ot=A(D);Bn(ot,17,()=>h(l(W).Catagory),ur,(T,q)=>{Ne(T,{variant:"secondary",class:"mr-1 text-xs",children:(Ft,Ie)=>{z();var It=X();wt(()=>Pt(It,l(q))),u(Ft,It)},$$slots:{default:!0}})});var pt=R(ot,2);{var Dt=T=>{var q=bs();u(T,q)},ct=F(()=>h(l(W).Catagory).length===0);Ot(pt,T=>{l(ct)&&T(Dt)})}u(G,D)},$$slots:{default:!0}})});var U=R(K,2);S(U,()=>xt,(J,Q)=>{Q(J,{children:(G,bt)=>{var D=Os(),ot=A(D);Bn(ot,17,()=>h(l(W).Sub_Catagory),ur,(T,q)=>{Ne(T,{variant:"outline",class:"mr-1 text-xs",children:(Ft,Ie)=>{z();var It=X();wt(()=>Pt(It,l(q))),u(Ft,It)},$$slots:{default:!0}})});var pt=R(ot,2);{var Dt=T=>{var q=_s();u(T,q)},ct=F(()=>h(l(W).Sub_Catagory).length===0);Ot(pt,T=>{l(ct)&&T(Dt)})}u(G,D)},$$slots:{default:!0}})});var mt=R(U,2);S(mt,()=>xt,(J,Q)=>{Q(J,{children:(G,bt)=>{var D=B(),ot=A(D);{var pt=ct=>{Ne(ct,{children:(T,q)=>{z();var Ft=X("Yes");u(T,Ft)},$$slots:{default:!0}})},Dt=ct=>{var T=Ss();u(ct,T)};Ot(ot,ct=>{l(W).Has_Parent?ct(pt):ct(Dt,!1)})}u(G,D)},$$slots:{default:!0}})});var Y=R(mt,2);S(Y,()=>xt,(J,Q)=>{Q(J,{class:"text-muted-foreground",children:(G,bt)=>{var D=B(),ot=A(D);{var pt=T=>{var q=X();wt(()=>Pt(q,l(W).expand.Parent.Item??l(W).expand.Parent.SKU??l(W).Parent)),u(T,q)},Dt=T=>{var q=As(),Ft=ft(q,!0);ht(q),wt(()=>Pt(Ft,l(W).Parent)),u(T,q)},ct=T=>{var q=X("—");u(T,q)};Ot(ot,T=>{var q;(q=l(W).expand)!=null&&q.Parent?T(pt):l(W).Parent?T(Dt,1):T(ct,!1)})}u(G,D)},$$slots:{default:!0}})});var tr=R(Y,2);S(tr,()=>xt,(J,Q)=>{Q(J,{children:(G,bt)=>{var D=B(),ot=A(D);{var pt=ct=>{Ne(ct,{variant:"default",children:(T,q)=>{z();var Ft=X("Stock");u(T,Ft)},$$slots:{default:!0}})},Dt=ct=>{var T=Cs();u(ct,T)};Ot(ot,ct=>{l(W).Stock?ct(pt):ct(Dt,!1)})}u(G,D)},$$slots:{default:!0}})});var er=R(tr,2);S(er,()=>xt,(J,Q)=>{Q(J,{class:"text-muted-foreground text-xs",children:(G,bt)=>{z();var D=X();wt(ot=>Pt(D,ot),[()=>g(l(W).created)]),u(G,D)},$$slots:{default:!0}})});var nr=R(er,2);S(nr,()=>xt,(J,Q)=>{Q(J,{class:"text-muted-foreground text-xs",children:(G,bt)=>{z();var D=X();wt(ot=>Pt(D,ot),[()=>g(l(W).updated)]),u(G,D)},$$slots:{default:!0}})});var zr=R(nr,2);S(zr,()=>xt,(J,Q)=>{Q(J,{children:(G,bt)=>{var D=B(),ot=A(D);S(ot,()=>gs,(pt,Dt)=>{Dt(pt,{children:(ct,T)=>{var q=Rs(),Ft=A(q);S(Ft,()=>ms,(It,Fn)=>{Fn(It,{class:"border-0 bg-transparent hover:bg-muted inline-flex size-8 items-center justify-center rounded-md",children:(En,Hr)=>{ds(En,{class:"size-4"})},$$slots:{default:!0}})});var Ie=R(Ft,2);S(Ie,()=>Nr,(It,Fn)=>{Fn(It,{children:(En,Hr)=>{var rr=B(),Vr=A(rr);S(Vr,()=>vs,(Kr,Ur)=>{Ur(Kr,{align:"end",children:(Yr,Ws)=>{var or=Ds(),ir=A(or);S(ir,()=>Sr,(We,me)=>{me(We,{onclick:()=>v(l(W)),children:(we,jr)=>{var Le=Fs(),Dn=A(Le);us(Dn,{class:"mr-2 size-4"}),z(),u(we,Le)},$$slots:{default:!0}})});var ke=R(ir,2),sr=ft(ke);Ao(sr),ht(ke),Oo(ke,We=>{var me;return(me=So)==null?void 0:me(We)});var Xr=R(ke,2);S(Xr,()=>Sr,(We,me)=>{me(We,{class:"text-destructive focus:text-destructive cursor-pointer",onclick:()=>{var we;confirm("Delete this item? This cannot be undone.")&&((we=document.getElementById("delete-form-"+l(W).id))==null||we.requestSubmit())},children:(we,jr)=>{var Le=Es(),Dn=A(Le);hs(Dn,{class:"mr-2 size-4"}),z(),u(we,Le)},$$slots:{default:!0}})}),wt(()=>{Tn(ke,"id",`delete-form-${l(W).id??""}`),Co(sr,l(W).id)}),u(Yr,or)},$$slots:{default:!0}})}),u(En,rr)},$$slots:{default:!0}})}),u(ct,q)},$$slots:{default:!0}})}),u(G,D)},$$slots:{default:!0}})}),u(ge,se)},$$slots:{default:!0}})}),u(Ct,oe)}),u(Mt,Lt)};Ot(fe,Mt=>{l(s).length===0?Mt(Ee):Mt(re,!1)})}u(ne,Yt)},$$slots:{default:!0}})}),u(H,et)},$$slots:{default:!0}})}),u(j,it)},$$slots:{default:!0}})},$$slots:{default:!0}});var E=R(M,2);S(E,()=>yo,(_,$)=>{$(_,{get open(){return l(n)},set open(j){L(n,j,!0)},children:(j,ut)=>{var it=B(),vt=A(it);S(vt,()=>go,(rt,nt)=>{nt(rt,{class:"max-h-[90vh] overflow-y-auto sm:max-w-[500px]",children:(H,tt)=>{var et=Is(),At=A(et);S(At,()=>vo,(te,ee)=>{ee(te,{children:(ne,$n)=>{var Yt=Ts(),fe=A(Yt);S(fe,()=>mo,(re,Mt)=>{Mt(re,{children:(Lt,Xt)=>{z();var Ct=X();wt(()=>Pt(Ct,l(r)?"Edit item":"New item")),u(Lt,Ct)},$$slots:{default:!0}})});var Ee=R(fe,2);S(Ee,()=>wo,(re,Mt)=>{Mt(re,{children:(Lt,Xt)=>{z();var Ct=X();wt(()=>Pt(Ct,l(r)?"Update the item below.":"Add a new Stackq item.")),u(Lt,Ct)},$$slots:{default:!0}})}),u(ne,Yt)},$$slots:{default:!0}})});var Fe=R(At,2);{let te=F(()=>l(r)?"?/update":"?/create"),ee=F(()=>l(r)?"Update":"Create"),ne=F(()=>l(p)??null);po(Fe,{get item(){return l(r)},get itemsForParent(){return l(i)},get action(){return l(te)},get submitLabel(){return l(ee)},get error(){return l(ne)},onSuccess:m})}u(H,et)},$$slots:{default:!0}})}),u(j,it)},$$slots:{default:!0}})}),ht(w),wt(()=>Pt(b,`${l(s).length??""} items`)),u(e,w),lt()}export{Qs as default};