@atlanhq/app-playground 1.5.0 → 1.5.1

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.
@@ -1,4 +1,4 @@
1
- import{F as Ta,G as Uy,H as If,I as Tf,k as F,J as $d,K as Xn,L as Me,r as ve,d as P,M as Yy,N as Oe,h as yt,O as Q,P as T,Q as b,z as C,D as I,R as L,S as W,T as et,U as lt,o as js,e as qy,V as Id,s as fs,W as Re,X as Td,Y as Yt,Z as wn,y as H,A as z,$ as Ue,a0 as N,B as oe,E as Be,a1 as Ws,C as Z,a2 as Ky,a3 as Pf,a4 as wt,a5 as Xy,a6 as Zy,a7 as Fu,a8 as ms,a9 as Jy,aa as Ec,a as Qy,ab as ex,ac as tx,ad as nx,ae as ox,af as ix,ag as ax,ah as rx,ai as Gs,aj as Us,ak as Ys,al as sx,am as lx,an as Vf}from"./CQwh7vio.js";function Oc(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var cx=e=>typeof e=="object"&&e!==null;function Pd(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var dx=e=>e==="base";function ux(e){return e.slice().filter(t=>!dx(t))}function Au(e){return String.fromCharCode(e+(e>25?39:97))}function hx(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Au(n%52)+t;return Au(n%52)+t}function px(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function gx(e){return hx(px(5381,e)>>>0)}var Df=/\s*!(important)?/i;function fx(e){return typeof e=="string"?Df.test(e):!1}function mx(e){return typeof e=="string"?e.replace(Df,"").trim():e}function Mf(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var Pa=e=>{const t=new Map;return(...n)=>{const o=JSON.stringify(n);if(t.has(o))return t.get(o);const i=e(...n);return t.set(o,i),i}};function Vd(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],a=n[o];Oc(i)&&Oc(a)?t[o]=Vd(i,a):t[o]=a}),t),{})}var vx=e=>e!=null;function Rf(e,t,n={}){const{stop:o,getKey:i}=n;function a(r,s=[]){if(cx(r)){const l={};for(const[c,d]of Object.entries(r)){const h=i?.(c,d)??c,u=[...s,h];if(o!=null&&o(r,u))return t(r,s);const p=a(d,u);vx(p)&&(l[h]=p)}return l}return t(r,s)}return a(e)}function bx(e,t){return e.reduce((n,o,i)=>{const a=t[i];return o!=null&&(n[a]=o),n},{})}function Ff(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:a,resolveShorthand:r}=o;return Rf(e,s=>Array.isArray(s)?bx(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>a?r(s):s:void 0})}var yx={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},xx=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function wx(e){const{utility:t,hash:n,conditions:o=yx}=e,i=r=>[t.prefix,r].filter(Boolean).join("-"),a=(r,s)=>{let l;if(n){const c=[...o.finalize(r),s];l=i(t.toHash(c,gx))}else l=[...o.finalize(r),i(s)].join(":");return l};return Pa(({base:r,...s}={})=>{const l=Object.assign(s,r),c=Ff(l,e),d=new Set;return Rf(c,(h,u)=>{if(h==null)return;const p=fx(h),[m,...g]=o.shift(u),v=ux(g),f=t.transform(m,mx(xx(h)));let y=a(v,f.className);p&&(y=`${y}!`),d.add(y)}),Array.from(d).join(" ")})}function Cx(...e){return e.flat().filter(t=>Oc(t)&&Object.keys(Pd(t)).length>0)}function _x(e){function t(i){const a=Cx(...i);return a.length===1?a:a.map(r=>Ff(r,e))}function n(...i){return Vd(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:Pa(n),assignCss:o}}var kx=/([A-Z])/g,Sx=/^ms-/,Ex=Pa(e=>e.startsWith("--")?e:e.replace(kx,"-$1").replace(Sx,"-ms-").toLowerCase()),Ox="cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%";`${Ox.split(",").join("|")}`;var $x=(e={})=>{const t=o=>{var i;return{className:[e.className,o].filter(Boolean).join("__"),base:((i=e.base)==null?void 0:i[o])??{},variants:{},defaultVariants:e.defaultVariants??{},compoundVariants:e.compoundVariants?Ix(e.compoundVariants,o):[]}},n=(e.slots??[]).map(o=>[o,t(o)]);for(const[o,i]of Object.entries(e.variants??{}))for(const[a,r]of Object.entries(i))n.forEach(([s,l])=>{var c;(c=l.variants)[o]??(c[o]={}),l.variants[o][a]=r[s]??{}});return Object.fromEntries(n)},Ix=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function Af(e,...t){const n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),i=r=>{const s={};for(let l=0;l<r.length;l++){const c=r[l];n[c]&&(Object.defineProperty(s,c,n[c]),delete n[c])}return s},a=r=>i(Array.isArray(r)?r:o.filter(r));return t.map(a).concat(i(o))}var Tx=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const Px="_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_default,_optional,_open,_closed,_fullscreen,_loading,_currentPage,_currentStep,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_starting,_complete,_incomplete,_collapsed,_current,_hidden,_off,_on,_today,_underValue,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base",Lf=new Set(Px.split(",")),Vx=/^@|&|&$/;function Lu(e){return Lf.has(e)||Vx.test(e)}const Dx=/^_/,Mx=/&|@/;function Rx(e){return e.map(t=>Lf.has(t)?t.replace(Dx,""):Mx.test(t)?`[${Mf(t.trim())}]`:t)}function Fx(e){return e.sort((t,n)=>{const o=Lu(t),i=Lu(n);return o&&!i?1:!o&&i?-1:0})}const Ax="aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,textStyle:textStyle",Nf=new Map,Bf=new Map;Ax.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");Nf.set(t,o),i.length&&i.forEach(a=>{Bf.set(a==="1"?o:a,t)})});const Nu=e=>Bf.get(e)||e,zf={conditions:{shift:Fx,finalize:Rx,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Nu(e);return{className:`${Nf.get(n)||Ex(n)}_${Mf(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Nu}},Lx=wx(zf),ot=(...e)=>Lx(po(...e));ot.raw=(...e)=>po(...e);const{mergeCss:po}=_x(zf),Bu=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function Do(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=Bu(e),a=u=>({...o,...Pd(u)});function r(u={}){var p;const m=a(u);let g={...t};for(const[f,y]of Object.entries(m))(p=n[f])!=null&&p[y]&&(g=po(g,n[f][y]));const v=Nx(i,m);return po(g,v)}function s(u){const p=Bu(u.config),m=Tx(u.variantKeys,Object.keys(n));return Do({base:po(t,p.base),variants:Object.fromEntries(m.map(g=>[g,po(n[g],p.variants[g])])),defaultVariants:Vd(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(u){return ot(r(u))}const c=Object.keys(n);function d(u){return Af(u,c)}const h=Object.fromEntries(Object.entries(n).map(([u,p])=>[u,Object.keys(p)]));return Object.assign(Pa(l),{__cva__:!0,variantMap:h,variantKeys:c,raw:r,config:e,merge:s,splitVariantProps:d,getVariantProps:a})}function Nx(e,t){let n={};return e.forEach(o=>{Object.entries(o).every(([i,a])=>i==="css"?!0:(Array.isArray(a)?a:[a]).some(r=>t[i]===r))&&(n=po(n,o.css))}),n}function Bx(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const zx=(e,t)=>e+"__"+t;function ne(e){const t=Object.entries($x(e)).map(([d,h])=>[d,Do(h)]),n=e.defaultVariants??{};function o(d){const h=t.map(([u,p])=>[u,Bx(p(d),e.className&&zx(e.className,u))]);return Object.fromEntries(h)}function i(d){const h=t.map(([u,p])=>[u,p.raw(d)]);return Object.fromEntries(h)}const a=e.variants??{},r=Object.keys(a);function s(d){return Af(d,r)}const l=d=>({...n||{},...Pd(d)}),c=Object.fromEntries(Object.entries(a).map(([d,h])=>[d,Object.keys(h)]));return Object.assign(Pa(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:r,splitVariantProps:s,getVariantProps:l})}var ie=(e,t=[])=>({parts:(...n)=>{if(Hx(t))return ie(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>ie(e,[...t,...n]),omit:(...n)=>ie(e,t.filter(o=>!n.includes(o))),rename:n=>ie(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,o)=>Object.assign(n,{[o]:{selector:[`&[data-scope="${Fo(e)}"][data-part="${Fo(o)}"]`,`& [data-scope="${Fo(e)}"][data-part="${Fo(o)}"]`].join(", "),attrs:{"data-scope":Fo(e),"data-part":Fo(o)}}}),{})}),Fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Hx=e=>e.length===0,jx=Object.defineProperty,Wx=(e,t,n)=>t in e?jx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dl=(e,t,n)=>Wx(e,typeof t!="symbol"?t+"":t,n);function Gx(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function Ux(e){if(!e)return;const t=e.selectionStart??0,n=e.selectionEnd??0;Math.abs(n-t)===0&&t===0&&e.setSelectionRange(e.value.length,e.value.length)}var zu=e=>Math.max(0,Math.min(1,e)),Yx=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),Ml=(...e)=>t=>e.reduce((n,o)=>o(n),t),ta=()=>{},qs=e=>typeof e=="object"&&e!==null,Hf=2147483647,j=e=>e?"":void 0,na=e=>e?"true":void 0,qx=1,Kx=9,Xx=11,ke=e=>qs(e)&&e.nodeType===qx&&typeof e.nodeName=="string",Ks=e=>qs(e)&&e.nodeType===Kx,Zx=e=>qs(e)&&e===e.window,jf=e=>ke(e)?e.localName||"":"#document";function Jx(e){return["html","body","#document"].includes(jf(e))}var Qx=e=>qs(e)&&e.nodeType!==void 0,di=e=>Qx(e)&&e.nodeType===Xx&&"host"in e,e0=e=>ke(e)&&e.localName==="input",Go=e=>!!(e!=null&&e.matches("a[href]")),t0=e=>ke(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function vs(e){if(!e)return!1;const t=e.getRootNode();return da(t)===e}var n0=/(textarea|select)/;function Xs(e){if(e==null||!ke(e))return!1;try{return e0(e)&&e.selectionStart!=null||n0.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Ye(e,t){var n;if(!e||!t||!ke(e)||!ke(t))return!1;const o=(n=t.getRootNode)==null?void 0:n.call(t);if(e===t||e.contains(t))return!0;if(o&&di(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function dt(e){return Ks(e)?e:Zx(e)?e.document:e?.ownerDocument??document}function o0(e){return dt(e).documentElement}function Ce(e){var t;return di(e)?Ce(e.host):Ks(e)?e.defaultView??window:ke(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function da(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function i0(e){if(jf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||di(e)&&e.host||o0(e);return di(t)?t.host:t}function Dd(e){let t;try{if(t=e.getRootNode({composed:!0}),Ks(t)||di(t))return t}catch{}return e.ownerDocument??document}var Rl=new WeakMap;function ui(e){return Rl.has(e)||Rl.set(e,Ce(e).getComputedStyle(e)),Rl.get(e)}var Md=new Set(["menu","listbox","dialog","grid","tree","region"]),a0=e=>Md.has(e),Wf=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Gf(e,t){const n=new Set,o=Dd(e),i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=Wf(s);for(const c of l){if(!c||n.has(c))continue;n.add(c);const d=o.getElementById(c);if(d){const h=d.getAttribute("role"),u=d.getAttribute("aria-modal")==="true";if(h&&a0(h)&&!u&&(d===t||d.contains(t)||i(d)))return!0}}}return!1};return i(e)}function Uf(e,t){const n=Dd(e),o=new Set,i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=Wf(s);for(const c of l){if(!c||o.has(c))continue;o.add(c);const d=n.getElementById(c);if(d){const h=d.getAttribute("role"),u=d.getAttribute("aria-modal")==="true";h&&Md.has(h)&&!u&&(t(d),i(d))}}}};i(e)}function r0(e){const t=new Set;return Uf(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function s0(e){const t=e.getAttribute("role");return!!(t&&Md.has(t))}function l0(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function c0(e){var t;return l0(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function d0(e){if(!e.id)return!1;const t=Dd(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&s0(e))}var Zs=()=>typeof document<"u";function u0(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function h0(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var Rd=e=>Zs()&&e.test(u0()),Yf=e=>Zs()&&e.test(h0()),p0=e=>Zs()&&e.test(navigator.vendor),Hu=()=>Zs()&&!!navigator.maxTouchPoints,g0=()=>Rd(/^iPhone/i),f0=()=>Rd(/^iPad/i)||Js()&&navigator.maxTouchPoints>1,Fd=()=>g0()||f0(),m0=()=>Js()||Fd(),Js=()=>Rd(/^Mac/i),Ad=()=>m0()&&p0(/apple/i),v0=()=>Yf(/Firefox/i),b0=()=>Yf(/Android/i);function y0(e){var t,n,o;return((t=e.composedPath)==null?void 0:t.call(e))??((o=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:o.call(n))}function be(e){const t=y0(e);return t?.[0]??e.target}function $c(e){return k0(e).isComposing||e.keyCode===229}function x0(e){return e.pointerType===""&&e.isTrusted?!0:b0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Nr=e=>e.button===0,w0=e=>e.button===2||Js()&&e.ctrlKey&&e.button===0,En=e=>e.ctrlKey||e.altKey||e.metaKey,C0=e=>"touches"in e&&e.touches.length>0,_0={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ju={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Ic(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=_0[i]??i,n==="rtl"&&o==="horizontal"&&i in ju&&(i=ju[i]),i}function k0(e){return e.nativeEvent??e}function Tc(e,t="client"){const n=C0(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var se=(e,t,n,o)=>{const i=typeof e=="function"?e():e;return i?.addEventListener(t,n,o),()=>{i?.removeEventListener(t,n,o)}};function qf(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=Ce(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function S0(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Ot(e,t,n="value"){var o;if(!e)return;const i=S0(e);i&&((o=qf(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function Ld(e,t){var n;e&&((n=qf(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function Kf(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=Ce(e);e instanceof i.HTMLInputElement&&(Ot(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function Xf(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=Ce(e);e instanceof i.HTMLInputElement&&(Ld(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function E0(e){return O0(e)?e.form:e.closest("form")}function O0(e){return e.matches("textarea, input, select, button")}function $0(e,t){if(!e)return;const n=E0(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function I0(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const o=Ce(n),i=new o.MutationObserver(()=>t(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function bi(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[$0(e,o),I0(e,n)];return()=>i.forEach(a=>a?.())}var Zf=e=>ke(e)&&e.tagName==="IFRAME",T0=/^(audio|video|details)$/;function Jf(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var P0=e=>!Number.isNaN(Jf(e)),V0=e=>Jf(e)<0;function D0(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function Qf(e,t,n){const o=[...e],i=[...e],a=new Set,r=new Map;e.forEach((l,c)=>r.set(l,c));let s=0;for(;s<i.length;){const l=i[s++];if(!l||a.has(l))continue;a.add(l);const c=D0(l,t);if(c){const d=Array.from(c.querySelectorAll(Qs)).filter(n),h=r.get(l);if(h!==void 0){const u=h+1;o.splice(u,0,...d),d.forEach((p,m)=>{r.set(p,u+m)});for(let p=u+d.length;p<o.length;p++)r.set(o[p],p)}else{const u=o.length;o.push(...d),d.forEach((p,m)=>{r.set(p,u+m)})}i.push(...d)}}return o}var Qs="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",em=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Qs));(n==!0||n=="if-empty"&&i.length===0)&&ke(e)&&gn(e)&&i.unshift(e);const a=[];for(const r of i)if(gn(r)){if(Zf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...em(s,{getShadowRoot:o}));continue}a.push(r)}return o?Qf(a,o,gn):a};function gn(e){return!ke(e)||e.closest("[inert]")?!1:e.matches(Qs)&&t0(e)}function Va(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Qs));n&&go(e)&&i.unshift(e);const a=[];for(const r of i)if(go(r)){if(Zf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...Va(s,{getShadowRoot:o}));continue}a.push(r)}if(o){const r=Qf(a,o,go);return!r.length&&n?i:r}return!a.length&&n?i:a}function go(e){return ke(e)&&e.tabIndex>0?!0:gn(e)&&!V0(e)}function M0(e,t={}){const n=Va(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function $i(e){return e.tabIndex<0&&(T0.test(e.localName)||Xs(e))&&!P0(e)?0:e.tabIndex}function Nd(e){const{root:t,getInitialEl:n,filter:o,enabled:i=!0}=e;if(!i)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t?.querySelector("[data-autofocus],[autofocus]")),!a){const r=Va(t);a=o?r.filter(o)[0]:r[0]}return a||t||void 0}function R0(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=M0(t);return!(vs(n)&&e.shiftKey||vs(o)&&!e.shiftKey||!n&&!o)}var tm=class nm{constructor(){Dl(this,"id",null),Dl(this,"fn_cleanup"),Dl(this,"cleanup",()=>{this.cancel()})}static create(){return new nm}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t?.()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function J(e){const t=tm.create();return t.request(e),t.cleanup}function el(e){const t=new Set;function n(o){const i=globalThis.requestAnimationFrame(o);t.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function F0(e,t,n){const o=J(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function A0(e,t){if(!e)return;const{attributes:n,callback:o}=t,i=e.ownerDocument.defaultView||window,a=new i.MutationObserver(r=>{for(const s of r)s.type==="attributes"&&s.attributeName&&n.includes(s.attributeName)&&o(s)});return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}function Da(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(A0(a,t))})),()=>{i.forEach(a=>a?.())}}function L0(e,t){const{callback:n}=t;if(!e)return;const o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(n);return i.observe(e,{childList:!0,subtree:!0}),()=>i.disconnect()}function N0(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(L0(a,t))})),()=>{i.forEach(a=>a?.())}}function om(e){const t=()=>{const n=Ce(e);e.dispatchEvent(new n.MouseEvent("click"))};v0()?F0(e,"keyup",t):queueMicrotask(t)}function bs(e){const t=i0(e);return Jx(t)?dt(t).body:ke(t)&&Bd(t)?t:bs(t)}function im(e,t=[]){const n=bs(e),o=n===e.ownerDocument.body,i=Ce(n);return o?t.concat(i,i.visualViewport||[],Bd(n)?n:[]):t.concat(n,im(n,[]))}var B0=/auto|scroll|overlay|hidden|clip/,z0=new Set(["inline","contents"]);function Bd(e){const t=Ce(e),{overflow:n,overflowX:o,overflowY:i,display:a}=t.getComputedStyle(e);return B0.test(n+i+o)&&!z0.has(a)}function H0(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function xa(e,t){const{rootEl:n,...o}=t||{};!e||!n||!Bd(n)||!H0(n)||e.scrollIntoView(o)}function am(e,t){const{left:n,top:o,width:i,height:a}=t.getBoundingClientRect(),r={x:e.x-n,y:e.y-o},s={x:zu(r.x/i),y:zu(r.y/a)};function l(c={}){const{dir:d="ltr",orientation:h="horizontal",inverted:u}=c,p=typeof u=="object"?u.x:u,m=typeof u=="object"?u.y:u;return h==="horizontal"?d==="rtl"||p?1-s.x:s.x:m?1-s.y:s.y}return{offset:r,percent:s,getPercentValue:l}}function j0(e,t){const n=e.body,o="pointerLockElement"in e||"mozPointerLockElement"in e,i=()=>!!e.pointerLockElement;function a(){}function r(l){i(),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!o)return;try{n.requestPointerLock()}catch{}const s=[se(e,"pointerlockchange",a,!1),se(e,"pointerlockerror",r,!1)];return()=>{s.forEach(l=>l()),e.exitPointerLock()}}var Qo="default",Pc="",Br=new WeakMap;function W0(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return Fd()?(Qo==="default"&&(Pc=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Qo="disabled"):t&&(Br.set(t,t.style.userSelect),t.style.userSelect="none"),()=>rm({target:t,doc:o})}function rm(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if(Fd()){if(Qo!=="disabled")return;Qo="restoring",setTimeout(()=>{el(()=>{Qo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Pc||""),Pc="",Qo="default")})},300)}else if(t&&Br.has(t)){const i=Br.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),Br.delete(t)}}function zd(e={}){const{defer:t,target:n,...o}=e,i=t?J:r=>r(),a=[];return a.push(i(()=>{const r=typeof n=="function"?n():n;a.push(W0({...o,target:r}))})),()=>{a.forEach(r=>r?.())}}function sm(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=Tc(s),c=Math.sqrt(l.x**2+l.y**2),d=s.pointerType==="touch"?10:5;if(!(c<d)){if(s.pointerType==="mouse"&&s.button===0){a(s);return}n({point:l,event:s})}},a=s=>{const l=Tc(s);o({point:l,event:s})},r=[se(e,"pointermove",i,!1),se(e,"pointerup",a,!1),se(e,"pointercancel",a,!1),se(e,"contextmenu",a,!1),zd({doc:e})];return()=>{r.forEach(s=>s())}}function lm(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:a,isValidKey:r=f=>f.key==="Enter"}=e;if(!t)return ta;const s=Ce(t);let l=ta,c=ta,d=ta;const h=f=>({point:Tc(f),event:f});function u(f){i?.(h(f))}function p(f){a?.(h(f))}const m=se(t,"pointerdown",f=>{c();const y=se(s,"pointerup",w=>{const k=be(w);Ye(t,k)?o?.(h(w)):a?.(h(w))},{passive:!o,once:!0}),x=se(s,"pointercancel",p,{passive:!a,once:!0});c=Ml(y,x),vs(n)&&f.pointerType==="mouse"&&f.preventDefault(),u(f)},{passive:!i}),g=se(n,"focus",v);l=Ml(m,g);function v(){const f=k=>{if(!r(k))return;const S=_=>{if(!r(_))return;const E=new s.PointerEvent("pointerup"),V=h(E);o?.(V),a?.(V)};c(),c=se(n,"keyup",S);const O=new s.PointerEvent("pointerdown");u(O)},y=()=>{const k=new s.PointerEvent("pointercancel");p(k)},x=se(n,"keydown",f),w=se(n,"blur",y);d=Ml(x,w)}return()=>{l(),c(),d()}}function Gn(e,t){return Array.from(e?.querySelectorAll(t)??[])}function cm(e,t){return e?.querySelector(t)??null}var Hd=e=>e.id;function G0(e,t,n=Hd){return e.find(o=>n(o)===t)}function tl(e,t,n=Hd){const o=G0(e,t,n);return o?e.indexOf(o):-1}function jd(e,t,n=!0){let o=tl(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function Wd(e,t,n=!0){let o=tl(e,t);return o===-1?n?e[e.length-1]:null:(o=n?(o-1+e.length)%e.length:Math.max(0,o-1),e[o])}var U0=e=>e.split("").map(t=>{const n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),Y0=e=>{var t;return U0(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},q0=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function K0(e,t,n,o=Hd){const i=n?tl(e,n,o):-1;let a=n?Yx(e,i):e;return t.length===1&&(a=a.filter(r=>o(r)!==n)),a.find(r=>q0(Y0(r),t))}function X0(e,t,n){const o=e.getAttribute(t),i=o!=null;return e.setAttribute(t,n),()=>{i?e.setAttribute(t,o):e.removeAttribute(t)}}function Gd(e,t){if(!e)return ta;const n=Object.keys(t).reduce((o,i)=>(o[i]=e.style.getPropertyValue(i),o),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function Z0(e,t){const{state:n,activeId:o,key:i,timeout:a=350,itemToId:r}=t,s=n.keysSoFar+i,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s;let c=e.slice();const d=K0(c,l,o,r);function h(){clearTimeout(n.timer),n.timer=-1}function u(p){n.keysSoFar=p,h(),p!==""&&(n.timer=+setTimeout(()=>{u(""),h()},a))}return u(s),d}var vn=Object.assign(Z0,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:J0});function J0(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var nl={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function Q0(e,t,n){const{signal:o}=t;return[new Promise((i,a)=>{const r=setTimeout(()=>{a(new Error(`Timeout of ${n}ms exceeded`))},n);o.addEventListener("abort",()=>{clearTimeout(r),a(new Error("Promise aborted"))}),e.then(s=>{o.aborted||(clearTimeout(r),i(s))}).catch(s=>{o.aborted||(clearTimeout(r),a(s))})}),()=>t.abort()]}function ew(e,t){const{timeout:n,rootNode:o}=t,i=Ce(o),a=dt(o),r=new i.AbortController;return Q0(new Promise(s=>{const l=e();if(l){s(l);return}const c=new i.MutationObserver(()=>{const d=e();d&&d.isConnected&&(c.disconnect(),s(d))});c.observe(a.body,{childList:!0,subtree:!0})}),r,n)}var tw=Object.defineProperty,dm=e=>{throw TypeError(e)},nw=(e,t,n)=>t in e?tw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,On=(e,t,n)=>nw(e,typeof t!="symbol"?t+"":t,n),ow=(e,t,n)=>t.has(e)||dm("Cannot "+n),Wu=(e,t,n)=>(ow(e,t,"read from private field"),t.get(e)),iw=(e,t,n)=>t.has(e)?dm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function zr(e){return e==null?[]:Array.isArray(e)?e:[e]}var aw=e=>Array.from(Array(e).keys()),ii=e=>e[0],ol=e=>e[e.length-1],rw=(e,t)=>e.indexOf(t)!==-1,un=(e,...t)=>e.concat(t),Co=(e,...t)=>e.filter(n=>!t.includes(n)),Gu=(e,t)=>e.filter((n,o)=>o!==t),Ht=e=>Array.from(new Set(e)),Fl=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},So=(e,t)=>rw(e,t)?Co(e,t):un(e,t);function ys(e,t,n={}){const{step:o=1,loop:i=!0}=n,a=t+o,r=e.length,s=r-1;return t===-1?o>0?0:s:a<0?i?s:0:a>=r?i?0:t>r?r:t:a}function sw(e,t,n={}){return e[ys(e,t,n)]}function um(e,t,n={}){const{step:o=1,loop:i=!0}=n;return ys(e,t,{step:-o,loop:i})}function lw(e,t,n={}){return e[um(e,t,n)]}function hm(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(hm(n)):t.concat(n),[])}function Uu(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Yu=e=>e?.constructor.name==="Array",cw=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Ne(e[n],t[n]))return!1;return!0},Ne=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Yu(e)&&Yu(t))return cw(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),o=n.length;for(let i=0;i<o;i++)if(!Reflect.has(e,n[i]))return!1;for(let i=0;i<o;i++){const a=n[i];if(!Ne(e[a],t[a]))return!1}return!0},ei=e=>Array.isArray(e),dw=e=>e===!0||e===!1,pm=e=>e!=null&&typeof e=="object",fo=e=>pm(e)&&!ei(e),ua=e=>typeof e=="string",Ln=e=>typeof e=="function",uw=e=>e==null,Nn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),hw=e=>Object.prototype.toString.call(e),gm=Function.prototype.toString,pw=gm.call(Object),gw=e=>{if(!pm(e)||hw(e)!="[object Object]"||vw(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Nn(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&gm.call(n)==pw},fw=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,mw=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,vw=e=>fw(e)||mw(e),Ua=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,bw=()=>{},wa=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},fm=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Bt(e,t,...n){var o;if(e in t){const a=t[e];return Ln(a)?a(...n):a}const i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(o=Error.captureStackTrace)==null||o.call(Error,i,Bt),i}var mm=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,mm)),t?.()}},{floor:vm,abs:qu,round:il,min:yw,max:xw,pow:ww,sign:Cw}=Math,Vc=e=>Number.isNaN(e),Zn=e=>Vc(e)?0:e,bm=(e,t)=>(e%t+t)%t,_w=(e,t)=>(e%t+t)%t,kw=(e,t)=>Zn(e)>=t,Sw=(e,t)=>Zn(e)<=t,ym=(e,t,n)=>{const o=Zn(e),i=t==null||o>=t,a=n==null||o<=n;return i&&a},Ew=(e,t,n)=>il((Zn(e)-t)/n)*n+t,Le=(e,t,n)=>yw(xw(Zn(e),t),n),Ow=(e,t,n)=>(Zn(e)-t)/(n-t),$w=(e,t,n,o)=>Le(Ew(e*(n-t)+t,t,o),t,n),Ku=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),a=i>=0?o.length-i:0;if(a>0){let r=ww(10,a);n=il(n*r)/r}return n},Al=(e,t)=>typeof t=="number"?vm(e*t+.5)/t:il(e),Xu=(e,t,n,o)=>{const i=t!=null?Number(t):0,a=Number(n),r=(e-i)%o;let s=qu(r)*2>=o?e+Cw(r)*(o-qu(r)):e-r;if(s=Ku(s,o),!Vc(i)&&s<i)s=i;else if(!Vc(a)&&s>a){const l=vm((a-i)/o),c=i+l*o;s=l<=0||c<i?a:c}return Ku(s,o)},fe=(e,t=0,n=10)=>{const o=Math.pow(n,t);return il(e*o)/o},Zu=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},xm=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(Zu(e),Zu(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},Iw=(e,t)=>xm(Zn(e),"+",t),Tw=(e,t)=>xm(Zn(e),"-",t),$n=e=>typeof e=="number"?`${e}px`:e;function al(e){if(!gw(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(o=>typeof o=="string"),n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=al(i))}return n}function Rn(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function Pw(e,t=Object.is){let n={...e};const o=new Set,i=r=>(o.add(r),()=>o.delete(r)),a=()=>{o.forEach(r=>r())};return{subscribe:i,get:r=>n[r],set:(r,s)=>{t(n[r],s)||(n[r]=s,a())},update:r=>{let s=!1;for(const l in r){const c=r[l];c!==void 0&&!t(n[l],c)&&(n[l]=c,s=!0)}s&&a()},snapshot:()=>({...n})}}var Ya=()=>performance.now(),Hr,Vw=class{constructor(t){this.onTick=t,On(this,"frameId",null),On(this,"pausedAtMs",null),On(this,"context"),On(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),On(this,"setStartMs",n=>{this.context.startMs=n}),On(this,"start",()=>{if(this.frameId!==null)return;const n=Ya();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(Wu(this,Hr))}),On(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=Ya())}),On(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),iw(this,Hr,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Wu(this,Hr))}),this.context={now:0,startMs:Ya(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:Ya()-this.context.startMs}};Hr=new WeakMap;function Ll(e,t){const n=new Vw(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function bn(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Dw(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Ud(e,t){if(e==null)throw new Error(t())}function Yd(e,t,n){let o=[];for(const i of t)e[i]==null&&o.push(i);if(o.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${o.join(", ")}`)}var Mw=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Rw=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ju=e=>{const t={};let n;for(;n=Rw.exec(e);)t[n[1]]=n[2];return t},Fw=(e,t)=>{if(ua(e)){if(ua(t))return`${e};${t}`;e=Ju(e)}else ua(t)&&(t=Ju(t));return Object.assign({},e??{},t??{})};function rl(...e){let t={};for(let n of e){if(!n)continue;for(let i in t){if(i.startsWith("on")&&typeof t[i]=="function"&&typeof n[i]=="function"){t[i]=wa(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=Mw(t[i],n[i]);continue}if(i==="style"){t[i]=Fw(t[i],n[i]);continue}t[i]=n[i]!==void 0?n[i]:t[i]}for(let i in n)t[i]===void 0&&(t[i]=n[i]);const o=Object.getOwnPropertySymbols(n);for(let i of o)t[i]=n[i]}return t}function Dc(e,t,n){let o=[],i;return a=>{const r=e(a);return(r.length!==o.length||r.some((s,l)=>!Ne(o[l],s)))&&(o=r,i=t(r,a)),i}}function ze(){return{and:(...e)=>function(t){return e.every(n=>t.guard(n))},or:(...e)=>function(t){return e.some(n=>t.guard(n))},not:e=>function(t){return!t.guard(e)}}}function sl(){return{guards:ze(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var Uo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Uo||{}),Nl="__init__";function Aw(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>dt(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>da(t()),isActiveElement:vs,getById:o=>t().getElementById(o)}}function Lw(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var Y=()=>e=>Array.from(new Set(e)),wm=ie("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator");wm.build();var Cm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},_m=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:o.call(n,t))??`accordion:${e.id}:trigger:${t}`},Nw=e=>e.getById(Cm(e)),ll=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(Cm(e))}']:not([disabled])`;return Gn(Nw(e),t)},Bw=e=>ii(ll(e)),zw=e=>ol(ll(e)),Hw=(e,t)=>jd(ll(e),_m(e,t)),jw=(e,t)=>Wd(ll(e),_m(e,t)),{and:Ww,not:Gw}=ze();Ww("isExpanded","canToggle"),Gw("isExpanded");Y()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);Y()(["value","disabled"]);const Uw={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}};ne({slots:[...wm.keys(),"itemTriggerPrefix","itemTriggerContent"],base:{root:{width:"100%",display:"flex",flexDirection:"column",fontFamily:"sans"},item:{borderBottom:"1px solid {colors.border.muted}",borderRadius:"lg",backgroundColor:"background.default",_hover:{backgroundColor:"background.hover"}},itemTrigger:{width:"100%",paddingX:"8",paddingY:"8",cursor:"pointer",display:"flex",gap:"8",alignItems:"center",textAlign:"left",border:"none",outline:"none",backgroundColor:"transparent",color:"text.normal",fontSize:"base",fontWeight:"medium",lineHeight:"lg",fontStyle:"normal",letterSpacing:"normal"},itemTriggerPrefix:{padding:"2","& > svg":{display:"block"}},itemTriggerContent:{flex:"1",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8"},itemContent:{backgroundColor:"transparent",color:"text.subtle",fontSize:"small",fontWeight:"normal",fontStyle:"normal",lineHeight:"150%",letterSpacing:"0%",padding:"8",paddingTop:"4",animation:"collapse-in",_closed:{animation:"collapse-out"}},itemIndicator:{width:"24",height:"24",display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center",transitionDuration:"200ms",transitionProperty:"transform",transitionTimingFunction:"{easings.default}",_open:{transform:"rotate(180deg)"}}},variants:{variant:Uw},defaultVariants:{variant:"default"}});function Yw(e){const t=Ta(),n=t?.type.emits,o={};n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`);for(const i of n)o[Uy(If(i))]=(...a)=>e(i,...a);return o}function qw(e){const t=Ta(),n=Object.keys(t?.type.props??{}).reduce((i,a)=>{const r=(t?.type.props[a]).default;return r!==void 0&&(i[a]=r),i},{}),o=Tf(e);return F(()=>{const i={},a=t?.vnode.props??{};return Object.keys(a).forEach(r=>{i[If(r)]=a[r]}),Object.keys({...n,...i}).reduce((r,s)=>(o.value[s]!==void 0&&(r[s]=o.value[s]),r),{})})}function _t(e,t){const n=qw(e),o=t?Yw(t):{};return F(()=>({...n.value,...o}))}const we=e=>{const t=Symbol(e);return[n=>$d(t,n),n=>Xn(t,n),t]},[yi,qd]=we("RenderStrategyProps");function Kw(e){const t=Me(e);return t?.$el??t}const Xw=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function q(){const e=Ta(),t=ve(),n=F(()=>{var r,s;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:Kw(t)}),o=Object.assign({},e.exposed),i={};for(const r in e.props)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>e.props[r]});if(Object.keys(o).length>0)for(const r in o)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>o[r]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(r){t.value=r,!(Xw(r)||!r)&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>r.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}const Zw=P({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=km(n.default()),[a,...r]=i;if(Object.keys(t).length>0){(o=a.props)==null||delete o.ref;const s=rl(t,a.props??{}),l=Yy(a,s);for(const c in s)c.startsWith("on")&&(l.props||(l.props={}),l.props[c]=s[c]);return i.length===1?l:[l,...r]}return i}}});function km(e){return e?e.flatMap(t=>t.type===Oe?km(t.children):[t]):[]}const Jw="br, hr, img, input, area, textarea".split(", "),Qw=e=>typeof e=="string"&&Jw.includes(e),Bl=e=>P({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>yt(Zw,n,o):()=>{var i;return yt(e,n,Qw(e)||(i=o.default)==null?void 0:i.call(o))}}});function eC(){const e=new Map;return new Proxy(Bl,{apply(t,n,o){return Bl(o[0])},get(t,n){return e.has(n)||e.set(n,Bl(n)),e.get(n)}})}const X=eC(),[Sm,cl]=we("CollapsibleContext"),tC=P({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=cl();return q(),(n,o)=>b(t).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getContentProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),nC=P({__name:"collapsible-context",setup(e){const t=cl();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),oC=P({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return Sm(n),q(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var iC=ie("collapsible").parts("root","trigger","content","indicator"),qa=iC.build(),aC=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},Mc=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},rC=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},Ii=e=>e.getById(Mc(e));function sC(e,t){const{state:n,send:o,context:i,scope:a,prop:r}=e,s=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:d,height:h}=i.get("size"),u=!!r("disabled"),p=r("collapsedHeight"),m=r("collapsedWidth"),g=p!=null,v=m!=null,f=g||v,y=!i.get("initial")&&l;return{disabled:u,visible:s,open:l,measureSize(){o({type:"size.measure"})},setOpen(x){n.matches("open")!==x&&o({type:x?"open":"close"})},getRootProps(){return t.element({...qa.root.attrs,"data-state":l?"open":"closed",dir:r("dir"),id:aC(a)})},getContentProps(){return t.element({...qa.content.attrs,id:Mc(a),"data-collapsible":"","data-state":y?void 0:l?"open":"closed","data-disabled":j(u),"data-has-collapsed-size":j(f),hidden:!s&&!f,dir:r("dir"),style:{"--height":$n(h),"--width":$n(d),"--collapsed-height":$n(p),"--collapsed-width":$n(m),...c&&g&&{overflow:"hidden",minHeight:$n(p),maxHeight:$n(p)},...c&&v&&{overflow:"hidden",minWidth:$n(m),maxWidth:$n(m)}}})},getTriggerProps(){return t.element({...qa.trigger.attrs,id:rC(a),dir:r("dir"),type:"button","data-state":l?"open":"closed","data-disabled":j(u),"aria-controls":Mc(a),"aria-expanded":s||!1,onClick(x){x.defaultPrevented||u||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...qa.indicator.attrs,dir:r("dir"),"data-state":l?"open":"closed","data-disabled":j(u)})}}}var lC={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["clearInitial","cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n;const o=J(()=>{const i=Ii(t);if(!i)return;const a=ui(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=s=>{be(s)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r),n=()=>{i.removeEventListener("animationend",r)}});return()=>{o(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n;const o=J(()=>{const i=Ii(t);if(!i)return;const a=ui(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=l=>{be(l)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r);const s=Gd(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",r),el(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=Ii(e);if(!n)return;const o=()=>{const r=Va(n).map(s=>X0(s,"inert",""));return()=>{r.forEach(s=>s())}};let i=o();const a=N0(n,{callback(){i(),i=o()}});return()=>{i(),a()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{const n=Ii(t);if(!n)return;const{height:o,width:i}=n.getBoundingClientRect();e.set("size",{height:o,width:i})},computeSize:({refs:e,scope:t,context:n})=>{var o;(o=e.get("cleanup"))==null||o();const i=J(()=>{const a=Ii(t);if(!a)return;const r=a.hidden;a.style.animationName="none",a.style.animationDuration="0s",a.hidden=!1;const s=a.getBoundingClientRect();n.set("size",{height:s.height,width:s.width}),n.get("initial")&&(a.style.animationName="",a.style.animationDuration=""),a.hidden=r});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}};Y()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]);function cC(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Qu={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},dC="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function uC(e){return e in Qu?Qu[e]:e.startsWith("on")?`on${cC(e.substr(2))}`:dC.includes(e)?e:e.toLowerCase()}var qt=Lw(e=>{const t={};for(const n in e){const o=e[n];n==="children"?typeof o=="string"&&(t.innerHTML=o):t[uC(n)]=e[n]}return t});function xs(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=fs(t),i=F(()=>e().value!==void 0),a=fs(i.value?e().value:o.value);return{initial:t,ref:a,get(){return i.value?e().value:o.value},set(r){var s,l;const c=i.value?e().value:o.value,d=Ln(r)?r(c):r;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:d,prev:c}),i.value||(o.value=d),n(d,c)||(l=(s=e()).onChange)==null||l.call(s,d,c)},invoke(r,s){var l,c;(c=(l=e()).onChange)==null||c.call(l,r,s)},hash(r){var s,l;return((l=(s=e()).hash)==null?void 0:l.call(s,r))??String(r)}}}xs.cleanup=e=>{Td(()=>e())};xs.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function hC(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var pC=(e,t)=>{Re(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let a=0;a<n.length;a++)if(!Ne(o[a],Me(n[a]))){i=!0;break}i&&t()})};function Dt(e,t={}){var n,o,i;const a=F(()=>{const{id:$,ids:R,getRootNode:K}=Me(t);return Aw({id:$,ids:R,getRootNode:K})}),r=(...$)=>{e.debug&&console.log(...$)},s=F(()=>{var $;return(($=e.props)==null?void 0:$.call(e,{props:al(Me(t)),get scope(){return a.value}}))??Me(t)}),l=gC(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:xs,get scope(){return a.value},flush:eh,getContext(){return d},getComputed(){return O},getRefs(){return f},getEvent(){return g()}}),d={get($){var R;return(R=c[$])==null?void 0:R.get()},set($,R){var K;(K=c[$])==null||K.set(R)},initial($){var R;return(R=c[$])==null?void 0:R.initial},hash($){var R,K;const D=(R=c[$])==null?void 0:R.get();return(K=c[$])==null?void 0:K.hash(D)}};let h=new Map,u=null,p={current:null},m={current:{type:""}};const g=()=>({...m.current,current(){return m.current},previous(){return p.current}}),v=()=>({..._,matches(...$){const R=_.get();return $.includes(R)},hasTag($){var R,K;const D=_.get();return!!((K=(R=e.states[D])==null?void 0:R.tags)!=null&&K.includes($))}}),f=hC(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:d}))??{}),y=()=>({state:v(),context:d,event:g(),prop:l,send:V,action:x,guard:w,track:pC,refs:f,computed:O,flush:eh,get scope(){return a.value},choose:S}),x=$=>{const R=Ln($)?$(y()):$;if(!R)return;const K=R.map(D=>{var M,A;const U=(A=(M=e.implementations)==null?void 0:M.actions)==null?void 0:A[D];return U||bn(`[zag-js] No implementation found for action "${JSON.stringify(D)}"`),U});for(const D of K)D?.(y())},w=$=>{var R,K;return Ln($)?$(y()):(K=(R=e.implementations)==null?void 0:R.guards)==null?void 0:K[$](y())},k=$=>{const R=Ln($)?$(y()):$;if(!R)return;const K=R.map(M=>{var A,U;const G=(U=(A=e.implementations)==null?void 0:A.effects)==null?void 0:U[M];return G||bn(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),G}),D=[];for(const M of K){const A=M?.(y());A&&D.push(A)}return()=>D.forEach(M=>M?.())},S=$=>zr($).find(R=>{let K=!R.guard;return ua(R.guard)?K=!!w(R.guard):Ln(R.guard)&&(K=R.guard(y())),K}),O=$=>{Ud(e.computed,()=>"[zag-js] No computed object found on machine");const R=e.computed[$];return R({context:d,event:g(),prop:l,refs:f,get scope(){return a.value},computed:O})},_=xs(()=>({defaultValue:e.initialState({prop:l}),onChange($,R){var K,D,M;if(R){const U=h.get(R);U?.(),h.delete(R)}R&&x((K=e.states[R])==null?void 0:K.exit),x(u?.actions);const A=k((D=e.states[$])==null?void 0:D.effects);if(A&&h.set($,A),R===Nl){x(e.entry);const U=k(e.effects);U&&h.set(Nl,U)}x((M=e.states[$])==null?void 0:M.entry)}}));let E=Uo.NotStarted;js(()=>{const $=E===Uo.Started;E=Uo.Started,r($?"rehydrating...":"initializing..."),_.invoke(_.initial,Nl)}),qy(()=>{E=Uo.Stopped,r("unmounting...");const $=h.values();for(const R of $)R?.();h=new Map,x(e.exit)});const V=$=>{var R,K;if(E!==Uo.Started)return;p.current=m.current,m.current=$;let D=_.get();const M=((R=e.states[D].on)==null?void 0:R[$.type])??((K=e.on)==null?void 0:K[$.type]),A=S(M);if(!A)return;u=A;const U=A.target??D;r("transition",$.type,A.target||D,`(${A.actions})`);const G=U!==D;G?_.set(U):A.reenter&&!G?_.invoke(D,D):x(A.actions)};return(i=e.watch)==null||i.call(e,y()),{state:v(),send:V,context:d,prop:l,get scope(){return a.value},refs:f,computed:O,event:g(),getStatus:()=>E}}function gC(e){return function(t){return e.value[t]}}var eh=e=>{Id().then(()=>{e()})};const[o3,Kt]=we("EnvironmentContext"),Xt=F(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Cn=F(()=>({dir:"ltr",locale:"en-US"})),[i3,_n]=we("LocaleContext"),Jn=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},fC=(e={},t)=>{const n=Yt(),o=Kt(Xt),i=_n(Cn),a=F(()=>{const c=Me(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Jn(c),onExitComplete:()=>{var d;t?.("exitComplete"),(d=c.onExitComplete)==null||d.call(c)},onOpenChange:d=>{var h;t?.("openChange",d),t?.("update:open",d.open),(h=c.onOpenChange)==null||h.call(c,d)}}}),r=Dt(lC,a),s=F(()=>sC(r,qt)),l=ve(!1);return Re(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),F(()=>{const c=Me(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},mC=P({__name:"collapsible-root",props:wn({collapsedHeight:{},collapsedWidth:{},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:["exitComplete","openChange","update:open"],setup(e,{emit:t}){const n=fC(e,t);return Sm(n),q(),(o,i)=>(C(),T(b(X).div,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),vC=P({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cl();return q(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),bC=P({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=cl();return q(),(n,o)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Em=Object.freeze(Object.defineProperty({__proto__:null,Content:tC,Context:nC,Indicator:bC,Root:mC,RootProvider:oC,Trigger:vC},Symbol.toStringTag,{value:"Module"})),yC=()=>(e,t)=>t.reduce((n,o)=>{const[i,a]=n,r=o;return a[r]!==void 0&&(i[r]=a[r]),delete a[r],[i,a]},[{},{...e}]),xC={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function wC(e,t){return C(),H("svg",xC,[...t[0]||(t[0]=[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5531 5.90623L10.089 6.37027L7.6187 8.84055C7.27698 9.18232 6.72297 9.18232 6.38126 8.84055L3.91094 6.37027L3.4469 5.90623L4.37498 4.97815L4.83902 5.44219L6.99998 7.60315L9.16097 5.44219L9.62499 4.97815L10.5531 5.90623Z",fill:"currentColor"},null,-1)])])}const CC={render:wC},_C=ie("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");_C.build();const[a3,Qn]=we("FieldContext");function kC(e){if(!e)return;const t=ui(e);return"box-sizing:"+t.boxSizing+";border-left:"+t.borderLeftWidth+" solid red;border-right:"+t.borderRightWidth+" solid red;font-family:"+t.fontFamily+";font-feature-settings:"+t.fontFeatureSettings+";font-kerning:"+t.fontKerning+";font-size:"+t.fontSize+";font-stretch:"+t.fontStretch+";font-style:"+t.fontStyle+";font-variant:"+t.fontVariant+";font-variant-caps:"+t.fontVariantCaps+";font-variant-ligatures:"+t.fontVariantLigatures+";font-variant-numeric:"+t.fontVariantNumeric+";font-weight:"+t.fontWeight+";letter-spacing:"+t.letterSpacing+";margin-left:"+t.marginLeft+";margin-right:"+t.marginRight+";padding-left:"+t.paddingLeft+";padding-right:"+t.paddingRight+";text-indent:"+t.textIndent+";text-transform:"+t.textTransform}function SC(e){var t=e.createElement("div");return t.id="ghost",t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",e.body.appendChild(t),t}function EC(e){if(!e)return;const t=dt(e),n=Ce(e),o=SC(t),i=kC(e);i&&(o.style.cssText+=i);function a(){n.requestAnimationFrame(()=>{o.innerHTML=e.value;const r=n.getComputedStyle(o);e?.style.setProperty("width",r.width)})}return a(),e?.addEventListener("input",a),e?.addEventListener("change",a),()=>{t.body.removeChild(o),e?.removeEventListener("input",a),e?.removeEventListener("change",a)}}var Om=(e=>(e.ArrowUp="↑",e.ArrowDown="↓",e.ArrowLeft="←",e.ArrowRight="→",e.Enter="↵",e.Tab="⇥",e.Escape="Esc",e.Space="␣",e.Backspace="⌫",e.Delete="Del",e.PageUp="PgUp",e.PageDown="PgDn",e.Command="⌘",e.Control="CTRL",e))(Om||{});const OC={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},$C=Do({base:{display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",paddingX:"2",height:"14",textAlign:"center",fontFamily:"mono",fontSize:"xs",fontStyle:"normal",fontWeight:"regular",lineHeight:"sm",letterSpacing:"tight",textTransform:"uppercase",color:"text.subtle",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"},defaultVariants:{type:"default"},variants:{type:OC}}),ws=P({__name:"KeyboardKey",props:{type:{default:"default"},keys:{default:()=>[]},macKeys:{default:()=>[]},windowsKeys:{default:()=>[]},forcePlatform:{default:"mac"}},setup(e){const t=e,n=r=>r==="Ctrl"?"Control":r==="Meta"?"Command":r,o=r=>{const s=n(r);return Om[s]||r},i=ve("windows");Re(()=>t.forcePlatform,r=>{r&&(i.value=r)}),js(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const a=F(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(r,s)=>(C(),H("div",{class:N(b(ot)({display:"flex",columnGap:"3"}))},[(C(!0),H(Oe,null,Ue(a.value,l=>(C(),H("div",{key:l,class:N(b($C)({type:e.type}))},oe(o(l)),3))),128))],2))}}),IC=ne({className:"spinner",slots:["root","spinner","background","rotationWrapper"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center"},spinner:{width:"100%",height:"100%"},background:{position:"absolute",top:"0",left:"0"},rotationWrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",animation:"spin 1s linear infinite"}},variants:{variant:{default:{},inverted:{}},size:{sm:{root:{width:"16",height:"16"}},md:{root:{width:"24",height:"24"}},lg:{root:{width:"32",height:"32"}}}},defaultVariants:{variant:"default",size:"md"}}),TC=["aria-label"],PC=["fill"],VC=["fill"],$m=P({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=F(()=>IC({variant:t.variant,size:t.size})),o=F(()=>t.variant==="default"?"var(--colors-icon-selected)":"var(--colors-icon-inverse)");return(i,a)=>(C(),H("div",{class:N(n.value.root),"aria-label":t.ariaLabel,role:"status","data-testid":"spinner"},[(C(),H("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:N([n.value.spinner,n.value.background])},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,opacity:"0.3",d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z"},null,8,PC)],2)),z("div",{class:N([n.value.rotationWrapper,"spinner-rotate"])},[(C(),H("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:N(n.value.spinner)},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,d:"M12 4C9.38441 4 7.06204 5.25316 5.59909 7.20034C4.9356 8.08342 3.68185 8.26146 2.79876 7.59798C1.91568 6.93449 1.73764 5.68074 2.40113 4.79765C4.58709 1.88817 8.07337 0 12 0C18.6274 0 24 5.37257 24 12C24 18.6274 18.6274 24 12 24C10.8954 24 10 23.1046 10 22C10 20.8954 10.8954 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z"},null,8,VC)],2))],2)],10,TC))}}),DC=ne({slots:["root"],base:{root:{}},defaultVariants:{variant:"primary"},variants:{variant:{primary:{root:{color:"inherit"}},critical:{root:{color:"inherit"}},default:{root:{color:"inherit"}},subtle:{root:{color:"inherit"}},plainPrimary:{root:{color:"inherit"}},plainCritical:{root:{color:"inherit"}},dashed:{root:{color:"inherit"}},validation:{root:{color:"inherit"}},link:{root:{color:"inherit",textStyle:"body_small_medium"}}}}}),MC=P({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=F(()=>DC({variant:t.variant}));return(o,i)=>(C(),H("span",{class:N(n.value.root)},[L(o.$slots,"default",{},()=>[Be(oe(t.text),1)])],2))}}),Ve={primary:{_active:{background:"background.brand-bold-pressed !important"},color:"whitealpha.1000",background:"background.brand-bold-default",boxShadow:"stroke-bordered-interactive",_hover:{background:"background.brand-bold-hover"},_focus:{background:"background.brand-bold-default",boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},critical:{background:"colorPalette.700",color:"whitealpha.1000",boxShadow:"stroke-bordered-interactive",colorPalette:"red",_active:{background:"background.error-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.error-bold-default",boxShadow:"state-focus-critical"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},default:{background:"whitealpha.1000",color:"graycool.1000",colorPalette:"whitealpha",boxShadow:"stroke-bordered-interactive",_hover:{background:"graycoolalpha.10"},_active:{background:"background.pressed !important"},_focus:{boxShadow:"state-focus-primary",zIndex:"100000"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},subtle:{background:"whitealpha.1000",color:"text.subtle",_active:{background:"background.pressed !important"},_disabled:{background:"background.pressed"},_hover:{background:"background.hover"},_focus:{boxShadow:"state-focus-primary"}},plainPrimary:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"seed",_active:{background:"background.brand-selected-pressed !important",color:"text.brand-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-primary",color:"text.brand-default"}},plainCritical:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"red",_active:{background:"background.error-pressed !important",color:"text.error-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-critical",color:"text.error-default"}},dashed:{'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"},boxShadow:"stroke-bordered-interactive",background:"whitealpha.1000",color:"graycool.900",colorPalette:"whitealpha",border:"1px dashed",borderColor:"graycoolalpha.75",_active:{background:"background.hover !important",color:"text.normal"},_hover:{background:"graycoolalpha.10"},_focus:{boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},validation:{background:"colorPalette.700",color:"whitealpha.1000",colorPalette:"green",boxShadow:"stroke-bordered-interactive",_active:{background:"background.success-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.success-bold-default",boxShadow:"state-focus-success"},_disabled:{color:"graycoolalpha.75",background:"graycoolalpha.20",cursor:"not-allowed",_hover:{color:"graycoolalpha.75",background:"graycoolalpha.20"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},link:{background:"transparent",color:"text.brand-default",textStyle:"body_small_medium",padding:"0",height:"auto",_hover:{},_focus:{},_disabled:{color:"text.disabled",cursor:"not-allowed"}}},th={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},RC=ne({slots:["root","content","spinner","label","slots"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",fontSize:"base",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",_hidden:{display:"none"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},content:{display:"flex",alignItems:"center",gap:"6"},spinner:{width:"16",height:"16","&[data-loading]":{opacity:"0.7"}},label:{"&[data-loading]":{opacity:"0.7"}},slots:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:Ve.primary,spinner:{}},critical:{root:Ve.critical},default:{root:Ve.default},subtle:{root:Ve.subtle},plainPrimary:{root:Ve.plainPrimary},plainCritical:{root:Ve.plainCritical},dashed:{root:Ve.dashed},validation:{root:Ve.validation},link:{root:Ve.link}},size:{default:{root:{px:"12",py:"6",gap:"6"}},small:{root:{px:"8",py:"2",gap:"6"}}}}}),FC=["disabled","data-loading","data-selected","aria-busy"],An=P({__name:"Button",props:{type:{default:"primary"},size:{default:"default"},isLoading:{type:Boolean},isDisabled:{type:Boolean},label:{},isSelected:{type:Boolean,default:!1},shortcutKeys:{}},setup(e){const t=Ws(),n=e,o=F(()=>RC({type:n.type,size:n.size})),i=F(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),a=F(()=>t.prefix),r=F(()=>t.suffix);return(s,l)=>(C(),H("button",{disabled:n.isDisabled,"data-loading":n.isLoading||null,"data-selected":n.isSelected||null,"aria-busy":n.isLoading||void 0,class:N([o.value.root,b(ot)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[z("div",{class:N([o.value.content,n.isLoading?b(ot)({position:"relative"}):""])},[a.value?(C(),H("div",{key:0,class:N([o.value.slots,n.isLoading?b(ot)({visibility:"hidden"}):""])},[L(s.$slots,"prefix")],2)):Q("",!0),n.isLoading?(C(),T($m,{key:1,class:N([o.value.spinner,n.isLoading?b(ot)({position:"absolute",transform:"translate(-50%, -50%)",top:"50%",left:"50%"}):""]),variant:i.value,"data-loading":n.isLoading||null},null,8,["class","variant","data-loading"])):Q("",!0),z("div",{class:N([a.value?b(ot)({paddingRight:"2",display:"inline-flex"}):"",r.value?b(ot)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?b(ot)({visibility:"hidden"}):""])},[L(s.$slots,"default",{},()=>[n.label?(C(),T(MC,{key:0,text:n.label,variant:n.type},null,8,["text","variant"])):Q("",!0)])],2),r.value?(C(),H("div",{key:2,class:N([o.value.slots,n.isLoading?b(ot)({visibility:"hidden"}):""])},[L(s.$slots,"suffix")],2)):Q("",!0),n.shortcutKeys?(C(),H("div",{key:3,class:N([n.isLoading?b(ot)({visibility:"hidden"}):""])},[Z(ws,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):Q("",!0)],2)],10,FC))}}),AC={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},LC={default:{},chat:{root:{borderBottomRadius:"none"}}};ne({slots:["root","input","inputContainer","suffixButton","footer"],base:{root:{padding:"8",display:"flex",flexDirection:"column",gap:"8",background:"background.gray-subtlest-default",boxShadow:"stroke-container",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",borderRadius:"md",_hover:{backgroundColor:"background.gray-subtlest-hover"},_focus:{boxShadow:"state-focus-primary"},_focusWithin:{boxShadow:"state-focus-primary"}},inputContainer:{display:"flex",gap:"12"},input:{resize:"none",width:"100%",textAlign:"left",outline:"none",display:"flex",padding:"0",borderRadius:"none",borderTopLeftRadius:"md",border:"none",backgroundColor:"transparent",fontFamily:"sans",fontSize:"base",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_placeholder:{color:"text.placeholder"},_disabled:{backgroundColor:"background.disabled",color:"text.disabled",cursor:"not-allowed",_hover:{backgroundColor:"background.disabled"}}},suffixButton:{width:"fit-content",height:"fit-content",paddingX:"4 !important",paddingY:"4 !important"}},variants:{variant:LC,state:AC,disabled:{true:{root:{cursor:"not-allowed",backgroundColor:"background.disabled",color:"text.subtle",boxShadow:"none",_hover:{backgroundColor:"background.disabled"},_focusWithin:{boxShadow:"none"},_focus:{boxShadow:"none"}},input:{cursor:"not-allowed",backgroundColor:"transparent",color:"text.subtle","&::placeholder":{color:"text.placeholder"}}},false:{}}},defaultVariants:{variant:"default",state:"default",disabled:!1}});const NC=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};ne({slots:["root","content"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",_hidden:{display:"none"}},content:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:Ve.primary},critical:{root:Ve.critical},default:{root:Ve.default},subtle:{root:Ve.subtle},dashed:{root:Ve.dashed},plain:{root:{background:"none",_focusVisible:{boxShadow:"state-focus-primary"},_disabled:{padding:0,boxShadow:"none",background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75",cursor:"not-allowed",_hover:{background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75"}}}}},size:{default:{root:th.default},small:{root:th.small}}},compoundVariants:[{type:"plain",size:"default",css:{root:{width:"16 !important",height:"16 !important"}}},{type:"plain",size:"small",css:{root:{width:"16 !important",height:"16 !important"}}}]});ne({slots:["container","indicator","message","icon","title"],base:{indicator:{minHeight:"3.85rem",borderTopLeftRadius:"md",borderBottomLeftRadius:"md",position:"absolute",left:"-0.0625rem",top:"0",width:"0.25rem",height:"100%"},container:{display:"flex",borderRadius:"md",boxShadow:"inner-highlighted-ring",position:"relative",minHeight:"3.75rem",padding:"8",fontSize:"md",fontWeight:"medium"},title:{fontSize:"base",fontWeight:"regular",color:"text.normal",fontFamily:"sans",lineHeight:"lg",letterSpacing:"normal"}},variants:{type:{info:{indicator:{backgroundColor:"blue.800"},icon:{color:"blue.800"}},warning:{indicator:{backgroundColor:"orange.800"},icon:{color:"orange.800"}},issue:{indicator:{backgroundColor:"red.800"},icon:{color:"red.800"}}}},defaultVariants:{type:"info"}});var BC=ie("avatar").parts("root","image","fallback");BC.build();Y()(["dir","id","ids","onStatusChange","getRootNode"]);ne({slots:["root","image","fallback"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",boxShadow:"stroke-bordered-interactive",background:"background.default"},image:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"inherit"},fallback:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#F2F2F5",color:"text.subtle",textAlign:"center",borderRadius:"inherit"}},variants:{size:{xs:{root:{width:"16",height:"16"},fallback:{textStyle:"body_xsmall_caps_medium"}},sm:{root:{width:"20",height:"20"},fallback:{textStyle:"body_xsmall_caps_medium"}},md:{root:{width:"24",height:"24"},fallback:{textStyle:"body_xsmall_caps_medium"}},lg:{root:{width:"32",height:"32",padding:"2"},fallback:{textStyle:"body_small_semibold"}},xl:{root:{width:"40",height:"40",padding:"2"},fallback:{textStyle:"body_base_semibold"}}},shape:{rounded:{root:{borderRadius:"full"}},square:{root:{borderRadius:"md"}}}},defaultVariants:{size:"md",shape:"rounded"}});var zC=Object.defineProperty,HC=(e,t,n)=>t in e?zC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,en=(e,t,n)=>HC(e,typeof t!="symbol"?t+"":t,n),nh=class Pe{constructor([t,n,o,i,a,r]=[0,0,0,0,0,0]){en(this,"m00"),en(this,"m01"),en(this,"m02"),en(this,"m10"),en(this,"m11"),en(this,"m12"),en(this,"rotate",(...s)=>this.prepend(Pe.rotate(...s))),en(this,"scale",(...s)=>this.prepend(Pe.scale(...s))),en(this,"translate",(...s)=>this.prepend(Pe.translate(...s))),this.m00=t,this.m01=n,this.m02=o,this.m10=i,this.m11=a,this.m12=r}applyTo(t){const{x:n,y:o}=t,{m00:i,m01:a,m02:r,m10:s,m11:l,m12:c}=this;return{x:i*n+a*o+r,y:s*n+l*o+c}}prepend(t){return new Pe([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new Pe([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){const t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){const t=this.determinant;return new Pe([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new Pe([1,0,0,0,1,0])}static rotate(t,n){const o=new Pe([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?Pe.multiply(Pe.translate(n.x,n.y),o,Pe.translate(-n.x,-n.y)):o}static scale(t,n=t,o={x:0,y:0}){const i=new Pe([t,0,0,0,n,0]);return o.x!==0||o.y!==0?Pe.multiply(Pe.translate(o.x,o.y),i,Pe.translate(-o.x,-o.y)):i}static translate(t,n){return new Pe([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((o,i)=>o.prepend(i),t):Pe.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}},oh=(e,t,n)=>Math.min(Math.max(e,t),n),Ka=(e,t,n)=>{const o=oh(e.x,n.x,n.x+n.width-t.width),i=oh(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},jC={width:0,height:0},WC={width:1/0,height:1/0},Xa=(e,t=jC,n=WC)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),mo=(e,t)=>({x:e,y:t}),ih=(e,t)=>t?mo(e.x-t.x,e.y-t.y):e,GC=(e,t)=>mo(e.x+t.x,e.y+t.y);function Ma(e){const{x:t,y:n,width:o,height:i}=e,a=t+o/2,r=n+i/2;return{x:t,y:n,width:o,height:i,minX:t,minY:n,maxX:t+o,maxY:n+i,midX:a,midY:r,center:mo(a,r)}}function UC(e){const t=mo(e.minX,e.minY),n=mo(e.maxX,e.minY),o=mo(e.maxX,e.maxY),i=mo(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var YC=(e,t)=>{const n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),o=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:o,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},qC=(e,t)=>e.width===t?.width&&e.height===t?.height,KC=(e,t)=>e.x===t?.x&&e.y===t?.y,zl=new WeakMap;function XC(e){if(!zl.has(e)){const t=e.ownerDocument.defaultView||window;zl.set(e,t.getComputedStyle(e))}return zl.get(e)}function Im(e,t={}){return Ma(ZC(e,t))}function ZC(e,t={}){const{excludeScrollbar:n=!1,excludeBorders:o=!1}=t,{x:i,y:a,width:r,height:s}=e.getBoundingClientRect(),l={x:i,y:a,width:r,height:s},c=XC(e),{borderLeftWidth:d,borderTopWidth:h,borderRightWidth:u,borderBottomWidth:p}=c,m=ah(d,u),g=ah(h,p);if(o&&(l.width-=m,l.height-=g,l.x+=Rc(d),l.y+=Rc(h)),n){const v=e.offsetWidth-e.clientWidth-m,f=e.offsetHeight-e.clientHeight-g;l.width-=v,l.height-=f}return l}var Rc=e=>parseFloat(e.replace("px","")),ah=(...e)=>e.reduce((t,n)=>t+(n?Rc(n):0),0);function JC(e,t={}){return Ma(QC(e,t))}function QC(e,t){const{excludeScrollbar:n=!1}=t,{innerWidth:o,innerHeight:i,document:a,visualViewport:r}=e,s=r?.width||o,l=r?.height||i,c={x:0,y:0,width:s,height:l};if(n){const d=o-a.documentElement.clientWidth,h=i-a.documentElement.clientHeight;c.width-=d,c.height-=h}return c}function e1(e,t){const n=Ma(e),{top:o,right:i,left:a,bottom:r}=UC(n),[s]=t.split("-");return{top:[a,o,i,r],right:[o,i,r,a],bottom:[o,a,r,i],left:[i,o,a,r]}[s]}function t1(e,t){const{x:n,y:o}=t;let i=!1;for(let a=0,r=e.length-1;a<e.length;r=a++){const s=e[a].x,l=e[a].y,c=e[r].x,d=e[r].y;l>o!=d>o&&n<(c-s)*(o-l)/(d-l)+s&&(i=!i)}return i}var rh={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},n1={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Za,abs:ti,min:sh}=Math;function lh(e,t){const{minX:n,minY:o,maxX:i,maxY:a,midX:r,midY:s}=e,l=t.includes("w")?n:t.includes("e")?i:r,c=t.includes("n")?o:t.includes("s")?a:s;return{x:l,y:c}}function o1(e){return n1[e]}function i1(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:a}=o,r=lh(e,n),s=o1(n),l=lh(e,s);i==="center"&&(t={x:t.x*2,y:t.y*2});const c={x:r.x+t.x,y:r.y+t.y},d={x:rh[n].x*2-1,y:rh[n].y*2-1},h={width:c.x-l.x,height:c.y-l.y},u=d.x*h.width/e.width,p=d.y*h.height/e.height,m=ti(u)>ti(p)?u:p,g=a?{x:m,y:m}:{x:r.x===l.x?1:u,y:r.y===l.y?1:p};switch(r.y===l.y?g.y=ti(g.y):Za(g.y)!==Za(p)&&(g.y*=-1),r.x===l.x?g.x=ti(g.x):Za(g.x)!==Za(u)&&(g.x*=-1),i){case"extent":return ch(e,nh.scale(g.x,g.y,l),!1);case"center":return ch(e,nh.scale(g.x,g.y,{x:e.midX,y:e.midY}),!1)}}function a1(e,t,n=!0){return n?{x:sh(t.x,e.x),y:sh(t.y,e.y),width:ti(t.x-e.x),height:ti(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function ch(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return a1(o,i,n)}var r1=ie("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");r1.build();Y()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function s1(e,t){const{state:n,send:o,context:i}=e,a=n.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:a,setNode(r){r&&o({type:"NODE.SET",node:r})},unmount(){o({type:"UNMOUNT"})}}}var l1={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",ui(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:o})=>{const i=o("present");if(i)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!i&&a?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});J(()=>{var r,s;const l=Ja(t.get("styles"));e.set("unmountAnimationName",l),l==="none"||l===e.get("prevAnimationName")||((r=t.get("styles"))==null?void 0:r.display)==="none"||((s=t.get("styles"))==null?void 0:s.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{J(()=>{e.set("prevAnimationName",Ja(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:o})=>{const i=t.get("node");if(!i)return;const a=l=>{var c,d;(((d=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:d[0])??l.target)===i&&e.set("prevAnimationName",Ja(t.get("styles")))},r=l=>{const c=Ja(t.get("styles"));be(l)===i&&c===e.get("unmountAnimationName")&&!o("present")&&n({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",a),i.addEventListener("animationcancel",r),i.addEventListener("animationend",r);const s=Gd(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",a),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r),el(()=>s())}}}}};function Ja(e){return e?.animationName||"none"}Y()(["onExitComplete","present","immediate"]);const Tm=(e,t)=>{const n=ve(!1),o=ve(null),i=F(()=>({present:Me(e).present,onExitComplete:()=>{}})),a=Dt(l1,i),r=F(()=>s1(a));return Re(()=>r.value.present,()=>{r.value.present&&(n.value=!0)}),Re(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&r.value.setNode(s)}}),F(()=>{var s;const l=Me(e);return{present:r.value.present,unmounted:!r.value.present&&!n.value&&l.lazyMount||l?.unmountOnExit&&!((s=r.value)!=null&&s.present)&&n.value,presenceProps:{ref:o,hidden:!r.value.present,"data-state":r.value.skip&&l.skipAnimationOnMount?void 0:l!=null&&l.present?"open":"closed"}}})},[Pm,Vm]=we("PresenceContext");var Ao=new WeakMap,Qa=new WeakMap,er={},Hl=0,Dm=e=>e&&(e.host||Dm(e.parentNode)),c1=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Dm(n);return o&&e.contains(o)?o:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),d1=new Set(["script","output","status","next-route-announcer"]),u1=e=>d1.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),h1=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:a=!0}=t,r=c1(n,Array.isArray(e)?e:[e]);er[o]||(er[o]=new WeakMap);const s=er[o],l=[],c=new Set,d=new Set(r),h=p=>{!p||c.has(p)||(c.add(p),h(p.parentNode))};r.forEach(p=>{h(p),a&&ke(p)&&Uf(p,m=>{h(m)})});const u=p=>{!p||d.has(p)||Array.prototype.forEach.call(p.children,m=>{if(c.has(m))u(m);else try{if(u1(m))return;const g=m.getAttribute(i)==="true",v=(Ao.get(m)||0)+1,f=(s.get(m)||0)+1;Ao.set(m,v),s.set(m,f),l.push(m),v===1&&g&&Qa.set(m,!0),f===1&&m.setAttribute(o,""),g||m.setAttribute(i,"true")}catch(g){console.error("[zag-js > ariaHidden] cannot operate on ",m,g)}})};return u(n),c.clear(),Hl++,()=>{l.forEach(p=>{const m=Ao.get(p)-1,g=s.get(p)-1;Ao.set(p,m),s.set(p,g),m||(Qa.has(p)||p.removeAttribute(i),Qa.delete(p)),g||p.removeAttribute(o)}),Hl--,Hl||(Ao=new WeakMap,Ao=new WeakMap,Qa=new WeakMap,er={})}},p1=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,g1=(e,t=p1(e),n="data-aria-hidden",o=!0)=>{if(t)return h1(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},f1=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function m1(e,t={}){const{defer:n=!0}=t,o=n?f1:a=>a(),i=[];return i.push(o(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&i.push(g1(a))})),()=>{i.forEach(a=>a?.())}}function v1(e){const t={each(n){var o;for(let i=0;i<((o=e.frames)==null?void 0:o.length);i+=1){const a=e.frames[i];a&&n(a)}},addEventListener(n,o,i){return t.each(a=>{try{a.document.addEventListener(n,o,i)}catch{}}),()=>{try{t.removeEventListener(n,o,i)}catch{}}},removeEventListener(n,o,i){t.each(a=>{try{a.document.removeEventListener(n,o,i)}catch{}})}};return t}function b1(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,o,i)=>{try{t?.addEventListener(n,o,i)}catch{}return()=>{try{t?.removeEventListener(n,o,i)}catch{}}},removeEventListener:(n,o,i)=>{try{t?.removeEventListener(n,o,i)}catch{}}}}var dh="pointerdown.outside",uh="focus.outside";function y1(e){for(const t of e)if(ke(t)&&gn(t))return!0;return!1}var Mm=e=>"clientY"in e;function x1(e,t){if(!Mm(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function w1(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function hh(e,t){if(!t||!Mm(e))return!1;const n=t.scrollHeight>t.clientHeight,o=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight,r={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},s={x:e.clientX,y:e.clientY};return w1(r,s)?o||a:!1}function C1(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:a,defer:r,followControlledElements:s=!0}=t;if(!e)return;const l=dt(e),c=Ce(e),d=v1(c),h=b1(c);function u(x,w){if(!ke(w)||!w.isConnected||Ye(e,w)||x1(e,x)||s&&Gf(e,w))return!1;const k=l.querySelector(`[aria-controls="${e.id}"]`);if(k){const O=bs(k);if(hh(x,O))return!1}const S=bs(e);return hh(x,S)?!1:!(n!=null&&n(w))}const p=new Set,m=di(e?.getRootNode());function g(x){function w(k){var S;const O=r&&!Hu()?J:V=>V(),_=k??x,E=((S=_?.composedPath)==null?void 0:S.call(_))??[_?.target];O(()=>{const V=m?E[0]:be(x);if(!(!e||!u(x,V))){if(i||a){const $=wa(i,a);e.addEventListener(dh,$,{once:!0})}ph(e,dh,{bubbles:!1,cancelable:!0,detail:{originalEvent:_,contextmenu:w0(_),focusable:y1(E),target:V}})}})}x.pointerType==="touch"?(p.forEach(k=>k()),p.add(se(l,"click",w,{once:!0})),p.add(h.addEventListener("click",w,{once:!0})),p.add(d.addEventListener("click",w,{once:!0}))):w()}const v=new Set,f=setTimeout(()=>{v.add(se(l,"pointerdown",g,!0)),v.add(h.addEventListener("pointerdown",g,!0)),v.add(d.addEventListener("pointerdown",g,!0))},0);function y(x){(r?J:w=>w())(()=>{var w;const k=((w=x?.composedPath)==null?void 0:w.call(x))??[x?.target],S=m?k[0]:be(x);if(!(!e||!u(x,S))){if(o||a){const O=wa(o,a);e.addEventListener(uh,O,{once:!0})}ph(e,uh,{bubbles:!1,cancelable:!0,detail:{originalEvent:x,contextmenu:!1,focusable:gn(S),target:S}})}})}return Hu()||(v.add(se(l,"focusin",y,!0)),v.add(h.addEventListener("focusin",y,!0)),v.add(d.addEventListener("focusin",y,!0))),()=>{clearTimeout(f),p.forEach(x=>x()),v.forEach(x=>x())}}function Kd(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(C1(a,t))})),()=>{i.forEach(a=>a?.())}}function ph(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function _1(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return se(dt(e),"keydown",n,{capture:!0})}var gh="layer:request-dismiss",Ze={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;const n=this.indexOf(e),o=this.topMostPointerBlockingLayer()?this.indexOf((t=this.topMostPointerBlockingLayer())==null?void 0:t.node):-1;return n<o},isTopMost(e){const t=this.layers[this.count()-1];return t?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(o=>o.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(o=>o.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Ye(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ye(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>Ze.dismiss(n.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const o=this.layers[n];S1(e,gh,i=>{var a;(a=o.requestDismiss)==null||a.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),k1(e,gh,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function k1(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(i)}function S1(e,t,n){e.addEventListener(t,n,{once:!0})}var fh;function mh(){Ze.layers.forEach(({node:e})=>{e.style.pointerEvents=Ze.isBelowPointerBlockingLayer(e)?"none":"auto"})}function E1(e){e.style.pointerEvents=""}function O1(e,t){const n=dt(e),o=[];return Ze.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(fh=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[a,r]=ew(()=>{const s=i();return ke(s)?s:null},{timeout:1e3});a.then(s=>o.push(Gd(s,{pointerEvents:"auto"}))),o.push(r)}),()=>{Ze.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=fh,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function $1(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){bn("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:o,onRequestDismiss:i,pointerBlocking:a,exclude:r,debug:s,type:l="dialog"}=t,c={dismiss:o,node:e,type:l,pointerBlocking:a,requestDismiss:i};Ze.add(c),mh();function d(g){var v,f;const y=be(g.detail.originalEvent);Ze.isBelowPointerBlockingLayer(e)||Ze.isInBranch(y)||((v=t.onPointerDownOutside)==null||v.call(t,g),(f=t.onInteractOutside)==null||f.call(t,g),!g.defaultPrevented&&(s&&console.log("onPointerDownOutside:",g.detail.originalEvent),o?.()))}function h(g){var v,f;const y=be(g.detail.originalEvent);Ze.isInBranch(y)||((v=t.onFocusOutside)==null||v.call(t,g),(f=t.onInteractOutside)==null||f.call(t,g),!g.defaultPrevented&&(s&&console.log("onFocusOutside:",g.detail.originalEvent),o?.()))}function u(g){var v;Ze.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,g),!g.defaultPrevented&&o&&(g.preventDefault(),o()))}function p(g){var v;if(!e)return!1;const f=typeof r=="function"?r():r,y=Array.isArray(f)?f:[f],x=(v=t.persistentElements)==null?void 0:v.map(w=>w()).filter(ke);return x&&y.push(...x),y.some(w=>Ye(w,g))||Ze.isInNestedLayer(e,g)}const m=[a?O1(e,t.persistentElements):void 0,_1(e,u),Kd(e,{exclude:p,onFocusOutside:h,onPointerDownOutside:d,defer:t.defer})];return()=>{Ze.remove(e),mh(),E1(e),m.forEach(g=>g?.())}}function xi(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Ln(e)?e():e;i.push($1(a,t))})),()=>{i.forEach(a=>a?.())}}function Rm(e,t={}){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Ln(e)?e():e;if(!a){bn("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ze.addBranch(a),i.push(()=>{Ze.removeBranch(a)})})),()=>{i.forEach(a=>a?.())}}var I1=Object.defineProperty,T1=(e,t,n)=>t in e?I1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ye=(e,t,n)=>T1(e,typeof t!="symbol"?t+"":t,n),vh={activateTrap(e,t){if(e.length>0){const o=e[e.length-1];o!==t&&o.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},P1=[],V1=class{constructor(t,n){ye(this,"trapStack"),ye(this,"config"),ye(this,"doc"),ye(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ye(this,"portalContainers",new Set),ye(this,"listenerCleanups",[]),ye(this,"handleFocus",i=>{const a=be(i),r=this.findContainerIndex(a,i)>=0;if(r||Ks(a))r&&(this.state.mostRecentlyFocusedNode=a);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if($i(this.state.mostRecentlyFocusedNode)>0){const c=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:d}=this.state.containerGroups[c];if(d.length>0){const h=d.findIndex(u=>u===this.state.mostRecentlyFocusedNode);h>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?h+1<d.length&&(s=d[h+1],l=!1):h-1>=0&&(s=d[h-1],l=!1))}}else this.state.containerGroups.some(c=>c.tabbableNodes.some(d=>$i(d)>0))||(l=!1);else l=!1;l&&(s=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),s?this.tryFocus(s):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),ye(this,"handlePointerDown",i=>{const a=be(i);if(!(this.findContainerIndex(a,i)>=0)){if(Pi(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Pi(this.config.allowOutsideClick,i)||i.preventDefault()}}),ye(this,"handleClick",i=>{const a=be(i);this.findContainerIndex(a,i)>=0||Pi(this.config.clickOutsideDeactivates,i)||Pi(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),ye(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;const a=this.config.isKeyBackward(i),r=this.findNextNavNode({event:i,isBackward:a});if(!r)return;Ti(i)&&i.preventDefault(),this.tryFocus(r)}}),ye(this,"handleEscapeKey",i=>{D1(i)&&Pi(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),ye(this,"_mutationObserver"),ye(this,"setupMutationObserver",()=>{const i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(a=>{a.some(r=>Array.from(r.removedNodes).some(s=>s===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),a.some(r=>r.type==="attributes"&&(r.attributeName==="aria-controls"||r.attributeName==="aria-expanded")?!0:r.type==="childList"&&r.addedNodes.length>0?Array.from(r.addedNodes).some(s=>{if(s.nodeType!==Node.ELEMENT_NODE)return!1;const l=s;return c0(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?d0(l):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ye(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(a=>{var r;(r=this._mutationObserver)==null||r.observe(a,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(a=>{this.observePortalContainer(a)}))}),ye(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!gn(i)){const a=da(this.doc);if(a&&this.findContainerIndex(a)>=0)i=a;else{const r=this.state.tabbableGroups[0];i=r&&r.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),ye(this,"tryFocus",i=>{if(i!==!1&&i!==da(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,M1(i)&&i.select()}}),ye(this,"deactivate",i=>{if(!this.state.active)return this;const a={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...i};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),vh.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const r=this.getOption(a,"onDeactivate"),s=this.getOption(a,"onPostDeactivate"),l=this.getOption(a,"checkCanReturnFocus"),c=this.getOption(a,"returnFocus","returnFocusOnDeactivate");r?.();const d=()=>{bh(()=>{if(c){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(h)}s?.()})};if(c&&l){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(h).then(d,d),this}return d(),this}),ye(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onPause"),r=this.getOption(i,"onPostPause");return this.state.paused=!0,a?.(),this.removeListeners(),this.updateObservedNodes(),r?.(),this}),ye(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onUnpause"),r=this.getOption(i,"onPostUnpause");return this.state.paused=!1,a?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.(),this}),ye(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ye(this,"getReturnFocusNode",i=>{const a=this.getNodeForOption("setReturnFocus",{params:[i]});return a||(a===!1?!1:i)}),ye(this,"getOption",(i,a,r)=>i&&i[a]!==void 0?i[a]:this.config[r||a]),ye(this,"getNodeForOption",(i,{hasFallback:a=!1,params:r=[]}={})=>{let s=this.config[i];if(typeof s=="function"&&(s=s(...r)),s===!0&&(s=void 0),!s){if(s===void 0||s===!1)return s;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let l=s;if(typeof s=="string"){try{l=this.doc.querySelector(s)}catch(c){throw new Error(`\`${i}\` appears to be an invalid selector; error="${c.message}"`)}if(!l&&!a)throw new Error(`\`${i}\` as selector refers to no known node`)}return l}),ye(this,"findNextNavNode",i=>{const{event:a,isBackward:r=!1}=i,s=i.target||be(a);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const c=this.findContainerIndex(s,a),d=c>=0?this.state.containerGroups[c]:void 0;if(c<0)r?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(r){let h=this.state.tabbableGroups.findIndex(({firstTabbableNode:u})=>s===u);if(h<0&&(d?.container===s||gn(s)&&!go(s)&&!(d!=null&&d.nextTabbableNode(s,!1)))&&(h=c),h>=0){const u=h===0?this.state.tabbableGroups.length-1:h-1,p=this.state.tabbableGroups[u];l=$i(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else Ti(a)||(l=d?.nextTabbableNode(s,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:u})=>s===u);if(h<0&&(d?.container===s||gn(s)&&!go(s)&&!(d!=null&&d.nextTabbableNode(s)))&&(h=c),h>=0){const u=h===this.state.tabbableGroups.length-1?0:h+1,p=this.state.tabbableGroups[u];l=$i(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else Ti(a)||(l=d?.nextTabbableNode(s))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||P1;const o={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(i){return Ti(i)&&!i.shiftKey},isKeyBackward(i){return Ti(i)&&i.shiftKey},...n};this.doc=o.document||dt(Array.isArray(t)?t[0]:t),this.config=o,this.updateContainerElements(t),this.setupMutationObserver()}addPortalContainer(t){const n=t.parentElement;n&&!this.portalContainers.has(n)&&(this.portalContainers.add(n),this.state.active&&!this.state.paused&&this.observePortalContainer(n))}observePortalContainer(t){var n;(n=this._mutationObserver)==null||n.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(t=>{r0(t).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(t,n){const o=typeof n?.composedPath=="function"?n.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:a})=>i.contains(t)||o?.includes(i)||a.find(r=>r===t)||this.isControlledElement(i,t))}isControlledElement(t,n){return this.config.followControlledElements?Gf(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=Va(t,{getShadowRoot:this.config.getShadowRoot}),o=em(t,{getShadowRoot:this.config.getShadowRoot}),i=n[0],a=n[n.length-1],r=i,s=a;let l=!1;for(let d=0;d<n.length;d++)if($i(n[d])>0){l=!0;break}function c(d,h=!0){const u=n.indexOf(d);if(u>=0)return n[u+(h?1:-1)];const p=o.indexOf(d);if(!(p<0)){if(h){for(let m=p+1;m<o.length;m++)if(go(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(go(o[m]))return o[m]}}return{container:t,tabbableNodes:n,focusableNodes:o,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:a,firstDomTabbableNode:r,lastDomTabbableNode:s,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(t=>t.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(t=>t.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return vh.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?bh(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(se(this.doc,"focusin",this.handleFocus,!0),se(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),se(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),se(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),se(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),se(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(t=>t()),this.listenerCleanups=[],this}activate(t){if(this.state.active)return this;const n=this.getOption(t,"onActivate"),o=this.getOption(t,"onPostActivate"),i=this.getOption(t,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=da(this.doc),n?.();const a=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),o?.()};return i?(i(this.state.containers.concat()).then(a,a),this):(a(),this)}},Ti=e=>e.key==="Tab",Pi=(e,...t)=>typeof e=="function"?e(...t):e,D1=e=>!e.isComposing&&e.key==="Escape",bh=e=>setTimeout(e,0),M1=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function R1(e,t={}){let n;const o=J(()=>{const i=typeof e=="function"?e():e;if(i){n=new V1(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:dt(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var F1=ie("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");F1.build();Y()(["id","ids","dir","modal","initialFocusEl","finalFocusEl","open","defaultOpen","getRootNode","snapPoints","swipeVelocityThreshold","closeThreshold","preventDragOnScroll","closeOnEscape","closeOnInteractOutside","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","preventScroll","restoreFocus","role","trapFocus","defaultActiveSnapPoint","activeSnapPoint","onActiveSnapPointChange"]);var A1=ie("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");A1.build();Y()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]);Y()(["index","readOnly"]);Y()(["index","snapAlign"]);const[Fm,Ra]=we("CheckboxContext"),L1=P({__name:"checkbox-context",setup(e){const t=Ra();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),N1=P({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=Ra();return q(),(n,o)=>(C(),T(b(X).div,W(b(t).getControlProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}});function B1(e){return!(e.metaKey||!Js()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var z1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function H1(e,t,n){const o=n?be(n):null,i=Ce(o);return e=e||o instanceof i.HTMLInputElement&&!z1.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(j1,n.key))}var eo=null,Fc=new Set,Cs=new Map,Eo=!1,Ac=!1,j1={Tab:!0,Escape:!0};function dl(e,t){for(let n of Fc)n(e,t)}function _s(e){Eo=!0,B1(e)&&(eo="keyboard",dl("keyboard",e))}function xt(e){eo="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Eo=!0,dl("pointer",e))}function Am(e){x0(e)&&(Eo=!0,eo="virtual")}function Lm(e){const t=be(e);t===Ce(t)||t===dt(t)||(!Eo&&!Ac&&(eo="virtual",dl("virtual",e)),Eo=!1,Ac=!1)}function Nm(){Eo=!1,Ac=!0}function W1(e){if(typeof window>"u"||Cs.get(Ce(e)))return;const t=Ce(e),n=dt(e);let o=t.HTMLElement.prototype.focus;function i(){eo="virtual",dl("virtual",null),Eo=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",_s,!0),n.addEventListener("keyup",_s,!0),n.addEventListener("click",Am,!0),t.addEventListener("focus",Lm,!0),t.addEventListener("blur",Nm,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",xt,!0),n.addEventListener("pointermove",xt,!0),n.addEventListener("pointerup",xt,!0)):(n.addEventListener("mousedown",xt,!0),n.addEventListener("mousemove",xt,!0),n.addEventListener("mouseup",xt,!0)),t.addEventListener("beforeunload",()=>{G1(e)},{once:!0}),Cs.set(t,{focus:o})}var G1=(e,t)=>{const n=Ce(e),o=dt(e),i=Cs.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",_s,!0),o.removeEventListener("keyup",_s,!0),o.removeEventListener("click",Am,!0),n.removeEventListener("focus",Lm,!0),n.removeEventListener("blur",Nm,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",xt,!0),o.removeEventListener("pointermove",xt,!0),o.removeEventListener("pointerup",xt,!0)):(o.removeEventListener("mousedown",xt,!0),o.removeEventListener("mousemove",xt,!0),o.removeEventListener("mouseup",xt,!0)),Cs.delete(n)}};function U1(){return eo}function Ca(){return eo==="keyboard"}function ul(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;W1(i),o?.({isFocusVisible:n||Ca(),modality:eo});const a=(r,s)=>{H1(!!t,r,s)&&o?.({isFocusVisible:Ca(),modality:r})};return Fc.add(a),()=>{Fc.delete(a)}}var Bm=ie("checkbox").parts("root","label","control","indicator"),tr=Bm.build(),zm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},yh=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},Y1=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Lc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},q1=e=>e.getById(zm(e)),oa=e=>e.getById(Lc(e));function K1(e,t){const{send:n,context:o,prop:i,computed:a,scope:r}=e,s=!!i("disabled"),l=!!i("readOnly"),c=!!i("required"),d=!!i("invalid"),h=!s&&o.get("focused"),u=!s&&o.get("focusVisible"),p=a("checked"),m=a("indeterminate"),g=o.get("checked"),v={"data-active":j(o.get("active")),"data-focus":j(h),"data-focus-visible":j(u),"data-readonly":j(l),"data-hover":j(o.get("hovered")),"data-disabled":j(s),"data-state":m?"indeterminate":p?"checked":"unchecked","data-invalid":j(d),"data-required":j(c)};return{checked:p,disabled:s,indeterminate:m,focused:h,checkedState:g,setChecked(f){n({type:"CHECKED.SET",checked:f,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:p,isTrusted:!1})},getRootProps(){return t.label({...tr.root.attrs,...v,dir:i("dir"),id:zm(r),htmlFor:Lc(r),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(f){be(f)===oa(r)&&f.stopPropagation()}})},getLabelProps(){return t.element({...tr.label.attrs,...v,dir:i("dir"),id:yh(r)})},getControlProps(){return t.element({...tr.control.attrs,...v,dir:i("dir"),id:Y1(r),"aria-hidden":!0})},getIndicatorProps(){return t.element({...tr.indicator.attrs,...v,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Lc(r),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":yh(r),"aria-invalid":d,name:i("name"),form:i("form"),value:i("value"),style:nl,onFocus(){const f=Ca();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:f}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(f){if(l){f.preventDefault();return}const y=f.currentTarget.checked;n({type:"CHECKED.SET",checked:y,isTrusted:!0})}})}}}var{not:xh}=ze(),X1={props({props:e}){return{value:"on",...e,defaultChecked:e.defaultChecked??!1}},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var o;(o=e("onCheckedChange"))==null||o({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:o}){e([()=>n("disabled")],()=>{o(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{o(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:xh("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:xh("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>jr(e.get("checked")),checked:({context:e})=>Z1(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return lm({pointerNode:q1(n),keyboardNode:oa(n),isValidKey:o=>o.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return ul({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return bi(oa(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(const n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){const o=oa(n);o&&(Ld(o,t("checked")),o.indeterminate=jr(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){const n=jr(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=oa(t);Xf(n,{checked:e("checked")})})}}}};function jr(e){return e==="indeterminate"}function Z1(e){return jr(e)?!1:!!e}Y()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const Xd=Bm.extendWith("group");function J1(e,t,n,o={}){var i,a,r;const{passive:s=!1,eventName:l,defaultValue:c}=o,d=Ta(),h=n||d?.emit||((i=d?.$emit)==null?void 0:i.bind(d))||((r=(a=d?.proxy)==null?void 0:a.$emit)==null?void 0:r.bind(d?.proxy)),u=t,p=()=>e[u]??c,m=g=>{if(!l)h(l||`update:${u.toString()}`,g);else for(const v of l)h(v,g)};if(s){const g=p(),v=ve(g);let f=!1;return Re(()=>e[u],y=>{f||(f=!0,v.value=y,Id(()=>{f=!1}))}),Re(v,y=>{!f&&y!==e[u]&&m(y)}),v}return F({get(){return p()},set(g){m(g)}})}function Q1(e,t){const n=F(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=Ky(e),i=J1(e,"modelValue",t,{defaultValue:o?.value??[],passive:e.modelValue===void 0,eventName:["valueChange","update:modelValue"]}),a=h=>i.value.some(u=>String(u)===String(h)),r=h=>{a(h)?l(h):s(h)},s=h=>{n.value&&(a(h)||(i.value=i.value.concat(h)))},l=h=>{n.value&&(i.value=i.value.filter(u=>String(u)!==String(h)))},c=h=>({checked:h.value!=null?a(h.value):void 0,onCheckedChange(){h.value!=null&&r(h.value)},name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid}),d=h=>{i.value=h};return F(()=>({isChecked:a,value:i.value,name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid,addValue:s,setValue:d,toggleValue:r,getItemProps:c}))}const[Hm,e_]=we("CheckboxGroupContext"),t_=P({__name:"checkbox-group",props:wn({defaultValue:{},modelValue:{},disabled:{type:Boolean},readOnly:{type:Boolean},name:{},invalid:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,readOnly:void 0,invalid:void 0}),emits:["valueChange","update:modelValue"],setup(e,{emit:t}){const n=Q1(e,t);return Hm(n),q(),(o,i)=>(C(),T(b(X).div,W({role:"group"},{...b(Xd).build().group.attrs},{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),n_=P({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return Hm(n),q(),(o,i)=>(C(),T(b(X).div,W({role:"group"},b(Xd).build().group.attrs,{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),o_=P({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Ra(),n=Qn();return q(),(o,i)=>{var a;return C(),T(b(X).input,W({"aria-describedby":(a=b(n))==null?void 0:a.ariaDescribedby},b(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),i_=P({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ra(),o=F(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return q(),(i,a)=>(C(),T(b(X).div,W(b(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),a_=P({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=Ra();return q(),(n,o)=>(C(),T(b(X).span,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),r_=P({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return Fm(n),q(),(o,i)=>(C(),T(b(X).label,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),s_=(e={},t)=>{const n=Yt(),o=Kt(Xt),i=_n(Cn),a=Qn(),r=e_(),s=F(()=>{const d=Me(e);return rl(d,r?.value.getItemProps({value:d.value})??{})}),l=F(()=>{const d=Me(s);return{id:n,ids:{label:a?.value.ids.label,hiddenInput:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Jn(d),onCheckedChange(h){var u;t?.("checkedChange",h),t?.("update:checked",h.checked),(u=d.onCheckedChange)==null||u.call(d,h)}}}),c=Dt(X1,l);return F(()=>K1(c,qt))},l_=P({__name:"checkbox-root",props:wn({checked:{},defaultChecked:{},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},{checked:void 0,defaultChecked:void 0,disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=s_(e,t);return Fm(n),q(),(o,i)=>(C(),T(b(X).label,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Lo=Object.freeze(Object.defineProperty({__proto__:null,Context:L1,Control:N1,Group:t_,GroupProvider:n_,HiddenInput:o_,Indicator:i_,Label:a_,Root:l_,RootProvider:r_},Symbol.toStringTag,{value:"Module"}));var c_=ie("clipboard").parts("root","control","trigger","indicator","input","label");c_.build();Y()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);Y()(["copied"]);var d_=Object.defineProperty,u_=(e,t,n)=>t in e?d_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t,n)=>u_(e,typeof t!="symbol"?t+"":t,n),Wr={itemToValue(e){return typeof e=="string"?e:fo(e)&&Nn(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:fo(e)&&Nn(e,"label")?e.label:Wr.itemToValue(e)},isItemDisabled(e){return fo(e)&&Nn(e,"disabled")?!!e.disabled:!1}},Mo=class jm{constructor(t){this.options=t,B(this,"items"),B(this,"indexMap",null),B(this,"copy",n=>new jm({...this.options,items:n??[...this.items]})),B(this,"isEqual",n=>Ne(this.items,n.items)),B(this,"setItems",n=>this.copy(n)),B(this,"getValues",(n=this.items)=>{const o=[];for(const i of n){const a=this.getItemValue(i);a!=null&&o.push(a)}return o}),B(this,"find",n=>{if(n==null)return null;const o=this.indexOf(n);return o!==-1?this.at(o):null}),B(this,"findMany",n=>{const o=[];for(const i of n){const a=this.find(i);a!=null&&o.push(a)}return o}),B(this,"at",n=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[n]??null;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){if(o===n)return r;o++}return null}),B(this,"sortFn",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return(i??0)-(a??0)}),B(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),B(this,"getItemValue",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToValue)==null?void 0:i.call(o,n))??Wr.itemToValue(n)}),B(this,"getItemDisabled",n=>{var o,i;return n==null?!1:((i=(o=this.options).isItemDisabled)==null?void 0:i.call(o,n))??Wr.isItemDisabled(n)}),B(this,"stringifyItem",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToString)==null?void 0:i.call(o,n))??Wr.itemToString(n)}),B(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),B(this,"stringifyItems",(n,o=", ")=>{const i=[];for(const a of n){const r=this.stringifyItem(a);r!=null&&i.push(r)}return i.join(o)}),B(this,"stringifyMany",(n,o)=>this.stringifyItems(this.findMany(n),o)),B(this,"has",n=>this.indexOf(n)!==-1),B(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),B(this,"group",()=>{const{groupBy:n,groupSort:o}=this.options;if(!n)return[["",[...this.items]]];const i=new Map;this.items.forEach((r,s)=>{const l=n(r,s);i.has(l)||i.set(l,[]),i.get(l).push(r)});let a=Array.from(i.entries());return o&&a.sort(([r],[s])=>{if(typeof o=="function")return o(r,s);if(Array.isArray(o)){const l=o.indexOf(r),c=o.indexOf(s);return l===-1?1:c===-1?-1:l-c}return o==="asc"?r.localeCompare(s):o==="desc"?s.localeCompare(r):0}),a}),B(this,"getNextValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.min(a+o,this.size-1):a+o;a<=this.size&&this.getItemDisabled(this.at(a));)a++;return this.getItemValue(this.at(a))}),B(this,"getPreviousValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.max(a-o,0):a-o;a>=0&&this.getItemDisabled(this.at(a));)a--;return this.getItemValue(this.at(a))}),B(this,"indexOf",n=>{if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(o=>this.getItemValue(o)===n);if(!this.indexMap){this.indexMap=new Map;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){const s=this.getItemValue(r);s!=null&&this.indexMap.set(s,o),o++}}return this.indexMap.get(n)??-1}),B(this,"getByText",(n,o)=>{const i=o!=null?this.indexOf(o):-1,a=n.length===1;for(let r=0;r<this.items.length;r++){const s=this.items[(i+r+1)%this.items.length];if(!(a&&this.getItemValue(s)===o)&&!this.getItemDisabled(s)&&h_(this.stringifyItem(s),n))return s}}),B(this,"search",(n,o)=>{const{state:i,currentValue:a,timeout:r=350}=o,s=i.keysSoFar+n,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s,c=this.getByText(l,a),d=this.getItemValue(c);function h(){clearTimeout(i.timer),i.timer=-1}function u(p){i.keysSoFar=p,h(),p!==""&&(i.timer=+setTimeout(()=>{u(""),h()},r))}return u(s),d}),B(this,"update",(n,o)=>{let i=this.indexOf(n);return i===-1?this:this.copy([...this.items.slice(0,i),o,...this.items.slice(i+1)])}),B(this,"upsert",(n,o,i="append")=>{let a=this.indexOf(n);return a===-1?(i==="append"?this.append:this.prepend)(o):this.copy([...this.items.slice(0,a),o,...this.items.slice(a+1)])}),B(this,"insert",(n,...o)=>this.copy(Vi(this.items,n,...o))),B(this,"insertBefore",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(Vi(this.items,i,...o))}),B(this,"insertAfter",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(Vi(this.items,i+1,...o))}),B(this,"prepend",(...n)=>this.copy(Vi(this.items,0,...n))),B(this,"append",(...n)=>this.copy(Vi(this.items,this.items.length,...n))),B(this,"filter",n=>{const o=this.items.filter((i,a)=>n(this.stringifyItem(i),a,i));return this.copy(o)}),B(this,"remove",(...n)=>{const o=n.map(i=>typeof i=="string"?i:this.getItemValue(i));return this.copy(this.items.filter(i=>{const a=this.getItemValue(i);return a==null?!1:!o.includes(a)}))}),B(this,"move",(n,o)=>{const i=this.indexOf(n);return i===-1?this:this.copy(nr(this.items,[i],o))}),B(this,"moveBefore",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(nr(this.items,a,i))}),B(this,"moveAfter",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(nr(this.items,a,i+1))}),B(this,"reorder",(n,o)=>this.copy(nr(this.items,[n],o))),B(this,"compareValue",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return i<a?-1:i>a?1:0}),B(this,"range",(n,o)=>{let i=[],a=n;for(;a!=null;){if(this.find(a)&&i.push(a),a===o)return i;a=this.getNextValue(a)}return[]}),B(this,"getValueRange",(n,o)=>n&&o?this.compareValue(n,o)<=0?this.range(n,o):this.range(o,n):[]),B(this,"toString",()=>{let n="";for(const o of this.items){const i=this.getItemValue(o),a=this.stringifyItem(o),r=this.getItemDisabled(o),s=[i,a,r].filter(Boolean).join(":");n+=s+","}return n}),B(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*this.items}},h_=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function Vi(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function nr(e,t,n){t=[...t].sort((i,a)=>i-a);const o=t.map(i=>e[i]);for(let i=t.length-1;i>=0;i--)e=[...e.slice(0,t[i]),...e.slice(t[i]+1)];return n=Math.max(0,n-t.filter(i=>i<n).length),[...e.slice(0,n),...o,...e.slice(n)]}var p_=class Gr extends Set{constructor(t=[]){super(t),B(this,"selectionMode","single"),B(this,"deselectable",!0),B(this,"copy",()=>{const n=new Gr([...this]);return this.sync(n)}),B(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),B(this,"isEmpty",()=>this.size===0),B(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),B(this,"canSelect",(n,o)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(o))),B(this,"firstSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)<0)&&(o=i);return o}),B(this,"lastSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)>0)&&(o=i);return o}),B(this,"extendSelection",(n,o,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,i);const a=this.copy(),r=Array.from(this).pop();for(let s of n.getValueRange(o,r??i))a.delete(s);for(let s of n.getValueRange(i,o))this.canSelect(n,s)&&a.add(s);return a}),B(this,"toggleSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(o))return this.replaceSelection(n,o);const i=this.copy();return i.has(o)?i.delete(o):i.canSelect(n,o)&&i.add(o),i}),B(this,"replaceSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(o==null)return this;if(!this.canSelect(n,o))return this;const i=new Gr([o]);return this.sync(i)}),B(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new Gr;for(let i of n)if(i!=null&&(o.add(i),this.selectionMode==="single"))break;return this.sync(o)}),B(this,"clearSelection",()=>{const n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),B(this,"select",(n,o,i)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(o)&&this.deselectable?this.toggleSelection(n,o):this.replaceSelection(n,o):this.selectionMode==="multiple"||i?this.toggleSelection(n,o):this.replaceSelection(n,o)),B(this,"deselect",n=>{const o=this.copy();return o.delete(n),o}),B(this,"isEqual",n=>Ne(Array.from(this),Array.from(n)))}};function Wm(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function g_(e){const t=f_(e),n=[],o=new Set;for(const i of t){const a=i.join();o.has(a)||(o.add(a),n.push(i))}return n}function Gm(e,t){for(let n=0;n<Math.min(e.length,t.length);n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length-t.length}function f_(e){return e.sort(Gm)}function m_(e,t){let n;return it(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function v_(e,t){const n=[];return it(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function wh(e,t){let n;return it(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function b_(e,t){let n=t.initialResult;return it(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function y_(e,t){return b_(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function x_(e,t){const{predicate:n,create:o,getChildren:i}=t,a=(r,s)=>{const l=i(r,s),c=[];l.forEach((p,m)=>{const g=[...s,m],v=a(p,g);v&&c.push(v)});const d=s.length===0,h=n(r,s),u=c.length>0;return d||h||u?o(r,c,s):null};return a(e,[])||o(e,[],[])}function w_(e,t){const n=[];let o=0;const i=new Map,a=new Map;return it(e,{getChildren:t.getChildren,onEnter:(r,s)=>{i.has(r)||i.set(r,o++);const l=t.getChildren(r,s);l.forEach(p=>{a.has(p)||a.set(p,r),i.has(p)||i.set(p,o++)});const c=l.length>0?l.map(p=>i.get(p)):void 0,d=a.get(r),h=d?i.get(d):void 0,u=i.get(r);n.push({...r,_children:c,_parent:h,_index:u})}}),n}function C_(e,t){return{type:"insert",index:e,nodes:t}}function __(e){return{type:"remove",indexes:e}}function Zd(){return{type:"replace"}}function Um(e){return[e.slice(0,-1),e[e.length-1]]}function Ym(e,t,n=new Map){var o;const[i,a]=Um(e);for(let s=i.length-1;s>=0;s--){const l=i.slice(0,s).join();switch((o=n.get(l))==null?void 0:o.type){case"remove":continue}n.set(l,Zd())}const r=n.get(i.join());switch(r?.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:r.indexes,insertIndex:a,insertNodes:t});break;default:n.set(i.join(),C_(a,t))}return n}function qm(e){const t=new Map,n=new Map;for(const o of e){const i=o.slice(0,-1).join(),a=n.get(i)??[];a.push(o[o.length-1]),n.set(i,a.sort((r,s)=>r-s))}for(const o of e)for(let i=o.length-2;i>=0;i--){const a=o.slice(0,i).join();t.has(a)||t.set(a,Zd())}for(const[o,i]of n)t.set(o,__(i));return t}function k_(e,t){const n=new Map,[o,i]=Um(e);for(let a=o.length-1;a>=0;a--){const r=o.slice(0,a).join();n.set(r,Zd())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function hl(e,t,n){return S_(e,{...n,getChildren:(o,i)=>{const a=i.join(),r=t.get(a);switch(r?.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(o,i);default:return[]}},transform:(o,i,a)=>{const r=a.join(),s=t.get(r);switch(s?.type){case"remove":return n.create(o,i.filter((d,h)=>!s.indexes.includes(h)),a);case"removeThenInsert":const l=i.filter((d,h)=>!s.removeIndexes.includes(h)),c=s.removeIndexes.reduce((d,h)=>h<d?d-1:d,s.insertIndex);return n.create(o,Ch(l,c,0,...s.insertNodes),a);case"insert":return n.create(o,Ch(i,s.index,0,...s.nodes),a);case"replace":return n.create(o,i,a);default:return o}}})}function Ch(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function S_(e,t){const n={};return it(e,{...t,onLeave:(o,i)=>{const a=[0,...i],r=a.join(),s=t.transform(o,n[r]??[],i),l=a.slice(0,-1).join(),c=n[l]??[];c.push(s),n[l]=c}}),n[""][0]}function E_(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Ym(o,n);return hl(e,i,t)}function O_(e,t){if(t.at.length===0)return t.node;const n=k_(t.at,t.node);return hl(e,n,t)}function $_(e,t){if(t.indexPaths.length===0)return e;for(const o of t.indexPaths)if(o.length===0)throw new Error("Can't remove the root node");const n=qm(t.indexPaths);return hl(e,n,t)}function I_(e,t){if(t.indexPaths.length===0)return e;for(const a of t.indexPaths)if(a.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");const n=g_(t.indexPaths),o=n.map(a=>Wm(e,a,t)),i=Ym(t.to,o,qm(n));return hl(e,i,t)}function it(e,t){const{onEnter:n,onLeave:o,getChildren:i}=t;let a=[],r=[{node:e}];const s=t.reuseIndexPath?()=>a:()=>a.slice();for(;r.length>0;){let l=r[r.length-1];if(l.state===void 0){const d=n?.(l.node,s());if(d==="stop")return;l.state=d==="skip"?-1:0}const c=l.children||i(l.node,s());if(l.children||(l.children=c),l.state!==-1){if(l.state<c.length){let d=l.state;a.push(d),r.push({node:c[d]}),l.state=d+1;continue}if(o?.(l.node,s())==="stop")return}a.pop(),r.pop()}}var Jd=class Km{constructor(t){this.options=t,B(this,"rootNode"),B(this,"isEqual",n=>Ne(this.rootNode,n.rootNode)),B(this,"getNodeChildren",n=>{var o,i;return((i=(o=this.options).nodeToChildren)==null?void 0:i.call(o,n))??Yo.nodeToChildren(n)??[]}),B(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),B(this,"resolveNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(o):void 0}),B(this,"getNodeChildrenCount",n=>{var o,i;return((i=(o=this.options).nodeToChildrenCount)==null?void 0:i.call(o,n))??Yo.nodeToChildrenCount(n)}),B(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??Yo.nodeToValue(n)}),B(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??Yo.isNodeDisabled(n)}),B(this,"stringify",n=>{const o=this.findNode(n);return o?this.stringifyNode(o):null}),B(this,"stringifyNode",n=>{var o,i;return((i=(o=this.options).nodeToString)==null?void 0:i.call(o,n))??Yo.nodeToString(n)}),B(this,"getFirstNode",(n=this.rootNode)=>{let o;return it(n,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(!o&&a.length>0&&!this.getNodeDisabled(i))return o=i,"stop"}}),o}),B(this,"getLastNode",(n=this.rootNode,o={})=>{let i;return it(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isSameNode(a,n)){if((s=o.skip)!=null&&s.call(o,{value:this.getNodeValue(a),node:a,indexPath:r}))return"skip";r.length>0&&!this.getNodeDisabled(a)&&(i=a)}}}),i}),B(this,"at",n=>Wm(this.rootNode,n,{getChildren:this.getNodeChildren})),B(this,"findNode",(n,o=this.rootNode)=>m_(o,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),B(this,"findNodes",(n,o=this.rootNode)=>{const i=new Set(n.filter(a=>a!=null));return v_(o,{getChildren:this.getNodeChildren,predicate:a=>i.has(this.getNodeValue(a))})}),B(this,"sort",n=>n.reduce((o,i)=>{const a=this.getIndexPath(i);return a&&o.push({value:i,indexPath:a}),o},[]).sort((o,i)=>Gm(o.indexPath,i.indexPath)).map(({value:o})=>o)),B(this,"getIndexPath",n=>wh(this.rootNode,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===n})),B(this,"getValue",n=>{const o=this.at(n);return o?this.getNodeValue(o):void 0}),B(this,"getValuePath",n=>{if(!n)return[];const o=[];let i=[...n];for(;i.length>0;){const a=this.at(i);a&&o.unshift(this.getNodeValue(a)),i.pop()}return o}),B(this,"getDepth",n=>{const o=wh(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n});return o?.length??0}),B(this,"isSameNode",(n,o)=>this.getNodeValue(n)===this.getNodeValue(o)),B(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),B(this,"contains",(n,o)=>!n||!o?!1:o.slice(0,n.length).every((i,a)=>n[a]===o[a])),B(this,"getNextNode",(n,o={})=>{let i=!1,a;return it(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return c===n&&(i=!0),"skip";if(i&&!this.getNodeDisabled(r))return a=r,"stop";c===n&&(i=!0)}}),a}),B(this,"getPreviousNode",(n,o={})=>{let i,a=!1;return it(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return"skip";if(c===n)return a=!0,"stop";this.getNodeDisabled(r)||(i=r)}}),a?i:void 0}),B(this,"getParentNodes",n=>{var o;const i=(o=this.resolveIndexPath(n))==null?void 0:o.slice();if(!i)return[];const a=[];for(;i.length>0;){i.pop();const r=this.at(i);r&&!this.isRootNode(r)&&a.unshift(r)}return a}),B(this,"getDescendantNodes",(n,o)=>{const i=this.resolveNode(n);if(!i)return[];const a=[];return it(i,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{s.length!==0&&(!(o!=null&&o.withBranch)&&this.isBranchNode(r)||a.push(r))}}),a}),B(this,"getDescendantValues",(n,o)=>this.getDescendantNodes(n,o).map(i=>this.getNodeValue(i))),B(this,"getParentIndexPath",n=>n.slice(0,-1)),B(this,"getParentNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(this.getParentIndexPath(o)):void 0}),B(this,"visit",n=>{const{skip:o,...i}=n;it(this.rootNode,{...i,getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isRootNode(a))return o!=null&&o({value:this.getNodeValue(a),node:a,indexPath:r})?"skip":(s=i.onEnter)==null?void 0:s.call(i,a,r)}})}),B(this,"getPreviousSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;--a>=0;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),B(this,"getNextSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;++a<i.length;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),B(this,"getSiblingNodes",n=>{const o=this.getParentNode(n);return o?this.getNodeChildren(o):[]}),B(this,"getValues",(n=this.rootNode)=>y_(n,{getChildren:this.getNodeChildren,transform:o=>[this.getNodeValue(o)]}).slice(1)),B(this,"isValidDepth",(n,o)=>o==null?!0:typeof o=="function"?o(n.length):n.length===o),B(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),B(this,"getBranchValues",(n=this.rootNode,o={})=>{let i=[];return it(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(r.length===0)return;const l=this.getNodeValue(a);if((s=o.skip)!=null&&s.call(o,{value:l,node:a,indexPath:r}))return"skip";this.isBranchNode(a)&&this.isValidDepth(r,o.depth)&&i.push(this.getNodeValue(a))}}),i}),B(this,"flatten",(n=this.rootNode)=>w_(n,{getChildren:this.getNodeChildren})),B(this,"_create",(n,o)=>this.getNodeChildren(n).length>0||o.length>0?{...n,children:o}:{...n}),B(this,"_insert",(n,o,i)=>this.copy(E_(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"copy",n=>new Km({...this.options,rootNode:n})),B(this,"_replace",(n,o,i)=>this.copy(O_(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_move",(n,o,i)=>this.copy(I_(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_remove",(n,o)=>this.copy($_(n,{indexPaths:o,getChildren:this.getNodeChildren,create:this._create}))),B(this,"replace",(n,o)=>this._replace(this.rootNode,n,o)),B(this,"remove",n=>this._remove(this.rootNode,n)),B(this,"insertBefore",(n,o)=>this.getParentNode(n)?this._insert(this.rootNode,n,o):void 0),B(this,"insertAfter",(n,o)=>{if(!this.getParentNode(n))return;const i=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,i,o)}),B(this,"move",(n,o)=>this._move(this.rootNode,n,o)),B(this,"filter",n=>{const o=x_(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(o)}),B(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},Yo={nodeToValue(e){return typeof e=="string"?e:fo(e)&&Nn(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:fo(e)&&Nn(e,"label")?e.label:Yo.nodeToValue(e)},isNodeDisabled(e){return fo(e)&&Nn(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(fo(e)&&Nn(e,"childrenCount"))return e.childrenCount}};const T_=e=>new Mo(e),_h=e=>new Jd(e);var P_=Object.defineProperty,V_=(e,t,n)=>t in e?P_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>V_(e,t+"",n),D_=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},eu=class{toHexInt(){return this.toFormat("rgba").toHexInt()}getChannelValue(t){if(t in this)return this[t];throw new Error("Unsupported color channel: "+t)}getChannelValuePercent(t,n){const o=n??this.getChannelValue(t),{minValue:i,maxValue:a}=this.getChannelRange(t);return Ow(o,i,a)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=$w(n,o,i,a);return Xu(r,o,i,a)}withChannelValue(t,n){const{minValue:o,maxValue:i}=this.getChannelRange(t);if(t in this){let a=this.clone();return a[t]=Le(n,o,i),a}throw new Error("Unsupported color channel: "+t)}getColorAxes(t){let{xChannel:n,yChannel:o}=t,i=n||this.getChannels().find(s=>s!==o),a=o||this.getChannels().find(s=>s!==i),r=this.getChannels().find(s=>s!==i&&s!==a);return{xChannel:i,yChannel:a,zChannel:r}}incrementChannel(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=Xu(Le(this.getChannelValue(t)+n,o,i),o,i,a);return this.withChannelValue(t,r)}decrementChannel(t,n){return this.incrementChannel(t,-n)}isEqual(t){return D_(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},M_=/^#[\da-f]+$/i,R_=/^rgba?\((.*)\)$/,F_=/[^#]/gi,Xm=class Ur extends eu{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(M_.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(F_,"$&$&"):t).slice(1).split("");for(;i.length>0;)n.push(parseInt(i.splice(0,2).join(""),16));n[3]=n[3]!==void 0?n[3]/255:void 0}const o=t.match(R_);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,a)=>Le(i,0,a<3?255:1))),n.length<3?void 0:new Ur(n[0],n[1],n[2],n[3]??1)}toString(t){switch(t){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"hsb":return this.toHSB().toString("hsb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"rgba":return this;case"hsba":return this.toHSB();case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+t)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=a-i,s=a===0?0:r/a;let l=0;if(r!==0){switch(a){case t:l=(n-o)/r+(n<o?6:0);break;case n:l=(o-t)/r+2;break;case o:l=(t-n)/r+4;break}l/=6}return new ou(fe(l*360,2),fe(s*100,2),fe(a*100,2),fe(this.alpha,2))}toHSL(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=(a+i)/2,s=a-i;let l=-1,c=-1;if(s===0)l=c=0;else{switch(c=s/(r<.5?a+i:2-a-i),a){case t:l=(n-o)/s+(n<o?6:0);break;case n:l=(o-t)/s+2;break;case o:l=(t-n)/s+4;break}l/=6}return new nu(fe(l*360,2),fe(c*100,2),fe(r*100,2),fe(this.alpha,2))}clone(){return new Ur(this.red,this.green,this.blue,this.alpha)}getChannelFormatOptions(t){switch(t){case"red":case"green":case"blue":return{style:"decimal"};case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{r:this.red,g:this.green,b:this.blue,a:this.alpha}}getFormat(){return"rgba"}getChannels(){return Ur.colorChannels}};Qd(Xm,"colorChannels",["red","green","blue"]);var tu=Xm,A_=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Zm=class Yr extends eu{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.lightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(A_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new Yr(bm(o,360),Le(i,0,100),Le(a,0,100),Le(r??1,0,1))}}toString(t){switch(t){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.lightness,2)}%, ${this.alpha})`;case"hsb":return this.toHSB().toString("hsb");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsla":return this;case"hsba":return this.toHSB();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+t)}}toHSB(){let t=this.saturation/100,n=this.lightness/100,o=n+t*Math.min(n,1-n);return t=o===0?0:2*(1-n/o),new ou(fe(this.hue,2),fe(t*100,2),fe(o*100,2),fe(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.lightness/100,i=n*Math.min(o,1-o),a=(r,s=(r+t/30)%12)=>o-i*Math.max(Math.min(s-3,9-s,1),-1);return new tu(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),fe(this.alpha,2))}clone(){return new Yr(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="lightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return"hsla"}getChannels(){return Yr.colorChannels}};Qd(Zm,"colorChannels",["hue","saturation","lightness"]);var nu=Zm,L_=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Jm=class qr extends eu{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.brightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(L_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new qr(bm(o,360),Le(i,0,100),Le(a,0,100),Le(r??1,0,1))}}toString(t){switch(t){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.brightness,2)}%, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsba":return this;case"hsla":return this.toHSL();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+t)}}toHSL(){let t=this.saturation/100,n=this.brightness/100,o=n*(1-t/2);return t=o===0||o===1?0:(n-o)/Math.min(o,1-o),new nu(fe(this.hue,2),fe(t*100,2),fe(o*100,2),fe(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.brightness/100,i=(a,r=(a+t/60)%6)=>o-n*o*Math.max(Math.min(r,4-r,1),0);return new tu(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),fe(this.alpha,2))}clone(){return new qr(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="brightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return"hsba"}getChannels(){return qr.colorChannels}};Qd(Jm,"colorChannels",["hue","saturation","brightness"]);var ou=Jm,N_="aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32",B_=e=>{const t=new Map,n=e.split(",");for(let o=0;o<n.length;o++){const[i,a]=n[o].split(":");t.set(i,`#${a}`),i.includes("gray")&&t.set(i.replace("gray","grey"),`#${a}`)}return t},kh=B_(N_),ks=e=>{var t;if(kh.has(e))return ks(kh.get(e));const n=tu.parse(e)||ou.parse(e)||nu.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,ks),o}return n};const z_=["top","right","bottom","left"],Un=Math.min,at=Math.max,Ss=Math.round,or=Math.floor,Gt=e=>({x:e,y:e}),H_={left:"right",right:"left",bottom:"top",top:"bottom"},j_={start:"end",end:"start"};function Nc(e,t,n){return at(e,Un(t,n))}function yn(e,t){return typeof e=="function"?e(t):e}function xn(e){return e.split("-")[0]}function wi(e){return e.split("-")[1]}function iu(e){return e==="x"?"y":"x"}function au(e){return e==="y"?"height":"width"}const W_=new Set(["top","bottom"]);function jt(e){return W_.has(xn(e))?"y":"x"}function ru(e){return iu(jt(e))}function G_(e,t,n){n===void 0&&(n=!1);const o=wi(e),i=ru(e),a=au(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=Es(r)),[r,Es(r)]}function U_(e){const t=Es(e);return[Bc(e),t,Bc(t)]}function Bc(e){return e.replace(/start|end/g,t=>j_[t])}const Sh=["left","right"],Eh=["right","left"],Y_=["top","bottom"],q_=["bottom","top"];function K_(e,t,n){switch(e){case"top":case"bottom":return n?t?Eh:Sh:t?Sh:Eh;case"left":case"right":return t?Y_:q_;default:return[]}}function X_(e,t,n,o){const i=wi(e);let a=K_(xn(e),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),t&&(a=a.concat(a.map(Bc)))),a}function Es(e){return e.replace(/left|right|bottom|top/g,t=>H_[t])}function Z_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qm(e){return typeof e!="number"?Z_(e):{top:e,right:e,bottom:e,left:e}}function Os(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Oh(e,t,n){let{reference:o,floating:i}=e;const a=jt(t),r=ru(t),s=au(r),l=xn(t),c=a==="y",d=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,u=o[s]/2-i[s]/2;let p;switch(l){case"top":p={x:d,y:o.y-i.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:h};break;case"left":p={x:o.x-i.width,y:h};break;default:p={x:o.x,y:o.y}}switch(wi(t)){case"start":p[r]-=u*(n&&c?-1:1);break;case"end":p[r]+=u*(n&&c?-1:1);break}return p}const J_=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:r}=n,s=a.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=Oh(c,o,l),u=o,p={},m=0;for(let g=0;g<s.length;g++){const{name:v,fn:f}=s[g],{x:y,y:x,data:w,reset:k}=await f({x:d,y:h,initialPlacement:o,placement:u,strategy:i,middlewareData:p,rects:c,platform:r,elements:{reference:e,floating:t}});d=y??d,h=x??h,p={...p,[v]:{...p[v],...w}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(u=k.placement),k.rects&&(c=k.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:d,y:h}=Oh(c,u,l)),g=-1)}return{x:d,y:h,placement:u,strategy:i,middlewareData:p}};async function _a(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:r,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=yn(t,e),m=Qm(p),g=s[u?h==="floating"?"reference":"floating":h],v=Os(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),f=h==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},w=Os(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:f,offsetParent:y,strategy:l}):f);return{top:(v.top-w.top+m.top)/x.y,bottom:(w.bottom-v.bottom+m.bottom)/x.y,left:(v.left-w.left+m.left)/x.x,right:(w.right-v.right+m.right)/x.x}}const Q_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:r,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=yn(e,t)||{};if(c==null)return{};const h=Qm(d),u={x:n,y:o},p=ru(i),m=au(p),g=await r.getDimensions(c),v=p==="y",f=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-u[p]-a.floating[m],k=u[p]-a.reference[p],S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let O=S?S[x]:0;(!O||!await(r.isElement==null?void 0:r.isElement(S)))&&(O=s.floating[x]||a.floating[m]);const _=w/2-k/2,E=O/2-g[m]/2-1,V=Un(h[f],E),$=Un(h[y],E),R=V,K=O-g[m]-$,D=O/2-g[m]/2+_,M=Nc(R,D,K),A=!l.arrow&&wi(i)!=null&&D!==M&&a.reference[m]/2-(D<R?V:$)-g[m]/2<0,U=A?D<R?D-R:D-K:0;return{[p]:u[p]+U,data:{[p]:M,centerOffset:D-M-U,...A&&{alignmentOffset:U}},reset:A}}}),ek=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:r,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...v}=yn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const f=xn(i),y=jt(s),x=xn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=u||(x||!g?[Es(s)]:U_(s)),S=m!=="none";!u&&S&&k.push(...X_(s,g,m,w));const O=[s,...k],_=await _a(t,v),E=[];let V=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&E.push(_[f]),h){const D=G_(i,r,w);E.push(_[D[0]],_[D[1]])}if(V=[...V,{placement:i,overflows:E}],!E.every(D=>D<=0)){var $,R;const D=((($=a.flip)==null?void 0:$.index)||0)+1,M=O[D];if(M&&(!(h==="alignment"&&y!==jt(M))||V.every(U=>jt(U.placement)===y?U.overflows[0]>0:!0)))return{data:{index:D,overflows:V},reset:{placement:M}};let A=(R=V.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:R.placement;if(!A)switch(p){case"bestFit":{var K;const U=(K=V.filter(G=>{if(S){const ee=jt(G.placement);return ee===y||ee==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(ee=>ee>0).reduce((ee,te)=>ee+te,0)]).sort((G,ee)=>G[1]-ee[1])[0])==null?void 0:K[0];U&&(A=U);break}case"initialPlacement":A=s;break}if(i!==A)return{reset:{placement:A}}}return{}}}};function $h(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ih(e){return z_.some(t=>e[t]>=0)}const tk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=yn(e,t);switch(o){case"referenceHidden":{const a=await _a(t,{...i,elementContext:"reference"}),r=$h(a,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ih(r)}}}case"escaped":{const a=await _a(t,{...i,altBoundary:!0}),r=$h(a,n.floating);return{data:{escapedOffsets:r,escaped:Ih(r)}}}default:return{}}}}},ev=new Set(["left","top"]);async function nk(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=xn(n),s=wi(n),l=jt(n)==="y",c=ev.has(r)?-1:1,d=a&&l?-1:1,h=yn(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}const ok=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:r,middlewareData:s}=t,l=await nk(t,e);return r===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:r}}}}},ik=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:a=!0,crossAxis:r=!1,limiter:s={fn:v=>{let{x:f,y}=v;return{x:f,y}}},...l}=yn(e,t),c={x:n,y:o},d=await _a(t,l),h=jt(xn(i)),u=iu(h);let p=c[u],m=c[h];if(a){const v=u==="y"?"top":"left",f=u==="y"?"bottom":"right",y=p+d[v],x=p-d[f];p=Nc(y,p,x)}if(r){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",y=m+d[v],x=m-d[f];m=Nc(y,m,x)}const g=s.fn({...t,[u]:p,[h]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[u]:a,[h]:r}}}}}},ak=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:r}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=yn(e,t),d={x:n,y:o},h=jt(i),u=iu(h);let p=d[u],m=d[h];const g=yn(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=u==="y"?"height":"width",w=a.reference[u]-a.floating[x]+v.mainAxis,k=a.reference[u]+a.reference[x]-v.mainAxis;p<w?p=w:p>k&&(p=k)}if(c){var f,y;const x=u==="y"?"width":"height",w=ev.has(xn(i)),k=a.reference[h]-a.floating[x]+(w&&((f=r.offset)==null?void 0:f[h])||0)+(w?0:v.crossAxis),S=a.reference[h]+a.reference[x]+(w?0:((y=r.offset)==null?void 0:y[h])||0)-(w?v.crossAxis:0);m<k?m=k:m>S&&(m=S)}return{[u]:p,[h]:m}}}},rk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:r,elements:s}=t,{apply:l=()=>{},...c}=yn(e,t),d=await _a(t,c),h=xn(i),u=wi(i),p=jt(i)==="y",{width:m,height:g}=a.floating;let v,f;h==="top"||h==="bottom"?(v=h,f=u===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(f=h,v=u==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=m-d.left-d.right,w=Un(g-d[v],y),k=Un(m-d[f],x),S=!t.middlewareData.shift;let O=w,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(O=y),S&&!u){const V=at(d.left,0),$=at(d.right,0),R=at(d.top,0),K=at(d.bottom,0);p?_=m-2*(V!==0||$!==0?V+$:at(d.left,d.right)):O=g-2*(R!==0||K!==0?R+K:at(d.top,d.bottom))}await l({...t,availableWidth:_,availableHeight:O});const E=await r.getDimensions(s.floating);return m!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function pl(){return typeof window<"u"}function Ci(e){return tv(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zt(e){var t;return(t=(tv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tv(e){return pl()?e instanceof Node||e instanceof st(e).Node:!1}function Pt(e){return pl()?e instanceof Element||e instanceof st(e).Element:!1}function Ut(e){return pl()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function Th(e){return!pl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}const sk=new Set(["inline","contents"]);function Fa(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!sk.has(i)}const lk=new Set(["table","td","th"]);function ck(e){return lk.has(Ci(e))}const dk=[":popover-open",":modal"];function gl(e){return dk.some(t=>{try{return e.matches(t)}catch{return!1}})}const uk=["transform","translate","scale","rotate","perspective"],hk=["transform","translate","scale","rotate","perspective","filter"],pk=["paint","layout","strict","content"];function su(e){const t=lu(),n=Pt(e)?Vt(e):e;return uk.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||hk.some(o=>(n.willChange||"").includes(o))||pk.some(o=>(n.contain||"").includes(o))}function gk(e){let t=Yn(e);for(;Ut(t)&&!hi(t);){if(su(t))return t;if(gl(t))return null;t=Yn(t)}return null}function lu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fk=new Set(["html","body","#document"]);function hi(e){return fk.has(Ci(e))}function Vt(e){return st(e).getComputedStyle(e)}function fl(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(Ci(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Th(e)&&e.host||Zt(e);return Th(t)?t.host:t}function nv(e){const t=Yn(e);return hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ut(t)&&Fa(t)?t:nv(t)}function ka(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=nv(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=st(i);if(a){const s=zc(r);return t.concat(r,r.visualViewport||[],Fa(i)?i:[],s&&n?ka(s):[])}return t.concat(i,ka(i,[],n))}function zc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ov(e){const t=Vt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Ut(e),a=i?e.offsetWidth:n,r=i?e.offsetHeight:o,s=Ss(n)!==a||Ss(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function cu(e){return Pt(e)?e:e.contextElement}function ai(e){const t=cu(e);if(!Ut(t))return Gt(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=ov(t);let r=(a?Ss(n.width):n.width)/o,s=(a?Ss(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const mk=Gt(0);function iv(e){const t=st(e);return!lu()||!t.visualViewport?mk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function Oo(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=cu(e);let r=Gt(1);t&&(o?Pt(o)&&(r=ai(o)):r=ai(e));const s=vk(a,n,o)?iv(a):Gt(0);let l=(i.left+s.x)/r.x,c=(i.top+s.y)/r.y,d=i.width/r.x,h=i.height/r.y;if(a){const u=st(a),p=o&&Pt(o)?st(o):o;let m=u,g=zc(m);for(;g&&o&&p!==m;){const v=ai(g),f=g.getBoundingClientRect(),y=Vt(g),x=f.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,w=f.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,h*=v.y,l+=x,c+=w,m=st(g),g=zc(m)}}return Os({width:d,height:h,x:l,y:c})}function ml(e,t){const n=fl(e).scrollLeft;return t?t.left+n:Oo(Zt(e)).left+n}function av(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-ml(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function bk(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",r=Zt(o),s=t?gl(t.floating):!1;if(o===r||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Gt(1);const d=Gt(0),h=Ut(o);if((h||!h&&!a)&&((Ci(o)!=="body"||Fa(r))&&(l=fl(o)),Ut(o))){const p=Oo(o);c=ai(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const u=r&&!h&&!a?av(r,l):Gt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+u.x,y:n.y*c.y-l.scrollTop*c.y+d.y+u.y}}function yk(e){return Array.from(e.getClientRects())}function xk(e){const t=Zt(e),n=fl(e),o=e.ownerDocument.body,i=at(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=at(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ml(e);const s=-n.scrollTop;return Vt(o).direction==="rtl"&&(r+=at(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Ph=25;function wk(e,t){const n=st(e),o=Zt(e),i=n.visualViewport;let a=o.clientWidth,r=o.clientHeight,s=0,l=0;if(i){a=i.width,r=i.height;const d=lu();(!d||d&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=ml(o);if(c<=0){const d=o.ownerDocument,h=d.body,u=getComputedStyle(h),p=d.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,m=Math.abs(o.clientWidth-h.clientWidth-p);m<=Ph&&(a-=m)}else c<=Ph&&(a+=c);return{width:a,height:r,x:s,y:l}}const Ck=new Set(["absolute","fixed"]);function _k(e,t){const n=Oo(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ut(e)?ai(e):Gt(1),r=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=o*a.y;return{width:r,height:s,x:l,y:c}}function Vh(e,t,n){let o;if(t==="viewport")o=wk(e,n);else if(t==="document")o=xk(Zt(e));else if(Pt(t))o=_k(t,n);else{const i=iv(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Os(o)}function rv(e,t){const n=Yn(e);return n===t||!Pt(n)||hi(n)?!1:Vt(n).position==="fixed"||rv(n,t)}function kk(e,t){const n=t.get(e);if(n)return n;let o=ka(e,[],!1).filter(s=>Pt(s)&&Ci(s)!=="body"),i=null;const a=Vt(e).position==="fixed";let r=a?Yn(e):e;for(;Pt(r)&&!hi(r);){const s=Vt(r),l=su(r);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&i&&Ck.has(i.position)||Fa(r)&&!l&&rv(e,r))?o=o.filter(c=>c!==r):i=s,r=Yn(r)}return t.set(e,o),o}function Sk(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?gl(t)?[]:kk(t,this._c):[].concat(n),o],r=a[0],s=a.reduce((l,c)=>{const d=Vh(t,c,i);return l.top=at(d.top,l.top),l.right=Un(d.right,l.right),l.bottom=Un(d.bottom,l.bottom),l.left=at(d.left,l.left),l},Vh(t,r,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ek(e){const{width:t,height:n}=ov(e);return{width:t,height:n}}function Ok(e,t,n){const o=Ut(t),i=Zt(t),a=n==="fixed",r=Oo(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Gt(0);function c(){l.x=ml(i)}if(o||!o&&!a)if((Ci(t)!=="body"||Fa(i))&&(s=fl(t)),o){const p=Oo(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();a&&!o&&i&&c();const d=i&&!o&&!a?av(i,s):Gt(0),h=r.left+s.scrollLeft-l.x-d.x,u=r.top+s.scrollTop-l.y-d.y;return{x:h,y:u,width:r.width,height:r.height}}function jl(e){return Vt(e).position==="static"}function Dh(e,t){if(!Ut(e)||Vt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zt(e)===n&&(n=n.ownerDocument.body),n}function sv(e,t){const n=st(e);if(gl(e))return n;if(!Ut(e)){let i=Yn(e);for(;i&&!hi(i);){if(Pt(i)&&!jl(i))return i;i=Yn(i)}return n}let o=Dh(e,t);for(;o&&ck(o)&&jl(o);)o=Dh(o,t);return o&&hi(o)&&jl(o)&&!su(o)?n:o||gk(e)||n}const $k=async function(e){const t=this.getOffsetParent||sv,n=this.getDimensions,o=await n(e.floating);return{reference:Ok(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ik(e){return Vt(e).direction==="rtl"}const Tk={convertOffsetParentRelativeRectToViewportRelativeRect:bk,getDocumentElement:Zt,getClippingRect:Sk,getOffsetParent:sv,getElementRects:$k,getClientRects:yk,getDimensions:Ek,getScale:ai,isElement:Pt,isRTL:Ik};function lv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pk(e,t){let n=null,o;const i=Zt(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function r(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:p}=c;if(s||t(),!u||!p)return;const m=or(h),g=or(i.clientWidth-(d+u)),v=or(i.clientHeight-(h+p)),f=or(d),y={rootMargin:-m+"px "+-g+"px "+-v+"px "+-f+"px",threshold:at(0,Un(1,l))||1};let x=!0;function w(k){const S=k[0].intersectionRatio;if(S!==l){if(!x)return r();S?r(!1,S):o=setTimeout(()=>{r(!1,1e-7)},1e3)}S===1&&!lv(c,e.getBoundingClientRect())&&r(),x=!1}try{n=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return r(!0),a}function Vk(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=cu(e),d=i||a?[...c?ka(c):[],...ka(t)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),a&&f.addEventListener("resize",n)});const h=c&&s?Pk(c,n):null;let u=-1,p=null;r&&(p=new ResizeObserver(f=>{let[y]=f;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,g=l?Oo(e):null;l&&v();function v(){const f=Oo(e);g&&!lv(g,f)&&n(),g=f,m=requestAnimationFrame(v)}return n(),()=>{var f;d.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),h?.(),(f=p)==null||f.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Dk=ok,Mk=ik,Rk=ek,Fk=rk,Ak=tk,Lk=Q_,Nk=ak,Bk=(e,t,n)=>{const o=new Map,i={platform:Tk,...n},a={...i.platform,_c:o};return J_(e,t,{...i,platform:a})};function Mh(e=0,t=0,n=0,o=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,o);const i={x:e,y:t,width:n,height:o,top:t,right:e+n,bottom:t+o,left:e};return{...i,toJSON:()=>i}}function zk(e){if(!e)return Mh();const{x:t,y:n,width:o,height:i}=e;return Mh(t,n,o,i)}function Hk(e,t){return{contextElement:ke(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?zk(o):n.getBoundingClientRect()}}}var Di=e=>({variable:e,reference:`var(${e})`}),rn={arrowSize:Di("--arrow-size"),arrowSizeHalf:Di("--arrow-size-half"),arrowBg:Di("--arrow-background"),transformOrigin:Di("--transform-origin"),arrowOffset:Di("--arrow-offset")},jk=e=>e==="top"||e==="bottom"?"y":"x";function Wk(e,t){return{name:"transformOrigin",fn(n){var o,i,a,r;const{elements:s,middlewareData:l,placement:c,rects:d,y:h}=n,u=c.split("-")[0],p=jk(u),m=((o=l.arrow)==null?void 0:o.x)||0,g=((i=l.arrow)==null?void 0:i.y)||0,v=t?.clientWidth||0,f=t?.clientHeight||0,y=m+v/2,x=g+f/2,w=Math.abs(((a=l.shift)==null?void 0:a.y)||0),k=d.reference.height/2,S=f/2,O=((r=e.offset)==null?void 0:r.mainAxis)??e.gutter,_=typeof O=="number"?O+S:O??S,E=w>_,V={top:`${y}px calc(100% + ${_}px)`,bottom:`${y}px ${-_}px`,left:`calc(100% + ${_}px) ${x}px`,right:`${-_}px ${x}px`}[u],$=`${y}px ${d.reference.y+k-h}px`,R=!!e.overlap&&p==="y"&&E;return s.floating.style.setProperty(rn.transformOrigin.variable,R?$:V),{data:{transformOrigin:R?$:V}}}}}var Gk={name:"rects",fn({rects:e}){return{data:e}}},Uk=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:o,y:i}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:o!=null?`${o}px`:"",top:i!=null?`${i}px`:"",[a]:`calc(100% + ${rn.arrowOffset.reference})`}),{}}}};function Yk(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function qk(e){return e.split("-")[0]}var Kk={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Rh(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function du(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Xk(e,t,n){const o=e||t.createElement("div");return Lk({element:o,padding:n.arrowPadding})}function Zk(e,t){if(!uw(t.offset??t.gutter))return Dk(({placement:n})=>{var o,i;const a=(e?.clientHeight||0)/2,r=((o=t.offset)==null?void 0:o.mainAxis)??t.gutter,s=typeof r=="number"?r+a:r??a,{hasAlign:l}=Yk(n),c=l?void 0:t.shift,d=((i=t.offset)==null?void 0:i.crossAxis)??c;return al({crossAxis:d,mainAxis:s,alignmentAxis:t.shift})})}function Jk(e){if(!e.flip)return;const t=du(e.boundary);return Rk({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function Qk(e){if(!e.slide&&!e.overlap)return;const t=du(e.boundary);return Mk({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Nk()})}function eS(e){return Fk({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:o,availableWidth:i}){const a=t.floating,r=Math.round(n.reference.width),s=Math.round(n.reference.height);i=Math.floor(i),o=Math.floor(o),a.style.setProperty("--reference-width",`${r}px`),a.style.setProperty("--reference-height",`${s}px`),a.style.setProperty("--available-width",`${i}px`),a.style.setProperty("--available-height",`${o}px`)}})}function tS(e){if(e.hideWhenDetached)return Ak({strategy:"referenceHidden",boundary:du(e.boundary)??"clippingAncestors"})}function nS(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function oS(e,t,n={}){const o=Hk(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},Kk,n),a=t.querySelector("[data-part=arrow]"),r=[Zk(a,i),Jk(i),Qk(i),Xk(a,t.ownerDocument,i),Uk(a),Wk({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),eS(i),tS(i),Gk],{placement:s,strategy:l,onComplete:c,onPositioned:d}=i,h=async()=>{var g;if(!o||!t)return;const v=await Bk(o,t,{placement:s,middleware:r,strategy:l});c?.(v),d?.({placed:!0});const f=Ce(t),y=Rh(f,v.x),x=Rh(f,v.y);t.style.setProperty("--x",`${y}px`),t.style.setProperty("--y",`${x}px`),i.hideWhenDetached&&((g=v.middlewareData.hide)!=null&&g.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const w=t.firstElementChild;if(w){const k=ui(w);t.style.setProperty("--z-index",k.zIndex)}},u=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:h,floatingElement:t}),d?.({placed:!0})):await h()},p=nS(i.listeners),m=i.listeners?Vk(o,t,u,p):bw;return u(),()=>{m?.(),d?.({placed:!1})}}function ct(e,t,n={}){const{defer:o,...i}=n,a=o?J:s=>s(),r=[];return r.push(a(()=>{const s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;r.push(oS(s,l,i))})),()=>{r.forEach(s=>s?.())}}var iS={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function cv(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:rn.arrowSize.reference,height:rn.arrowSize.reference,[rn.arrowSizeHalf.variable]:`calc(${rn.arrowSize.reference} / 2)`,[rn.arrowOffset.variable]:`calc(${rn.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?iS[t.split("-")[0]]:void 0,background:rn.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:i,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:o?"var(--available-width)":void 0,maxHeight:o?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var dv=ie("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]);dv.build();var aS=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},rS=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},sS=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},lS=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},cS=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},dS=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},uS=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},hS=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},pS=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderTrack)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-track:${t}`},gS=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderThumb)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-thumb:${t}`},Kr=e=>e.getById(lS(e)),fS=e=>e.getById(hS(e)),mS=(e,t)=>e.getById(gS(e,t)),vS=e=>e.getById(dS(e)),Fh=e=>e.getById(aS(e)),bS=e=>e.getById(uS(e)),yS=(e,t,n)=>{const o=bS(e);if(!o)return;const{getPercentValue:i}=am(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},xS=e=>e.getById(rS(e)),Wl=e=>e.getById(sS(e)),wS=e=>e.getById(cS(e)),CS=(e,t)=>e.getById(pS(e,t)),_S=(e,t,n,o)=>{const i=CS(e,n);if(!i)return;const{getPercentValue:a}=am(t,i);return{x:a({dir:o,orientation:"horizontal"}),y:a({orientation:"vertical"})}},kS=e=>[...Gn(Kr(e),"input[data-channel]"),...Gn(xS(e),"input[data-channel]")];function SS(e,t){if(t==null)return"";if(t==="hex")return e.toString("hex");if(t==="css")return e.toString("css");if(t in e)return e.getChannelValue(t).toString();const n=e.getFormat()==="hsla";switch(t){case"hue":return n?e.toFormat("hsla").getChannelValue("hue").toString():e.toFormat("hsba").getChannelValue("hue").toString();case"saturation":return n?e.toFormat("hsla").getChannelValue("saturation").toString():e.toFormat("hsba").getChannelValue("saturation").toString();case"lightness":return e.toFormat("hsla").getChannelValue("lightness").toString();case"brightness":return e.toFormat("hsba").getChannelValue("brightness").toString();case"red":case"green":case"blue":return e.toFormat("rgba").getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}var Ah=e=>ks(e),ES=/^[0-9a-fA-F]{3,8}$/;function OS(e){return ES.test(e)}function $S(e){return e.startsWith("#")?e:OS(e)?`#${e}`:e}var{and:IS}=ze();IS("isOpenControlled","closeOnSelect");function Lh(e,t,n){const o=kS(e);J(()=>{o.forEach(i=>{const a=i.dataset.channel;Ot(i,SS(n||t,a))})})}function TS(e,t){const n=vS(e);n&&J(()=>Ot(n,t))}Y()(["closeOnSelect","dir","disabled","format","defaultFormat","getRootNode","id","ids","initialFocusEl","inline","name","positioning","onFocusOutside","onFormatChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","onValueChangeEnd","defaultOpen","open","positioning","required","readOnly","value","defaultValue","invalid","openAutoFocus"]);Y()(["xChannel","yChannel"]);Y()(["channel","orientation"]);Y()(["value","disabled"]);Y()(["value","respectAlpha"]);Y()(["size"]);dv.extendWith("view");var uv=ie("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");uv.build();var hv=e=>new Mo(e);hv.empty=()=>new Mo({items:[]});var PS=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},VS=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},DS=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},MS=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},RS=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},FS=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},Dn=e=>e.getById(DS(e)),qo=e=>e.getById(VS(e)),Nh=e=>e.getById(MS(e)),Bh=e=>e.getById(PS(e)),ia=e=>e.getById(RS(e)),zh=e=>e.getById(FS(e)),Mi=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return cm(Dn(e),n)},Hh=e=>{const t=qo(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},AS=e=>{const t=ia(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:LS,createMachine:NS,choose:BS}=sl(),{and:Te,not:tt}=LS;NS({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){om(t)},collection:hv.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:o}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Ne,hash(i){return i.join(",")},onChange(i){var a;const r=n(),s=r.get("selectedItems"),l=e("collection"),c=i.map(d=>s.find(h=>l.getItemValue(h)===d)||l.find(d));r.set("selectedItems",c),(a=e("onValueChange"))==null||a({value:i,items:c})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(i){var a;const r=e("collection").find(i);(a=e("onHighlightChange"))==null||a({highlightedValue:i,highlightedItem:r})}})),inputValue:t(()=>{let i=e("inputValue")||e("defaultInputValue");const a=e("value")||e("defaultValue");if(!i.trim()&&!e("multiple")){const r=e("collection").stringifyMany(a);i=Bt(e("selectionBehavior"),{preserve:i||r,replace:r,clear:""})}return{defaultValue:i,value:e("inputValue"),onChange(r){var s;const l=o(),c=(l.previousEvent||l).src;(s=e("onInputValueChange"))==null||s({inputValue:r,reason:c})}}}),highlightedItem:t(()=>{const i=e("highlightedValue");return{defaultValue:e("collection").find(i)}}),selectedItems:t(()=>{const i=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(i)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:o,send:i}){n([()=>e.hash("value")],()=>{o(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{o(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{o(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{i({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:BS([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:Te("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:Te("isCustomValue",tt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:Te("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement","hideOtherElements"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:Te("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:Te("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:Te("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:Te("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:Te("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement","hideOtherElements"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"autoHighlight",actions:["highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:Te("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:Te("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return dw(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>e.restoreFocus==null?!0:!!e.restoreFocus,isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue"))},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:xi(()=>Dn(n),{type:"listbox",defer:!0,exclude:()=>[qo(n),ia(n),zh(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(o){o.preventDefault(),o.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},hideOtherElements({scope:e}){return m1([qo(e),Dn(e),ia(e),zh(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Bh(n)||ia(n),i=()=>Nh(n);return e.set("currentPlacement",t("positioning").placement),ct(o,i,{...t("positioning"),defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=qo(n);let a=[];const r=c=>{const d=o.current().type.includes("POINTER"),h=e.get("highlightedValue");if(d||!h)return;const u=Dn(n),p=t("scrollToIndexFn");if(p){const v=t("collection").indexOf(h);p({index:v,immediate:c,getElement:()=>Mi(n,h)});return}const m=Mi(n,h),g=J(()=>{xa(m,{rootEl:u,block:"nearest"})});a.push(g)},s=J(()=>r(!0));a.push(s);const l=Da(i,{attributes:["aria-activedescendant"],callback:()=>r(!1)});return a.push(l),()=>{a.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:o}){ct(()=>Bh(n),()=>Nh(n),{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(i){e.set("currentPlacement",i.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:o}=e,i=o("collection"),a=n.get("highlightedValue");if(!a||!i.has(a))return;const r=o("multiple")?So(n.get("value"),a):[a];(t=o("onSelect"))==null||t({value:r,itemValue:a}),n.set("value",r);const s=Bt(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(r),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){el(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=Mi(n,o),a=Dn(n),r=t("scrollToIndexFn");if(r){const s=t("collection").indexOf(o);r({index:s,immediate:!0,getElement:()=>Mi(n,o)});return}xa(i,{rootEl:a,block:"nearest"})})},selectItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{var a;const r=i("multiple")?So(t.get("value"),n.value):[n.value];(a=i("onSelect"))==null||a({value:r,itemValue:n.value}),t.set("value",r);const s=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(r),clear:""});t.set("inputValue",s)})},clearItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{const a=Co(t.get("value"),n.value);t.set("value",a);const r=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",r)})},setInitialFocus({scope:e}){J(()=>{Hh(e)})},setFinalFocus({scope:e}){J(()=>{const t=ia(e);t?.dataset.focusable==null?Hh(e):AS(e)})},syncInputValue({context:e,scope:t,event:n}){const o=qo(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&Ux(o)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const o=t("selectionBehavior"),i=Bt(o,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",i)},setValue(e){const{context:t,flush:n,event:o,prop:i}=e;n(()=>{t.set("value",o.value);const a=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(o.value),clear:""});t.set("inputValue",a)})},clearSelectedItems(e){const{context:t,flush:n,prop:o}=e;n(()=>{t.set("value",[]);const i=Bt(o("selectionBehavior"),{preserve:t.get("inputValue"),replace:o("collection").stringifyMany([]),clear:""});t.set("inputValue",i)})},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const o=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>Mi(t,o)})}else{const o=Dn(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=jh(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=jh(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(Dn(n)?queueMicrotask:J)(()=>{const o=t("collection").firstValue;o&&e.set("highlightedValue",o)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Dn(n)?queueMicrotask:J)(()=>{const o=t("collection").lastValue;o&&e.set("highlightedValue",o)})},highlightNextItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getNextValue(o),!n&&t("loopFocus")&&(n=i.firstValue)):n=i.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getPreviousValue(o),!n&&t("loopFocus")&&(n=i.lastValue)):n=i.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){J(()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){J(()=>{let o=null;n("hasSelectedItems")?o=t("collection").sort(e.get("value"))[0]:o=t("collection").firstValue,o&&e.set("highlightedValue",o)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){J(()=>{const o=t("collection");let i=null;n("hasSelectedItems")?i=o.sort(e.get("value"))[0]:i=o.lastValue,i&&e.set("highlightedValue",i)})},autofillInputValue({context:e,computed:t,prop:n,event:o,scope:i}){const a=qo(i),r=n("collection");if(!t("autoComplete")||!a||!o.keypress)return;const s=r.stringify(e.get("highlightedValue"));J(()=>{a.value=s||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{const{context:t,prop:n}=e,o=n("collection"),i=t.get("value"),a=i.map(s=>t.get("selectedItems").find(l=>o.getItemValue(l)===s)||o.find(s));t.set("selectedItems",a);const r=Bt(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:o.stringifyMany(i),clear:""});t.set("inputValue",r)})},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function jh(e){return(e.previousEvent||e).src}Y()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]);Y()(["htmlFor"]);Y()(["id"]);Y()(["item","persistFocus"]);uv.extendWith("empty");function Gl(e,t){return e-t*Math.floor(e/t)}const pv=1721426;function ir(e,t,n,o){t=uu(e,t);let i=t-1,a=-2;return n<=2?a=0:Xr(t)&&(a=-1),pv-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+o)}function Xr(e){return e%4===0&&(e%100!==0||e%400===0)}function uu(e,t){return e==="BC"?1-t:t}function zS(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const HS={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};let pi=class{fromJulianDay(t){let n=t,o=n-pv,i=Math.floor(o/146097),a=Gl(o,146097),r=Math.floor(a/36524),s=Gl(a,36524),l=Math.floor(s/1461),c=Gl(s,1461),d=Math.floor(c/365),h=i*400+r*100+l*4+d+(r!==4&&d!==4?1:0),[u,p]=zS(h),m=n-ir(u,p,1,1),g=2;n<ir(u,p,3,1)?g=0:Xr(p)&&(g=1);let v=Math.floor(((m+g)*12+373)/367),f=n-ir(u,p,v,1)+1;return new Is(u,p,v,f)}toJulianDay(t){return ir(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return HS[Xr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Xr(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}};const jS={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function vl(e,t){return t=$t(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function WS(e,t){var n,o,i,a;return(a=(i=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&i!==void 0?i:(o=t.isEqual)===null||o===void 0?void 0:o.call(t,e))!==null&&a!==void 0?a:e.identifier===t.identifier}function GS(e,t,n){let o=e.calendar.toJulianDay(e),i=ZS(t),a=Math.ceil(o+1-i)%7;return a<0&&(a+=7),a}function US(e){return hn(Date.now(),e)}function gv(e){return ri(US(e))}function fv(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function YS(e,t){return Wh(e)-Wh(t)}function Wh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Ul=null;function hu(){return Ul==null&&(Ul=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ul}function mv(e){return e.subtract({days:e.day-1})}function qS(e){return mv(e.subtract({months:e.month-1}))}function KS(e,t,n){let o=GS(e,t);return e.subtract({days:o})}const Gh=new Map,Yl=new Map;function XS(e){if(Intl.Locale){let n=Gh.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Gh.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function ZS(e){let t=Yl.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Yl.set(e,t),t.firstDay}let n=XS(e);if(e.includes("-fw-")){let o=e.split("-fw-")[1].split("-")[0];o==="mon"?t={firstDay:1}:o==="tue"?t={firstDay:2}:o==="wed"?t={firstDay:3}:o==="thu"?t={firstDay:4}:o==="fri"?t={firstDay:5}:o==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&jS[n]||0};Yl.set(e,t)}return t.firstDay}function vv(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function bv(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function gi(e){e=$t(e,new pi);let t=uu(e.era,e.year);return yv(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function yv(e,t,n,o,i,a,r){let s=new Date;return s.setUTCHours(o,i,a,r),s.setUTCFullYear(e,t-1,n),s.getTime()}function Hc(e,t){if(t==="UTC")return 0;if(e>0&&t===hu())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=xv(e,t);return yv(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Uh=new Map;function xv(e,t){let n=Uh.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Uh.set(t,n));let o=n.formatToParts(new Date(e)),i={};for(let a of o)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Yh=864e5;function JS(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>QS(e,t,i))}function QS(e,t,n){let o=xv(n,t);return e.year===o.year&&e.month===o.month&&e.day===o.day&&e.hour===o.hour&&e.minute===o.minute&&e.second===o.second}function cn(e,t,n="compatible"){let o=$o(e);if(t==="UTC")return gi(o);if(t===hu()&&n==="compatible"){o=$t(o,new pi);let l=new Date,c=uu(o.era,o.year);return l.setFullYear(c,o.month-1,o.day),l.setHours(o.hour,o.minute,o.second,o.millisecond),l.getTime()}let i=gi(o),a=Hc(i-Yh,t),r=Hc(i+Yh,t),s=JS(o,t,i-a,i-r);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-r);case"compatible":case"later":return Math.max(i-a,i-r);case"reject":throw new RangeError("No such absolute time found")}}function wv(e,t,n="compatible"){return new Date(cn(e,t,n))}function hn(e,t){let n=Hc(e,t),o=new Date(e+n),i=o.getUTCFullYear(),a=o.getUTCMonth()+1,r=o.getUTCDate(),s=o.getUTCHours(),l=o.getUTCMinutes(),c=o.getUTCSeconds(),d=o.getUTCMilliseconds();return new Iv(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,d)}function ri(e){return new Is(e.calendar,e.era,e.year,e.month,e.day)}function $o(e,t){let n=0,o=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:o,second:i,millisecond:a}=e);else if("hour"in e)return e;return new mE(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function $t(e,t){if(WS(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),o=e.copy();return o.calendar=t,o.era=n.era,o.year=n.year,o.month=n.month,o.day=n.day,Io(o),o}function eE(e,t,n){if(e instanceof Iv)return e.timeZone===t?e:nE(e,t);let o=cn(e,t,n);return hn(o,t)}function tE(e){let t=gi(e)-e.offset;return new Date(t)}function nE(e,t){let n=gi(e)-e.offset;return $t(hn(n,t),e.calendar)}const Ri=36e5;function bl(e,t){let n=e.copy(),o="hour"in n?rE(n,t):0;jc(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Wc(n),Cv(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,oE(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,r;let l=(a=(r=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(r,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function jc(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Wc(e){for(;e.month<1;)jc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,jc(e,1)}function oE(e){for(;e.day<1;)e.month--,Wc(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Wc(e)}function Cv(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Io(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Cv(e)}function _v(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function kv(e,t){return bl(e,_v(t))}function pu(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Io(n),n}function $s(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),aE(n),n}function iE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ar(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ar(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ar(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ar(e.hour,24),t}function aE(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ar(e,t){let n=e%t;return n<0&&(n+=t),n}function rE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,iE(e)}function gu(e,t,n,o){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=pn(l,n,0,s.length-1,o?.round),i.era=s[l],Io(i);break}case"year":var a,r;!((a=(r=i.calendar).isInverseEra)===null||a===void 0)&&a.call(r,i)&&(n=-n),i.year=pn(e.year,n,-1/0,9999,o?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=pn(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=pn(e.day,n,1,e.calendar.getDaysInMonth(e),o?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Io(i),i}function Sv(e,t,n,o){let i=e.copy();switch(t){case"hour":{let a=e.hour,r=0,s=23;if(o?.hourCycle===12){let l=a>=12;r=l?12:0,s=l?23:11}i.hour=pn(a,n,r,s,o?.round);break}case"minute":i.minute=pn(e.minute,n,0,59,o?.round);break;case"second":i.second=pn(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=pn(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function pn(e,t,n,o,i=!1){if(i){e+=Math.sign(t),e<n&&(e=o);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>o&&(e=n)}else e+=t,e<n?e=o-(n-e-1):e>o&&(e=n+(e-o-1));return e}function Ev(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=bl($o(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=cn(i,e.timeZone)}else n=gi(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=hn(n,e.timeZone);return $t(o,e.calendar)}function sE(e,t){return Ev(e,_v(t))}function lE(e,t,n,o){switch(t){case"hour":{let i=0,a=23;if(o?.hourCycle===12){let m=e.hour>=12;i=m?12:0,a=m?23:11}let r=$o(e),s=$t($s(r,{hour:i}),new pi),l=[cn(s,e.timeZone,"earlier"),cn(s,e.timeZone,"later")].filter(m=>hn(m,e.timeZone).day===s.day)[0],c=$t($s(r,{hour:a}),new pi),d=[cn(c,e.timeZone,"earlier"),cn(c,e.timeZone,"later")].filter(m=>hn(m,e.timeZone).day===c.day).pop(),h=gi(e)-e.offset,u=Math.floor(h/Ri),p=h%Ri;return h=pn(u,n,Math.floor(l/Ri),Math.floor(d/Ri),o?.round)*Ri+p,$t(hn(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Sv(e,t,n,o);case"era":case"year":case"month":case"day":{let i=gu($o(e),t,n,o),a=cn(i,e.timeZone);return $t(hn(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function cE(e,t,n){let o=$o(e),i=$s(pu(o,t),t);if(i.compare(o)===0)return e;let a=cn(i,e.timeZone,n);return $t(hn(a,e.timeZone),e.calendar)}function dE(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Ov(e){let t=$t(e,new pi),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function $v(e){return`${Ov(e)}T${dE(e)}`}function uE(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),o=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function hE(e){return`${$v(e)}${uE(e.offset)}[${e.timeZone}]`}function pE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fu(e,t,n){pE(e,t),t.set(e,n)}function mu(e){let t=typeof e[0]=="object"?e.shift():new pi,n;if(typeof e[0]=="string")n=e.shift();else{let r=t.getEras();n=r[r.length-1]}let o=e.shift(),i=e.shift(),a=e.shift();return[t,n,o,i,a]}var gE=new WeakMap;let Is=class Gc{copy(){return this.era?new Gc(this.calendar,this.era,this.year,this.month,this.day):new Gc(this.calendar,this.year,this.month,this.day)}add(t){return bl(this,t)}subtract(t){return kv(this,t)}set(t){return pu(this,t)}cycle(t,n,o){return gu(this,t,n,o)}toDate(t){return wv(this,t)}toString(){return Ov(this)}compare(t){return fv(this,t)}constructor(...t){fu(this,gE,{writable:!0,value:void 0});let[n,o,i,a,r]=mu(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,Io(this)}};var fE=new WeakMap;let mE=class Uc{copy(){return this.era?new Uc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Uc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return bl(this,t)}subtract(t){return kv(this,t)}set(t){return pu($s(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return gu(this,t,n,o);default:return Sv(this,t,n,o)}}toDate(t,n){return wv(this,t,n)}toString(){return $v(this)}compare(t){let n=fv(this,t);return n===0?YS(this,$o(t)):n}constructor(...t){fu(this,fE,{writable:!0,value:void 0});let[n,o,i,a,r]=mu(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Io(this)}};var vE=new WeakMap;let Iv=class Yc{copy(){return this.era?new Yc(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Yc(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return Ev(this,t)}subtract(t){return sE(this,t)}set(t,n){return cE(this,t,n)}cycle(t,n,o){return lE(this,t,n,o)}toDate(){return tE(this)}toString(){return hE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-eE(t,this.timeZone).toDate().getTime()}constructor(...t){fu(this,vE,{writable:!0,value:void 0});let[n,o,i,a,r]=mu(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.timeZone=s,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Io(this)}},ql=new Map,Ts=class{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let o=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...o.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return xE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=wE(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=Tv(t,n),this.options=n}};const bE={true:{ja:"h11"},false:{}};function Tv(e,t={}){if(typeof t.hour12=="boolean"&&yE()){t={...t};let i=bE[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(ql.has(n))return ql.get(n);let o=new Intl.DateTimeFormat(e,t);return ql.set(n,o),o}let Kl=null;function yE(){return Kl==null&&(Kl=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Kl}let Xl=null;function xE(){return Xl==null&&(Xl=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Xl}function wE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=Tv(e,{...t,timeZone:void 0}),o=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(o===0&&i===23)return"h23";if(o===24&&i===23)return"h24";if(o===0&&i===11)return"h11";if(o===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function CE(e,t,n,o,i){const a={};for(let s in t){const l=s,c=t[l];c!=null&&(a[l]=Math.floor(c/2),a[l]>0&&c%2===0&&a[l]--)}const r=Ro(e,t,n).subtract(a);return Aa(e,r,t,n,o,i)}function Ro(e,t,n,o,i){let a=e;return t.years?a=qS(e):t.months?a=mv(e):t.weeks&&(a=KS(e,n)),Aa(e,a,t,n,o,i)}function vu(e,t,n,o,i){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let r=Ro(e,t,n).subtract(a);return Aa(e,r,t,n,o,i)}function Aa(e,t,n,o,i,a){return i&&e.compare(i)>=0&&(t=bv(t,Ro(ri(i),n,o))),a&&e.compare(a)<=0&&(t=vv(t,vu(ri(a),n,o))),t}function dn(e,t,n){let o=ri(e);return t&&(o=bv(o,ri(t))),n&&(o=vv(o,ri(n))),o}function qh(e,t,n,o,i,a){switch(t){case"start":return Ro(e,n,o,i,a);case"end":return vu(e,n,o,i,a);case"center":default:return CE(e,n,o,i,a)}}function vo(e,t){return t!=null&&vl(e,t)}function yl(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function _E(e,t,n){const o=e.subtract({days:1});return vl(o,e)||yl(o,t,n)}function kE(e,t,n){const o=e.add({days:1});return vl(o,e)||yl(o,t,n)}function Pv(e){let t={...e};for(let n in t)t[n]=1;return t}function Vv(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function SE(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function EE(e,t){const n=$o(gv(t));return new Ts(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:SE(n),timeZone:t})}function OE(e,t,n,o,i){let a=n.formatRangeToParts(e.toDate(i),t.toDate(i)),r=-1;for(let c=0;c<a.length;c++){let d=a[c];if(d.source==="shared"&&d.type==="literal")r=c;else if(d.source==="endRange")break}let s="",l="";for(let c=0;c<a.length;c++)c<r?s+=a[c].value:c>r&&(l+=a[c].value);return o(s,l)}function $E(e,t,n,o){let i=e,a=e,r=EE(n,o);return vl(i,a)?r.format(i.toDate(o)):OE(i,a,r,(s,l)=>`${s} – ${l}`,o)}var IE=10;function TE(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){const t=new Date().getFullYear(),n=Math.floor(t/100)*100,o=parseInt(e.slice(-2),10),i=n+o;return i>t+IE?(i-100).toString():i.toString()}return e}}function Kh(e,t){const o=e-e%10,i=[];for(let a=0;a<12;a+=1){const r=o+a;i.push(r)}return i}function Xh(e){return gv(e??hu())}function La(e,t,n,o){return function(i){const{startDate:a,focusedDate:r}=i,s=Vv(a,e);return yl(r,n,o)?{startDate:a,focusedDate:dn(r,n,o),endDate:s}:r.compare(a)<0?{startDate:vu(r,e,t,n,o),focusedDate:dn(r,n,o),endDate:s}:r.compare(s)>0?{startDate:Ro(r,e,t,n,o),endDate:s,focusedDate:dn(r,n,o)}:{startDate:a,endDate:s,focusedDate:dn(r,n,o)}}}function Dv(e,t,n,o,i,a){const r=La(n,o,i,a),s=t.add(n);return r({focusedDate:e.add(n),startDate:Ro(Aa(e,s,n,o,i,a),n,o)})}function Mv(e,t,n,o,i,a){const r=La(n,o,i,a);let s=t.subtract(n);return r({focusedDate:e.subtract(n),startDate:Ro(Aa(e,s,n,o,i,a),n,o)})}function PE(e,t,n,o,i,a,r){const s=La(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.add(Pv(o)),startDate:t});if(o.days)return Dv(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.add({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.add({years:1}),startDate:t})}function VE(e,t,n,o,i,a,r){const s=La(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.subtract(Pv(o)),startDate:t});if(o.days)return Mv(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.subtract({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.subtract({years:1}),startDate:t})}var Zh=e=>e!=null&&e.length===4,DE=e=>e!=null&&parseFloat(e)<=12,ME=e=>e!=null&&parseFloat(e)<=31;function RE(e,t,n){const o=FE(t,n);let{year:i,month:a,day:r}=AE(o,e)??{};if(i!=null||a!=null||r!=null){const l=new Date;i||(i=l.getFullYear().toString()),a||(a=(l.getMonth()+1).toString()),r||(r=l.getDate().toString())}if(Zh(i)||(i=TE(i)),Zh(i)&&DE(a)&&ME(r))return new Is(+i,+a,+r);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new Is(l.getFullYear(),l.getMonth()+1,l.getDate())}}function FE(e,t){return new Ts(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:n,value:o})=>n==="literal"?`${o}?`:`((?!=<${n}>)\\d+)?`).join("")}function AE(e,t){var n;const o=t.match(e);return(n=e.toString().match(/<(.+?)>/g))==null?void 0:n.map(i=>{var a;const r=i.match(/<(.+)>/);return!r||r.length<=0?null:(a=i.match(/<(.+)>/))==null?void 0:a[1]}).reduce((i,a,r)=>(a&&(o&&o.length>r?i[a]=o[r+1]:i[a]=null),i),{})}var rr="__live-region__";function Rv(e={}){const{level:t="polite",document:n=document,root:o,delay:i=0}=e,a=n.defaultView??window,r=o??n.body;function s(c,d){const h=n.getElementById(rr);h?.remove(),d=d??i;const u=n.createElement("span");u.id=rr,u.dataset.liveAnnouncer="true";const p=t!=="assertive"?"status":"alert";u.setAttribute("aria-live",t),u.setAttribute("role",p),Object.assign(u.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}),r.appendChild(u),a.setTimeout(()=>{u.textContent=c},d)}function l(){const c=n.getElementById(rr);c?.remove()}return{announce:s,destroy:l,toJSON(){return rr}}}var Fv=ie("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect");Fv.build();var LE=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},NE=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},BE=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},zE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},HE=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},jE=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},WE=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},Jh=(e,t)=>cm(Zr(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),Qh=e=>e.getById(zE(e)),Zr=e=>e.getById(LE(e)),Fi=e=>Gn(Av(e),"[data-part=input]"),GE=e=>e.getById(WE(e)),UE=e=>e.getById(jE(e)),YE=e=>e.getById(NE(e)),qE=e=>e.getById(HE(e)),Av=e=>e.getById(BE(e));function ep(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function sr(e){return e.slice().sort((t,n)=>t.compare(n))}var tp=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year);function fn(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function bu(e){return e===0?"day":e===1?"month":"year"}function yu(e,t,n){return bu(Le(fn(e,0),fn(t,0),fn(n,2)))}function KE(e,t){return fn(e,0)>fn(t,0)}function XE(e,t){return fn(e,0)<fn(t,0)}function ZE(e,t,n){const o=fn(e,0)+1;return yu(bu(o),t,n)}function JE(e,t,n){const o=fn(e,0)-1;return yu(bu(o),t,n)}var QE=["day","month","year"];function eO(e){QE.forEach(t=>e(t))}var{and:pt}=ze();function tO(e,t){if(e?.length!==t?.length)return!1;const n=Math.max(e.length,t.length);for(let o=0;o<n;o++)if(!vo(e[o],t[o]))return!1;return!0}function lr(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}pt("shouldRestoreFocus","isInteractOutsideEvent"),pt("isRangePicker","hasSelectedRange"),pt("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),pt("isRangePicker","isSelectingEndDate","closeOnSelect"),pt("isRangePicker","isSelectingEndDate"),pt("closeOnSelect","isOpenControlled"),pt("isRangePicker","isSelectingEndDate"),pt("isRangePicker","hasSelectedRange"),pt("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),pt("isRangePicker","isSelectingEndDate","closeOnSelect"),pt("isRangePicker","isSelectingEndDate"),pt("closeOnSelect","isOpenControlled");var Jr=(e,t)=>{const{context:n,prop:o}=e,i=n.get("view");let a=typeof t=="number"?n.get("focusedValue").set({[i]:t}):t;return eO(r=>{XE(r,o("minView"))&&(a=a.set({[r]:r==="day"?1:0}))}),a};function me(e,t){const{context:n,prop:o,computed:i}=e;if(!t)return;const a=Jr(e,t);if(vo(n.get("focusedValue"),a))return;const r=La(i("visibleDuration"),o("locale"),o("min"),o("max"))({focusedDate:a,startDate:n.get("startValue")});n.set("startValue",r.startDate),n.set("focusedValue",r.focusedDate)}function cr(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");vo(o,t.focusedDate)||n.set("focusedValue",t.focusedDate)}Y()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","open","defaultOpen","positioning","readOnly","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]);Y()(["index","fixOnBlur"]);Y()(["value"]);Y()(["columns","id","view"]);Y()(["disabled","value","columns"]);Y()(["view"]);const nO=Fv.extendWith("view");var Lv=ie("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger");Lv.build();Y()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);var oO=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,Nv=e=>e.isDirectory,qc=e=>e.isFile,Kc=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),iO=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=oO(n);if(!o)return null;if(Nv(o)&&t)return Bv(o.createReader(),`${o.name}`);if(qc(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?Kc(i,""):null)}if(qc(o))return new Promise(i=>{o.file(a=>{i(Kc(a,""))})})}).filter(n=>n)),Bv=(e,t="")=>new Promise(n=>{const o=[],i=()=>{e.readEntries(a=>{if(a.length===0){n(Promise.all(o).then(s=>s.flat()));return}const r=a.map(s=>{if(!s)return null;if(Nv(s))return Bv(s.createReader(),`${t}${s.name}`);if(qc(s))return new Promise(l=>{s.file(c=>{l(Kc(c,t))})})}).filter(s=>s);o.push(Promise.all(r)),i()})};i()});function aO(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function rO(e){return/^.*\.[\w]+$/.test(e)}var np=e=>aO(e)||rO(e);function sO(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(np).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(np).join(",")}var dr=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,Ai=e=>e!=null;function lO(e,t,n){if(Ai(e.size))if(Ai(t)&&Ai(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(Ai(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(Ai(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var cO="3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip",dO=new Map(cO.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function uO(e){const t=e.split(".").pop();return t&&dO.get(t)||null}function hO(e,t){if(e&&t){const n=Array.isArray(t)?t:typeof t=="string"?t.split(","):[];if(n.length===0)return!0;const o=e.name||"",i=(e.type||uO(o)||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(r=>{const s=r.trim().toLowerCase();return s.charAt(0)==="."?o.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}function pO(e,t){const n=e.type==="application/x-moz-file"||hO(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var gO=ie("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");gO.build();Y()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]);const fO=ie("fieldset").parts("root","errorText","helperText","legend");fO.build();const[zv,ut]=we("FileUploadContext"),mO=P({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ut();return q(),(n,o)=>(C(),T(b(X).button,W(b(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),vO=P({__name:"file-upload-context",setup(e){const t=ut();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),bO=P({__name:"file-upload-dropzone",props:wn({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=ut();return q(),(o,i)=>(C(),T(b(X).div,W(b(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),yO=P({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Qn();return q(),(o,i)=>{var a;return C(),T(b(X).input,W({"aria-describedby":(a=b(n))==null?void 0:a.ariaDescribedby},b(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[xO,Na]=we("FileUploadItemPropsContext"),wO=P({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na();return q(),(o,i)=>(C(),T(b(X).button,W(b(t).getItemDeleteTriggerProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[CO,_O]=we("FileUploadItemGroupPropsContext"),kO=P({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=F(()=>Rn(t,["type"])),o=ut();return CO(n),q(),(i,a)=>(C(),T(b(X).ul,W(b(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),SO=P({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na(),o=Ws();return q(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemNameProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default",{},()=>{var r;return[Be(oe(((r=o.default)==null?void 0:r.call(o))||b(n).file.name),1)]})]),_:3},16,["as-child"]))}}),EO=P({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na(),o=ve("");return Pf(i=>{const a=t.value.createFileUrl(n.value.file,r=>o.value=r);i(a)}),q(),(i,a)=>o.value?(C(),T(b(X).img,et(W({key:0},b(t).getItemPreviewImageProps({...b(n),url:o.value}))),null,16)):Q("",!0)}}),OO=P({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=ut(),n=Na();return q(),(o,i)=>b(n).file.type.match(e.type??".*")?(C(),T(b(X).div,W({key:0},b(t).getItemPreviewProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"])):Q("",!0)}}),$O=P({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na(),o=Ws();return q(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemSizeTextProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default",{},()=>{var r;return[Be(oe(((r=o.default)==null?void 0:r.call(o))||b(t).getFileSize(b(n).file)),1)]})]),_:3},16,["as-child"]))}}),IO=P({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=ut(),o=_O(),i=F(()=>({...t,type:o.value.type}));return xO(i),q(),(a,r)=>(C(),T(b(X).li,W(b(n).getItemProps(i.value),{"as-child":e.asChild}),{default:I(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),TO=P({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=ut();return q(),(n,o)=>(C(),T(b(X).label,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),PO=P({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return zv(n),q(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});function VO(e){const t=new Map;return function(n,o){const i=n+(o?Object.entries(o).sort((r,s)=>r[0]<s[0]?-1:1).join():"");if(t.has(i))return t.get(i);let a=new e(n,o);return t.set(i,a),a}}var DO=VO(Intl.NumberFormat);function MO(e,t,n={}){return DO(t,n).format(e)}var RO=["","kilo","mega","giga","tera"],FO=["","kilo","mega","giga","tera","peta"],AO=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(e===0)return"0 B";const{unitSystem:o="decimal",precision:i=3,unit:a="byte",unitDisplay:r="short"}=n,s=o==="binary"?1024:1e3,l=a==="bit"?RO:FO,c=e<0;let d=Math.abs(e),h=0;for(;d>=s&&h<l.length-1;)d/=s,h++;const u=parseFloat(d.toPrecision(i)),p=c?-u:u;return MO(p,t,{style:"unit",unit:l[h]+a,unitDisplay:r})},Hv=ie("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),gt=Hv.build(),jv=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},Wv=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},Xc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},LO=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},NO=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},BO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`file:${e.id}:item:${t}`},zO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemName)==null?void 0:o.call(n,t))??`file:${e.id}:item-name:${t}`},HO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemSizeText)==null?void 0:o.call(n,t))??`file:${e.id}:item-size:${t}`},jO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemPreview)==null?void 0:o.call(n,t))??`file:${e.id}:item-preview:${t}`},WO=e=>e.getById(jv(e)),op=e=>e.getById(Xc(e)),GO=e=>e.getById(Wv(e));function ip(e){const t=be(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function UO(e,t,n){const{prop:o,computed:i}=e;return!i("multiple")&&t>1?!1:!i("multiple")&&t+n.length===2?!0:!(t+n.length>o("maxFiles"))}function ap(e,t,n=[],o=[]){const{prop:i,computed:a}=e,r=[],s=[],l={acceptedFiles:n,rejectedFiles:o};return t.forEach(c=>{var d;const[h,u]=pO(c,a("acceptAttr")),[p,m]=lO(c,i("minFileSize"),i("maxFileSize")),g=(d=i("validate"))==null?void 0:d(c,l),v=g?g.length===0:!0;if(h&&p&&v)r.push(c);else{const f=[u,m];v||f.push(...g??[]),s.push({file:c,errors:f.filter(Boolean)})}}),UO(e,r.length,n)||(r.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),r.splice(0)),{acceptedFiles:r,rejectedFiles:s}}function YO(e,t){const n=Ce(e);try{if("DataTransfer"in n){const o=new n.DataTransfer;t.forEach(i=>{o.items.add(i)}),e.files=o.files}}catch{}}var In="accepted";function qO(e,t){const{state:n,send:o,prop:i,computed:a,scope:r,context:s}=e,l=!!i("disabled"),c=!!i("required"),d=i("allowDrop"),h=i("translations"),u=n.matches("dragging"),p=n.matches("focused")&&!l;return{dragging:u,focused:p,disabled:!!l,transforming:s.get("transforming"),openFilePicker(){l||o({type:"OPEN"})},deleteFile(m,g=In){o({type:"FILE.DELETE",file:m,itemType:g})},acceptedFiles:s.get("acceptedFiles"),rejectedFiles:s.get("rejectedFiles"),setFiles(m){o({type:"FILES.SET",files:m,count:m.length})},clearRejectedFiles(){o({type:"REJECTED_FILES.CLEAR"})},clearFiles(){o({type:"FILES.CLEAR"})},getFileSize(m){return AO(m.size,i("locale"))},createFileUrl(m,g){const v=r.getWin(),f=v.URL.createObjectURL(m);return g(f),()=>v.URL.revokeObjectURL(f)},setClipboardFiles(m){if(l)return!1;const g=Array.from(m?.items??[]).reduce((v,f)=>{if(f.kind!=="file")return v;const y=f.getAsFile();return y?[...v,y]:v},[]);return g.length?(o({type:"FILES.SET",files:g}),!0):!1},getRootProps(){return t.element({...gt.root.attrs,dir:i("dir"),id:jv(r),"data-disabled":j(l),"data-dragging":j(u)})},getDropzoneProps(m={}){return t.element({...gt.dropzone.attrs,dir:i("dir"),id:Wv(r),tabIndex:l||m.disableClick?void 0:0,role:m.disableClick?"application":"button","aria-label":h.dropzone,"aria-disabled":l,"data-invalid":j(i("invalid")),"data-disabled":j(l),"data-dragging":j(u),onKeyDown(g){l||g.defaultPrevented||g.currentTarget===be(g)&&(m.disableClick||g.key!=="Enter"&&g.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(g){l||g.defaultPrevented||m.disableClick||g.currentTarget===be(g)&&(g.currentTarget.localName==="label"&&g.preventDefault(),o({type:"DROPZONE.CLICK"}))},onDragOver(g){if(l||!d)return;g.preventDefault(),g.stopPropagation();try{g.dataTransfer.dropEffect="copy"}catch{}if(!ip(g))return;const v=g.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:v})},onDragLeave(g){l||d&&(Ye(g.currentTarget,g.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(g){if(l)return;d&&(g.preventDefault(),g.stopPropagation());const v=ip(g);l||!v||iO(g.dataTransfer.items,i("directory")).then(f=>{o({type:"DROPZONE.DROP",files:hm(f)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...gt.trigger.attrs,dir:i("dir"),id:LO(r),disabled:l,"data-disabled":j(l),"data-invalid":j(i("invalid")),type:"button",onClick(m){l||(Ye(GO(r),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:Xc(r),tabIndex:-1,disabled:l,type:"file",required:i("required"),capture:i("capture"),name:i("name"),accept:a("acceptAttr"),webkitdirectory:i("directory")?"":void 0,multiple:a("multiple")||i("maxFiles")>1,onClick(m){m.stopPropagation(),m.currentTarget.value=""},onInput(m){if(l)return;const{files:g}=m.currentTarget;o({type:"FILE.SELECT",files:g?Array.from(g):[]})},style:nl})},getItemGroupProps(m={}){const{type:g=In}=m;return t.element({...gt.itemGroup.attrs,dir:i("dir"),"data-disabled":j(l),"data-type":g})},getItemProps(m){const{file:g,type:v=In}=m;return t.element({...gt.item.attrs,dir:i("dir"),id:BO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemNameProps(m){const{file:g,type:v=In}=m;return t.element({...gt.itemName.attrs,dir:i("dir"),id:zO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemSizeTextProps(m){const{file:g,type:v=In}=m;return t.element({...gt.itemSizeText.attrs,dir:i("dir"),id:HO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewProps(m){const{file:g,type:v=In}=m;return t.element({...gt.itemPreview.attrs,dir:i("dir"),id:jO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewImageProps(m){var g;const{file:v,url:f,type:y=In}=m;if(!v.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...gt.itemPreviewImage.attrs,alt:(g=h.itemPreview)==null?void 0:g.call(h,v),src:f,"data-disabled":j(l),"data-type":y})},getItemDeleteTriggerProps(m){var g;const{file:v,type:f=In}=m;return t.button({...gt.itemDeleteTrigger.attrs,dir:i("dir"),type:"button",disabled:l,"data-disabled":j(l),"data-type":f,"aria-label":(g=h.deleteFile)==null?void 0:g.call(h,v),onClick(){l||o({type:"FILE.DELETE",file:v,itemType:f})}})},getLabelProps(){return t.label({...gt.label.attrs,dir:i("dir"),id:NO(r),htmlFor:Xc(r),"data-disabled":j(l),"data-required":j(c)})},getClearTriggerProps(){return t.button({...gt.clearTrigger.attrs,dir:i("dir"),type:"button",disabled:l,hidden:s.get("acceptedFiles").length===0,"data-disabled":j(l),onClick(m){m.defaultPrevented||l||o({type:"FILES.CLEAR"})}})}}}var KO={props({props:e}){return{minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:t=>`preview of ${t.name}`,deleteFile:t=>`delete file ${t.name}`,...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>dr(a,i[r])),hash(o){return o.map(i=>`${i.name}-${i.size}`).join(",")},onChange(o){var i,a;const r=n();(i=e("onFileAccept"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:o,rejectedFiles:r.get("rejectedFiles")})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>dr(a.file,i[r].file)),onChange(o){var i,a;const r=n();(i=e("onFileReject"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:r.get("acceptedFiles"),rejectedFiles:o})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>sO(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],()=>{n(["syncInputElement"])})},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop")||!e("allowDrop")||e("disabled"))return;const n=t.getDoc(),o=a=>{a?.preventDefault()},i=a=>{Ye(WO(t),be(a))||a.preventDefault()};return wa(se(n,"dragover",o,!1),se(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=op(e);if(!n)return;YO(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){J(()=>{var t;(t=op(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:a}=ap(e,o.files);n.set("acceptedFiles",t("multiple")?i:i.length>0?[i[0]]:[]),n.set("rejectedFiles",a)},setEventFiles(e){const{computed:t,context:n,event:o,prop:i}=e,a=n.get("acceptedFiles"),r=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=ap(e,o.files,a,r),c=h=>{if(t("multiple")){n.set("acceptedFiles",u=>[...u,...h]),n.set("rejectedFiles",l);return}if(h.length){n.set("acceptedFiles",[h[0]]),n.set("rejectedFiles",l);return}l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))},d=i("transformFiles");d?(n.set("transforming",!0),d(s).then(c).catch(h=>{bn(`[zag-js/file-upload] error transforming files
1
+ import{F as Ta,G as Uy,H as If,I as Tf,k as F,J as $d,K as Xn,L as Me,r as ve,d as P,M as Yy,N as Oe,h as yt,O as Q,P as T,Q as b,z as C,D as I,R as L,S as W,T as et,U as lt,o as js,e as qy,V as Id,s as fs,W as Re,X as Td,Y as Yt,Z as wn,y as H,A as z,$ as Ue,a0 as N,B as oe,E as Be,a1 as Ws,C as Z,a2 as Ky,a3 as Pf,a4 as wt,a5 as Xy,a6 as Zy,a7 as Fu,a8 as ms,a9 as Jy,aa as Ec,a as Qy,ab as ex,ac as tx,ad as nx,ae as ox,af as ix,ag as ax,ah as rx,ai as Gs,aj as Us,ak as Ys,al as sx,am as lx,an as Vf}from"./DzL9Ozg6.js";function Oc(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var cx=e=>typeof e=="object"&&e!==null;function Pd(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var dx=e=>e==="base";function ux(e){return e.slice().filter(t=>!dx(t))}function Au(e){return String.fromCharCode(e+(e>25?39:97))}function hx(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Au(n%52)+t;return Au(n%52)+t}function px(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function gx(e){return hx(px(5381,e)>>>0)}var Df=/\s*!(important)?/i;function fx(e){return typeof e=="string"?Df.test(e):!1}function mx(e){return typeof e=="string"?e.replace(Df,"").trim():e}function Mf(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var Pa=e=>{const t=new Map;return(...n)=>{const o=JSON.stringify(n);if(t.has(o))return t.get(o);const i=e(...n);return t.set(o,i),i}};function Vd(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],a=n[o];Oc(i)&&Oc(a)?t[o]=Vd(i,a):t[o]=a}),t),{})}var vx=e=>e!=null;function Rf(e,t,n={}){const{stop:o,getKey:i}=n;function a(r,s=[]){if(cx(r)){const l={};for(const[c,d]of Object.entries(r)){const h=i?.(c,d)??c,u=[...s,h];if(o!=null&&o(r,u))return t(r,s);const p=a(d,u);vx(p)&&(l[h]=p)}return l}return t(r,s)}return a(e)}function bx(e,t){return e.reduce((n,o,i)=>{const a=t[i];return o!=null&&(n[a]=o),n},{})}function Ff(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:a,resolveShorthand:r}=o;return Rf(e,s=>Array.isArray(s)?bx(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>a?r(s):s:void 0})}var yx={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},xx=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function wx(e){const{utility:t,hash:n,conditions:o=yx}=e,i=r=>[t.prefix,r].filter(Boolean).join("-"),a=(r,s)=>{let l;if(n){const c=[...o.finalize(r),s];l=i(t.toHash(c,gx))}else l=[...o.finalize(r),i(s)].join(":");return l};return Pa(({base:r,...s}={})=>{const l=Object.assign(s,r),c=Ff(l,e),d=new Set;return Rf(c,(h,u)=>{if(h==null)return;const p=fx(h),[m,...g]=o.shift(u),v=ux(g),f=t.transform(m,mx(xx(h)));let y=a(v,f.className);p&&(y=`${y}!`),d.add(y)}),Array.from(d).join(" ")})}function Cx(...e){return e.flat().filter(t=>Oc(t)&&Object.keys(Pd(t)).length>0)}function _x(e){function t(i){const a=Cx(...i);return a.length===1?a:a.map(r=>Ff(r,e))}function n(...i){return Vd(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:Pa(n),assignCss:o}}var kx=/([A-Z])/g,Sx=/^ms-/,Ex=Pa(e=>e.startsWith("--")?e:e.replace(kx,"-$1").replace(Sx,"-ms-").toLowerCase()),Ox="cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%";`${Ox.split(",").join("|")}`;var $x=(e={})=>{const t=o=>{var i;return{className:[e.className,o].filter(Boolean).join("__"),base:((i=e.base)==null?void 0:i[o])??{},variants:{},defaultVariants:e.defaultVariants??{},compoundVariants:e.compoundVariants?Ix(e.compoundVariants,o):[]}},n=(e.slots??[]).map(o=>[o,t(o)]);for(const[o,i]of Object.entries(e.variants??{}))for(const[a,r]of Object.entries(i))n.forEach(([s,l])=>{var c;(c=l.variants)[o]??(c[o]={}),l.variants[o][a]=r[s]??{}});return Object.fromEntries(n)},Ix=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function Af(e,...t){const n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),i=r=>{const s={};for(let l=0;l<r.length;l++){const c=r[l];n[c]&&(Object.defineProperty(s,c,n[c]),delete n[c])}return s},a=r=>i(Array.isArray(r)?r:o.filter(r));return t.map(a).concat(i(o))}var Tx=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const Px="_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_default,_optional,_open,_closed,_fullscreen,_loading,_currentPage,_currentStep,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_starting,_complete,_incomplete,_collapsed,_current,_hidden,_off,_on,_today,_underValue,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base",Lf=new Set(Px.split(",")),Vx=/^@|&|&$/;function Lu(e){return Lf.has(e)||Vx.test(e)}const Dx=/^_/,Mx=/&|@/;function Rx(e){return e.map(t=>Lf.has(t)?t.replace(Dx,""):Mx.test(t)?`[${Mf(t.trim())}]`:t)}function Fx(e){return e.sort((t,n)=>{const o=Lu(t),i=Lu(n);return o&&!i?1:!o&&i?-1:0})}const Ax="aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,textStyle:textStyle",Nf=new Map,Bf=new Map;Ax.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");Nf.set(t,o),i.length&&i.forEach(a=>{Bf.set(a==="1"?o:a,t)})});const Nu=e=>Bf.get(e)||e,zf={conditions:{shift:Fx,finalize:Rx,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Nu(e);return{className:`${Nf.get(n)||Ex(n)}_${Mf(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Nu}},Lx=wx(zf),ot=(...e)=>Lx(po(...e));ot.raw=(...e)=>po(...e);const{mergeCss:po}=_x(zf),Bu=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function Do(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=Bu(e),a=u=>({...o,...Pd(u)});function r(u={}){var p;const m=a(u);let g={...t};for(const[f,y]of Object.entries(m))(p=n[f])!=null&&p[y]&&(g=po(g,n[f][y]));const v=Nx(i,m);return po(g,v)}function s(u){const p=Bu(u.config),m=Tx(u.variantKeys,Object.keys(n));return Do({base:po(t,p.base),variants:Object.fromEntries(m.map(g=>[g,po(n[g],p.variants[g])])),defaultVariants:Vd(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(u){return ot(r(u))}const c=Object.keys(n);function d(u){return Af(u,c)}const h=Object.fromEntries(Object.entries(n).map(([u,p])=>[u,Object.keys(p)]));return Object.assign(Pa(l),{__cva__:!0,variantMap:h,variantKeys:c,raw:r,config:e,merge:s,splitVariantProps:d,getVariantProps:a})}function Nx(e,t){let n={};return e.forEach(o=>{Object.entries(o).every(([i,a])=>i==="css"?!0:(Array.isArray(a)?a:[a]).some(r=>t[i]===r))&&(n=po(n,o.css))}),n}function Bx(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const zx=(e,t)=>e+"__"+t;function ne(e){const t=Object.entries($x(e)).map(([d,h])=>[d,Do(h)]),n=e.defaultVariants??{};function o(d){const h=t.map(([u,p])=>[u,Bx(p(d),e.className&&zx(e.className,u))]);return Object.fromEntries(h)}function i(d){const h=t.map(([u,p])=>[u,p.raw(d)]);return Object.fromEntries(h)}const a=e.variants??{},r=Object.keys(a);function s(d){return Af(d,r)}const l=d=>({...n||{},...Pd(d)}),c=Object.fromEntries(Object.entries(a).map(([d,h])=>[d,Object.keys(h)]));return Object.assign(Pa(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:r,splitVariantProps:s,getVariantProps:l})}var ie=(e,t=[])=>({parts:(...n)=>{if(Hx(t))return ie(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>ie(e,[...t,...n]),omit:(...n)=>ie(e,t.filter(o=>!n.includes(o))),rename:n=>ie(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,o)=>Object.assign(n,{[o]:{selector:[`&[data-scope="${Fo(e)}"][data-part="${Fo(o)}"]`,`& [data-scope="${Fo(e)}"][data-part="${Fo(o)}"]`].join(", "),attrs:{"data-scope":Fo(e),"data-part":Fo(o)}}}),{})}),Fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Hx=e=>e.length===0,jx=Object.defineProperty,Wx=(e,t,n)=>t in e?jx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dl=(e,t,n)=>Wx(e,typeof t!="symbol"?t+"":t,n);function Gx(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function Ux(e){if(!e)return;const t=e.selectionStart??0,n=e.selectionEnd??0;Math.abs(n-t)===0&&t===0&&e.setSelectionRange(e.value.length,e.value.length)}var zu=e=>Math.max(0,Math.min(1,e)),Yx=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),Ml=(...e)=>t=>e.reduce((n,o)=>o(n),t),ta=()=>{},qs=e=>typeof e=="object"&&e!==null,Hf=2147483647,j=e=>e?"":void 0,na=e=>e?"true":void 0,qx=1,Kx=9,Xx=11,ke=e=>qs(e)&&e.nodeType===qx&&typeof e.nodeName=="string",Ks=e=>qs(e)&&e.nodeType===Kx,Zx=e=>qs(e)&&e===e.window,jf=e=>ke(e)?e.localName||"":"#document";function Jx(e){return["html","body","#document"].includes(jf(e))}var Qx=e=>qs(e)&&e.nodeType!==void 0,di=e=>Qx(e)&&e.nodeType===Xx&&"host"in e,e0=e=>ke(e)&&e.localName==="input",Go=e=>!!(e!=null&&e.matches("a[href]")),t0=e=>ke(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function vs(e){if(!e)return!1;const t=e.getRootNode();return da(t)===e}var n0=/(textarea|select)/;function Xs(e){if(e==null||!ke(e))return!1;try{return e0(e)&&e.selectionStart!=null||n0.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Ye(e,t){var n;if(!e||!t||!ke(e)||!ke(t))return!1;const o=(n=t.getRootNode)==null?void 0:n.call(t);if(e===t||e.contains(t))return!0;if(o&&di(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function dt(e){return Ks(e)?e:Zx(e)?e.document:e?.ownerDocument??document}function o0(e){return dt(e).documentElement}function Ce(e){var t;return di(e)?Ce(e.host):Ks(e)?e.defaultView??window:ke(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function da(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function i0(e){if(jf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||di(e)&&e.host||o0(e);return di(t)?t.host:t}function Dd(e){let t;try{if(t=e.getRootNode({composed:!0}),Ks(t)||di(t))return t}catch{}return e.ownerDocument??document}var Rl=new WeakMap;function ui(e){return Rl.has(e)||Rl.set(e,Ce(e).getComputedStyle(e)),Rl.get(e)}var Md=new Set(["menu","listbox","dialog","grid","tree","region"]),a0=e=>Md.has(e),Wf=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Gf(e,t){const n=new Set,o=Dd(e),i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=Wf(s);for(const c of l){if(!c||n.has(c))continue;n.add(c);const d=o.getElementById(c);if(d){const h=d.getAttribute("role"),u=d.getAttribute("aria-modal")==="true";if(h&&a0(h)&&!u&&(d===t||d.contains(t)||i(d)))return!0}}}return!1};return i(e)}function Uf(e,t){const n=Dd(e),o=new Set,i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=Wf(s);for(const c of l){if(!c||o.has(c))continue;o.add(c);const d=n.getElementById(c);if(d){const h=d.getAttribute("role"),u=d.getAttribute("aria-modal")==="true";h&&Md.has(h)&&!u&&(t(d),i(d))}}}};i(e)}function r0(e){const t=new Set;return Uf(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function s0(e){const t=e.getAttribute("role");return!!(t&&Md.has(t))}function l0(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function c0(e){var t;return l0(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function d0(e){if(!e.id)return!1;const t=Dd(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&s0(e))}var Zs=()=>typeof document<"u";function u0(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function h0(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var Rd=e=>Zs()&&e.test(u0()),Yf=e=>Zs()&&e.test(h0()),p0=e=>Zs()&&e.test(navigator.vendor),Hu=()=>Zs()&&!!navigator.maxTouchPoints,g0=()=>Rd(/^iPhone/i),f0=()=>Rd(/^iPad/i)||Js()&&navigator.maxTouchPoints>1,Fd=()=>g0()||f0(),m0=()=>Js()||Fd(),Js=()=>Rd(/^Mac/i),Ad=()=>m0()&&p0(/apple/i),v0=()=>Yf(/Firefox/i),b0=()=>Yf(/Android/i);function y0(e){var t,n,o;return((t=e.composedPath)==null?void 0:t.call(e))??((o=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:o.call(n))}function be(e){const t=y0(e);return t?.[0]??e.target}function $c(e){return k0(e).isComposing||e.keyCode===229}function x0(e){return e.pointerType===""&&e.isTrusted?!0:b0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Nr=e=>e.button===0,w0=e=>e.button===2||Js()&&e.ctrlKey&&e.button===0,En=e=>e.ctrlKey||e.altKey||e.metaKey,C0=e=>"touches"in e&&e.touches.length>0,_0={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ju={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Ic(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=_0[i]??i,n==="rtl"&&o==="horizontal"&&i in ju&&(i=ju[i]),i}function k0(e){return e.nativeEvent??e}function Tc(e,t="client"){const n=C0(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var se=(e,t,n,o)=>{const i=typeof e=="function"?e():e;return i?.addEventListener(t,n,o),()=>{i?.removeEventListener(t,n,o)}};function qf(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=Ce(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function S0(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Ot(e,t,n="value"){var o;if(!e)return;const i=S0(e);i&&((o=qf(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function Ld(e,t){var n;e&&((n=qf(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function Kf(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=Ce(e);e instanceof i.HTMLInputElement&&(Ot(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function Xf(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=Ce(e);e instanceof i.HTMLInputElement&&(Ld(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function E0(e){return O0(e)?e.form:e.closest("form")}function O0(e){return e.matches("textarea, input, select, button")}function $0(e,t){if(!e)return;const n=E0(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function I0(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const o=Ce(n),i=new o.MutationObserver(()=>t(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function bi(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[$0(e,o),I0(e,n)];return()=>i.forEach(a=>a?.())}var Zf=e=>ke(e)&&e.tagName==="IFRAME",T0=/^(audio|video|details)$/;function Jf(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var P0=e=>!Number.isNaN(Jf(e)),V0=e=>Jf(e)<0;function D0(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function Qf(e,t,n){const o=[...e],i=[...e],a=new Set,r=new Map;e.forEach((l,c)=>r.set(l,c));let s=0;for(;s<i.length;){const l=i[s++];if(!l||a.has(l))continue;a.add(l);const c=D0(l,t);if(c){const d=Array.from(c.querySelectorAll(Qs)).filter(n),h=r.get(l);if(h!==void 0){const u=h+1;o.splice(u,0,...d),d.forEach((p,m)=>{r.set(p,u+m)});for(let p=u+d.length;p<o.length;p++)r.set(o[p],p)}else{const u=o.length;o.push(...d),d.forEach((p,m)=>{r.set(p,u+m)})}i.push(...d)}}return o}var Qs="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",em=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Qs));(n==!0||n=="if-empty"&&i.length===0)&&ke(e)&&gn(e)&&i.unshift(e);const a=[];for(const r of i)if(gn(r)){if(Zf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...em(s,{getShadowRoot:o}));continue}a.push(r)}return o?Qf(a,o,gn):a};function gn(e){return!ke(e)||e.closest("[inert]")?!1:e.matches(Qs)&&t0(e)}function Va(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Qs));n&&go(e)&&i.unshift(e);const a=[];for(const r of i)if(go(r)){if(Zf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...Va(s,{getShadowRoot:o}));continue}a.push(r)}if(o){const r=Qf(a,o,go);return!r.length&&n?i:r}return!a.length&&n?i:a}function go(e){return ke(e)&&e.tabIndex>0?!0:gn(e)&&!V0(e)}function M0(e,t={}){const n=Va(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function $i(e){return e.tabIndex<0&&(T0.test(e.localName)||Xs(e))&&!P0(e)?0:e.tabIndex}function Nd(e){const{root:t,getInitialEl:n,filter:o,enabled:i=!0}=e;if(!i)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t?.querySelector("[data-autofocus],[autofocus]")),!a){const r=Va(t);a=o?r.filter(o)[0]:r[0]}return a||t||void 0}function R0(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=M0(t);return!(vs(n)&&e.shiftKey||vs(o)&&!e.shiftKey||!n&&!o)}var tm=class nm{constructor(){Dl(this,"id",null),Dl(this,"fn_cleanup"),Dl(this,"cleanup",()=>{this.cancel()})}static create(){return new nm}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t?.()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function J(e){const t=tm.create();return t.request(e),t.cleanup}function el(e){const t=new Set;function n(o){const i=globalThis.requestAnimationFrame(o);t.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function F0(e,t,n){const o=J(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function A0(e,t){if(!e)return;const{attributes:n,callback:o}=t,i=e.ownerDocument.defaultView||window,a=new i.MutationObserver(r=>{for(const s of r)s.type==="attributes"&&s.attributeName&&n.includes(s.attributeName)&&o(s)});return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}function Da(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(A0(a,t))})),()=>{i.forEach(a=>a?.())}}function L0(e,t){const{callback:n}=t;if(!e)return;const o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(n);return i.observe(e,{childList:!0,subtree:!0}),()=>i.disconnect()}function N0(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(L0(a,t))})),()=>{i.forEach(a=>a?.())}}function om(e){const t=()=>{const n=Ce(e);e.dispatchEvent(new n.MouseEvent("click"))};v0()?F0(e,"keyup",t):queueMicrotask(t)}function bs(e){const t=i0(e);return Jx(t)?dt(t).body:ke(t)&&Bd(t)?t:bs(t)}function im(e,t=[]){const n=bs(e),o=n===e.ownerDocument.body,i=Ce(n);return o?t.concat(i,i.visualViewport||[],Bd(n)?n:[]):t.concat(n,im(n,[]))}var B0=/auto|scroll|overlay|hidden|clip/,z0=new Set(["inline","contents"]);function Bd(e){const t=Ce(e),{overflow:n,overflowX:o,overflowY:i,display:a}=t.getComputedStyle(e);return B0.test(n+i+o)&&!z0.has(a)}function H0(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function xa(e,t){const{rootEl:n,...o}=t||{};!e||!n||!Bd(n)||!H0(n)||e.scrollIntoView(o)}function am(e,t){const{left:n,top:o,width:i,height:a}=t.getBoundingClientRect(),r={x:e.x-n,y:e.y-o},s={x:zu(r.x/i),y:zu(r.y/a)};function l(c={}){const{dir:d="ltr",orientation:h="horizontal",inverted:u}=c,p=typeof u=="object"?u.x:u,m=typeof u=="object"?u.y:u;return h==="horizontal"?d==="rtl"||p?1-s.x:s.x:m?1-s.y:s.y}return{offset:r,percent:s,getPercentValue:l}}function j0(e,t){const n=e.body,o="pointerLockElement"in e||"mozPointerLockElement"in e,i=()=>!!e.pointerLockElement;function a(){}function r(l){i(),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!o)return;try{n.requestPointerLock()}catch{}const s=[se(e,"pointerlockchange",a,!1),se(e,"pointerlockerror",r,!1)];return()=>{s.forEach(l=>l()),e.exitPointerLock()}}var Qo="default",Pc="",Br=new WeakMap;function W0(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return Fd()?(Qo==="default"&&(Pc=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Qo="disabled"):t&&(Br.set(t,t.style.userSelect),t.style.userSelect="none"),()=>rm({target:t,doc:o})}function rm(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if(Fd()){if(Qo!=="disabled")return;Qo="restoring",setTimeout(()=>{el(()=>{Qo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Pc||""),Pc="",Qo="default")})},300)}else if(t&&Br.has(t)){const i=Br.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),Br.delete(t)}}function zd(e={}){const{defer:t,target:n,...o}=e,i=t?J:r=>r(),a=[];return a.push(i(()=>{const r=typeof n=="function"?n():n;a.push(W0({...o,target:r}))})),()=>{a.forEach(r=>r?.())}}function sm(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=Tc(s),c=Math.sqrt(l.x**2+l.y**2),d=s.pointerType==="touch"?10:5;if(!(c<d)){if(s.pointerType==="mouse"&&s.button===0){a(s);return}n({point:l,event:s})}},a=s=>{const l=Tc(s);o({point:l,event:s})},r=[se(e,"pointermove",i,!1),se(e,"pointerup",a,!1),se(e,"pointercancel",a,!1),se(e,"contextmenu",a,!1),zd({doc:e})];return()=>{r.forEach(s=>s())}}function lm(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:a,isValidKey:r=f=>f.key==="Enter"}=e;if(!t)return ta;const s=Ce(t);let l=ta,c=ta,d=ta;const h=f=>({point:Tc(f),event:f});function u(f){i?.(h(f))}function p(f){a?.(h(f))}const m=se(t,"pointerdown",f=>{c();const y=se(s,"pointerup",w=>{const k=be(w);Ye(t,k)?o?.(h(w)):a?.(h(w))},{passive:!o,once:!0}),x=se(s,"pointercancel",p,{passive:!a,once:!0});c=Ml(y,x),vs(n)&&f.pointerType==="mouse"&&f.preventDefault(),u(f)},{passive:!i}),g=se(n,"focus",v);l=Ml(m,g);function v(){const f=k=>{if(!r(k))return;const S=_=>{if(!r(_))return;const E=new s.PointerEvent("pointerup"),V=h(E);o?.(V),a?.(V)};c(),c=se(n,"keyup",S);const O=new s.PointerEvent("pointerdown");u(O)},y=()=>{const k=new s.PointerEvent("pointercancel");p(k)},x=se(n,"keydown",f),w=se(n,"blur",y);d=Ml(x,w)}return()=>{l(),c(),d()}}function Gn(e,t){return Array.from(e?.querySelectorAll(t)??[])}function cm(e,t){return e?.querySelector(t)??null}var Hd=e=>e.id;function G0(e,t,n=Hd){return e.find(o=>n(o)===t)}function tl(e,t,n=Hd){const o=G0(e,t,n);return o?e.indexOf(o):-1}function jd(e,t,n=!0){let o=tl(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function Wd(e,t,n=!0){let o=tl(e,t);return o===-1?n?e[e.length-1]:null:(o=n?(o-1+e.length)%e.length:Math.max(0,o-1),e[o])}var U0=e=>e.split("").map(t=>{const n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),Y0=e=>{var t;return U0(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},q0=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function K0(e,t,n,o=Hd){const i=n?tl(e,n,o):-1;let a=n?Yx(e,i):e;return t.length===1&&(a=a.filter(r=>o(r)!==n)),a.find(r=>q0(Y0(r),t))}function X0(e,t,n){const o=e.getAttribute(t),i=o!=null;return e.setAttribute(t,n),()=>{i?e.setAttribute(t,o):e.removeAttribute(t)}}function Gd(e,t){if(!e)return ta;const n=Object.keys(t).reduce((o,i)=>(o[i]=e.style.getPropertyValue(i),o),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function Z0(e,t){const{state:n,activeId:o,key:i,timeout:a=350,itemToId:r}=t,s=n.keysSoFar+i,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s;let c=e.slice();const d=K0(c,l,o,r);function h(){clearTimeout(n.timer),n.timer=-1}function u(p){n.keysSoFar=p,h(),p!==""&&(n.timer=+setTimeout(()=>{u(""),h()},a))}return u(s),d}var vn=Object.assign(Z0,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:J0});function J0(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var nl={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function Q0(e,t,n){const{signal:o}=t;return[new Promise((i,a)=>{const r=setTimeout(()=>{a(new Error(`Timeout of ${n}ms exceeded`))},n);o.addEventListener("abort",()=>{clearTimeout(r),a(new Error("Promise aborted"))}),e.then(s=>{o.aborted||(clearTimeout(r),i(s))}).catch(s=>{o.aborted||(clearTimeout(r),a(s))})}),()=>t.abort()]}function ew(e,t){const{timeout:n,rootNode:o}=t,i=Ce(o),a=dt(o),r=new i.AbortController;return Q0(new Promise(s=>{const l=e();if(l){s(l);return}const c=new i.MutationObserver(()=>{const d=e();d&&d.isConnected&&(c.disconnect(),s(d))});c.observe(a.body,{childList:!0,subtree:!0})}),r,n)}var tw=Object.defineProperty,dm=e=>{throw TypeError(e)},nw=(e,t,n)=>t in e?tw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,On=(e,t,n)=>nw(e,typeof t!="symbol"?t+"":t,n),ow=(e,t,n)=>t.has(e)||dm("Cannot "+n),Wu=(e,t,n)=>(ow(e,t,"read from private field"),t.get(e)),iw=(e,t,n)=>t.has(e)?dm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function zr(e){return e==null?[]:Array.isArray(e)?e:[e]}var aw=e=>Array.from(Array(e).keys()),ii=e=>e[0],ol=e=>e[e.length-1],rw=(e,t)=>e.indexOf(t)!==-1,un=(e,...t)=>e.concat(t),Co=(e,...t)=>e.filter(n=>!t.includes(n)),Gu=(e,t)=>e.filter((n,o)=>o!==t),Ht=e=>Array.from(new Set(e)),Fl=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},So=(e,t)=>rw(e,t)?Co(e,t):un(e,t);function ys(e,t,n={}){const{step:o=1,loop:i=!0}=n,a=t+o,r=e.length,s=r-1;return t===-1?o>0?0:s:a<0?i?s:0:a>=r?i?0:t>r?r:t:a}function sw(e,t,n={}){return e[ys(e,t,n)]}function um(e,t,n={}){const{step:o=1,loop:i=!0}=n;return ys(e,t,{step:-o,loop:i})}function lw(e,t,n={}){return e[um(e,t,n)]}function hm(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(hm(n)):t.concat(n),[])}function Uu(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Yu=e=>e?.constructor.name==="Array",cw=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Ne(e[n],t[n]))return!1;return!0},Ne=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Yu(e)&&Yu(t))return cw(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),o=n.length;for(let i=0;i<o;i++)if(!Reflect.has(e,n[i]))return!1;for(let i=0;i<o;i++){const a=n[i];if(!Ne(e[a],t[a]))return!1}return!0},ei=e=>Array.isArray(e),dw=e=>e===!0||e===!1,pm=e=>e!=null&&typeof e=="object",fo=e=>pm(e)&&!ei(e),ua=e=>typeof e=="string",Ln=e=>typeof e=="function",uw=e=>e==null,Nn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),hw=e=>Object.prototype.toString.call(e),gm=Function.prototype.toString,pw=gm.call(Object),gw=e=>{if(!pm(e)||hw(e)!="[object Object]"||vw(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Nn(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&gm.call(n)==pw},fw=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,mw=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,vw=e=>fw(e)||mw(e),Ua=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,bw=()=>{},wa=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},fm=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Bt(e,t,...n){var o;if(e in t){const a=t[e];return Ln(a)?a(...n):a}const i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(o=Error.captureStackTrace)==null||o.call(Error,i,Bt),i}var mm=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,mm)),t?.()}},{floor:vm,abs:qu,round:il,min:yw,max:xw,pow:ww,sign:Cw}=Math,Vc=e=>Number.isNaN(e),Zn=e=>Vc(e)?0:e,bm=(e,t)=>(e%t+t)%t,_w=(e,t)=>(e%t+t)%t,kw=(e,t)=>Zn(e)>=t,Sw=(e,t)=>Zn(e)<=t,ym=(e,t,n)=>{const o=Zn(e),i=t==null||o>=t,a=n==null||o<=n;return i&&a},Ew=(e,t,n)=>il((Zn(e)-t)/n)*n+t,Le=(e,t,n)=>yw(xw(Zn(e),t),n),Ow=(e,t,n)=>(Zn(e)-t)/(n-t),$w=(e,t,n,o)=>Le(Ew(e*(n-t)+t,t,o),t,n),Ku=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),a=i>=0?o.length-i:0;if(a>0){let r=ww(10,a);n=il(n*r)/r}return n},Al=(e,t)=>typeof t=="number"?vm(e*t+.5)/t:il(e),Xu=(e,t,n,o)=>{const i=t!=null?Number(t):0,a=Number(n),r=(e-i)%o;let s=qu(r)*2>=o?e+Cw(r)*(o-qu(r)):e-r;if(s=Ku(s,o),!Vc(i)&&s<i)s=i;else if(!Vc(a)&&s>a){const l=vm((a-i)/o),c=i+l*o;s=l<=0||c<i?a:c}return Ku(s,o)},fe=(e,t=0,n=10)=>{const o=Math.pow(n,t);return il(e*o)/o},Zu=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},xm=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(Zu(e),Zu(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},Iw=(e,t)=>xm(Zn(e),"+",t),Tw=(e,t)=>xm(Zn(e),"-",t),$n=e=>typeof e=="number"?`${e}px`:e;function al(e){if(!gw(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(o=>typeof o=="string"),n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=al(i))}return n}function Rn(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function Pw(e,t=Object.is){let n={...e};const o=new Set,i=r=>(o.add(r),()=>o.delete(r)),a=()=>{o.forEach(r=>r())};return{subscribe:i,get:r=>n[r],set:(r,s)=>{t(n[r],s)||(n[r]=s,a())},update:r=>{let s=!1;for(const l in r){const c=r[l];c!==void 0&&!t(n[l],c)&&(n[l]=c,s=!0)}s&&a()},snapshot:()=>({...n})}}var Ya=()=>performance.now(),Hr,Vw=class{constructor(t){this.onTick=t,On(this,"frameId",null),On(this,"pausedAtMs",null),On(this,"context"),On(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),On(this,"setStartMs",n=>{this.context.startMs=n}),On(this,"start",()=>{if(this.frameId!==null)return;const n=Ya();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(Wu(this,Hr))}),On(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=Ya())}),On(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),iw(this,Hr,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Wu(this,Hr))}),this.context={now:0,startMs:Ya(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:Ya()-this.context.startMs}};Hr=new WeakMap;function Ll(e,t){const n=new Vw(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function bn(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Dw(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Ud(e,t){if(e==null)throw new Error(t())}function Yd(e,t,n){let o=[];for(const i of t)e[i]==null&&o.push(i);if(o.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${o.join(", ")}`)}var Mw=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Rw=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ju=e=>{const t={};let n;for(;n=Rw.exec(e);)t[n[1]]=n[2];return t},Fw=(e,t)=>{if(ua(e)){if(ua(t))return`${e};${t}`;e=Ju(e)}else ua(t)&&(t=Ju(t));return Object.assign({},e??{},t??{})};function rl(...e){let t={};for(let n of e){if(!n)continue;for(let i in t){if(i.startsWith("on")&&typeof t[i]=="function"&&typeof n[i]=="function"){t[i]=wa(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=Mw(t[i],n[i]);continue}if(i==="style"){t[i]=Fw(t[i],n[i]);continue}t[i]=n[i]!==void 0?n[i]:t[i]}for(let i in n)t[i]===void 0&&(t[i]=n[i]);const o=Object.getOwnPropertySymbols(n);for(let i of o)t[i]=n[i]}return t}function Dc(e,t,n){let o=[],i;return a=>{const r=e(a);return(r.length!==o.length||r.some((s,l)=>!Ne(o[l],s)))&&(o=r,i=t(r,a)),i}}function ze(){return{and:(...e)=>function(t){return e.every(n=>t.guard(n))},or:(...e)=>function(t){return e.some(n=>t.guard(n))},not:e=>function(t){return!t.guard(e)}}}function sl(){return{guards:ze(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var Uo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Uo||{}),Nl="__init__";function Aw(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>dt(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>da(t()),isActiveElement:vs,getById:o=>t().getElementById(o)}}function Lw(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var Y=()=>e=>Array.from(new Set(e)),wm=ie("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator");wm.build();var Cm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},_m=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:o.call(n,t))??`accordion:${e.id}:trigger:${t}`},Nw=e=>e.getById(Cm(e)),ll=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(Cm(e))}']:not([disabled])`;return Gn(Nw(e),t)},Bw=e=>ii(ll(e)),zw=e=>ol(ll(e)),Hw=(e,t)=>jd(ll(e),_m(e,t)),jw=(e,t)=>Wd(ll(e),_m(e,t)),{and:Ww,not:Gw}=ze();Ww("isExpanded","canToggle"),Gw("isExpanded");Y()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);Y()(["value","disabled"]);const Uw={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}};ne({slots:[...wm.keys(),"itemTriggerPrefix","itemTriggerContent"],base:{root:{width:"100%",display:"flex",flexDirection:"column",fontFamily:"sans"},item:{borderBottom:"1px solid {colors.border.muted}",borderRadius:"lg",backgroundColor:"background.default",_hover:{backgroundColor:"background.hover"}},itemTrigger:{width:"100%",paddingX:"8",paddingY:"8",cursor:"pointer",display:"flex",gap:"8",alignItems:"center",textAlign:"left",border:"none",outline:"none",backgroundColor:"transparent",color:"text.normal",fontSize:"base",fontWeight:"medium",lineHeight:"lg",fontStyle:"normal",letterSpacing:"normal"},itemTriggerPrefix:{padding:"2","& > svg":{display:"block"}},itemTriggerContent:{flex:"1",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8"},itemContent:{backgroundColor:"transparent",color:"text.subtle",fontSize:"small",fontWeight:"normal",fontStyle:"normal",lineHeight:"150%",letterSpacing:"0%",padding:"8",paddingTop:"4",animation:"collapse-in",_closed:{animation:"collapse-out"}},itemIndicator:{width:"24",height:"24",display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center",transitionDuration:"200ms",transitionProperty:"transform",transitionTimingFunction:"{easings.default}",_open:{transform:"rotate(180deg)"}}},variants:{variant:Uw},defaultVariants:{variant:"default"}});function Yw(e){const t=Ta(),n=t?.type.emits,o={};n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`);for(const i of n)o[Uy(If(i))]=(...a)=>e(i,...a);return o}function qw(e){const t=Ta(),n=Object.keys(t?.type.props??{}).reduce((i,a)=>{const r=(t?.type.props[a]).default;return r!==void 0&&(i[a]=r),i},{}),o=Tf(e);return F(()=>{const i={},a=t?.vnode.props??{};return Object.keys(a).forEach(r=>{i[If(r)]=a[r]}),Object.keys({...n,...i}).reduce((r,s)=>(o.value[s]!==void 0&&(r[s]=o.value[s]),r),{})})}function _t(e,t){const n=qw(e),o=t?Yw(t):{};return F(()=>({...n.value,...o}))}const we=e=>{const t=Symbol(e);return[n=>$d(t,n),n=>Xn(t,n),t]},[yi,qd]=we("RenderStrategyProps");function Kw(e){const t=Me(e);return t?.$el??t}const Xw=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function q(){const e=Ta(),t=ve(),n=F(()=>{var r,s;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:Kw(t)}),o=Object.assign({},e.exposed),i={};for(const r in e.props)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>e.props[r]});if(Object.keys(o).length>0)for(const r in o)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>o[r]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(r){t.value=r,!(Xw(r)||!r)&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>r.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}const Zw=P({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=km(n.default()),[a,...r]=i;if(Object.keys(t).length>0){(o=a.props)==null||delete o.ref;const s=rl(t,a.props??{}),l=Yy(a,s);for(const c in s)c.startsWith("on")&&(l.props||(l.props={}),l.props[c]=s[c]);return i.length===1?l:[l,...r]}return i}}});function km(e){return e?e.flatMap(t=>t.type===Oe?km(t.children):[t]):[]}const Jw="br, hr, img, input, area, textarea".split(", "),Qw=e=>typeof e=="string"&&Jw.includes(e),Bl=e=>P({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>yt(Zw,n,o):()=>{var i;return yt(e,n,Qw(e)||(i=o.default)==null?void 0:i.call(o))}}});function eC(){const e=new Map;return new Proxy(Bl,{apply(t,n,o){return Bl(o[0])},get(t,n){return e.has(n)||e.set(n,Bl(n)),e.get(n)}})}const X=eC(),[Sm,cl]=we("CollapsibleContext"),tC=P({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=cl();return q(),(n,o)=>b(t).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getContentProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),nC=P({__name:"collapsible-context",setup(e){const t=cl();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),oC=P({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return Sm(n),q(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var iC=ie("collapsible").parts("root","trigger","content","indicator"),qa=iC.build(),aC=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},Mc=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},rC=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},Ii=e=>e.getById(Mc(e));function sC(e,t){const{state:n,send:o,context:i,scope:a,prop:r}=e,s=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:d,height:h}=i.get("size"),u=!!r("disabled"),p=r("collapsedHeight"),m=r("collapsedWidth"),g=p!=null,v=m!=null,f=g||v,y=!i.get("initial")&&l;return{disabled:u,visible:s,open:l,measureSize(){o({type:"size.measure"})},setOpen(x){n.matches("open")!==x&&o({type:x?"open":"close"})},getRootProps(){return t.element({...qa.root.attrs,"data-state":l?"open":"closed",dir:r("dir"),id:aC(a)})},getContentProps(){return t.element({...qa.content.attrs,id:Mc(a),"data-collapsible":"","data-state":y?void 0:l?"open":"closed","data-disabled":j(u),"data-has-collapsed-size":j(f),hidden:!s&&!f,dir:r("dir"),style:{"--height":$n(h),"--width":$n(d),"--collapsed-height":$n(p),"--collapsed-width":$n(m),...c&&g&&{overflow:"hidden",minHeight:$n(p),maxHeight:$n(p)},...c&&v&&{overflow:"hidden",minWidth:$n(m),maxWidth:$n(m)}}})},getTriggerProps(){return t.element({...qa.trigger.attrs,id:rC(a),dir:r("dir"),type:"button","data-state":l?"open":"closed","data-disabled":j(u),"aria-controls":Mc(a),"aria-expanded":s||!1,onClick(x){x.defaultPrevented||u||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...qa.indicator.attrs,dir:r("dir"),"data-state":l?"open":"closed","data-disabled":j(u)})}}}var lC={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["clearInitial","cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n;const o=J(()=>{const i=Ii(t);if(!i)return;const a=ui(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=s=>{be(s)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r),n=()=>{i.removeEventListener("animationend",r)}});return()=>{o(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n;const o=J(()=>{const i=Ii(t);if(!i)return;const a=ui(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=l=>{be(l)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r);const s=Gd(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",r),el(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=Ii(e);if(!n)return;const o=()=>{const r=Va(n).map(s=>X0(s,"inert",""));return()=>{r.forEach(s=>s())}};let i=o();const a=N0(n,{callback(){i(),i=o()}});return()=>{i(),a()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{const n=Ii(t);if(!n)return;const{height:o,width:i}=n.getBoundingClientRect();e.set("size",{height:o,width:i})},computeSize:({refs:e,scope:t,context:n})=>{var o;(o=e.get("cleanup"))==null||o();const i=J(()=>{const a=Ii(t);if(!a)return;const r=a.hidden;a.style.animationName="none",a.style.animationDuration="0s",a.hidden=!1;const s=a.getBoundingClientRect();n.set("size",{height:s.height,width:s.width}),n.get("initial")&&(a.style.animationName="",a.style.animationDuration=""),a.hidden=r});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}};Y()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]);function cC(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Qu={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},dC="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function uC(e){return e in Qu?Qu[e]:e.startsWith("on")?`on${cC(e.substr(2))}`:dC.includes(e)?e:e.toLowerCase()}var qt=Lw(e=>{const t={};for(const n in e){const o=e[n];n==="children"?typeof o=="string"&&(t.innerHTML=o):t[uC(n)]=e[n]}return t});function xs(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=fs(t),i=F(()=>e().value!==void 0),a=fs(i.value?e().value:o.value);return{initial:t,ref:a,get(){return i.value?e().value:o.value},set(r){var s,l;const c=i.value?e().value:o.value,d=Ln(r)?r(c):r;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:d,prev:c}),i.value||(o.value=d),n(d,c)||(l=(s=e()).onChange)==null||l.call(s,d,c)},invoke(r,s){var l,c;(c=(l=e()).onChange)==null||c.call(l,r,s)},hash(r){var s,l;return((l=(s=e()).hash)==null?void 0:l.call(s,r))??String(r)}}}xs.cleanup=e=>{Td(()=>e())};xs.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function hC(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var pC=(e,t)=>{Re(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let a=0;a<n.length;a++)if(!Ne(o[a],Me(n[a]))){i=!0;break}i&&t()})};function Dt(e,t={}){var n,o,i;const a=F(()=>{const{id:$,ids:R,getRootNode:K}=Me(t);return Aw({id:$,ids:R,getRootNode:K})}),r=(...$)=>{e.debug&&console.log(...$)},s=F(()=>{var $;return(($=e.props)==null?void 0:$.call(e,{props:al(Me(t)),get scope(){return a.value}}))??Me(t)}),l=gC(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:xs,get scope(){return a.value},flush:eh,getContext(){return d},getComputed(){return O},getRefs(){return f},getEvent(){return g()}}),d={get($){var R;return(R=c[$])==null?void 0:R.get()},set($,R){var K;(K=c[$])==null||K.set(R)},initial($){var R;return(R=c[$])==null?void 0:R.initial},hash($){var R,K;const D=(R=c[$])==null?void 0:R.get();return(K=c[$])==null?void 0:K.hash(D)}};let h=new Map,u=null,p={current:null},m={current:{type:""}};const g=()=>({...m.current,current(){return m.current},previous(){return p.current}}),v=()=>({..._,matches(...$){const R=_.get();return $.includes(R)},hasTag($){var R,K;const D=_.get();return!!((K=(R=e.states[D])==null?void 0:R.tags)!=null&&K.includes($))}}),f=hC(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:d}))??{}),y=()=>({state:v(),context:d,event:g(),prop:l,send:V,action:x,guard:w,track:pC,refs:f,computed:O,flush:eh,get scope(){return a.value},choose:S}),x=$=>{const R=Ln($)?$(y()):$;if(!R)return;const K=R.map(D=>{var M,A;const U=(A=(M=e.implementations)==null?void 0:M.actions)==null?void 0:A[D];return U||bn(`[zag-js] No implementation found for action "${JSON.stringify(D)}"`),U});for(const D of K)D?.(y())},w=$=>{var R,K;return Ln($)?$(y()):(K=(R=e.implementations)==null?void 0:R.guards)==null?void 0:K[$](y())},k=$=>{const R=Ln($)?$(y()):$;if(!R)return;const K=R.map(M=>{var A,U;const G=(U=(A=e.implementations)==null?void 0:A.effects)==null?void 0:U[M];return G||bn(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),G}),D=[];for(const M of K){const A=M?.(y());A&&D.push(A)}return()=>D.forEach(M=>M?.())},S=$=>zr($).find(R=>{let K=!R.guard;return ua(R.guard)?K=!!w(R.guard):Ln(R.guard)&&(K=R.guard(y())),K}),O=$=>{Ud(e.computed,()=>"[zag-js] No computed object found on machine");const R=e.computed[$];return R({context:d,event:g(),prop:l,refs:f,get scope(){return a.value},computed:O})},_=xs(()=>({defaultValue:e.initialState({prop:l}),onChange($,R){var K,D,M;if(R){const U=h.get(R);U?.(),h.delete(R)}R&&x((K=e.states[R])==null?void 0:K.exit),x(u?.actions);const A=k((D=e.states[$])==null?void 0:D.effects);if(A&&h.set($,A),R===Nl){x(e.entry);const U=k(e.effects);U&&h.set(Nl,U)}x((M=e.states[$])==null?void 0:M.entry)}}));let E=Uo.NotStarted;js(()=>{const $=E===Uo.Started;E=Uo.Started,r($?"rehydrating...":"initializing..."),_.invoke(_.initial,Nl)}),qy(()=>{E=Uo.Stopped,r("unmounting...");const $=h.values();for(const R of $)R?.();h=new Map,x(e.exit)});const V=$=>{var R,K;if(E!==Uo.Started)return;p.current=m.current,m.current=$;let D=_.get();const M=((R=e.states[D].on)==null?void 0:R[$.type])??((K=e.on)==null?void 0:K[$.type]),A=S(M);if(!A)return;u=A;const U=A.target??D;r("transition",$.type,A.target||D,`(${A.actions})`);const G=U!==D;G?_.set(U):A.reenter&&!G?_.invoke(D,D):x(A.actions)};return(i=e.watch)==null||i.call(e,y()),{state:v(),send:V,context:d,prop:l,get scope(){return a.value},refs:f,computed:O,event:g(),getStatus:()=>E}}function gC(e){return function(t){return e.value[t]}}var eh=e=>{Id().then(()=>{e()})};const[o3,Kt]=we("EnvironmentContext"),Xt=F(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Cn=F(()=>({dir:"ltr",locale:"en-US"})),[i3,_n]=we("LocaleContext"),Jn=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},fC=(e={},t)=>{const n=Yt(),o=Kt(Xt),i=_n(Cn),a=F(()=>{const c=Me(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Jn(c),onExitComplete:()=>{var d;t?.("exitComplete"),(d=c.onExitComplete)==null||d.call(c)},onOpenChange:d=>{var h;t?.("openChange",d),t?.("update:open",d.open),(h=c.onOpenChange)==null||h.call(c,d)}}}),r=Dt(lC,a),s=F(()=>sC(r,qt)),l=ve(!1);return Re(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),F(()=>{const c=Me(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},mC=P({__name:"collapsible-root",props:wn({collapsedHeight:{},collapsedWidth:{},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:["exitComplete","openChange","update:open"],setup(e,{emit:t}){const n=fC(e,t);return Sm(n),q(),(o,i)=>(C(),T(b(X).div,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),vC=P({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cl();return q(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),bC=P({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=cl();return q(),(n,o)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Em=Object.freeze(Object.defineProperty({__proto__:null,Content:tC,Context:nC,Indicator:bC,Root:mC,RootProvider:oC,Trigger:vC},Symbol.toStringTag,{value:"Module"})),yC=()=>(e,t)=>t.reduce((n,o)=>{const[i,a]=n,r=o;return a[r]!==void 0&&(i[r]=a[r]),delete a[r],[i,a]},[{},{...e}]),xC={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function wC(e,t){return C(),H("svg",xC,[...t[0]||(t[0]=[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5531 5.90623L10.089 6.37027L7.6187 8.84055C7.27698 9.18232 6.72297 9.18232 6.38126 8.84055L3.91094 6.37027L3.4469 5.90623L4.37498 4.97815L4.83902 5.44219L6.99998 7.60315L9.16097 5.44219L9.62499 4.97815L10.5531 5.90623Z",fill:"currentColor"},null,-1)])])}const CC={render:wC},_C=ie("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");_C.build();const[a3,Qn]=we("FieldContext");function kC(e){if(!e)return;const t=ui(e);return"box-sizing:"+t.boxSizing+";border-left:"+t.borderLeftWidth+" solid red;border-right:"+t.borderRightWidth+" solid red;font-family:"+t.fontFamily+";font-feature-settings:"+t.fontFeatureSettings+";font-kerning:"+t.fontKerning+";font-size:"+t.fontSize+";font-stretch:"+t.fontStretch+";font-style:"+t.fontStyle+";font-variant:"+t.fontVariant+";font-variant-caps:"+t.fontVariantCaps+";font-variant-ligatures:"+t.fontVariantLigatures+";font-variant-numeric:"+t.fontVariantNumeric+";font-weight:"+t.fontWeight+";letter-spacing:"+t.letterSpacing+";margin-left:"+t.marginLeft+";margin-right:"+t.marginRight+";padding-left:"+t.paddingLeft+";padding-right:"+t.paddingRight+";text-indent:"+t.textIndent+";text-transform:"+t.textTransform}function SC(e){var t=e.createElement("div");return t.id="ghost",t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",e.body.appendChild(t),t}function EC(e){if(!e)return;const t=dt(e),n=Ce(e),o=SC(t),i=kC(e);i&&(o.style.cssText+=i);function a(){n.requestAnimationFrame(()=>{o.innerHTML=e.value;const r=n.getComputedStyle(o);e?.style.setProperty("width",r.width)})}return a(),e?.addEventListener("input",a),e?.addEventListener("change",a),()=>{t.body.removeChild(o),e?.removeEventListener("input",a),e?.removeEventListener("change",a)}}var Om=(e=>(e.ArrowUp="↑",e.ArrowDown="↓",e.ArrowLeft="←",e.ArrowRight="→",e.Enter="↵",e.Tab="⇥",e.Escape="Esc",e.Space="␣",e.Backspace="⌫",e.Delete="Del",e.PageUp="PgUp",e.PageDown="PgDn",e.Command="⌘",e.Control="CTRL",e))(Om||{});const OC={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},$C=Do({base:{display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",paddingX:"2",height:"14",textAlign:"center",fontFamily:"mono",fontSize:"xs",fontStyle:"normal",fontWeight:"regular",lineHeight:"sm",letterSpacing:"tight",textTransform:"uppercase",color:"text.subtle",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"},defaultVariants:{type:"default"},variants:{type:OC}}),ws=P({__name:"KeyboardKey",props:{type:{default:"default"},keys:{default:()=>[]},macKeys:{default:()=>[]},windowsKeys:{default:()=>[]},forcePlatform:{default:"mac"}},setup(e){const t=e,n=r=>r==="Ctrl"?"Control":r==="Meta"?"Command":r,o=r=>{const s=n(r);return Om[s]||r},i=ve("windows");Re(()=>t.forcePlatform,r=>{r&&(i.value=r)}),js(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const a=F(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(r,s)=>(C(),H("div",{class:N(b(ot)({display:"flex",columnGap:"3"}))},[(C(!0),H(Oe,null,Ue(a.value,l=>(C(),H("div",{key:l,class:N(b($C)({type:e.type}))},oe(o(l)),3))),128))],2))}}),IC=ne({className:"spinner",slots:["root","spinner","background","rotationWrapper"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center"},spinner:{width:"100%",height:"100%"},background:{position:"absolute",top:"0",left:"0"},rotationWrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",animation:"spin 1s linear infinite"}},variants:{variant:{default:{},inverted:{}},size:{sm:{root:{width:"16",height:"16"}},md:{root:{width:"24",height:"24"}},lg:{root:{width:"32",height:"32"}}}},defaultVariants:{variant:"default",size:"md"}}),TC=["aria-label"],PC=["fill"],VC=["fill"],$m=P({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=F(()=>IC({variant:t.variant,size:t.size})),o=F(()=>t.variant==="default"?"var(--colors-icon-selected)":"var(--colors-icon-inverse)");return(i,a)=>(C(),H("div",{class:N(n.value.root),"aria-label":t.ariaLabel,role:"status","data-testid":"spinner"},[(C(),H("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:N([n.value.spinner,n.value.background])},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,opacity:"0.3",d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z"},null,8,PC)],2)),z("div",{class:N([n.value.rotationWrapper,"spinner-rotate"])},[(C(),H("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:N(n.value.spinner)},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,d:"M12 4C9.38441 4 7.06204 5.25316 5.59909 7.20034C4.9356 8.08342 3.68185 8.26146 2.79876 7.59798C1.91568 6.93449 1.73764 5.68074 2.40113 4.79765C4.58709 1.88817 8.07337 0 12 0C18.6274 0 24 5.37257 24 12C24 18.6274 18.6274 24 12 24C10.8954 24 10 23.1046 10 22C10 20.8954 10.8954 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z"},null,8,VC)],2))],2)],10,TC))}}),DC=ne({slots:["root"],base:{root:{}},defaultVariants:{variant:"primary"},variants:{variant:{primary:{root:{color:"inherit"}},critical:{root:{color:"inherit"}},default:{root:{color:"inherit"}},subtle:{root:{color:"inherit"}},plainPrimary:{root:{color:"inherit"}},plainCritical:{root:{color:"inherit"}},dashed:{root:{color:"inherit"}},validation:{root:{color:"inherit"}},link:{root:{color:"inherit",textStyle:"body_small_medium"}}}}}),MC=P({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=F(()=>DC({variant:t.variant}));return(o,i)=>(C(),H("span",{class:N(n.value.root)},[L(o.$slots,"default",{},()=>[Be(oe(t.text),1)])],2))}}),Ve={primary:{_active:{background:"background.brand-bold-pressed !important"},color:"whitealpha.1000",background:"background.brand-bold-default",boxShadow:"stroke-bordered-interactive",_hover:{background:"background.brand-bold-hover"},_focus:{background:"background.brand-bold-default",boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},critical:{background:"colorPalette.700",color:"whitealpha.1000",boxShadow:"stroke-bordered-interactive",colorPalette:"red",_active:{background:"background.error-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.error-bold-default",boxShadow:"state-focus-critical"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},default:{background:"whitealpha.1000",color:"graycool.1000",colorPalette:"whitealpha",boxShadow:"stroke-bordered-interactive",_hover:{background:"graycoolalpha.10"},_active:{background:"background.pressed !important"},_focus:{boxShadow:"state-focus-primary",zIndex:"100000"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},subtle:{background:"whitealpha.1000",color:"text.subtle",_active:{background:"background.pressed !important"},_disabled:{background:"background.pressed"},_hover:{background:"background.hover"},_focus:{boxShadow:"state-focus-primary"}},plainPrimary:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"seed",_active:{background:"background.brand-selected-pressed !important",color:"text.brand-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-primary",color:"text.brand-default"}},plainCritical:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"red",_active:{background:"background.error-pressed !important",color:"text.error-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-critical",color:"text.error-default"}},dashed:{'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"},boxShadow:"stroke-bordered-interactive",background:"whitealpha.1000",color:"graycool.900",colorPalette:"whitealpha",border:"1px dashed",borderColor:"graycoolalpha.75",_active:{background:"background.hover !important",color:"text.normal"},_hover:{background:"graycoolalpha.10"},_focus:{boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},validation:{background:"colorPalette.700",color:"whitealpha.1000",colorPalette:"green",boxShadow:"stroke-bordered-interactive",_active:{background:"background.success-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.success-bold-default",boxShadow:"state-focus-success"},_disabled:{color:"graycoolalpha.75",background:"graycoolalpha.20",cursor:"not-allowed",_hover:{color:"graycoolalpha.75",background:"graycoolalpha.20"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},link:{background:"transparent",color:"text.brand-default",textStyle:"body_small_medium",padding:"0",height:"auto",_hover:{},_focus:{},_disabled:{color:"text.disabled",cursor:"not-allowed"}}},th={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},RC=ne({slots:["root","content","spinner","label","slots"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",fontSize:"base",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",_hidden:{display:"none"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},content:{display:"flex",alignItems:"center",gap:"6"},spinner:{width:"16",height:"16","&[data-loading]":{opacity:"0.7"}},label:{"&[data-loading]":{opacity:"0.7"}},slots:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:Ve.primary,spinner:{}},critical:{root:Ve.critical},default:{root:Ve.default},subtle:{root:Ve.subtle},plainPrimary:{root:Ve.plainPrimary},plainCritical:{root:Ve.plainCritical},dashed:{root:Ve.dashed},validation:{root:Ve.validation},link:{root:Ve.link}},size:{default:{root:{px:"12",py:"6",gap:"6"}},small:{root:{px:"8",py:"2",gap:"6"}}}}}),FC=["disabled","data-loading","data-selected","aria-busy"],An=P({__name:"Button",props:{type:{default:"primary"},size:{default:"default"},isLoading:{type:Boolean},isDisabled:{type:Boolean},label:{},isSelected:{type:Boolean,default:!1},shortcutKeys:{}},setup(e){const t=Ws(),n=e,o=F(()=>RC({type:n.type,size:n.size})),i=F(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),a=F(()=>t.prefix),r=F(()=>t.suffix);return(s,l)=>(C(),H("button",{disabled:n.isDisabled,"data-loading":n.isLoading||null,"data-selected":n.isSelected||null,"aria-busy":n.isLoading||void 0,class:N([o.value.root,b(ot)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[z("div",{class:N([o.value.content,n.isLoading?b(ot)({position:"relative"}):""])},[a.value?(C(),H("div",{key:0,class:N([o.value.slots,n.isLoading?b(ot)({visibility:"hidden"}):""])},[L(s.$slots,"prefix")],2)):Q("",!0),n.isLoading?(C(),T($m,{key:1,class:N([o.value.spinner,n.isLoading?b(ot)({position:"absolute",transform:"translate(-50%, -50%)",top:"50%",left:"50%"}):""]),variant:i.value,"data-loading":n.isLoading||null},null,8,["class","variant","data-loading"])):Q("",!0),z("div",{class:N([a.value?b(ot)({paddingRight:"2",display:"inline-flex"}):"",r.value?b(ot)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?b(ot)({visibility:"hidden"}):""])},[L(s.$slots,"default",{},()=>[n.label?(C(),T(MC,{key:0,text:n.label,variant:n.type},null,8,["text","variant"])):Q("",!0)])],2),r.value?(C(),H("div",{key:2,class:N([o.value.slots,n.isLoading?b(ot)({visibility:"hidden"}):""])},[L(s.$slots,"suffix")],2)):Q("",!0),n.shortcutKeys?(C(),H("div",{key:3,class:N([n.isLoading?b(ot)({visibility:"hidden"}):""])},[Z(ws,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):Q("",!0)],2)],10,FC))}}),AC={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},LC={default:{},chat:{root:{borderBottomRadius:"none"}}};ne({slots:["root","input","inputContainer","suffixButton","footer"],base:{root:{padding:"8",display:"flex",flexDirection:"column",gap:"8",background:"background.gray-subtlest-default",boxShadow:"stroke-container",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",borderRadius:"md",_hover:{backgroundColor:"background.gray-subtlest-hover"},_focus:{boxShadow:"state-focus-primary"},_focusWithin:{boxShadow:"state-focus-primary"}},inputContainer:{display:"flex",gap:"12"},input:{resize:"none",width:"100%",textAlign:"left",outline:"none",display:"flex",padding:"0",borderRadius:"none",borderTopLeftRadius:"md",border:"none",backgroundColor:"transparent",fontFamily:"sans",fontSize:"base",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_placeholder:{color:"text.placeholder"},_disabled:{backgroundColor:"background.disabled",color:"text.disabled",cursor:"not-allowed",_hover:{backgroundColor:"background.disabled"}}},suffixButton:{width:"fit-content",height:"fit-content",paddingX:"4 !important",paddingY:"4 !important"}},variants:{variant:LC,state:AC,disabled:{true:{root:{cursor:"not-allowed",backgroundColor:"background.disabled",color:"text.subtle",boxShadow:"none",_hover:{backgroundColor:"background.disabled"},_focusWithin:{boxShadow:"none"},_focus:{boxShadow:"none"}},input:{cursor:"not-allowed",backgroundColor:"transparent",color:"text.subtle","&::placeholder":{color:"text.placeholder"}}},false:{}}},defaultVariants:{variant:"default",state:"default",disabled:!1}});const NC=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};ne({slots:["root","content"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",_hidden:{display:"none"}},content:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:Ve.primary},critical:{root:Ve.critical},default:{root:Ve.default},subtle:{root:Ve.subtle},dashed:{root:Ve.dashed},plain:{root:{background:"none",_focusVisible:{boxShadow:"state-focus-primary"},_disabled:{padding:0,boxShadow:"none",background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75",cursor:"not-allowed",_hover:{background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75"}}}}},size:{default:{root:th.default},small:{root:th.small}}},compoundVariants:[{type:"plain",size:"default",css:{root:{width:"16 !important",height:"16 !important"}}},{type:"plain",size:"small",css:{root:{width:"16 !important",height:"16 !important"}}}]});ne({slots:["container","indicator","message","icon","title"],base:{indicator:{minHeight:"3.85rem",borderTopLeftRadius:"md",borderBottomLeftRadius:"md",position:"absolute",left:"-0.0625rem",top:"0",width:"0.25rem",height:"100%"},container:{display:"flex",borderRadius:"md",boxShadow:"inner-highlighted-ring",position:"relative",minHeight:"3.75rem",padding:"8",fontSize:"md",fontWeight:"medium"},title:{fontSize:"base",fontWeight:"regular",color:"text.normal",fontFamily:"sans",lineHeight:"lg",letterSpacing:"normal"}},variants:{type:{info:{indicator:{backgroundColor:"blue.800"},icon:{color:"blue.800"}},warning:{indicator:{backgroundColor:"orange.800"},icon:{color:"orange.800"}},issue:{indicator:{backgroundColor:"red.800"},icon:{color:"red.800"}}}},defaultVariants:{type:"info"}});var BC=ie("avatar").parts("root","image","fallback");BC.build();Y()(["dir","id","ids","onStatusChange","getRootNode"]);ne({slots:["root","image","fallback"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",boxShadow:"stroke-bordered-interactive",background:"background.default"},image:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"inherit"},fallback:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#F2F2F5",color:"text.subtle",textAlign:"center",borderRadius:"inherit"}},variants:{size:{xs:{root:{width:"16",height:"16"},fallback:{textStyle:"body_xsmall_caps_medium"}},sm:{root:{width:"20",height:"20"},fallback:{textStyle:"body_xsmall_caps_medium"}},md:{root:{width:"24",height:"24"},fallback:{textStyle:"body_xsmall_caps_medium"}},lg:{root:{width:"32",height:"32",padding:"2"},fallback:{textStyle:"body_small_semibold"}},xl:{root:{width:"40",height:"40",padding:"2"},fallback:{textStyle:"body_base_semibold"}}},shape:{rounded:{root:{borderRadius:"full"}},square:{root:{borderRadius:"md"}}}},defaultVariants:{size:"md",shape:"rounded"}});var zC=Object.defineProperty,HC=(e,t,n)=>t in e?zC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,en=(e,t,n)=>HC(e,typeof t!="symbol"?t+"":t,n),nh=class Pe{constructor([t,n,o,i,a,r]=[0,0,0,0,0,0]){en(this,"m00"),en(this,"m01"),en(this,"m02"),en(this,"m10"),en(this,"m11"),en(this,"m12"),en(this,"rotate",(...s)=>this.prepend(Pe.rotate(...s))),en(this,"scale",(...s)=>this.prepend(Pe.scale(...s))),en(this,"translate",(...s)=>this.prepend(Pe.translate(...s))),this.m00=t,this.m01=n,this.m02=o,this.m10=i,this.m11=a,this.m12=r}applyTo(t){const{x:n,y:o}=t,{m00:i,m01:a,m02:r,m10:s,m11:l,m12:c}=this;return{x:i*n+a*o+r,y:s*n+l*o+c}}prepend(t){return new Pe([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new Pe([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){const t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){const t=this.determinant;return new Pe([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new Pe([1,0,0,0,1,0])}static rotate(t,n){const o=new Pe([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?Pe.multiply(Pe.translate(n.x,n.y),o,Pe.translate(-n.x,-n.y)):o}static scale(t,n=t,o={x:0,y:0}){const i=new Pe([t,0,0,0,n,0]);return o.x!==0||o.y!==0?Pe.multiply(Pe.translate(o.x,o.y),i,Pe.translate(-o.x,-o.y)):i}static translate(t,n){return new Pe([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((o,i)=>o.prepend(i),t):Pe.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}},oh=(e,t,n)=>Math.min(Math.max(e,t),n),Ka=(e,t,n)=>{const o=oh(e.x,n.x,n.x+n.width-t.width),i=oh(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},jC={width:0,height:0},WC={width:1/0,height:1/0},Xa=(e,t=jC,n=WC)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),mo=(e,t)=>({x:e,y:t}),ih=(e,t)=>t?mo(e.x-t.x,e.y-t.y):e,GC=(e,t)=>mo(e.x+t.x,e.y+t.y);function Ma(e){const{x:t,y:n,width:o,height:i}=e,a=t+o/2,r=n+i/2;return{x:t,y:n,width:o,height:i,minX:t,minY:n,maxX:t+o,maxY:n+i,midX:a,midY:r,center:mo(a,r)}}function UC(e){const t=mo(e.minX,e.minY),n=mo(e.maxX,e.minY),o=mo(e.maxX,e.maxY),i=mo(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var YC=(e,t)=>{const n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),o=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:o,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},qC=(e,t)=>e.width===t?.width&&e.height===t?.height,KC=(e,t)=>e.x===t?.x&&e.y===t?.y,zl=new WeakMap;function XC(e){if(!zl.has(e)){const t=e.ownerDocument.defaultView||window;zl.set(e,t.getComputedStyle(e))}return zl.get(e)}function Im(e,t={}){return Ma(ZC(e,t))}function ZC(e,t={}){const{excludeScrollbar:n=!1,excludeBorders:o=!1}=t,{x:i,y:a,width:r,height:s}=e.getBoundingClientRect(),l={x:i,y:a,width:r,height:s},c=XC(e),{borderLeftWidth:d,borderTopWidth:h,borderRightWidth:u,borderBottomWidth:p}=c,m=ah(d,u),g=ah(h,p);if(o&&(l.width-=m,l.height-=g,l.x+=Rc(d),l.y+=Rc(h)),n){const v=e.offsetWidth-e.clientWidth-m,f=e.offsetHeight-e.clientHeight-g;l.width-=v,l.height-=f}return l}var Rc=e=>parseFloat(e.replace("px","")),ah=(...e)=>e.reduce((t,n)=>t+(n?Rc(n):0),0);function JC(e,t={}){return Ma(QC(e,t))}function QC(e,t){const{excludeScrollbar:n=!1}=t,{innerWidth:o,innerHeight:i,document:a,visualViewport:r}=e,s=r?.width||o,l=r?.height||i,c={x:0,y:0,width:s,height:l};if(n){const d=o-a.documentElement.clientWidth,h=i-a.documentElement.clientHeight;c.width-=d,c.height-=h}return c}function e1(e,t){const n=Ma(e),{top:o,right:i,left:a,bottom:r}=UC(n),[s]=t.split("-");return{top:[a,o,i,r],right:[o,i,r,a],bottom:[o,a,r,i],left:[i,o,a,r]}[s]}function t1(e,t){const{x:n,y:o}=t;let i=!1;for(let a=0,r=e.length-1;a<e.length;r=a++){const s=e[a].x,l=e[a].y,c=e[r].x,d=e[r].y;l>o!=d>o&&n<(c-s)*(o-l)/(d-l)+s&&(i=!i)}return i}var rh={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},n1={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Za,abs:ti,min:sh}=Math;function lh(e,t){const{minX:n,minY:o,maxX:i,maxY:a,midX:r,midY:s}=e,l=t.includes("w")?n:t.includes("e")?i:r,c=t.includes("n")?o:t.includes("s")?a:s;return{x:l,y:c}}function o1(e){return n1[e]}function i1(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:a}=o,r=lh(e,n),s=o1(n),l=lh(e,s);i==="center"&&(t={x:t.x*2,y:t.y*2});const c={x:r.x+t.x,y:r.y+t.y},d={x:rh[n].x*2-1,y:rh[n].y*2-1},h={width:c.x-l.x,height:c.y-l.y},u=d.x*h.width/e.width,p=d.y*h.height/e.height,m=ti(u)>ti(p)?u:p,g=a?{x:m,y:m}:{x:r.x===l.x?1:u,y:r.y===l.y?1:p};switch(r.y===l.y?g.y=ti(g.y):Za(g.y)!==Za(p)&&(g.y*=-1),r.x===l.x?g.x=ti(g.x):Za(g.x)!==Za(u)&&(g.x*=-1),i){case"extent":return ch(e,nh.scale(g.x,g.y,l),!1);case"center":return ch(e,nh.scale(g.x,g.y,{x:e.midX,y:e.midY}),!1)}}function a1(e,t,n=!0){return n?{x:sh(t.x,e.x),y:sh(t.y,e.y),width:ti(t.x-e.x),height:ti(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function ch(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return a1(o,i,n)}var r1=ie("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");r1.build();Y()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function s1(e,t){const{state:n,send:o,context:i}=e,a=n.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:a,setNode(r){r&&o({type:"NODE.SET",node:r})},unmount(){o({type:"UNMOUNT"})}}}var l1={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",ui(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:o})=>{const i=o("present");if(i)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!i&&a?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});J(()=>{var r,s;const l=Ja(t.get("styles"));e.set("unmountAnimationName",l),l==="none"||l===e.get("prevAnimationName")||((r=t.get("styles"))==null?void 0:r.display)==="none"||((s=t.get("styles"))==null?void 0:s.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{J(()=>{e.set("prevAnimationName",Ja(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:o})=>{const i=t.get("node");if(!i)return;const a=l=>{var c,d;(((d=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:d[0])??l.target)===i&&e.set("prevAnimationName",Ja(t.get("styles")))},r=l=>{const c=Ja(t.get("styles"));be(l)===i&&c===e.get("unmountAnimationName")&&!o("present")&&n({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",a),i.addEventListener("animationcancel",r),i.addEventListener("animationend",r);const s=Gd(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",a),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r),el(()=>s())}}}}};function Ja(e){return e?.animationName||"none"}Y()(["onExitComplete","present","immediate"]);const Tm=(e,t)=>{const n=ve(!1),o=ve(null),i=F(()=>({present:Me(e).present,onExitComplete:()=>{}})),a=Dt(l1,i),r=F(()=>s1(a));return Re(()=>r.value.present,()=>{r.value.present&&(n.value=!0)}),Re(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&r.value.setNode(s)}}),F(()=>{var s;const l=Me(e);return{present:r.value.present,unmounted:!r.value.present&&!n.value&&l.lazyMount||l?.unmountOnExit&&!((s=r.value)!=null&&s.present)&&n.value,presenceProps:{ref:o,hidden:!r.value.present,"data-state":r.value.skip&&l.skipAnimationOnMount?void 0:l!=null&&l.present?"open":"closed"}}})},[Pm,Vm]=we("PresenceContext");var Ao=new WeakMap,Qa=new WeakMap,er={},Hl=0,Dm=e=>e&&(e.host||Dm(e.parentNode)),c1=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Dm(n);return o&&e.contains(o)?o:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),d1=new Set(["script","output","status","next-route-announcer"]),u1=e=>d1.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),h1=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:a=!0}=t,r=c1(n,Array.isArray(e)?e:[e]);er[o]||(er[o]=new WeakMap);const s=er[o],l=[],c=new Set,d=new Set(r),h=p=>{!p||c.has(p)||(c.add(p),h(p.parentNode))};r.forEach(p=>{h(p),a&&ke(p)&&Uf(p,m=>{h(m)})});const u=p=>{!p||d.has(p)||Array.prototype.forEach.call(p.children,m=>{if(c.has(m))u(m);else try{if(u1(m))return;const g=m.getAttribute(i)==="true",v=(Ao.get(m)||0)+1,f=(s.get(m)||0)+1;Ao.set(m,v),s.set(m,f),l.push(m),v===1&&g&&Qa.set(m,!0),f===1&&m.setAttribute(o,""),g||m.setAttribute(i,"true")}catch(g){console.error("[zag-js > ariaHidden] cannot operate on ",m,g)}})};return u(n),c.clear(),Hl++,()=>{l.forEach(p=>{const m=Ao.get(p)-1,g=s.get(p)-1;Ao.set(p,m),s.set(p,g),m||(Qa.has(p)||p.removeAttribute(i),Qa.delete(p)),g||p.removeAttribute(o)}),Hl--,Hl||(Ao=new WeakMap,Ao=new WeakMap,Qa=new WeakMap,er={})}},p1=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,g1=(e,t=p1(e),n="data-aria-hidden",o=!0)=>{if(t)return h1(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},f1=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function m1(e,t={}){const{defer:n=!0}=t,o=n?f1:a=>a(),i=[];return i.push(o(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&i.push(g1(a))})),()=>{i.forEach(a=>a?.())}}function v1(e){const t={each(n){var o;for(let i=0;i<((o=e.frames)==null?void 0:o.length);i+=1){const a=e.frames[i];a&&n(a)}},addEventListener(n,o,i){return t.each(a=>{try{a.document.addEventListener(n,o,i)}catch{}}),()=>{try{t.removeEventListener(n,o,i)}catch{}}},removeEventListener(n,o,i){t.each(a=>{try{a.document.removeEventListener(n,o,i)}catch{}})}};return t}function b1(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,o,i)=>{try{t?.addEventListener(n,o,i)}catch{}return()=>{try{t?.removeEventListener(n,o,i)}catch{}}},removeEventListener:(n,o,i)=>{try{t?.removeEventListener(n,o,i)}catch{}}}}var dh="pointerdown.outside",uh="focus.outside";function y1(e){for(const t of e)if(ke(t)&&gn(t))return!0;return!1}var Mm=e=>"clientY"in e;function x1(e,t){if(!Mm(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function w1(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function hh(e,t){if(!t||!Mm(e))return!1;const n=t.scrollHeight>t.clientHeight,o=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight,r={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},s={x:e.clientX,y:e.clientY};return w1(r,s)?o||a:!1}function C1(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:a,defer:r,followControlledElements:s=!0}=t;if(!e)return;const l=dt(e),c=Ce(e),d=v1(c),h=b1(c);function u(x,w){if(!ke(w)||!w.isConnected||Ye(e,w)||x1(e,x)||s&&Gf(e,w))return!1;const k=l.querySelector(`[aria-controls="${e.id}"]`);if(k){const O=bs(k);if(hh(x,O))return!1}const S=bs(e);return hh(x,S)?!1:!(n!=null&&n(w))}const p=new Set,m=di(e?.getRootNode());function g(x){function w(k){var S;const O=r&&!Hu()?J:V=>V(),_=k??x,E=((S=_?.composedPath)==null?void 0:S.call(_))??[_?.target];O(()=>{const V=m?E[0]:be(x);if(!(!e||!u(x,V))){if(i||a){const $=wa(i,a);e.addEventListener(dh,$,{once:!0})}ph(e,dh,{bubbles:!1,cancelable:!0,detail:{originalEvent:_,contextmenu:w0(_),focusable:y1(E),target:V}})}})}x.pointerType==="touch"?(p.forEach(k=>k()),p.add(se(l,"click",w,{once:!0})),p.add(h.addEventListener("click",w,{once:!0})),p.add(d.addEventListener("click",w,{once:!0}))):w()}const v=new Set,f=setTimeout(()=>{v.add(se(l,"pointerdown",g,!0)),v.add(h.addEventListener("pointerdown",g,!0)),v.add(d.addEventListener("pointerdown",g,!0))},0);function y(x){(r?J:w=>w())(()=>{var w;const k=((w=x?.composedPath)==null?void 0:w.call(x))??[x?.target],S=m?k[0]:be(x);if(!(!e||!u(x,S))){if(o||a){const O=wa(o,a);e.addEventListener(uh,O,{once:!0})}ph(e,uh,{bubbles:!1,cancelable:!0,detail:{originalEvent:x,contextmenu:!1,focusable:gn(S),target:S}})}})}return Hu()||(v.add(se(l,"focusin",y,!0)),v.add(h.addEventListener("focusin",y,!0)),v.add(d.addEventListener("focusin",y,!0))),()=>{clearTimeout(f),p.forEach(x=>x()),v.forEach(x=>x())}}function Kd(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(C1(a,t))})),()=>{i.forEach(a=>a?.())}}function ph(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function _1(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return se(dt(e),"keydown",n,{capture:!0})}var gh="layer:request-dismiss",Ze={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;const n=this.indexOf(e),o=this.topMostPointerBlockingLayer()?this.indexOf((t=this.topMostPointerBlockingLayer())==null?void 0:t.node):-1;return n<o},isTopMost(e){const t=this.layers[this.count()-1];return t?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(o=>o.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(o=>o.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Ye(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ye(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>Ze.dismiss(n.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const o=this.layers[n];S1(e,gh,i=>{var a;(a=o.requestDismiss)==null||a.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),k1(e,gh,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function k1(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(i)}function S1(e,t,n){e.addEventListener(t,n,{once:!0})}var fh;function mh(){Ze.layers.forEach(({node:e})=>{e.style.pointerEvents=Ze.isBelowPointerBlockingLayer(e)?"none":"auto"})}function E1(e){e.style.pointerEvents=""}function O1(e,t){const n=dt(e),o=[];return Ze.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(fh=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[a,r]=ew(()=>{const s=i();return ke(s)?s:null},{timeout:1e3});a.then(s=>o.push(Gd(s,{pointerEvents:"auto"}))),o.push(r)}),()=>{Ze.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=fh,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function $1(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){bn("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:o,onRequestDismiss:i,pointerBlocking:a,exclude:r,debug:s,type:l="dialog"}=t,c={dismiss:o,node:e,type:l,pointerBlocking:a,requestDismiss:i};Ze.add(c),mh();function d(g){var v,f;const y=be(g.detail.originalEvent);Ze.isBelowPointerBlockingLayer(e)||Ze.isInBranch(y)||((v=t.onPointerDownOutside)==null||v.call(t,g),(f=t.onInteractOutside)==null||f.call(t,g),!g.defaultPrevented&&(s&&console.log("onPointerDownOutside:",g.detail.originalEvent),o?.()))}function h(g){var v,f;const y=be(g.detail.originalEvent);Ze.isInBranch(y)||((v=t.onFocusOutside)==null||v.call(t,g),(f=t.onInteractOutside)==null||f.call(t,g),!g.defaultPrevented&&(s&&console.log("onFocusOutside:",g.detail.originalEvent),o?.()))}function u(g){var v;Ze.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,g),!g.defaultPrevented&&o&&(g.preventDefault(),o()))}function p(g){var v;if(!e)return!1;const f=typeof r=="function"?r():r,y=Array.isArray(f)?f:[f],x=(v=t.persistentElements)==null?void 0:v.map(w=>w()).filter(ke);return x&&y.push(...x),y.some(w=>Ye(w,g))||Ze.isInNestedLayer(e,g)}const m=[a?O1(e,t.persistentElements):void 0,_1(e,u),Kd(e,{exclude:p,onFocusOutside:h,onPointerDownOutside:d,defer:t.defer})];return()=>{Ze.remove(e),mh(),E1(e),m.forEach(g=>g?.())}}function xi(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Ln(e)?e():e;i.push($1(a,t))})),()=>{i.forEach(a=>a?.())}}function Rm(e,t={}){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Ln(e)?e():e;if(!a){bn("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ze.addBranch(a),i.push(()=>{Ze.removeBranch(a)})})),()=>{i.forEach(a=>a?.())}}var I1=Object.defineProperty,T1=(e,t,n)=>t in e?I1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ye=(e,t,n)=>T1(e,typeof t!="symbol"?t+"":t,n),vh={activateTrap(e,t){if(e.length>0){const o=e[e.length-1];o!==t&&o.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},P1=[],V1=class{constructor(t,n){ye(this,"trapStack"),ye(this,"config"),ye(this,"doc"),ye(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ye(this,"portalContainers",new Set),ye(this,"listenerCleanups",[]),ye(this,"handleFocus",i=>{const a=be(i),r=this.findContainerIndex(a,i)>=0;if(r||Ks(a))r&&(this.state.mostRecentlyFocusedNode=a);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if($i(this.state.mostRecentlyFocusedNode)>0){const c=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:d}=this.state.containerGroups[c];if(d.length>0){const h=d.findIndex(u=>u===this.state.mostRecentlyFocusedNode);h>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?h+1<d.length&&(s=d[h+1],l=!1):h-1>=0&&(s=d[h-1],l=!1))}}else this.state.containerGroups.some(c=>c.tabbableNodes.some(d=>$i(d)>0))||(l=!1);else l=!1;l&&(s=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),s?this.tryFocus(s):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),ye(this,"handlePointerDown",i=>{const a=be(i);if(!(this.findContainerIndex(a,i)>=0)){if(Pi(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Pi(this.config.allowOutsideClick,i)||i.preventDefault()}}),ye(this,"handleClick",i=>{const a=be(i);this.findContainerIndex(a,i)>=0||Pi(this.config.clickOutsideDeactivates,i)||Pi(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),ye(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;const a=this.config.isKeyBackward(i),r=this.findNextNavNode({event:i,isBackward:a});if(!r)return;Ti(i)&&i.preventDefault(),this.tryFocus(r)}}),ye(this,"handleEscapeKey",i=>{D1(i)&&Pi(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),ye(this,"_mutationObserver"),ye(this,"setupMutationObserver",()=>{const i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(a=>{a.some(r=>Array.from(r.removedNodes).some(s=>s===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),a.some(r=>r.type==="attributes"&&(r.attributeName==="aria-controls"||r.attributeName==="aria-expanded")?!0:r.type==="childList"&&r.addedNodes.length>0?Array.from(r.addedNodes).some(s=>{if(s.nodeType!==Node.ELEMENT_NODE)return!1;const l=s;return c0(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?d0(l):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ye(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(a=>{var r;(r=this._mutationObserver)==null||r.observe(a,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(a=>{this.observePortalContainer(a)}))}),ye(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!gn(i)){const a=da(this.doc);if(a&&this.findContainerIndex(a)>=0)i=a;else{const r=this.state.tabbableGroups[0];i=r&&r.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),ye(this,"tryFocus",i=>{if(i!==!1&&i!==da(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,M1(i)&&i.select()}}),ye(this,"deactivate",i=>{if(!this.state.active)return this;const a={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...i};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),vh.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const r=this.getOption(a,"onDeactivate"),s=this.getOption(a,"onPostDeactivate"),l=this.getOption(a,"checkCanReturnFocus"),c=this.getOption(a,"returnFocus","returnFocusOnDeactivate");r?.();const d=()=>{bh(()=>{if(c){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(h)}s?.()})};if(c&&l){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(h).then(d,d),this}return d(),this}),ye(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onPause"),r=this.getOption(i,"onPostPause");return this.state.paused=!0,a?.(),this.removeListeners(),this.updateObservedNodes(),r?.(),this}),ye(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onUnpause"),r=this.getOption(i,"onPostUnpause");return this.state.paused=!1,a?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.(),this}),ye(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ye(this,"getReturnFocusNode",i=>{const a=this.getNodeForOption("setReturnFocus",{params:[i]});return a||(a===!1?!1:i)}),ye(this,"getOption",(i,a,r)=>i&&i[a]!==void 0?i[a]:this.config[r||a]),ye(this,"getNodeForOption",(i,{hasFallback:a=!1,params:r=[]}={})=>{let s=this.config[i];if(typeof s=="function"&&(s=s(...r)),s===!0&&(s=void 0),!s){if(s===void 0||s===!1)return s;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let l=s;if(typeof s=="string"){try{l=this.doc.querySelector(s)}catch(c){throw new Error(`\`${i}\` appears to be an invalid selector; error="${c.message}"`)}if(!l&&!a)throw new Error(`\`${i}\` as selector refers to no known node`)}return l}),ye(this,"findNextNavNode",i=>{const{event:a,isBackward:r=!1}=i,s=i.target||be(a);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const c=this.findContainerIndex(s,a),d=c>=0?this.state.containerGroups[c]:void 0;if(c<0)r?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(r){let h=this.state.tabbableGroups.findIndex(({firstTabbableNode:u})=>s===u);if(h<0&&(d?.container===s||gn(s)&&!go(s)&&!(d!=null&&d.nextTabbableNode(s,!1)))&&(h=c),h>=0){const u=h===0?this.state.tabbableGroups.length-1:h-1,p=this.state.tabbableGroups[u];l=$i(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else Ti(a)||(l=d?.nextTabbableNode(s,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:u})=>s===u);if(h<0&&(d?.container===s||gn(s)&&!go(s)&&!(d!=null&&d.nextTabbableNode(s)))&&(h=c),h>=0){const u=h===this.state.tabbableGroups.length-1?0:h+1,p=this.state.tabbableGroups[u];l=$i(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else Ti(a)||(l=d?.nextTabbableNode(s))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||P1;const o={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(i){return Ti(i)&&!i.shiftKey},isKeyBackward(i){return Ti(i)&&i.shiftKey},...n};this.doc=o.document||dt(Array.isArray(t)?t[0]:t),this.config=o,this.updateContainerElements(t),this.setupMutationObserver()}addPortalContainer(t){const n=t.parentElement;n&&!this.portalContainers.has(n)&&(this.portalContainers.add(n),this.state.active&&!this.state.paused&&this.observePortalContainer(n))}observePortalContainer(t){var n;(n=this._mutationObserver)==null||n.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(t=>{r0(t).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(t,n){const o=typeof n?.composedPath=="function"?n.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:a})=>i.contains(t)||o?.includes(i)||a.find(r=>r===t)||this.isControlledElement(i,t))}isControlledElement(t,n){return this.config.followControlledElements?Gf(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=Va(t,{getShadowRoot:this.config.getShadowRoot}),o=em(t,{getShadowRoot:this.config.getShadowRoot}),i=n[0],a=n[n.length-1],r=i,s=a;let l=!1;for(let d=0;d<n.length;d++)if($i(n[d])>0){l=!0;break}function c(d,h=!0){const u=n.indexOf(d);if(u>=0)return n[u+(h?1:-1)];const p=o.indexOf(d);if(!(p<0)){if(h){for(let m=p+1;m<o.length;m++)if(go(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(go(o[m]))return o[m]}}return{container:t,tabbableNodes:n,focusableNodes:o,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:a,firstDomTabbableNode:r,lastDomTabbableNode:s,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(t=>t.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(t=>t.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return vh.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?bh(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(se(this.doc,"focusin",this.handleFocus,!0),se(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),se(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),se(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),se(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),se(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(t=>t()),this.listenerCleanups=[],this}activate(t){if(this.state.active)return this;const n=this.getOption(t,"onActivate"),o=this.getOption(t,"onPostActivate"),i=this.getOption(t,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=da(this.doc),n?.();const a=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),o?.()};return i?(i(this.state.containers.concat()).then(a,a),this):(a(),this)}},Ti=e=>e.key==="Tab",Pi=(e,...t)=>typeof e=="function"?e(...t):e,D1=e=>!e.isComposing&&e.key==="Escape",bh=e=>setTimeout(e,0),M1=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function R1(e,t={}){let n;const o=J(()=>{const i=typeof e=="function"?e():e;if(i){n=new V1(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:dt(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var F1=ie("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");F1.build();Y()(["id","ids","dir","modal","initialFocusEl","finalFocusEl","open","defaultOpen","getRootNode","snapPoints","swipeVelocityThreshold","closeThreshold","preventDragOnScroll","closeOnEscape","closeOnInteractOutside","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","preventScroll","restoreFocus","role","trapFocus","defaultActiveSnapPoint","activeSnapPoint","onActiveSnapPointChange"]);var A1=ie("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");A1.build();Y()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]);Y()(["index","readOnly"]);Y()(["index","snapAlign"]);const[Fm,Ra]=we("CheckboxContext"),L1=P({__name:"checkbox-context",setup(e){const t=Ra();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),N1=P({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=Ra();return q(),(n,o)=>(C(),T(b(X).div,W(b(t).getControlProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}});function B1(e){return!(e.metaKey||!Js()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var z1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function H1(e,t,n){const o=n?be(n):null,i=Ce(o);return e=e||o instanceof i.HTMLInputElement&&!z1.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(j1,n.key))}var eo=null,Fc=new Set,Cs=new Map,Eo=!1,Ac=!1,j1={Tab:!0,Escape:!0};function dl(e,t){for(let n of Fc)n(e,t)}function _s(e){Eo=!0,B1(e)&&(eo="keyboard",dl("keyboard",e))}function xt(e){eo="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Eo=!0,dl("pointer",e))}function Am(e){x0(e)&&(Eo=!0,eo="virtual")}function Lm(e){const t=be(e);t===Ce(t)||t===dt(t)||(!Eo&&!Ac&&(eo="virtual",dl("virtual",e)),Eo=!1,Ac=!1)}function Nm(){Eo=!1,Ac=!0}function W1(e){if(typeof window>"u"||Cs.get(Ce(e)))return;const t=Ce(e),n=dt(e);let o=t.HTMLElement.prototype.focus;function i(){eo="virtual",dl("virtual",null),Eo=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",_s,!0),n.addEventListener("keyup",_s,!0),n.addEventListener("click",Am,!0),t.addEventListener("focus",Lm,!0),t.addEventListener("blur",Nm,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",xt,!0),n.addEventListener("pointermove",xt,!0),n.addEventListener("pointerup",xt,!0)):(n.addEventListener("mousedown",xt,!0),n.addEventListener("mousemove",xt,!0),n.addEventListener("mouseup",xt,!0)),t.addEventListener("beforeunload",()=>{G1(e)},{once:!0}),Cs.set(t,{focus:o})}var G1=(e,t)=>{const n=Ce(e),o=dt(e),i=Cs.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",_s,!0),o.removeEventListener("keyup",_s,!0),o.removeEventListener("click",Am,!0),n.removeEventListener("focus",Lm,!0),n.removeEventListener("blur",Nm,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",xt,!0),o.removeEventListener("pointermove",xt,!0),o.removeEventListener("pointerup",xt,!0)):(o.removeEventListener("mousedown",xt,!0),o.removeEventListener("mousemove",xt,!0),o.removeEventListener("mouseup",xt,!0)),Cs.delete(n)}};function U1(){return eo}function Ca(){return eo==="keyboard"}function ul(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;W1(i),o?.({isFocusVisible:n||Ca(),modality:eo});const a=(r,s)=>{H1(!!t,r,s)&&o?.({isFocusVisible:Ca(),modality:r})};return Fc.add(a),()=>{Fc.delete(a)}}var Bm=ie("checkbox").parts("root","label","control","indicator"),tr=Bm.build(),zm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},yh=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},Y1=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Lc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},q1=e=>e.getById(zm(e)),oa=e=>e.getById(Lc(e));function K1(e,t){const{send:n,context:o,prop:i,computed:a,scope:r}=e,s=!!i("disabled"),l=!!i("readOnly"),c=!!i("required"),d=!!i("invalid"),h=!s&&o.get("focused"),u=!s&&o.get("focusVisible"),p=a("checked"),m=a("indeterminate"),g=o.get("checked"),v={"data-active":j(o.get("active")),"data-focus":j(h),"data-focus-visible":j(u),"data-readonly":j(l),"data-hover":j(o.get("hovered")),"data-disabled":j(s),"data-state":m?"indeterminate":p?"checked":"unchecked","data-invalid":j(d),"data-required":j(c)};return{checked:p,disabled:s,indeterminate:m,focused:h,checkedState:g,setChecked(f){n({type:"CHECKED.SET",checked:f,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:p,isTrusted:!1})},getRootProps(){return t.label({...tr.root.attrs,...v,dir:i("dir"),id:zm(r),htmlFor:Lc(r),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(f){be(f)===oa(r)&&f.stopPropagation()}})},getLabelProps(){return t.element({...tr.label.attrs,...v,dir:i("dir"),id:yh(r)})},getControlProps(){return t.element({...tr.control.attrs,...v,dir:i("dir"),id:Y1(r),"aria-hidden":!0})},getIndicatorProps(){return t.element({...tr.indicator.attrs,...v,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Lc(r),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":yh(r),"aria-invalid":d,name:i("name"),form:i("form"),value:i("value"),style:nl,onFocus(){const f=Ca();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:f}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(f){if(l){f.preventDefault();return}const y=f.currentTarget.checked;n({type:"CHECKED.SET",checked:y,isTrusted:!0})}})}}}var{not:xh}=ze(),X1={props({props:e}){return{value:"on",...e,defaultChecked:e.defaultChecked??!1}},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var o;(o=e("onCheckedChange"))==null||o({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:o}){e([()=>n("disabled")],()=>{o(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{o(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:xh("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:xh("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>jr(e.get("checked")),checked:({context:e})=>Z1(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return lm({pointerNode:q1(n),keyboardNode:oa(n),isValidKey:o=>o.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return ul({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return bi(oa(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(const n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){const o=oa(n);o&&(Ld(o,t("checked")),o.indeterminate=jr(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){const n=jr(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=oa(t);Xf(n,{checked:e("checked")})})}}}};function jr(e){return e==="indeterminate"}function Z1(e){return jr(e)?!1:!!e}Y()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const Xd=Bm.extendWith("group");function J1(e,t,n,o={}){var i,a,r;const{passive:s=!1,eventName:l,defaultValue:c}=o,d=Ta(),h=n||d?.emit||((i=d?.$emit)==null?void 0:i.bind(d))||((r=(a=d?.proxy)==null?void 0:a.$emit)==null?void 0:r.bind(d?.proxy)),u=t,p=()=>e[u]??c,m=g=>{if(!l)h(l||`update:${u.toString()}`,g);else for(const v of l)h(v,g)};if(s){const g=p(),v=ve(g);let f=!1;return Re(()=>e[u],y=>{f||(f=!0,v.value=y,Id(()=>{f=!1}))}),Re(v,y=>{!f&&y!==e[u]&&m(y)}),v}return F({get(){return p()},set(g){m(g)}})}function Q1(e,t){const n=F(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=Ky(e),i=J1(e,"modelValue",t,{defaultValue:o?.value??[],passive:e.modelValue===void 0,eventName:["valueChange","update:modelValue"]}),a=h=>i.value.some(u=>String(u)===String(h)),r=h=>{a(h)?l(h):s(h)},s=h=>{n.value&&(a(h)||(i.value=i.value.concat(h)))},l=h=>{n.value&&(i.value=i.value.filter(u=>String(u)!==String(h)))},c=h=>({checked:h.value!=null?a(h.value):void 0,onCheckedChange(){h.value!=null&&r(h.value)},name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid}),d=h=>{i.value=h};return F(()=>({isChecked:a,value:i.value,name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid,addValue:s,setValue:d,toggleValue:r,getItemProps:c}))}const[Hm,e_]=we("CheckboxGroupContext"),t_=P({__name:"checkbox-group",props:wn({defaultValue:{},modelValue:{},disabled:{type:Boolean},readOnly:{type:Boolean},name:{},invalid:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,readOnly:void 0,invalid:void 0}),emits:["valueChange","update:modelValue"],setup(e,{emit:t}){const n=Q1(e,t);return Hm(n),q(),(o,i)=>(C(),T(b(X).div,W({role:"group"},{...b(Xd).build().group.attrs},{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),n_=P({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return Hm(n),q(),(o,i)=>(C(),T(b(X).div,W({role:"group"},b(Xd).build().group.attrs,{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),o_=P({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Ra(),n=Qn();return q(),(o,i)=>{var a;return C(),T(b(X).input,W({"aria-describedby":(a=b(n))==null?void 0:a.ariaDescribedby},b(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),i_=P({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ra(),o=F(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return q(),(i,a)=>(C(),T(b(X).div,W(b(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),a_=P({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=Ra();return q(),(n,o)=>(C(),T(b(X).span,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),r_=P({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return Fm(n),q(),(o,i)=>(C(),T(b(X).label,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),s_=(e={},t)=>{const n=Yt(),o=Kt(Xt),i=_n(Cn),a=Qn(),r=e_(),s=F(()=>{const d=Me(e);return rl(d,r?.value.getItemProps({value:d.value})??{})}),l=F(()=>{const d=Me(s);return{id:n,ids:{label:a?.value.ids.label,hiddenInput:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Jn(d),onCheckedChange(h){var u;t?.("checkedChange",h),t?.("update:checked",h.checked),(u=d.onCheckedChange)==null||u.call(d,h)}}}),c=Dt(X1,l);return F(()=>K1(c,qt))},l_=P({__name:"checkbox-root",props:wn({checked:{},defaultChecked:{},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},{checked:void 0,defaultChecked:void 0,disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=s_(e,t);return Fm(n),q(),(o,i)=>(C(),T(b(X).label,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Lo=Object.freeze(Object.defineProperty({__proto__:null,Context:L1,Control:N1,Group:t_,GroupProvider:n_,HiddenInput:o_,Indicator:i_,Label:a_,Root:l_,RootProvider:r_},Symbol.toStringTag,{value:"Module"}));var c_=ie("clipboard").parts("root","control","trigger","indicator","input","label");c_.build();Y()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);Y()(["copied"]);var d_=Object.defineProperty,u_=(e,t,n)=>t in e?d_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t,n)=>u_(e,typeof t!="symbol"?t+"":t,n),Wr={itemToValue(e){return typeof e=="string"?e:fo(e)&&Nn(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:fo(e)&&Nn(e,"label")?e.label:Wr.itemToValue(e)},isItemDisabled(e){return fo(e)&&Nn(e,"disabled")?!!e.disabled:!1}},Mo=class jm{constructor(t){this.options=t,B(this,"items"),B(this,"indexMap",null),B(this,"copy",n=>new jm({...this.options,items:n??[...this.items]})),B(this,"isEqual",n=>Ne(this.items,n.items)),B(this,"setItems",n=>this.copy(n)),B(this,"getValues",(n=this.items)=>{const o=[];for(const i of n){const a=this.getItemValue(i);a!=null&&o.push(a)}return o}),B(this,"find",n=>{if(n==null)return null;const o=this.indexOf(n);return o!==-1?this.at(o):null}),B(this,"findMany",n=>{const o=[];for(const i of n){const a=this.find(i);a!=null&&o.push(a)}return o}),B(this,"at",n=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[n]??null;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){if(o===n)return r;o++}return null}),B(this,"sortFn",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return(i??0)-(a??0)}),B(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),B(this,"getItemValue",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToValue)==null?void 0:i.call(o,n))??Wr.itemToValue(n)}),B(this,"getItemDisabled",n=>{var o,i;return n==null?!1:((i=(o=this.options).isItemDisabled)==null?void 0:i.call(o,n))??Wr.isItemDisabled(n)}),B(this,"stringifyItem",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToString)==null?void 0:i.call(o,n))??Wr.itemToString(n)}),B(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),B(this,"stringifyItems",(n,o=", ")=>{const i=[];for(const a of n){const r=this.stringifyItem(a);r!=null&&i.push(r)}return i.join(o)}),B(this,"stringifyMany",(n,o)=>this.stringifyItems(this.findMany(n),o)),B(this,"has",n=>this.indexOf(n)!==-1),B(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),B(this,"group",()=>{const{groupBy:n,groupSort:o}=this.options;if(!n)return[["",[...this.items]]];const i=new Map;this.items.forEach((r,s)=>{const l=n(r,s);i.has(l)||i.set(l,[]),i.get(l).push(r)});let a=Array.from(i.entries());return o&&a.sort(([r],[s])=>{if(typeof o=="function")return o(r,s);if(Array.isArray(o)){const l=o.indexOf(r),c=o.indexOf(s);return l===-1?1:c===-1?-1:l-c}return o==="asc"?r.localeCompare(s):o==="desc"?s.localeCompare(r):0}),a}),B(this,"getNextValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.min(a+o,this.size-1):a+o;a<=this.size&&this.getItemDisabled(this.at(a));)a++;return this.getItemValue(this.at(a))}),B(this,"getPreviousValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.max(a-o,0):a-o;a>=0&&this.getItemDisabled(this.at(a));)a--;return this.getItemValue(this.at(a))}),B(this,"indexOf",n=>{if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(o=>this.getItemValue(o)===n);if(!this.indexMap){this.indexMap=new Map;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){const s=this.getItemValue(r);s!=null&&this.indexMap.set(s,o),o++}}return this.indexMap.get(n)??-1}),B(this,"getByText",(n,o)=>{const i=o!=null?this.indexOf(o):-1,a=n.length===1;for(let r=0;r<this.items.length;r++){const s=this.items[(i+r+1)%this.items.length];if(!(a&&this.getItemValue(s)===o)&&!this.getItemDisabled(s)&&h_(this.stringifyItem(s),n))return s}}),B(this,"search",(n,o)=>{const{state:i,currentValue:a,timeout:r=350}=o,s=i.keysSoFar+n,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s,c=this.getByText(l,a),d=this.getItemValue(c);function h(){clearTimeout(i.timer),i.timer=-1}function u(p){i.keysSoFar=p,h(),p!==""&&(i.timer=+setTimeout(()=>{u(""),h()},r))}return u(s),d}),B(this,"update",(n,o)=>{let i=this.indexOf(n);return i===-1?this:this.copy([...this.items.slice(0,i),o,...this.items.slice(i+1)])}),B(this,"upsert",(n,o,i="append")=>{let a=this.indexOf(n);return a===-1?(i==="append"?this.append:this.prepend)(o):this.copy([...this.items.slice(0,a),o,...this.items.slice(a+1)])}),B(this,"insert",(n,...o)=>this.copy(Vi(this.items,n,...o))),B(this,"insertBefore",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(Vi(this.items,i,...o))}),B(this,"insertAfter",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(Vi(this.items,i+1,...o))}),B(this,"prepend",(...n)=>this.copy(Vi(this.items,0,...n))),B(this,"append",(...n)=>this.copy(Vi(this.items,this.items.length,...n))),B(this,"filter",n=>{const o=this.items.filter((i,a)=>n(this.stringifyItem(i),a,i));return this.copy(o)}),B(this,"remove",(...n)=>{const o=n.map(i=>typeof i=="string"?i:this.getItemValue(i));return this.copy(this.items.filter(i=>{const a=this.getItemValue(i);return a==null?!1:!o.includes(a)}))}),B(this,"move",(n,o)=>{const i=this.indexOf(n);return i===-1?this:this.copy(nr(this.items,[i],o))}),B(this,"moveBefore",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(nr(this.items,a,i))}),B(this,"moveAfter",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(nr(this.items,a,i+1))}),B(this,"reorder",(n,o)=>this.copy(nr(this.items,[n],o))),B(this,"compareValue",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return i<a?-1:i>a?1:0}),B(this,"range",(n,o)=>{let i=[],a=n;for(;a!=null;){if(this.find(a)&&i.push(a),a===o)return i;a=this.getNextValue(a)}return[]}),B(this,"getValueRange",(n,o)=>n&&o?this.compareValue(n,o)<=0?this.range(n,o):this.range(o,n):[]),B(this,"toString",()=>{let n="";for(const o of this.items){const i=this.getItemValue(o),a=this.stringifyItem(o),r=this.getItemDisabled(o),s=[i,a,r].filter(Boolean).join(":");n+=s+","}return n}),B(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*this.items}},h_=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function Vi(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function nr(e,t,n){t=[...t].sort((i,a)=>i-a);const o=t.map(i=>e[i]);for(let i=t.length-1;i>=0;i--)e=[...e.slice(0,t[i]),...e.slice(t[i]+1)];return n=Math.max(0,n-t.filter(i=>i<n).length),[...e.slice(0,n),...o,...e.slice(n)]}var p_=class Gr extends Set{constructor(t=[]){super(t),B(this,"selectionMode","single"),B(this,"deselectable",!0),B(this,"copy",()=>{const n=new Gr([...this]);return this.sync(n)}),B(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),B(this,"isEmpty",()=>this.size===0),B(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),B(this,"canSelect",(n,o)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(o))),B(this,"firstSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)<0)&&(o=i);return o}),B(this,"lastSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)>0)&&(o=i);return o}),B(this,"extendSelection",(n,o,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,i);const a=this.copy(),r=Array.from(this).pop();for(let s of n.getValueRange(o,r??i))a.delete(s);for(let s of n.getValueRange(i,o))this.canSelect(n,s)&&a.add(s);return a}),B(this,"toggleSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(o))return this.replaceSelection(n,o);const i=this.copy();return i.has(o)?i.delete(o):i.canSelect(n,o)&&i.add(o),i}),B(this,"replaceSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(o==null)return this;if(!this.canSelect(n,o))return this;const i=new Gr([o]);return this.sync(i)}),B(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new Gr;for(let i of n)if(i!=null&&(o.add(i),this.selectionMode==="single"))break;return this.sync(o)}),B(this,"clearSelection",()=>{const n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),B(this,"select",(n,o,i)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(o)&&this.deselectable?this.toggleSelection(n,o):this.replaceSelection(n,o):this.selectionMode==="multiple"||i?this.toggleSelection(n,o):this.replaceSelection(n,o)),B(this,"deselect",n=>{const o=this.copy();return o.delete(n),o}),B(this,"isEqual",n=>Ne(Array.from(this),Array.from(n)))}};function Wm(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function g_(e){const t=f_(e),n=[],o=new Set;for(const i of t){const a=i.join();o.has(a)||(o.add(a),n.push(i))}return n}function Gm(e,t){for(let n=0;n<Math.min(e.length,t.length);n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length-t.length}function f_(e){return e.sort(Gm)}function m_(e,t){let n;return it(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function v_(e,t){const n=[];return it(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function wh(e,t){let n;return it(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function b_(e,t){let n=t.initialResult;return it(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function y_(e,t){return b_(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function x_(e,t){const{predicate:n,create:o,getChildren:i}=t,a=(r,s)=>{const l=i(r,s),c=[];l.forEach((p,m)=>{const g=[...s,m],v=a(p,g);v&&c.push(v)});const d=s.length===0,h=n(r,s),u=c.length>0;return d||h||u?o(r,c,s):null};return a(e,[])||o(e,[],[])}function w_(e,t){const n=[];let o=0;const i=new Map,a=new Map;return it(e,{getChildren:t.getChildren,onEnter:(r,s)=>{i.has(r)||i.set(r,o++);const l=t.getChildren(r,s);l.forEach(p=>{a.has(p)||a.set(p,r),i.has(p)||i.set(p,o++)});const c=l.length>0?l.map(p=>i.get(p)):void 0,d=a.get(r),h=d?i.get(d):void 0,u=i.get(r);n.push({...r,_children:c,_parent:h,_index:u})}}),n}function C_(e,t){return{type:"insert",index:e,nodes:t}}function __(e){return{type:"remove",indexes:e}}function Zd(){return{type:"replace"}}function Um(e){return[e.slice(0,-1),e[e.length-1]]}function Ym(e,t,n=new Map){var o;const[i,a]=Um(e);for(let s=i.length-1;s>=0;s--){const l=i.slice(0,s).join();switch((o=n.get(l))==null?void 0:o.type){case"remove":continue}n.set(l,Zd())}const r=n.get(i.join());switch(r?.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:r.indexes,insertIndex:a,insertNodes:t});break;default:n.set(i.join(),C_(a,t))}return n}function qm(e){const t=new Map,n=new Map;for(const o of e){const i=o.slice(0,-1).join(),a=n.get(i)??[];a.push(o[o.length-1]),n.set(i,a.sort((r,s)=>r-s))}for(const o of e)for(let i=o.length-2;i>=0;i--){const a=o.slice(0,i).join();t.has(a)||t.set(a,Zd())}for(const[o,i]of n)t.set(o,__(i));return t}function k_(e,t){const n=new Map,[o,i]=Um(e);for(let a=o.length-1;a>=0;a--){const r=o.slice(0,a).join();n.set(r,Zd())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function hl(e,t,n){return S_(e,{...n,getChildren:(o,i)=>{const a=i.join(),r=t.get(a);switch(r?.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(o,i);default:return[]}},transform:(o,i,a)=>{const r=a.join(),s=t.get(r);switch(s?.type){case"remove":return n.create(o,i.filter((d,h)=>!s.indexes.includes(h)),a);case"removeThenInsert":const l=i.filter((d,h)=>!s.removeIndexes.includes(h)),c=s.removeIndexes.reduce((d,h)=>h<d?d-1:d,s.insertIndex);return n.create(o,Ch(l,c,0,...s.insertNodes),a);case"insert":return n.create(o,Ch(i,s.index,0,...s.nodes),a);case"replace":return n.create(o,i,a);default:return o}}})}function Ch(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function S_(e,t){const n={};return it(e,{...t,onLeave:(o,i)=>{const a=[0,...i],r=a.join(),s=t.transform(o,n[r]??[],i),l=a.slice(0,-1).join(),c=n[l]??[];c.push(s),n[l]=c}}),n[""][0]}function E_(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Ym(o,n);return hl(e,i,t)}function O_(e,t){if(t.at.length===0)return t.node;const n=k_(t.at,t.node);return hl(e,n,t)}function $_(e,t){if(t.indexPaths.length===0)return e;for(const o of t.indexPaths)if(o.length===0)throw new Error("Can't remove the root node");const n=qm(t.indexPaths);return hl(e,n,t)}function I_(e,t){if(t.indexPaths.length===0)return e;for(const a of t.indexPaths)if(a.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");const n=g_(t.indexPaths),o=n.map(a=>Wm(e,a,t)),i=Ym(t.to,o,qm(n));return hl(e,i,t)}function it(e,t){const{onEnter:n,onLeave:o,getChildren:i}=t;let a=[],r=[{node:e}];const s=t.reuseIndexPath?()=>a:()=>a.slice();for(;r.length>0;){let l=r[r.length-1];if(l.state===void 0){const d=n?.(l.node,s());if(d==="stop")return;l.state=d==="skip"?-1:0}const c=l.children||i(l.node,s());if(l.children||(l.children=c),l.state!==-1){if(l.state<c.length){let d=l.state;a.push(d),r.push({node:c[d]}),l.state=d+1;continue}if(o?.(l.node,s())==="stop")return}a.pop(),r.pop()}}var Jd=class Km{constructor(t){this.options=t,B(this,"rootNode"),B(this,"isEqual",n=>Ne(this.rootNode,n.rootNode)),B(this,"getNodeChildren",n=>{var o,i;return((i=(o=this.options).nodeToChildren)==null?void 0:i.call(o,n))??Yo.nodeToChildren(n)??[]}),B(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),B(this,"resolveNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(o):void 0}),B(this,"getNodeChildrenCount",n=>{var o,i;return((i=(o=this.options).nodeToChildrenCount)==null?void 0:i.call(o,n))??Yo.nodeToChildrenCount(n)}),B(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??Yo.nodeToValue(n)}),B(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??Yo.isNodeDisabled(n)}),B(this,"stringify",n=>{const o=this.findNode(n);return o?this.stringifyNode(o):null}),B(this,"stringifyNode",n=>{var o,i;return((i=(o=this.options).nodeToString)==null?void 0:i.call(o,n))??Yo.nodeToString(n)}),B(this,"getFirstNode",(n=this.rootNode)=>{let o;return it(n,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(!o&&a.length>0&&!this.getNodeDisabled(i))return o=i,"stop"}}),o}),B(this,"getLastNode",(n=this.rootNode,o={})=>{let i;return it(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isSameNode(a,n)){if((s=o.skip)!=null&&s.call(o,{value:this.getNodeValue(a),node:a,indexPath:r}))return"skip";r.length>0&&!this.getNodeDisabled(a)&&(i=a)}}}),i}),B(this,"at",n=>Wm(this.rootNode,n,{getChildren:this.getNodeChildren})),B(this,"findNode",(n,o=this.rootNode)=>m_(o,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),B(this,"findNodes",(n,o=this.rootNode)=>{const i=new Set(n.filter(a=>a!=null));return v_(o,{getChildren:this.getNodeChildren,predicate:a=>i.has(this.getNodeValue(a))})}),B(this,"sort",n=>n.reduce((o,i)=>{const a=this.getIndexPath(i);return a&&o.push({value:i,indexPath:a}),o},[]).sort((o,i)=>Gm(o.indexPath,i.indexPath)).map(({value:o})=>o)),B(this,"getIndexPath",n=>wh(this.rootNode,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===n})),B(this,"getValue",n=>{const o=this.at(n);return o?this.getNodeValue(o):void 0}),B(this,"getValuePath",n=>{if(!n)return[];const o=[];let i=[...n];for(;i.length>0;){const a=this.at(i);a&&o.unshift(this.getNodeValue(a)),i.pop()}return o}),B(this,"getDepth",n=>{const o=wh(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n});return o?.length??0}),B(this,"isSameNode",(n,o)=>this.getNodeValue(n)===this.getNodeValue(o)),B(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),B(this,"contains",(n,o)=>!n||!o?!1:o.slice(0,n.length).every((i,a)=>n[a]===o[a])),B(this,"getNextNode",(n,o={})=>{let i=!1,a;return it(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return c===n&&(i=!0),"skip";if(i&&!this.getNodeDisabled(r))return a=r,"stop";c===n&&(i=!0)}}),a}),B(this,"getPreviousNode",(n,o={})=>{let i,a=!1;return it(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return"skip";if(c===n)return a=!0,"stop";this.getNodeDisabled(r)||(i=r)}}),a?i:void 0}),B(this,"getParentNodes",n=>{var o;const i=(o=this.resolveIndexPath(n))==null?void 0:o.slice();if(!i)return[];const a=[];for(;i.length>0;){i.pop();const r=this.at(i);r&&!this.isRootNode(r)&&a.unshift(r)}return a}),B(this,"getDescendantNodes",(n,o)=>{const i=this.resolveNode(n);if(!i)return[];const a=[];return it(i,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{s.length!==0&&(!(o!=null&&o.withBranch)&&this.isBranchNode(r)||a.push(r))}}),a}),B(this,"getDescendantValues",(n,o)=>this.getDescendantNodes(n,o).map(i=>this.getNodeValue(i))),B(this,"getParentIndexPath",n=>n.slice(0,-1)),B(this,"getParentNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(this.getParentIndexPath(o)):void 0}),B(this,"visit",n=>{const{skip:o,...i}=n;it(this.rootNode,{...i,getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isRootNode(a))return o!=null&&o({value:this.getNodeValue(a),node:a,indexPath:r})?"skip":(s=i.onEnter)==null?void 0:s.call(i,a,r)}})}),B(this,"getPreviousSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;--a>=0;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),B(this,"getNextSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;++a<i.length;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),B(this,"getSiblingNodes",n=>{const o=this.getParentNode(n);return o?this.getNodeChildren(o):[]}),B(this,"getValues",(n=this.rootNode)=>y_(n,{getChildren:this.getNodeChildren,transform:o=>[this.getNodeValue(o)]}).slice(1)),B(this,"isValidDepth",(n,o)=>o==null?!0:typeof o=="function"?o(n.length):n.length===o),B(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),B(this,"getBranchValues",(n=this.rootNode,o={})=>{let i=[];return it(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(r.length===0)return;const l=this.getNodeValue(a);if((s=o.skip)!=null&&s.call(o,{value:l,node:a,indexPath:r}))return"skip";this.isBranchNode(a)&&this.isValidDepth(r,o.depth)&&i.push(this.getNodeValue(a))}}),i}),B(this,"flatten",(n=this.rootNode)=>w_(n,{getChildren:this.getNodeChildren})),B(this,"_create",(n,o)=>this.getNodeChildren(n).length>0||o.length>0?{...n,children:o}:{...n}),B(this,"_insert",(n,o,i)=>this.copy(E_(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"copy",n=>new Km({...this.options,rootNode:n})),B(this,"_replace",(n,o,i)=>this.copy(O_(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_move",(n,o,i)=>this.copy(I_(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_remove",(n,o)=>this.copy($_(n,{indexPaths:o,getChildren:this.getNodeChildren,create:this._create}))),B(this,"replace",(n,o)=>this._replace(this.rootNode,n,o)),B(this,"remove",n=>this._remove(this.rootNode,n)),B(this,"insertBefore",(n,o)=>this.getParentNode(n)?this._insert(this.rootNode,n,o):void 0),B(this,"insertAfter",(n,o)=>{if(!this.getParentNode(n))return;const i=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,i,o)}),B(this,"move",(n,o)=>this._move(this.rootNode,n,o)),B(this,"filter",n=>{const o=x_(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(o)}),B(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},Yo={nodeToValue(e){return typeof e=="string"?e:fo(e)&&Nn(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:fo(e)&&Nn(e,"label")?e.label:Yo.nodeToValue(e)},isNodeDisabled(e){return fo(e)&&Nn(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(fo(e)&&Nn(e,"childrenCount"))return e.childrenCount}};const T_=e=>new Mo(e),_h=e=>new Jd(e);var P_=Object.defineProperty,V_=(e,t,n)=>t in e?P_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>V_(e,t+"",n),D_=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},eu=class{toHexInt(){return this.toFormat("rgba").toHexInt()}getChannelValue(t){if(t in this)return this[t];throw new Error("Unsupported color channel: "+t)}getChannelValuePercent(t,n){const o=n??this.getChannelValue(t),{minValue:i,maxValue:a}=this.getChannelRange(t);return Ow(o,i,a)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=$w(n,o,i,a);return Xu(r,o,i,a)}withChannelValue(t,n){const{minValue:o,maxValue:i}=this.getChannelRange(t);if(t in this){let a=this.clone();return a[t]=Le(n,o,i),a}throw new Error("Unsupported color channel: "+t)}getColorAxes(t){let{xChannel:n,yChannel:o}=t,i=n||this.getChannels().find(s=>s!==o),a=o||this.getChannels().find(s=>s!==i),r=this.getChannels().find(s=>s!==i&&s!==a);return{xChannel:i,yChannel:a,zChannel:r}}incrementChannel(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=Xu(Le(this.getChannelValue(t)+n,o,i),o,i,a);return this.withChannelValue(t,r)}decrementChannel(t,n){return this.incrementChannel(t,-n)}isEqual(t){return D_(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},M_=/^#[\da-f]+$/i,R_=/^rgba?\((.*)\)$/,F_=/[^#]/gi,Xm=class Ur extends eu{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(M_.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(F_,"$&$&"):t).slice(1).split("");for(;i.length>0;)n.push(parseInt(i.splice(0,2).join(""),16));n[3]=n[3]!==void 0?n[3]/255:void 0}const o=t.match(R_);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,a)=>Le(i,0,a<3?255:1))),n.length<3?void 0:new Ur(n[0],n[1],n[2],n[3]??1)}toString(t){switch(t){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"hsb":return this.toHSB().toString("hsb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"rgba":return this;case"hsba":return this.toHSB();case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+t)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=a-i,s=a===0?0:r/a;let l=0;if(r!==0){switch(a){case t:l=(n-o)/r+(n<o?6:0);break;case n:l=(o-t)/r+2;break;case o:l=(t-n)/r+4;break}l/=6}return new ou(fe(l*360,2),fe(s*100,2),fe(a*100,2),fe(this.alpha,2))}toHSL(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=(a+i)/2,s=a-i;let l=-1,c=-1;if(s===0)l=c=0;else{switch(c=s/(r<.5?a+i:2-a-i),a){case t:l=(n-o)/s+(n<o?6:0);break;case n:l=(o-t)/s+2;break;case o:l=(t-n)/s+4;break}l/=6}return new nu(fe(l*360,2),fe(c*100,2),fe(r*100,2),fe(this.alpha,2))}clone(){return new Ur(this.red,this.green,this.blue,this.alpha)}getChannelFormatOptions(t){switch(t){case"red":case"green":case"blue":return{style:"decimal"};case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{r:this.red,g:this.green,b:this.blue,a:this.alpha}}getFormat(){return"rgba"}getChannels(){return Ur.colorChannels}};Qd(Xm,"colorChannels",["red","green","blue"]);var tu=Xm,A_=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Zm=class Yr extends eu{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.lightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(A_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new Yr(bm(o,360),Le(i,0,100),Le(a,0,100),Le(r??1,0,1))}}toString(t){switch(t){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.lightness,2)}%, ${this.alpha})`;case"hsb":return this.toHSB().toString("hsb");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsla":return this;case"hsba":return this.toHSB();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+t)}}toHSB(){let t=this.saturation/100,n=this.lightness/100,o=n+t*Math.min(n,1-n);return t=o===0?0:2*(1-n/o),new ou(fe(this.hue,2),fe(t*100,2),fe(o*100,2),fe(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.lightness/100,i=n*Math.min(o,1-o),a=(r,s=(r+t/30)%12)=>o-i*Math.max(Math.min(s-3,9-s,1),-1);return new tu(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),fe(this.alpha,2))}clone(){return new Yr(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="lightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return"hsla"}getChannels(){return Yr.colorChannels}};Qd(Zm,"colorChannels",["hue","saturation","lightness"]);var nu=Zm,L_=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Jm=class qr extends eu{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.brightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(L_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new qr(bm(o,360),Le(i,0,100),Le(a,0,100),Le(r??1,0,1))}}toString(t){switch(t){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${fe(this.saturation,2)}%, ${fe(this.brightness,2)}%, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsba":return this;case"hsla":return this.toHSL();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+t)}}toHSL(){let t=this.saturation/100,n=this.brightness/100,o=n*(1-t/2);return t=o===0||o===1?0:(n-o)/Math.min(o,1-o),new nu(fe(this.hue,2),fe(t*100,2),fe(o*100,2),fe(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.brightness/100,i=(a,r=(a+t/60)%6)=>o-n*o*Math.max(Math.min(r,4-r,1),0);return new tu(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),fe(this.alpha,2))}clone(){return new qr(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="brightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return"hsba"}getChannels(){return qr.colorChannels}};Qd(Jm,"colorChannels",["hue","saturation","brightness"]);var ou=Jm,N_="aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32",B_=e=>{const t=new Map,n=e.split(",");for(let o=0;o<n.length;o++){const[i,a]=n[o].split(":");t.set(i,`#${a}`),i.includes("gray")&&t.set(i.replace("gray","grey"),`#${a}`)}return t},kh=B_(N_),ks=e=>{var t;if(kh.has(e))return ks(kh.get(e));const n=tu.parse(e)||ou.parse(e)||nu.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,ks),o}return n};const z_=["top","right","bottom","left"],Un=Math.min,at=Math.max,Ss=Math.round,or=Math.floor,Gt=e=>({x:e,y:e}),H_={left:"right",right:"left",bottom:"top",top:"bottom"},j_={start:"end",end:"start"};function Nc(e,t,n){return at(e,Un(t,n))}function yn(e,t){return typeof e=="function"?e(t):e}function xn(e){return e.split("-")[0]}function wi(e){return e.split("-")[1]}function iu(e){return e==="x"?"y":"x"}function au(e){return e==="y"?"height":"width"}const W_=new Set(["top","bottom"]);function jt(e){return W_.has(xn(e))?"y":"x"}function ru(e){return iu(jt(e))}function G_(e,t,n){n===void 0&&(n=!1);const o=wi(e),i=ru(e),a=au(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=Es(r)),[r,Es(r)]}function U_(e){const t=Es(e);return[Bc(e),t,Bc(t)]}function Bc(e){return e.replace(/start|end/g,t=>j_[t])}const Sh=["left","right"],Eh=["right","left"],Y_=["top","bottom"],q_=["bottom","top"];function K_(e,t,n){switch(e){case"top":case"bottom":return n?t?Eh:Sh:t?Sh:Eh;case"left":case"right":return t?Y_:q_;default:return[]}}function X_(e,t,n,o){const i=wi(e);let a=K_(xn(e),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),t&&(a=a.concat(a.map(Bc)))),a}function Es(e){return e.replace(/left|right|bottom|top/g,t=>H_[t])}function Z_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qm(e){return typeof e!="number"?Z_(e):{top:e,right:e,bottom:e,left:e}}function Os(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Oh(e,t,n){let{reference:o,floating:i}=e;const a=jt(t),r=ru(t),s=au(r),l=xn(t),c=a==="y",d=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,u=o[s]/2-i[s]/2;let p;switch(l){case"top":p={x:d,y:o.y-i.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:h};break;case"left":p={x:o.x-i.width,y:h};break;default:p={x:o.x,y:o.y}}switch(wi(t)){case"start":p[r]-=u*(n&&c?-1:1);break;case"end":p[r]+=u*(n&&c?-1:1);break}return p}const J_=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:r}=n,s=a.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=Oh(c,o,l),u=o,p={},m=0;for(let g=0;g<s.length;g++){const{name:v,fn:f}=s[g],{x:y,y:x,data:w,reset:k}=await f({x:d,y:h,initialPlacement:o,placement:u,strategy:i,middlewareData:p,rects:c,platform:r,elements:{reference:e,floating:t}});d=y??d,h=x??h,p={...p,[v]:{...p[v],...w}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(u=k.placement),k.rects&&(c=k.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:d,y:h}=Oh(c,u,l)),g=-1)}return{x:d,y:h,placement:u,strategy:i,middlewareData:p}};async function _a(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:r,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=yn(t,e),m=Qm(p),g=s[u?h==="floating"?"reference":"floating":h],v=Os(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),f=h==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},w=Os(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:f,offsetParent:y,strategy:l}):f);return{top:(v.top-w.top+m.top)/x.y,bottom:(w.bottom-v.bottom+m.bottom)/x.y,left:(v.left-w.left+m.left)/x.x,right:(w.right-v.right+m.right)/x.x}}const Q_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:r,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=yn(e,t)||{};if(c==null)return{};const h=Qm(d),u={x:n,y:o},p=ru(i),m=au(p),g=await r.getDimensions(c),v=p==="y",f=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-u[p]-a.floating[m],k=u[p]-a.reference[p],S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let O=S?S[x]:0;(!O||!await(r.isElement==null?void 0:r.isElement(S)))&&(O=s.floating[x]||a.floating[m]);const _=w/2-k/2,E=O/2-g[m]/2-1,V=Un(h[f],E),$=Un(h[y],E),R=V,K=O-g[m]-$,D=O/2-g[m]/2+_,M=Nc(R,D,K),A=!l.arrow&&wi(i)!=null&&D!==M&&a.reference[m]/2-(D<R?V:$)-g[m]/2<0,U=A?D<R?D-R:D-K:0;return{[p]:u[p]+U,data:{[p]:M,centerOffset:D-M-U,...A&&{alignmentOffset:U}},reset:A}}}),ek=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:r,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...v}=yn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const f=xn(i),y=jt(s),x=xn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=u||(x||!g?[Es(s)]:U_(s)),S=m!=="none";!u&&S&&k.push(...X_(s,g,m,w));const O=[s,...k],_=await _a(t,v),E=[];let V=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&E.push(_[f]),h){const D=G_(i,r,w);E.push(_[D[0]],_[D[1]])}if(V=[...V,{placement:i,overflows:E}],!E.every(D=>D<=0)){var $,R;const D=((($=a.flip)==null?void 0:$.index)||0)+1,M=O[D];if(M&&(!(h==="alignment"&&y!==jt(M))||V.every(U=>jt(U.placement)===y?U.overflows[0]>0:!0)))return{data:{index:D,overflows:V},reset:{placement:M}};let A=(R=V.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:R.placement;if(!A)switch(p){case"bestFit":{var K;const U=(K=V.filter(G=>{if(S){const ee=jt(G.placement);return ee===y||ee==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(ee=>ee>0).reduce((ee,te)=>ee+te,0)]).sort((G,ee)=>G[1]-ee[1])[0])==null?void 0:K[0];U&&(A=U);break}case"initialPlacement":A=s;break}if(i!==A)return{reset:{placement:A}}}return{}}}};function $h(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ih(e){return z_.some(t=>e[t]>=0)}const tk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=yn(e,t);switch(o){case"referenceHidden":{const a=await _a(t,{...i,elementContext:"reference"}),r=$h(a,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ih(r)}}}case"escaped":{const a=await _a(t,{...i,altBoundary:!0}),r=$h(a,n.floating);return{data:{escapedOffsets:r,escaped:Ih(r)}}}default:return{}}}}},ev=new Set(["left","top"]);async function nk(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=xn(n),s=wi(n),l=jt(n)==="y",c=ev.has(r)?-1:1,d=a&&l?-1:1,h=yn(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}const ok=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:r,middlewareData:s}=t,l=await nk(t,e);return r===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:r}}}}},ik=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:a=!0,crossAxis:r=!1,limiter:s={fn:v=>{let{x:f,y}=v;return{x:f,y}}},...l}=yn(e,t),c={x:n,y:o},d=await _a(t,l),h=jt(xn(i)),u=iu(h);let p=c[u],m=c[h];if(a){const v=u==="y"?"top":"left",f=u==="y"?"bottom":"right",y=p+d[v],x=p-d[f];p=Nc(y,p,x)}if(r){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",y=m+d[v],x=m-d[f];m=Nc(y,m,x)}const g=s.fn({...t,[u]:p,[h]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[u]:a,[h]:r}}}}}},ak=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:r}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=yn(e,t),d={x:n,y:o},h=jt(i),u=iu(h);let p=d[u],m=d[h];const g=yn(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=u==="y"?"height":"width",w=a.reference[u]-a.floating[x]+v.mainAxis,k=a.reference[u]+a.reference[x]-v.mainAxis;p<w?p=w:p>k&&(p=k)}if(c){var f,y;const x=u==="y"?"width":"height",w=ev.has(xn(i)),k=a.reference[h]-a.floating[x]+(w&&((f=r.offset)==null?void 0:f[h])||0)+(w?0:v.crossAxis),S=a.reference[h]+a.reference[x]+(w?0:((y=r.offset)==null?void 0:y[h])||0)-(w?v.crossAxis:0);m<k?m=k:m>S&&(m=S)}return{[u]:p,[h]:m}}}},rk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:r,elements:s}=t,{apply:l=()=>{},...c}=yn(e,t),d=await _a(t,c),h=xn(i),u=wi(i),p=jt(i)==="y",{width:m,height:g}=a.floating;let v,f;h==="top"||h==="bottom"?(v=h,f=u===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(f=h,v=u==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=m-d.left-d.right,w=Un(g-d[v],y),k=Un(m-d[f],x),S=!t.middlewareData.shift;let O=w,_=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(O=y),S&&!u){const V=at(d.left,0),$=at(d.right,0),R=at(d.top,0),K=at(d.bottom,0);p?_=m-2*(V!==0||$!==0?V+$:at(d.left,d.right)):O=g-2*(R!==0||K!==0?R+K:at(d.top,d.bottom))}await l({...t,availableWidth:_,availableHeight:O});const E=await r.getDimensions(s.floating);return m!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function pl(){return typeof window<"u"}function Ci(e){return tv(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zt(e){var t;return(t=(tv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tv(e){return pl()?e instanceof Node||e instanceof st(e).Node:!1}function Pt(e){return pl()?e instanceof Element||e instanceof st(e).Element:!1}function Ut(e){return pl()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function Th(e){return!pl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}const sk=new Set(["inline","contents"]);function Fa(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!sk.has(i)}const lk=new Set(["table","td","th"]);function ck(e){return lk.has(Ci(e))}const dk=[":popover-open",":modal"];function gl(e){return dk.some(t=>{try{return e.matches(t)}catch{return!1}})}const uk=["transform","translate","scale","rotate","perspective"],hk=["transform","translate","scale","rotate","perspective","filter"],pk=["paint","layout","strict","content"];function su(e){const t=lu(),n=Pt(e)?Vt(e):e;return uk.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||hk.some(o=>(n.willChange||"").includes(o))||pk.some(o=>(n.contain||"").includes(o))}function gk(e){let t=Yn(e);for(;Ut(t)&&!hi(t);){if(su(t))return t;if(gl(t))return null;t=Yn(t)}return null}function lu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fk=new Set(["html","body","#document"]);function hi(e){return fk.has(Ci(e))}function Vt(e){return st(e).getComputedStyle(e)}function fl(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(Ci(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Th(e)&&e.host||Zt(e);return Th(t)?t.host:t}function nv(e){const t=Yn(e);return hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ut(t)&&Fa(t)?t:nv(t)}function ka(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=nv(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=st(i);if(a){const s=zc(r);return t.concat(r,r.visualViewport||[],Fa(i)?i:[],s&&n?ka(s):[])}return t.concat(i,ka(i,[],n))}function zc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ov(e){const t=Vt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Ut(e),a=i?e.offsetWidth:n,r=i?e.offsetHeight:o,s=Ss(n)!==a||Ss(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function cu(e){return Pt(e)?e:e.contextElement}function ai(e){const t=cu(e);if(!Ut(t))return Gt(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=ov(t);let r=(a?Ss(n.width):n.width)/o,s=(a?Ss(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const mk=Gt(0);function iv(e){const t=st(e);return!lu()||!t.visualViewport?mk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function Oo(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=cu(e);let r=Gt(1);t&&(o?Pt(o)&&(r=ai(o)):r=ai(e));const s=vk(a,n,o)?iv(a):Gt(0);let l=(i.left+s.x)/r.x,c=(i.top+s.y)/r.y,d=i.width/r.x,h=i.height/r.y;if(a){const u=st(a),p=o&&Pt(o)?st(o):o;let m=u,g=zc(m);for(;g&&o&&p!==m;){const v=ai(g),f=g.getBoundingClientRect(),y=Vt(g),x=f.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,w=f.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,h*=v.y,l+=x,c+=w,m=st(g),g=zc(m)}}return Os({width:d,height:h,x:l,y:c})}function ml(e,t){const n=fl(e).scrollLeft;return t?t.left+n:Oo(Zt(e)).left+n}function av(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-ml(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function bk(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",r=Zt(o),s=t?gl(t.floating):!1;if(o===r||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Gt(1);const d=Gt(0),h=Ut(o);if((h||!h&&!a)&&((Ci(o)!=="body"||Fa(r))&&(l=fl(o)),Ut(o))){const p=Oo(o);c=ai(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const u=r&&!h&&!a?av(r,l):Gt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+u.x,y:n.y*c.y-l.scrollTop*c.y+d.y+u.y}}function yk(e){return Array.from(e.getClientRects())}function xk(e){const t=Zt(e),n=fl(e),o=e.ownerDocument.body,i=at(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=at(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ml(e);const s=-n.scrollTop;return Vt(o).direction==="rtl"&&(r+=at(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Ph=25;function wk(e,t){const n=st(e),o=Zt(e),i=n.visualViewport;let a=o.clientWidth,r=o.clientHeight,s=0,l=0;if(i){a=i.width,r=i.height;const d=lu();(!d||d&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=ml(o);if(c<=0){const d=o.ownerDocument,h=d.body,u=getComputedStyle(h),p=d.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,m=Math.abs(o.clientWidth-h.clientWidth-p);m<=Ph&&(a-=m)}else c<=Ph&&(a+=c);return{width:a,height:r,x:s,y:l}}const Ck=new Set(["absolute","fixed"]);function _k(e,t){const n=Oo(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ut(e)?ai(e):Gt(1),r=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=o*a.y;return{width:r,height:s,x:l,y:c}}function Vh(e,t,n){let o;if(t==="viewport")o=wk(e,n);else if(t==="document")o=xk(Zt(e));else if(Pt(t))o=_k(t,n);else{const i=iv(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Os(o)}function rv(e,t){const n=Yn(e);return n===t||!Pt(n)||hi(n)?!1:Vt(n).position==="fixed"||rv(n,t)}function kk(e,t){const n=t.get(e);if(n)return n;let o=ka(e,[],!1).filter(s=>Pt(s)&&Ci(s)!=="body"),i=null;const a=Vt(e).position==="fixed";let r=a?Yn(e):e;for(;Pt(r)&&!hi(r);){const s=Vt(r),l=su(r);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&i&&Ck.has(i.position)||Fa(r)&&!l&&rv(e,r))?o=o.filter(c=>c!==r):i=s,r=Yn(r)}return t.set(e,o),o}function Sk(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?gl(t)?[]:kk(t,this._c):[].concat(n),o],r=a[0],s=a.reduce((l,c)=>{const d=Vh(t,c,i);return l.top=at(d.top,l.top),l.right=Un(d.right,l.right),l.bottom=Un(d.bottom,l.bottom),l.left=at(d.left,l.left),l},Vh(t,r,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ek(e){const{width:t,height:n}=ov(e);return{width:t,height:n}}function Ok(e,t,n){const o=Ut(t),i=Zt(t),a=n==="fixed",r=Oo(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Gt(0);function c(){l.x=ml(i)}if(o||!o&&!a)if((Ci(t)!=="body"||Fa(i))&&(s=fl(t)),o){const p=Oo(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();a&&!o&&i&&c();const d=i&&!o&&!a?av(i,s):Gt(0),h=r.left+s.scrollLeft-l.x-d.x,u=r.top+s.scrollTop-l.y-d.y;return{x:h,y:u,width:r.width,height:r.height}}function jl(e){return Vt(e).position==="static"}function Dh(e,t){if(!Ut(e)||Vt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zt(e)===n&&(n=n.ownerDocument.body),n}function sv(e,t){const n=st(e);if(gl(e))return n;if(!Ut(e)){let i=Yn(e);for(;i&&!hi(i);){if(Pt(i)&&!jl(i))return i;i=Yn(i)}return n}let o=Dh(e,t);for(;o&&ck(o)&&jl(o);)o=Dh(o,t);return o&&hi(o)&&jl(o)&&!su(o)?n:o||gk(e)||n}const $k=async function(e){const t=this.getOffsetParent||sv,n=this.getDimensions,o=await n(e.floating);return{reference:Ok(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ik(e){return Vt(e).direction==="rtl"}const Tk={convertOffsetParentRelativeRectToViewportRelativeRect:bk,getDocumentElement:Zt,getClippingRect:Sk,getOffsetParent:sv,getElementRects:$k,getClientRects:yk,getDimensions:Ek,getScale:ai,isElement:Pt,isRTL:Ik};function lv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pk(e,t){let n=null,o;const i=Zt(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function r(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:p}=c;if(s||t(),!u||!p)return;const m=or(h),g=or(i.clientWidth-(d+u)),v=or(i.clientHeight-(h+p)),f=or(d),y={rootMargin:-m+"px "+-g+"px "+-v+"px "+-f+"px",threshold:at(0,Un(1,l))||1};let x=!0;function w(k){const S=k[0].intersectionRatio;if(S!==l){if(!x)return r();S?r(!1,S):o=setTimeout(()=>{r(!1,1e-7)},1e3)}S===1&&!lv(c,e.getBoundingClientRect())&&r(),x=!1}try{n=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return r(!0),a}function Vk(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=cu(e),d=i||a?[...c?ka(c):[],...ka(t)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),a&&f.addEventListener("resize",n)});const h=c&&s?Pk(c,n):null;let u=-1,p=null;r&&(p=new ResizeObserver(f=>{let[y]=f;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,g=l?Oo(e):null;l&&v();function v(){const f=Oo(e);g&&!lv(g,f)&&n(),g=f,m=requestAnimationFrame(v)}return n(),()=>{var f;d.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),h?.(),(f=p)==null||f.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Dk=ok,Mk=ik,Rk=ek,Fk=rk,Ak=tk,Lk=Q_,Nk=ak,Bk=(e,t,n)=>{const o=new Map,i={platform:Tk,...n},a={...i.platform,_c:o};return J_(e,t,{...i,platform:a})};function Mh(e=0,t=0,n=0,o=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,o);const i={x:e,y:t,width:n,height:o,top:t,right:e+n,bottom:t+o,left:e};return{...i,toJSON:()=>i}}function zk(e){if(!e)return Mh();const{x:t,y:n,width:o,height:i}=e;return Mh(t,n,o,i)}function Hk(e,t){return{contextElement:ke(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?zk(o):n.getBoundingClientRect()}}}var Di=e=>({variable:e,reference:`var(${e})`}),rn={arrowSize:Di("--arrow-size"),arrowSizeHalf:Di("--arrow-size-half"),arrowBg:Di("--arrow-background"),transformOrigin:Di("--transform-origin"),arrowOffset:Di("--arrow-offset")},jk=e=>e==="top"||e==="bottom"?"y":"x";function Wk(e,t){return{name:"transformOrigin",fn(n){var o,i,a,r;const{elements:s,middlewareData:l,placement:c,rects:d,y:h}=n,u=c.split("-")[0],p=jk(u),m=((o=l.arrow)==null?void 0:o.x)||0,g=((i=l.arrow)==null?void 0:i.y)||0,v=t?.clientWidth||0,f=t?.clientHeight||0,y=m+v/2,x=g+f/2,w=Math.abs(((a=l.shift)==null?void 0:a.y)||0),k=d.reference.height/2,S=f/2,O=((r=e.offset)==null?void 0:r.mainAxis)??e.gutter,_=typeof O=="number"?O+S:O??S,E=w>_,V={top:`${y}px calc(100% + ${_}px)`,bottom:`${y}px ${-_}px`,left:`calc(100% + ${_}px) ${x}px`,right:`${-_}px ${x}px`}[u],$=`${y}px ${d.reference.y+k-h}px`,R=!!e.overlap&&p==="y"&&E;return s.floating.style.setProperty(rn.transformOrigin.variable,R?$:V),{data:{transformOrigin:R?$:V}}}}}var Gk={name:"rects",fn({rects:e}){return{data:e}}},Uk=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:o,y:i}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:o!=null?`${o}px`:"",top:i!=null?`${i}px`:"",[a]:`calc(100% + ${rn.arrowOffset.reference})`}),{}}}};function Yk(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function qk(e){return e.split("-")[0]}var Kk={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Rh(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function du(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Xk(e,t,n){const o=e||t.createElement("div");return Lk({element:o,padding:n.arrowPadding})}function Zk(e,t){if(!uw(t.offset??t.gutter))return Dk(({placement:n})=>{var o,i;const a=(e?.clientHeight||0)/2,r=((o=t.offset)==null?void 0:o.mainAxis)??t.gutter,s=typeof r=="number"?r+a:r??a,{hasAlign:l}=Yk(n),c=l?void 0:t.shift,d=((i=t.offset)==null?void 0:i.crossAxis)??c;return al({crossAxis:d,mainAxis:s,alignmentAxis:t.shift})})}function Jk(e){if(!e.flip)return;const t=du(e.boundary);return Rk({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function Qk(e){if(!e.slide&&!e.overlap)return;const t=du(e.boundary);return Mk({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Nk()})}function eS(e){return Fk({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:o,availableWidth:i}){const a=t.floating,r=Math.round(n.reference.width),s=Math.round(n.reference.height);i=Math.floor(i),o=Math.floor(o),a.style.setProperty("--reference-width",`${r}px`),a.style.setProperty("--reference-height",`${s}px`),a.style.setProperty("--available-width",`${i}px`),a.style.setProperty("--available-height",`${o}px`)}})}function tS(e){if(e.hideWhenDetached)return Ak({strategy:"referenceHidden",boundary:du(e.boundary)??"clippingAncestors"})}function nS(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function oS(e,t,n={}){const o=Hk(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},Kk,n),a=t.querySelector("[data-part=arrow]"),r=[Zk(a,i),Jk(i),Qk(i),Xk(a,t.ownerDocument,i),Uk(a),Wk({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),eS(i),tS(i),Gk],{placement:s,strategy:l,onComplete:c,onPositioned:d}=i,h=async()=>{var g;if(!o||!t)return;const v=await Bk(o,t,{placement:s,middleware:r,strategy:l});c?.(v),d?.({placed:!0});const f=Ce(t),y=Rh(f,v.x),x=Rh(f,v.y);t.style.setProperty("--x",`${y}px`),t.style.setProperty("--y",`${x}px`),i.hideWhenDetached&&((g=v.middlewareData.hide)!=null&&g.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const w=t.firstElementChild;if(w){const k=ui(w);t.style.setProperty("--z-index",k.zIndex)}},u=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:h,floatingElement:t}),d?.({placed:!0})):await h()},p=nS(i.listeners),m=i.listeners?Vk(o,t,u,p):bw;return u(),()=>{m?.(),d?.({placed:!1})}}function ct(e,t,n={}){const{defer:o,...i}=n,a=o?J:s=>s(),r=[];return r.push(a(()=>{const s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;r.push(oS(s,l,i))})),()=>{r.forEach(s=>s?.())}}var iS={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function cv(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:rn.arrowSize.reference,height:rn.arrowSize.reference,[rn.arrowSizeHalf.variable]:`calc(${rn.arrowSize.reference} / 2)`,[rn.arrowOffset.variable]:`calc(${rn.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?iS[t.split("-")[0]]:void 0,background:rn.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:i,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:o?"var(--available-width)":void 0,maxHeight:o?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var dv=ie("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]);dv.build();var aS=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},rS=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},sS=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},lS=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},cS=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},dS=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},uS=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},hS=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},pS=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderTrack)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-track:${t}`},gS=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderThumb)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-thumb:${t}`},Kr=e=>e.getById(lS(e)),fS=e=>e.getById(hS(e)),mS=(e,t)=>e.getById(gS(e,t)),vS=e=>e.getById(dS(e)),Fh=e=>e.getById(aS(e)),bS=e=>e.getById(uS(e)),yS=(e,t,n)=>{const o=bS(e);if(!o)return;const{getPercentValue:i}=am(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},xS=e=>e.getById(rS(e)),Wl=e=>e.getById(sS(e)),wS=e=>e.getById(cS(e)),CS=(e,t)=>e.getById(pS(e,t)),_S=(e,t,n,o)=>{const i=CS(e,n);if(!i)return;const{getPercentValue:a}=am(t,i);return{x:a({dir:o,orientation:"horizontal"}),y:a({orientation:"vertical"})}},kS=e=>[...Gn(Kr(e),"input[data-channel]"),...Gn(xS(e),"input[data-channel]")];function SS(e,t){if(t==null)return"";if(t==="hex")return e.toString("hex");if(t==="css")return e.toString("css");if(t in e)return e.getChannelValue(t).toString();const n=e.getFormat()==="hsla";switch(t){case"hue":return n?e.toFormat("hsla").getChannelValue("hue").toString():e.toFormat("hsba").getChannelValue("hue").toString();case"saturation":return n?e.toFormat("hsla").getChannelValue("saturation").toString():e.toFormat("hsba").getChannelValue("saturation").toString();case"lightness":return e.toFormat("hsla").getChannelValue("lightness").toString();case"brightness":return e.toFormat("hsba").getChannelValue("brightness").toString();case"red":case"green":case"blue":return e.toFormat("rgba").getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}var Ah=e=>ks(e),ES=/^[0-9a-fA-F]{3,8}$/;function OS(e){return ES.test(e)}function $S(e){return e.startsWith("#")?e:OS(e)?`#${e}`:e}var{and:IS}=ze();IS("isOpenControlled","closeOnSelect");function Lh(e,t,n){const o=kS(e);J(()=>{o.forEach(i=>{const a=i.dataset.channel;Ot(i,SS(n||t,a))})})}function TS(e,t){const n=vS(e);n&&J(()=>Ot(n,t))}Y()(["closeOnSelect","dir","disabled","format","defaultFormat","getRootNode","id","ids","initialFocusEl","inline","name","positioning","onFocusOutside","onFormatChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","onValueChangeEnd","defaultOpen","open","positioning","required","readOnly","value","defaultValue","invalid","openAutoFocus"]);Y()(["xChannel","yChannel"]);Y()(["channel","orientation"]);Y()(["value","disabled"]);Y()(["value","respectAlpha"]);Y()(["size"]);dv.extendWith("view");var uv=ie("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");uv.build();var hv=e=>new Mo(e);hv.empty=()=>new Mo({items:[]});var PS=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},VS=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},DS=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},MS=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},RS=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},FS=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},Dn=e=>e.getById(DS(e)),qo=e=>e.getById(VS(e)),Nh=e=>e.getById(MS(e)),Bh=e=>e.getById(PS(e)),ia=e=>e.getById(RS(e)),zh=e=>e.getById(FS(e)),Mi=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return cm(Dn(e),n)},Hh=e=>{const t=qo(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},AS=e=>{const t=ia(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:LS,createMachine:NS,choose:BS}=sl(),{and:Te,not:tt}=LS;NS({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){om(t)},collection:hv.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:o}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Ne,hash(i){return i.join(",")},onChange(i){var a;const r=n(),s=r.get("selectedItems"),l=e("collection"),c=i.map(d=>s.find(h=>l.getItemValue(h)===d)||l.find(d));r.set("selectedItems",c),(a=e("onValueChange"))==null||a({value:i,items:c})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(i){var a;const r=e("collection").find(i);(a=e("onHighlightChange"))==null||a({highlightedValue:i,highlightedItem:r})}})),inputValue:t(()=>{let i=e("inputValue")||e("defaultInputValue");const a=e("value")||e("defaultValue");if(!i.trim()&&!e("multiple")){const r=e("collection").stringifyMany(a);i=Bt(e("selectionBehavior"),{preserve:i||r,replace:r,clear:""})}return{defaultValue:i,value:e("inputValue"),onChange(r){var s;const l=o(),c=(l.previousEvent||l).src;(s=e("onInputValueChange"))==null||s({inputValue:r,reason:c})}}}),highlightedItem:t(()=>{const i=e("highlightedValue");return{defaultValue:e("collection").find(i)}}),selectedItems:t(()=>{const i=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(i)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:o,send:i}){n([()=>e.hash("value")],()=>{o(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{o(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{o(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{i({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:BS([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:Te("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:Te("isCustomValue",tt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:Te("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement","hideOtherElements"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:Te("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:Te("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:Te("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:Te("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:Te("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement","hideOtherElements"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"autoHighlight",actions:["highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:Te("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:Te("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:Te("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return dw(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>e.restoreFocus==null?!0:!!e.restoreFocus,isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue"))},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:xi(()=>Dn(n),{type:"listbox",defer:!0,exclude:()=>[qo(n),ia(n),zh(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(o){o.preventDefault(),o.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},hideOtherElements({scope:e}){return m1([qo(e),Dn(e),ia(e),zh(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Bh(n)||ia(n),i=()=>Nh(n);return e.set("currentPlacement",t("positioning").placement),ct(o,i,{...t("positioning"),defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=qo(n);let a=[];const r=c=>{const d=o.current().type.includes("POINTER"),h=e.get("highlightedValue");if(d||!h)return;const u=Dn(n),p=t("scrollToIndexFn");if(p){const v=t("collection").indexOf(h);p({index:v,immediate:c,getElement:()=>Mi(n,h)});return}const m=Mi(n,h),g=J(()=>{xa(m,{rootEl:u,block:"nearest"})});a.push(g)},s=J(()=>r(!0));a.push(s);const l=Da(i,{attributes:["aria-activedescendant"],callback:()=>r(!1)});return a.push(l),()=>{a.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:o}){ct(()=>Bh(n),()=>Nh(n),{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(i){e.set("currentPlacement",i.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:o}=e,i=o("collection"),a=n.get("highlightedValue");if(!a||!i.has(a))return;const r=o("multiple")?So(n.get("value"),a):[a];(t=o("onSelect"))==null||t({value:r,itemValue:a}),n.set("value",r);const s=Bt(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(r),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){el(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=Mi(n,o),a=Dn(n),r=t("scrollToIndexFn");if(r){const s=t("collection").indexOf(o);r({index:s,immediate:!0,getElement:()=>Mi(n,o)});return}xa(i,{rootEl:a,block:"nearest"})})},selectItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{var a;const r=i("multiple")?So(t.get("value"),n.value):[n.value];(a=i("onSelect"))==null||a({value:r,itemValue:n.value}),t.set("value",r);const s=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(r),clear:""});t.set("inputValue",s)})},clearItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{const a=Co(t.get("value"),n.value);t.set("value",a);const r=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",r)})},setInitialFocus({scope:e}){J(()=>{Hh(e)})},setFinalFocus({scope:e}){J(()=>{const t=ia(e);t?.dataset.focusable==null?Hh(e):AS(e)})},syncInputValue({context:e,scope:t,event:n}){const o=qo(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&Ux(o)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const o=t("selectionBehavior"),i=Bt(o,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",i)},setValue(e){const{context:t,flush:n,event:o,prop:i}=e;n(()=>{t.set("value",o.value);const a=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(o.value),clear:""});t.set("inputValue",a)})},clearSelectedItems(e){const{context:t,flush:n,prop:o}=e;n(()=>{t.set("value",[]);const i=Bt(o("selectionBehavior"),{preserve:t.get("inputValue"),replace:o("collection").stringifyMany([]),clear:""});t.set("inputValue",i)})},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const o=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>Mi(t,o)})}else{const o=Dn(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=jh(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=jh(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(Dn(n)?queueMicrotask:J)(()=>{const o=t("collection").firstValue;o&&e.set("highlightedValue",o)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Dn(n)?queueMicrotask:J)(()=>{const o=t("collection").lastValue;o&&e.set("highlightedValue",o)})},highlightNextItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getNextValue(o),!n&&t("loopFocus")&&(n=i.firstValue)):n=i.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getPreviousValue(o),!n&&t("loopFocus")&&(n=i.lastValue)):n=i.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){J(()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){J(()=>{let o=null;n("hasSelectedItems")?o=t("collection").sort(e.get("value"))[0]:o=t("collection").firstValue,o&&e.set("highlightedValue",o)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){J(()=>{const o=t("collection");let i=null;n("hasSelectedItems")?i=o.sort(e.get("value"))[0]:i=o.lastValue,i&&e.set("highlightedValue",i)})},autofillInputValue({context:e,computed:t,prop:n,event:o,scope:i}){const a=qo(i),r=n("collection");if(!t("autoComplete")||!a||!o.keypress)return;const s=r.stringify(e.get("highlightedValue"));J(()=>{a.value=s||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{const{context:t,prop:n}=e,o=n("collection"),i=t.get("value"),a=i.map(s=>t.get("selectedItems").find(l=>o.getItemValue(l)===s)||o.find(s));t.set("selectedItems",a);const r=Bt(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:o.stringifyMany(i),clear:""});t.set("inputValue",r)})},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function jh(e){return(e.previousEvent||e).src}Y()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]);Y()(["htmlFor"]);Y()(["id"]);Y()(["item","persistFocus"]);uv.extendWith("empty");function Gl(e,t){return e-t*Math.floor(e/t)}const pv=1721426;function ir(e,t,n,o){t=uu(e,t);let i=t-1,a=-2;return n<=2?a=0:Xr(t)&&(a=-1),pv-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+o)}function Xr(e){return e%4===0&&(e%100!==0||e%400===0)}function uu(e,t){return e==="BC"?1-t:t}function zS(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const HS={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};let pi=class{fromJulianDay(t){let n=t,o=n-pv,i=Math.floor(o/146097),a=Gl(o,146097),r=Math.floor(a/36524),s=Gl(a,36524),l=Math.floor(s/1461),c=Gl(s,1461),d=Math.floor(c/365),h=i*400+r*100+l*4+d+(r!==4&&d!==4?1:0),[u,p]=zS(h),m=n-ir(u,p,1,1),g=2;n<ir(u,p,3,1)?g=0:Xr(p)&&(g=1);let v=Math.floor(((m+g)*12+373)/367),f=n-ir(u,p,v,1)+1;return new Is(u,p,v,f)}toJulianDay(t){return ir(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return HS[Xr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Xr(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}};const jS={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function vl(e,t){return t=$t(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function WS(e,t){var n,o,i,a;return(a=(i=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&i!==void 0?i:(o=t.isEqual)===null||o===void 0?void 0:o.call(t,e))!==null&&a!==void 0?a:e.identifier===t.identifier}function GS(e,t,n){let o=e.calendar.toJulianDay(e),i=ZS(t),a=Math.ceil(o+1-i)%7;return a<0&&(a+=7),a}function US(e){return hn(Date.now(),e)}function gv(e){return ri(US(e))}function fv(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function YS(e,t){return Wh(e)-Wh(t)}function Wh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Ul=null;function hu(){return Ul==null&&(Ul=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ul}function mv(e){return e.subtract({days:e.day-1})}function qS(e){return mv(e.subtract({months:e.month-1}))}function KS(e,t,n){let o=GS(e,t);return e.subtract({days:o})}const Gh=new Map,Yl=new Map;function XS(e){if(Intl.Locale){let n=Gh.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Gh.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function ZS(e){let t=Yl.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Yl.set(e,t),t.firstDay}let n=XS(e);if(e.includes("-fw-")){let o=e.split("-fw-")[1].split("-")[0];o==="mon"?t={firstDay:1}:o==="tue"?t={firstDay:2}:o==="wed"?t={firstDay:3}:o==="thu"?t={firstDay:4}:o==="fri"?t={firstDay:5}:o==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&jS[n]||0};Yl.set(e,t)}return t.firstDay}function vv(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function bv(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function gi(e){e=$t(e,new pi);let t=uu(e.era,e.year);return yv(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function yv(e,t,n,o,i,a,r){let s=new Date;return s.setUTCHours(o,i,a,r),s.setUTCFullYear(e,t-1,n),s.getTime()}function Hc(e,t){if(t==="UTC")return 0;if(e>0&&t===hu())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=xv(e,t);return yv(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Uh=new Map;function xv(e,t){let n=Uh.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Uh.set(t,n));let o=n.formatToParts(new Date(e)),i={};for(let a of o)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Yh=864e5;function JS(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>QS(e,t,i))}function QS(e,t,n){let o=xv(n,t);return e.year===o.year&&e.month===o.month&&e.day===o.day&&e.hour===o.hour&&e.minute===o.minute&&e.second===o.second}function cn(e,t,n="compatible"){let o=$o(e);if(t==="UTC")return gi(o);if(t===hu()&&n==="compatible"){o=$t(o,new pi);let l=new Date,c=uu(o.era,o.year);return l.setFullYear(c,o.month-1,o.day),l.setHours(o.hour,o.minute,o.second,o.millisecond),l.getTime()}let i=gi(o),a=Hc(i-Yh,t),r=Hc(i+Yh,t),s=JS(o,t,i-a,i-r);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-r);case"compatible":case"later":return Math.max(i-a,i-r);case"reject":throw new RangeError("No such absolute time found")}}function wv(e,t,n="compatible"){return new Date(cn(e,t,n))}function hn(e,t){let n=Hc(e,t),o=new Date(e+n),i=o.getUTCFullYear(),a=o.getUTCMonth()+1,r=o.getUTCDate(),s=o.getUTCHours(),l=o.getUTCMinutes(),c=o.getUTCSeconds(),d=o.getUTCMilliseconds();return new Iv(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,d)}function ri(e){return new Is(e.calendar,e.era,e.year,e.month,e.day)}function $o(e,t){let n=0,o=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:o,second:i,millisecond:a}=e);else if("hour"in e)return e;return new mE(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function $t(e,t){if(WS(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),o=e.copy();return o.calendar=t,o.era=n.era,o.year=n.year,o.month=n.month,o.day=n.day,Io(o),o}function eE(e,t,n){if(e instanceof Iv)return e.timeZone===t?e:nE(e,t);let o=cn(e,t,n);return hn(o,t)}function tE(e){let t=gi(e)-e.offset;return new Date(t)}function nE(e,t){let n=gi(e)-e.offset;return $t(hn(n,t),e.calendar)}const Ri=36e5;function bl(e,t){let n=e.copy(),o="hour"in n?rE(n,t):0;jc(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Wc(n),Cv(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,oE(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,r;let l=(a=(r=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(r,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function jc(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Wc(e){for(;e.month<1;)jc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,jc(e,1)}function oE(e){for(;e.day<1;)e.month--,Wc(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Wc(e)}function Cv(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Io(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Cv(e)}function _v(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function kv(e,t){return bl(e,_v(t))}function pu(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Io(n),n}function $s(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),aE(n),n}function iE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ar(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ar(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ar(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ar(e.hour,24),t}function aE(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ar(e,t){let n=e%t;return n<0&&(n+=t),n}function rE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,iE(e)}function gu(e,t,n,o){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=pn(l,n,0,s.length-1,o?.round),i.era=s[l],Io(i);break}case"year":var a,r;!((a=(r=i.calendar).isInverseEra)===null||a===void 0)&&a.call(r,i)&&(n=-n),i.year=pn(e.year,n,-1/0,9999,o?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=pn(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=pn(e.day,n,1,e.calendar.getDaysInMonth(e),o?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Io(i),i}function Sv(e,t,n,o){let i=e.copy();switch(t){case"hour":{let a=e.hour,r=0,s=23;if(o?.hourCycle===12){let l=a>=12;r=l?12:0,s=l?23:11}i.hour=pn(a,n,r,s,o?.round);break}case"minute":i.minute=pn(e.minute,n,0,59,o?.round);break;case"second":i.second=pn(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=pn(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function pn(e,t,n,o,i=!1){if(i){e+=Math.sign(t),e<n&&(e=o);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>o&&(e=n)}else e+=t,e<n?e=o-(n-e-1):e>o&&(e=n+(e-o-1));return e}function Ev(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=bl($o(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=cn(i,e.timeZone)}else n=gi(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=hn(n,e.timeZone);return $t(o,e.calendar)}function sE(e,t){return Ev(e,_v(t))}function lE(e,t,n,o){switch(t){case"hour":{let i=0,a=23;if(o?.hourCycle===12){let m=e.hour>=12;i=m?12:0,a=m?23:11}let r=$o(e),s=$t($s(r,{hour:i}),new pi),l=[cn(s,e.timeZone,"earlier"),cn(s,e.timeZone,"later")].filter(m=>hn(m,e.timeZone).day===s.day)[0],c=$t($s(r,{hour:a}),new pi),d=[cn(c,e.timeZone,"earlier"),cn(c,e.timeZone,"later")].filter(m=>hn(m,e.timeZone).day===c.day).pop(),h=gi(e)-e.offset,u=Math.floor(h/Ri),p=h%Ri;return h=pn(u,n,Math.floor(l/Ri),Math.floor(d/Ri),o?.round)*Ri+p,$t(hn(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Sv(e,t,n,o);case"era":case"year":case"month":case"day":{let i=gu($o(e),t,n,o),a=cn(i,e.timeZone);return $t(hn(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function cE(e,t,n){let o=$o(e),i=$s(pu(o,t),t);if(i.compare(o)===0)return e;let a=cn(i,e.timeZone,n);return $t(hn(a,e.timeZone),e.calendar)}function dE(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Ov(e){let t=$t(e,new pi),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function $v(e){return`${Ov(e)}T${dE(e)}`}function uE(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),o=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function hE(e){return`${$v(e)}${uE(e.offset)}[${e.timeZone}]`}function pE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fu(e,t,n){pE(e,t),t.set(e,n)}function mu(e){let t=typeof e[0]=="object"?e.shift():new pi,n;if(typeof e[0]=="string")n=e.shift();else{let r=t.getEras();n=r[r.length-1]}let o=e.shift(),i=e.shift(),a=e.shift();return[t,n,o,i,a]}var gE=new WeakMap;let Is=class Gc{copy(){return this.era?new Gc(this.calendar,this.era,this.year,this.month,this.day):new Gc(this.calendar,this.year,this.month,this.day)}add(t){return bl(this,t)}subtract(t){return kv(this,t)}set(t){return pu(this,t)}cycle(t,n,o){return gu(this,t,n,o)}toDate(t){return wv(this,t)}toString(){return Ov(this)}compare(t){return fv(this,t)}constructor(...t){fu(this,gE,{writable:!0,value:void 0});let[n,o,i,a,r]=mu(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,Io(this)}};var fE=new WeakMap;let mE=class Uc{copy(){return this.era?new Uc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Uc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return bl(this,t)}subtract(t){return kv(this,t)}set(t){return pu($s(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return gu(this,t,n,o);default:return Sv(this,t,n,o)}}toDate(t,n){return wv(this,t,n)}toString(){return $v(this)}compare(t){let n=fv(this,t);return n===0?YS(this,$o(t)):n}constructor(...t){fu(this,fE,{writable:!0,value:void 0});let[n,o,i,a,r]=mu(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Io(this)}};var vE=new WeakMap;let Iv=class Yc{copy(){return this.era?new Yc(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Yc(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return Ev(this,t)}subtract(t){return sE(this,t)}set(t,n){return cE(this,t,n)}cycle(t,n,o){return lE(this,t,n,o)}toDate(){return tE(this)}toString(){return hE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-eE(t,this.timeZone).toDate().getTime()}constructor(...t){fu(this,vE,{writable:!0,value:void 0});let[n,o,i,a,r]=mu(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.timeZone=s,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Io(this)}},ql=new Map,Ts=class{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let o=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...o.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return xE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=wE(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=Tv(t,n),this.options=n}};const bE={true:{ja:"h11"},false:{}};function Tv(e,t={}){if(typeof t.hour12=="boolean"&&yE()){t={...t};let i=bE[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(ql.has(n))return ql.get(n);let o=new Intl.DateTimeFormat(e,t);return ql.set(n,o),o}let Kl=null;function yE(){return Kl==null&&(Kl=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Kl}let Xl=null;function xE(){return Xl==null&&(Xl=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Xl}function wE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=Tv(e,{...t,timeZone:void 0}),o=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(o===0&&i===23)return"h23";if(o===24&&i===23)return"h24";if(o===0&&i===11)return"h11";if(o===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function CE(e,t,n,o,i){const a={};for(let s in t){const l=s,c=t[l];c!=null&&(a[l]=Math.floor(c/2),a[l]>0&&c%2===0&&a[l]--)}const r=Ro(e,t,n).subtract(a);return Aa(e,r,t,n,o,i)}function Ro(e,t,n,o,i){let a=e;return t.years?a=qS(e):t.months?a=mv(e):t.weeks&&(a=KS(e,n)),Aa(e,a,t,n,o,i)}function vu(e,t,n,o,i){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let r=Ro(e,t,n).subtract(a);return Aa(e,r,t,n,o,i)}function Aa(e,t,n,o,i,a){return i&&e.compare(i)>=0&&(t=bv(t,Ro(ri(i),n,o))),a&&e.compare(a)<=0&&(t=vv(t,vu(ri(a),n,o))),t}function dn(e,t,n){let o=ri(e);return t&&(o=bv(o,ri(t))),n&&(o=vv(o,ri(n))),o}function qh(e,t,n,o,i,a){switch(t){case"start":return Ro(e,n,o,i,a);case"end":return vu(e,n,o,i,a);case"center":default:return CE(e,n,o,i,a)}}function vo(e,t){return t!=null&&vl(e,t)}function yl(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function _E(e,t,n){const o=e.subtract({days:1});return vl(o,e)||yl(o,t,n)}function kE(e,t,n){const o=e.add({days:1});return vl(o,e)||yl(o,t,n)}function Pv(e){let t={...e};for(let n in t)t[n]=1;return t}function Vv(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function SE(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function EE(e,t){const n=$o(gv(t));return new Ts(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:SE(n),timeZone:t})}function OE(e,t,n,o,i){let a=n.formatRangeToParts(e.toDate(i),t.toDate(i)),r=-1;for(let c=0;c<a.length;c++){let d=a[c];if(d.source==="shared"&&d.type==="literal")r=c;else if(d.source==="endRange")break}let s="",l="";for(let c=0;c<a.length;c++)c<r?s+=a[c].value:c>r&&(l+=a[c].value);return o(s,l)}function $E(e,t,n,o){let i=e,a=e,r=EE(n,o);return vl(i,a)?r.format(i.toDate(o)):OE(i,a,r,(s,l)=>`${s} – ${l}`,o)}var IE=10;function TE(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){const t=new Date().getFullYear(),n=Math.floor(t/100)*100,o=parseInt(e.slice(-2),10),i=n+o;return i>t+IE?(i-100).toString():i.toString()}return e}}function Kh(e,t){const o=e-e%10,i=[];for(let a=0;a<12;a+=1){const r=o+a;i.push(r)}return i}function Xh(e){return gv(e??hu())}function La(e,t,n,o){return function(i){const{startDate:a,focusedDate:r}=i,s=Vv(a,e);return yl(r,n,o)?{startDate:a,focusedDate:dn(r,n,o),endDate:s}:r.compare(a)<0?{startDate:vu(r,e,t,n,o),focusedDate:dn(r,n,o),endDate:s}:r.compare(s)>0?{startDate:Ro(r,e,t,n,o),endDate:s,focusedDate:dn(r,n,o)}:{startDate:a,endDate:s,focusedDate:dn(r,n,o)}}}function Dv(e,t,n,o,i,a){const r=La(n,o,i,a),s=t.add(n);return r({focusedDate:e.add(n),startDate:Ro(Aa(e,s,n,o,i,a),n,o)})}function Mv(e,t,n,o,i,a){const r=La(n,o,i,a);let s=t.subtract(n);return r({focusedDate:e.subtract(n),startDate:Ro(Aa(e,s,n,o,i,a),n,o)})}function PE(e,t,n,o,i,a,r){const s=La(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.add(Pv(o)),startDate:t});if(o.days)return Dv(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.add({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.add({years:1}),startDate:t})}function VE(e,t,n,o,i,a,r){const s=La(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.subtract(Pv(o)),startDate:t});if(o.days)return Mv(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.subtract({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.subtract({years:1}),startDate:t})}var Zh=e=>e!=null&&e.length===4,DE=e=>e!=null&&parseFloat(e)<=12,ME=e=>e!=null&&parseFloat(e)<=31;function RE(e,t,n){const o=FE(t,n);let{year:i,month:a,day:r}=AE(o,e)??{};if(i!=null||a!=null||r!=null){const l=new Date;i||(i=l.getFullYear().toString()),a||(a=(l.getMonth()+1).toString()),r||(r=l.getDate().toString())}if(Zh(i)||(i=TE(i)),Zh(i)&&DE(a)&&ME(r))return new Is(+i,+a,+r);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new Is(l.getFullYear(),l.getMonth()+1,l.getDate())}}function FE(e,t){return new Ts(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:n,value:o})=>n==="literal"?`${o}?`:`((?!=<${n}>)\\d+)?`).join("")}function AE(e,t){var n;const o=t.match(e);return(n=e.toString().match(/<(.+?)>/g))==null?void 0:n.map(i=>{var a;const r=i.match(/<(.+)>/);return!r||r.length<=0?null:(a=i.match(/<(.+)>/))==null?void 0:a[1]}).reduce((i,a,r)=>(a&&(o&&o.length>r?i[a]=o[r+1]:i[a]=null),i),{})}var rr="__live-region__";function Rv(e={}){const{level:t="polite",document:n=document,root:o,delay:i=0}=e,a=n.defaultView??window,r=o??n.body;function s(c,d){const h=n.getElementById(rr);h?.remove(),d=d??i;const u=n.createElement("span");u.id=rr,u.dataset.liveAnnouncer="true";const p=t!=="assertive"?"status":"alert";u.setAttribute("aria-live",t),u.setAttribute("role",p),Object.assign(u.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}),r.appendChild(u),a.setTimeout(()=>{u.textContent=c},d)}function l(){const c=n.getElementById(rr);c?.remove()}return{announce:s,destroy:l,toJSON(){return rr}}}var Fv=ie("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect");Fv.build();var LE=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},NE=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},BE=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},zE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},HE=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},jE=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},WE=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},Jh=(e,t)=>cm(Zr(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),Qh=e=>e.getById(zE(e)),Zr=e=>e.getById(LE(e)),Fi=e=>Gn(Av(e),"[data-part=input]"),GE=e=>e.getById(WE(e)),UE=e=>e.getById(jE(e)),YE=e=>e.getById(NE(e)),qE=e=>e.getById(HE(e)),Av=e=>e.getById(BE(e));function ep(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function sr(e){return e.slice().sort((t,n)=>t.compare(n))}var tp=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year);function fn(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function bu(e){return e===0?"day":e===1?"month":"year"}function yu(e,t,n){return bu(Le(fn(e,0),fn(t,0),fn(n,2)))}function KE(e,t){return fn(e,0)>fn(t,0)}function XE(e,t){return fn(e,0)<fn(t,0)}function ZE(e,t,n){const o=fn(e,0)+1;return yu(bu(o),t,n)}function JE(e,t,n){const o=fn(e,0)-1;return yu(bu(o),t,n)}var QE=["day","month","year"];function eO(e){QE.forEach(t=>e(t))}var{and:pt}=ze();function tO(e,t){if(e?.length!==t?.length)return!1;const n=Math.max(e.length,t.length);for(let o=0;o<n;o++)if(!vo(e[o],t[o]))return!1;return!0}function lr(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}pt("shouldRestoreFocus","isInteractOutsideEvent"),pt("isRangePicker","hasSelectedRange"),pt("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),pt("isRangePicker","isSelectingEndDate","closeOnSelect"),pt("isRangePicker","isSelectingEndDate"),pt("closeOnSelect","isOpenControlled"),pt("isRangePicker","isSelectingEndDate"),pt("isRangePicker","hasSelectedRange"),pt("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),pt("isRangePicker","isSelectingEndDate","closeOnSelect"),pt("isRangePicker","isSelectingEndDate"),pt("closeOnSelect","isOpenControlled");var Jr=(e,t)=>{const{context:n,prop:o}=e,i=n.get("view");let a=typeof t=="number"?n.get("focusedValue").set({[i]:t}):t;return eO(r=>{XE(r,o("minView"))&&(a=a.set({[r]:r==="day"?1:0}))}),a};function me(e,t){const{context:n,prop:o,computed:i}=e;if(!t)return;const a=Jr(e,t);if(vo(n.get("focusedValue"),a))return;const r=La(i("visibleDuration"),o("locale"),o("min"),o("max"))({focusedDate:a,startDate:n.get("startValue")});n.set("startValue",r.startDate),n.set("focusedValue",r.focusedDate)}function cr(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");vo(o,t.focusedDate)||n.set("focusedValue",t.focusedDate)}Y()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","open","defaultOpen","positioning","readOnly","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]);Y()(["index","fixOnBlur"]);Y()(["value"]);Y()(["columns","id","view"]);Y()(["disabled","value","columns"]);Y()(["view"]);const nO=Fv.extendWith("view");var Lv=ie("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger");Lv.build();Y()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);var oO=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,Nv=e=>e.isDirectory,qc=e=>e.isFile,Kc=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),iO=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=oO(n);if(!o)return null;if(Nv(o)&&t)return Bv(o.createReader(),`${o.name}`);if(qc(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?Kc(i,""):null)}if(qc(o))return new Promise(i=>{o.file(a=>{i(Kc(a,""))})})}).filter(n=>n)),Bv=(e,t="")=>new Promise(n=>{const o=[],i=()=>{e.readEntries(a=>{if(a.length===0){n(Promise.all(o).then(s=>s.flat()));return}const r=a.map(s=>{if(!s)return null;if(Nv(s))return Bv(s.createReader(),`${t}${s.name}`);if(qc(s))return new Promise(l=>{s.file(c=>{l(Kc(c,t))})})}).filter(s=>s);o.push(Promise.all(r)),i()})};i()});function aO(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function rO(e){return/^.*\.[\w]+$/.test(e)}var np=e=>aO(e)||rO(e);function sO(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(np).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(np).join(",")}var dr=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,Ai=e=>e!=null;function lO(e,t,n){if(Ai(e.size))if(Ai(t)&&Ai(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(Ai(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(Ai(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var cO="3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip",dO=new Map(cO.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function uO(e){const t=e.split(".").pop();return t&&dO.get(t)||null}function hO(e,t){if(e&&t){const n=Array.isArray(t)?t:typeof t=="string"?t.split(","):[];if(n.length===0)return!0;const o=e.name||"",i=(e.type||uO(o)||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(r=>{const s=r.trim().toLowerCase();return s.charAt(0)==="."?o.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}function pO(e,t){const n=e.type==="application/x-moz-file"||hO(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var gO=ie("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");gO.build();Y()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]);const fO=ie("fieldset").parts("root","errorText","helperText","legend");fO.build();const[zv,ut]=we("FileUploadContext"),mO=P({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ut();return q(),(n,o)=>(C(),T(b(X).button,W(b(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),vO=P({__name:"file-upload-context",setup(e){const t=ut();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),bO=P({__name:"file-upload-dropzone",props:wn({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=ut();return q(),(o,i)=>(C(),T(b(X).div,W(b(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),yO=P({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Qn();return q(),(o,i)=>{var a;return C(),T(b(X).input,W({"aria-describedby":(a=b(n))==null?void 0:a.ariaDescribedby},b(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[xO,Na]=we("FileUploadItemPropsContext"),wO=P({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na();return q(),(o,i)=>(C(),T(b(X).button,W(b(t).getItemDeleteTriggerProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[CO,_O]=we("FileUploadItemGroupPropsContext"),kO=P({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=F(()=>Rn(t,["type"])),o=ut();return CO(n),q(),(i,a)=>(C(),T(b(X).ul,W(b(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),SO=P({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na(),o=Ws();return q(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemNameProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default",{},()=>{var r;return[Be(oe(((r=o.default)==null?void 0:r.call(o))||b(n).file.name),1)]})]),_:3},16,["as-child"]))}}),EO=P({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na(),o=ve("");return Pf(i=>{const a=t.value.createFileUrl(n.value.file,r=>o.value=r);i(a)}),q(),(i,a)=>o.value?(C(),T(b(X).img,et(W({key:0},b(t).getItemPreviewImageProps({...b(n),url:o.value}))),null,16)):Q("",!0)}}),OO=P({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=ut(),n=Na();return q(),(o,i)=>b(n).file.type.match(e.type??".*")?(C(),T(b(X).div,W({key:0},b(t).getItemPreviewProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"])):Q("",!0)}}),$O=P({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=ut(),n=Na(),o=Ws();return q(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemSizeTextProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default",{},()=>{var r;return[Be(oe(((r=o.default)==null?void 0:r.call(o))||b(t).getFileSize(b(n).file)),1)]})]),_:3},16,["as-child"]))}}),IO=P({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=ut(),o=_O(),i=F(()=>({...t,type:o.value.type}));return xO(i),q(),(a,r)=>(C(),T(b(X).li,W(b(n).getItemProps(i.value),{"as-child":e.asChild}),{default:I(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),TO=P({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=ut();return q(),(n,o)=>(C(),T(b(X).label,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),PO=P({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return zv(n),q(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});function VO(e){const t=new Map;return function(n,o){const i=n+(o?Object.entries(o).sort((r,s)=>r[0]<s[0]?-1:1).join():"");if(t.has(i))return t.get(i);let a=new e(n,o);return t.set(i,a),a}}var DO=VO(Intl.NumberFormat);function MO(e,t,n={}){return DO(t,n).format(e)}var RO=["","kilo","mega","giga","tera"],FO=["","kilo","mega","giga","tera","peta"],AO=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(e===0)return"0 B";const{unitSystem:o="decimal",precision:i=3,unit:a="byte",unitDisplay:r="short"}=n,s=o==="binary"?1024:1e3,l=a==="bit"?RO:FO,c=e<0;let d=Math.abs(e),h=0;for(;d>=s&&h<l.length-1;)d/=s,h++;const u=parseFloat(d.toPrecision(i)),p=c?-u:u;return MO(p,t,{style:"unit",unit:l[h]+a,unitDisplay:r})},Hv=ie("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),gt=Hv.build(),jv=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},Wv=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},Xc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},LO=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},NO=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},BO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`file:${e.id}:item:${t}`},zO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemName)==null?void 0:o.call(n,t))??`file:${e.id}:item-name:${t}`},HO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemSizeText)==null?void 0:o.call(n,t))??`file:${e.id}:item-size:${t}`},jO=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemPreview)==null?void 0:o.call(n,t))??`file:${e.id}:item-preview:${t}`},WO=e=>e.getById(jv(e)),op=e=>e.getById(Xc(e)),GO=e=>e.getById(Wv(e));function ip(e){const t=be(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function UO(e,t,n){const{prop:o,computed:i}=e;return!i("multiple")&&t>1?!1:!i("multiple")&&t+n.length===2?!0:!(t+n.length>o("maxFiles"))}function ap(e,t,n=[],o=[]){const{prop:i,computed:a}=e,r=[],s=[],l={acceptedFiles:n,rejectedFiles:o};return t.forEach(c=>{var d;const[h,u]=pO(c,a("acceptAttr")),[p,m]=lO(c,i("minFileSize"),i("maxFileSize")),g=(d=i("validate"))==null?void 0:d(c,l),v=g?g.length===0:!0;if(h&&p&&v)r.push(c);else{const f=[u,m];v||f.push(...g??[]),s.push({file:c,errors:f.filter(Boolean)})}}),UO(e,r.length,n)||(r.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),r.splice(0)),{acceptedFiles:r,rejectedFiles:s}}function YO(e,t){const n=Ce(e);try{if("DataTransfer"in n){const o=new n.DataTransfer;t.forEach(i=>{o.items.add(i)}),e.files=o.files}}catch{}}var In="accepted";function qO(e,t){const{state:n,send:o,prop:i,computed:a,scope:r,context:s}=e,l=!!i("disabled"),c=!!i("required"),d=i("allowDrop"),h=i("translations"),u=n.matches("dragging"),p=n.matches("focused")&&!l;return{dragging:u,focused:p,disabled:!!l,transforming:s.get("transforming"),openFilePicker(){l||o({type:"OPEN"})},deleteFile(m,g=In){o({type:"FILE.DELETE",file:m,itemType:g})},acceptedFiles:s.get("acceptedFiles"),rejectedFiles:s.get("rejectedFiles"),setFiles(m){o({type:"FILES.SET",files:m,count:m.length})},clearRejectedFiles(){o({type:"REJECTED_FILES.CLEAR"})},clearFiles(){o({type:"FILES.CLEAR"})},getFileSize(m){return AO(m.size,i("locale"))},createFileUrl(m,g){const v=r.getWin(),f=v.URL.createObjectURL(m);return g(f),()=>v.URL.revokeObjectURL(f)},setClipboardFiles(m){if(l)return!1;const g=Array.from(m?.items??[]).reduce((v,f)=>{if(f.kind!=="file")return v;const y=f.getAsFile();return y?[...v,y]:v},[]);return g.length?(o({type:"FILES.SET",files:g}),!0):!1},getRootProps(){return t.element({...gt.root.attrs,dir:i("dir"),id:jv(r),"data-disabled":j(l),"data-dragging":j(u)})},getDropzoneProps(m={}){return t.element({...gt.dropzone.attrs,dir:i("dir"),id:Wv(r),tabIndex:l||m.disableClick?void 0:0,role:m.disableClick?"application":"button","aria-label":h.dropzone,"aria-disabled":l,"data-invalid":j(i("invalid")),"data-disabled":j(l),"data-dragging":j(u),onKeyDown(g){l||g.defaultPrevented||g.currentTarget===be(g)&&(m.disableClick||g.key!=="Enter"&&g.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(g){l||g.defaultPrevented||m.disableClick||g.currentTarget===be(g)&&(g.currentTarget.localName==="label"&&g.preventDefault(),o({type:"DROPZONE.CLICK"}))},onDragOver(g){if(l||!d)return;g.preventDefault(),g.stopPropagation();try{g.dataTransfer.dropEffect="copy"}catch{}if(!ip(g))return;const v=g.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:v})},onDragLeave(g){l||d&&(Ye(g.currentTarget,g.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(g){if(l)return;d&&(g.preventDefault(),g.stopPropagation());const v=ip(g);l||!v||iO(g.dataTransfer.items,i("directory")).then(f=>{o({type:"DROPZONE.DROP",files:hm(f)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...gt.trigger.attrs,dir:i("dir"),id:LO(r),disabled:l,"data-disabled":j(l),"data-invalid":j(i("invalid")),type:"button",onClick(m){l||(Ye(GO(r),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:Xc(r),tabIndex:-1,disabled:l,type:"file",required:i("required"),capture:i("capture"),name:i("name"),accept:a("acceptAttr"),webkitdirectory:i("directory")?"":void 0,multiple:a("multiple")||i("maxFiles")>1,onClick(m){m.stopPropagation(),m.currentTarget.value=""},onInput(m){if(l)return;const{files:g}=m.currentTarget;o({type:"FILE.SELECT",files:g?Array.from(g):[]})},style:nl})},getItemGroupProps(m={}){const{type:g=In}=m;return t.element({...gt.itemGroup.attrs,dir:i("dir"),"data-disabled":j(l),"data-type":g})},getItemProps(m){const{file:g,type:v=In}=m;return t.element({...gt.item.attrs,dir:i("dir"),id:BO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemNameProps(m){const{file:g,type:v=In}=m;return t.element({...gt.itemName.attrs,dir:i("dir"),id:zO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemSizeTextProps(m){const{file:g,type:v=In}=m;return t.element({...gt.itemSizeText.attrs,dir:i("dir"),id:HO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewProps(m){const{file:g,type:v=In}=m;return t.element({...gt.itemPreview.attrs,dir:i("dir"),id:jO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewImageProps(m){var g;const{file:v,url:f,type:y=In}=m;if(!v.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...gt.itemPreviewImage.attrs,alt:(g=h.itemPreview)==null?void 0:g.call(h,v),src:f,"data-disabled":j(l),"data-type":y})},getItemDeleteTriggerProps(m){var g;const{file:v,type:f=In}=m;return t.button({...gt.itemDeleteTrigger.attrs,dir:i("dir"),type:"button",disabled:l,"data-disabled":j(l),"data-type":f,"aria-label":(g=h.deleteFile)==null?void 0:g.call(h,v),onClick(){l||o({type:"FILE.DELETE",file:v,itemType:f})}})},getLabelProps(){return t.label({...gt.label.attrs,dir:i("dir"),id:NO(r),htmlFor:Xc(r),"data-disabled":j(l),"data-required":j(c)})},getClearTriggerProps(){return t.button({...gt.clearTrigger.attrs,dir:i("dir"),type:"button",disabled:l,hidden:s.get("acceptedFiles").length===0,"data-disabled":j(l),onClick(m){m.defaultPrevented||l||o({type:"FILES.CLEAR"})}})}}}var KO={props({props:e}){return{minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:t=>`preview of ${t.name}`,deleteFile:t=>`delete file ${t.name}`,...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>dr(a,i[r])),hash(o){return o.map(i=>`${i.name}-${i.size}`).join(",")},onChange(o){var i,a;const r=n();(i=e("onFileAccept"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:o,rejectedFiles:r.get("rejectedFiles")})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>dr(a.file,i[r].file)),onChange(o){var i,a;const r=n();(i=e("onFileReject"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:r.get("acceptedFiles"),rejectedFiles:o})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>sO(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],()=>{n(["syncInputElement"])})},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop")||!e("allowDrop")||e("disabled"))return;const n=t.getDoc(),o=a=>{a?.preventDefault()},i=a=>{Ye(WO(t),be(a))||a.preventDefault()};return wa(se(n,"dragover",o,!1),se(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=op(e);if(!n)return;YO(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){J(()=>{var t;(t=op(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:a}=ap(e,o.files);n.set("acceptedFiles",t("multiple")?i:i.length>0?[i[0]]:[]),n.set("rejectedFiles",a)},setEventFiles(e){const{computed:t,context:n,event:o,prop:i}=e,a=n.get("acceptedFiles"),r=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=ap(e,o.files,a,r),c=h=>{if(t("multiple")){n.set("acceptedFiles",u=>[...u,...h]),n.set("rejectedFiles",l);return}if(h.length){n.set("acceptedFiles",[h[0]]),n.set("rejectedFiles",l);return}l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))},d=i("transformFiles");d?(n.set("transforming",!0),d(s).then(c).catch(h=>{bn(`[zag-js/file-upload] error transforming files
2
2
  ${h}`)}).finally(()=>{n.set("transforming",!1)})):c(s)},removeFile({context:e,event:t}){if(t.itemType==="rejected"){const n=e.get("rejectedFiles").filter(o=>!dr(o.file,t.file));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter(o=>!dr(o,t.file));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}};Y()(["accept","acceptedFiles","allowDrop","capture","defaultAcceptedFiles","dir","directory","disabled","getRootNode","id","ids","invalid","locale","maxFiles","maxFileSize","minFileSize","name","onFileAccept","onFileChange","onFileReject","preventDocumentDrop","required","transformFiles","translations","validate"]);Y()(["file","type"]);const XO=(e={},t)=>{const n=Yt(),o=Kt(Xt),i=_n(Cn),a=Qn(),r=F(()=>{const l=Me(e);return{id:n,ids:{label:a?.value.ids.label,hiddenInput:a?.value.ids.control},dir:i.value.dir,disabled:a?.value.disabled,invalid:a?.value.invalid,locale:i.value.locale,required:a?.value.required,getRootNode:o?.value.getRootNode,...Jn(l),onFileChange:c=>{var d;t?.("update:acceptedFiles",c.acceptedFiles),t?.("fileChange",c),(d=l.onFileChange)==null||d.call(l,c)},onFileAccept:c=>{var d;t?.("fileAccept",c),(d=l.onFileAccept)==null||d.call(l,c)},onFileReject:c=>{var d;t?.("fileReject",c),(d=l.onFileReject)==null||d.call(l,c)}}}),s=Dt(KO,r);return F(()=>qO(s,qt))},ZO=P({__name:"file-upload-root",props:wn({accept:{},defaultAcceptedFiles:{},allowDrop:{type:Boolean},capture:{},directory:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},locale:{},maxFileSize:{},maxFiles:{},minFileSize:{},name:{},preventDocumentDrop:{type:Boolean},required:{type:Boolean},translations:{},validate:{type:Function},transformFiles:{type:Function},asChild:{type:Boolean}},{allowDrop:void 0,directory:void 0,disabled:void 0,invalid:void 0,preventDocumentDrop:void 0,required:void 0}),emits:["update:acceptedFiles","fileAccept","fileChange","fileReject"],setup(e,{emit:t}){const n=XO(e,t);return zv(n),q(),(o,i)=>(C(),T(b(X).div,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),JO=P({__name:"file-upload-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ut();return q(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),ft=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:mO,Context:vO,Dropzone:bO,HiddenInput:yO,Item:IO,ItemDeleteTrigger:wO,ItemGroup:kO,ItemName:SO,ItemPreview:OO,ItemPreviewImage:EO,ItemSizeText:$O,Label:TO,Root:ZO,RootProvider:PO,Trigger:JO},Symbol.toStringTag,{value:"Module"})),QO=Symbol(),rp=Object.getPrototypeOf,Zc=new WeakMap,e$=e=>e&&(Zc.has(e)?Zc.get(e):rp(e)===Object.prototype||rp(e)===Array.prototype),t$=e=>e$(e)&&e[QO]||null,sp=(e,t=!0)=>{Zc.set(e,t)};function n$(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Gv(e,t){const n=n$();return n?(n[e]||(n[e]=t()),n[e]):t()}var Qr=Gv("__zag__refSet",()=>new WeakSet),o$=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,i$=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,a$=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",r$=e=>o$(e)||i$(e)||a$(e),Jc=e=>e!==null&&typeof e=="object",lp=e=>Jc(e)&&!Qr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!r$(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),ho=Gv("__zag__proxyStateMap",()=>new WeakMap),s$=(e=Object.is,t=(s,l)=>new Proxy(s,l),n=new WeakMap,o=(s,l)=>{const c=n.get(s);if(c?.[0]===l)return c[1];const d=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s));return sp(d,!0),n.set(s,[l,d]),Reflect.ownKeys(s).forEach(h=>{const u=Reflect.get(s,h);Qr.has(u)?(sp(u,!1),d[h]=u):ho.has(u)?d[h]=d$(u):d[h]=u}),Object.freeze(d)},i=new WeakMap,a=[1,1],r=s=>{if(!Jc(s))throw new Error("object required");const l=i.get(s);if(l)return l;let c=a[0];const d=new Set,h=(S,O=++a[0])=>{c!==O&&(c=O,d.forEach(_=>_(S,O)))};let u=a[1];const p=(S=++a[1])=>(u!==S&&!d.size&&(u=S,g.forEach(([O])=>{const _=O[1](S);_>c&&(c=_)})),c),m=S=>(O,_)=>{const E=[...O];E[1]=[S,...E[1]],h(E,_)},g=new Map,v=(S,O)=>{if(d.size){const _=O[3](m(S));g.set(S,[O,_])}else g.set(S,[O])},f=S=>{var O;const _=g.get(S);_&&(g.delete(S),(O=_[1])==null||O.call(_))},y=S=>(d.add(S),d.size===1&&g.forEach(([O,_],E)=>{const V=O[3](m(E));g.set(E,[O,V])}),()=>{d.delete(S),d.size===0&&g.forEach(([O,_],E)=>{_&&(_(),g.set(E,[O]))})}),x=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),w=t(x,{deleteProperty(S,O){const _=Reflect.get(S,O);f(O);const E=Reflect.deleteProperty(S,O);return E&&h(["delete",[O],_]),E},set(S,O,_,E){var V;const $=Reflect.has(S,O),R=Reflect.get(S,O,E);if($&&(e(R,_)||i.has(_)&&e(R,i.get(_))))return!0;f(O),Jc(_)&&(_=t$(_)||_);let K=_;if(!((V=Object.getOwnPropertyDescriptor(S,O))!=null&&V.set)){!ho.has(_)&&lp(_)&&(K=Uv(_));const D=!Qr.has(K)&&ho.get(K);D&&v(O,D)}return Reflect.set(S,O,K,E),h(["set",[O],_,R]),!0}});i.set(s,w);const k=[x,p,o,y];return ho.set(w,k),Reflect.ownKeys(s).forEach(S=>{const O=Object.getOwnPropertyDescriptor(s,S);O.get||O.set?Object.defineProperty(x,S,O):w[S]=s[S]}),w})=>[r,ho,Qr,e,t,lp,n,o,i,a],[l$]=s$();function Uv(e={}){return l$(e)}function c$(e,t,n){const o=ho.get(e);let i;const a=[],r=o[3];let s=!1;const l=r(c=>{a.push(c),i||(i=Promise.resolve().then(()=>{i=void 0,s&&t(a.splice(0))}))});return s=!0,()=>{s=!1,l()}}function d$(e){const t=ho.get(e),[n,o,i]=t;return i(n,o())}var u$=ie("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control");u$.build();var h$=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`float:${e.id}:trigger`},p$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`float:${e.id}:positioner`},g$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`float:${e.id}:content`},f$=e=>{var t;return((t=e.ids)==null?void 0:t.header)??`float:${e.id}:header`},cp=e=>e.getById(h$(e)),dp=e=>e.getById(p$(e)),up=e=>e.getById(g$(e)),m$=e=>e.getById(f$(e)),Tn=(e,t,n)=>{let o;return ke(t)?o=Im(t):o=JC(e.getWin()),n&&(o=Ma({x:-o.width,y:o.minY,width:o.width*3,height:o.height*2})),Rn(o,["x","y","width","height"])},Li=Uv({stack:[],count(){return this.stack.length},add(e){this.stack.includes(e)||this.stack.push(e)},remove(e){const t=this.stack.indexOf(e);t<0||this.stack.splice(t,1)},bringToFront(e){this.remove(e),this.add(e)},isTopmost(e){return this.stack[this.stack.length-1]===e},indexOf(e){return this.stack.indexOf(e)}}),{not:hp,and:v$}=ze(),b$={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"};hp("isMaximized"),hp("isMinimized"),v$("isOpenControlled","closeOnEsc");Y()(["allowOverflow","closeOnEscape","defaultOpen","defaultPosition","defaultSize","dir","disabled","draggable","getAnchorPosition","getBoundaryEl","getRootNode","gridSize","id","ids","lockAspectRatio","maxSize","minSize","onOpenChange","onPositionChange","onPositionChangeEnd","onSizeChange","onSizeChangeEnd","onStageChange","open","persistRect","position","resizable","size","strategy","translations"]);Y()(["axis"]);var y$=ie("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");y$.build();var x$=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`hover-card:${e.id}:trigger`},w$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`hover-card:${e.id}:content`},C$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`hover-card:${e.id}:popper`},Zl=e=>e.getById(x$(e)),_$=e=>e.getById(w$(e)),pp=e=>e.getById(C$(e)),{not:ur,and:gp}=ze();gp("isOpenControlled",ur("isPointer")),ur("isPointer"),gp("isOpenControlled",ur("isPointer")),ur("isPointer");Y()(["closeDelay","dir","getRootNode","id","ids","disabled","onOpenChange","defaultOpen","open","openDelay","positioning","onInteractOutside","onPointerDownOutside","onFocusOutside"]);var k$={Int8Array:"int8array",Uint8Array:"uint8array",Uint8ClampedArray:"uint8clampedarray",Int16Array:"int16array",Uint16Array:"uint16array",Int32Array:"int32array",Uint32Array:"uint32array",Float32Array:"float32array",Float64Array:"float64array",BigInt64Array:"bigint64array",BigUint64Array:"biguint64array"};Object.fromEntries(Object.entries(k$).map(([e,t])=>[t,e]));const[Yv,He]=we("TreeViewContext"),[S$,kt]=we("TreeViewNodePropsContext"),E$=P({__name:"tree-view-branch-content",props:{asChild:{type:Boolean}},setup(e){const t=yC(),n=He(),o=kt(),i=F(()=>{const a=n.value.getBranchContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return q(),(a,r)=>(C(),T(b(Em).Content,W(i.value,{"as-child":e.asChild}),{default:I(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),O$=P({__name:"tree-view-branch-control",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchControlProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),$$=P({__name:"tree-view-branch-indent-guide",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchIndentGuideProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),I$=P({__name:"tree-view-branch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchIndicatorProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),T$=P({__name:"tree-view-branch-text",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).span,W(b(t).getBranchTextProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),P$=P({__name:"tree-view-branch-trigger",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchTriggerProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[V$,xu]=we("TreeViewNodeContext"),D$=P({__name:"tree-view-branch",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt(),o=xu(),i=qd(),a=F(()=>t.value.getBranchContentProps(n));return q(),(r,s)=>(C(),T(b(Em).Root,W({open:b(o).expanded,ids:{content:a.value.id}},b(t).getBranchProps(b(n)),{"lazy-mount":b(i).lazyMount,"unmount-on-exit":b(i).unmountOnExit,"as-child":e.asChild}),{default:I(()=>[L(r.$slots,"default")]),_:3},16,["open","ids","lazy-mount","unmount-on-exit","as-child"]))}}),M$=P({__name:"tree-view-context",setup(e){const t=He();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),R$=P({__name:"tree-view-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemIndicatorProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),F$=P({__name:"tree-view-item-text",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).span,W(b(t).getItemTextProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),A$=P({__name:"tree-view-item",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),L$=P({__name:"tree-view-label",props:{asChild:{type:Boolean}},setup(e){const t=He();return q(),(n,o)=>(C(),T(b(X).h3,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),N$=P({__name:"tree-view-node-checkbox",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).span,W(b(t).getNodeCheckboxProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),B$=P({__name:"tree-view-node-checkbox-indicator",props:{indeterminate:{},fallback:{}},setup(e){const t=xu();return(n,o)=>b(t).checked==="indeterminate"?L(n.$slots,"indeterminate",{key:0}):b(t).checked===!0?L(n.$slots,"default",{key:1}):L(n.$slots,"fallback",{key:2})}}),z$=P({__name:"tree-view-node-rename-input",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=kt();return q(),(o,i)=>(C(),T(b(X).input,W(b(t).getNodeRenameInputProps(b(n)),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),H$=P({__name:"tree-view-node-context",setup(e){const t=xu();return(n,o)=>L(n.$slots,"default",et(lt(b(t))))}}),qv=P({__name:"tree-view-node-provider",props:{node:{},indexPath:{}},setup(e){const t=e,n=He(),o=F(()=>n.value.getNodeState(t));return V$(o),S$(t),q(),(i,a)=>L(i.$slots,"default")}}),j$=P({__name:"tree-view-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=F(()=>t.value);return Yv(n),yi(F(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),q(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var Kv=ie("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),We=Kv.build(),Xv=e=>new Jd(e);Xv.empty=()=>new Jd({rootNode:{children:[]}});var W$=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tree:${e.id}:root`},fp=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`tree:${e.id}:label`},Zv=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.node)==null?void 0:o.call(n,t))??`tree:${e.id}:node:${t}`},Jl=e=>{var t;return((t=e.ids)==null?void 0:t.tree)??`tree:${e.id}:tree`},Et=(e,t)=>{var n;t!=null&&((n=e.getById(Zv(e,t)))==null||n.focus())},Jv=(e,t)=>`tree:${e.id}:rename-input:${t}`,mp=(e,t)=>e.getById(Jv(e,t));function Qv(e,t,n){const o=e.getNodeValue(t);if(!e.isBranchNode(t))return n.includes(o);const i=e.getDescendantValues(o),a=i.every(s=>n.includes(s)),r=i.some(s=>n.includes(s));return a?!0:r?"indeterminate":!1}function G$(e,t,n){const o=e.getDescendantValues(t),i=o.every(a=>n.includes(a));return Ht(i?Co(n,...o):un(n,...o))}function U$(e,t){const n=new Map;return e.visit({onEnter:o=>{const i=e.getNodeValue(o),a=e.isBranchNode(o),r=Qv(e,o,t);n.set(i,{type:a?"branch":"leaf",checked:r})}}),n}function Y$(e,t){const{context:n,scope:o,computed:i,prop:a,send:r}=e,s=a("collection"),l=Array.from(n.get("expandedValue")),c=Array.from(n.get("selectedValue")),d=Array.from(n.get("checkedValue")),h=i("isTypingAhead"),u=n.get("focusedValue"),p=n.get("loadingStatus"),m=n.get("renamingValue");function g(v){const{node:f,indexPath:y}=v,x=s.getNodeValue(f),w=s.getFirstNode(),k=w?s.getNodeValue(w):null;return{id:Zv(o,x),value:x,indexPath:y,valuePath:s.getValuePath(y),disabled:!!f.disabled,focused:u==null?k==x:u===x,selected:c.includes(x),expanded:l.includes(x),loading:p[x]==="loading",depth:y.length,isBranch:s.isBranchNode(f),renaming:m===x,get checked(){return Qv(s,f,d)}}}return{collection:s,expandedValue:l,selectedValue:c,checkedValue:d,toggleChecked(v,f){r({type:"CHECKED.TOGGLE",value:v,isBranch:f})},setChecked(v){r({type:"CHECKED.SET",value:v})},clearChecked(){r({type:"CHECKED.CLEAR"})},getCheckedMap(){return U$(s,d)},expand(v){r({type:v?"BRANCH.EXPAND":"EXPANDED.ALL",value:v})},collapse(v){r({type:v?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:v})},deselect(v){r({type:v?"NODE.DESELECT":"SELECTED.CLEAR",value:v})},select(v){r({type:v?"NODE.SELECT":"SELECTED.ALL",value:v,isTrusted:!1})},getVisibleNodes(){return i("visibleNodes").map(({node:v})=>v)},focus(v){Et(o,v)},selectParent(v){const f=s.getParentNode(v);if(!f)return;const y=un(c,s.getNodeValue(f));r({type:"SELECTED.SET",value:y,src:"select.parent"})},expandParent(v){const f=s.getParentNode(v);if(!f)return;const y=un(l,s.getNodeValue(f));r({type:"EXPANDED.SET",value:y,src:"expand.parent"})},setExpandedValue(v){const f=Ht(v);r({type:"EXPANDED.SET",value:f})},setSelectedValue(v){const f=Ht(v);r({type:"SELECTED.SET",value:f})},startRenaming(v){r({type:"NODE.RENAME",value:v})},submitRenaming(v,f){r({type:"RENAME.SUBMIT",value:v,label:f})},cancelRenaming(){r({type:"RENAME.CANCEL"})},getRootProps(){return t.element({...We.root.attrs,id:W$(o),dir:a("dir")})},getLabelProps(){return t.element({...We.label.attrs,id:fp(o),dir:a("dir")})},getTreeProps(){return t.element({...We.tree.attrs,id:Jl(o),dir:a("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":fp(o),"aria-multiselectable":a("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(v){if(v.defaultPrevented||$c(v))return;const f=be(v);if(Xs(f))return;const y=f?.closest("[data-part=branch-control], [data-part=item]");if(!y)return;const x=y.dataset.value;if(x==null){console.warn("[zag-js/tree-view] Node id not found for node",y);return}const w=y.matches("[data-part=branch-control]"),k={ArrowDown(_){En(_)||(_.preventDefault(),r({type:"NODE.ARROW_DOWN",id:x,shiftKey:_.shiftKey}))},ArrowUp(_){En(_)||(_.preventDefault(),r({type:"NODE.ARROW_UP",id:x,shiftKey:_.shiftKey}))},ArrowLeft(_){En(_)||y.dataset.disabled||(_.preventDefault(),r({type:w?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:x}))},ArrowRight(_){!w||y.dataset.disabled||(_.preventDefault(),r({type:"BRANCH_NODE.ARROW_RIGHT",id:x}))},Home(_){En(_)||(_.preventDefault(),r({type:"NODE.HOME",id:x,shiftKey:_.shiftKey}))},End(_){En(_)||(_.preventDefault(),r({type:"NODE.END",id:x,shiftKey:_.shiftKey}))},Space(_){var E;y.dataset.disabled||(h?r({type:"TREE.TYPEAHEAD",key:_.key}):(E=k.Enter)==null||E.call(k,_))},Enter(_){y.dataset.disabled||Go(f)&&En(_)||(r({type:w?"BRANCH_NODE.CLICK":"NODE.CLICK",id:x,src:"keyboard"}),Go(f)||_.preventDefault())},"*"(_){y.dataset.disabled||(_.preventDefault(),r({type:"SIBLINGS.EXPAND",id:x}))},a(_){!_.metaKey||y.dataset.disabled||(_.preventDefault(),r({type:"SELECTED.ALL",moveFocus:!0}))},F2(_){if(y.dataset.disabled)return;const E=a("canRename");if(!E)return;const V=s.getIndexPath(x);if(V){const $=s.at(V);if($&&!E($,V))return}_.preventDefault(),r({type:"NODE.RENAME",value:x})}},S=Ic(v,{dir:a("dir")}),O=k[S];if(O){O(v);return}vn.isValidEvent(v)&&(r({type:"TREE.TYPEAHEAD",key:v.key,id:x}),v.preventDefault())}})},getNodeState:g,getItemProps(v){const f=g(v);return t.element({...We.item.attrs,id:f.id,dir:a("dir"),"data-ownedby":Jl(o),"data-path":v.indexPath.join("/"),"data-value":f.value,tabIndex:f.focused?0:-1,"data-focus":j(f.focused),role:"treeitem","aria-current":f.selected?"true":void 0,"aria-selected":f.disabled?void 0:f.selected,"data-selected":j(f.selected),"aria-disabled":na(f.disabled),"data-disabled":j(f.disabled),"data-renaming":j(f.renaming),"aria-level":f.depth,"data-depth":f.depth,style:{"--depth":f.depth},onFocus(y){y.stopPropagation(),r({type:"NODE.FOCUS",id:f.value})},onClick(y){if(f.disabled||!Nr(y)||Go(y.currentTarget)&&En(y))return;const x=y.metaKey||y.ctrlKey;r({type:"NODE.CLICK",id:f.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation(),Go(y.currentTarget)||y.preventDefault()}})},getItemTextProps(v){const f=g(v);return t.element({...We.itemText.attrs,"data-disabled":j(f.disabled),"data-selected":j(f.selected),"data-focus":j(f.focused)})},getItemIndicatorProps(v){const f=g(v);return t.element({...We.itemIndicator.attrs,"aria-hidden":!0,"data-disabled":j(f.disabled),"data-selected":j(f.selected),"data-focus":j(f.focused),hidden:!f.selected})},getBranchProps(v){const f=g(v);return t.element({...We.branch.attrs,"data-depth":f.depth,dir:a("dir"),"data-branch":f.value,role:"treeitem","data-ownedby":Jl(o),"data-value":f.value,"aria-level":f.depth,"aria-selected":f.disabled?void 0:f.selected,"data-path":v.indexPath.join("/"),"data-selected":j(f.selected),"aria-expanded":f.expanded,"data-state":f.expanded?"open":"closed","aria-disabled":na(f.disabled),"data-disabled":j(f.disabled),"data-loading":j(f.loading),"aria-busy":na(f.loading),style:{"--depth":f.depth}})},getBranchIndicatorProps(v){const f=g(v);return t.element({...We.branchIndicator.attrs,"aria-hidden":!0,"data-state":f.expanded?"open":"closed","data-disabled":j(f.disabled),"data-selected":j(f.selected),"data-focus":j(f.focused),"data-loading":j(f.loading)})},getBranchTriggerProps(v){const f=g(v);return t.element({...We.branchTrigger.attrs,role:"button",dir:a("dir"),"data-disabled":j(f.disabled),"data-state":f.expanded?"open":"closed","data-value":f.value,"data-loading":j(f.loading),disabled:f.loading,onClick(y){f.disabled||f.loading||(r({type:"BRANCH_TOGGLE.CLICK",id:f.value}),y.stopPropagation())}})},getBranchControlProps(v){const f=g(v);return t.element({...We.branchControl.attrs,role:"button",id:f.id,dir:a("dir"),tabIndex:f.focused?0:-1,"data-path":v.indexPath.join("/"),"data-state":f.expanded?"open":"closed","data-disabled":j(f.disabled),"data-selected":j(f.selected),"data-focus":j(f.focused),"data-renaming":j(f.renaming),"data-value":f.value,"data-depth":f.depth,"data-loading":j(f.loading),"aria-busy":na(f.loading),onFocus(y){r({type:"NODE.FOCUS",id:f.value}),y.stopPropagation()},onClick(y){if(f.disabled||f.loading||!Nr(y)||Go(y.currentTarget)&&En(y))return;const x=y.metaKey||y.ctrlKey;r({type:"BRANCH_NODE.CLICK",id:f.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation()}})},getBranchTextProps(v){const f=g(v);return t.element({...We.branchText.attrs,dir:a("dir"),"data-disabled":j(f.disabled),"data-state":f.expanded?"open":"closed","data-loading":j(f.loading)})},getBranchContentProps(v){const f=g(v);return t.element({...We.branchContent.attrs,role:"group",dir:a("dir"),"data-state":f.expanded?"open":"closed","data-depth":f.depth,"data-path":v.indexPath.join("/"),"data-value":f.value,hidden:!f.expanded})},getBranchIndentGuideProps(v){const f=g(v);return t.element({...We.branchIndentGuide.attrs,"data-depth":f.depth})},getNodeCheckboxProps(v){const f=g(v),y=f.checked;return t.element({...We.nodeCheckbox.attrs,tabIndex:-1,role:"checkbox","data-state":y===!0?"checked":y===!1?"unchecked":"indeterminate","aria-checked":y===!0?"true":y===!1?"false":"mixed","data-disabled":j(f.disabled),onClick(x){if(x.defaultPrevented||f.disabled||!Nr(x))return;r({type:"CHECKED.TOGGLE",value:f.value,isBranch:f.isBranch}),x.stopPropagation();const w=x.currentTarget.closest("[role=treeitem]");w?.focus({preventScroll:!0})}})},getNodeRenameInputProps(v){const f=g(v);return t.input({...We.nodeRenameInput.attrs,id:Jv(o,f.value),type:"text","aria-label":"Rename tree item",hidden:!f.renaming,onKeyDown(y){$c(y)||(y.key==="Escape"&&(r({type:"RENAME.CANCEL"}),y.preventDefault()),y.key==="Enter"&&(r({type:"RENAME.SUBMIT",label:y.currentTarget.value}),y.preventDefault()),y.stopPropagation())},onBlur(y){r({type:"RENAME.SUBMIT",label:y.currentTarget.value})}})}}}function hr(e,t){const{context:n,prop:o,refs:i}=e;if(!o("loadChildren")){n.set("expandedValue",g=>Ht(un(g,...t)));return}const a=n.get("loadingStatus"),[r,s]=Uu(t,g=>a[g]==="loaded");if(r.length>0&&n.set("expandedValue",g=>Ht(un(g,...r))),s.length===0)return;const l=o("collection"),[c,d]=Uu(s,g=>{const v=l.findNode(g);return l.getNodeChildren(v).length>0});if(c.length>0&&n.set("expandedValue",g=>Ht(un(g,...c))),d.length===0)return;n.set("loadingStatus",g=>({...g,...d.reduce((v,f)=>({...v,[f]:"loading"}),{})}));const h=d.map(g=>{const v=l.getIndexPath(g),f=l.getValuePath(v),y=l.findNode(g);return{id:g,indexPath:v,valuePath:f,node:y}}),u=i.get("pendingAborts"),p=o("loadChildren");Ud(p,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");const m=h.map(({id:g,indexPath:v,valuePath:f,node:y})=>{const x=u.get(g);x&&(x.abort(),u.delete(g));const w=new AbortController;return u.set(g,w),p({valuePath:f,indexPath:v,node:y,signal:w.signal})});Promise.allSettled(m).then(g=>{var v,f;const y=[],x=[],w=n.get("loadingStatus");let k=o("collection");g.forEach((S,O)=>{const{id:_,indexPath:E,node:V,valuePath:$}=h[O];S.status==="fulfilled"?(w[_]="loaded",y.push(_),k=k.replace(E,{...V,children:S.value})):(u.delete(_),Reflect.deleteProperty(w,_),x.push({node:V,error:S.reason,indexPath:E,valuePath:$}))}),n.set("loadingStatus",w),y.length&&(n.set("expandedValue",S=>Ht(un(S,...y))),(v=o("onLoadChildrenComplete"))==null||v({collection:k})),x.length&&((f=o("onLoadChildrenError"))==null||f({nodes:x}))})}function Pn(e){const{prop:t,context:n}=e;return function({indexPath:o}){return t("collection").getValuePath(o).slice(0,-1).some(i=>!n.get("expandedValue").includes(i))}}var{and:Rt}=ze(),q$={props({props:e}){return{selectionMode:"single",collection:Xv.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[],...e}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{expandedValue:t(()=>({defaultValue:e("defaultExpandedValue"),value:e("expandedValue"),isEqual:Ne,onChange(o){var i;const a=n().get("focusedValue");(i=e("onExpandedChange"))==null||i({expandedValue:o,focusedValue:a,get expandedNodes(){return e("collection").findNodes(o)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:Ne,onChange(o){var i;const a=n().get("focusedValue");(i=e("onSelectionChange"))==null||i({selectedValue:o,focusedValue:a,get selectedNodes(){return e("collection").findNodes(o)}})}})),focusedValue:t(()=>({defaultValue:e("defaultFocusedValue")||null,value:e("focusedValue"),onChange(o){var i;(i=e("onFocusChange"))==null||i({focusedValue:o,get focusedNode(){return o?e("collection").findNode(o):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:e("defaultCheckedValue")||[],value:e("checkedValue"),isEqual:Ne,onChange(o){var i;(i=e("onCheckedChange"))==null||i({checkedValue:o})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:{...vn.defaultOptions},pendingAborts:new Map}},computed:{isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:e,context:t})=>{const n=[];return e("collection").visit({skip:Pn({prop:e,context:t}),onEnter:(o,i)=>{n.push({node:o,indexPath:i})}}),n}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:Rt("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:Rt("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Rt("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:Rt("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Rt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Rt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Rt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Rt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Rt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Rt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:e,event:t})=>e.get("focusedValue")===t.id,isBranchExpanded:({context:e,event:t})=>e.get("expandedValue").includes(t.id),isShiftKey:({event:e})=>e.shiftKey,isCtrlKey:({event:e})=>e.ctrlKey,hasSelectedItems:({context:e})=>e.get("selectedValue").length>0,isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",moveFocus:({event:e})=>!!e.moveFocus,expandOnClick:({prop:e})=>!!e("expandOnClick"),isRenameLabelValid:({event:e})=>e.label.trim()!==""},actions:{selectNode({context:e,event:t}){const n=t.id||t.value;e.set("selectedValue",o=>n==null?o:!t.isTrusted&&ei(n)?o.concat(...n):[ei(n)?ol(n):n].filter(Boolean))},deselectNode({context:e,event:t}){const n=zr(t.id||t.value);e.set("selectedValue",o=>Co(o,...n))},setFocusedNode({context:e,event:t}){e.set("focusedValue",t.id)},clearFocusedNode({context:e}){e.set("focusedValue",null)},clearSelectedItem({context:e}){e.set("selectedValue",[])},toggleBranchNode({context:e,event:t,action:n}){const o=e.get("expandedValue").includes(t.id);n(o?["collapseBranch"]:["expandBranch"])},expandBranch(e){const{event:t}=e;hr(e,[t.id])},expandBranches(e){const{context:t,event:n}=e,o=zr(n.value);hr(e,Fl(o,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>Co(n,t.id))},collapseBranches(e){const{context:t,event:n}=e,o=zr(n.value);t.set("expandedValue",i=>Co(i,...o))},setExpanded({context:e,event:t}){ei(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){ei(t.value)&&e.set("selectedValue",t.value)},clearSelected({context:e}){e.set("selectedValue",[])},focusTreeFirstNode({prop:e,scope:t}){const n=e("collection"),o=n.getFirstNode(),i=n.getNodeValue(o);Et(t,i)},focusTreeLastNode(e){const{prop:t,scope:n}=e,o=t("collection"),i=o.getLastNode(void 0,{skip:Pn(e)}),a=o.getNodeValue(i);Et(n,a)},focusBranchFirstNode({event:e,prop:t,scope:n}){const o=t("collection"),i=o.findNode(e.id),a=o.getFirstNode(i),r=o.getNodeValue(a);Et(n,r)},focusTreeNextNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getNextNode(t.id,{skip:Pn(e)});if(!a)return;const r=i.getNodeValue(a);Et(o,r)},focusTreePrevNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getPreviousNode(t.id,{skip:Pn(e)});if(!a)return;const r=i.getNodeValue(a);Et(o,r)},focusBranchNode({event:e,prop:t,scope:n}){const o=t("collection"),i=o.getParentNode(e.id),a=i?o.getNodeValue(i):void 0;Et(n,a)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){const{context:t,prop:n,refs:o,event:i,scope:a,computed:r}=e,s=r("visibleNodes").map(({node:c})=>({textContent:n("collection").stringifyNode(c),id:n("collection").getNodeValue(c)})),l=vn(s,{state:o.get("typeaheadState"),activeId:t.get("focusedValue"),key:i.key});Et(a,l?.id)},toggleNodeSelection({context:e,event:t}){const n=So(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){const{context:t,prop:n}=e,o=n("collection").getBranchValues(),i=Fl(o,t.get("expandedValue"));hr(e,i)},expandSiblingBranches(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getIndexPath(n.id);if(!a)return;const r=i.getSiblingNodes(a).map(l=>i.getNodeValue(l)),s=Fl(r,t.get("expandedValue"));hr(e,s)},extendSelectionToNode(e){const{context:t,event:n,prop:o,computed:i}=e,a=o("collection"),r=ii(t.get("selectedValue"))||a.getNodeValue(a.getFirstNode()),s=n.id;let l=[r,s],c=0;i("visibleNodes").forEach(({node:d})=>{const h=a.getNodeValue(d);c===1&&l.push(h),(h===r||h===s)&&c++}),t.set("selectedValue",Ht(l))},extendSelectionToNextNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getNextNode(n.id,{skip:Pn(e)});if(!a)return;const r=new Set(t.get("selectedValue")),s=i.getNodeValue(a);s!=null&&(r.has(n.id)&&r.has(s)?r.delete(n.id):r.has(s)||r.add(s),t.set("selectedValue",Array.from(r)))},extendSelectionToPrevNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getPreviousNode(n.id,{skip:Pn(e)});if(!a)return;const r=new Set(t.get("selectedValue")),s=i.getNodeValue(a);s!=null&&(r.has(n.id)&&r.has(s)?r.delete(n.id):r.has(s)||r.add(s),t.set("selectedValue",Array.from(r)))},extendSelectionToFirstNode(e){const{context:t,prop:n}=e,o=n("collection"),i=ii(t.get("selectedValue")),a=[];o.visit({skip:Pn(e),onEnter:r=>{const s=o.getNodeValue(r);if(a.push(s),s===i)return"stop"}}),t.set("selectedValue",a)},extendSelectionToLastNode(e){const{context:t,prop:n}=e,o=n("collection"),i=ii(t.get("selectedValue")),a=[];let r=!1;o.visit({skip:Pn(e),onEnter:s=>{const l=o.getNodeValue(s);l===i&&(r=!0),r&&a.push(l)}}),t.set("selectedValue",a)},clearPendingAborts({refs:e}){const t=e.get("pendingAborts");t.forEach(n=>n.abort()),t.clear()},toggleChecked({context:e,event:t,prop:n}){const o=n("collection");e.set("checkedValue",i=>t.isBranch?G$(o,t.value,i):So(i,t.value))},setChecked({context:e,event:t}){e.set("checkedValue",t.value)},clearChecked({context:e}){e.set("checkedValue",[])},setRenamingValue({context:e,event:t,prop:n}){e.set("renamingValue",t.value);const o=n("onRenameStart");if(o){const i=n("collection"),a=i.getIndexPath(t.value);if(a){const r=i.at(a);r&&o({value:t.value,node:r,indexPath:a})}}},submitRenaming({context:e,event:t,prop:n,scope:o}){var i;const a=e.get("renamingValue");if(!a)return;const r=n("collection").getIndexPath(a);if(!r)return;const s=t.label.trim(),l=n("onBeforeRename");if(l&&!l({value:a,label:s,indexPath:r})){e.set("renamingValue",null),Et(o,a);return}(i=n("onRenameComplete"))==null||i({value:a,label:s,indexPath:r}),e.set("renamingValue",null),Et(o,a)},cancelRenaming({context:e,scope:t}){const n=e.get("renamingValue");e.set("renamingValue",null),n&&Et(t,n)},syncRenameInput({context:e,scope:t,prop:n}){const o=e.get("renamingValue");if(!o)return;const i=n("collection"),a=i.findNode(o);if(!a)return;const r=i.stringifyNode(a),s=mp(t,o);Ot(s,r)},focusRenameInput({context:e,scope:t}){const n=e.get("renamingValue");if(!n)return;const o=mp(t,n);o&&(o.focus(),o.select())}}}};Y()(["ids","collection","dir","expandedValue","expandOnClick","defaultFocusedValue","focusedValue","getRootNode","id","onExpandedChange","onFocusChange","onSelectionChange","checkedValue","selectedValue","selectionMode","typeahead","defaultExpandedValue","defaultSelectedValue","defaultCheckedValue","onCheckedChange","onLoadChildrenComplete","onLoadChildrenError","loadChildren","canRename","onRenameStart","onBeforeRename","onRenameComplete"]);Y()(["node","indexPath"]);const eb=(e,t)=>{const n=Yt(),o=Kt(Xt),i=_n(Cn),a=F(()=>{const s=Me(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Jn(s),onFocusChange:l=>{var c;t?.("focusChange",l),t?.("update:focusedValue",l.focusedValue),(c=s.onFocusChange)==null||c.call(s,l)},onExpandedChange:l=>{var c;t?.("expandedChange",l),t?.("update:expandedValue",l.expandedValue),(c=s.onExpandedChange)==null||c.call(s,l)},onSelectionChange:l=>{var c;t?.("selectionChange",l),t?.("update:selectedValue",l.selectedValue),(c=s.onSelectionChange)==null||c.call(s,l)},onCheckedChange:l=>{var c;t?.("checkedChange",l),t?.("update:checkedValue",l.checkedValue),(c=s.onCheckedChange)==null||c.call(s,l)},onLoadChildrenComplete:l=>{var c;t?.("loadChildrenComplete",l),(c=s.onLoadChildrenComplete)==null||c.call(s,l)},onLoadChildrenError:l=>{var c;t?.("loadChildrenError",l),(c=s.onLoadChildrenError)==null||c.call(s,l)},onRenameStart:l=>{var c;t?.("renameStart",l),(c=s.onRenameStart)==null||c.call(s,l)},onBeforeRename:l=>{var c;return t?.("beforeRename",l),((c=s.onBeforeRename)==null?void 0:c.call(s,l))??!0},onRenameComplete:l=>{var c;t?.("renameComplete",l),(c=s.onRenameComplete)==null||c.call(s,l)}}}),r=Dt(q$,a);return F(()=>Y$(r,qt))},tb=P({__name:"tree-view-root",props:wn({collection:{},defaultExpandedValue:{},defaultSelectedValue:{},defaultCheckedValue:{},defaultFocusedValue:{},checkedValue:{},expandOnClick:{type:Boolean},expandedValue:{},focusedValue:{},id:{},ids:{},selectedValue:{},selectionMode:{},typeahead:{type:Boolean},loadChildren:{type:Function},canRename:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{expandOnClick:void 0,typeahead:void 0,lazyMount:void 0,unmountOnExit:void 0,asChild:void 0}),emits:["expandedChange","focusChange","selectionChange","checkedChange","loadChildrenComplete","loadChildrenError","renameStart","beforeRename","renameComplete","update:expandedValue","update:focusedValue","update:selectedValue","update:checkedValue"],setup(e,{emit:t}){const n=e,o=eb(n,t);return Yv(o),yi(F(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),q(),(i,a)=>(C(),T(b(X).div,W(b(o).getRootProps(),{"as-child":e.asChild}),{default:I(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),nb=P({__name:"tree-view-tree",props:{asChild:{type:Boolean}},setup(e){const t=He();return q(),(n,o)=>(C(),T(b(X).div,W(b(t).getTreeProps(),{"as-child":e.asChild}),{default:I(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),kn=Object.freeze(Object.defineProperty({__proto__:null,Branch:D$,BranchContent:E$,BranchControl:O$,BranchIndentGuide:$$,BranchIndicator:I$,BranchText:T$,BranchTrigger:P$,Context:M$,Item:A$,ItemIndicator:R$,ItemText:F$,Label:L$,NodeCheckbox:N$,NodeCheckboxIndicator:B$,NodeContext:H$,NodeProvider:qv,NodeRenameInput:z$,Root:tb,RootProvider:j$,Tree:nb},Symbol.toStringTag,{value:"Module"}));var ob=ie("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText");ob.build();var ib=e=>new Mo(e);ib.empty=()=>new Mo({items:[]});var K$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},X$=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`select:${e.id}:option:${t}`},vp=e=>e.getById(K$(e)),bp=(e,t)=>e.getById(X$(e,t)),{guards:Z$,createMachine:J$}=sl(),{or:Q$}=Z$;J$({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:ib.empty(),orientation:"vertical",selectionMode:"single",...e}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Ne,onChange(n){var o;const i=e("collection").findMany(n);return(o=e("onValueChange"))==null?void 0:o({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(n){var o;(o=e("onHighlightChange"))==null||o({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{const n=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(n)}}),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:{...vn.defaultOptions},focusVisible:!1}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{const n=new p_(e.get("value"));return n.selectionMode=t("selectionMode"),n.deselectable=!!t("deselectable"),n},multiple:({prop:e})=>e("selectionMode")==="multiple"||e("selectionMode")==="extended",valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState(){return"idle"},watch({context:e,prop:t,track:n,action:o}){n([()=>e.get("value").toString()],()=>{o(["syncSelectedItems"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{o(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused"]},"CONTENT.FOCUS":[{guard:Q$("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>e.get("highlightedValue")!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>{var n;return ul({root:(n=e.getRootNode)==null?void 0:n.call(e),onChange(o){t.set("focusVisible",o.isFocusVisible)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){const o=i=>{const a=e.get("highlightedValue");if(a==null||U1()!=="keyboard")return;const r=vp(n),s=t("scrollToIndexFn");if(s){const c=t("collection").indexOf(a);s?.({index:c,immediate:i,getElement(){return bp(n,a)}});return}const l=bp(n,a);xa(l,{rootEl:r,block:"nearest"})};return J(()=>o(!0)),Da(()=>vp(n),{defer:!0,attributes:["data-activedescendant"],callback(){o(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:o}){const i=n.value??e.get("highlightedValue"),a=t("collection");if(i==null||!a.has(i))return;const r=o("selection");if(n.shiftKey&&o("multiple")&&n.anchorValue){const s=r.extendSelection(a,n.anchorValue,i);Ni(r,s,t("onSelect")),e.set("value",Array.from(s))}else{const s=r.select(a,i,n.metaKey);Ni(r,s,t("onSelect")),e.set("value",Array.from(s))}},selectWithKeyboard({context:e,prop:t,event:n,computed:o}){const i=o("selection"),a=t("collection");if(n.shiftKey&&o("multiple")&&n.anchorValue){const r=i.extendSelection(a,n.anchorValue,n.value);Ni(i,r,t("onSelect")),e.set("value",Array.from(r));return}if(t("selectOnHighlight")){const r=i.replaceSelection(a,n.value);Ni(i,r,t("onSelect")),e.set("value",Array.from(r))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:o}){const i=t("collection").search(n.key,{state:o.get("typeahead"),currentValue:e.get("highlightedValue")});i!=null&&e.set("highlightedValue",i)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n,computed:o}){const i=t("collection"),a=o("selection"),r=a.select(i,n.value);Ni(a,r,t("onSelect")),e.set("value",Array.from(r))},clearItem({context:e,event:t,computed:n}){const o=n("selection").deselect(t.value);e.set("value",Array.from(o))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){const n=t("collection"),o=e.get("selectedItems"),i=e.get("value").map(a=>o.find(r=>n.getItemValue(r)===a)||n.find(a));e.set("selectedItems",i)},syncHighlightedItem({context:e,prop:t}){const n=t("collection"),o=e.get("highlightedValue"),i=o?n.find(o):null;e.set("highlightedItem",i)},syncHighlightedValue({context:e,prop:t}){const n=t("collection"),o=e.get("highlightedValue");o!=null&&!n.has(o)&&e.set("highlightedValue",null)},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){const n=t("collection").firstValue;n!=null&&e.set("highlightedValue",n)},clearFocused({context:e}){e.set("focused",!1)}}}});var eI=(e,t)=>{const n=new Set(e);for(const o of t)n.delete(o);return n};function Ni(e,t,n){const o=eI(t,e);for(const i of o)n?.({value:i})}Y()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]);Y()(["item","highlightOnHover"]);Y()(["id"]);Y()(["htmlFor"]);ob.extendWith("empty");var tI=ie("marquee").parts("root","viewport","content","edge","item");tI.build();Y()(["autoFill","defaultPaused","delay","dir","getRootNode","id","ids","loopCount","onComplete","onLoopComplete","onPauseChange","paused","pauseOnInteraction","reverse","side","spacing","speed","translations"]);var ab=ie("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem");ab.build();var rb=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`menu:${e.id}:trigger`},nI=e=>{var t;return((t=e.ids)==null?void 0:t.contextTrigger)??`menu:${e.id}:ctx-trigger`},sb=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`menu:${e.id}:content`},oI=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`menu:${e.id}:popper`},Qc=(e,t)=>`${e.id}/${t}`,no=e=>e?.dataset.value??null,Mn=e=>e.getById(sb(e)),yp=e=>e.getById(oI(e)),pr=e=>e.getById(rb(e)),iI=(e,t)=>t?e.getById(Qc(e,t)):null,Ql=e=>e.getById(nI(e)),Ba=e=>{const t=`[role^="menuitem"][data-ownedby=${CSS.escape(sb(e))}]:not([data-disabled])`;return Gn(Mn(e),t)},aI=e=>ii(Ba(e)),rI=e=>ol(Ba(e)),wu=(e,t)=>t?e.id===t||e.dataset.value===t:!1,sI=(e,t)=>{const n=Ba(e),o=n.findIndex(i=>wu(i,t.value));return sw(n,o,{loop:t.loop??t.loopFocus})},lI=(e,t)=>{const n=Ba(e),o=n.findIndex(i=>wu(i,t.value));return lw(n,o,{loop:t.loop??t.loopFocus})},cI=(e,t)=>{const n=Ba(e),o=n.find(i=>wu(i,t.value));return vn(n,{state:t.typeaheadState,key:t.key,activeId:o?.id??null})},dI=e=>{var t;return!!((t=e?.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("aria-controls"))},uI="menu:select";function hI(e,t){if(!e)return;const n=Ce(e),o=new n.CustomEvent(uI,{detail:{value:t}});e.dispatchEvent(o)}var{not:mt,and:No,or:pI}=ze();mt("isSubmenu"),pI("isOpenAutoFocusEvent","isArrowDownEvent"),No(mt("isTriggerItem"),"isOpenControlled"),mt("isTriggerItem"),No("isSubmenu","isOpenControlled"),mt("isPointerSuspended"),No(mt("isPointerSuspended"),mt("isTriggerItem")),No(mt("isTriggerItemHighlighted"),mt("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),No(mt("isTriggerItemHighlighted"),mt("isHighlightedItemEditable"),"closeOnSelect"),No(mt("isTriggerItemHighlighted"),mt("isHighlightedItemEditable"));function xp(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function gI(e,t){return e?t1(e,t):!1}function fI(e,t,n){const o=Object.keys(e).length>0;if(!t)return null;if(!o)return Qc(n,t);for(const i in e){const a=e[i],r=rb(a.scope);if(r===t)return r}return Qc(n,t)}Y()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]);Y()(["closeOnSelect","disabled","value","valueText"]);Y()(["htmlFor"]);Y()(["id"]);Y()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]);let ec=new Map,ed=!1;try{ed=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Ps=!1;try{Ps=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const lb={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let mI=class{format(t){let n="";if(!ed&&this.options.signDisplay!=null?n=bI(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Ps){var o;let{unit:i,unitDisplay:a="short",locale:r}=this.resolvedOptions();if(!i)return n;let s=(o=lb[i])===null||o===void 0?void 0:o[a];n+=s[r]||s.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let o=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...o.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!ed&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Ps&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=vI(t,n),this.options=n}};function vI(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Ps){var o;let{unit:r,unitDisplay:s="short"}=t;if(!r)throw new Error('unit option must be provided with style: "unit"');if(!(!((o=lb[r])===null||o===void 0)&&o[s]))throw new Error(`Unsupported unit ${r} with unitDisplay = ${s}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((r,s)=>r[0]<s[0]?-1:1).join():"");if(ec.has(i))return ec.get(i);let a=new Intl.NumberFormat(e,t);return ec.set(i,a),a}function bI(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let o=!1;if(t==="always"?o=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):o=n>0),o){let i=e.format(-n),a=e.format(n),r=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...r].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(r,"+").replace("!!!",a)}else return e.format(n)}}const yI=new RegExp("^.*\\(.*\\).*$"),xI=["latn","arab","hanidec","deva","beng","fullwide"];let cb=class{parse(t){return tc(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,o){return tc(this.locale,this.options,t).isValidPartialNumber(t,n,o)}getNumberingSystem(t){return tc(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}};const wp=new Map;function tc(e,t,n){let o=Cp(e,t);if(!e.includes("-nu-")&&!o.isValidPartialNumber(n)){for(let i of xI)if(i!==o.options.numberingSystem){let a=Cp(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return o}function Cp(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():""),o=wp.get(n);return o||(o=new wI(e,t),wp.set(n,o)),o}let wI=class{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=Bo(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let r=n.indexOf("-");n=n.replace("-",""),n=n.replace("+","");let s=n.indexOf(".");s===-1&&(s=n.length),n=n.replace(".",""),s-2===0?n=`0.${n}`:s-2===-1?n=`0.0${n}`:s-2===-2?n="0.00":n=`${n.slice(0,s-2)}.${n.slice(s-2)}`,r>-1&&(n=`-${n}`)}let o=n?+n:NaN;if(isNaN(o))return NaN;if(this.options.style==="percent"){var i,a;let r={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((a=this.options.maximumFractionDigits)!==null&&a!==void 0?a:0)+2,20)};return new cb(this.locale,r).parse(new mI(this.locale,r).format(o))}return this.options.currencySign==="accounting"&&yI.test(t)&&(o=-1*o),o}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=Bo(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=Bo(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=Bo(t," ",this.symbols.group),t=Bo(t,/\u00A0/g,this.symbols.group)),t}isValidPartialNumber(t,n=-1/0,o=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&o>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=Bo(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,n.roundingIncrement!==1&&n.roundingIncrement!=null&&(n.maximumFractionDigits==null&&n.minimumFractionDigits==null?(n.maximumFractionDigits=0,n.minimumFractionDigits=0):n.maximumFractionDigits==null?n.maximumFractionDigits=n.minimumFractionDigits:n.minimumFractionDigits==null&&(n.minimumFractionDigits=n.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=_I(t,this.formatter,this.options,n);var o,i;this.options.style==="percent"&&(((o=this.options.minimumFractionDigits)!==null&&o!==void 0?o:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}};const _p=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),CI=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function _I(e,t,n,o){var i,a,r,s;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=l.formatToParts(-10000.111),d=l.formatToParts(10000.111),h=CI.map(_=>l.formatToParts(_));var u;let p=(u=(i=c.find(_=>_.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&u!==void 0?u:"-",m=(a=d.find(_=>_.type==="plusSign"))===null||a===void 0?void 0:a.value;!m&&(o?.signDisplay==="exceptZero"||o?.signDisplay==="always")&&(m="+");let g=(r=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(_=>_.type==="decimal"))===null||r===void 0?void 0:r.value,v=(s=c.find(_=>_.type==="group"))===null||s===void 0?void 0:s.value,f=c.filter(_=>!_p.has(_.type)).map(_=>kp(_.value)),y=h.flatMap(_=>_.filter(E=>!_p.has(E.type)).map(E=>kp(E.value))),x=[...new Set([...f,...y])].sort((_,E)=>E.length-_.length),w=x.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${x.join("|")}|[\\p{White_Space}]`,"gu"),k=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),S=new Map(k.map((_,E)=>[_,E])),O=new RegExp(`[${k.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:g,group:v,literals:w,numeral:O,index:_=>String(S.get(_))}}function Bo(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function kp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var kI=ie("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber");kI.build();var SI=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`number-input:${e.id}:input`},EI=e=>{var t;return((t=e.ids)==null?void 0:t.incrementTrigger)??`number-input:${e.id}:inc`},OI=e=>{var t;return((t=e.ids)==null?void 0:t.decrementTrigger)??`number-input:${e.id}:dec`},db=e=>`number-input:${e.id}:cursor`,gr=e=>e.getById(SI(e)),$I=e=>e.getById(EI(e)),II=e=>e.getById(OI(e)),ub=e=>e.getDoc().getElementById(db(e)),TI=(e,t)=>{let n=null;return t==="increment"&&(n=$I(e)),t==="decrement"&&(n=II(e)),n},PI=(e,t)=>{if(!Ad())return MI(e,t),()=>{var n;(n=ub(e))==null||n.remove()}},VI=e=>{const t=e.getDoc(),n=t.documentElement,o=t.body;return o.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{o.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),o.style.length||o.removeAttribute("style")}},DI=(e,t)=>{const{point:n,isRtl:o,event:i}=t,a=e.getWin(),r=Al(i.movementX,a.devicePixelRatio),s=Al(i.movementY,a.devicePixelRatio);let l=r>0?"increment":r<0?"decrement":null;o&&l==="increment"&&(l="decrement"),o&&l==="decrement"&&(l="increment");const c={x:n.x+r,y:n.y+s},d=a.innerWidth,h=Al(7.5,a.devicePixelRatio);return c.x=_w(c.x+h,d)-h,{hint:l,point:c}},MI=(e,t)=>{const n=e.getDoc(),o=n.createElement("div");o.className="scrubber--cursor",o.id=db(e),Object.assign(o.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:Hf,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),o.innerHTML=`
3
3
  <svg width="46" height="15" style="left: -15.5px; position: absolute; top: 0; filter: drop-shadow(rgba(0, 0, 0, 0.4) 0px 1px 1.1px);">
4
4
  <g transform="translate(2 3)">
@@ -19,7 +19,7 @@ ${h}`)}).finally(()=>{n.set("transforming",!1)})):c(s)},removeFile({context:e,ev
19
19
  top: ${r.top}px;
20
20
  z-index: 1000;
21
21
  pointer-events: none;
22
- `,this.app=Ec(hf,{data:t,placement:r.placement,targetPosition:n}),this.app.mount(this.container),document.body.appendChild(this.container)}hide(){this.app&&(this.app.unmount(),this.app=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}updatePosition(t){if(this.container&&this.app){const n={width:this.container.offsetWidth,height:this.container.offsetHeight},o=this.calculateOptimalPosition(t,n);this.container.style.left=`${o.left}px`,this.container.style.top=`${o.top}px`;const i=this.app._instance;i!=null&&i.props&&(i.props.placement=o.placement,i.props.targetPosition=t)}}}new uA;let pf=!1;pf||(Fn.register(fd,md,is,ns,IF,$a),pf=!0);ne({slots:["ganttChart"],base:{ganttChart:{backgroundColor:"background.default",borderRadius:"lg",border:"1px solid",borderColor:"border.muted",height:"fit-content"}}});ne({slots:["timeItem","checkIcon","footer","mentuItemContainer"],base:{timeItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},checkIcon:{width:"12",height:"12",color:"text.normal"},footer:{display:"flex",alignItems:"center",paddingY:"6",paddingX:"8",borderRadius:"md",_focus:{outline:"none"}},mentuItemContainer:{display:"flex",flexDirection:"column",paddingX:"8",paddingTop:"8",maxHeight:"176",overflowY:"auto",gap:"0",scrollBehavior:"smooth","&:focus-within":{scrollBehavior:"smooth"}}}});const hA={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function pA(e,t){return C(),H("svg",hA,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_12427_264)"},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5303 6.53033L12.0607 6L11 4.93934L10.4697 5.46967L6.5 9.43934L5.53033 8.46967L5 7.93934L3.93934 9L4.46967 9.53033L5.96967 11.0303C6.26256 11.3232 6.73744 11.3232 7.03033 11.0303L11.5303 6.53033Z",fill:"currentColor"})],-1),z("defs",null,[z("clipPath",{id:"clip0_12427_264"},[z("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const gA={render:pA},fA={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function mA(e,t){return C(),H("svg",fA,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_12427_230)"},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.3934 0.292893C4.58094 0.105357 4.83529 0 5.10051 0H10.8995C11.1647 0 11.4191 0.105357 11.6066 0.292893L15.7071 4.3934C15.8946 4.58093 16 4.83529 16 5.10051V10.8995C16 11.1647 15.8946 11.4191 15.7071 11.6066L11.6066 15.7071C11.4191 15.8946 11.1647 16 10.8995 16H5.10051C4.83529 16 4.58094 15.8946 4.3934 15.7071L0.292894 11.6066C0.105357 11.4191 0 11.1647 0 10.8995V5.10051C0 4.83529 0.105357 4.58094 0.292893 4.3934L4.3934 0.292893ZM8.75 3.75V4.5V8V8.75H7.25V8V4.5V3.75H8.75ZM8 12C8.55229 12 9 11.5523 9 11C9 10.4477 8.55229 10 8 10C7.44772 10 7 10.4477 7 11C7 11.5523 7.44772 12 8 12Z",fill:"currentColor"})],-1),z("defs",null,[z("clipPath",{id:"clip0_12427_230"},[z("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const vA={render:mA},bA=ne({className:"toast",slots:[...Ob.keys(),"icon"],base:{root:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",borderRadius:"md",boxShadow:"elevations-overlay",gap:"6",fontSize:"base",fontWeight:"regular",fontFamily:"sans",lineHeight:"lg",letterSpacing:"normal",backgroundColor:"blackalpha.900",color:"whitealpha.1000",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},variants:{variant:{default:{},success:{icon:{color:"green.800"}},failed:{icon:{color:"red.800"}}}},defaultVariants:{variant:"default"}}),wc=(e,t,n)=>{const o=bA({variant:t}),i=zP({...n||{},placement:n?.placement||"bottom-end",overlap:n?.overlap||!0,gap:n?.gap||24,duration:n?.duration||3e3});i.create({title:e});const a=s=>({success:yt(gA,{class:o.icon}),failed:yt(vA,{class:o.icon}),default:yt("",null)})[s],r=document.createElement("div");document.body.appendChild(r),Ec({render:()=>yt(UP,{toaster:i},{default:()=>yt(jP,{class:o.root,"data-testid":`toast-${t}`},[a(t),yt(WP,null,e)])})}).mount(r)},si={success:(e,t)=>wc(e,"success",t),failed:(e,t)=>wc(e,"failed",t),default:(e,t)=>wc(e,"default",t)};Do({base:{},variants:{textStyle:{body_xsmall_caps_medium:{textStyle:"body_xsmall_caps_medium"},body_xsmall_caps_bold:{textStyle:"body_xsmall_caps_bold"},body_xsmall_regular:{textStyle:"body_xsmall_regular"},body_xsmall_medium:{textStyle:"body_xsmall_medium"},body_small_regular:{textStyle:"body_small_regular"},body_small_medium:{textStyle:"body_small_medium"},body_small_semibold:{textStyle:"body_small_semibold"},body_base_regular:{textStyle:"body_base_regular"},body_base_medium:{textStyle:"body_base_medium"},body_base_semibold:{textStyle:"body_base_semibold"},heading_text_h1:{textStyle:"heading_text_h1"},heading_text_h2:{textStyle:"heading_text_h2"},heading_text_h3:{textStyle:"heading_text_h3"},heading_text_h4:{textStyle:"heading_text_h4"},heading_text_h5:{textStyle:"heading_text_h5"},code_regular:{textStyle:"code_regular"},code_small:{textStyle:"code_small"},number_regular:{textStyle:"number_regular"},number_small:{textStyle:"number_small"}}},defaultVariants:{textStyle:"body_base_regular"}});const yA=P({name:"InputWidget",__name:"Input",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.ui);return(n,o)=>(C(),T(b(Bb),W({"model-value":e.field.state.value},b(t),{disabled:e.property.BYOCdisabled||e.disabled,variant:"default",state:"idle","onUpdate:modelValue":e.field.handleChange,onBlur:e.field.handleBlur}),null,16,["model-value","disabled","onUpdate:modelValue","onBlur"]))}}),Cc=Object.assign(yA,{__name:"Input"}),xA=P({name:"BooleanWidget",__name:"Boolean",props:{property:{},field:{}},setup(e){const t=n=>{e.field.handleChange(n==="true")};return(n,o)=>(C(),H("div",null,[Z(b(Hb),{modelValue:e.field.state.value,options:[{value:"true",label:"Yes"},{value:"false",label:"No"}],"onUpdate:modelValue":t},null,8,["modelValue"])]))}}),wA=Object.assign(xA,{__name:"Boolean"}),CA=P({name:"RadioWidget",__name:"Radio",props:{property:{},field:{}},setup(e){const t=F(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((n,o)=>({value:n,label:e.property.enumNames?.[o]||n})):[]);return(n,o)=>(C(),H("div",null,[Z(b(Hb),{"model-value":e.field.state.value,options:b(t),"onUpdate:modelValue":e.field.handleChange},null,8,["model-value","options","onUpdate:modelValue"])]))}}),_A=Object.assign(CA,{__name:"Radio"}),Oi=Symbol("form"),Ty=Symbol("getPayloadFn"),gf=(e,t,n,o)=>{const i={},a=e[`${t}.auth-type`],r=e[`${t}.connector`],s=e[`${t}.connectorType`],l=e[`${t}.credentialType`];Object.keys(e).forEach(p=>{p.includes(`${t}.extra.`)&&(i[p.replace(`${t}.extra.`,"")]=e[p])}),Object.keys(e).forEach(p=>{p.includes(`${t}.${a}.extra.`)&&(i[p.replace(`${t}.${a}.extra.`,"")]=e[p])});const c=e[`${t}.host`]?.endsWith("/")?e[`${t}.host`].substr(0,e[`${t}.host`].length-1):e[`${t}.host`],d=e[`${t}.host`]?.startsWith("http")?e[`${t}.host`].startsWith("https")?443:80:e[`${t}.port`],h=typeof c=="string"&&c.length>0,u=typeof l=="string"&&l.length>0;return{name:o,...u&&{credentialType:l},...h&&{host:c},...h&&d&&{port:e[`${t}.port`]?parseInt(e[`${t}.port`]):d},authType:a,connectorType:s,...r?{connector:r}:{},connectBy:e[`${t}.connectBy`],username:e[`${t}.${a}.username`],password:e[`${t}.${a}.password`],extra:i,connectorConfigName:n}},Py=Array.isArray,Vy=e=>!!e&&e.constructor===Object,kA=(e,t,n=o=>o)=>e.reduce((o,i)=>(o[t(i)]=n(i),o),{}),SA=(e,t)=>{const n=e.reduce((o,i)=>{const a=i;return o[a]||(o[a]=i),o},{});return Object.values(n)},EA=(e,t)=>Object.keys(e).reduce((o,i)=>(o[i]=t(e[i],i),o),{}),OA=(e,t)=>e?t.reduce((n,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]),n),{}):{},Dy=(e,t)=>e?!t||t.length===0?e:t.reduce((n,o)=>(delete n[o],n),{...e}):{},$A=(e,t,n)=>{const o=t.split(/[\.\[\]]/g);let i=e;for(const a of o){if(i===null||i===void 0)return n;const r=a.replace(/['"]/g,"");r.trim()!==""&&(i=i[r])}return i===void 0?n:i},IA=e=>{if(!e)return[];const t=(n,o)=>Vy(n)?Object.entries(n).flatMap(([i,a])=>t(a,[...o,i])):Py(n)?n.flatMap((i,a)=>t(i,[...o,`${a}`])):[o.join(".")];return t(e,[])},vd=e=>e?kA(IA(e),t=>t,t=>$A(e,t)):{},TA={trailing:!0};function PA(e,t=25,n={}){if(n={...TA,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let o,i,a=[],r,s;const l=(h,u)=>(r=VA(e,h,u),r.finally(()=>{if(r=null,n.trailing&&s&&!i){const p=l(h,s);return s=null,p}}),r),c=function(...h){return n.trailing&&(s=h),r||new Promise(u=>{const p=!i&&n.leading;clearTimeout(i),i=setTimeout(()=>{i=null;const m=n.leading?o:l(this,h);s=null;for(const g of a)g(m);a=[]},t),p?(o=l(this,h),u(o)):a.push(u)})},d=h=>{h&&(clearTimeout(h),i=null)};return c.isPending=()=>!!i,c.cancel=()=>{d(i),a=[],s=null},c.flush=()=>{if(d(i),!s||r)return;const h=s;return s=null,l(this,h)},c}async function VA(e,t,n){return await e.apply(t,n)}function Ol(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;DA(e[0],e[1])&&e.unshift(t);let[n,o,i={}]=e,a=!1;const r=F(()=>Me(n));if(typeof r.value!="string")throw new TypeError("[nuxt] [useAsyncData] key must be a string.");if(typeof o!="function")throw new TypeError("[nuxt] [useAsyncData] handler must be a function.");const s=Qy();i.server??=!0,i.default??=RA,i.getCachedData??=Ry,i.lazy??=!1,i.immediate??=!0,i.deep??=ex.deep,i.dedupe??="cancel",i._functionName,s._asyncData[r.value];function l(){const m={cause:"initial",dedupe:i.dedupe};return s._asyncData[r.value]?._init||(m.cachedData=i.getCachedData(r.value,s,{cause:"initial"}),s._asyncData[r.value]=ff(s,r.value,o,i,m.cachedData)),()=>s._asyncData[r.value].execute(m)}const c=l(),d=s._asyncData[r.value];d._deps++;const h=i.server!==!1&&s.payload.serverRendered;{let m=function(w){const k=s._asyncData[w];k?._deps&&(k._deps--,k._deps===0&&k?._off())};const g=Ta();if(g&&h&&i.immediate&&!g.sp&&(g.sp=[]),g&&!g._nuxtOnBeforeMountCbs){g._nuxtOnBeforeMountCbs=[];const w=g._nuxtOnBeforeMountCbs;tx(()=>{w.forEach(k=>{k()}),w.splice(0,w.length)}),Td(()=>w.splice(0,w.length))}const v=g&&(g._nuxtClientOnly||Xn(nx,!1));h&&s.isHydrating&&(d.error.value||d.data.value!==void 0)?d.status.value=d.error.value?"error":"success":g&&(!v&&s.payload.serverRendered&&s.isHydrating||i.lazy)&&i.immediate?g._nuxtOnBeforeMountCbs.push(c):i.immediate&&d.status.value!=="success"&&c();const f=ix(),y=Re(r,(w,k)=>{if((w||k)&&w!==k){a=!0;const S=s._asyncData[k]?.data.value!==void 0,O=s._asyncDataPromises[k]!==void 0,_={cause:"initial",dedupe:i.dedupe};if(!s._asyncData[w]?._init){let E;k&&S?E=s._asyncData[k].data.value:(E=i.getCachedData(w,s,{cause:"initial"}),_.cachedData=E),s._asyncData[w]=ff(s,w,o,i,E)}s._asyncData[w]._deps++,k&&m(k),(i.immediate||S||O)&&s._asyncData[w].execute(_),rx(()=>{a=!1})}},{flush:"sync"}),x=i.watch?Re(i.watch,()=>{a||d._execute({cause:"watch",dedupe:i.dedupe})}):()=>{};f&&ox(()=>{y(),x(),m(r.value)})}const u={data:Pr(()=>s._asyncData[r.value]?.data),pending:Pr(()=>s._asyncData[r.value]?.pending),status:Pr(()=>s._asyncData[r.value]?.status),error:Pr(()=>s._asyncData[r.value]?.error),refresh:(...m)=>s._asyncData[r.value]?._init?s._asyncData[r.value].execute(...m):l()(),execute:(...m)=>u.refresh(...m),clear:()=>{const m=s._asyncData[r.value];if(m?._abortController)try{m._abortController.abort(new DOMException("AsyncData aborted by user.","AbortError"))}finally{m._abortController=void 0}My(s,r.value)}},p=Promise.resolve(s._asyncDataPromises[r.value]).then(()=>u);return Object.assign(p,u),p}function Pr(e){return F({get(){return e()?.value},set(t){const n=e();n&&(n.value=t)}})}function DA(e,t){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof t=="function")}function My(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=void 0),e._asyncData[t]&&(e._asyncData[t].data.value=b(e._asyncData[t]._default()),e._asyncData[t].error.value=void 0,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t]=void 0)}function MA(e,t){const n={};for(const o of t)n[o]=e[o];return n}function ff(e,t,n,o,i){e.payload._errors[t]??=void 0;const a=o.getCachedData!==Ry,r=n,s=o.deep?ve:fs,l=i!==void 0,c=e.hook("app:data:refresh",async h=>{(!h||h.includes(t))&&await d.execute({cause:"refresh:hook"})}),d={data:s(l?i:o.default()),pending:F(()=>d.status.value==="pending"),error:Tf(e.payload._errors,t),status:fs("idle"),execute:(...h)=>{const[u,p=void 0]=h,m=u&&p===void 0&&typeof u=="object"?u:{};if(e._asyncDataPromises[t]&&(m.dedupe??o.dedupe)==="defer")return e._asyncDataPromises[t];{const v="cachedData"in m?m.cachedData:o.getCachedData(t,e,{cause:m.cause??"refresh:manual"});if(v!==void 0)return e.payload.data[t]=d.data.value=v,d.error.value=void 0,d.status.value="success",Promise.resolve(v)}d._abortController&&d._abortController.abort(new DOMException("AsyncData request cancelled by deduplication","AbortError")),d._abortController=new AbortController,d.status.value="pending";const g=new Promise((v,f)=>{try{const y=m.timeout??o.timeout,x=FA([d._abortController?.signal,m?.signal],y);if(x.aborted){const w=x.reason;f(w instanceof Error?w:new DOMException(String(w??"Aborted"),"AbortError"));return}return x.addEventListener("abort",()=>{const w=x.reason;f(w instanceof Error?w:new DOMException(String(w??"Aborted"),"AbortError"))},{once:!0}),Promise.resolve(r(e,{signal:x})).then(v,f)}catch(y){f(y)}}).then(async v=>{let f=v;o.transform&&(f=await o.transform(v)),o.pick&&(f=MA(f,o.pick)),e.payload.data[t]=f,d.data.value=f,d.error.value=void 0,d.status.value="success"}).catch(v=>{if(!(e._asyncDataPromises[t]&&e._asyncDataPromises[t]!==g)&&!d._abortController?.signal.aborted){if(typeof DOMException<"u"&&v instanceof DOMException&&v.name==="AbortError"){d.status.value="idle";return}d.error.value=ax(v),d.data.value=b(o.default()),d.status.value="error"}}).finally(()=>{delete e._asyncDataPromises[t]});return e._asyncDataPromises[t]=g,e._asyncDataPromises[t]},_execute:PA((...h)=>d.execute(...h),0,{leading:!0}),_default:o.default,_deps:0,_init:!0,_hash:void 0,_off:()=>{c(),e._asyncData[t]?._init&&(e._asyncData[t]._init=!1),a||Id(()=>{e._asyncData[t]?._init||(My(e,t),d.execute=()=>Promise.resolve())})}};return d}const RA=()=>{},Ry=(e,t,n)=>{if(t.isHydrating)return t.payload.data[e];if(n.cause!=="refresh:manual"&&n.cause!=="refresh:hook")return t.static.data[e]};function FA(e,t){const n=e.filter(a=>!!a);if(typeof t=="number"&&t>=0){const a=AbortSignal.timeout?.(t);a&&n.push(a)}if(AbortSignal.any)return AbortSignal.any(n);const o=new AbortController;for(const a of n)if(a.aborted){const r=a.reason??new DOMException("Aborted","AbortError");try{o.abort(r)}catch{o.abort()}return o.signal}const i=()=>{const r=n.find(s=>s.aborted)?.reason??new DOMException("Aborted","AbortError");try{o.abort(r)}catch{o.abort()}};for(const a of n)a.addEventListener?.("abort",i,{once:!0});return o.signal}function Mu(e){const t={};return Object.entries(e.properties).forEach(([n,o])=>{o.default?o?.ui?.widget==="Repeater"&&o.default?t[n]=JSON.parse(o.default):t[n]=o.default:o.properties&&(t[n]=Mu(o))}),t}const AA={class:"flex mt-3"},LA={key:1,class:"p-3 mt-4 border rounded-md border-green-400 bg-green-100"},NA={key:0,class:"mt-1"},BA={class:"text-sm text-green-600"},zA={key:2,class:"p-3 mt-4 border rounded-md border-new-red-400 bg-new-red-100"},HA={class:"mt-1"},jA={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},WA=P({__name:"CredentialWidget",props:{property:{},modelValue:{}},async setup(e){let t,n;const o=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url)),i=Xn(Oi),{data:a}=([t,n]=Gs(()=>Ol(()=>`credential_${e.property.ui.credentialType}`,()=>$fetch(`/workflows/v1/configmap/${e.property.ui.credentialType}`),"$K3FgAi8HjS")),t=await t,n(),t),r=i.useStore(d=>Dy(d.values,["credential_guid_body","credential_property_id"]));Re(()=>e.property,d=>{d&&i.setFieldValue("credential_property_id",d.id)},{immediate:!0}),Re(r,d=>{d&&i.setFieldValue("credential_guid_body",gf(vd(d),e.property.id,e.property.ui?.credentialType,void 0))},{immediate:!0}),Re(a,d=>{Object.entries(Mu(d.data.config)).forEach(([h,u])=>{i.state.values[`${e.property.id}.${h}`]||i.setFieldValue(`${e.property.id}.${h}`,u)})},{immediate:!0});const s=ve(!1),l=ve(null);async function c(){s.value=!0,l.value=null;try{const d=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(gf(vd(i.state.values),e.property.id,e.property.ui?.credentialType,void 0))});l.value=d}catch(d){l.value={success:!1,message:d?.data?.message||d?.message||"Authentication failed"}}finally{s.value=!1}}return(d,h)=>(C(),H("div",{class:N(e.property.ui.class)},[b(a)?.data?.config?(C(),H(Oe,{key:0},[Z(b(o),{"config-map":b(a).data.config,"base-key":e.property.id},null,8,["config-map","base-key"]),z("div",AA,[Z(b(An),{loading:b(s),label:b(s)?"Testing Authentication":"Test Authentication",onClick:c},null,8,["loading","label"])])],64)):Q("",!0),b(l)?.success?(C(),H("div",LA,[h[0]||(h[0]=z("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),b(l).message?(C(),H("div",NA,[z("span",BA,oe(b(l).message),1)])):Q("",!0)])):Q("",!0),b(l)&&!b(l).success?(C(),H("div",zA,[h[1]||(h[1]=z("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),z("div",HA,[z("span",jA,oe(b(l).message),1)])])):Q("",!0)],2))}}),GA=Object.assign(WA,{__name:"CredentialWidget"}),UA=P({name:"NestedWidget",__name:"Nested",props:{property:{},modelValue:{}},setup(e){const t=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url));return(n,o)=>(C(),T(b(t),{"config-map":e.property,"base-key":e.property.id},null,8,["config-map","base-key"]))}}),YA=Object.assign(UA,{__name:"Nested"}),qA=P({name:"PasswordWidget",__name:"Password",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.ui);return(n,o)=>(C(),T(b(Bb),W({id:e.property.id,"model-value":e.field.state.value,variant:"default",state:"idle"},b(t),{disabled:e.disabled,type:"password","onUpdate:modelValue":e.field.handleChange,onBlur:e.field.handleBlur}),null,16,["id","model-value","disabled","onUpdate:modelValue","onBlur"]))}}),KA=Object.assign(qA,{__name:"Password"}),XA=P({name:"SelectWidget",__name:"Select",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((n,o)=>({value:n,label:e.property.enumNames?.[o]||n})):[]);return(n,o)=>(C(),T(b(_l),{id:e.property.id,"model-value":e.field.state.value,options:b(t),placeholder:e.property.placeholder,"is-disabled":e.disabled,variant:"default",onChange:e.field.handleChange,onBlur:e.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","onChange","onBlur"]))}}),ZA=Object.assign(XA,{__name:"Select"}),JA=P({__name:"SQLTree",props:{field:{}},async setup(e){let t,n;const o=Xn(Oi),{data:i}=([t,n]=Gs(()=>Ol("metadata",()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),t=await t,n(),t),a=F(()=>i.value?SA(i.value.data.map(u=>u.TABLE_CATALOG)).map(u=>({value:u,label:u,children:i.value.data.filter(p=>p.TABLE_CATALOG===u).map(p=>({value:`${u}:${p.TABLE_SCHEMA}`,label:p.TABLE_SCHEMA}))})):[]),r=h=>{let u=h;return u.startsWith("^")&&(u=u.slice(1)),u.endsWith("$")&&(u=u.slice(0,-1)),u},l=ve((h=>{const u=[];if(h){if(typeof h=="object")Object.keys(h)?.forEach(p=>{h[p]?.length>0?h[p]?.forEach(m=>{u.push(`${r(p)}:${r(m)}`)}):u.push(r(p))});else if(typeof h=="string")try{const p=JSON.parse(h);Object.keys(p)?.forEach(m=>{p[m].length>0?p[m]?.forEach(g=>{u.push(`${r(m)}:${r(g)}`)}):u.push(r(m))})}catch{u.push(r(h))}}return u})(e.field.state.value)),c=h=>{const u={};return h.forEach(p=>{if(p.includes(":")){const m=p.split(":")[0];u[`^${m}$`]=[]}else u[`^${p}$`]=[]}),h.forEach(p=>{if(p.includes(":")){const m=p.split(":")[0],g=p.split(":")[1];g&&u[`^${m}$`].push(`^${g}$`)}}),u},d=h=>{const u=c(h);e.field.handleChange(u),l.value=h};return(h,u)=>(C(),T(b(_l),{isTree:"",multiple:"",options:b(a),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),QA=Object.assign(JA,{__name:"SQLTree"}),eL=P({__name:"APITree",props:{field:{},property:{}},async setup(e){let t,n;const o=Xn(Oi),{data:i}=([t,n]=Gs(()=>Ol(`${e.property.id}_metadata`,()=>{const h=o.getFieldValue("credential_guid_body"),u=e.property.ui?.metadataTemplateKey;return $fetch("/workflows/v1/metadata",{method:"POST",body:{...h&&h,...u&&{type:u},...u&&{database:u}}})})),t=await t,n(),t);function a(h,u=null){return h.map(p=>{const m=u?`${u}:${p.value}`:p.value;return{value:m,label:p.title,children:p.children?a(p.children,m):void 0}})}const r=F(()=>i.value?a(i.value.data):[]),l=ve((h=>{const u=[],p=(m,g=[])=>{Array.isArray(m)?g.length>0&&u.push(g.join(":")):typeof m=="object"&&m!==null&&Object.keys(m).forEach(v=>{p(m[v],[...g,v])})};if(h)if(typeof h=="string")try{p(JSON.parse(h))}catch{u.push(h)}else p(h);return u})(e.field.state.value)),c=h=>{const u={};return h.forEach(p=>{const m=p.split(":");let g=u;m.forEach((v,f)=>{g[v]||(g[v]={}),f!==m.length-1&&(g=g[v])})}),u},d=h=>{const u=c(h);e.field.handleChange(u),l.value=h};return(h,u)=>(C(),T(b(_l),{isTree:"",multiple:"",options:b(r),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),tL=Object.assign(eL,{__name:"APITree"}),nL={class:"border border-gray-200 rounded-lg p-6 bg-white"},oL={class:"flex items-center justify-between mb-4"},iL={key:0,class:"mt-4 space-y-3"},aL={class:"flex items-start gap-3"},rL={class:"flex-1"},sL={class:"flex items-center gap-2"},lL={class:"font-medium text-gray-900 capitalize"},cL={key:0,class:"text-sm text-gray-600 mt-1"},dL={key:1,class:"text-sm text-red-600 mt-1"},uL={key:1,class:"mt-4 text-center text-gray-500 text-sm"},hL=P({name:"SageWidget",__name:"Sage",props:{property:{},field:{}},setup(e){const t=Xn(Ty),n=ve(!1),o=ve(null);async function i(){n.value=!0,o.value=null;try{const s=await t(),l=await $fetch("/workflows/v1/check",{method:"POST",body:s});o.value=l.data,l.success?si.success("Pre-flight checks completed!",{placement:"top",duration:3e3}):si.failed("Some pre-flight checks failed",{placement:"top",duration:3e3})}catch(s){si.failed("Failed to run pre-flight checks. Please try again.",{placement:"top",duration:3e3}),console.error("Pre-flight check error:",s)}finally{n.value=!1}}const a=s=>s?"✓":"✗",r=s=>s?"text-green-600":"text-red-600";return(s,l)=>(C(),H("div",nL,[z("div",oL,[l[0]||(l[0]=z("div",null,[z("h3",{class:"text-lg font-semibold text-gray-900"}," Pre-flight Checks "),z("p",{class:"text-sm text-gray-500 mt-1"}," Verify your configuration before starting the workflow ")],-1)),Z(b(An),{label:"Check","is-loading":b(n),onClick:i},null,8,["is-loading"])]),b(o)?(C(),H("div",iL,[(C(!0),H(Oe,null,Ue(b(o),(c,d)=>(C(),H("div",{key:d,class:"border border-gray-200 rounded-md p-4"},[z("div",aL,[z("span",{class:N(["text-xl font-bold",r(c.success)])},oe(a(c.success)),3),z("div",rL,[z("div",sL,[z("h4",lL,oe(d.replace(/([A-Z])/g," $1").trim()),1),z("span",{class:N(["text-xs px-2 py-0.5 rounded-full font-medium",c.success?"bg-green-100 text-green-700":"bg-red-100 text-red-700"])},oe(c.success?"Passed":"Failed"),3)]),c.success&&c.successMessage?(C(),H("p",cL,oe(c.successMessage),1)):Q("",!0),!c.success&&c.failureMessage?(C(),H("p",dL,oe(c.failureMessage),1)):Q("",!0)])])]))),128))])):b(n)?Q("",!0):(C(),H("div",uL,' Click "Check" to run pre-flight checks '))]))}}),pL=Object.assign(hL,{__name:"Sage"}),gL=P({__name:"Connection",props:{property:{},modelValue:{}},setup(e){const t=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url)),n={properties:{name:{type:"string",ui:{widget:"input",label:"Connection name",placeholder:"environment",help:"Name of your connection which represents your source environment. Example - 'production', 'development', 'gold', 'analytics' ",required:!0,grid:4,rules:[{required:!0,message:"Please enter a connection name"}]}}}};return(o,i)=>(C(),T(b(t),{"config-map":n,"base-key":e.property.id},null,8,["base-key"]))}}),fL=Object.assign(gL,{__name:"Connection"}),mL={key:0,class:"text-sm text-gray-500 mt-2"},vL={key:1,class:"text-sm text-red-500 mt-2"},bL=P({name:"FileUploadWidget",__name:"FileUpload",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=ve(!1),n=ve(null),o=async r=>{const s=new FormData;return s.append("file",r),await $fetch("/workflows/v1/file",{method:"POST",body:s})},i=async r=>{const{files:s}=r;if(!s||s.length===0)return;const l=s[0];if(l){t.value=!0,n.value=null;try{const c=await o(l);e.property.ui?.fileMetadata?e.field.handleChange(JSON.stringify({...c,fileKey:c.key,fileId:c.id})):e.field.handleChange(c.id)}catch(c){n.value=c instanceof Error?c.message:"Failed to upload file"}finally{t.value=!1}}},a=F(()=>({placeholder:e.property.ui?.placeholder||"Drag and drop files here",accept:e.property.ui?.accept,isDisabled:e.disabled||t.value}));return(r,s)=>(C(),H("div",null,[Z(b(aD),W(b(a),{onFileAccept:i,onBlur:e.field.handleBlur}),null,16,["onBlur"]),b(t)?(C(),H("div",mL," Uploading... ")):Q("",!0),b(n)?(C(),H("div",vL,oe(b(n)),1)):Q("",!0)]))}}),yL=Object.assign(bL,{__name:"FileUpload"});const mf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xL=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),wL=e=>{const t=xL(e);return t.charAt(0).toUpperCase()+t.slice(1)},CL=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),vf=e=>e==="";var Qi={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 _L=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":a,size:r=Qi.width,color:s=Qi.stroke,...l},{slots:c})=>yt("svg",{...Qi,...l,width:r,height:r,stroke:s,"stroke-width":vf(n)||vf(o)||n===!0||o===!0?Number(i||a||Qi["stroke-width"])*24/Number(r):i||a||Qi["stroke-width"],class:CL("lucide",l.class,...e?[`lucide-${mf(wL(e))}-icon`,`lucide-${mf(e)}`]:["lucide-icon"])},[...t.map(d=>yt(...d)),...c.default?[c.default()]:[]]);const kL=(e,t)=>(n,{slots:o,attrs:i})=>yt(_L,{...i,...n,iconNode:t,name:e},o);const SL=kL("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),EL={key:0,class:"text-red-500"},OL={key:0,class:"absolute right-3 top-3 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},$L={class:"flex justify-center"},IL=P({__name:"Repeater",props:{property:{}},setup(e){const t=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url)),n=Xn(Oi),o=r=>{r.pushValue()},i=(r,s)=>{const l=e.property.ui.minItems??1;r.state.value.length>l&&r.removeValue(s)},a=r=>e.property.ui.maxItems!==void 0&&r.state.value.length>=e.property.ui.maxItems;return(r,s)=>(C(),T(b(n).Field,{name:e.property.id,mode:"array"},{default:I(({field:l})=>[z("div",null,[z("div",null,[Z(b(zb),null,{default:I(()=>[Be(oe(e.property.ui?.label)+" ",1),e.property?.required?(C(),H("span",EL," * ")):Q("",!0)]),_:1})]),(C(!0),H(Oe,null,Ue(l.state.value,(c,d)=>(C(),H("div",{key:d,class:"relative mb-3 border border-gray-300 rounded-lg p-4 group hover:border-gray-400 transition-colors"},[l.state.value.length>(e.property.ui.minItems??1)?(C(),H("div",OL,[Z(b(SL),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>{i(l,d)}},null,8,["onClick"])])):Q("",!0),Z(b(t),{configMap:e.property,baseKey:`${e.property.id}[${d}]`},null,8,["configMap","baseKey"])]))),128)),z("div",$L,[Z(b(An),{type:"default",label:`Add to ${e.property.ui.label}`,disabled:a(l),onClick:()=>{o(l)}},null,8,["label","disabled","onClick"])])])]),_:1},8,["name"]))}}),TL=Object.assign(IL,{__name:"Repeater"}),PL=P({name:"ConnectionSelector",__name:"ConnectionSelector",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.enumNames?.map((o,i)=>({label:o,value:e.property.enum?.[i]}))||[{label:"Production Database",value:"default/snowflake/1234567890"},{label:"Staging Database",value:"default/snowflake/0987654321"},{label:"Development Database",value:"default/postgres/8938390"},{label:"Analytics Warehouse",value:"default/bigquery/1234567890"},{label:"Backup Storage",value:"default/s3/1234567890"}]);function n(o){e.field.handleChange(o[0])}return(o,i)=>(C(),T(b(_l),{id:e.property.id,modelValue:e.field.state.value?[e.field.state.value]:[],options:b(t),placeholder:e.property.placeholder,"is-disabled":e.disabled,variant:"default","onUpdate:modelValue":n,onBlur:e.field.handleBlur},null,8,["id","modelValue","options","placeholder","is-disabled","onBlur"]))}}),VL=Object.assign(PL,{__name:"ConnectionSelector"}),DL=P({name:"SwitcherWidget",__name:"Switcher",props:{property:{},field:{}},setup(e){const t=({checked:n})=>{e.field.handleChange(n)};return(n,o)=>(C(),H("div",null,[Z(b(aM),{checked:e.field.state.value,onCheckedChange:t},{default:I(()=>[Be(oe(e.property.ui?.title),1)]),_:1},8,["checked"])]))}}),ML=Object.assign(DL,{__name:"Switcher"});function xo(){return xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},xo.apply(this,arguments)}function RL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ia(e,t)}function bd(e){return bd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bd(e)}function Ia(e,t){return Ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Ia(e,t)}function FL(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function us(e,t,n){return FL()?us=Reflect.construct.bind():us=function(i,a,r){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),c=new l;return r&&Ia(c,r.prototype),c},us.apply(null,arguments)}function AL(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function yd(e){var t=typeof Map=="function"?new Map:void 0;return yd=function(o){if(o===null||!AL(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,i)}function i(){return us(o,arguments,bd(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ia(i,o)},yd(e)}var LL=/%[sdj%]/g,NL=function(){};function xd(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function rt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=0,a=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var r=e.replace(LL,function(s){if(s==="%%")return"%";if(i>=a)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return r}return e}function BL(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ie(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||BL(t)&&typeof e=="string"&&!e)}function zL(e,t,n){var o=[],i=0,a=e.length;function r(s){o.push.apply(o,s||[]),i++,i===a&&n(o)}e.forEach(function(s){t(s,r)})}function bf(e,t,n){var o=0,i=e.length;function a(r){if(r&&r.length){n(r);return}var s=o;o=o+1,s<i?t(e[s],a):n([])}a([])}function HL(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var yf=function(e){RL(t,e);function t(n,o){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=o,i}return t}(yd(Error));function jL(e,t,n,o,i){if(t.first){var a=new Promise(function(u,p){var m=function(f){return o(f),f.length?p(new yf(f,xd(f))):u(i)},g=HL(e);bf(g,n,m)});return a.catch(function(u){return u}),a}var r=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,d=[],h=new Promise(function(u,p){var m=function(v){if(d.push.apply(d,v),c++,c===l)return o(d),d.length?p(new yf(d,xd(d))):u(i)};s.length||(o(d),u(i)),s.forEach(function(g){var v=e[g];r.indexOf(g)!==-1?bf(v,n,m):zL(v,n,m)})});return h.catch(function(u){return u}),h}function WL(e){return!!(e&&e.message!==void 0)}function GL(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function xf(e,t){return function(n){var o;return e.fullFields?o=GL(t,e.fullFields):o=t[n.field||e.fullField],WL(n)?(n.field=n.field||e.fullField,n.fieldValue=o,n):{message:typeof n=="function"?n():n,fieldValue:o,field:n.field||e.fullField}}}function wf(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];typeof o=="object"&&typeof e[n]=="object"?e[n]=xo({},e[n],o):e[n]=o}}return e}var Fy=function(t,n,o,i,a,r){t.required&&(!o.hasOwnProperty(t.field)||Ie(n,r||t.type))&&i.push(rt(a.messages.required,t.fullField))},UL=function(t,n,o,i,a){(/^\s+$/.test(n)||n==="")&&i.push(rt(a.messages.whitespace,t.fullField))},Vr,YL=function(){if(Vr)return Vr;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",i=(`
22
+ `,this.app=Ec(hf,{data:t,placement:r.placement,targetPosition:n}),this.app.mount(this.container),document.body.appendChild(this.container)}hide(){this.app&&(this.app.unmount(),this.app=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}updatePosition(t){if(this.container&&this.app){const n={width:this.container.offsetWidth,height:this.container.offsetHeight},o=this.calculateOptimalPosition(t,n);this.container.style.left=`${o.left}px`,this.container.style.top=`${o.top}px`;const i=this.app._instance;i!=null&&i.props&&(i.props.placement=o.placement,i.props.targetPosition=t)}}}new uA;let pf=!1;pf||(Fn.register(fd,md,is,ns,IF,$a),pf=!0);ne({slots:["ganttChart"],base:{ganttChart:{backgroundColor:"background.default",borderRadius:"lg",border:"1px solid",borderColor:"border.muted",height:"fit-content"}}});ne({slots:["timeItem","checkIcon","footer","mentuItemContainer"],base:{timeItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},checkIcon:{width:"12",height:"12",color:"text.normal"},footer:{display:"flex",alignItems:"center",paddingY:"6",paddingX:"8",borderRadius:"md",_focus:{outline:"none"}},mentuItemContainer:{display:"flex",flexDirection:"column",paddingX:"8",paddingTop:"8",maxHeight:"176",overflowY:"auto",gap:"0",scrollBehavior:"smooth","&:focus-within":{scrollBehavior:"smooth"}}}});const hA={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function pA(e,t){return C(),H("svg",hA,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_12427_264)"},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5303 6.53033L12.0607 6L11 4.93934L10.4697 5.46967L6.5 9.43934L5.53033 8.46967L5 7.93934L3.93934 9L4.46967 9.53033L5.96967 11.0303C6.26256 11.3232 6.73744 11.3232 7.03033 11.0303L11.5303 6.53033Z",fill:"currentColor"})],-1),z("defs",null,[z("clipPath",{id:"clip0_12427_264"},[z("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const gA={render:pA},fA={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function mA(e,t){return C(),H("svg",fA,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_12427_230)"},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.3934 0.292893C4.58094 0.105357 4.83529 0 5.10051 0H10.8995C11.1647 0 11.4191 0.105357 11.6066 0.292893L15.7071 4.3934C15.8946 4.58093 16 4.83529 16 5.10051V10.8995C16 11.1647 15.8946 11.4191 15.7071 11.6066L11.6066 15.7071C11.4191 15.8946 11.1647 16 10.8995 16H5.10051C4.83529 16 4.58094 15.8946 4.3934 15.7071L0.292894 11.6066C0.105357 11.4191 0 11.1647 0 10.8995V5.10051C0 4.83529 0.105357 4.58094 0.292893 4.3934L4.3934 0.292893ZM8.75 3.75V4.5V8V8.75H7.25V8V4.5V3.75H8.75ZM8 12C8.55229 12 9 11.5523 9 11C9 10.4477 8.55229 10 8 10C7.44772 10 7 10.4477 7 11C7 11.5523 7.44772 12 8 12Z",fill:"currentColor"})],-1),z("defs",null,[z("clipPath",{id:"clip0_12427_230"},[z("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const vA={render:mA},bA=ne({className:"toast",slots:[...Ob.keys(),"icon"],base:{root:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",borderRadius:"md",boxShadow:"elevations-overlay",gap:"6",fontSize:"base",fontWeight:"regular",fontFamily:"sans",lineHeight:"lg",letterSpacing:"normal",backgroundColor:"blackalpha.900",color:"whitealpha.1000",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},variants:{variant:{default:{},success:{icon:{color:"green.800"}},failed:{icon:{color:"red.800"}}}},defaultVariants:{variant:"default"}}),wc=(e,t,n)=>{const o=bA({variant:t}),i=zP({...n||{},placement:n?.placement||"bottom-end",overlap:n?.overlap||!0,gap:n?.gap||24,duration:n?.duration||3e3});i.create({title:e});const a=s=>({success:yt(gA,{class:o.icon}),failed:yt(vA,{class:o.icon}),default:yt("",null)})[s],r=document.createElement("div");document.body.appendChild(r),Ec({render:()=>yt(UP,{toaster:i},{default:()=>yt(jP,{class:o.root,"data-testid":`toast-${t}`},[a(t),yt(WP,null,e)])})}).mount(r)},si={success:(e,t)=>wc(e,"success",t),failed:(e,t)=>wc(e,"failed",t),default:(e,t)=>wc(e,"default",t)};Do({base:{},variants:{textStyle:{body_xsmall_caps_medium:{textStyle:"body_xsmall_caps_medium"},body_xsmall_caps_bold:{textStyle:"body_xsmall_caps_bold"},body_xsmall_regular:{textStyle:"body_xsmall_regular"},body_xsmall_medium:{textStyle:"body_xsmall_medium"},body_small_regular:{textStyle:"body_small_regular"},body_small_medium:{textStyle:"body_small_medium"},body_small_semibold:{textStyle:"body_small_semibold"},body_base_regular:{textStyle:"body_base_regular"},body_base_medium:{textStyle:"body_base_medium"},body_base_semibold:{textStyle:"body_base_semibold"},heading_text_h1:{textStyle:"heading_text_h1"},heading_text_h2:{textStyle:"heading_text_h2"},heading_text_h3:{textStyle:"heading_text_h3"},heading_text_h4:{textStyle:"heading_text_h4"},heading_text_h5:{textStyle:"heading_text_h5"},code_regular:{textStyle:"code_regular"},code_small:{textStyle:"code_small"},number_regular:{textStyle:"number_regular"},number_small:{textStyle:"number_small"}}},defaultVariants:{textStyle:"body_base_regular"}});const yA=P({name:"InputWidget",__name:"Input",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.ui);return(n,o)=>(C(),T(b(Bb),W({"model-value":e.field.state.value},b(t),{disabled:e.property.BYOCdisabled||e.disabled,variant:"default",state:"idle","onUpdate:modelValue":e.field.handleChange,onBlur:e.field.handleBlur}),null,16,["model-value","disabled","onUpdate:modelValue","onBlur"]))}}),Cc=Object.assign(yA,{__name:"Input"}),xA=P({name:"BooleanWidget",__name:"Boolean",props:{property:{},field:{}},setup(e){const t=n=>{e.field.handleChange(n==="true")};return(n,o)=>(C(),H("div",null,[Z(b(Hb),{modelValue:e.field.state.value,options:[{value:"true",label:"Yes"},{value:"false",label:"No"}],"onUpdate:modelValue":t},null,8,["modelValue"])]))}}),wA=Object.assign(xA,{__name:"Boolean"}),CA=P({name:"RadioWidget",__name:"Radio",props:{property:{},field:{}},setup(e){const t=F(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((n,o)=>({value:n,label:e.property.enumNames?.[o]||n})):[]);return(n,o)=>(C(),H("div",null,[Z(b(Hb),{"model-value":e.field.state.value,options:b(t),"onUpdate:modelValue":e.field.handleChange},null,8,["model-value","options","onUpdate:modelValue"])]))}}),_A=Object.assign(CA,{__name:"Radio"}),Oi=Symbol("form"),Ty=Symbol("getPayloadFn"),gf=(e,t,n,o)=>{const i={},a=e[`${t}.auth-type`],r=e[`${t}.connector`],s=e[`${t}.connectorType`],l=e[`${t}.credentialType`];Object.keys(e).forEach(p=>{p.includes(`${t}.extra.`)&&(i[p.replace(`${t}.extra.`,"")]=e[p])}),Object.keys(e).forEach(p=>{p.includes(`${t}.${a}.extra.`)&&(i[p.replace(`${t}.${a}.extra.`,"")]=e[p])});const c=e[`${t}.host`]?.endsWith("/")?e[`${t}.host`].substr(0,e[`${t}.host`].length-1):e[`${t}.host`],d=e[`${t}.host`]?.startsWith("http")?e[`${t}.host`].startsWith("https")?443:80:e[`${t}.port`],h=typeof c=="string"&&c.length>0,u=typeof l=="string"&&l.length>0;return{name:o,...u&&{credentialType:l},...h&&{host:c},...h&&d&&{port:e[`${t}.port`]?parseInt(e[`${t}.port`]):d},authType:a,connectorType:s,...r?{connector:r}:{},connectBy:e[`${t}.connectBy`],username:e[`${t}.${a}.username`],password:e[`${t}.${a}.password`],extra:i,connectorConfigName:n}},Py=Array.isArray,Vy=e=>!!e&&e.constructor===Object,kA=(e,t,n=o=>o)=>e.reduce((o,i)=>(o[t(i)]=n(i),o),{}),SA=(e,t)=>{const n=e.reduce((o,i)=>{const a=i;return o[a]||(o[a]=i),o},{});return Object.values(n)},EA=(e,t)=>Object.keys(e).reduce((o,i)=>(o[i]=t(e[i],i),o),{}),OA=(e,t)=>e?t.reduce((n,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]),n),{}):{},Dy=(e,t)=>e?!t||t.length===0?e:t.reduce((n,o)=>(delete n[o],n),{...e}):{},$A=(e,t,n)=>{const o=t.split(/[\.\[\]]/g);let i=e;for(const a of o){if(i===null||i===void 0)return n;const r=a.replace(/['"]/g,"");r.trim()!==""&&(i=i[r])}return i===void 0?n:i},IA=e=>{if(!e)return[];const t=(n,o)=>Vy(n)?Object.entries(n).flatMap(([i,a])=>t(a,[...o,i])):Py(n)?n.flatMap((i,a)=>t(i,[...o,`${a}`])):[o.join(".")];return t(e,[])},vd=e=>e?kA(IA(e),t=>t,t=>$A(e,t)):{},TA={trailing:!0};function PA(e,t=25,n={}){if(n={...TA,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let o,i,a=[],r,s;const l=(h,u)=>(r=VA(e,h,u),r.finally(()=>{if(r=null,n.trailing&&s&&!i){const p=l(h,s);return s=null,p}}),r),c=function(...h){return n.trailing&&(s=h),r||new Promise(u=>{const p=!i&&n.leading;clearTimeout(i),i=setTimeout(()=>{i=null;const m=n.leading?o:l(this,h);s=null;for(const g of a)g(m);a=[]},t),p?(o=l(this,h),u(o)):a.push(u)})},d=h=>{h&&(clearTimeout(h),i=null)};return c.isPending=()=>!!i,c.cancel=()=>{d(i),a=[],s=null},c.flush=()=>{if(d(i),!s||r)return;const h=s;return s=null,l(this,h)},c}async function VA(e,t,n){return await e.apply(t,n)}function Ol(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;DA(e[0],e[1])&&e.unshift(t);let[n,o,i={}]=e,a=!1;const r=F(()=>Me(n));if(typeof r.value!="string")throw new TypeError("[nuxt] [useAsyncData] key must be a string.");if(typeof o!="function")throw new TypeError("[nuxt] [useAsyncData] handler must be a function.");const s=Qy();i.server??=!0,i.default??=RA,i.getCachedData??=Ry,i.lazy??=!1,i.immediate??=!0,i.deep??=ex.deep,i.dedupe??="cancel",i._functionName,s._asyncData[r.value];function l(){const m={cause:"initial",dedupe:i.dedupe};return s._asyncData[r.value]?._init||(m.cachedData=i.getCachedData(r.value,s,{cause:"initial"}),s._asyncData[r.value]=ff(s,r.value,o,i,m.cachedData)),()=>s._asyncData[r.value].execute(m)}const c=l(),d=s._asyncData[r.value];d._deps++;const h=i.server!==!1&&s.payload.serverRendered;{let m=function(w){const k=s._asyncData[w];k?._deps&&(k._deps--,k._deps===0&&k?._off())};const g=Ta();if(g&&h&&i.immediate&&!g.sp&&(g.sp=[]),g&&!g._nuxtOnBeforeMountCbs){g._nuxtOnBeforeMountCbs=[];const w=g._nuxtOnBeforeMountCbs;tx(()=>{w.forEach(k=>{k()}),w.splice(0,w.length)}),Td(()=>w.splice(0,w.length))}const v=g&&(g._nuxtClientOnly||Xn(nx,!1));h&&s.isHydrating&&(d.error.value||d.data.value!==void 0)?d.status.value=d.error.value?"error":"success":g&&(!v&&s.payload.serverRendered&&s.isHydrating||i.lazy)&&i.immediate?g._nuxtOnBeforeMountCbs.push(c):i.immediate&&d.status.value!=="success"&&c();const f=ix(),y=Re(r,(w,k)=>{if((w||k)&&w!==k){a=!0;const S=s._asyncData[k]?.data.value!==void 0,O=s._asyncDataPromises[k]!==void 0,_={cause:"initial",dedupe:i.dedupe};if(!s._asyncData[w]?._init){let E;k&&S?E=s._asyncData[k].data.value:(E=i.getCachedData(w,s,{cause:"initial"}),_.cachedData=E),s._asyncData[w]=ff(s,w,o,i,E)}s._asyncData[w]._deps++,k&&m(k),(i.immediate||S||O)&&s._asyncData[w].execute(_),rx(()=>{a=!1})}},{flush:"sync"}),x=i.watch?Re(i.watch,()=>{a||d._execute({cause:"watch",dedupe:i.dedupe})}):()=>{};f&&ox(()=>{y(),x(),m(r.value)})}const u={data:Pr(()=>s._asyncData[r.value]?.data),pending:Pr(()=>s._asyncData[r.value]?.pending),status:Pr(()=>s._asyncData[r.value]?.status),error:Pr(()=>s._asyncData[r.value]?.error),refresh:(...m)=>s._asyncData[r.value]?._init?s._asyncData[r.value].execute(...m):l()(),execute:(...m)=>u.refresh(...m),clear:()=>{const m=s._asyncData[r.value];if(m?._abortController)try{m._abortController.abort(new DOMException("AsyncData aborted by user.","AbortError"))}finally{m._abortController=void 0}My(s,r.value)}},p=Promise.resolve(s._asyncDataPromises[r.value]).then(()=>u);return Object.assign(p,u),p}function Pr(e){return F({get(){return e()?.value},set(t){const n=e();n&&(n.value=t)}})}function DA(e,t){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof t=="function")}function My(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=void 0),e._asyncData[t]&&(e._asyncData[t].data.value=b(e._asyncData[t]._default()),e._asyncData[t].error.value=void 0,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t]=void 0)}function MA(e,t){const n={};for(const o of t)n[o]=e[o];return n}function ff(e,t,n,o,i){e.payload._errors[t]??=void 0;const a=o.getCachedData!==Ry,r=n,s=o.deep?ve:fs,l=i!==void 0,c=e.hook("app:data:refresh",async h=>{(!h||h.includes(t))&&await d.execute({cause:"refresh:hook"})}),d={data:s(l?i:o.default()),pending:F(()=>d.status.value==="pending"),error:Tf(e.payload._errors,t),status:fs("idle"),execute:(...h)=>{const[u,p=void 0]=h,m=u&&p===void 0&&typeof u=="object"?u:{};if(e._asyncDataPromises[t]&&(m.dedupe??o.dedupe)==="defer")return e._asyncDataPromises[t];{const v="cachedData"in m?m.cachedData:o.getCachedData(t,e,{cause:m.cause??"refresh:manual"});if(v!==void 0)return e.payload.data[t]=d.data.value=v,d.error.value=void 0,d.status.value="success",Promise.resolve(v)}d._abortController&&d._abortController.abort(new DOMException("AsyncData request cancelled by deduplication","AbortError")),d._abortController=new AbortController,d.status.value="pending";const g=new Promise((v,f)=>{try{const y=m.timeout??o.timeout,x=FA([d._abortController?.signal,m?.signal],y);if(x.aborted){const w=x.reason;f(w instanceof Error?w:new DOMException(String(w??"Aborted"),"AbortError"));return}return x.addEventListener("abort",()=>{const w=x.reason;f(w instanceof Error?w:new DOMException(String(w??"Aborted"),"AbortError"))},{once:!0}),Promise.resolve(r(e,{signal:x})).then(v,f)}catch(y){f(y)}}).then(async v=>{let f=v;o.transform&&(f=await o.transform(v)),o.pick&&(f=MA(f,o.pick)),e.payload.data[t]=f,d.data.value=f,d.error.value=void 0,d.status.value="success"}).catch(v=>{if(!(e._asyncDataPromises[t]&&e._asyncDataPromises[t]!==g)&&!d._abortController?.signal.aborted){if(typeof DOMException<"u"&&v instanceof DOMException&&v.name==="AbortError"){d.status.value="idle";return}d.error.value=ax(v),d.data.value=b(o.default()),d.status.value="error"}}).finally(()=>{delete e._asyncDataPromises[t]});return e._asyncDataPromises[t]=g,e._asyncDataPromises[t]},_execute:PA((...h)=>d.execute(...h),0,{leading:!0}),_default:o.default,_deps:0,_init:!0,_hash:void 0,_off:()=>{c(),e._asyncData[t]?._init&&(e._asyncData[t]._init=!1),a||Id(()=>{e._asyncData[t]?._init||(My(e,t),d.execute=()=>Promise.resolve())})}};return d}const RA=()=>{},Ry=(e,t,n)=>{if(t.isHydrating)return t.payload.data[e];if(n.cause!=="refresh:manual"&&n.cause!=="refresh:hook")return t.static.data[e]};function FA(e,t){const n=e.filter(a=>!!a);if(typeof t=="number"&&t>=0){const a=AbortSignal.timeout?.(t);a&&n.push(a)}if(AbortSignal.any)return AbortSignal.any(n);const o=new AbortController;for(const a of n)if(a.aborted){const r=a.reason??new DOMException("Aborted","AbortError");try{o.abort(r)}catch{o.abort()}return o.signal}const i=()=>{const r=n.find(s=>s.aborted)?.reason??new DOMException("Aborted","AbortError");try{o.abort(r)}catch{o.abort()}};for(const a of n)a.addEventListener?.("abort",i,{once:!0});return o.signal}function Mu(e){const t={};return Object.entries(e.properties).forEach(([n,o])=>{o.default?o?.ui?.widget==="Repeater"&&o.default?t[n]=JSON.parse(o.default):t[n]=o.default:o.properties&&(t[n]=Mu(o))}),t}const AA={class:"flex mt-3"},LA={key:1,class:"p-3 mt-4 border rounded-md border-green-400 bg-green-100"},NA={key:0,class:"mt-1"},BA={class:"text-sm text-green-600"},zA={key:2,class:"p-3 mt-4 border rounded-md border-new-red-400 bg-new-red-100"},HA={class:"mt-1"},jA={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},WA=P({__name:"CredentialWidget",props:{property:{},modelValue:{}},async setup(e){let t,n;const o=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url)),i=Xn(Oi),{data:a}=([t,n]=Gs(()=>Ol(()=>`credential_${e.property.ui.credentialType}`,()=>$fetch(`/workflows/v1/configmap/${e.property.ui.credentialType}`),"$K3FgAi8HjS")),t=await t,n(),t),r=i.useStore(d=>Dy(d.values,["credential_guid_body","credential_property_id"]));Re(()=>e.property,d=>{d&&i.setFieldValue("credential_property_id",d.id)},{immediate:!0}),Re(r,d=>{d&&i.setFieldValue("credential_guid_body",gf(vd(d),e.property.id,e.property.ui?.credentialType,void 0))},{immediate:!0}),Re(a,d=>{Object.entries(Mu(d.data.config)).forEach(([h,u])=>{i.state.values[`${e.property.id}.${h}`]||i.setFieldValue(`${e.property.id}.${h}`,u)})},{immediate:!0});const s=ve(!1),l=ve(null);async function c(){s.value=!0,l.value=null;try{const d=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(gf(vd(i.state.values),e.property.id,e.property.ui?.credentialType,void 0))});l.value=d}catch(d){l.value={success:!1,message:d?.data?.message||d?.message||"Authentication failed"}}finally{s.value=!1}}return(d,h)=>(C(),H("div",{class:N(e.property.ui.class)},[b(a)?.data?.config?(C(),H(Oe,{key:0},[Z(b(o),{"config-map":b(a).data.config,"base-key":e.property.id},null,8,["config-map","base-key"]),z("div",AA,[Z(b(An),{loading:b(s),label:b(s)?"Testing Authentication":"Test Authentication",onClick:c},null,8,["loading","label"])])],64)):Q("",!0),b(l)?.success?(C(),H("div",LA,[h[0]||(h[0]=z("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),b(l).message?(C(),H("div",NA,[z("span",BA,oe(b(l).message),1)])):Q("",!0)])):Q("",!0),b(l)&&!b(l).success?(C(),H("div",zA,[h[1]||(h[1]=z("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),z("div",HA,[z("span",jA,oe(b(l).message),1)])])):Q("",!0)],2))}}),GA=Object.assign(WA,{__name:"CredentialWidget"}),UA=P({name:"NestedWidget",__name:"Nested",props:{property:{},modelValue:{}},setup(e){const t=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url));return(n,o)=>(C(),T(b(t),{"config-map":e.property,"base-key":e.property.id},null,8,["config-map","base-key"]))}}),YA=Object.assign(UA,{__name:"Nested"}),qA=P({name:"PasswordWidget",__name:"Password",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.ui);return(n,o)=>(C(),T(b(Bb),W({id:e.property.id,"model-value":e.field.state.value,variant:"default",state:"idle"},b(t),{disabled:e.disabled,type:"password","onUpdate:modelValue":e.field.handleChange,onBlur:e.field.handleBlur}),null,16,["id","model-value","disabled","onUpdate:modelValue","onBlur"]))}}),KA=Object.assign(qA,{__name:"Password"}),XA=P({name:"SelectWidget",__name:"Select",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((n,o)=>({value:n,label:e.property.enumNames?.[o]||n})):[]);return(n,o)=>(C(),T(b(_l),{id:e.property.id,"model-value":e.field.state.value,options:b(t),placeholder:e.property.placeholder,"is-disabled":e.disabled,variant:"default","onUpdate:modelValue":e.field.handleChange,onBlur:e.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","onUpdate:modelValue","onBlur"]))}}),ZA=Object.assign(XA,{__name:"Select"}),JA=P({__name:"SQLTree",props:{field:{}},async setup(e){let t,n;const o=Xn(Oi),{data:i}=([t,n]=Gs(()=>Ol("metadata",()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),t=await t,n(),t),a=F(()=>i.value?SA(i.value.data.map(u=>u.TABLE_CATALOG)).map(u=>({value:u,label:u,children:i.value.data.filter(p=>p.TABLE_CATALOG===u).map(p=>({value:`${u}:${p.TABLE_SCHEMA}`,label:p.TABLE_SCHEMA}))})):[]),r=h=>{let u=h;return u.startsWith("^")&&(u=u.slice(1)),u.endsWith("$")&&(u=u.slice(0,-1)),u},l=ve((h=>{const u=[];if(h){if(typeof h=="object")Object.keys(h)?.forEach(p=>{h[p]?.length>0?h[p]?.forEach(m=>{u.push(`${r(p)}:${r(m)}`)}):u.push(r(p))});else if(typeof h=="string")try{const p=JSON.parse(h);Object.keys(p)?.forEach(m=>{p[m].length>0?p[m]?.forEach(g=>{u.push(`${r(m)}:${r(g)}`)}):u.push(r(m))})}catch{u.push(r(h))}}return u})(e.field.state.value)),c=h=>{const u={};return h.forEach(p=>{if(p.includes(":")){const m=p.split(":")[0];u[`^${m}$`]=[]}else u[`^${p}$`]=[]}),h.forEach(p=>{if(p.includes(":")){const m=p.split(":")[0],g=p.split(":")[1];g&&u[`^${m}$`].push(`^${g}$`)}}),u},d=h=>{const u=c(h);e.field.handleChange(u),l.value=h};return(h,u)=>(C(),T(b(_l),{isTree:"",multiple:"",options:b(a),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),QA=Object.assign(JA,{__name:"SQLTree"}),eL=P({__name:"APITree",props:{field:{},property:{}},async setup(e){let t,n;const o=Xn(Oi),{data:i}=([t,n]=Gs(()=>Ol(`${e.property.id}_metadata`,()=>{const h=o.getFieldValue("credential_guid_body"),u=e.property.ui?.metadataTemplateKey;return $fetch("/workflows/v1/metadata",{method:"POST",body:{...h&&h,...u&&{type:u},...u&&{database:u}}})})),t=await t,n(),t);function a(h,u=null){return h.map(p=>{const m=u?`${u}:${p.value}`:p.value;return{value:m,label:p.title,children:p.children?a(p.children,m):void 0}})}const r=F(()=>i.value?a(i.value.data):[]),l=ve((h=>{const u=[],p=(m,g=[])=>{Array.isArray(m)?g.length>0&&u.push(g.join(":")):typeof m=="object"&&m!==null&&Object.keys(m).forEach(v=>{p(m[v],[...g,v])})};if(h)if(typeof h=="string")try{p(JSON.parse(h))}catch{u.push(h)}else p(h);return u})(e.field.state.value)),c=h=>{const u={};return h.forEach(p=>{const m=p.split(":");let g=u;m.forEach((v,f)=>{g[v]||(g[v]={}),f!==m.length-1&&(g=g[v])})}),u},d=h=>{const u=c(h);e.field.handleChange(u),l.value=h};return(h,u)=>(C(),T(b(_l),{isTree:"",multiple:"",options:b(r),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),tL=Object.assign(eL,{__name:"APITree"}),nL={class:"border border-gray-200 rounded-lg p-6 bg-white"},oL={class:"flex items-center justify-between mb-4"},iL={key:0,class:"mt-4 space-y-3"},aL={class:"flex items-start gap-3"},rL={class:"flex-1"},sL={class:"flex items-center gap-2"},lL={class:"font-medium text-gray-900 capitalize"},cL={key:0,class:"text-sm text-gray-600 mt-1"},dL={key:1,class:"text-sm text-red-600 mt-1"},uL={key:1,class:"mt-4 text-center text-gray-500 text-sm"},hL=P({name:"SageWidget",__name:"Sage",props:{property:{},field:{}},setup(e){const t=Xn(Ty),n=ve(!1),o=ve(null);async function i(){n.value=!0,o.value=null;try{const s=await t(),l=await $fetch("/workflows/v1/check",{method:"POST",body:s});o.value=l.data,l.success?si.success("Pre-flight checks completed!",{placement:"top",duration:3e3}):si.failed("Some pre-flight checks failed",{placement:"top",duration:3e3})}catch(s){si.failed("Failed to run pre-flight checks. Please try again.",{placement:"top",duration:3e3}),console.error("Pre-flight check error:",s)}finally{n.value=!1}}const a=s=>s?"✓":"✗",r=s=>s?"text-green-600":"text-red-600";return(s,l)=>(C(),H("div",nL,[z("div",oL,[l[0]||(l[0]=z("div",null,[z("h3",{class:"text-lg font-semibold text-gray-900"}," Pre-flight Checks "),z("p",{class:"text-sm text-gray-500 mt-1"}," Verify your configuration before starting the workflow ")],-1)),Z(b(An),{label:"Check","is-loading":b(n),onClick:i},null,8,["is-loading"])]),b(o)?(C(),H("div",iL,[(C(!0),H(Oe,null,Ue(b(o),(c,d)=>(C(),H("div",{key:d,class:"border border-gray-200 rounded-md p-4"},[z("div",aL,[z("span",{class:N(["text-xl font-bold",r(c.success)])},oe(a(c.success)),3),z("div",rL,[z("div",sL,[z("h4",lL,oe(d.replace(/([A-Z])/g," $1").trim()),1),z("span",{class:N(["text-xs px-2 py-0.5 rounded-full font-medium",c.success?"bg-green-100 text-green-700":"bg-red-100 text-red-700"])},oe(c.success?"Passed":"Failed"),3)]),c.success&&c.successMessage?(C(),H("p",cL,oe(c.successMessage),1)):Q("",!0),!c.success&&c.failureMessage?(C(),H("p",dL,oe(c.failureMessage),1)):Q("",!0)])])]))),128))])):b(n)?Q("",!0):(C(),H("div",uL,' Click "Check" to run pre-flight checks '))]))}}),pL=Object.assign(hL,{__name:"Sage"}),gL=P({__name:"Connection",props:{property:{},modelValue:{}},setup(e){const t=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url)),n={properties:{name:{type:"string",ui:{widget:"input",label:"Connection name",placeholder:"environment",help:"Name of your connection which represents your source environment. Example - 'production', 'development', 'gold', 'analytics' ",required:!0,grid:4,rules:[{required:!0,message:"Please enter a connection name"}]}}}};return(o,i)=>(C(),T(b(t),{"config-map":n,"base-key":e.property.id},null,8,["base-key"]))}}),fL=Object.assign(gL,{__name:"Connection"}),mL={key:0,class:"text-sm text-gray-500 mt-2"},vL={key:1,class:"text-sm text-red-500 mt-2"},bL=P({name:"FileUploadWidget",__name:"FileUpload",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=ve(!1),n=ve(null),o=async r=>{const s=new FormData;return s.append("file",r),await $fetch("/workflows/v1/file",{method:"POST",body:s})},i=async r=>{const{files:s}=r;if(!s||s.length===0)return;const l=s[0];if(l){t.value=!0,n.value=null;try{const c=await o(l);e.property.ui?.fileMetadata?e.field.handleChange(JSON.stringify({...c,fileKey:c.key,fileId:c.id})):e.field.handleChange(c.id)}catch(c){n.value=c instanceof Error?c.message:"Failed to upload file"}finally{t.value=!1}}},a=F(()=>({placeholder:e.property.ui?.placeholder||"Drag and drop files here",accept:e.property.ui?.accept,isDisabled:e.disabled||t.value}));return(r,s)=>(C(),H("div",null,[Z(b(aD),W(b(a),{onFileAccept:i,onBlur:e.field.handleBlur}),null,16,["onBlur"]),b(t)?(C(),H("div",mL," Uploading... ")):Q("",!0),b(n)?(C(),H("div",vL,oe(b(n)),1)):Q("",!0)]))}}),yL=Object.assign(bL,{__name:"FileUpload"});const mf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xL=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),wL=e=>{const t=xL(e);return t.charAt(0).toUpperCase()+t.slice(1)},CL=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),vf=e=>e==="";var Qi={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 _L=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":a,size:r=Qi.width,color:s=Qi.stroke,...l},{slots:c})=>yt("svg",{...Qi,...l,width:r,height:r,stroke:s,"stroke-width":vf(n)||vf(o)||n===!0||o===!0?Number(i||a||Qi["stroke-width"])*24/Number(r):i||a||Qi["stroke-width"],class:CL("lucide",l.class,...e?[`lucide-${mf(wL(e))}-icon`,`lucide-${mf(e)}`]:["lucide-icon"])},[...t.map(d=>yt(...d)),...c.default?[c.default()]:[]]);const kL=(e,t)=>(n,{slots:o,attrs:i})=>yt(_L,{...i,...n,iconNode:t,name:e},o);const SL=kL("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),EL={key:0,class:"text-red-500"},OL={key:0,class:"absolute right-3 top-3 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},$L={class:"flex justify-center"},IL=P({__name:"Repeater",props:{property:{}},setup(e){const t=Us(()=>Ys(()=>Promise.resolve().then(()=>$l),void 0,import.meta.url)),n=Xn(Oi),o=r=>{r.pushValue()},i=(r,s)=>{const l=e.property.ui.minItems??1;r.state.value.length>l&&r.removeValue(s)},a=r=>e.property.ui.maxItems!==void 0&&r.state.value.length>=e.property.ui.maxItems;return(r,s)=>(C(),T(b(n).Field,{name:e.property.id,mode:"array"},{default:I(({field:l})=>[z("div",null,[z("div",null,[Z(b(zb),null,{default:I(()=>[Be(oe(e.property.ui?.label)+" ",1),e.property?.required?(C(),H("span",EL," * ")):Q("",!0)]),_:1})]),(C(!0),H(Oe,null,Ue(l.state.value,(c,d)=>(C(),H("div",{key:d,class:"relative mb-3 border border-gray-300 rounded-lg p-4 group hover:border-gray-400 transition-colors"},[l.state.value.length>(e.property.ui.minItems??1)?(C(),H("div",OL,[Z(b(SL),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>{i(l,d)}},null,8,["onClick"])])):Q("",!0),Z(b(t),{configMap:e.property,baseKey:`${e.property.id}[${d}]`},null,8,["configMap","baseKey"])]))),128)),z("div",$L,[Z(b(An),{type:"default",label:`Add to ${e.property.ui.label}`,disabled:a(l),onClick:()=>{o(l)}},null,8,["label","disabled","onClick"])])])]),_:1},8,["name"]))}}),TL=Object.assign(IL,{__name:"Repeater"}),PL=P({name:"ConnectionSelector",__name:"ConnectionSelector",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=F(()=>e.property.enumNames?.map((o,i)=>({label:o,value:e.property.enum?.[i]}))||[{label:"Production Database",value:"default/snowflake/1234567890"},{label:"Staging Database",value:"default/snowflake/0987654321"},{label:"Development Database",value:"default/postgres/8938390"},{label:"Analytics Warehouse",value:"default/bigquery/1234567890"},{label:"Backup Storage",value:"default/s3/1234567890"}]);function n(o){e.field.handleChange(o[0])}return(o,i)=>(C(),T(b(_l),{id:e.property.id,modelValue:e.field.state.value?[e.field.state.value]:[],options:b(t),placeholder:e.property.placeholder,"is-disabled":e.disabled,variant:"default","onUpdate:modelValue":n,onBlur:e.field.handleBlur},null,8,["id","modelValue","options","placeholder","is-disabled","onBlur"]))}}),VL=Object.assign(PL,{__name:"ConnectionSelector"}),DL=P({name:"SwitcherWidget",__name:"Switcher",props:{property:{},field:{}},setup(e){const t=({checked:n})=>{e.field.handleChange(n)};return(n,o)=>(C(),H("div",null,[Z(b(aM),{checked:e.field.state.value,onCheckedChange:t},{default:I(()=>[Be(oe(e.property.ui?.title),1)]),_:1},8,["checked"])]))}}),ML=Object.assign(DL,{__name:"Switcher"});function xo(){return xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},xo.apply(this,arguments)}function RL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ia(e,t)}function bd(e){return bd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bd(e)}function Ia(e,t){return Ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Ia(e,t)}function FL(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function us(e,t,n){return FL()?us=Reflect.construct.bind():us=function(i,a,r){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),c=new l;return r&&Ia(c,r.prototype),c},us.apply(null,arguments)}function AL(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function yd(e){var t=typeof Map=="function"?new Map:void 0;return yd=function(o){if(o===null||!AL(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,i)}function i(){return us(o,arguments,bd(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ia(i,o)},yd(e)}var LL=/%[sdj%]/g,NL=function(){};function xd(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function rt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=0,a=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var r=e.replace(LL,function(s){if(s==="%%")return"%";if(i>=a)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return r}return e}function BL(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ie(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||BL(t)&&typeof e=="string"&&!e)}function zL(e,t,n){var o=[],i=0,a=e.length;function r(s){o.push.apply(o,s||[]),i++,i===a&&n(o)}e.forEach(function(s){t(s,r)})}function bf(e,t,n){var o=0,i=e.length;function a(r){if(r&&r.length){n(r);return}var s=o;o=o+1,s<i?t(e[s],a):n([])}a([])}function HL(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var yf=function(e){RL(t,e);function t(n,o){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=o,i}return t}(yd(Error));function jL(e,t,n,o,i){if(t.first){var a=new Promise(function(u,p){var m=function(f){return o(f),f.length?p(new yf(f,xd(f))):u(i)},g=HL(e);bf(g,n,m)});return a.catch(function(u){return u}),a}var r=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,d=[],h=new Promise(function(u,p){var m=function(v){if(d.push.apply(d,v),c++,c===l)return o(d),d.length?p(new yf(d,xd(d))):u(i)};s.length||(o(d),u(i)),s.forEach(function(g){var v=e[g];r.indexOf(g)!==-1?bf(v,n,m):zL(v,n,m)})});return h.catch(function(u){return u}),h}function WL(e){return!!(e&&e.message!==void 0)}function GL(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function xf(e,t){return function(n){var o;return e.fullFields?o=GL(t,e.fullFields):o=t[n.field||e.fullField],WL(n)?(n.field=n.field||e.fullField,n.fieldValue=o,n):{message:typeof n=="function"?n():n,fieldValue:o,field:n.field||e.fullField}}}function wf(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];typeof o=="object"&&typeof e[n]=="object"?e[n]=xo({},e[n],o):e[n]=o}}return e}var Fy=function(t,n,o,i,a,r){t.required&&(!o.hasOwnProperty(t.field)||Ie(n,r||t.type))&&i.push(rt(a.messages.required,t.fullField))},UL=function(t,n,o,i,a){(/^\s+$/.test(n)||n==="")&&i.push(rt(a.messages.whitespace,t.fullField))},Vr,YL=function(){if(Vr)return Vr;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",i=(`
23
23
  (?:
24
24
  (?:`+o+":){7}(?:"+o+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
25
25
  (?:`+o+":){6}(?:"+n+"|:"+o+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4