@atlanhq/app-playground 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/200.html +1 -1
- package/.output/public/404.html +1 -1
- package/.output/public/_nuxt/{BdS1Iimd.js → Cm0vfk8m.js} +1 -1
- package/.output/public/_nuxt/{DQSYTEH9.js → DDnF1Vmf.js} +5 -5
- package/.output/public/_nuxt/{CEA_IsAJ.js → DVEPy6NS.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/2d1064ba-e1d1-4d85-8ec6-65b075a02c5c.json +1 -0
- package/.output/public/_nuxt/error-404.Bt-4629E.css +1 -0
- package/.output/public/_nuxt/error-500.5AIrFkt4.css +1 -0
- package/.output/public/_nuxt/{CqfNA64X.js → uMxJFpwo.js} +6 -6
- package/.output/public/index.html +1 -1
- package/bin/cli.js +37 -32
- package/package.json +2 -2
- package/.output/public/_nuxt/builds/meta/ca452d11-fafe-4119-a867-6c1cd6e1af4d.json +0 -1
- package/.output/public/_nuxt/error-404.BDkRY0Wq.css +0 -1
- package/.output/public/_nuxt/error-500.DCt1Qtq4.css +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{F as Ea,G as Dy,H as xf,I as wf,k as A,J as xd,K as Yn,L as Ae,r as ve,d as M,M as My,N as Ce,h as bt,O as Q,P as T,Q as b,z as C,D as P,R as L,S as W,T as st,U as xt,o as Ns,e as Ry,V as wd,s as ds,W as Be,X as Cd,Y as vn,Z as qn,y as H,A as z,$ as Ge,a0 as N,B as oe,E as Le,a1 as Bs,C as Z,a2 as Fy,a3 as Cf,a4 as Wt,a5 as Ay,a6 as Ly,a7 as Iu,a8 as us,a9 as Ny,aa as yc,a as By,ab as zy,ac as Hy,ad as jy,ae as Wy,af as Gy,ag as Uy,ah as Yy,ai as zs,aj as Hs,ak as js,al as qy,am as Ky,an as _f}from"./DQSYTEH9.js";function xc(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var Xy=e=>typeof e=="object"&&e!==null;function _d(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var Zy=e=>e==="base";function Jy(e){return e.slice().filter(t=>!Zy(t))}function Tu(e){return String.fromCharCode(e+(e>25?39:97))}function Qy(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Tu(n%52)+t;return Tu(n%52)+t}function ex(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function tx(e){return Qy(ex(5381,e)>>>0)}var Sf=/\s*!(important)?/i;function nx(e){return typeof e=="string"?Sf.test(e):!1}function ox(e){return typeof e=="string"?e.replace(Sf,"").trim():e}function kf(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var Oa=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 Sd(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],a=n[o];xc(i)&&xc(a)?t[o]=Sd(i,a):t[o]=a}),t),{})}var ix=e=>e!=null;function Ef(e,t,n={}){const{stop:o,getKey:i}=n;function a(r,s=[]){if(Xy(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);ix(p)&&(l[h]=p)}return l}return t(r,s)}return a(e)}function ax(e,t){return e.reduce((n,o,i)=>{const a=t[i];return o!=null&&(n[a]=o),n},{})}function Of(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:a,resolveShorthand:r}=o;return Ef(e,s=>Array.isArray(s)?ax(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>a?r(s):s:void 0})}var rx={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},sx=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function lx(e){const{utility:t,hash:n,conditions:o=rx}=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,tx))}else l=[...o.finalize(r),i(s)].join(":");return l};return Oa(({base:r,...s}={})=>{const l=Object.assign(s,r),c=Of(l,e),d=new Set;return Ef(c,(h,u)=>{if(h==null)return;const p=nx(h),[m,...g]=o.shift(u),v=Jy(g),f=t.transform(m,ox(sx(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=>xc(t)&&Object.keys(_d(t)).length>0)}function dx(e){function t(i){const a=cx(...i);return a.length===1?a:a.map(r=>Of(r,e))}function n(...i){return Sd(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:Oa(n),assignCss:o}}var ux=/([A-Z])/g,hx=/^ms-/,px=Oa(e=>e.startsWith("--")?e:e.replace(ux,"-$1").replace(hx,"-ms-").toLowerCase()),gx="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,%";`${gx.split(",").join("|")}`;var fx=(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?mx(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)},mx=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function $f(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 vx=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const bx="_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",If=new Set(bx.split(",")),yx=/^@|&|&$/;function Pu(e){return If.has(e)||yx.test(e)}const xx=/^_/,wx=/&|@/;function Cx(e){return e.map(t=>If.has(t)?t.replace(xx,""):wx.test(t)?`[${kf(t.trim())}]`:t)}function _x(e){return e.sort((t,n)=>{const o=Pu(t),i=Pu(n);return o&&!i?1:!o&&i?-1:0})}const Sx="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",Tf=new Map,Pf=new Map;Sx.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");Tf.set(t,o),i.length&&i.forEach(a=>{Pf.set(a==="1"?o:a,t)})});const Vu=e=>Pf.get(e)||e,Vf={conditions:{shift:_x,finalize:Cx,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Vu(e);return{className:`${Tf.get(n)||px(n)}_${kf(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Vu}},kx=lx(Vf),nt=(...e)=>kx(uo(...e));nt.raw=(...e)=>uo(...e);const{mergeCss:uo}=dx(Vf),Du=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function To(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=Du(e),a=u=>({...o,..._d(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=uo(g,n[f][y]));const v=Ex(i,m);return uo(g,v)}function s(u){const p=Du(u.config),m=vx(u.variantKeys,Object.keys(n));return To({base:uo(t,p.base),variants:Object.fromEntries(m.map(g=>[g,uo(n[g],p.variants[g])])),defaultVariants:Sd(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(u){return nt(r(u))}const c=Object.keys(n);function d(u){return $f(u,c)}const h=Object.fromEntries(Object.entries(n).map(([u,p])=>[u,Object.keys(p)]));return Object.assign(Oa(l),{__cva__:!0,variantMap:h,variantKeys:c,raw:r,config:e,merge:s,splitVariantProps:d,getVariantProps:a})}function Ex(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=uo(n,o.css))}),n}function Ox(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const $x=(e,t)=>e+"__"+t;function ne(e){const t=Object.entries(fx(e)).map(([d,h])=>[d,To(h)]),n=e.defaultVariants??{};function o(d){const h=t.map(([u,p])=>[u,Ox(p(d),e.className&&$x(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 $f(d,r)}const l=d=>({...n||{},..._d(d)}),c=Object.fromEntries(Object.entries(a).map(([d,h])=>[d,Object.keys(h)]));return Object.assign(Oa(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:r,splitVariantProps:s,getVariantProps:l})}var ie=(e,t=[])=>({parts:(...n)=>{if(Ix(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="${Mo(e)}"][data-part="${Mo(o)}"]`,`& [data-scope="${Mo(e)}"][data-part="${Mo(o)}"]`].join(", "),attrs:{"data-scope":Mo(e),"data-part":Mo(o)}}}),{})}),Mo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Ix=e=>e.length===0,Tx=Object.defineProperty,Px=(e,t,n)=>t in e?Tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,El=(e,t,n)=>Px(e,typeof t!="symbol"?t+"":t,n);function Vx(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function Dx(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 Mu=e=>Math.max(0,Math.min(1,e)),Mx=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),Ol=(...e)=>t=>e.reduce((n,o)=>o(n),t),Zi=()=>{},Ws=e=>typeof e=="object"&&e!==null,Df=2147483647,j=e=>e?"":void 0,Ji=e=>e?"true":void 0,Rx=1,Fx=9,Ax=11,ke=e=>Ws(e)&&e.nodeType===Rx&&typeof e.nodeName=="string",Gs=e=>Ws(e)&&e.nodeType===Fx,Lx=e=>Ws(e)&&e===e.window,Mf=e=>ke(e)?e.localName||"":"#document";function Nx(e){return["html","body","#document"].includes(Mf(e))}var Bx=e=>Ws(e)&&e.nodeType!==void 0,si=e=>Bx(e)&&e.nodeType===Ax&&"host"in e,zx=e=>ke(e)&&e.localName==="input",jo=e=>!!(e!=null&&e.matches("a[href]")),Hx=e=>ke(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function hs(e){if(!e)return!1;const t=e.getRootNode();return ra(t)===e}var jx=/(textarea|select)/;function Us(e){if(e==null||!ke(e))return!1;try{return zx(e)&&e.selectionStart!=null||jx.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Ue(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&&si(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function ct(e){return Gs(e)?e:Lx(e)?e.document:e?.ownerDocument??document}function Wx(e){return ct(e).documentElement}function _e(e){var t;return si(e)?_e(e.host):Gs(e)?e.defaultView??window:ke(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function ra(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 Gx(e){if(Mf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||si(e)&&e.host||Wx(e);return si(t)?t.host:t}function kd(e){let t;try{if(t=e.getRootNode({composed:!0}),Gs(t)||si(t))return t}catch{}return e.ownerDocument??document}var $l=new WeakMap;function li(e){return $l.has(e)||$l.set(e,_e(e).getComputedStyle(e)),$l.get(e)}var Ed=new Set(["menu","listbox","dialog","grid","tree","region"]),Ux=e=>Ed.has(e),Rf=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Ff(e,t){const n=new Set,o=kd(e),i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=Rf(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&&Ux(h)&&!u&&(d===t||d.contains(t)||i(d)))return!0}}}return!1};return i(e)}function Af(e,t){const n=kd(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=Rf(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&&Ed.has(h)&&!u&&(t(d),i(d))}}}};i(e)}function Yx(e){const t=new Set;return Af(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function qx(e){const t=e.getAttribute("role");return!!(t&&Ed.has(t))}function Kx(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Xx(e){var t;return Kx(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Zx(e){if(!e.id)return!1;const t=kd(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&qx(e))}var Ys=()=>typeof document<"u";function Jx(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function Qx(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var Od=e=>Ys()&&e.test(Jx()),Lf=e=>Ys()&&e.test(Qx()),e0=e=>Ys()&&e.test(navigator.vendor),Ru=()=>Ys()&&!!navigator.maxTouchPoints,t0=()=>Od(/^iPhone/i),n0=()=>Od(/^iPad/i)||qs()&&navigator.maxTouchPoints>1,$d=()=>t0()||n0(),o0=()=>qs()||$d(),qs=()=>Od(/^Mac/i),Nf=()=>o0()&&e0(/apple/i),i0=()=>Lf(/Firefox/i),a0=()=>Lf(/Android/i);function r0(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 xe(e){const t=r0(e);return t?.[0]??e.target}function wc(e){return u0(e).isComposing||e.keyCode===229}function s0(e){return e.pointerType===""&&e.isTrusted?!0:a0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Mr=e=>e.button===0,l0=e=>e.button===2||qs()&&e.ctrlKey&&e.button===0,_n=e=>e.ctrlKey||e.altKey||e.metaKey,c0=e=>"touches"in e&&e.touches.length>0,d0={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Fu={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Cc(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=d0[i]??i,n==="rtl"&&o==="horizontal"&&i in Fu&&(i=Fu[i]),i}function u0(e){return e.nativeEvent??e}function _c(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 Bf(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=_e(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function h0(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Et(e,t,n="value"){var o;if(!e)return;const i=h0(e);i&&((o=Bf(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function zf(e,t){var n;e&&((n=Bf(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function Hf(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=_e(e);e instanceof i.HTMLInputElement&&(Et(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function p0(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=_e(e);e instanceof i.HTMLInputElement&&(zf(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function g0(e){return f0(e)?e.form:e.closest("form")}function f0(e){return e.matches("textarea, input, select, button")}function m0(e,t){if(!e)return;const n=g0(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function v0(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const o=_e(n),i=new o.MutationObserver(()=>t(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function $a(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[m0(e,o),v0(e,n)];return()=>i.forEach(a=>a?.())}var jf=e=>ke(e)&&e.tagName==="IFRAME",b0=/^(audio|video|details)$/;function Wf(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var y0=e=>!Number.isNaN(Wf(e)),x0=e=>Wf(e)<0;function w0(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 Gf(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=w0(l,t);if(c){const d=Array.from(c.querySelectorAll(Ks)).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 Ks="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",Uf=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Ks));(n==!0||n=="if-empty"&&i.length===0)&&ke(e)&&dn(e)&&i.unshift(e);const a=[];for(const r of i)if(dn(r)){if(jf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...Uf(s,{getShadowRoot:o}));continue}a.push(r)}return o?Gf(a,o,dn):a};function dn(e){return!ke(e)||e.closest("[inert]")?!1:e.matches(Ks)&&Hx(e)}function Ia(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Ks));n&&ho(e)&&i.unshift(e);const a=[];for(const r of i)if(ho(r)){if(jf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...Ia(s,{getShadowRoot:o}));continue}a.push(r)}if(o){const r=Gf(a,o,ho);return!r.length&&n?i:r}return!a.length&&n?i:a}function ho(e){return ke(e)&&e.tabIndex>0?!0:dn(e)&&!x0(e)}function C0(e,t={}){const n=Ia(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function ki(e){return e.tabIndex<0&&(b0.test(e.localName)||Us(e))&&!y0(e)?0:e.tabIndex}function Id(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=Ia(t);a=o?r.filter(o)[0]:r[0]}return a||t||void 0}function _0(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=C0(t);return!(hs(n)&&e.shiftKey||hs(o)&&!e.shiftKey||!n&&!o)}var Yf=class qf{constructor(){El(this,"id",null),El(this,"fn_cleanup"),El(this,"cleanup",()=>{this.cancel()})}static create(){return new qf}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=Yf.create();return t.request(e),t.cleanup}function Xs(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 S0(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 k0(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 Ta(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(k0(a,t))})),()=>{i.forEach(a=>a?.())}}function E0(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 O0(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(E0(a,t))})),()=>{i.forEach(a=>a?.())}}function Kf(e){const t=()=>{const n=_e(e);e.dispatchEvent(new n.MouseEvent("click"))};i0()?S0(e,"keyup",t):queueMicrotask(t)}function ps(e){const t=Gx(e);return Nx(t)?ct(t).body:ke(t)&&Td(t)?t:ps(t)}function Xf(e,t=[]){const n=ps(e),o=n===e.ownerDocument.body,i=_e(n);return o?t.concat(i,i.visualViewport||[],Td(n)?n:[]):t.concat(n,Xf(n,[]))}var $0=/auto|scroll|overlay|hidden|clip/,I0=new Set(["inline","contents"]);function Td(e){const t=_e(e),{overflow:n,overflowX:o,overflowY:i,display:a}=t.getComputedStyle(e);return $0.test(n+i+o)&&!I0.has(a)}function T0(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function ma(e,t){const{rootEl:n,...o}=t||{};!e||!n||!Td(n)||!T0(n)||e.scrollIntoView(o)}function Zf(e,t){const{left:n,top:o,width:i,height:a}=t.getBoundingClientRect(),r={x:e.x-n,y:e.y-o},s={x:Mu(r.x/i),y:Mu(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 P0(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 Zo="default",Sc="",Rr=new WeakMap;function V0(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return $d()?(Zo==="default"&&(Sc=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Zo="disabled"):t&&(Rr.set(t,t.style.userSelect),t.style.userSelect="none"),()=>Jf({target:t,doc:o})}function Jf(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if($d()){if(Zo!=="disabled")return;Zo="restoring",setTimeout(()=>{Xs(()=>{Zo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Sc||""),Sc="",Zo="default")})},300)}else if(t&&Rr.has(t)){const i=Rr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),Rr.delete(t)}}function Pd(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(V0({...o,target:r}))})),()=>{a.forEach(r=>r?.())}}function Qf(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=_c(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=_c(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),Pd({doc:e})];return()=>{r.forEach(s=>s())}}function D0(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:a,isValidKey:r=f=>f.key==="Enter"}=e;if(!t)return Zi;const s=_e(t);let l=Zi,c=Zi,d=Zi;const h=f=>({point:_c(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 S=xe(w);Ue(t,S)?o?.(h(w)):a?.(h(w))},{passive:!o,once:!0}),x=se(s,"pointercancel",p,{passive:!a,once:!0});c=Ol(y,x),hs(n)&&f.pointerType==="mouse"&&f.preventDefault(),u(f)},{passive:!i}),g=se(n,"focus",v);l=Ol(m,g);function v(){const f=S=>{if(!r(S))return;const k=_=>{if(!r(_))return;const E=new s.PointerEvent("pointerup"),I=h(E);o?.(I),a?.(I)};c(),c=se(n,"keyup",k);const O=new s.PointerEvent("pointerdown");u(O)},y=()=>{const S=new s.PointerEvent("pointercancel");p(S)},x=se(n,"keydown",f),w=se(n,"blur",y);d=Ol(x,w)}return()=>{l(),c(),d()}}function Hn(e,t){return Array.from(e?.querySelectorAll(t)??[])}function em(e,t){return e?.querySelector(t)??null}var Vd=e=>e.id;function M0(e,t,n=Vd){return e.find(o=>n(o)===t)}function Zs(e,t,n=Vd){const o=M0(e,t,n);return o?e.indexOf(o):-1}function Dd(e,t,n=!0){let o=Zs(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function Md(e,t,n=!0){let o=Zs(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 R0=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(),F0=e=>{var t;return R0(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},A0=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function L0(e,t,n,o=Vd){const i=n?Zs(e,n,o):-1;let a=n?Mx(e,i):e;return t.length===1&&(a=a.filter(r=>o(r)!==n)),a.find(r=>A0(F0(r),t))}function N0(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 Rd(e,t){if(!e)return Zi;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 B0(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=L0(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 pn=Object.assign(B0,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:z0});function z0(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Fd={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 H0(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 j0(e,t){const{timeout:n,rootNode:o}=t,i=_e(o),a=ct(o),r=new i.AbortController;return H0(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 W0=Object.defineProperty,tm=e=>{throw TypeError(e)},G0=(e,t,n)=>t in e?W0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sn=(e,t,n)=>G0(e,typeof t!="symbol"?t+"":t,n),U0=(e,t,n)=>t.has(e)||tm("Cannot "+n),Au=(e,t,n)=>(U0(e,t,"read from private field"),t.get(e)),Y0=(e,t,n)=>t.has(e)?tm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function Fr(e){return e==null?[]:Array.isArray(e)?e:[e]}var q0=e=>Array.from(Array(e).keys()),ti=e=>e[0],Js=e=>e[e.length-1],K0=(e,t)=>e.indexOf(t)!==-1,sn=(e,...t)=>e.concat(t),xo=(e,...t)=>e.filter(n=>!t.includes(n)),Lu=(e,t)=>e.filter((n,o)=>o!==t),Bt=e=>Array.from(new Set(e)),Il=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},_o=(e,t)=>K0(e,t)?xo(e,t):sn(e,t);function gs(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 X0(e,t,n={}){return e[gs(e,t,n)]}function nm(e,t,n={}){const{step:o=1,loop:i=!0}=n;return gs(e,t,{step:-o,loop:i})}function Z0(e,t,n={}){return e[nm(e,t,n)]}function om(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(om(n)):t.concat(n),[])}function Nu(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Bu=e=>e?.constructor.name==="Array",J0=(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(Bu(e)&&Bu(t))return J0(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},Jo=e=>Array.isArray(e),Q0=e=>e===!0||e===!1,im=e=>e!=null&&typeof e=="object",po=e=>im(e)&&!Jo(e),sa=e=>typeof e=="string",Rn=e=>typeof e=="function",ew=e=>e==null,Fn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),tw=e=>Object.prototype.toString.call(e),am=Function.prototype.toString,nw=am.call(Object),ow=e=>{if(!im(e)||tw(e)!="[object Object]"||rw(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Fn(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&am.call(n)==nw},iw=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,aw=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,rw=e=>iw(e)||aw(e),Ha=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,sw=()=>{},va=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},rm=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Lt(e,t,...n){var o;if(e in t){const a=t[e];return Rn(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,Lt),i}var sm=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,sm)),t?.()}},{floor:lm,abs:zu,round:Qs,min:lw,max:cw,pow:dw,sign:uw}=Math,kc=e=>Number.isNaN(e),Kn=e=>kc(e)?0:e,cm=(e,t)=>(e%t+t)%t,hw=(e,t)=>(e%t+t)%t,pw=(e,t)=>Kn(e)>=t,gw=(e,t)=>Kn(e)<=t,dm=(e,t,n)=>{const o=Kn(e),i=t==null||o>=t,a=n==null||o<=n;return i&&a},fw=(e,t,n)=>Qs((Kn(e)-t)/n)*n+t,Fe=(e,t,n)=>lw(cw(Kn(e),t),n),mw=(e,t,n)=>(Kn(e)-t)/(n-t),vw=(e,t,n,o)=>Fe(fw(e*(n-t)+t,t,o),t,n),Hu=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),a=i>=0?o.length-i:0;if(a>0){let r=dw(10,a);n=Qs(n*r)/r}return n},Tl=(e,t)=>typeof t=="number"?lm(e*t+.5)/t:Qs(e),ju=(e,t,n,o)=>{const i=t!=null?Number(t):0,a=Number(n),r=(e-i)%o;let s=zu(r)*2>=o?e+uw(r)*(o-zu(r)):e-r;if(s=Hu(s,o),!kc(i)&&s<i)s=i;else if(!kc(a)&&s>a){const l=lm((a-i)/o),c=i+l*o;s=l<=0||c<i?a:c}return Hu(s,o)},fe=(e,t=0,n=10)=>{const o=Math.pow(n,t);return Qs(e*o)/o},Wu=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},um=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(Wu(e),Wu(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},bw=(e,t)=>um(Kn(e),"+",t),yw=(e,t)=>um(Kn(e),"-",t),kn=e=>typeof e=="number"?`${e}px`:e;function el(e){if(!ow(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]=el(i))}return n}function Vn(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function xw(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 ja=()=>performance.now(),Ar,ww=class{constructor(t){this.onTick=t,Sn(this,"frameId",null),Sn(this,"pausedAtMs",null),Sn(this,"context"),Sn(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Sn(this,"setStartMs",n=>{this.context.startMs=n}),Sn(this,"start",()=>{if(this.frameId!==null)return;const n=ja();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(Au(this,Ar))}),Sn(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=ja())}),Sn(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),Y0(this,Ar,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Au(this,Ar))}),this.context={now:0,startMs:ja(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:ja()-this.context.startMs}};Ar=new WeakMap;function Pl(e,t){const n=new ww(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function gn(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Cw(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Ad(e,t){if(e==null)throw new Error(t())}function Ld(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 _w=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Sw=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Gu=e=>{const t={};let n;for(;n=Sw.exec(e);)t[n[1]]=n[2];return t},kw=(e,t)=>{if(sa(e)){if(sa(t))return`${e};${t}`;e=Gu(e)}else sa(t)&&(t=Gu(t));return Object.assign({},e??{},t??{})};function tl(...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]=va(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=_w(t[i],n[i]);continue}if(i==="style"){t[i]=kw(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 Ec(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 Ye(){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 nl(){return{guards:Ye(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var Wo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Wo||{}),Vl="__init__";function Ew(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>ct(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>ra(t()),isActiveElement:hs,getById:o=>t().getElementById(o)}}function Ow(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var Y=()=>e=>Array.from(new Set(e)),hm=ie("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator");hm.build();var pm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},gm=(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}`},$w=e=>e.getById(pm(e)),ol=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(pm(e))}']:not([disabled])`;return Hn($w(e),t)},Iw=e=>ti(ol(e)),Tw=e=>Js(ol(e)),Pw=(e,t)=>Dd(ol(e),gm(e,t)),Vw=(e,t)=>Md(ol(e),gm(e,t)),{and:Dw,not:Mw}=Ye();Dw("isExpanded","canToggle"),Mw("isExpanded");Y()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);Y()(["value","disabled"]);const Rw={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}};ne({slots:[...hm.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:Rw},defaultVariants:{variant:"default"}});function Fw(e){const t=Ea(),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[Dy(xf(i))]=(...a)=>e(i,...a);return o}function Aw(e){const t=Ea(),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=wf(e);return A(()=>{const i={},a=t?.vnode.props??{};return Object.keys(a).forEach(r=>{i[xf(r)]=a[r]}),Object.keys({...n,...i}).reduce((r,s)=>(o.value[s]!==void 0&&(r[s]=o.value[s]),r),{})})}function Ct(e,t){const n=Aw(e),o=t?Fw(t):{};return A(()=>({...n.value,...o}))}const we=e=>{const t=Symbol(e);return[n=>xd(t,n),n=>Yn(t,n),t]},[fi,Nd]=we("RenderStrategyProps");function Lw(e){const t=Ae(e);return t?.$el??t}const Nw=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function K(){const e=Ea(),t=ve(),n=A(()=>{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:Lw(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,!(Nw(r)||!r)&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>r.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}const Bw=M({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=fm(n.default()),[a,...r]=i;if(Object.keys(t).length>0){(o=a.props)==null||delete o.ref;const s=tl(t,a.props??{}),l=My(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 fm(e){return e?e.flatMap(t=>t.type===Ce?fm(t.children):[t]):[]}const zw="br, hr, img, input, area, textarea".split(", "),Hw=e=>typeof e=="string"&&zw.includes(e),Dl=e=>M({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>bt(Bw,n,o):()=>{var i;return bt(e,n,Hw(e)||(i=o.default)==null?void 0:i.call(o))}}});function jw(){const e=new Map;return new Proxy(Dl,{apply(t,n,o){return Dl(o[0])},get(t,n){return e.has(n)||e.set(n,Dl(n)),e.get(n)}})}const X=jw(),[mm,il]=we("CollapsibleContext"),Ww=M({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=il();return K(),(n,o)=>b(t).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getContentProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Gw=M({__name:"collapsible-context",setup(e){const t=il();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),Uw=M({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return mm(n),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var Yw=ie("collapsible").parts("root","trigger","content","indicator"),Wa=Yw.build(),qw=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},Oc=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},Kw=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},Ei=e=>e.getById(Oc(e));function Xw(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({...Wa.root.attrs,"data-state":l?"open":"closed",dir:r("dir"),id:qw(a)})},getContentProps(){return t.element({...Wa.content.attrs,id:Oc(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":kn(h),"--width":kn(d),"--collapsed-height":kn(p),"--collapsed-width":kn(m),...c&&g&&{overflow:"hidden",minHeight:kn(p),maxHeight:kn(p)},...c&&v&&{overflow:"hidden",minWidth:kn(m),maxWidth:kn(m)}}})},getTriggerProps(){return t.element({...Wa.trigger.attrs,id:Kw(a),dir:r("dir"),type:"button","data-state":l?"open":"closed","data-disabled":j(u),"aria-controls":Oc(a),"aria-expanded":s||!1,onClick(x){x.defaultPrevented||u||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...Wa.indicator.attrs,dir:r("dir"),"data-state":l?"open":"closed","data-disabled":j(u)})}}}var Zw={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=Ei(t);if(!i)return;const a=li(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=s=>{xe(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=Ei(t);if(!i)return;const a=li(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=l=>{xe(l)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r);const s=Rd(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",r),Xs(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=Ei(e);if(!n)return;const o=()=>{const r=Ia(n).map(s=>N0(s,"inert",""));return()=>{r.forEach(s=>s())}};let i=o();const a=O0(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=Ei(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=Ei(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 Jw(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Uu={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},Qw="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function e1(e){return e in Uu?Uu[e]:e.startsWith("on")?`on${Jw(e.substr(2))}`:Qw.includes(e)?e:e.toLowerCase()}var bn=Ow(e=>{const t={};for(const n in e){const o=e[n];n==="children"?typeof o=="string"&&(t.innerHTML=o):t[e1(n)]=e[n]}return t});function fs(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=ds(t),i=A(()=>e().value!==void 0),a=ds(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=Rn(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)}}}fs.cleanup=e=>{Cd(()=>e())};fs.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function t1(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var n1=(e,t)=>{Be(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let a=0;a<n.length;a++)if(!Ne(o[a],Ae(n[a]))){i=!0;break}i&&t()})};function Ut(e,t={}){var n,o,i;const a=A(()=>{const{id:$,ids:R,getRootNode:q}=Ae(t);return Ew({id:$,ids:R,getRootNode:q})}),r=(...$)=>{e.debug&&console.log(...$)},s=A(()=>{var $;return(($=e.props)==null?void 0:$.call(e,{props:el(Ae(t)),get scope(){return a.value}}))??Ae(t)}),l=o1(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:fs,get scope(){return a.value},flush:Yu,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 q;(q=c[$])==null||q.set(R)},initial($){var R;return(R=c[$])==null?void 0:R.initial},hash($){var R,q;const V=(R=c[$])==null?void 0:R.get();return(q=c[$])==null?void 0:q.hash(V)}};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,q;const V=_.get();return!!((q=(R=e.states[V])==null?void 0:R.tags)!=null&&q.includes($))}}),f=t1(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:d}))??{}),y=()=>({state:v(),context:d,event:g(),prop:l,send:I,action:x,guard:w,track:n1,refs:f,computed:O,flush:Yu,get scope(){return a.value},choose:k}),x=$=>{const R=Rn($)?$(y()):$;if(!R)return;const q=R.map(V=>{var D,F;const U=(F=(D=e.implementations)==null?void 0:D.actions)==null?void 0:F[V];return U||gn(`[zag-js] No implementation found for action "${JSON.stringify(V)}"`),U});for(const V of q)V?.(y())},w=$=>{var R,q;return Rn($)?$(y()):(q=(R=e.implementations)==null?void 0:R.guards)==null?void 0:q[$](y())},S=$=>{const R=Rn($)?$(y()):$;if(!R)return;const q=R.map(D=>{var F,U;const G=(U=(F=e.implementations)==null?void 0:F.effects)==null?void 0:U[D];return G||gn(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),G}),V=[];for(const D of q){const F=D?.(y());F&&V.push(F)}return()=>V.forEach(D=>D?.())},k=$=>Fr($).find(R=>{let q=!R.guard;return sa(R.guard)?q=!!w(R.guard):Rn(R.guard)&&(q=R.guard(y())),q}),O=$=>{Ad(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})},_=fs(()=>({defaultValue:e.initialState({prop:l}),onChange($,R){var q,V,D;if(R){const U=h.get(R);U?.(),h.delete(R)}R&&x((q=e.states[R])==null?void 0:q.exit),x(u?.actions);const F=S((V=e.states[$])==null?void 0:V.effects);if(F&&h.set($,F),R===Vl){x(e.entry);const U=S(e.effects);U&&h.set(Vl,U)}x((D=e.states[$])==null?void 0:D.entry)}}));let E=Wo.NotStarted;Ns(()=>{const $=E===Wo.Started;E=Wo.Started,r($?"rehydrating...":"initializing..."),_.invoke(_.initial,Vl)}),Ry(()=>{E=Wo.Stopped,r("unmounting...");const $=h.values();for(const R of $)R?.();h=new Map,x(e.exit)});const I=$=>{var R,q;if(E!==Wo.Started)return;p.current=m.current,m.current=$;let V=_.get();const D=((R=e.states[V].on)==null?void 0:R[$.type])??((q=e.on)==null?void 0:q[$.type]),F=k(D);if(!F)return;u=F;const U=F.target??V;r("transition",$.type,F.target||V,`(${F.actions})`);const G=U!==V;G?_.set(U):F.reenter&&!G?_.invoke(V,V):x(F.actions)};return(i=e.watch)==null||i.call(e,y()),{state:v(),send:I,context:d,prop:l,get scope(){return a.value},refs:f,computed:O,event:g(),getStatus:()=>E}}function o1(e){return function(t){return e.value[t]}}var Yu=e=>{wd().then(()=>{e()})};const[TN,yn]=we("EnvironmentContext"),xn=A(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Xn=A(()=>({dir:"ltr",locale:"en-US"})),[PN,Zn]=we("LocaleContext"),Po=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},i1=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=A(()=>{const c=Ae(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Po(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=Ut(Zw,a),s=A(()=>Xw(r,bn)),l=ve(!1);return Be(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),A(()=>{const c=Ae(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},a1=M({__name:"collapsible-root",props:qn({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=i1(e,t);return mm(n),K(),(o,i)=>(C(),T(b(X).div,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),r1=M({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=il();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),s1=M({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=il();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),vm=Object.freeze(Object.defineProperty({__proto__:null,Content:Ww,Context:Gw,Indicator:s1,Root:a1,RootProvider:Uw,Trigger:r1},Symbol.toStringTag,{value:"Module"})),l1=()=>(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}]),c1={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function d1(e,t){return C(),H("svg",c1,[...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 u1={render:d1},h1=ie("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");h1.build();const[VN,mi]=we("FieldContext");function p1(e){if(!e)return;const t=li(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 g1(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 f1(e){if(!e)return;const t=ct(e),n=_e(e),o=g1(t),i=p1(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 bm=(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))(bm||{});const m1={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},v1=To({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:m1}}),ms=M({__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 bm[s]||r},i=ve("windows");Be(()=>t.forcePlatform,r=>{r&&(i.value=r)}),Ns(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const a=A(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(r,s)=>(C(),H("div",{class:N(b(nt)({display:"flex",columnGap:"3"}))},[(C(!0),H(Ce,null,Ge(a.value,l=>(C(),H("div",{key:l,class:N(b(v1)({type:e.type}))},oe(o(l)),3))),128))],2))}}),b1=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"}}),y1=["aria-label"],x1=["fill"],w1=["fill"],ym=M({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=A(()=>b1({variant:t.variant,size:t.size})),o=A(()=>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,x1)],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,w1)],2))],2)],10,y1))}}),C1=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"}}}}}),_1=M({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=A(()=>C1({variant:t.variant}));return(o,i)=>(C(),H("span",{class:N(n.value.root)},[L(o.$slots,"default",{},()=>[Le(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"}}},qu={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},S1=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"}}}}}),k1=["disabled","data-loading","data-selected","aria-busy"],Mn=M({__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=Bs(),n=e,o=A(()=>S1({type:n.type,size:n.size})),i=A(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),a=A(()=>t.prefix),r=A(()=>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(nt)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[z("div",{class:N([o.value.content,n.isLoading?b(nt)({position:"relative"}):""])},[a.value?(C(),H("div",{key:0,class:N([o.value.slots,n.isLoading?b(nt)({visibility:"hidden"}):""])},[L(s.$slots,"prefix")],2)):Q("",!0),n.isLoading?(C(),T(ym,{key:1,class:N([o.value.spinner,n.isLoading?b(nt)({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(nt)({paddingRight:"2",display:"inline-flex"}):"",r.value?b(nt)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?b(nt)({visibility:"hidden"}):""])},[L(s.$slots,"default",{},()=>[n.label?(C(),T(_1,{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(nt)({visibility:"hidden"}):""])},[L(s.$slots,"suffix")],2)):Q("",!0),n.shortcutKeys?(C(),H("div",{key:3,class:N([n.isLoading?b(nt)({visibility:"hidden"}):""])},[Z(ms,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):Q("",!0)],2)],10,k1))}}),E1={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},O1={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:O1,state:E1,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 $1=(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:qu.default},small:{root:qu.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 I1=ie("avatar").parts("root","image","fallback");I1.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 T1=Object.defineProperty,P1=(e,t,n)=>t in e?T1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xt=(e,t,n)=>P1(e,typeof t!="symbol"?t+"":t,n),Ku=class Pe{constructor([t,n,o,i,a,r]=[0,0,0,0,0,0]){Xt(this,"m00"),Xt(this,"m01"),Xt(this,"m02"),Xt(this,"m10"),Xt(this,"m11"),Xt(this,"m12"),Xt(this,"rotate",(...s)=>this.prepend(Pe.rotate(...s))),Xt(this,"scale",(...s)=>this.prepend(Pe.scale(...s))),Xt(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})`}},Xu=(e,t,n)=>Math.min(Math.max(e,t),n),Ga=(e,t,n)=>{const o=Xu(e.x,n.x,n.x+n.width-t.width),i=Xu(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},V1={width:0,height:0},D1={width:1/0,height:1/0},Ua=(e,t=V1,n=D1)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),go=(e,t)=>({x:e,y:t}),Zu=(e,t)=>t?go(e.x-t.x,e.y-t.y):e,M1=(e,t)=>go(e.x+t.x,e.y+t.y);function Pa(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:go(a,r)}}function R1(e){const t=go(e.minX,e.minY),n=go(e.maxX,e.minY),o=go(e.maxX,e.maxY),i=go(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var F1=(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)}},A1=(e,t)=>e.width===t?.width&&e.height===t?.height,L1=(e,t)=>e.x===t?.x&&e.y===t?.y,Ml=new WeakMap;function N1(e){if(!Ml.has(e)){const t=e.ownerDocument.defaultView||window;Ml.set(e,t.getComputedStyle(e))}return Ml.get(e)}function xm(e,t={}){return Pa(B1(e,t))}function B1(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=N1(e),{borderLeftWidth:d,borderTopWidth:h,borderRightWidth:u,borderBottomWidth:p}=c,m=Ju(d,u),g=Ju(h,p);if(o&&(l.width-=m,l.height-=g,l.x+=$c(d),l.y+=$c(h)),n){const v=e.offsetWidth-e.clientWidth-m,f=e.offsetHeight-e.clientHeight-g;l.width-=v,l.height-=f}return l}var $c=e=>parseFloat(e.replace("px","")),Ju=(...e)=>e.reduce((t,n)=>t+(n?$c(n):0),0);function z1(e,t={}){return Pa(H1(e,t))}function H1(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 j1(e,t){const n=Pa(e),{top:o,right:i,left:a,bottom:r}=R1(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 W1(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 Qu={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}},G1={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Ya,abs:Qo,min:eh}=Math;function th(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 U1(e){return G1[e]}function Y1(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:a}=o,r=th(e,n),s=U1(n),l=th(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:Qu[n].x*2-1,y:Qu[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=Qo(u)>Qo(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=Qo(g.y):Ya(g.y)!==Ya(p)&&(g.y*=-1),r.x===l.x?g.x=Qo(g.x):Ya(g.x)!==Ya(u)&&(g.x*=-1),i){case"extent":return nh(e,Ku.scale(g.x,g.y,l),!1);case"center":return nh(e,Ku.scale(g.x,g.y,{x:e.midX,y:e.midY}),!1)}}function q1(e,t,n=!0){return n?{x:eh(t.x,e.x),y:eh(t.y,e.y),width:Qo(t.x-e.x),height:Qo(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function nh(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return q1(o,i,n)}var K1=ie("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");K1.build();Y()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function X1(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 Z1={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",li(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=qa(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",qa(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",qa(t.get("styles")))},r=l=>{const c=qa(t.get("styles"));xe(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=Rd(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",a),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r),Xs(()=>s())}}}}};function qa(e){return e?.animationName||"none"}Y()(["onExitComplete","present","immediate"]);const wm=(e,t)=>{const n=ve(!1),o=ve(null),i=A(()=>({present:Ae(e).present,onExitComplete:()=>{}})),a=Ut(Z1,i),r=A(()=>X1(a));return Be(()=>r.value.present,()=>{r.value.present&&(n.value=!0)}),Be(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&r.value.setNode(s)}}),A(()=>{var s;const l=Ae(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"}}})},[Cm,_m]=we("PresenceContext");var Ro=new WeakMap,Ka=new WeakMap,Xa={},Rl=0,Sm=e=>e&&(e.host||Sm(e.parentNode)),J1=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Sm(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),Q1=new Set(["script","output","status","next-route-announcer"]),eC=e=>Q1.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),tC=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:a=!0}=t,r=J1(n,Array.isArray(e)?e:[e]);Xa[o]||(Xa[o]=new WeakMap);const s=Xa[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)&&Af(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(eC(m))return;const g=m.getAttribute(i)==="true",v=(Ro.get(m)||0)+1,f=(s.get(m)||0)+1;Ro.set(m,v),s.set(m,f),l.push(m),v===1&&g&&Ka.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(),Rl++,()=>{l.forEach(p=>{const m=Ro.get(p)-1,g=s.get(p)-1;Ro.set(p,m),s.set(p,g),m||(Ka.has(p)||p.removeAttribute(i),Ka.delete(p)),g||p.removeAttribute(o)}),Rl--,Rl||(Ro=new WeakMap,Ro=new WeakMap,Ka=new WeakMap,Xa={})}},nC=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,oC=(e,t=nC(e),n="data-aria-hidden",o=!0)=>{if(t)return tC(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},iC=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function aC(e,t={}){const{defer:n=!0}=t,o=n?iC:a=>a(),i=[];return i.push(o(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&i.push(oC(a))})),()=>{i.forEach(a=>a?.())}}function rC(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 sC(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 oh="pointerdown.outside",ih="focus.outside";function lC(e){for(const t of e)if(ke(t)&&dn(t))return!0;return!1}var km=e=>"clientY"in e;function cC(e,t){if(!km(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 dC(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ah(e,t){if(!t||!km(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 dC(r,s)?o||a:!1}function uC(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:a,defer:r,followControlledElements:s=!0}=t;if(!e)return;const l=ct(e),c=_e(e),d=rC(c),h=sC(c);function u(x,w){if(!ke(w)||!w.isConnected||Ue(e,w)||cC(e,x)||s&&Ff(e,w))return!1;const S=l.querySelector(`[aria-controls="${e.id}"]`);if(S){const O=ps(S);if(ah(x,O))return!1}const k=ps(e);return ah(x,k)?!1:!(n!=null&&n(w))}const p=new Set,m=si(e?.getRootNode());function g(x){function w(S){var k;const O=r&&!Ru()?J:I=>I(),_=S??x,E=((k=_?.composedPath)==null?void 0:k.call(_))??[_?.target];O(()=>{const I=m?E[0]:xe(x);if(!(!e||!u(x,I))){if(i||a){const $=va(i,a);e.addEventListener(oh,$,{once:!0})}rh(e,oh,{bubbles:!1,cancelable:!0,detail:{originalEvent:_,contextmenu:l0(_),focusable:lC(E),target:I}})}})}x.pointerType==="touch"?(p.forEach(S=>S()),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 S=((w=x?.composedPath)==null?void 0:w.call(x))??[x?.target],k=m?S[0]:xe(x);if(!(!e||!u(x,k))){if(o||a){const O=va(o,a);e.addEventListener(ih,O,{once:!0})}rh(e,ih,{bubbles:!1,cancelable:!0,detail:{originalEvent:x,contextmenu:!1,focusable:dn(k),target:k}})}})}return Ru()||(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 Bd(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(uC(a,t))})),()=>{i.forEach(a=>a?.())}}function rh(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function hC(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return se(ct(e),"keydown",n,{capture:!0})}var sh="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=>Ue(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ue(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];gC(e,sh,i=>{var a;(a=o.requestDismiss)==null||a.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),pC(e,sh,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function pC(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 gC(e,t,n){e.addEventListener(t,n,{once:!0})}var lh;function ch(){Ze.layers.forEach(({node:e})=>{e.style.pointerEvents=Ze.isBelowPointerBlockingLayer(e)?"none":"auto"})}function fC(e){e.style.pointerEvents=""}function mC(e,t){const n=ct(e),o=[];return Ze.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(lh=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[a,r]=j0(()=>{const s=i();return ke(s)?s:null},{timeout:1e3});a.then(s=>o.push(Rd(s,{pointerEvents:"auto"}))),o.push(r)}),()=>{Ze.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=lh,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function vC(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){gn("[@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),ch();function d(g){var v,f;const y=xe(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=xe(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=>Ue(w,g))||Ze.isInNestedLayer(e,g)}const m=[a?mC(e,t.persistentElements):void 0,hC(e,u),Bd(e,{exclude:p,onFocusOutside:h,onPointerDownOutside:d,defer:t.defer})];return()=>{Ze.remove(e),ch(),fC(e),m.forEach(g=>g?.())}}function vi(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Rn(e)?e():e;i.push(vC(a,t))})),()=>{i.forEach(a=>a?.())}}function Em(e,t={}){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Rn(e)?e():e;if(!a){gn("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ze.addBranch(a),i.push(()=>{Ze.removeBranch(a)})})),()=>{i.forEach(a=>a?.())}}var bC=Object.defineProperty,yC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t,n)=>yC(e,typeof t!="symbol"?t+"":t,n),dh={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()}},xC=[],wC=class{constructor(t,n){be(this,"trapStack"),be(this,"config"),be(this,"doc"),be(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),be(this,"portalContainers",new Set),be(this,"listenerCleanups",[]),be(this,"handleFocus",i=>{const a=xe(i),r=this.findContainerIndex(a,i)>=0;if(r||Gs(a))r&&(this.state.mostRecentlyFocusedNode=a);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if(ki(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=>ki(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}),be(this,"handlePointerDown",i=>{const a=xe(i);if(!(this.findContainerIndex(a,i)>=0)){if($i(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$i(this.config.allowOutsideClick,i)||i.preventDefault()}}),be(this,"handleClick",i=>{const a=xe(i);this.findContainerIndex(a,i)>=0||$i(this.config.clickOutsideDeactivates,i)||$i(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),be(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;Oi(i)&&i.preventDefault(),this.tryFocus(r)}}),be(this,"handleEscapeKey",i=>{CC(i)&&$i(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),be(this,"_mutationObserver"),be(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 Xx(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?Zx(l):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),be(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)}))}),be(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!dn(i)){const a=ra(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}),be(this,"tryFocus",i=>{if(i!==!1&&i!==ra(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,_C(i)&&i.select()}}),be(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(),dh.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=()=>{uh(()=>{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}),be(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}),be(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}),be(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),be(this,"getReturnFocusNode",i=>{const a=this.getNodeForOption("setReturnFocus",{params:[i]});return a||(a===!1?!1:i)}),be(this,"getOption",(i,a,r)=>i&&i[a]!==void 0?i[a]:this.config[r||a]),be(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}),be(this,"findNextNavNode",i=>{const{event:a,isBackward:r=!1}=i,s=i.target||xe(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||dn(s)&&!ho(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=ki(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else Oi(a)||(l=d?.nextTabbableNode(s,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:u})=>s===u);if(h<0&&(d?.container===s||dn(s)&&!ho(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=ki(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else Oi(a)||(l=d?.nextTabbableNode(s))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||xC;const o={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(i){return Oi(i)&&!i.shiftKey},isKeyBackward(i){return Oi(i)&&i.shiftKey},...n};this.doc=o.document||ct(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=>{Yx(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?Ff(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=Ia(t,{getShadowRoot:this.config.getShadowRoot}),o=Uf(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(ki(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(ho(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(ho(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 dh.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?uh(()=>{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=ra(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)}},Oi=e=>e.key==="Tab",$i=(e,...t)=>typeof e=="function"?e(...t):e,CC=e=>!e.isComposing&&e.key==="Escape",uh=e=>setTimeout(e,0),_C=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function SC(e,t={}){let n;const o=J(()=>{const i=typeof e=="function"?e():e;if(i){n=new wC(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:ct(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var kC=ie("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");kC.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 EC=ie("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");EC.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[Om,Va]=we("CheckboxContext"),OC=M({__name:"checkbox-context",setup(e){const t=Va();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),$C=M({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=Va();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getControlProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}});function IC(e){return!(e.metaKey||!qs()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var TC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function PC(e,t,n){const o=n?xe(n):null,i=_e(o);return e=e||o instanceof i.HTMLInputElement&&!TC.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(VC,n.key))}var Jn=null,Ic=new Set,vs=new Map,So=!1,Tc=!1,VC={Tab:!0,Escape:!0};function al(e,t){for(let n of Ic)n(e,t)}function bs(e){So=!0,IC(e)&&(Jn="keyboard",al("keyboard",e))}function yt(e){Jn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(So=!0,al("pointer",e))}function $m(e){s0(e)&&(So=!0,Jn="virtual")}function Im(e){const t=xe(e);t===_e(t)||t===ct(t)||(!So&&!Tc&&(Jn="virtual",al("virtual",e)),So=!1,Tc=!1)}function Tm(){So=!1,Tc=!0}function DC(e){if(typeof window>"u"||vs.get(_e(e)))return;const t=_e(e),n=ct(e);let o=t.HTMLElement.prototype.focus;function i(){Jn="virtual",al("virtual",null),So=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",bs,!0),n.addEventListener("keyup",bs,!0),n.addEventListener("click",$m,!0),t.addEventListener("focus",Im,!0),t.addEventListener("blur",Tm,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",yt,!0),n.addEventListener("pointermove",yt,!0),n.addEventListener("pointerup",yt,!0)):(n.addEventListener("mousedown",yt,!0),n.addEventListener("mousemove",yt,!0),n.addEventListener("mouseup",yt,!0)),t.addEventListener("beforeunload",()=>{MC(e)},{once:!0}),vs.set(t,{focus:o})}var MC=(e,t)=>{const n=_e(e),o=ct(e),i=vs.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",bs,!0),o.removeEventListener("keyup",bs,!0),o.removeEventListener("click",$m,!0),n.removeEventListener("focus",Im,!0),n.removeEventListener("blur",Tm,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",yt,!0),o.removeEventListener("pointermove",yt,!0),o.removeEventListener("pointerup",yt,!0)):(o.removeEventListener("mousedown",yt,!0),o.removeEventListener("mousemove",yt,!0),o.removeEventListener("mouseup",yt,!0)),vs.delete(n)}};function RC(){return Jn}function ys(){return Jn==="keyboard"}function zd(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;DC(i),o?.({isFocusVisible:n||ys(),modality:Jn});const a=(r,s)=>{PC(!!t,r,s)&&o?.({isFocusVisible:ys(),modality:r})};return Ic.add(a),()=>{Ic.delete(a)}}var Pm=ie("checkbox").parts("root","label","control","indicator"),Za=Pm.build(),Vm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},hh=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},FC=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Pc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},AC=e=>e.getById(Vm(e)),Qi=e=>e.getById(Pc(e));function LC(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({...Za.root.attrs,...v,dir:i("dir"),id:Vm(r),htmlFor:Pc(r),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(f){xe(f)===Qi(r)&&f.stopPropagation()}})},getLabelProps(){return t.element({...Za.label.attrs,...v,dir:i("dir"),id:hh(r)})},getControlProps(){return t.element({...Za.control.attrs,...v,dir:i("dir"),id:FC(r),"aria-hidden":!0})},getIndicatorProps(){return t.element({...Za.indicator.attrs,...v,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Pc(r),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":hh(r),"aria-invalid":d,name:i("name"),form:i("form"),value:i("value"),style:Fd,onFocus(){const f=ys();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:ph}=Ye(),NC={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:ph("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:ph("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>Lr(e.get("checked")),checked:({context:e})=>BC(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 D0({pointerNode:AC(n),keyboardNode:Qi(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 zd({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return $a(Qi(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=Qi(n);o&&(zf(o,t("checked")),o.indeterminate=Lr(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=Lr(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=Qi(t);p0(n,{checked:e("checked")})})}}}};function Lr(e){return e==="indeterminate"}function BC(e){return Lr(e)?!1:!!e}Y()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const Hd=Pm.extendWith("group");function zC(e,t,n,o={}){var i,a,r;const{passive:s=!1,eventName:l,defaultValue:c}=o,d=Ea(),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 Be(()=>e[u],y=>{f||(f=!0,v.value=y,wd(()=>{f=!1}))}),Be(v,y=>{!f&&y!==e[u]&&m(y)}),v}return A({get(){return p()},set(g){m(g)}})}function HC(e,t){const n=A(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=Fy(e),i=zC(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 A(()=>({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[Dm,jC]=we("CheckboxGroupContext"),WC=M({__name:"checkbox-group",props:qn({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=HC(e,t);return Dm(n),K(),(o,i)=>(C(),T(b(X).div,W({role:"group"},{...b(Hd).build().group.attrs},{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),GC=M({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Dm(n),K(),(o,i)=>(C(),T(b(X).div,W({role:"group"},b(Hd).build().group.attrs,{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),UC=M({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Va(),n=mi();return K(),(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:P(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),YC=M({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Va(),o=A(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return K(),(i,a)=>(C(),T(b(X).div,W(b(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),qC=M({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=Va();return K(),(n,o)=>(C(),T(b(X).span,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),KC=M({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Om(n),K(),(o,i)=>(C(),T(b(X).label,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),XC=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=mi(),r=jC(),s=A(()=>{const d=Ae(e);return tl(d,r?.value.getItemProps({value:d.value})??{})}),l=A(()=>{const d=Ae(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,...Po(d),onCheckedChange(h){var u;t?.("checkedChange",h),t?.("update:checked",h.checked),(u=d.onCheckedChange)==null||u.call(d,h)}}}),c=Ut(NC,l);return A(()=>LC(c,bn))},ZC=M({__name:"checkbox-root",props:qn({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=XC(e,t);return Om(n),K(),(o,i)=>(C(),T(b(X).label,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Fo=Object.freeze(Object.defineProperty({__proto__:null,Context:OC,Control:$C,Group:WC,GroupProvider:GC,HiddenInput:UC,Indicator:YC,Label:qC,Root:ZC,RootProvider:KC},Symbol.toStringTag,{value:"Module"}));var JC=ie("clipboard").parts("root","control","trigger","indicator","input","label");JC.build();Y()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);Y()(["copied"]);var QC=Object.defineProperty,e_=(e,t,n)=>t in e?QC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t,n)=>e_(e,typeof t!="symbol"?t+"":t,n),Nr={itemToValue(e){return typeof e=="string"?e:po(e)&&Fn(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:po(e)&&Fn(e,"label")?e.label:Nr.itemToValue(e)},isItemDisabled(e){return po(e)&&Fn(e,"disabled")?!!e.disabled:!1}},Vo=class Mm{constructor(t){this.options=t,B(this,"items"),B(this,"indexMap",null),B(this,"copy",n=>new Mm({...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))??Nr.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))??Nr.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))??Nr.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)&&t_(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(Ii(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(Ii(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(Ii(this.items,i+1,...o))}),B(this,"prepend",(...n)=>this.copy(Ii(this.items,0,...n))),B(this,"append",(...n)=>this.copy(Ii(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(Ja(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(Ja(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(Ja(this.items,a,i+1))}),B(this,"reorder",(n,o)=>this.copy(Ja(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}},t_=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function Ii(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Ja(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 n_=class Br extends Set{constructor(t=[]){super(t),B(this,"selectionMode","single"),B(this,"deselectable",!0),B(this,"copy",()=>{const n=new Br([...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 Br([o]);return this.sync(i)}),B(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new Br;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 Rm(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function o_(e){const t=i_(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 Fm(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 i_(e){return e.sort(Fm)}function a_(e,t){let n;return ot(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function r_(e,t){const n=[];return ot(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function gh(e,t){let n;return ot(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function s_(e,t){let n=t.initialResult;return ot(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function l_(e,t){return s_(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function c_(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 d_(e,t){const n=[];let o=0;const i=new Map,a=new Map;return ot(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 u_(e,t){return{type:"insert",index:e,nodes:t}}function h_(e){return{type:"remove",indexes:e}}function jd(){return{type:"replace"}}function Am(e){return[e.slice(0,-1),e[e.length-1]]}function Lm(e,t,n=new Map){var o;const[i,a]=Am(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,jd())}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(),u_(a,t))}return n}function Nm(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,jd())}for(const[o,i]of n)t.set(o,h_(i));return t}function p_(e,t){const n=new Map,[o,i]=Am(e);for(let a=o.length-1;a>=0;a--){const r=o.slice(0,a).join();n.set(r,jd())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function rl(e,t,n){return g_(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,fh(l,c,0,...s.insertNodes),a);case"insert":return n.create(o,fh(i,s.index,0,...s.nodes),a);case"replace":return n.create(o,i,a);default:return o}}})}function fh(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function g_(e,t){const n={};return ot(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 f_(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Lm(o,n);return rl(e,i,t)}function m_(e,t){if(t.at.length===0)return t.node;const n=p_(t.at,t.node);return rl(e,n,t)}function v_(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=Nm(t.indexPaths);return rl(e,n,t)}function b_(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=o_(t.indexPaths),o=n.map(a=>Rm(e,a,t)),i=Lm(t.to,o,Nm(n));return rl(e,i,t)}function ot(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 Wd=class Bm{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))??Go.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))??Go.nodeToChildrenCount(n)}),B(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??Go.nodeToValue(n)}),B(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??Go.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))??Go.nodeToString(n)}),B(this,"getFirstNode",(n=this.rootNode)=>{let o;return ot(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 ot(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=>Rm(this.rootNode,n,{getChildren:this.getNodeChildren})),B(this,"findNode",(n,o=this.rootNode)=>a_(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 r_(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)=>Fm(o.indexPath,i.indexPath)).map(({value:o})=>o)),B(this,"getIndexPath",n=>gh(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=gh(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 ot(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 ot(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 ot(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;ot(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)=>l_(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 ot(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)=>d_(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(f_(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"copy",n=>new Bm({...this.options,rootNode:n})),B(this,"_replace",(n,o,i)=>this.copy(m_(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_move",(n,o,i)=>this.copy(b_(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_remove",(n,o)=>this.copy(v_(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=c_(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}},Go={nodeToValue(e){return typeof e=="string"?e:po(e)&&Fn(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:po(e)&&Fn(e,"label")?e.label:Go.nodeToValue(e)},isNodeDisabled(e){return po(e)&&Fn(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(po(e)&&Fn(e,"childrenCount"))return e.childrenCount}};const y_=e=>new Vo(e),mh=e=>new Wd(e);var x_=Object.defineProperty,w_=(e,t,n)=>t in e?x_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gd=(e,t,n)=>w_(e,t+"",n),C_=(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},Ud=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 mw(o,i,a)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=vw(n,o,i,a);return ju(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]=Fe(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=ju(Fe(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 C_(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},__=/^#[\da-f]+$/i,S_=/^rgba?\((.*)\)$/,k_=/[^#]/gi,zm=class zr extends Ud{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(__.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(k_,"$&$&"):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(S_);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,a)=>Fe(i,0,a<3?255:1))),n.length<3?void 0:new zr(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 Kd(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 qd(fe(l*360,2),fe(c*100,2),fe(r*100,2),fe(this.alpha,2))}clone(){return new zr(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 zr.colorChannels}};Gd(zm,"colorChannels",["red","green","blue"]);var Yd=zm,E_=/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+)?)\)/,Hm=class Hr extends Ud{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(E_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new Hr(cm(o,360),Fe(i,0,100),Fe(a,0,100),Fe(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 Kd(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 Yd(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),fe(this.alpha,2))}clone(){return new Hr(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 Hr.colorChannels}};Gd(Hm,"colorChannels",["hue","saturation","lightness"]);var qd=Hm,O_=/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 jr extends Ud{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(O_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new jr(cm(o,360),Fe(i,0,100),Fe(a,0,100),Fe(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 qd(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 Yd(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),fe(this.alpha,2))}clone(){return new jr(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 jr.colorChannels}};Gd(jm,"colorChannels",["hue","saturation","brightness"]);var Kd=jm,$_="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",I_=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},vh=I_($_),xs=e=>{var t;if(vh.has(e))return xs(vh.get(e));const n=Yd.parse(e)||Kd.parse(e)||qd.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,xs),o}return n};const T_=["top","right","bottom","left"],jn=Math.min,it=Math.max,ws=Math.round,Qa=Math.floor,jt=e=>({x:e,y:e}),P_={left:"right",right:"left",bottom:"top",top:"bottom"},V_={start:"end",end:"start"};function Vc(e,t,n){return it(e,jn(t,n))}function fn(e,t){return typeof e=="function"?e(t):e}function mn(e){return e.split("-")[0]}function bi(e){return e.split("-")[1]}function Xd(e){return e==="x"?"y":"x"}function Zd(e){return e==="y"?"height":"width"}const D_=new Set(["top","bottom"]);function zt(e){return D_.has(mn(e))?"y":"x"}function Jd(e){return Xd(zt(e))}function M_(e,t,n){n===void 0&&(n=!1);const o=bi(e),i=Jd(e),a=Zd(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=Cs(r)),[r,Cs(r)]}function R_(e){const t=Cs(e);return[Dc(e),t,Dc(t)]}function Dc(e){return e.replace(/start|end/g,t=>V_[t])}const bh=["left","right"],yh=["right","left"],F_=["top","bottom"],A_=["bottom","top"];function L_(e,t,n){switch(e){case"top":case"bottom":return n?t?yh:bh:t?bh:yh;case"left":case"right":return t?F_:A_;default:return[]}}function N_(e,t,n,o){const i=bi(e);let a=L_(mn(e),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),t&&(a=a.concat(a.map(Dc)))),a}function Cs(e){return e.replace(/left|right|bottom|top/g,t=>P_[t])}function B_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wm(e){return typeof e!="number"?B_(e):{top:e,right:e,bottom:e,left:e}}function _s(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 xh(e,t,n){let{reference:o,floating:i}=e;const a=zt(t),r=Jd(t),s=Zd(r),l=mn(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(bi(t)){case"start":p[r]-=u*(n&&c?-1:1);break;case"end":p[r]+=u*(n&&c?-1:1);break}return p}const z_=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}=xh(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:S}=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}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(u=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:d,y:h}=xh(c,u,l)),g=-1)}return{x:d,y:h,placement:u,strategy:i,middlewareData:p}};async function ba(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}=fn(t,e),m=Wm(p),g=s[u?h==="floating"?"reference":"floating":h],v=_s(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=_s(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 H_=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}=fn(e,t)||{};if(c==null)return{};const h=Wm(d),u={x:n,y:o},p=Jd(i),m=Zd(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],S=u[p]-a.reference[p],k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let O=k?k[x]:0;(!O||!await(r.isElement==null?void 0:r.isElement(k)))&&(O=s.floating[x]||a.floating[m]);const _=w/2-S/2,E=O/2-g[m]/2-1,I=jn(h[f],E),$=jn(h[y],E),R=I,q=O-g[m]-$,V=O/2-g[m]/2+_,D=Vc(R,V,q),F=!l.arrow&&bi(i)!=null&&V!==D&&a.reference[m]/2-(V<R?I:$)-g[m]/2<0,U=F?V<R?V-R:V-q:0;return{[p]:u[p]+U,data:{[p]:D,centerOffset:V-D-U,...F&&{alignmentOffset:U}},reset:F}}}),j_=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}=fn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const f=mn(i),y=zt(s),x=mn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=u||(x||!g?[Cs(s)]:R_(s)),k=m!=="none";!u&&k&&S.push(...N_(s,g,m,w));const O=[s,...S],_=await ba(t,v),E=[];let I=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&E.push(_[f]),h){const V=M_(i,r,w);E.push(_[V[0]],_[V[1]])}if(I=[...I,{placement:i,overflows:E}],!E.every(V=>V<=0)){var $,R;const V=((($=a.flip)==null?void 0:$.index)||0)+1,D=O[V];if(D&&(!(h==="alignment"&&y!==zt(D))||I.every(U=>zt(U.placement)===y?U.overflows[0]>0:!0)))return{data:{index:V,overflows:I},reset:{placement:D}};let F=(R=I.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:R.placement;if(!F)switch(p){case"bestFit":{var q;const U=(q=I.filter(G=>{if(k){const ee=zt(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:q[0];U&&(F=U);break}case"initialPlacement":F=s;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function wh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ch(e){return T_.some(t=>e[t]>=0)}const W_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=fn(e,t);switch(o){case"referenceHidden":{const a=await ba(t,{...i,elementContext:"reference"}),r=wh(a,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ch(r)}}}case"escaped":{const a=await ba(t,{...i,altBoundary:!0}),r=wh(a,n.floating);return{data:{escapedOffsets:r,escaped:Ch(r)}}}default:return{}}}}},Gm=new Set(["left","top"]);async function G_(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=mn(n),s=bi(n),l=zt(n)==="y",c=Gm.has(r)?-1:1,d=a&&l?-1:1,h=fn(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 U_=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 G_(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}}}}},Y_=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}=fn(e,t),c={x:n,y:o},d=await ba(t,l),h=zt(mn(i)),u=Xd(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=Vc(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=Vc(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}}}}}},q_=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}=fn(e,t),d={x:n,y:o},h=zt(i),u=Xd(h);let p=d[u],m=d[h];const g=fn(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,S=a.reference[u]+a.reference[x]-v.mainAxis;p<w?p=w:p>S&&(p=S)}if(c){var f,y;const x=u==="y"?"width":"height",w=Gm.has(mn(i)),S=a.reference[h]-a.floating[x]+(w&&((f=r.offset)==null?void 0:f[h])||0)+(w?0:v.crossAxis),k=a.reference[h]+a.reference[x]+(w?0:((y=r.offset)==null?void 0:y[h])||0)-(w?v.crossAxis:0);m<S?m=S:m>k&&(m=k)}return{[u]:p,[h]:m}}}},K_=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}=fn(e,t),d=await ba(t,c),h=mn(i),u=bi(i),p=zt(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=jn(g-d[v],y),S=jn(m-d[f],x),k=!t.middlewareData.shift;let O=w,_=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(O=y),k&&!u){const I=it(d.left,0),$=it(d.right,0),R=it(d.top,0),q=it(d.bottom,0);p?_=m-2*(I!==0||$!==0?I+$:it(d.left,d.right)):O=g-2*(R!==0||q!==0?R+q:it(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 sl(){return typeof window<"u"}function yi(e){return Um(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yt(e){var t;return(t=(Um(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Um(e){return sl()?e instanceof Node||e instanceof rt(e).Node:!1}function Tt(e){return sl()?e instanceof Element||e instanceof rt(e).Element:!1}function Gt(e){return sl()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function _h(e){return!sl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}const X_=new Set(["inline","contents"]);function Da(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!X_.has(i)}const Z_=new Set(["table","td","th"]);function J_(e){return Z_.has(yi(e))}const Q_=[":popover-open",":modal"];function ll(e){return Q_.some(t=>{try{return e.matches(t)}catch{return!1}})}const eS=["transform","translate","scale","rotate","perspective"],tS=["transform","translate","scale","rotate","perspective","filter"],nS=["paint","layout","strict","content"];function Qd(e){const t=eu(),n=Tt(e)?Pt(e):e;return eS.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)||tS.some(o=>(n.willChange||"").includes(o))||nS.some(o=>(n.contain||"").includes(o))}function oS(e){let t=Wn(e);for(;Gt(t)&&!ci(t);){if(Qd(t))return t;if(ll(t))return null;t=Wn(t)}return null}function eu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const iS=new Set(["html","body","#document"]);function ci(e){return iS.has(yi(e))}function Pt(e){return rt(e).getComputedStyle(e)}function cl(e){return Tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wn(e){if(yi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_h(e)&&e.host||Yt(e);return _h(t)?t.host:t}function Ym(e){const t=Wn(e);return ci(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(t)&&Da(t)?t:Ym(t)}function ya(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ym(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=rt(i);if(a){const s=Mc(r);return t.concat(r,r.visualViewport||[],Da(i)?i:[],s&&n?ya(s):[])}return t.concat(i,ya(i,[],n))}function Mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qm(e){const t=Pt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Gt(e),a=i?e.offsetWidth:n,r=i?e.offsetHeight:o,s=ws(n)!==a||ws(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function tu(e){return Tt(e)?e:e.contextElement}function ni(e){const t=tu(e);if(!Gt(t))return jt(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=qm(t);let r=(a?ws(n.width):n.width)/o,s=(a?ws(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const aS=jt(0);function Km(e){const t=rt(e);return!eu()||!t.visualViewport?aS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==rt(e)?!1:t}function ko(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=tu(e);let r=jt(1);t&&(o?Tt(o)&&(r=ni(o)):r=ni(e));const s=rS(a,n,o)?Km(a):jt(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=rt(a),p=o&&Tt(o)?rt(o):o;let m=u,g=Mc(m);for(;g&&o&&p!==m;){const v=ni(g),f=g.getBoundingClientRect(),y=Pt(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=rt(g),g=Mc(m)}}return _s({width:d,height:h,x:l,y:c})}function dl(e,t){const n=cl(e).scrollLeft;return t?t.left+n:ko(Yt(e)).left+n}function Xm(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-dl(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function sS(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",r=Yt(o),s=t?ll(t.floating):!1;if(o===r||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=jt(1);const d=jt(0),h=Gt(o);if((h||!h&&!a)&&((yi(o)!=="body"||Da(r))&&(l=cl(o)),Gt(o))){const p=ko(o);c=ni(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const u=r&&!h&&!a?Xm(r,l):jt(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 lS(e){return Array.from(e.getClientRects())}function cS(e){const t=Yt(e),n=cl(e),o=e.ownerDocument.body,i=it(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=it(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+dl(e);const s=-n.scrollTop;return Pt(o).direction==="rtl"&&(r+=it(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Sh=25;function dS(e,t){const n=rt(e),o=Yt(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=eu();(!d||d&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=dl(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<=Sh&&(a-=m)}else c<=Sh&&(a+=c);return{width:a,height:r,x:s,y:l}}const uS=new Set(["absolute","fixed"]);function hS(e,t){const n=ko(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Gt(e)?ni(e):jt(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 kh(e,t,n){let o;if(t==="viewport")o=dS(e,n);else if(t==="document")o=cS(Yt(e));else if(Tt(t))o=hS(t,n);else{const i=Km(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _s(o)}function Zm(e,t){const n=Wn(e);return n===t||!Tt(n)||ci(n)?!1:Pt(n).position==="fixed"||Zm(n,t)}function pS(e,t){const n=t.get(e);if(n)return n;let o=ya(e,[],!1).filter(s=>Tt(s)&&yi(s)!=="body"),i=null;const a=Pt(e).position==="fixed";let r=a?Wn(e):e;for(;Tt(r)&&!ci(r);){const s=Pt(r),l=Qd(r);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&i&&uS.has(i.position)||Da(r)&&!l&&Zm(e,r))?o=o.filter(c=>c!==r):i=s,r=Wn(r)}return t.set(e,o),o}function gS(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?ll(t)?[]:pS(t,this._c):[].concat(n),o],r=a[0],s=a.reduce((l,c)=>{const d=kh(t,c,i);return l.top=it(d.top,l.top),l.right=jn(d.right,l.right),l.bottom=jn(d.bottom,l.bottom),l.left=it(d.left,l.left),l},kh(t,r,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function fS(e){const{width:t,height:n}=qm(e);return{width:t,height:n}}function mS(e,t,n){const o=Gt(t),i=Yt(t),a=n==="fixed",r=ko(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=jt(0);function c(){l.x=dl(i)}if(o||!o&&!a)if((yi(t)!=="body"||Da(i))&&(s=cl(t)),o){const p=ko(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?Xm(i,s):jt(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 Fl(e){return Pt(e).position==="static"}function Eh(e,t){if(!Gt(e)||Pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Yt(e)===n&&(n=n.ownerDocument.body),n}function Jm(e,t){const n=rt(e);if(ll(e))return n;if(!Gt(e)){let i=Wn(e);for(;i&&!ci(i);){if(Tt(i)&&!Fl(i))return i;i=Wn(i)}return n}let o=Eh(e,t);for(;o&&J_(o)&&Fl(o);)o=Eh(o,t);return o&&ci(o)&&Fl(o)&&!Qd(o)?n:o||oS(e)||n}const vS=async function(e){const t=this.getOffsetParent||Jm,n=this.getDimensions,o=await n(e.floating);return{reference:mS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bS(e){return Pt(e).direction==="rtl"}const yS={convertOffsetParentRelativeRectToViewportRelativeRect:sS,getDocumentElement:Yt,getClippingRect:gS,getOffsetParent:Jm,getElementRects:vS,getClientRects:lS,getDimensions:fS,getScale:ni,isElement:Tt,isRTL:bS};function Qm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xS(e,t){let n=null,o;const i=Yt(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=Qa(h),g=Qa(i.clientWidth-(d+u)),v=Qa(i.clientHeight-(h+p)),f=Qa(d),y={rootMargin:-m+"px "+-g+"px "+-v+"px "+-f+"px",threshold:it(0,jn(1,l))||1};let x=!0;function w(S){const k=S[0].intersectionRatio;if(k!==l){if(!x)return r();k?r(!1,k):o=setTimeout(()=>{r(!1,1e-7)},1e3)}k===1&&!Qm(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 wS(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=tu(e),d=i||a?[...c?ya(c):[],...ya(t)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),a&&f.addEventListener("resize",n)});const h=c&&s?xS(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?ko(e):null;l&&v();function v(){const f=ko(e);g&&!Qm(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 CS=U_,_S=Y_,SS=j_,kS=K_,ES=W_,OS=H_,$S=q_,IS=(e,t,n)=>{const o=new Map,i={platform:yS,...n},a={...i.platform,_c:o};return z_(e,t,{...i,platform:a})};function Oh(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 TS(e){if(!e)return Oh();const{x:t,y:n,width:o,height:i}=e;return Oh(t,n,o,i)}function PS(e,t){return{contextElement:ke(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?TS(o):n.getBoundingClientRect()}}}var Ti=e=>({variable:e,reference:`var(${e})`}),tn={arrowSize:Ti("--arrow-size"),arrowSizeHalf:Ti("--arrow-size-half"),arrowBg:Ti("--arrow-background"),transformOrigin:Ti("--transform-origin"),arrowOffset:Ti("--arrow-offset")},VS=e=>e==="top"||e==="bottom"?"y":"x";function DS(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=VS(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),S=d.reference.height/2,k=f/2,O=((r=e.offset)==null?void 0:r.mainAxis)??e.gutter,_=typeof O=="number"?O+k:O??k,E=w>_,I={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+S-h}px`,R=!!e.overlap&&p==="y"&&E;return s.floating.style.setProperty(tn.transformOrigin.variable,R?$:I),{data:{transformOrigin:R?$:I}}}}}var MS={name:"rects",fn({rects:e}){return{data:e}}},RS=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% + ${tn.arrowOffset.reference})`}),{}}}};function FS(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function AS(e){return e.split("-")[0]}var LS={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function $h(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function nu(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function NS(e,t,n){const o=e||t.createElement("div");return OS({element:o,padding:n.arrowPadding})}function BS(e,t){if(!ew(t.offset??t.gutter))return CS(({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}=FS(n),c=l?void 0:t.shift,d=((i=t.offset)==null?void 0:i.crossAxis)??c;return el({crossAxis:d,mainAxis:s,alignmentAxis:t.shift})})}function zS(e){if(!e.flip)return;const t=nu(e.boundary);return SS({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function HS(e){if(!e.slide&&!e.overlap)return;const t=nu(e.boundary);return _S({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:$S()})}function jS(e){return kS({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 WS(e){if(e.hideWhenDetached)return ES({strategy:"referenceHidden",boundary:nu(e.boundary)??"clippingAncestors"})}function GS(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function US(e,t,n={}){const o=PS(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},LS,n),a=t.querySelector("[data-part=arrow]"),r=[BS(a,i),zS(i),HS(i),NS(a,t.ownerDocument,i),RS(a),DS({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),jS(i),WS(i),MS],{placement:s,strategy:l,onComplete:c,onPositioned:d}=i,h=async()=>{var g;if(!o||!t)return;const v=await IS(o,t,{placement:s,middleware:r,strategy:l});c?.(v),d?.({placed:!0});const f=_e(t),y=$h(f,v.x),x=$h(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 S=li(w);t.style.setProperty("--z-index",S.zIndex)}},u=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:h,floatingElement:t}),d?.({placed:!0})):await h()},p=GS(i.listeners),m=i.listeners?wS(o,t,u,p):sw;return u(),()=>{m?.(),d?.({placed:!1})}}function lt(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(US(s,l,i))})),()=>{r.forEach(s=>s?.())}}var YS={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ev(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:tn.arrowSize.reference,height:tn.arrowSize.reference,[tn.arrowSizeHalf.variable]:`calc(${tn.arrowSize.reference} / 2)`,[tn.arrowOffset.variable]:`calc(${tn.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?YS[t.split("-")[0]]:void 0,background:tn.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 tv=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"]);tv.build();var qS=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},KS=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},XS=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},ZS=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},JS=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},QS=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},ek=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},tk=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},nk=(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}`},ok=(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}`},Wr=e=>e.getById(ZS(e)),ik=e=>e.getById(tk(e)),ak=(e,t)=>e.getById(ok(e,t)),rk=e=>e.getById(QS(e)),Ih=e=>e.getById(qS(e)),sk=e=>e.getById(ek(e)),lk=(e,t,n)=>{const o=sk(e);if(!o)return;const{getPercentValue:i}=Zf(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},ck=e=>e.getById(KS(e)),Al=e=>e.getById(XS(e)),dk=e=>e.getById(JS(e)),uk=(e,t)=>e.getById(nk(e,t)),hk=(e,t,n,o)=>{const i=uk(e,n);if(!i)return;const{getPercentValue:a}=Zf(t,i);return{x:a({dir:o,orientation:"horizontal"}),y:a({orientation:"vertical"})}},pk=e=>[...Hn(Wr(e),"input[data-channel]"),...Hn(ck(e),"input[data-channel]")];function gk(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 Th=e=>xs(e),fk=/^[0-9a-fA-F]{3,8}$/;function mk(e){return fk.test(e)}function vk(e){return e.startsWith("#")?e:mk(e)?`#${e}`:e}var{and:bk}=Ye();bk("isOpenControlled","closeOnSelect");function Ph(e,t,n){const o=pk(e);J(()=>{o.forEach(i=>{const a=i.dataset.channel;Et(i,gk(n||t,a))})})}function yk(e,t){const n=rk(e);n&&J(()=>Et(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"]);tv.extendWith("view");var nv=ie("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");nv.build();var ov=e=>new Vo(e);ov.empty=()=>new Vo({items:[]});var xk=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},wk=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},Ck=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},_k=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},Sk=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},kk=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},Tn=e=>e.getById(Ck(e)),Uo=e=>e.getById(wk(e)),Vh=e=>e.getById(_k(e)),Dh=e=>e.getById(xk(e)),ea=e=>e.getById(Sk(e)),Mh=e=>e.getById(kk(e)),Pi=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return em(Tn(e),n)},Rh=e=>{const t=Uo(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},Ek=e=>{const t=ea(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:Ok,createMachine:$k,choose:Ik}=nl(),{and:Te,not:et}=Ok;$k({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}){Kf(t)},collection:ov.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=Lt(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:Ik([{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",et("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",et("hasHighlightedItem"),et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("hasHighlightedItem"),et("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",et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("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",et("hasHighlightedItem"),et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("hasHighlightedItem"),et("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",et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("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 Q0(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:vi(()=>Tn(n),{type:"listbox",defer:!0,exclude:()=>[Uo(n),ea(n),Mh(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 aC([Uo(e),Tn(e),ea(e),Mh(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Dh(n)||ea(n),i=()=>Vh(n);return e.set("currentPlacement",t("positioning").placement),lt(o,i,{...t("positioning"),defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=Uo(n);let a=[];const r=c=>{const d=o.current().type.includes("POINTER"),h=e.get("highlightedValue");if(d||!h)return;const u=Tn(n),p=t("scrollToIndexFn");if(p){const v=t("collection").indexOf(h);p({index:v,immediate:c,getElement:()=>Pi(n,h)});return}const m=Pi(n,h),g=J(()=>{ma(m,{rootEl:u,block:"nearest"})});a.push(g)},s=J(()=>r(!0));a.push(s);const l=Ta(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}){lt(()=>Dh(n),()=>Vh(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")?_o(n.get("value"),a):[a];(t=o("onSelect"))==null||t({value:r,itemValue:a}),n.set("value",r);const s=Lt(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(r),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){Xs(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=Pi(n,o),a=Tn(n),r=t("scrollToIndexFn");if(r){const s=t("collection").indexOf(o);r({index:s,immediate:!0,getElement:()=>Pi(n,o)});return}ma(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")?_o(t.get("value"),n.value):[n.value];(a=i("onSelect"))==null||a({value:r,itemValue:n.value}),t.set("value",r);const s=Lt(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=xo(t.get("value"),n.value);t.set("value",a);const r=Lt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",r)})},setInitialFocus({scope:e}){J(()=>{Rh(e)})},setFinalFocus({scope:e}){J(()=>{const t=ea(e);t?.dataset.focusable==null?Rh(e):Ek(e)})},syncInputValue({context:e,scope:t,event:n}){const o=Uo(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&Dx(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=Lt(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=Lt(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=Lt(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:()=>Pi(t,o)})}else{const o=Tn(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=Fh(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=Fh(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(Tn(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}){(Tn(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=Uo(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=Lt(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 Fh(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"]);nv.extendWith("empty");function Ll(e,t){return e-t*Math.floor(e/t)}const iv=1721426;function er(e,t,n,o){t=ou(e,t);let i=t-1,a=-2;return n<=2?a=0:Gr(t)&&(a=-1),iv-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+o)}function Gr(e){return e%4===0&&(e%100!==0||e%400===0)}function ou(e,t){return e==="BC"?1-t:t}function Tk(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const Pk={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 di=class{fromJulianDay(t){let n=t,o=n-iv,i=Math.floor(o/146097),a=Ll(o,146097),r=Math.floor(a/36524),s=Ll(a,36524),l=Math.floor(s/1461),c=Ll(s,1461),d=Math.floor(c/365),h=i*400+r*100+l*4+d+(r!==4&&d!==4?1:0),[u,p]=Tk(h),m=n-er(u,p,1,1),g=2;n<er(u,p,3,1)?g=0:Gr(p)&&(g=1);let v=Math.floor(((m+g)*12+373)/367),f=n-er(u,p,v,1)+1;return new ks(u,p,v,f)}toJulianDay(t){return er(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return Pk[Gr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Gr(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 Vk={"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 ul(e,t){return t=Ot(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Dk(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 Mk(e,t,n){let o=e.calendar.toJulianDay(e),i=Bk(t),a=Math.ceil(o+1-i)%7;return a<0&&(a+=7),a}function Rk(e){return ln(Date.now(),e)}function av(e){return oi(Rk(e))}function rv(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Fk(e,t){return Ah(e)-Ah(t)}function Ah(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Nl=null;function iu(){return Nl==null&&(Nl=new Intl.DateTimeFormat().resolvedOptions().timeZone),Nl}function sv(e){return e.subtract({days:e.day-1})}function Ak(e){return sv(e.subtract({months:e.month-1}))}function Lk(e,t,n){let o=Mk(e,t);return e.subtract({days:o})}const Lh=new Map,Bl=new Map;function Nk(e){if(Intl.Locale){let n=Lh.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Lh.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function Bk(e){let t=Bl.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Bl.set(e,t),t.firstDay}let n=Nk(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&&Vk[n]||0};Bl.set(e,t)}return t.firstDay}function lv(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function cv(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ui(e){e=Ot(e,new di);let t=ou(e.era,e.year);return dv(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function dv(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 Rc(e,t){if(t==="UTC")return 0;if(e>0&&t===iu())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=uv(e,t);return dv(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Nh=new Map;function uv(e,t){let n=Nh.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"}),Nh.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 Bh=864e5;function zk(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>Hk(e,t,i))}function Hk(e,t,n){let o=uv(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 an(e,t,n="compatible"){let o=Eo(e);if(t==="UTC")return ui(o);if(t===iu()&&n==="compatible"){o=Ot(o,new di);let l=new Date,c=ou(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=ui(o),a=Rc(i-Bh,t),r=Rc(i+Bh,t),s=zk(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 hv(e,t,n="compatible"){return new Date(an(e,t,n))}function ln(e,t){let n=Rc(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 xv(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,d)}function oi(e){return new ks(e.calendar,e.era,e.year,e.month,e.day)}function Eo(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 aE(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function Ot(e,t){if(Dk(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,Oo(o),o}function jk(e,t,n){if(e instanceof xv)return e.timeZone===t?e:Gk(e,t);let o=an(e,t,n);return ln(o,t)}function Wk(e){let t=ui(e)-e.offset;return new Date(t)}function Gk(e,t){let n=ui(e)-e.offset;return Ot(ln(n,t),e.calendar)}const Vi=36e5;function hl(e,t){let n=e.copy(),o="hour"in n?Kk(n,t):0;Fc(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Ac(n),pv(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,Uk(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 Fc(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Ac(e){for(;e.month<1;)Fc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Fc(e,1)}function Uk(e){for(;e.day<1;)e.month--,Ac(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Ac(e)}function pv(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 Oo(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),pv(e)}function gv(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function fv(e,t){return hl(e,gv(t))}function au(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),Oo(n),n}function Ss(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),qk(n),n}function Yk(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=tr(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=tr(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=tr(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=tr(e.hour,24),t}function qk(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 tr(e,t){let n=e%t;return n<0&&(n+=t),n}function Kk(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Yk(e)}function ru(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=cn(l,n,0,s.length-1,o?.round),i.era=s[l],Oo(i);break}case"year":var a,r;!((a=(r=i.calendar).isInverseEra)===null||a===void 0)&&a.call(r,i)&&(n=-n),i.year=cn(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=cn(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=cn(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),Oo(i),i}function mv(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=cn(a,n,r,s,o?.round);break}case"minute":i.minute=cn(e.minute,n,0,59,o?.round);break;case"second":i.second=cn(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=cn(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function cn(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 vv(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=hl(Eo(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=an(i,e.timeZone)}else n=ui(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=ln(n,e.timeZone);return Ot(o,e.calendar)}function Xk(e,t){return vv(e,gv(t))}function Zk(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=Eo(e),s=Ot(Ss(r,{hour:i}),new di),l=[an(s,e.timeZone,"earlier"),an(s,e.timeZone,"later")].filter(m=>ln(m,e.timeZone).day===s.day)[0],c=Ot(Ss(r,{hour:a}),new di),d=[an(c,e.timeZone,"earlier"),an(c,e.timeZone,"later")].filter(m=>ln(m,e.timeZone).day===c.day).pop(),h=ui(e)-e.offset,u=Math.floor(h/Vi),p=h%Vi;return h=cn(u,n,Math.floor(l/Vi),Math.floor(d/Vi),o?.round)*Vi+p,Ot(ln(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return mv(e,t,n,o);case"era":case"year":case"month":case"day":{let i=ru(Eo(e),t,n,o),a=an(i,e.timeZone);return Ot(ln(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function Jk(e,t,n){let o=Eo(e),i=Ss(au(o,t),t);if(i.compare(o)===0)return e;let a=an(i,e.timeZone,n);return Ot(ln(a,e.timeZone),e.calendar)}function Qk(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 bv(e){let t=Ot(e,new di),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 yv(e){return`${bv(e)}T${Qk(e)}`}function eE(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 tE(e){return`${yv(e)}${eE(e.offset)}[${e.timeZone}]`}function nE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function su(e,t,n){nE(e,t),t.set(e,n)}function lu(e){let t=typeof e[0]=="object"?e.shift():new di,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 oE=new WeakMap;let ks=class Lc{copy(){return this.era?new Lc(this.calendar,this.era,this.year,this.month,this.day):new Lc(this.calendar,this.year,this.month,this.day)}add(t){return hl(this,t)}subtract(t){return fv(this,t)}set(t){return au(this,t)}cycle(t,n,o){return ru(this,t,n,o)}toDate(t){return hv(this,t)}toString(){return bv(this)}compare(t){return rv(this,t)}constructor(...t){su(this,oE,{writable:!0,value:void 0});let[n,o,i,a,r]=lu(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,Oo(this)}};var iE=new WeakMap;let aE=class Nc{copy(){return this.era?new Nc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Nc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return hl(this,t)}subtract(t){return fv(this,t)}set(t){return au(Ss(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return ru(this,t,n,o);default:return mv(this,t,n,o)}}toDate(t,n){return hv(this,t,n)}toString(){return yv(this)}compare(t){let n=rv(this,t);return n===0?Fk(this,Eo(t)):n}constructor(...t){su(this,iE,{writable:!0,value:void 0});let[n,o,i,a,r]=lu(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,Oo(this)}};var rE=new WeakMap;let xv=class Bc{copy(){return this.era?new Bc(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Bc(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return vv(this,t)}subtract(t){return Xk(this,t)}set(t,n){return Jk(this,t,n)}cycle(t,n,o){return Zk(this,t,n,o)}toDate(){return Wk(this)}toString(){return tE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-jk(t,this.timeZone).toDate().getTime()}constructor(...t){su(this,rE,{writable:!0,value:void 0});let[n,o,i,a,r]=lu(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,Oo(this)}},zl=new Map,Es=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 cE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=dE(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=wv(t,n),this.options=n}};const sE={true:{ja:"h11"},false:{}};function wv(e,t={}){if(typeof t.hour12=="boolean"&&lE()){t={...t};let i=sE[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(zl.has(n))return zl.get(n);let o=new Intl.DateTimeFormat(e,t);return zl.set(n,o),o}let Hl=null;function lE(){return Hl==null&&(Hl=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Hl}let jl=null;function cE(){return jl==null&&(jl=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),jl}function dE(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=wv(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 uE(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=Do(e,t,n).subtract(a);return Ma(e,r,t,n,o,i)}function Do(e,t,n,o,i){let a=e;return t.years?a=Ak(e):t.months?a=sv(e):t.weeks&&(a=Lk(e,n)),Ma(e,a,t,n,o,i)}function cu(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=Do(e,t,n).subtract(a);return Ma(e,r,t,n,o,i)}function Ma(e,t,n,o,i,a){return i&&e.compare(i)>=0&&(t=cv(t,Do(oi(i),n,o))),a&&e.compare(a)<=0&&(t=lv(t,cu(oi(a),n,o))),t}function rn(e,t,n){let o=oi(e);return t&&(o=cv(o,oi(t))),n&&(o=lv(o,oi(n))),o}function zh(e,t,n,o,i,a){switch(t){case"start":return Do(e,n,o,i,a);case"end":return cu(e,n,o,i,a);case"center":default:return uE(e,n,o,i,a)}}function fo(e,t){return t!=null&&ul(e,t)}function pl(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function hE(e,t,n){const o=e.subtract({days:1});return ul(o,e)||pl(o,t,n)}function pE(e,t,n){const o=e.add({days:1});return ul(o,e)||pl(o,t,n)}function Cv(e){let t={...e};for(let n in t)t[n]=1;return t}function _v(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function gE(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function fE(e,t){const n=Eo(av(t));return new Es(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:gE(n),timeZone:t})}function mE(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 vE(e,t,n,o){let i=e,a=e,r=fE(n,o);return ul(i,a)?r.format(i.toDate(o)):mE(i,a,r,(s,l)=>`${s} – ${l}`,o)}var bE=10;function yE(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+bE?(i-100).toString():i.toString()}return e}}function Hh(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 jh(e){return av(e??iu())}function Ra(e,t,n,o){return function(i){const{startDate:a,focusedDate:r}=i,s=_v(a,e);return pl(r,n,o)?{startDate:a,focusedDate:rn(r,n,o),endDate:s}:r.compare(a)<0?{startDate:cu(r,e,t,n,o),focusedDate:rn(r,n,o),endDate:s}:r.compare(s)>0?{startDate:Do(r,e,t,n,o),endDate:s,focusedDate:rn(r,n,o)}:{startDate:a,endDate:s,focusedDate:rn(r,n,o)}}}function Sv(e,t,n,o,i,a){const r=Ra(n,o,i,a),s=t.add(n);return r({focusedDate:e.add(n),startDate:Do(Ma(e,s,n,o,i,a),n,o)})}function kv(e,t,n,o,i,a){const r=Ra(n,o,i,a);let s=t.subtract(n);return r({focusedDate:e.subtract(n),startDate:Do(Ma(e,s,n,o,i,a),n,o)})}function xE(e,t,n,o,i,a,r){const s=Ra(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.add(Cv(o)),startDate:t});if(o.days)return Sv(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 wE(e,t,n,o,i,a,r){const s=Ra(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.subtract(Cv(o)),startDate:t});if(o.days)return kv(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 Wh=e=>e!=null&&e.length===4,CE=e=>e!=null&&parseFloat(e)<=12,_E=e=>e!=null&&parseFloat(e)<=31;function SE(e,t,n){const o=kE(t,n);let{year:i,month:a,day:r}=EE(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(Wh(i)||(i=yE(i)),Wh(i)&&CE(a)&&_E(r))return new ks(+i,+a,+r);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new ks(l.getFullYear(),l.getMonth()+1,l.getDate())}}function kE(e,t){return new Es(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 EE(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 nr="__live-region__";function Ev(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(nr);h?.remove(),d=d??i;const u=n.createElement("span");u.id=nr,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(nr);c?.remove()}return{announce:s,destroy:l,toJSON(){return nr}}}var Ov=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");Ov.build();var OE=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},$E=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},IE=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},TE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},PE=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},VE=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},DE=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},Gh=(e,t)=>em(Ur(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),Uh=e=>e.getById(TE(e)),Ur=e=>e.getById(OE(e)),Di=e=>Hn($v(e),"[data-part=input]"),ME=e=>e.getById(DE(e)),RE=e=>e.getById(VE(e)),FE=e=>e.getById($E(e)),AE=e=>e.getById(PE(e)),$v=e=>e.getById(IE(e));function Yh(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function or(e){return e.slice().sort((t,n)=>t.compare(n))}var qh=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year);function un(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function du(e){return e===0?"day":e===1?"month":"year"}function uu(e,t,n){return du(Fe(un(e,0),un(t,0),un(n,2)))}function LE(e,t){return un(e,0)>un(t,0)}function NE(e,t){return un(e,0)<un(t,0)}function BE(e,t,n){const o=un(e,0)+1;return uu(du(o),t,n)}function zE(e,t,n){const o=un(e,0)-1;return uu(du(o),t,n)}var HE=["day","month","year"];function jE(e){HE.forEach(t=>e(t))}var{and:ht}=Ye();function WE(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(!fo(e[o],t[o]))return!1;return!0}function ir(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}ht("shouldRestoreFocus","isInteractOutsideEvent"),ht("isRangePicker","hasSelectedRange"),ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),ht("isRangePicker","isSelectingEndDate","closeOnSelect"),ht("isRangePicker","isSelectingEndDate"),ht("closeOnSelect","isOpenControlled"),ht("isRangePicker","isSelectingEndDate"),ht("isRangePicker","hasSelectedRange"),ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),ht("isRangePicker","isSelectingEndDate","closeOnSelect"),ht("isRangePicker","isSelectingEndDate"),ht("closeOnSelect","isOpenControlled");var Yr=(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 jE(r=>{NE(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=Yr(e,t);if(fo(n.get("focusedValue"),a))return;const r=Ra(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 ar(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");fo(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 GE=Ov.extendWith("view");var Iv=ie("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger");Iv.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 UE=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,Tv=e=>e.isDirectory,zc=e=>e.isFile,Hc=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),YE=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=UE(n);if(!o)return null;if(Tv(o)&&t)return Pv(o.createReader(),`${o.name}`);if(zc(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?Hc(i,""):null)}if(zc(o))return new Promise(i=>{o.file(a=>{i(Hc(a,""))})})}).filter(n=>n)),Pv=(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(Tv(s))return Pv(s.createReader(),`${t}${s.name}`);if(zc(s))return new Promise(l=>{s.file(c=>{l(Hc(c,t))})})}).filter(s=>s);o.push(Promise.all(r)),i()})};i()});function qE(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function KE(e){return/^.*\.[\w]+$/.test(e)}var Kh=e=>qE(e)||KE(e);function XE(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(Kh).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(Kh).join(",")}var rr=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,Mi=e=>e!=null;function ZE(e,t,n){if(Mi(e.size))if(Mi(t)&&Mi(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(Mi(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(Mi(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var JE="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",QE=new Map(JE.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function eO(e){const t=e.split(".").pop();return t&&QE.get(t)||null}function tO(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||eO(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 nO(e,t){const n=e.type==="application/x-moz-file"||tO(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var oO=ie("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");oO.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 iO=ie("fieldset").parts("root","errorText","helperText","legend");iO.build();const[Vv,dt]=we("FileUploadContext"),aO=M({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=dt();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),rO=M({__name:"file-upload-context",setup(e){const t=dt();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),sO=M({__name:"file-upload-dropzone",props:qn({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=dt();return K(),(o,i)=>(C(),T(b(X).div,W(b(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),lO=M({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=mi();return K(),(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:P(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[cO,Fa]=we("FileUploadItemPropsContext"),dO=M({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa();return K(),(o,i)=>(C(),T(b(X).button,W(b(t).getItemDeleteTriggerProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[uO,hO]=we("FileUploadItemGroupPropsContext"),pO=M({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=A(()=>Vn(t,["type"])),o=dt();return uO(n),K(),(i,a)=>(C(),T(b(X).ul,W(b(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),gO=M({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa(),o=Bs();return K(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemNameProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default",{},()=>{var r;return[Le(oe(((r=o.default)==null?void 0:r.call(o))||b(n).file.name),1)]})]),_:3},16,["as-child"]))}}),fO=M({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa(),o=ve("");return Cf(i=>{const a=t.value.createFileUrl(n.value.file,r=>o.value=r);i(a)}),K(),(i,a)=>o.value?(C(),T(b(X).img,st(W({key:0},b(t).getItemPreviewImageProps({...b(n),url:o.value}))),null,16)):Q("",!0)}}),mO=M({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa();return K(),(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:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"])):Q("",!0)}}),vO=M({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa(),o=Bs();return K(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemSizeTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default",{},()=>{var r;return[Le(oe(((r=o.default)==null?void 0:r.call(o))||b(t).getFileSize(b(n).file)),1)]})]),_:3},16,["as-child"]))}}),bO=M({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=dt(),o=hO(),i=A(()=>({...t,type:o.value.type}));return cO(i),K(),(a,r)=>(C(),T(b(X).li,W(b(n).getItemProps(i.value),{"as-child":e.asChild}),{default:P(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),yO=M({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=dt();return K(),(n,o)=>(C(),T(b(X).label,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),xO=M({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Vv(n),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});function wO(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 CO=wO(Intl.NumberFormat);function _O(e,t,n={}){return CO(t,n).format(e)}var SO=["","kilo","mega","giga","tera"],kO=["","kilo","mega","giga","tera","peta"],EO=(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"?SO:kO,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 _O(p,t,{style:"unit",unit:l[h]+a,unitDisplay:r})},Dv=ie("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),pt=Dv.build(),Mv=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},Rv=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},jc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},OO=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},$O=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},IO=(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}`},TO=(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}`},PO=(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}`},VO=(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}`},DO=e=>e.getById(Mv(e)),Xh=e=>e.getById(jc(e)),MO=e=>e.getById(Rv(e));function Zh(e){const t=xe(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function RO(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 Jh(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]=nO(c,a("acceptAttr")),[p,m]=ZE(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)})}}),RO(e,r.length,n)||(r.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),r.splice(0)),{acceptedFiles:r,rejectedFiles:s}}function FO(e,t){const n=_e(e);try{if("DataTransfer"in n){const o=new n.DataTransfer;t.forEach(i=>{o.items.add(i)}),e.files=o.files}}catch{}}var En="accepted";function AO(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=En){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 EO(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({...pt.root.attrs,dir:i("dir"),id:Mv(r),"data-disabled":j(l),"data-dragging":j(u)})},getDropzoneProps(m={}){return t.element({...pt.dropzone.attrs,dir:i("dir"),id:Rv(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===xe(g)&&(m.disableClick||g.key!=="Enter"&&g.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(g){l||g.defaultPrevented||m.disableClick||g.currentTarget===xe(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(!Zh(g))return;const v=g.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:v})},onDragLeave(g){l||d&&(Ue(g.currentTarget,g.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(g){if(l)return;d&&(g.preventDefault(),g.stopPropagation());const v=Zh(g);l||!v||YE(g.dataTransfer.items,i("directory")).then(f=>{o({type:"DROPZONE.DROP",files:om(f)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...pt.trigger.attrs,dir:i("dir"),id:OO(r),disabled:l,"data-disabled":j(l),"data-invalid":j(i("invalid")),type:"button",onClick(m){l||(Ue(MO(r),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:jc(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:Fd})},getItemGroupProps(m={}){const{type:g=En}=m;return t.element({...pt.itemGroup.attrs,dir:i("dir"),"data-disabled":j(l),"data-type":g})},getItemProps(m){const{file:g,type:v=En}=m;return t.element({...pt.item.attrs,dir:i("dir"),id:IO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemNameProps(m){const{file:g,type:v=En}=m;return t.element({...pt.itemName.attrs,dir:i("dir"),id:TO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemSizeTextProps(m){const{file:g,type:v=En}=m;return t.element({...pt.itemSizeText.attrs,dir:i("dir"),id:PO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewProps(m){const{file:g,type:v=En}=m;return t.element({...pt.itemPreview.attrs,dir:i("dir"),id:VO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewImageProps(m){var g;const{file:v,url:f,type:y=En}=m;if(!v.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...pt.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=En}=m;return t.button({...pt.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({...pt.label.attrs,dir:i("dir"),id:$O(r),htmlFor:jc(r),"data-disabled":j(l),"data-required":j(c)})},getClearTriggerProps(){return t.button({...pt.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 LO={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)=>rr(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)=>rr(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})=>XE(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=>{Ue(DO(t),xe(a))||a.preventDefault()};return va(se(n,"dragover",o,!1),se(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=Xh(e);if(!n)return;FO(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){J(()=>{var t;(t=Xh(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:a}=Jh(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}=Jh(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=>{gn(`[zag-js/file-upload] error transforming files
|
|
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=>!rr(o.file,t.file));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter(o=>!rr(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 NO=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=mi(),r=A(()=>{const l=Ae(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,...Po(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=Ut(LO,r);return A(()=>AO(s,bn))},BO=M({__name:"file-upload-root",props:qn({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=NO(e,t);return Vv(n),K(),(o,i)=>(C(),T(b(X).div,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),zO=M({__name:"file-upload-trigger",props:{asChild:{type:Boolean}},setup(e){const t=dt();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),gt=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:aO,Context:rO,Dropzone:sO,HiddenInput:lO,Item:bO,ItemDeleteTrigger:dO,ItemGroup:pO,ItemName:gO,ItemPreview:mO,ItemPreviewImage:fO,ItemSizeText:vO,Label:yO,Root:BO,RootProvider:xO,Trigger:zO},Symbol.toStringTag,{value:"Module"})),HO=Symbol(),Qh=Object.getPrototypeOf,Wc=new WeakMap,jO=e=>e&&(Wc.has(e)?Wc.get(e):Qh(e)===Object.prototype||Qh(e)===Array.prototype),WO=e=>jO(e)&&e[HO]||null,ep=(e,t=!0)=>{Wc.set(e,t)};function GO(){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 Fv(e,t){const n=GO();return n?(n[e]||(n[e]=t()),n[e]):t()}var qr=Fv("__zag__refSet",()=>new WeakSet),UO=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,YO=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,qO=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",KO=e=>UO(e)||YO(e)||qO(e),Gc=e=>e!==null&&typeof e=="object",tp=e=>Gc(e)&&!qr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!KO(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),co=Fv("__zag__proxyStateMap",()=>new WeakMap),XO=(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 ep(d,!0),n.set(s,[l,d]),Reflect.ownKeys(s).forEach(h=>{const u=Reflect.get(s,h);qr.has(u)?(ep(u,!1),d[h]=u):co.has(u)?d[h]=QO(u):d[h]=u}),Object.freeze(d)},i=new WeakMap,a=[1,1],r=s=>{if(!Gc(s))throw new Error("object required");const l=i.get(s);if(l)return l;let c=a[0];const d=new Set,h=(k,O=++a[0])=>{c!==O&&(c=O,d.forEach(_=>_(k,O)))};let u=a[1];const p=(k=++a[1])=>(u!==k&&!d.size&&(u=k,g.forEach(([O])=>{const _=O[1](k);_>c&&(c=_)})),c),m=k=>(O,_)=>{const E=[...O];E[1]=[k,...E[1]],h(E,_)},g=new Map,v=(k,O)=>{if(d.size){const _=O[3](m(k));g.set(k,[O,_])}else g.set(k,[O])},f=k=>{var O;const _=g.get(k);_&&(g.delete(k),(O=_[1])==null||O.call(_))},y=k=>(d.add(k),d.size===1&&g.forEach(([O,_],E)=>{const I=O[3](m(E));g.set(E,[O,I])}),()=>{d.delete(k),d.size===0&&g.forEach(([O,_],E)=>{_&&(_(),g.set(E,[O]))})}),x=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),w=t(x,{deleteProperty(k,O){const _=Reflect.get(k,O);f(O);const E=Reflect.deleteProperty(k,O);return E&&h(["delete",[O],_]),E},set(k,O,_,E){var I;const $=Reflect.has(k,O),R=Reflect.get(k,O,E);if($&&(e(R,_)||i.has(_)&&e(R,i.get(_))))return!0;f(O),Gc(_)&&(_=WO(_)||_);let q=_;if(!((I=Object.getOwnPropertyDescriptor(k,O))!=null&&I.set)){!co.has(_)&&tp(_)&&(q=Av(_));const V=!qr.has(q)&&co.get(q);V&&v(O,V)}return Reflect.set(k,O,q,E),h(["set",[O],_,R]),!0}});i.set(s,w);const S=[x,p,o,y];return co.set(w,S),Reflect.ownKeys(s).forEach(k=>{const O=Object.getOwnPropertyDescriptor(s,k);O.get||O.set?Object.defineProperty(x,k,O):w[k]=s[k]}),w})=>[r,co,qr,e,t,tp,n,o,i,a],[ZO]=XO();function Av(e={}){return ZO(e)}function JO(e,t,n){const o=co.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 QO(e){const t=co.get(e),[n,o,i]=t;return i(n,o())}var e$=ie("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control");e$.build();var t$=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`float:${e.id}:trigger`},n$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`float:${e.id}:positioner`},o$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`float:${e.id}:content`},i$=e=>{var t;return((t=e.ids)==null?void 0:t.header)??`float:${e.id}:header`},np=e=>e.getById(t$(e)),op=e=>e.getById(n$(e)),ip=e=>e.getById(o$(e)),a$=e=>e.getById(i$(e)),On=(e,t,n)=>{let o;return ke(t)?o=xm(t):o=z1(e.getWin()),n&&(o=Pa({x:-o.width,y:o.minY,width:o.width*3,height:o.height*2})),Vn(o,["x","y","width","height"])},Ri=Av({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:ap,and:r$}=Ye(),s$={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"};ap("isMaximized"),ap("isMinimized"),r$("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 l$=ie("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");l$.build();var c$=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`hover-card:${e.id}:trigger`},d$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`hover-card:${e.id}:content`},u$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`hover-card:${e.id}:popper`},Wl=e=>e.getById(c$(e)),h$=e=>e.getById(d$(e)),rp=e=>e.getById(u$(e)),{not:sr,and:sp}=Ye();sp("isOpenControlled",sr("isPointer")),sr("isPointer"),sp("isOpenControlled",sr("isPointer")),sr("isPointer");Y()(["closeDelay","dir","getRootNode","id","ids","disabled","onOpenChange","defaultOpen","open","openDelay","positioning","onInteractOutside","onPointerDownOutside","onFocusOutside"]);var p$={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(p$).map(([e,t])=>[t,e]));const[Lv,ze]=we("TreeViewContext"),[g$,_t]=we("TreeViewNodePropsContext"),f$=M({__name:"tree-view-branch-content",props:{asChild:{type:Boolean}},setup(e){const t=l1(),n=ze(),o=_t(),i=A(()=>{const a=n.value.getBranchContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return K(),(a,r)=>(C(),T(b(vm).Content,W(i.value,{"as-child":e.asChild}),{default:P(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),m$=M({__name:"tree-view-branch-control",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchControlProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),v$=M({__name:"tree-view-branch-indent-guide",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchIndentGuideProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),b$=M({__name:"tree-view-branch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),y$=M({__name:"tree-view-branch-text",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getBranchTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),x$=M({__name:"tree-view-branch-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchTriggerProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[w$,hu]=we("TreeViewNodeContext"),C$=M({__name:"tree-view-branch",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t(),o=hu(),i=Nd(),a=A(()=>t.value.getBranchContentProps(n));return K(),(r,s)=>(C(),T(b(vm).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:P(()=>[L(r.$slots,"default")]),_:3},16,["open","ids","lazy-mount","unmount-on-exit","as-child"]))}}),_$=M({__name:"tree-view-context",setup(e){const t=ze();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),S$=M({__name:"tree-view-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),k$=M({__name:"tree-view-item-text",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getItemTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),E$=M({__name:"tree-view-item",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),O$=M({__name:"tree-view-label",props:{asChild:{type:Boolean}},setup(e){const t=ze();return K(),(n,o)=>(C(),T(b(X).h3,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),$$=M({__name:"tree-view-node-checkbox",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getNodeCheckboxProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),I$=M({__name:"tree-view-node-checkbox-indicator",props:{indeterminate:{},fallback:{}},setup(e){const t=hu();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})}}),T$=M({__name:"tree-view-node-rename-input",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).input,W(b(t).getNodeRenameInputProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),P$=M({__name:"tree-view-node-context",setup(e){const t=hu();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),Nv=M({__name:"tree-view-node-provider",props:{node:{},indexPath:{}},setup(e){const t=e,n=ze(),o=A(()=>n.value.getNodeState(t));return w$(o),g$(t),K(),(i,a)=>L(i.$slots,"default")}}),V$=M({__name:"tree-view-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Lv(n),fi(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var Bv=ie("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),je=Bv.build(),zv=e=>new Wd(e);zv.empty=()=>new Wd({rootNode:{children:[]}});var D$=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tree:${e.id}:root`},lp=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`tree:${e.id}:label`},Hv=(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}`},Gl=e=>{var t;return((t=e.ids)==null?void 0:t.tree)??`tree:${e.id}:tree`},kt=(e,t)=>{var n;t!=null&&((n=e.getById(Hv(e,t)))==null||n.focus())},jv=(e,t)=>`tree:${e.id}:rename-input:${t}`,cp=(e,t)=>e.getById(jv(e,t));function Wv(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 M$(e,t,n){const o=e.getDescendantValues(t),i=o.every(a=>n.includes(a));return Bt(i?xo(n,...o):sn(n,...o))}function R$(e,t){const n=new Map;return e.visit({onEnter:o=>{const i=e.getNodeValue(o),a=e.isBranchNode(o),r=Wv(e,o,t);n.set(i,{type:a?"branch":"leaf",checked:r})}}),n}function F$(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(),S=w?s.getNodeValue(w):null;return{id:Hv(o,x),value:x,indexPath:y,valuePath:s.getValuePath(y),disabled:!!f.disabled,focused:u==null?S==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 Wv(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 R$(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){kt(o,v)},selectParent(v){const f=s.getParentNode(v);if(!f)return;const y=sn(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=sn(l,s.getNodeValue(f));r({type:"EXPANDED.SET",value:y,src:"expand.parent"})},setExpandedValue(v){const f=Bt(v);r({type:"EXPANDED.SET",value:f})},setSelectedValue(v){const f=Bt(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({...je.root.attrs,id:D$(o),dir:a("dir")})},getLabelProps(){return t.element({...je.label.attrs,id:lp(o),dir:a("dir")})},getTreeProps(){return t.element({...je.tree.attrs,id:Gl(o),dir:a("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":lp(o),"aria-multiselectable":a("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(v){if(v.defaultPrevented||wc(v))return;const f=xe(v);if(Us(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]"),S={ArrowDown(_){_n(_)||(_.preventDefault(),r({type:"NODE.ARROW_DOWN",id:x,shiftKey:_.shiftKey}))},ArrowUp(_){_n(_)||(_.preventDefault(),r({type:"NODE.ARROW_UP",id:x,shiftKey:_.shiftKey}))},ArrowLeft(_){_n(_)||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(_){_n(_)||(_.preventDefault(),r({type:"NODE.HOME",id:x,shiftKey:_.shiftKey}))},End(_){_n(_)||(_.preventDefault(),r({type:"NODE.END",id:x,shiftKey:_.shiftKey}))},Space(_){var E;y.dataset.disabled||(h?r({type:"TREE.TYPEAHEAD",key:_.key}):(E=S.Enter)==null||E.call(S,_))},Enter(_){y.dataset.disabled||jo(f)&&_n(_)||(r({type:w?"BRANCH_NODE.CLICK":"NODE.CLICK",id:x,src:"keyboard"}),jo(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 I=s.getIndexPath(x);if(I){const $=s.at(I);if($&&!E($,I))return}_.preventDefault(),r({type:"NODE.RENAME",value:x})}},k=Cc(v,{dir:a("dir")}),O=S[k];if(O){O(v);return}pn.isValidEvent(v)&&(r({type:"TREE.TYPEAHEAD",key:v.key,id:x}),v.preventDefault())}})},getNodeState:g,getItemProps(v){const f=g(v);return t.element({...je.item.attrs,id:f.id,dir:a("dir"),"data-ownedby":Gl(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":Ji(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||!Mr(y)||jo(y.currentTarget)&&_n(y))return;const x=y.metaKey||y.ctrlKey;r({type:"NODE.CLICK",id:f.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation(),jo(y.currentTarget)||y.preventDefault()}})},getItemTextProps(v){const f=g(v);return t.element({...je.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({...je.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({...je.branch.attrs,"data-depth":f.depth,dir:a("dir"),"data-branch":f.value,role:"treeitem","data-ownedby":Gl(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":Ji(f.disabled),"data-disabled":j(f.disabled),"data-loading":j(f.loading),"aria-busy":Ji(f.loading),style:{"--depth":f.depth}})},getBranchIndicatorProps(v){const f=g(v);return t.element({...je.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({...je.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({...je.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":Ji(f.loading),onFocus(y){r({type:"NODE.FOCUS",id:f.value}),y.stopPropagation()},onClick(y){if(f.disabled||f.loading||!Mr(y)||jo(y.currentTarget)&&_n(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({...je.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({...je.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({...je.branchIndentGuide.attrs,"data-depth":f.depth})},getNodeCheckboxProps(v){const f=g(v),y=f.checked;return t.element({...je.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||!Mr(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({...je.nodeRenameInput.attrs,id:jv(o,f.value),type:"text","aria-label":"Rename tree item",hidden:!f.renaming,onKeyDown(y){wc(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 lr(e,t){const{context:n,prop:o,refs:i}=e;if(!o("loadChildren")){n.set("expandedValue",g=>Bt(sn(g,...t)));return}const a=n.get("loadingStatus"),[r,s]=Nu(t,g=>a[g]==="loaded");if(r.length>0&&n.set("expandedValue",g=>Bt(sn(g,...r))),s.length===0)return;const l=o("collection"),[c,d]=Nu(s,g=>{const v=l.findNode(g);return l.getNodeChildren(v).length>0});if(c.length>0&&n.set("expandedValue",g=>Bt(sn(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");Ad(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 S=o("collection");g.forEach((k,O)=>{const{id:_,indexPath:E,node:I,valuePath:$}=h[O];k.status==="fulfilled"?(w[_]="loaded",y.push(_),S=S.replace(E,{...I,children:k.value})):(u.delete(_),Reflect.deleteProperty(w,_),x.push({node:I,error:k.reason,indexPath:E,valuePath:$}))}),n.set("loadingStatus",w),y.length&&(n.set("expandedValue",k=>Bt(sn(k,...y))),(v=o("onLoadChildrenComplete"))==null||v({collection:S})),x.length&&((f=o("onLoadChildrenError"))==null||f({nodes:x}))})}function $n(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:Dt}=Ye(),A$={props({props:e}){return{selectionMode:"single",collection:zv.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:{...pn.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:$n({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:Dt("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:Dt("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Dt("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:Dt("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Dt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Dt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Dt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Dt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Dt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Dt("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&&Jo(n)?o.concat(...n):[Jo(n)?Js(n):n].filter(Boolean))},deselectNode({context:e,event:t}){const n=Fr(t.id||t.value);e.set("selectedValue",o=>xo(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;lr(e,[t.id])},expandBranches(e){const{context:t,event:n}=e,o=Fr(n.value);lr(e,Il(o,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>xo(n,t.id))},collapseBranches(e){const{context:t,event:n}=e,o=Fr(n.value);t.set("expandedValue",i=>xo(i,...o))},setExpanded({context:e,event:t}){Jo(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){Jo(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);kt(t,i)},focusTreeLastNode(e){const{prop:t,scope:n}=e,o=t("collection"),i=o.getLastNode(void 0,{skip:$n(e)}),a=o.getNodeValue(i);kt(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);kt(n,r)},focusTreeNextNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getNextNode(t.id,{skip:$n(e)});if(!a)return;const r=i.getNodeValue(a);kt(o,r)},focusTreePrevNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getPreviousNode(t.id,{skip:$n(e)});if(!a)return;const r=i.getNodeValue(a);kt(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;kt(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=pn(s,{state:o.get("typeaheadState"),activeId:t.get("focusedValue"),key:i.key});kt(a,l?.id)},toggleNodeSelection({context:e,event:t}){const n=_o(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){const{context:t,prop:n}=e,o=n("collection").getBranchValues(),i=Il(o,t.get("expandedValue"));lr(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=Il(r,t.get("expandedValue"));lr(e,s)},extendSelectionToNode(e){const{context:t,event:n,prop:o,computed:i}=e,a=o("collection"),r=ti(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",Bt(l))},extendSelectionToNextNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getNextNode(n.id,{skip:$n(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:$n(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=ti(t.get("selectedValue")),a=[];o.visit({skip:$n(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=ti(t.get("selectedValue")),a=[];let r=!1;o.visit({skip:$n(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?M$(o,t.value,i):_o(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),kt(o,a);return}(i=n("onRenameComplete"))==null||i({value:a,label:s,indexPath:r}),e.set("renamingValue",null),kt(o,a)},cancelRenaming({context:e,scope:t}){const n=e.get("renamingValue");e.set("renamingValue",null),n&&kt(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=cp(t,o);Et(s,r)},focusRenameInput({context:e,scope:t}){const n=e.get("renamingValue");if(!n)return;const o=cp(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 Gv=(e,t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=A(()=>{const s=Ae(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Po(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=Ut(A$,a);return A(()=>F$(r,bn))},Uv=M({__name:"tree-view-root",props:qn({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=Gv(n,t);return Lv(o),fi(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),K(),(i,a)=>(C(),T(b(X).div,W(b(o).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Yv=M({__name:"tree-view-tree",props:{asChild:{type:Boolean}},setup(e){const t=ze();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getTreeProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),wn=Object.freeze(Object.defineProperty({__proto__:null,Branch:C$,BranchContent:f$,BranchControl:m$,BranchIndentGuide:v$,BranchIndicator:b$,BranchText:y$,BranchTrigger:x$,Context:_$,Item:E$,ItemIndicator:S$,ItemText:k$,Label:O$,NodeCheckbox:$$,NodeCheckboxIndicator:I$,NodeContext:P$,NodeProvider:Nv,NodeRenameInput:T$,Root:Uv,RootProvider:V$,Tree:Yv},Symbol.toStringTag,{value:"Module"}));var qv=ie("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText");qv.build();var Kv=e=>new Vo(e);Kv.empty=()=>new Vo({items:[]});var L$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},N$=(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}`},dp=e=>e.getById(L$(e)),up=(e,t)=>e.getById(N$(e,t)),{guards:B$,createMachine:z$}=nl(),{or:H$}=B$;z$({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:Kv.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:{...pn.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 n_(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:H$("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 zd({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||RC()!=="keyboard")return;const r=dp(n),s=t("scrollToIndexFn");if(s){const c=t("collection").indexOf(a);s?.({index:c,immediate:i,getElement(){return up(n,a)}});return}const l=up(n,a);ma(l,{rootEl:r,block:"nearest"})};return J(()=>o(!0)),Ta(()=>dp(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);Fi(r,s,t("onSelect")),e.set("value",Array.from(s))}else{const s=r.select(a,i,n.metaKey);Fi(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);Fi(i,r,t("onSelect")),e.set("value",Array.from(r));return}if(t("selectOnHighlight")){const r=i.replaceSelection(a,n.value);Fi(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);Fi(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 j$=(e,t)=>{const n=new Set(e);for(const o of t)n.delete(o);return n};function Fi(e,t,n){const o=j$(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"]);qv.extendWith("empty");var W$=ie("marquee").parts("root","viewport","content","edge","item");W$.build();Y()(["autoFill","defaultPaused","delay","dir","getRootNode","id","ids","loopCount","onComplete","onLoopComplete","onPauseChange","paused","pauseOnInteraction","reverse","side","spacing","speed","translations"]);var Xv=ie("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem");Xv.build();var Zv=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`menu:${e.id}:trigger`},G$=e=>{var t;return((t=e.ids)==null?void 0:t.contextTrigger)??`menu:${e.id}:ctx-trigger`},Jv=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`menu:${e.id}:content`},U$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`menu:${e.id}:popper`},Uc=(e,t)=>`${e.id}/${t}`,eo=e=>e?.dataset.value??null,Pn=e=>e.getById(Jv(e)),hp=e=>e.getById(U$(e)),cr=e=>e.getById(Zv(e)),Y$=(e,t)=>t?e.getById(Uc(e,t)):null,Ul=e=>e.getById(G$(e)),Aa=e=>{const t=`[role^="menuitem"][data-ownedby=${CSS.escape(Jv(e))}]:not([data-disabled])`;return Hn(Pn(e),t)},q$=e=>ti(Aa(e)),K$=e=>Js(Aa(e)),pu=(e,t)=>t?e.id===t||e.dataset.value===t:!1,X$=(e,t)=>{const n=Aa(e),o=n.findIndex(i=>pu(i,t.value));return X0(n,o,{loop:t.loop??t.loopFocus})},Z$=(e,t)=>{const n=Aa(e),o=n.findIndex(i=>pu(i,t.value));return Z0(n,o,{loop:t.loop??t.loopFocus})},J$=(e,t)=>{const n=Aa(e),o=n.find(i=>pu(i,t.value));return pn(n,{state:t.typeaheadState,key:t.key,activeId:o?.id??null})},Q$=e=>{var t;return!!((t=e?.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("aria-controls"))},eI="menu:select";function tI(e,t){if(!e)return;const n=_e(e),o=new n.CustomEvent(eI,{detail:{value:t}});e.dispatchEvent(o)}var{not:ft,and:Ao,or:nI}=Ye();ft("isSubmenu"),nI("isOpenAutoFocusEvent","isArrowDownEvent"),Ao(ft("isTriggerItem"),"isOpenControlled"),ft("isTriggerItem"),Ao("isSubmenu","isOpenControlled"),ft("isPointerSuspended"),Ao(ft("isPointerSuspended"),ft("isTriggerItem")),Ao(ft("isTriggerItemHighlighted"),ft("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),Ao(ft("isTriggerItemHighlighted"),ft("isHighlightedItemEditable"),"closeOnSelect"),Ao(ft("isTriggerItemHighlighted"),ft("isHighlightedItemEditable"));function pp(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function oI(e,t){return e?W1(e,t):!1}function iI(e,t,n){const o=Object.keys(e).length>0;if(!t)return null;if(!o)return Uc(n,t);for(const i in e){const a=e[i],r=Zv(a.scope);if(r===t)return r}return Uc(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 Yl=new Map,Yc=!1;try{Yc=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Os=!1;try{Os=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Qv={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let aI=class{format(t){let n="";if(!Yc&&this.options.signDisplay!=null?n=sI(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Os){var o;let{unit:i,unitDisplay:a="short",locale:r}=this.resolvedOptions();if(!i)return n;let s=(o=Qv[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!Yc&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Os&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=rI(t,n),this.options=n}};function rI(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Os){var o;let{unit:r,unitDisplay:s="short"}=t;if(!r)throw new Error('unit option must be provided with style: "unit"');if(!(!((o=Qv[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(Yl.has(i))return Yl.get(i);let a=new Intl.NumberFormat(e,t);return Yl.set(i,a),a}function sI(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 lI=new RegExp("^.*\\(.*\\).*$"),cI=["latn","arab","hanidec","deva","beng","fullwide"];let eb=class{parse(t){return ql(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,o){return ql(this.locale,this.options,t).isValidPartialNumber(t,n,o)}getNumberingSystem(t){return ql(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}};const gp=new Map;function ql(e,t,n){let o=fp(e,t);if(!e.includes("-nu-")&&!o.isValidPartialNumber(n)){for(let i of cI)if(i!==o.options.numberingSystem){let a=fp(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return o}function fp(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():""),o=gp.get(n);return o||(o=new dI(e,t),gp.set(n,o)),o}let dI=class{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=Lo(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 eb(this.locale,r).parse(new aI(this.locale,r).format(o))}return this.options.currencySign==="accounting"&&lI.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=Lo(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=Lo(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=Lo(t," ",this.symbols.group),t=Lo(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=Lo(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=hI(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 mp=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),uI=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function hI(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=uI.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(_=>!mp.has(_.type)).map(_=>vp(_.value)),y=h.flatMap(_=>_.filter(E=>!mp.has(E.type)).map(E=>vp(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"),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),k=new Map(S.map((_,E)=>[_,E])),O=new RegExp(`[${S.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:g,group:v,literals:w,numeral:O,index:_=>String(k.get(_))}}function Lo(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function vp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var pI=ie("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber");pI.build();var gI=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`number-input:${e.id}:input`},fI=e=>{var t;return((t=e.ids)==null?void 0:t.incrementTrigger)??`number-input:${e.id}:inc`},mI=e=>{var t;return((t=e.ids)==null?void 0:t.decrementTrigger)??`number-input:${e.id}:dec`},tb=e=>`number-input:${e.id}:cursor`,dr=e=>e.getById(gI(e)),vI=e=>e.getById(fI(e)),bI=e=>e.getById(mI(e)),nb=e=>e.getDoc().getElementById(tb(e)),yI=(e,t)=>{let n=null;return t==="increment"&&(n=vI(e)),t==="decrement"&&(n=bI(e)),n},xI=(e,t)=>{if(!Nf())return _I(e,t),()=>{var n;(n=nb(e))==null||n.remove()}},wI=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")}},CI=(e,t)=>{const{point:n,isRtl:o,event:i}=t,a=e.getWin(),r=Tl(i.movementX,a.devicePixelRatio),s=Tl(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=Tl(7.5,a.devicePixelRatio);return c.x=hw(c.x+h,d)-h,{hint:l,point:c}},_I=(e,t)=>{const n=e.getDoc(),o=n.createElement("div");o.className="scrubber--cursor",o.id=tb(e),Object.assign(o.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:Df,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),o.innerHTML=`
|
|
1
|
+
import{F as Ea,G as My,H as xf,I as wf,k as A,J as xd,K as Yn,L as Le,r as ve,d as M,M as Ry,N as Ce,h as bt,O as Q,P as T,Q as b,z as C,D as P,R as L,S as W,T as st,U as xt,o as Ns,e as Fy,V as wd,s as ds,W as Me,X as Cd,Y as vn,Z as qn,y as H,A as z,$ as Ge,a0 as N,B as oe,E as Ne,a1 as Bs,C as Z,a2 as Ay,a3 as Cf,a4 as Wt,a5 as Ly,a6 as Ny,a7 as Iu,a8 as us,a9 as By,aa as yc,a as zy,ab as Hy,ac as jy,ad as Wy,ae as Gy,af as Uy,ag as Yy,ah as qy,ai as zs,aj as Hs,ak as js,al as Ky,am as Xy,an as _f}from"./DDnF1Vmf.js";function xc(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var Zy=e=>typeof e=="object"&&e!==null;function _d(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var Jy=e=>e==="base";function Qy(e){return e.slice().filter(t=>!Jy(t))}function Tu(e){return String.fromCharCode(e+(e>25?39:97))}function ex(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Tu(n%52)+t;return Tu(n%52)+t}function tx(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function nx(e){return ex(tx(5381,e)>>>0)}var Sf=/\s*!(important)?/i;function ox(e){return typeof e=="string"?Sf.test(e):!1}function ix(e){return typeof e=="string"?e.replace(Sf,"").trim():e}function kf(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var Oa=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 Sd(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],a=n[o];xc(i)&&xc(a)?t[o]=Sd(i,a):t[o]=a}),t),{})}var ax=e=>e!=null;function Ef(e,t,n={}){const{stop:o,getKey:i}=n;function a(r,s=[]){if(Zy(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);ax(p)&&(l[h]=p)}return l}return t(r,s)}return a(e)}function rx(e,t){return e.reduce((n,o,i)=>{const a=t[i];return o!=null&&(n[a]=o),n},{})}function Of(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:a,resolveShorthand:r}=o;return Ef(e,s=>Array.isArray(s)?rx(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>a?r(s):s:void 0})}var sx={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},lx=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function cx(e){const{utility:t,hash:n,conditions:o=sx}=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,nx))}else l=[...o.finalize(r),i(s)].join(":");return l};return Oa(({base:r,...s}={})=>{const l=Object.assign(s,r),c=Of(l,e),d=new Set;return Ef(c,(h,u)=>{if(h==null)return;const p=ox(h),[m,...g]=o.shift(u),v=Qy(g),f=t.transform(m,ix(lx(h)));let y=a(v,f.className);p&&(y=`${y}!`),d.add(y)}),Array.from(d).join(" ")})}function dx(...e){return e.flat().filter(t=>xc(t)&&Object.keys(_d(t)).length>0)}function ux(e){function t(i){const a=dx(...i);return a.length===1?a:a.map(r=>Of(r,e))}function n(...i){return Sd(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:Oa(n),assignCss:o}}var hx=/([A-Z])/g,px=/^ms-/,gx=Oa(e=>e.startsWith("--")?e:e.replace(hx,"-$1").replace(px,"-ms-").toLowerCase()),fx="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,%";`${fx.split(",").join("|")}`;var mx=(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?vx(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)},vx=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function $f(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 bx=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const yx="_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",If=new Set(yx.split(",")),xx=/^@|&|&$/;function Pu(e){return If.has(e)||xx.test(e)}const wx=/^_/,Cx=/&|@/;function _x(e){return e.map(t=>If.has(t)?t.replace(wx,""):Cx.test(t)?`[${kf(t.trim())}]`:t)}function Sx(e){return e.sort((t,n)=>{const o=Pu(t),i=Pu(n);return o&&!i?1:!o&&i?-1:0})}const kx="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",Tf=new Map,Pf=new Map;kx.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");Tf.set(t,o),i.length&&i.forEach(a=>{Pf.set(a==="1"?o:a,t)})});const Vu=e=>Pf.get(e)||e,Vf={conditions:{shift:Sx,finalize:_x,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Vu(e);return{className:`${Tf.get(n)||gx(n)}_${kf(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Vu}},Ex=cx(Vf),nt=(...e)=>Ex(uo(...e));nt.raw=(...e)=>uo(...e);const{mergeCss:uo}=ux(Vf),Du=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function To(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=Du(e),a=u=>({...o,..._d(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=uo(g,n[f][y]));const v=Ox(i,m);return uo(g,v)}function s(u){const p=Du(u.config),m=bx(u.variantKeys,Object.keys(n));return To({base:uo(t,p.base),variants:Object.fromEntries(m.map(g=>[g,uo(n[g],p.variants[g])])),defaultVariants:Sd(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(u){return nt(r(u))}const c=Object.keys(n);function d(u){return $f(u,c)}const h=Object.fromEntries(Object.entries(n).map(([u,p])=>[u,Object.keys(p)]));return Object.assign(Oa(l),{__cva__:!0,variantMap:h,variantKeys:c,raw:r,config:e,merge:s,splitVariantProps:d,getVariantProps:a})}function Ox(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=uo(n,o.css))}),n}function $x(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const Ix=(e,t)=>e+"__"+t;function ne(e){const t=Object.entries(mx(e)).map(([d,h])=>[d,To(h)]),n=e.defaultVariants??{};function o(d){const h=t.map(([u,p])=>[u,$x(p(d),e.className&&Ix(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 $f(d,r)}const l=d=>({...n||{},..._d(d)}),c=Object.fromEntries(Object.entries(a).map(([d,h])=>[d,Object.keys(h)]));return Object.assign(Oa(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:r,splitVariantProps:s,getVariantProps:l})}var ie=(e,t=[])=>({parts:(...n)=>{if(Tx(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="${Mo(e)}"][data-part="${Mo(o)}"]`,`& [data-scope="${Mo(e)}"][data-part="${Mo(o)}"]`].join(", "),attrs:{"data-scope":Mo(e),"data-part":Mo(o)}}}),{})}),Mo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Tx=e=>e.length===0,Px=Object.defineProperty,Vx=(e,t,n)=>t in e?Px(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,El=(e,t,n)=>Vx(e,typeof t!="symbol"?t+"":t,n);function Dx(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function Mx(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 Mu=e=>Math.max(0,Math.min(1,e)),Rx=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),Ol=(...e)=>t=>e.reduce((n,o)=>o(n),t),Zi=()=>{},Ws=e=>typeof e=="object"&&e!==null,Df=2147483647,j=e=>e?"":void 0,Ji=e=>e?"true":void 0,Fx=1,Ax=9,Lx=11,ke=e=>Ws(e)&&e.nodeType===Fx&&typeof e.nodeName=="string",Gs=e=>Ws(e)&&e.nodeType===Ax,Nx=e=>Ws(e)&&e===e.window,Mf=e=>ke(e)?e.localName||"":"#document";function Bx(e){return["html","body","#document"].includes(Mf(e))}var zx=e=>Ws(e)&&e.nodeType!==void 0,si=e=>zx(e)&&e.nodeType===Lx&&"host"in e,Hx=e=>ke(e)&&e.localName==="input",jo=e=>!!(e!=null&&e.matches("a[href]")),jx=e=>ke(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function hs(e){if(!e)return!1;const t=e.getRootNode();return ra(t)===e}var Wx=/(textarea|select)/;function Us(e){if(e==null||!ke(e))return!1;try{return Hx(e)&&e.selectionStart!=null||Wx.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Ue(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&&si(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function ct(e){return Gs(e)?e:Nx(e)?e.document:e?.ownerDocument??document}function Gx(e){return ct(e).documentElement}function _e(e){var t;return si(e)?_e(e.host):Gs(e)?e.defaultView??window:ke(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function ra(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 Ux(e){if(Mf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||si(e)&&e.host||Gx(e);return si(t)?t.host:t}function kd(e){let t;try{if(t=e.getRootNode({composed:!0}),Gs(t)||si(t))return t}catch{}return e.ownerDocument??document}var $l=new WeakMap;function li(e){return $l.has(e)||$l.set(e,_e(e).getComputedStyle(e)),$l.get(e)}var Ed=new Set(["menu","listbox","dialog","grid","tree","region"]),Yx=e=>Ed.has(e),Rf=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Ff(e,t){const n=new Set,o=kd(e),i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=Rf(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&&Yx(h)&&!u&&(d===t||d.contains(t)||i(d)))return!0}}}return!1};return i(e)}function Af(e,t){const n=kd(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=Rf(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&&Ed.has(h)&&!u&&(t(d),i(d))}}}};i(e)}function qx(e){const t=new Set;return Af(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Kx(e){const t=e.getAttribute("role");return!!(t&&Ed.has(t))}function Xx(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Zx(e){var t;return Xx(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Jx(e){if(!e.id)return!1;const t=kd(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&Kx(e))}var Ys=()=>typeof document<"u";function Qx(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function e0(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var Od=e=>Ys()&&e.test(Qx()),Lf=e=>Ys()&&e.test(e0()),t0=e=>Ys()&&e.test(navigator.vendor),Ru=()=>Ys()&&!!navigator.maxTouchPoints,n0=()=>Od(/^iPhone/i),o0=()=>Od(/^iPad/i)||qs()&&navigator.maxTouchPoints>1,$d=()=>n0()||o0(),i0=()=>qs()||$d(),qs=()=>Od(/^Mac/i),Nf=()=>i0()&&t0(/apple/i),a0=()=>Lf(/Firefox/i),r0=()=>Lf(/Android/i);function s0(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 xe(e){const t=s0(e);return t?.[0]??e.target}function wc(e){return h0(e).isComposing||e.keyCode===229}function l0(e){return e.pointerType===""&&e.isTrusted?!0:r0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Mr=e=>e.button===0,c0=e=>e.button===2||qs()&&e.ctrlKey&&e.button===0,_n=e=>e.ctrlKey||e.altKey||e.metaKey,d0=e=>"touches"in e&&e.touches.length>0,u0={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Fu={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Cc(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=u0[i]??i,n==="rtl"&&o==="horizontal"&&i in Fu&&(i=Fu[i]),i}function h0(e){return e.nativeEvent??e}function _c(e,t="client"){const n=d0(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 Bf(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=_e(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function p0(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Et(e,t,n="value"){var o;if(!e)return;const i=p0(e);i&&((o=Bf(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function zf(e,t){var n;e&&((n=Bf(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function Hf(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=_e(e);e instanceof i.HTMLInputElement&&(Et(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function g0(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=_e(e);e instanceof i.HTMLInputElement&&(zf(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function f0(e){return m0(e)?e.form:e.closest("form")}function m0(e){return e.matches("textarea, input, select, button")}function v0(e,t){if(!e)return;const n=f0(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function b0(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const o=_e(n),i=new o.MutationObserver(()=>t(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function $a(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[v0(e,o),b0(e,n)];return()=>i.forEach(a=>a?.())}var jf=e=>ke(e)&&e.tagName==="IFRAME",y0=/^(audio|video|details)$/;function Wf(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var x0=e=>!Number.isNaN(Wf(e)),w0=e=>Wf(e)<0;function C0(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 Gf(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=C0(l,t);if(c){const d=Array.from(c.querySelectorAll(Ks)).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 Ks="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",Uf=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Ks));(n==!0||n=="if-empty"&&i.length===0)&&ke(e)&&dn(e)&&i.unshift(e);const a=[];for(const r of i)if(dn(r)){if(jf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...Uf(s,{getShadowRoot:o}));continue}a.push(r)}return o?Gf(a,o,dn):a};function dn(e){return!ke(e)||e.closest("[inert]")?!1:e.matches(Ks)&&jx(e)}function Ia(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Ks));n&&ho(e)&&i.unshift(e);const a=[];for(const r of i)if(ho(r)){if(jf(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...Ia(s,{getShadowRoot:o}));continue}a.push(r)}if(o){const r=Gf(a,o,ho);return!r.length&&n?i:r}return!a.length&&n?i:a}function ho(e){return ke(e)&&e.tabIndex>0?!0:dn(e)&&!w0(e)}function _0(e,t={}){const n=Ia(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function ki(e){return e.tabIndex<0&&(y0.test(e.localName)||Us(e))&&!x0(e)?0:e.tabIndex}function Id(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=Ia(t);a=o?r.filter(o)[0]:r[0]}return a||t||void 0}function S0(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=_0(t);return!(hs(n)&&e.shiftKey||hs(o)&&!e.shiftKey||!n&&!o)}var Yf=class qf{constructor(){El(this,"id",null),El(this,"fn_cleanup"),El(this,"cleanup",()=>{this.cancel()})}static create(){return new qf}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=Yf.create();return t.request(e),t.cleanup}function Xs(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 k0(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 E0(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 Ta(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(E0(a,t))})),()=>{i.forEach(a=>a?.())}}function O0(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 $0(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(O0(a,t))})),()=>{i.forEach(a=>a?.())}}function Kf(e){const t=()=>{const n=_e(e);e.dispatchEvent(new n.MouseEvent("click"))};a0()?k0(e,"keyup",t):queueMicrotask(t)}function ps(e){const t=Ux(e);return Bx(t)?ct(t).body:ke(t)&&Td(t)?t:ps(t)}function Xf(e,t=[]){const n=ps(e),o=n===e.ownerDocument.body,i=_e(n);return o?t.concat(i,i.visualViewport||[],Td(n)?n:[]):t.concat(n,Xf(n,[]))}var I0=/auto|scroll|overlay|hidden|clip/,T0=new Set(["inline","contents"]);function Td(e){const t=_e(e),{overflow:n,overflowX:o,overflowY:i,display:a}=t.getComputedStyle(e);return I0.test(n+i+o)&&!T0.has(a)}function P0(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function ma(e,t){const{rootEl:n,...o}=t||{};!e||!n||!Td(n)||!P0(n)||e.scrollIntoView(o)}function Zf(e,t){const{left:n,top:o,width:i,height:a}=t.getBoundingClientRect(),r={x:e.x-n,y:e.y-o},s={x:Mu(r.x/i),y:Mu(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 V0(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 Zo="default",Sc="",Rr=new WeakMap;function D0(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return $d()?(Zo==="default"&&(Sc=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Zo="disabled"):t&&(Rr.set(t,t.style.userSelect),t.style.userSelect="none"),()=>Jf({target:t,doc:o})}function Jf(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if($d()){if(Zo!=="disabled")return;Zo="restoring",setTimeout(()=>{Xs(()=>{Zo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Sc||""),Sc="",Zo="default")})},300)}else if(t&&Rr.has(t)){const i=Rr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),Rr.delete(t)}}function Pd(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(D0({...o,target:r}))})),()=>{a.forEach(r=>r?.())}}function Qf(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=_c(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=_c(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),Pd({doc:e})];return()=>{r.forEach(s=>s())}}function M0(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:a,isValidKey:r=f=>f.key==="Enter"}=e;if(!t)return Zi;const s=_e(t);let l=Zi,c=Zi,d=Zi;const h=f=>({point:_c(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 S=xe(w);Ue(t,S)?o?.(h(w)):a?.(h(w))},{passive:!o,once:!0}),x=se(s,"pointercancel",p,{passive:!a,once:!0});c=Ol(y,x),hs(n)&&f.pointerType==="mouse"&&f.preventDefault(),u(f)},{passive:!i}),g=se(n,"focus",v);l=Ol(m,g);function v(){const f=S=>{if(!r(S))return;const k=_=>{if(!r(_))return;const E=new s.PointerEvent("pointerup"),I=h(E);o?.(I),a?.(I)};c(),c=se(n,"keyup",k);const O=new s.PointerEvent("pointerdown");u(O)},y=()=>{const S=new s.PointerEvent("pointercancel");p(S)},x=se(n,"keydown",f),w=se(n,"blur",y);d=Ol(x,w)}return()=>{l(),c(),d()}}function Hn(e,t){return Array.from(e?.querySelectorAll(t)??[])}function em(e,t){return e?.querySelector(t)??null}var Vd=e=>e.id;function R0(e,t,n=Vd){return e.find(o=>n(o)===t)}function Zs(e,t,n=Vd){const o=R0(e,t,n);return o?e.indexOf(o):-1}function Dd(e,t,n=!0){let o=Zs(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function Md(e,t,n=!0){let o=Zs(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 F0=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(),A0=e=>{var t;return F0(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},L0=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function N0(e,t,n,o=Vd){const i=n?Zs(e,n,o):-1;let a=n?Rx(e,i):e;return t.length===1&&(a=a.filter(r=>o(r)!==n)),a.find(r=>L0(A0(r),t))}function B0(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 Rd(e,t){if(!e)return Zi;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=N0(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 pn=Object.assign(z0,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:H0});function H0(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Fd={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 j0(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 W0(e,t){const{timeout:n,rootNode:o}=t,i=_e(o),a=ct(o),r=new i.AbortController;return j0(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 G0=Object.defineProperty,tm=e=>{throw TypeError(e)},U0=(e,t,n)=>t in e?G0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sn=(e,t,n)=>U0(e,typeof t!="symbol"?t+"":t,n),Y0=(e,t,n)=>t.has(e)||tm("Cannot "+n),Au=(e,t,n)=>(Y0(e,t,"read from private field"),t.get(e)),q0=(e,t,n)=>t.has(e)?tm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function Fr(e){return e==null?[]:Array.isArray(e)?e:[e]}var K0=e=>Array.from(Array(e).keys()),ti=e=>e[0],Js=e=>e[e.length-1],X0=(e,t)=>e.indexOf(t)!==-1,sn=(e,...t)=>e.concat(t),xo=(e,...t)=>e.filter(n=>!t.includes(n)),Lu=(e,t)=>e.filter((n,o)=>o!==t),Bt=e=>Array.from(new Set(e)),Il=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},_o=(e,t)=>X0(e,t)?xo(e,t):sn(e,t);function gs(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 Z0(e,t,n={}){return e[gs(e,t,n)]}function nm(e,t,n={}){const{step:o=1,loop:i=!0}=n;return gs(e,t,{step:-o,loop:i})}function J0(e,t,n={}){return e[nm(e,t,n)]}function om(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(om(n)):t.concat(n),[])}function Nu(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Bu=e=>e?.constructor.name==="Array",Q0=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Be(e[n],t[n]))return!1;return!0},Be=(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(Bu(e)&&Bu(t))return Q0(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(!Be(e[a],t[a]))return!1}return!0},Jo=e=>Array.isArray(e),ew=e=>e===!0||e===!1,im=e=>e!=null&&typeof e=="object",po=e=>im(e)&&!Jo(e),sa=e=>typeof e=="string",Rn=e=>typeof e=="function",tw=e=>e==null,Fn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nw=e=>Object.prototype.toString.call(e),am=Function.prototype.toString,ow=am.call(Object),iw=e=>{if(!im(e)||nw(e)!="[object Object]"||sw(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Fn(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&am.call(n)==ow},aw=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,rw=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,sw=e=>aw(e)||rw(e),Ha=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,lw=()=>{},va=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},rm=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Lt(e,t,...n){var o;if(e in t){const a=t[e];return Rn(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,Lt),i}var sm=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,sm)),t?.()}},{floor:lm,abs:zu,round:Qs,min:cw,max:dw,pow:uw,sign:hw}=Math,kc=e=>Number.isNaN(e),Kn=e=>kc(e)?0:e,cm=(e,t)=>(e%t+t)%t,pw=(e,t)=>(e%t+t)%t,gw=(e,t)=>Kn(e)>=t,fw=(e,t)=>Kn(e)<=t,dm=(e,t,n)=>{const o=Kn(e),i=t==null||o>=t,a=n==null||o<=n;return i&&a},mw=(e,t,n)=>Qs((Kn(e)-t)/n)*n+t,Ae=(e,t,n)=>cw(dw(Kn(e),t),n),vw=(e,t,n)=>(Kn(e)-t)/(n-t),bw=(e,t,n,o)=>Ae(mw(e*(n-t)+t,t,o),t,n),Hu=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),a=i>=0?o.length-i:0;if(a>0){let r=uw(10,a);n=Qs(n*r)/r}return n},Tl=(e,t)=>typeof t=="number"?lm(e*t+.5)/t:Qs(e),ju=(e,t,n,o)=>{const i=t!=null?Number(t):0,a=Number(n),r=(e-i)%o;let s=zu(r)*2>=o?e+hw(r)*(o-zu(r)):e-r;if(s=Hu(s,o),!kc(i)&&s<i)s=i;else if(!kc(a)&&s>a){const l=lm((a-i)/o),c=i+l*o;s=l<=0||c<i?a:c}return Hu(s,o)},fe=(e,t=0,n=10)=>{const o=Math.pow(n,t);return Qs(e*o)/o},Wu=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},um=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(Wu(e),Wu(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},yw=(e,t)=>um(Kn(e),"+",t),xw=(e,t)=>um(Kn(e),"-",t),kn=e=>typeof e=="number"?`${e}px`:e;function el(e){if(!iw(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]=el(i))}return n}function Vn(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function ww(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 ja=()=>performance.now(),Ar,Cw=class{constructor(t){this.onTick=t,Sn(this,"frameId",null),Sn(this,"pausedAtMs",null),Sn(this,"context"),Sn(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Sn(this,"setStartMs",n=>{this.context.startMs=n}),Sn(this,"start",()=>{if(this.frameId!==null)return;const n=ja();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(Au(this,Ar))}),Sn(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=ja())}),Sn(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),q0(this,Ar,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Au(this,Ar))}),this.context={now:0,startMs:ja(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:ja()-this.context.startMs}};Ar=new WeakMap;function Pl(e,t){const n=new Cw(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function gn(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function _w(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Ad(e,t){if(e==null)throw new Error(t())}function Ld(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 Sw=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),kw=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Gu=e=>{const t={};let n;for(;n=kw.exec(e);)t[n[1]]=n[2];return t},Ew=(e,t)=>{if(sa(e)){if(sa(t))return`${e};${t}`;e=Gu(e)}else sa(t)&&(t=Gu(t));return Object.assign({},e??{},t??{})};function tl(...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]=va(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=Sw(t[i],n[i]);continue}if(i==="style"){t[i]=Ew(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 Ec(e,t,n){let o=[],i;return a=>{const r=e(a);return(r.length!==o.length||r.some((s,l)=>!Be(o[l],s)))&&(o=r,i=t(r,a)),i}}function Ye(){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 nl(){return{guards:Ye(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var Wo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Wo||{}),Vl="__init__";function Ow(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>ct(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>ra(t()),isActiveElement:hs,getById:o=>t().getElementById(o)}}function $w(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var Y=()=>e=>Array.from(new Set(e)),hm=ie("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator");hm.build();var pm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},gm=(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}`},Iw=e=>e.getById(pm(e)),ol=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(pm(e))}']:not([disabled])`;return Hn(Iw(e),t)},Tw=e=>ti(ol(e)),Pw=e=>Js(ol(e)),Vw=(e,t)=>Dd(ol(e),gm(e,t)),Dw=(e,t)=>Md(ol(e),gm(e,t)),{and:Mw,not:Rw}=Ye();Mw("isExpanded","canToggle"),Rw("isExpanded");Y()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);Y()(["value","disabled"]);const Fw={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}};ne({slots:[...hm.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:Fw},defaultVariants:{variant:"default"}});function Aw(e){const t=Ea(),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[My(xf(i))]=(...a)=>e(i,...a);return o}function Lw(e){const t=Ea(),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=wf(e);return A(()=>{const i={},a=t?.vnode.props??{};return Object.keys(a).forEach(r=>{i[xf(r)]=a[r]}),Object.keys({...n,...i}).reduce((r,s)=>(o.value[s]!==void 0&&(r[s]=o.value[s]),r),{})})}function Ct(e,t){const n=Lw(e),o=t?Aw(t):{};return A(()=>({...n.value,...o}))}const we=e=>{const t=Symbol(e);return[n=>xd(t,n),n=>Yn(t,n),t]},[fi,Nd]=we("RenderStrategyProps");function Nw(e){const t=Le(e);return t?.$el??t}const Bw=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function K(){const e=Ea(),t=ve(),n=A(()=>{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:Nw(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,!(Bw(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=M({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=fm(n.default()),[a,...r]=i;if(Object.keys(t).length>0){(o=a.props)==null||delete o.ref;const s=tl(t,a.props??{}),l=Ry(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 fm(e){return e?e.flatMap(t=>t.type===Ce?fm(t.children):[t]):[]}const Hw="br, hr, img, input, area, textarea".split(", "),jw=e=>typeof e=="string"&&Hw.includes(e),Dl=e=>M({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>bt(zw,n,o):()=>{var i;return bt(e,n,jw(e)||(i=o.default)==null?void 0:i.call(o))}}});function Ww(){const e=new Map;return new Proxy(Dl,{apply(t,n,o){return Dl(o[0])},get(t,n){return e.has(n)||e.set(n,Dl(n)),e.get(n)}})}const X=Ww(),[mm,il]=we("CollapsibleContext"),Gw=M({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=il();return K(),(n,o)=>b(t).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getContentProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Uw=M({__name:"collapsible-context",setup(e){const t=il();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),Yw=M({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return mm(n),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var qw=ie("collapsible").parts("root","trigger","content","indicator"),Wa=qw.build(),Kw=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},Oc=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},Xw=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},Ei=e=>e.getById(Oc(e));function Zw(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({...Wa.root.attrs,"data-state":l?"open":"closed",dir:r("dir"),id:Kw(a)})},getContentProps(){return t.element({...Wa.content.attrs,id:Oc(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":kn(h),"--width":kn(d),"--collapsed-height":kn(p),"--collapsed-width":kn(m),...c&&g&&{overflow:"hidden",minHeight:kn(p),maxHeight:kn(p)},...c&&v&&{overflow:"hidden",minWidth:kn(m),maxWidth:kn(m)}}})},getTriggerProps(){return t.element({...Wa.trigger.attrs,id:Xw(a),dir:r("dir"),type:"button","data-state":l?"open":"closed","data-disabled":j(u),"aria-controls":Oc(a),"aria-expanded":s||!1,onClick(x){x.defaultPrevented||u||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...Wa.indicator.attrs,dir:r("dir"),"data-state":l?"open":"closed","data-disabled":j(u)})}}}var Jw={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=Ei(t);if(!i)return;const a=li(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=s=>{xe(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=Ei(t);if(!i)return;const a=li(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=l=>{xe(l)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r);const s=Rd(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",r),Xs(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=Ei(e);if(!n)return;const o=()=>{const r=Ia(n).map(s=>B0(s,"inert",""));return()=>{r.forEach(s=>s())}};let i=o();const a=$0(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=Ei(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=Ei(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 Qw(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Uu={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},e1="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function t1(e){return e in Uu?Uu[e]:e.startsWith("on")?`on${Qw(e.substr(2))}`:e1.includes(e)?e:e.toLowerCase()}var bn=$w(e=>{const t={};for(const n in e){const o=e[n];n==="children"?typeof o=="string"&&(t.innerHTML=o):t[t1(n)]=e[n]}return t});function fs(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=ds(t),i=A(()=>e().value!==void 0),a=ds(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=Rn(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)}}}fs.cleanup=e=>{Cd(()=>e())};fs.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function n1(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var o1=(e,t)=>{Me(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let a=0;a<n.length;a++)if(!Be(o[a],Le(n[a]))){i=!0;break}i&&t()})};function Ut(e,t={}){var n,o,i;const a=A(()=>{const{id:$,ids:R,getRootNode:q}=Le(t);return Ow({id:$,ids:R,getRootNode:q})}),r=(...$)=>{e.debug&&console.log(...$)},s=A(()=>{var $;return(($=e.props)==null?void 0:$.call(e,{props:el(Le(t)),get scope(){return a.value}}))??Le(t)}),l=i1(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:fs,get scope(){return a.value},flush:Yu,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 q;(q=c[$])==null||q.set(R)},initial($){var R;return(R=c[$])==null?void 0:R.initial},hash($){var R,q;const V=(R=c[$])==null?void 0:R.get();return(q=c[$])==null?void 0:q.hash(V)}};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,q;const V=_.get();return!!((q=(R=e.states[V])==null?void 0:R.tags)!=null&&q.includes($))}}),f=n1(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:d}))??{}),y=()=>({state:v(),context:d,event:g(),prop:l,send:I,action:x,guard:w,track:o1,refs:f,computed:O,flush:Yu,get scope(){return a.value},choose:k}),x=$=>{const R=Rn($)?$(y()):$;if(!R)return;const q=R.map(V=>{var D,F;const U=(F=(D=e.implementations)==null?void 0:D.actions)==null?void 0:F[V];return U||gn(`[zag-js] No implementation found for action "${JSON.stringify(V)}"`),U});for(const V of q)V?.(y())},w=$=>{var R,q;return Rn($)?$(y()):(q=(R=e.implementations)==null?void 0:R.guards)==null?void 0:q[$](y())},S=$=>{const R=Rn($)?$(y()):$;if(!R)return;const q=R.map(D=>{var F,U;const G=(U=(F=e.implementations)==null?void 0:F.effects)==null?void 0:U[D];return G||gn(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),G}),V=[];for(const D of q){const F=D?.(y());F&&V.push(F)}return()=>V.forEach(D=>D?.())},k=$=>Fr($).find(R=>{let q=!R.guard;return sa(R.guard)?q=!!w(R.guard):Rn(R.guard)&&(q=R.guard(y())),q}),O=$=>{Ad(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})},_=fs(()=>({defaultValue:e.initialState({prop:l}),onChange($,R){var q,V,D;if(R){const U=h.get(R);U?.(),h.delete(R)}R&&x((q=e.states[R])==null?void 0:q.exit),x(u?.actions);const F=S((V=e.states[$])==null?void 0:V.effects);if(F&&h.set($,F),R===Vl){x(e.entry);const U=S(e.effects);U&&h.set(Vl,U)}x((D=e.states[$])==null?void 0:D.entry)}}));let E=Wo.NotStarted;Ns(()=>{const $=E===Wo.Started;E=Wo.Started,r($?"rehydrating...":"initializing..."),_.invoke(_.initial,Vl)}),Fy(()=>{E=Wo.Stopped,r("unmounting...");const $=h.values();for(const R of $)R?.();h=new Map,x(e.exit)});const I=$=>{var R,q;if(E!==Wo.Started)return;p.current=m.current,m.current=$;let V=_.get();const D=((R=e.states[V].on)==null?void 0:R[$.type])??((q=e.on)==null?void 0:q[$.type]),F=k(D);if(!F)return;u=F;const U=F.target??V;r("transition",$.type,F.target||V,`(${F.actions})`);const G=U!==V;G?_.set(U):F.reenter&&!G?_.invoke(V,V):x(F.actions)};return(i=e.watch)==null||i.call(e,y()),{state:v(),send:I,context:d,prop:l,get scope(){return a.value},refs:f,computed:O,event:g(),getStatus:()=>E}}function i1(e){return function(t){return e.value[t]}}var Yu=e=>{wd().then(()=>{e()})};const[TN,yn]=we("EnvironmentContext"),xn=A(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Xn=A(()=>({dir:"ltr",locale:"en-US"})),[PN,Zn]=we("LocaleContext"),Po=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},a1=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=A(()=>{const c=Le(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Po(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=Ut(Jw,a),s=A(()=>Zw(r,bn)),l=ve(!1);return Me(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),A(()=>{const c=Le(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},r1=M({__name:"collapsible-root",props:qn({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=a1(e,t);return mm(n),K(),(o,i)=>(C(),T(b(X).div,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),s1=M({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=il();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),l1=M({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=il();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),vm=Object.freeze(Object.defineProperty({__proto__:null,Content:Gw,Context:Uw,Indicator:l1,Root:r1,RootProvider:Yw,Trigger:s1},Symbol.toStringTag,{value:"Module"})),c1=()=>(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}]),d1={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function u1(e,t){return C(),H("svg",d1,[...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 h1={render:u1},p1=ie("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");p1.build();const[VN,mi]=we("FieldContext");function g1(e){if(!e)return;const t=li(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 f1(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 m1(e){if(!e)return;const t=ct(e),n=_e(e),o=f1(t),i=g1(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 bm=(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))(bm||{});const v1={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},b1=To({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:v1}}),ms=M({__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 bm[s]||r},i=ve("windows");Me(()=>t.forcePlatform,r=>{r&&(i.value=r)}),Ns(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const a=A(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(r,s)=>(C(),H("div",{class:N(b(nt)({display:"flex",columnGap:"3"}))},[(C(!0),H(Ce,null,Ge(a.value,l=>(C(),H("div",{key:l,class:N(b(b1)({type:e.type}))},oe(o(l)),3))),128))],2))}}),y1=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"}}),x1=["aria-label"],w1=["fill"],C1=["fill"],ym=M({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=A(()=>y1({variant:t.variant,size:t.size})),o=A(()=>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,w1)],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,C1)],2))],2)],10,x1))}}),_1=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"}}}}}),S1=M({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=A(()=>_1({variant:t.variant}));return(o,i)=>(C(),H("span",{class:N(n.value.root)},[L(o.$slots,"default",{},()=>[Ne(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"}}},qu={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},k1=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"}}}}}),E1=["disabled","data-loading","data-selected","aria-busy"],Mn=M({__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=Bs(),n=e,o=A(()=>k1({type:n.type,size:n.size})),i=A(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),a=A(()=>t.prefix),r=A(()=>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(nt)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[z("div",{class:N([o.value.content,n.isLoading?b(nt)({position:"relative"}):""])},[a.value?(C(),H("div",{key:0,class:N([o.value.slots,n.isLoading?b(nt)({visibility:"hidden"}):""])},[L(s.$slots,"prefix")],2)):Q("",!0),n.isLoading?(C(),T(ym,{key:1,class:N([o.value.spinner,n.isLoading?b(nt)({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(nt)({paddingRight:"2",display:"inline-flex"}):"",r.value?b(nt)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?b(nt)({visibility:"hidden"}):""])},[L(s.$slots,"default",{},()=>[n.label?(C(),T(S1,{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(nt)({visibility:"hidden"}):""])},[L(s.$slots,"suffix")],2)):Q("",!0),n.shortcutKeys?(C(),H("div",{key:3,class:N([n.isLoading?b(nt)({visibility:"hidden"}):""])},[Z(ms,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):Q("",!0)],2)],10,E1))}}),O1={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},$1={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:$1,state:O1,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 I1=(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:qu.default},small:{root:qu.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 T1=ie("avatar").parts("root","image","fallback");T1.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 P1=Object.defineProperty,V1=(e,t,n)=>t in e?P1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xt=(e,t,n)=>V1(e,typeof t!="symbol"?t+"":t,n),Ku=class Pe{constructor([t,n,o,i,a,r]=[0,0,0,0,0,0]){Xt(this,"m00"),Xt(this,"m01"),Xt(this,"m02"),Xt(this,"m10"),Xt(this,"m11"),Xt(this,"m12"),Xt(this,"rotate",(...s)=>this.prepend(Pe.rotate(...s))),Xt(this,"scale",(...s)=>this.prepend(Pe.scale(...s))),Xt(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})`}},Xu=(e,t,n)=>Math.min(Math.max(e,t),n),Ga=(e,t,n)=>{const o=Xu(e.x,n.x,n.x+n.width-t.width),i=Xu(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},D1={width:0,height:0},M1={width:1/0,height:1/0},Ua=(e,t=D1,n=M1)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),go=(e,t)=>({x:e,y:t}),Zu=(e,t)=>t?go(e.x-t.x,e.y-t.y):e,R1=(e,t)=>go(e.x+t.x,e.y+t.y);function Pa(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:go(a,r)}}function F1(e){const t=go(e.minX,e.minY),n=go(e.maxX,e.minY),o=go(e.maxX,e.maxY),i=go(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var A1=(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)}},L1=(e,t)=>e.width===t?.width&&e.height===t?.height,N1=(e,t)=>e.x===t?.x&&e.y===t?.y,Ml=new WeakMap;function B1(e){if(!Ml.has(e)){const t=e.ownerDocument.defaultView||window;Ml.set(e,t.getComputedStyle(e))}return Ml.get(e)}function xm(e,t={}){return Pa(z1(e,t))}function z1(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=B1(e),{borderLeftWidth:d,borderTopWidth:h,borderRightWidth:u,borderBottomWidth:p}=c,m=Ju(d,u),g=Ju(h,p);if(o&&(l.width-=m,l.height-=g,l.x+=$c(d),l.y+=$c(h)),n){const v=e.offsetWidth-e.clientWidth-m,f=e.offsetHeight-e.clientHeight-g;l.width-=v,l.height-=f}return l}var $c=e=>parseFloat(e.replace("px","")),Ju=(...e)=>e.reduce((t,n)=>t+(n?$c(n):0),0);function H1(e,t={}){return Pa(j1(e,t))}function j1(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 W1(e,t){const n=Pa(e),{top:o,right:i,left:a,bottom:r}=F1(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 G1(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 Qu={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}},U1={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Ya,abs:Qo,min:eh}=Math;function th(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 Y1(e){return U1[e]}function q1(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:a}=o,r=th(e,n),s=Y1(n),l=th(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:Qu[n].x*2-1,y:Qu[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=Qo(u)>Qo(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=Qo(g.y):Ya(g.y)!==Ya(p)&&(g.y*=-1),r.x===l.x?g.x=Qo(g.x):Ya(g.x)!==Ya(u)&&(g.x*=-1),i){case"extent":return nh(e,Ku.scale(g.x,g.y,l),!1);case"center":return nh(e,Ku.scale(g.x,g.y,{x:e.midX,y:e.midY}),!1)}}function K1(e,t,n=!0){return n?{x:eh(t.x,e.x),y:eh(t.y,e.y),width:Qo(t.x-e.x),height:Qo(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function nh(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return K1(o,i,n)}var X1=ie("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");X1.build();Y()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function Z1(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 J1={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",li(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=qa(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",qa(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",qa(t.get("styles")))},r=l=>{const c=qa(t.get("styles"));xe(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=Rd(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",a),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r),Xs(()=>s())}}}}};function qa(e){return e?.animationName||"none"}Y()(["onExitComplete","present","immediate"]);const wm=(e,t)=>{const n=ve(!1),o=ve(null),i=A(()=>({present:Le(e).present,onExitComplete:()=>{}})),a=Ut(J1,i),r=A(()=>Z1(a));return Me(()=>r.value.present,()=>{r.value.present&&(n.value=!0)}),Me(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&r.value.setNode(s)}}),A(()=>{var s;const l=Le(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"}}})},[Cm,_m]=we("PresenceContext");var Ro=new WeakMap,Ka=new WeakMap,Xa={},Rl=0,Sm=e=>e&&(e.host||Sm(e.parentNode)),Q1=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Sm(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),eC=new Set(["script","output","status","next-route-announcer"]),tC=e=>eC.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),nC=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:a=!0}=t,r=Q1(n,Array.isArray(e)?e:[e]);Xa[o]||(Xa[o]=new WeakMap);const s=Xa[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)&&Af(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(tC(m))return;const g=m.getAttribute(i)==="true",v=(Ro.get(m)||0)+1,f=(s.get(m)||0)+1;Ro.set(m,v),s.set(m,f),l.push(m),v===1&&g&&Ka.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(),Rl++,()=>{l.forEach(p=>{const m=Ro.get(p)-1,g=s.get(p)-1;Ro.set(p,m),s.set(p,g),m||(Ka.has(p)||p.removeAttribute(i),Ka.delete(p)),g||p.removeAttribute(o)}),Rl--,Rl||(Ro=new WeakMap,Ro=new WeakMap,Ka=new WeakMap,Xa={})}},oC=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,iC=(e,t=oC(e),n="data-aria-hidden",o=!0)=>{if(t)return nC(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},aC=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function rC(e,t={}){const{defer:n=!0}=t,o=n?aC:a=>a(),i=[];return i.push(o(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&i.push(iC(a))})),()=>{i.forEach(a=>a?.())}}function sC(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 lC(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 oh="pointerdown.outside",ih="focus.outside";function cC(e){for(const t of e)if(ke(t)&&dn(t))return!0;return!1}var km=e=>"clientY"in e;function dC(e,t){if(!km(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 uC(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ah(e,t){if(!t||!km(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 uC(r,s)?o||a:!1}function hC(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:a,defer:r,followControlledElements:s=!0}=t;if(!e)return;const l=ct(e),c=_e(e),d=sC(c),h=lC(c);function u(x,w){if(!ke(w)||!w.isConnected||Ue(e,w)||dC(e,x)||s&&Ff(e,w))return!1;const S=l.querySelector(`[aria-controls="${e.id}"]`);if(S){const O=ps(S);if(ah(x,O))return!1}const k=ps(e);return ah(x,k)?!1:!(n!=null&&n(w))}const p=new Set,m=si(e?.getRootNode());function g(x){function w(S){var k;const O=r&&!Ru()?J:I=>I(),_=S??x,E=((k=_?.composedPath)==null?void 0:k.call(_))??[_?.target];O(()=>{const I=m?E[0]:xe(x);if(!(!e||!u(x,I))){if(i||a){const $=va(i,a);e.addEventListener(oh,$,{once:!0})}rh(e,oh,{bubbles:!1,cancelable:!0,detail:{originalEvent:_,contextmenu:c0(_),focusable:cC(E),target:I}})}})}x.pointerType==="touch"?(p.forEach(S=>S()),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 S=((w=x?.composedPath)==null?void 0:w.call(x))??[x?.target],k=m?S[0]:xe(x);if(!(!e||!u(x,k))){if(o||a){const O=va(o,a);e.addEventListener(ih,O,{once:!0})}rh(e,ih,{bubbles:!1,cancelable:!0,detail:{originalEvent:x,contextmenu:!1,focusable:dn(k),target:k}})}})}return Ru()||(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 Bd(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(hC(a,t))})),()=>{i.forEach(a=>a?.())}}function rh(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function pC(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return se(ct(e),"keydown",n,{capture:!0})}var sh="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=>Ue(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ue(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];fC(e,sh,i=>{var a;(a=o.requestDismiss)==null||a.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),gC(e,sh,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function gC(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 fC(e,t,n){e.addEventListener(t,n,{once:!0})}var lh;function ch(){Ze.layers.forEach(({node:e})=>{e.style.pointerEvents=Ze.isBelowPointerBlockingLayer(e)?"none":"auto"})}function mC(e){e.style.pointerEvents=""}function vC(e,t){const n=ct(e),o=[];return Ze.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(lh=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[a,r]=W0(()=>{const s=i();return ke(s)?s:null},{timeout:1e3});a.then(s=>o.push(Rd(s,{pointerEvents:"auto"}))),o.push(r)}),()=>{Ze.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=lh,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function bC(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){gn("[@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),ch();function d(g){var v,f;const y=xe(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=xe(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=>Ue(w,g))||Ze.isInNestedLayer(e,g)}const m=[a?vC(e,t.persistentElements):void 0,pC(e,u),Bd(e,{exclude:p,onFocusOutside:h,onPointerDownOutside:d,defer:t.defer})];return()=>{Ze.remove(e),ch(),mC(e),m.forEach(g=>g?.())}}function vi(e,t){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Rn(e)?e():e;i.push(bC(a,t))})),()=>{i.forEach(a=>a?.())}}function Em(e,t={}){const{defer:n}=t,o=n?J:a=>a(),i=[];return i.push(o(()=>{const a=Rn(e)?e():e;if(!a){gn("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ze.addBranch(a),i.push(()=>{Ze.removeBranch(a)})})),()=>{i.forEach(a=>a?.())}}var yC=Object.defineProperty,xC=(e,t,n)=>t in e?yC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t,n)=>xC(e,typeof t!="symbol"?t+"":t,n),dh={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()}},wC=[],CC=class{constructor(t,n){be(this,"trapStack"),be(this,"config"),be(this,"doc"),be(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),be(this,"portalContainers",new Set),be(this,"listenerCleanups",[]),be(this,"handleFocus",i=>{const a=xe(i),r=this.findContainerIndex(a,i)>=0;if(r||Gs(a))r&&(this.state.mostRecentlyFocusedNode=a);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if(ki(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=>ki(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}),be(this,"handlePointerDown",i=>{const a=xe(i);if(!(this.findContainerIndex(a,i)>=0)){if($i(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$i(this.config.allowOutsideClick,i)||i.preventDefault()}}),be(this,"handleClick",i=>{const a=xe(i);this.findContainerIndex(a,i)>=0||$i(this.config.clickOutsideDeactivates,i)||$i(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),be(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;Oi(i)&&i.preventDefault(),this.tryFocus(r)}}),be(this,"handleEscapeKey",i=>{_C(i)&&$i(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),be(this,"_mutationObserver"),be(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 Zx(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?Jx(l):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),be(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)}))}),be(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!dn(i)){const a=ra(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}),be(this,"tryFocus",i=>{if(i!==!1&&i!==ra(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,SC(i)&&i.select()}}),be(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(),dh.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=()=>{uh(()=>{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}),be(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}),be(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}),be(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),be(this,"getReturnFocusNode",i=>{const a=this.getNodeForOption("setReturnFocus",{params:[i]});return a||(a===!1?!1:i)}),be(this,"getOption",(i,a,r)=>i&&i[a]!==void 0?i[a]:this.config[r||a]),be(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}),be(this,"findNextNavNode",i=>{const{event:a,isBackward:r=!1}=i,s=i.target||xe(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||dn(s)&&!ho(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=ki(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else Oi(a)||(l=d?.nextTabbableNode(s,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:u})=>s===u);if(h<0&&(d?.container===s||dn(s)&&!ho(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=ki(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else Oi(a)||(l=d?.nextTabbableNode(s))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||wC;const o={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(i){return Oi(i)&&!i.shiftKey},isKeyBackward(i){return Oi(i)&&i.shiftKey},...n};this.doc=o.document||ct(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=>{qx(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?Ff(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=Ia(t,{getShadowRoot:this.config.getShadowRoot}),o=Uf(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(ki(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(ho(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(ho(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 dh.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?uh(()=>{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=ra(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)}},Oi=e=>e.key==="Tab",$i=(e,...t)=>typeof e=="function"?e(...t):e,_C=e=>!e.isComposing&&e.key==="Escape",uh=e=>setTimeout(e,0),SC=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function kC(e,t={}){let n;const o=J(()=>{const i=typeof e=="function"?e():e;if(i){n=new CC(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:ct(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var EC=ie("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");EC.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 OC=ie("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");OC.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[Om,Va]=we("CheckboxContext"),$C=M({__name:"checkbox-context",setup(e){const t=Va();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),IC=M({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=Va();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getControlProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}});function TC(e){return!(e.metaKey||!qs()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var PC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function VC(e,t,n){const o=n?xe(n):null,i=_e(o);return e=e||o instanceof i.HTMLInputElement&&!PC.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(DC,n.key))}var Jn=null,Ic=new Set,vs=new Map,So=!1,Tc=!1,DC={Tab:!0,Escape:!0};function al(e,t){for(let n of Ic)n(e,t)}function bs(e){So=!0,TC(e)&&(Jn="keyboard",al("keyboard",e))}function yt(e){Jn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(So=!0,al("pointer",e))}function $m(e){l0(e)&&(So=!0,Jn="virtual")}function Im(e){const t=xe(e);t===_e(t)||t===ct(t)||(!So&&!Tc&&(Jn="virtual",al("virtual",e)),So=!1,Tc=!1)}function Tm(){So=!1,Tc=!0}function MC(e){if(typeof window>"u"||vs.get(_e(e)))return;const t=_e(e),n=ct(e);let o=t.HTMLElement.prototype.focus;function i(){Jn="virtual",al("virtual",null),So=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",bs,!0),n.addEventListener("keyup",bs,!0),n.addEventListener("click",$m,!0),t.addEventListener("focus",Im,!0),t.addEventListener("blur",Tm,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",yt,!0),n.addEventListener("pointermove",yt,!0),n.addEventListener("pointerup",yt,!0)):(n.addEventListener("mousedown",yt,!0),n.addEventListener("mousemove",yt,!0),n.addEventListener("mouseup",yt,!0)),t.addEventListener("beforeunload",()=>{RC(e)},{once:!0}),vs.set(t,{focus:o})}var RC=(e,t)=>{const n=_e(e),o=ct(e),i=vs.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",bs,!0),o.removeEventListener("keyup",bs,!0),o.removeEventListener("click",$m,!0),n.removeEventListener("focus",Im,!0),n.removeEventListener("blur",Tm,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",yt,!0),o.removeEventListener("pointermove",yt,!0),o.removeEventListener("pointerup",yt,!0)):(o.removeEventListener("mousedown",yt,!0),o.removeEventListener("mousemove",yt,!0),o.removeEventListener("mouseup",yt,!0)),vs.delete(n)}};function FC(){return Jn}function ys(){return Jn==="keyboard"}function zd(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;MC(i),o?.({isFocusVisible:n||ys(),modality:Jn});const a=(r,s)=>{VC(!!t,r,s)&&o?.({isFocusVisible:ys(),modality:r})};return Ic.add(a),()=>{Ic.delete(a)}}var Pm=ie("checkbox").parts("root","label","control","indicator"),Za=Pm.build(),Vm=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},hh=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},AC=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Pc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},LC=e=>e.getById(Vm(e)),Qi=e=>e.getById(Pc(e));function NC(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({...Za.root.attrs,...v,dir:i("dir"),id:Vm(r),htmlFor:Pc(r),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(f){xe(f)===Qi(r)&&f.stopPropagation()}})},getLabelProps(){return t.element({...Za.label.attrs,...v,dir:i("dir"),id:hh(r)})},getControlProps(){return t.element({...Za.control.attrs,...v,dir:i("dir"),id:AC(r),"aria-hidden":!0})},getIndicatorProps(){return t.element({...Za.indicator.attrs,...v,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Pc(r),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":hh(r),"aria-invalid":d,name:i("name"),form:i("form"),value:i("value"),style:Fd,onFocus(){const f=ys();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:ph}=Ye(),BC={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:ph("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:ph("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>Lr(e.get("checked")),checked:({context:e})=>zC(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 M0({pointerNode:LC(n),keyboardNode:Qi(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 zd({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return $a(Qi(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=Qi(n);o&&(zf(o,t("checked")),o.indeterminate=Lr(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=Lr(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=Qi(t);g0(n,{checked:e("checked")})})}}}};function Lr(e){return e==="indeterminate"}function zC(e){return Lr(e)?!1:!!e}Y()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const Hd=Pm.extendWith("group");function HC(e,t,n,o={}){var i,a,r;const{passive:s=!1,eventName:l,defaultValue:c}=o,d=Ea(),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 Me(()=>e[u],y=>{f||(f=!0,v.value=y,wd(()=>{f=!1}))}),Me(v,y=>{!f&&y!==e[u]&&m(y)}),v}return A({get(){return p()},set(g){m(g)}})}function jC(e,t){const n=A(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=Ay(e),i=HC(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 A(()=>({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[Dm,WC]=we("CheckboxGroupContext"),GC=M({__name:"checkbox-group",props:qn({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=jC(e,t);return Dm(n),K(),(o,i)=>(C(),T(b(X).div,W({role:"group"},{...b(Hd).build().group.attrs},{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),UC=M({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Dm(n),K(),(o,i)=>(C(),T(b(X).div,W({role:"group"},b(Hd).build().group.attrs,{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),YC=M({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Va(),n=mi();return K(),(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:P(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),qC=M({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Va(),o=A(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return K(),(i,a)=>(C(),T(b(X).div,W(b(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),KC=M({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=Va();return K(),(n,o)=>(C(),T(b(X).span,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),XC=M({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Om(n),K(),(o,i)=>(C(),T(b(X).label,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),ZC=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=mi(),r=WC(),s=A(()=>{const d=Le(e);return tl(d,r?.value.getItemProps({value:d.value})??{})}),l=A(()=>{const d=Le(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,...Po(d),onCheckedChange(h){var u;t?.("checkedChange",h),t?.("update:checked",h.checked),(u=d.onCheckedChange)==null||u.call(d,h)}}}),c=Ut(BC,l);return A(()=>NC(c,bn))},JC=M({__name:"checkbox-root",props:qn({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=ZC(e,t);return Om(n),K(),(o,i)=>(C(),T(b(X).label,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Fo=Object.freeze(Object.defineProperty({__proto__:null,Context:$C,Control:IC,Group:GC,GroupProvider:UC,HiddenInput:YC,Indicator:qC,Label:KC,Root:JC,RootProvider:XC},Symbol.toStringTag,{value:"Module"}));var QC=ie("clipboard").parts("root","control","trigger","indicator","input","label");QC.build();Y()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);Y()(["copied"]);var e_=Object.defineProperty,t_=(e,t,n)=>t in e?e_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t,n)=>t_(e,typeof t!="symbol"?t+"":t,n),Nr={itemToValue(e){return typeof e=="string"?e:po(e)&&Fn(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:po(e)&&Fn(e,"label")?e.label:Nr.itemToValue(e)},isItemDisabled(e){return po(e)&&Fn(e,"disabled")?!!e.disabled:!1}},Vo=class Mm{constructor(t){this.options=t,B(this,"items"),B(this,"indexMap",null),B(this,"copy",n=>new Mm({...this.options,items:n??[...this.items]})),B(this,"isEqual",n=>Be(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))??Nr.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))??Nr.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))??Nr.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)&&n_(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(Ii(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(Ii(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(Ii(this.items,i+1,...o))}),B(this,"prepend",(...n)=>this.copy(Ii(this.items,0,...n))),B(this,"append",(...n)=>this.copy(Ii(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(Ja(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(Ja(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(Ja(this.items,a,i+1))}),B(this,"reorder",(n,o)=>this.copy(Ja(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}},n_=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function Ii(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Ja(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 o_=class Br extends Set{constructor(t=[]){super(t),B(this,"selectionMode","single"),B(this,"deselectable",!0),B(this,"copy",()=>{const n=new Br([...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 Br([o]);return this.sync(i)}),B(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new Br;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=>Be(Array.from(this),Array.from(n)))}};function Rm(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function i_(e){const t=a_(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 Fm(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 a_(e){return e.sort(Fm)}function r_(e,t){let n;return ot(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function s_(e,t){const n=[];return ot(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function gh(e,t){let n;return ot(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function l_(e,t){let n=t.initialResult;return ot(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function c_(e,t){return l_(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function d_(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 u_(e,t){const n=[];let o=0;const i=new Map,a=new Map;return ot(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 h_(e,t){return{type:"insert",index:e,nodes:t}}function p_(e){return{type:"remove",indexes:e}}function jd(){return{type:"replace"}}function Am(e){return[e.slice(0,-1),e[e.length-1]]}function Lm(e,t,n=new Map){var o;const[i,a]=Am(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,jd())}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(),h_(a,t))}return n}function Nm(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,jd())}for(const[o,i]of n)t.set(o,p_(i));return t}function g_(e,t){const n=new Map,[o,i]=Am(e);for(let a=o.length-1;a>=0;a--){const r=o.slice(0,a).join();n.set(r,jd())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function rl(e,t,n){return f_(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,fh(l,c,0,...s.insertNodes),a);case"insert":return n.create(o,fh(i,s.index,0,...s.nodes),a);case"replace":return n.create(o,i,a);default:return o}}})}function fh(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function f_(e,t){const n={};return ot(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 m_(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Lm(o,n);return rl(e,i,t)}function v_(e,t){if(t.at.length===0)return t.node;const n=g_(t.at,t.node);return rl(e,n,t)}function b_(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=Nm(t.indexPaths);return rl(e,n,t)}function y_(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=i_(t.indexPaths),o=n.map(a=>Rm(e,a,t)),i=Lm(t.to,o,Nm(n));return rl(e,i,t)}function ot(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 Wd=class Bm{constructor(t){this.options=t,B(this,"rootNode"),B(this,"isEqual",n=>Be(this.rootNode,n.rootNode)),B(this,"getNodeChildren",n=>{var o,i;return((i=(o=this.options).nodeToChildren)==null?void 0:i.call(o,n))??Go.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))??Go.nodeToChildrenCount(n)}),B(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??Go.nodeToValue(n)}),B(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??Go.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))??Go.nodeToString(n)}),B(this,"getFirstNode",(n=this.rootNode)=>{let o;return ot(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 ot(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=>Rm(this.rootNode,n,{getChildren:this.getNodeChildren})),B(this,"findNode",(n,o=this.rootNode)=>r_(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 s_(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)=>Fm(o.indexPath,i.indexPath)).map(({value:o})=>o)),B(this,"getIndexPath",n=>gh(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=gh(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 ot(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 ot(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 ot(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;ot(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)=>c_(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 ot(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)=>u_(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(m_(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"copy",n=>new Bm({...this.options,rootNode:n})),B(this,"_replace",(n,o,i)=>this.copy(v_(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_move",(n,o,i)=>this.copy(y_(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),B(this,"_remove",(n,o)=>this.copy(b_(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=d_(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}},Go={nodeToValue(e){return typeof e=="string"?e:po(e)&&Fn(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:po(e)&&Fn(e,"label")?e.label:Go.nodeToValue(e)},isNodeDisabled(e){return po(e)&&Fn(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(po(e)&&Fn(e,"childrenCount"))return e.childrenCount}};const x_=e=>new Vo(e),mh=e=>new Wd(e);var w_=Object.defineProperty,C_=(e,t,n)=>t in e?w_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gd=(e,t,n)=>C_(e,t+"",n),__=(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},Ud=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 vw(o,i,a)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=bw(n,o,i,a);return ju(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]=Ae(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=ju(Ae(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 __(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},S_=/^#[\da-f]+$/i,k_=/^rgba?\((.*)\)$/,E_=/[^#]/gi,zm=class zr extends Ud{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(S_.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(E_,"$&$&"):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(k_);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,a)=>Ae(i,0,a<3?255:1))),n.length<3?void 0:new zr(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 Kd(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 qd(fe(l*360,2),fe(c*100,2),fe(r*100,2),fe(this.alpha,2))}clone(){return new zr(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 zr.colorChannels}};Gd(zm,"colorChannels",["red","green","blue"]);var Yd=zm,O_=/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+)?)\)/,Hm=class Hr extends Ud{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(O_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new Hr(cm(o,360),Ae(i,0,100),Ae(a,0,100),Ae(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 Kd(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 Yd(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),fe(this.alpha,2))}clone(){return new Hr(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 Hr.colorChannels}};Gd(Hm,"colorChannels",["hue","saturation","lightness"]);var qd=Hm,$_=/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 jr extends Ud{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($_)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new jr(cm(o,360),Ae(i,0,100),Ae(a,0,100),Ae(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 qd(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 Yd(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),fe(this.alpha,2))}clone(){return new jr(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 jr.colorChannels}};Gd(jm,"colorChannels",["hue","saturation","brightness"]);var Kd=jm,I_="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",T_=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},vh=T_(I_),xs=e=>{var t;if(vh.has(e))return xs(vh.get(e));const n=Yd.parse(e)||Kd.parse(e)||qd.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,xs),o}return n};const P_=["top","right","bottom","left"],jn=Math.min,it=Math.max,ws=Math.round,Qa=Math.floor,jt=e=>({x:e,y:e}),V_={left:"right",right:"left",bottom:"top",top:"bottom"},D_={start:"end",end:"start"};function Vc(e,t,n){return it(e,jn(t,n))}function fn(e,t){return typeof e=="function"?e(t):e}function mn(e){return e.split("-")[0]}function bi(e){return e.split("-")[1]}function Xd(e){return e==="x"?"y":"x"}function Zd(e){return e==="y"?"height":"width"}const M_=new Set(["top","bottom"]);function zt(e){return M_.has(mn(e))?"y":"x"}function Jd(e){return Xd(zt(e))}function R_(e,t,n){n===void 0&&(n=!1);const o=bi(e),i=Jd(e),a=Zd(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=Cs(r)),[r,Cs(r)]}function F_(e){const t=Cs(e);return[Dc(e),t,Dc(t)]}function Dc(e){return e.replace(/start|end/g,t=>D_[t])}const bh=["left","right"],yh=["right","left"],A_=["top","bottom"],L_=["bottom","top"];function N_(e,t,n){switch(e){case"top":case"bottom":return n?t?yh:bh:t?bh:yh;case"left":case"right":return t?A_:L_;default:return[]}}function B_(e,t,n,o){const i=bi(e);let a=N_(mn(e),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),t&&(a=a.concat(a.map(Dc)))),a}function Cs(e){return e.replace(/left|right|bottom|top/g,t=>V_[t])}function z_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wm(e){return typeof e!="number"?z_(e):{top:e,right:e,bottom:e,left:e}}function _s(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 xh(e,t,n){let{reference:o,floating:i}=e;const a=zt(t),r=Jd(t),s=Zd(r),l=mn(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(bi(t)){case"start":p[r]-=u*(n&&c?-1:1);break;case"end":p[r]+=u*(n&&c?-1:1);break}return p}const H_=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}=xh(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:S}=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}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(u=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:d,y:h}=xh(c,u,l)),g=-1)}return{x:d,y:h,placement:u,strategy:i,middlewareData:p}};async function ba(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}=fn(t,e),m=Wm(p),g=s[u?h==="floating"?"reference":"floating":h],v=_s(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=_s(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 j_=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}=fn(e,t)||{};if(c==null)return{};const h=Wm(d),u={x:n,y:o},p=Jd(i),m=Zd(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],S=u[p]-a.reference[p],k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let O=k?k[x]:0;(!O||!await(r.isElement==null?void 0:r.isElement(k)))&&(O=s.floating[x]||a.floating[m]);const _=w/2-S/2,E=O/2-g[m]/2-1,I=jn(h[f],E),$=jn(h[y],E),R=I,q=O-g[m]-$,V=O/2-g[m]/2+_,D=Vc(R,V,q),F=!l.arrow&&bi(i)!=null&&V!==D&&a.reference[m]/2-(V<R?I:$)-g[m]/2<0,U=F?V<R?V-R:V-q:0;return{[p]:u[p]+U,data:{[p]:D,centerOffset:V-D-U,...F&&{alignmentOffset:U}},reset:F}}}),W_=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}=fn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const f=mn(i),y=zt(s),x=mn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=u||(x||!g?[Cs(s)]:F_(s)),k=m!=="none";!u&&k&&S.push(...B_(s,g,m,w));const O=[s,...S],_=await ba(t,v),E=[];let I=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&E.push(_[f]),h){const V=R_(i,r,w);E.push(_[V[0]],_[V[1]])}if(I=[...I,{placement:i,overflows:E}],!E.every(V=>V<=0)){var $,R;const V=((($=a.flip)==null?void 0:$.index)||0)+1,D=O[V];if(D&&(!(h==="alignment"&&y!==zt(D))||I.every(U=>zt(U.placement)===y?U.overflows[0]>0:!0)))return{data:{index:V,overflows:I},reset:{placement:D}};let F=(R=I.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:R.placement;if(!F)switch(p){case"bestFit":{var q;const U=(q=I.filter(G=>{if(k){const ee=zt(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:q[0];U&&(F=U);break}case"initialPlacement":F=s;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function wh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ch(e){return P_.some(t=>e[t]>=0)}const G_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=fn(e,t);switch(o){case"referenceHidden":{const a=await ba(t,{...i,elementContext:"reference"}),r=wh(a,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ch(r)}}}case"escaped":{const a=await ba(t,{...i,altBoundary:!0}),r=wh(a,n.floating);return{data:{escapedOffsets:r,escaped:Ch(r)}}}default:return{}}}}},Gm=new Set(["left","top"]);async function U_(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=mn(n),s=bi(n),l=zt(n)==="y",c=Gm.has(r)?-1:1,d=a&&l?-1:1,h=fn(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 Y_=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 U_(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}}}}},q_=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}=fn(e,t),c={x:n,y:o},d=await ba(t,l),h=zt(mn(i)),u=Xd(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=Vc(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=Vc(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}}}}}},K_=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}=fn(e,t),d={x:n,y:o},h=zt(i),u=Xd(h);let p=d[u],m=d[h];const g=fn(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,S=a.reference[u]+a.reference[x]-v.mainAxis;p<w?p=w:p>S&&(p=S)}if(c){var f,y;const x=u==="y"?"width":"height",w=Gm.has(mn(i)),S=a.reference[h]-a.floating[x]+(w&&((f=r.offset)==null?void 0:f[h])||0)+(w?0:v.crossAxis),k=a.reference[h]+a.reference[x]+(w?0:((y=r.offset)==null?void 0:y[h])||0)-(w?v.crossAxis:0);m<S?m=S:m>k&&(m=k)}return{[u]:p,[h]:m}}}},X_=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}=fn(e,t),d=await ba(t,c),h=mn(i),u=bi(i),p=zt(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=jn(g-d[v],y),S=jn(m-d[f],x),k=!t.middlewareData.shift;let O=w,_=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(O=y),k&&!u){const I=it(d.left,0),$=it(d.right,0),R=it(d.top,0),q=it(d.bottom,0);p?_=m-2*(I!==0||$!==0?I+$:it(d.left,d.right)):O=g-2*(R!==0||q!==0?R+q:it(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 sl(){return typeof window<"u"}function yi(e){return Um(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yt(e){var t;return(t=(Um(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Um(e){return sl()?e instanceof Node||e instanceof rt(e).Node:!1}function Tt(e){return sl()?e instanceof Element||e instanceof rt(e).Element:!1}function Gt(e){return sl()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function _h(e){return!sl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}const Z_=new Set(["inline","contents"]);function Da(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Z_.has(i)}const J_=new Set(["table","td","th"]);function Q_(e){return J_.has(yi(e))}const eS=[":popover-open",":modal"];function ll(e){return eS.some(t=>{try{return e.matches(t)}catch{return!1}})}const tS=["transform","translate","scale","rotate","perspective"],nS=["transform","translate","scale","rotate","perspective","filter"],oS=["paint","layout","strict","content"];function Qd(e){const t=eu(),n=Tt(e)?Pt(e):e;return tS.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)||nS.some(o=>(n.willChange||"").includes(o))||oS.some(o=>(n.contain||"").includes(o))}function iS(e){let t=Wn(e);for(;Gt(t)&&!ci(t);){if(Qd(t))return t;if(ll(t))return null;t=Wn(t)}return null}function eu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const aS=new Set(["html","body","#document"]);function ci(e){return aS.has(yi(e))}function Pt(e){return rt(e).getComputedStyle(e)}function cl(e){return Tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wn(e){if(yi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_h(e)&&e.host||Yt(e);return _h(t)?t.host:t}function Ym(e){const t=Wn(e);return ci(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(t)&&Da(t)?t:Ym(t)}function ya(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ym(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=rt(i);if(a){const s=Mc(r);return t.concat(r,r.visualViewport||[],Da(i)?i:[],s&&n?ya(s):[])}return t.concat(i,ya(i,[],n))}function Mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qm(e){const t=Pt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Gt(e),a=i?e.offsetWidth:n,r=i?e.offsetHeight:o,s=ws(n)!==a||ws(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function tu(e){return Tt(e)?e:e.contextElement}function ni(e){const t=tu(e);if(!Gt(t))return jt(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=qm(t);let r=(a?ws(n.width):n.width)/o,s=(a?ws(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const rS=jt(0);function Km(e){const t=rt(e);return!eu()||!t.visualViewport?rS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==rt(e)?!1:t}function ko(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=tu(e);let r=jt(1);t&&(o?Tt(o)&&(r=ni(o)):r=ni(e));const s=sS(a,n,o)?Km(a):jt(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=rt(a),p=o&&Tt(o)?rt(o):o;let m=u,g=Mc(m);for(;g&&o&&p!==m;){const v=ni(g),f=g.getBoundingClientRect(),y=Pt(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=rt(g),g=Mc(m)}}return _s({width:d,height:h,x:l,y:c})}function dl(e,t){const n=cl(e).scrollLeft;return t?t.left+n:ko(Yt(e)).left+n}function Xm(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-dl(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function lS(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",r=Yt(o),s=t?ll(t.floating):!1;if(o===r||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=jt(1);const d=jt(0),h=Gt(o);if((h||!h&&!a)&&((yi(o)!=="body"||Da(r))&&(l=cl(o)),Gt(o))){const p=ko(o);c=ni(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const u=r&&!h&&!a?Xm(r,l):jt(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 cS(e){return Array.from(e.getClientRects())}function dS(e){const t=Yt(e),n=cl(e),o=e.ownerDocument.body,i=it(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=it(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+dl(e);const s=-n.scrollTop;return Pt(o).direction==="rtl"&&(r+=it(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Sh=25;function uS(e,t){const n=rt(e),o=Yt(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=eu();(!d||d&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=dl(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<=Sh&&(a-=m)}else c<=Sh&&(a+=c);return{width:a,height:r,x:s,y:l}}const hS=new Set(["absolute","fixed"]);function pS(e,t){const n=ko(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Gt(e)?ni(e):jt(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 kh(e,t,n){let o;if(t==="viewport")o=uS(e,n);else if(t==="document")o=dS(Yt(e));else if(Tt(t))o=pS(t,n);else{const i=Km(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _s(o)}function Zm(e,t){const n=Wn(e);return n===t||!Tt(n)||ci(n)?!1:Pt(n).position==="fixed"||Zm(n,t)}function gS(e,t){const n=t.get(e);if(n)return n;let o=ya(e,[],!1).filter(s=>Tt(s)&&yi(s)!=="body"),i=null;const a=Pt(e).position==="fixed";let r=a?Wn(e):e;for(;Tt(r)&&!ci(r);){const s=Pt(r),l=Qd(r);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&i&&hS.has(i.position)||Da(r)&&!l&&Zm(e,r))?o=o.filter(c=>c!==r):i=s,r=Wn(r)}return t.set(e,o),o}function fS(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?ll(t)?[]:gS(t,this._c):[].concat(n),o],r=a[0],s=a.reduce((l,c)=>{const d=kh(t,c,i);return l.top=it(d.top,l.top),l.right=jn(d.right,l.right),l.bottom=jn(d.bottom,l.bottom),l.left=it(d.left,l.left),l},kh(t,r,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function mS(e){const{width:t,height:n}=qm(e);return{width:t,height:n}}function vS(e,t,n){const o=Gt(t),i=Yt(t),a=n==="fixed",r=ko(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=jt(0);function c(){l.x=dl(i)}if(o||!o&&!a)if((yi(t)!=="body"||Da(i))&&(s=cl(t)),o){const p=ko(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?Xm(i,s):jt(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 Fl(e){return Pt(e).position==="static"}function Eh(e,t){if(!Gt(e)||Pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Yt(e)===n&&(n=n.ownerDocument.body),n}function Jm(e,t){const n=rt(e);if(ll(e))return n;if(!Gt(e)){let i=Wn(e);for(;i&&!ci(i);){if(Tt(i)&&!Fl(i))return i;i=Wn(i)}return n}let o=Eh(e,t);for(;o&&Q_(o)&&Fl(o);)o=Eh(o,t);return o&&ci(o)&&Fl(o)&&!Qd(o)?n:o||iS(e)||n}const bS=async function(e){const t=this.getOffsetParent||Jm,n=this.getDimensions,o=await n(e.floating);return{reference:vS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function yS(e){return Pt(e).direction==="rtl"}const xS={convertOffsetParentRelativeRectToViewportRelativeRect:lS,getDocumentElement:Yt,getClippingRect:fS,getOffsetParent:Jm,getElementRects:bS,getClientRects:cS,getDimensions:mS,getScale:ni,isElement:Tt,isRTL:yS};function Qm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wS(e,t){let n=null,o;const i=Yt(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=Qa(h),g=Qa(i.clientWidth-(d+u)),v=Qa(i.clientHeight-(h+p)),f=Qa(d),y={rootMargin:-m+"px "+-g+"px "+-v+"px "+-f+"px",threshold:it(0,jn(1,l))||1};let x=!0;function w(S){const k=S[0].intersectionRatio;if(k!==l){if(!x)return r();k?r(!1,k):o=setTimeout(()=>{r(!1,1e-7)},1e3)}k===1&&!Qm(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 CS(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=tu(e),d=i||a?[...c?ya(c):[],...ya(t)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),a&&f.addEventListener("resize",n)});const h=c&&s?wS(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?ko(e):null;l&&v();function v(){const f=ko(e);g&&!Qm(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 _S=Y_,SS=q_,kS=W_,ES=X_,OS=G_,$S=j_,IS=K_,TS=(e,t,n)=>{const o=new Map,i={platform:xS,...n},a={...i.platform,_c:o};return H_(e,t,{...i,platform:a})};function Oh(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 PS(e){if(!e)return Oh();const{x:t,y:n,width:o,height:i}=e;return Oh(t,n,o,i)}function VS(e,t){return{contextElement:ke(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?PS(o):n.getBoundingClientRect()}}}var Ti=e=>({variable:e,reference:`var(${e})`}),tn={arrowSize:Ti("--arrow-size"),arrowSizeHalf:Ti("--arrow-size-half"),arrowBg:Ti("--arrow-background"),transformOrigin:Ti("--transform-origin"),arrowOffset:Ti("--arrow-offset")},DS=e=>e==="top"||e==="bottom"?"y":"x";function MS(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=DS(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),S=d.reference.height/2,k=f/2,O=((r=e.offset)==null?void 0:r.mainAxis)??e.gutter,_=typeof O=="number"?O+k:O??k,E=w>_,I={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+S-h}px`,R=!!e.overlap&&p==="y"&&E;return s.floating.style.setProperty(tn.transformOrigin.variable,R?$:I),{data:{transformOrigin:R?$:I}}}}}var RS={name:"rects",fn({rects:e}){return{data:e}}},FS=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% + ${tn.arrowOffset.reference})`}),{}}}};function AS(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function LS(e){return e.split("-")[0]}var NS={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function $h(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function nu(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function BS(e,t,n){const o=e||t.createElement("div");return $S({element:o,padding:n.arrowPadding})}function zS(e,t){if(!tw(t.offset??t.gutter))return _S(({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}=AS(n),c=l?void 0:t.shift,d=((i=t.offset)==null?void 0:i.crossAxis)??c;return el({crossAxis:d,mainAxis:s,alignmentAxis:t.shift})})}function HS(e){if(!e.flip)return;const t=nu(e.boundary);return kS({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function jS(e){if(!e.slide&&!e.overlap)return;const t=nu(e.boundary);return SS({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:IS()})}function WS(e){return ES({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 GS(e){if(e.hideWhenDetached)return OS({strategy:"referenceHidden",boundary:nu(e.boundary)??"clippingAncestors"})}function US(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function YS(e,t,n={}){const o=VS(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},NS,n),a=t.querySelector("[data-part=arrow]"),r=[zS(a,i),HS(i),jS(i),BS(a,t.ownerDocument,i),FS(a),MS({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),WS(i),GS(i),RS],{placement:s,strategy:l,onComplete:c,onPositioned:d}=i,h=async()=>{var g;if(!o||!t)return;const v=await TS(o,t,{placement:s,middleware:r,strategy:l});c?.(v),d?.({placed:!0});const f=_e(t),y=$h(f,v.x),x=$h(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 S=li(w);t.style.setProperty("--z-index",S.zIndex)}},u=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:h,floatingElement:t}),d?.({placed:!0})):await h()},p=US(i.listeners),m=i.listeners?CS(o,t,u,p):lw;return u(),()=>{m?.(),d?.({placed:!1})}}function lt(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(YS(s,l,i))})),()=>{r.forEach(s=>s?.())}}var qS={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ev(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:tn.arrowSize.reference,height:tn.arrowSize.reference,[tn.arrowSizeHalf.variable]:`calc(${tn.arrowSize.reference} / 2)`,[tn.arrowOffset.variable]:`calc(${tn.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?qS[t.split("-")[0]]:void 0,background:tn.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 tv=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"]);tv.build();var KS=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},XS=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},ZS=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},JS=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},QS=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},ek=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},tk=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},nk=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},ok=(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}`},ik=(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}`},Wr=e=>e.getById(JS(e)),ak=e=>e.getById(nk(e)),rk=(e,t)=>e.getById(ik(e,t)),sk=e=>e.getById(ek(e)),Ih=e=>e.getById(KS(e)),lk=e=>e.getById(tk(e)),ck=(e,t,n)=>{const o=lk(e);if(!o)return;const{getPercentValue:i}=Zf(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},dk=e=>e.getById(XS(e)),Al=e=>e.getById(ZS(e)),uk=e=>e.getById(QS(e)),hk=(e,t)=>e.getById(ok(e,t)),pk=(e,t,n,o)=>{const i=hk(e,n);if(!i)return;const{getPercentValue:a}=Zf(t,i);return{x:a({dir:o,orientation:"horizontal"}),y:a({orientation:"vertical"})}},gk=e=>[...Hn(Wr(e),"input[data-channel]"),...Hn(dk(e),"input[data-channel]")];function fk(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 Th=e=>xs(e),mk=/^[0-9a-fA-F]{3,8}$/;function vk(e){return mk.test(e)}function bk(e){return e.startsWith("#")?e:vk(e)?`#${e}`:e}var{and:yk}=Ye();yk("isOpenControlled","closeOnSelect");function Ph(e,t,n){const o=gk(e);J(()=>{o.forEach(i=>{const a=i.dataset.channel;Et(i,fk(n||t,a))})})}function xk(e,t){const n=sk(e);n&&J(()=>Et(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"]);tv.extendWith("view");var nv=ie("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");nv.build();var ov=e=>new Vo(e);ov.empty=()=>new Vo({items:[]});var wk=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},Ck=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},_k=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},Sk=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},kk=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},Ek=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},Tn=e=>e.getById(_k(e)),Uo=e=>e.getById(Ck(e)),Vh=e=>e.getById(Sk(e)),Dh=e=>e.getById(wk(e)),ea=e=>e.getById(kk(e)),Mh=e=>e.getById(Ek(e)),Pi=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return em(Tn(e),n)},Rh=e=>{const t=Uo(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},Ok=e=>{const t=ea(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:$k,createMachine:Ik,choose:Tk}=nl(),{and:Te,not:et}=$k;Ik({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}){Kf(t)},collection:ov.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:Be,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=Lt(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:Tk([{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",et("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",et("hasHighlightedItem"),et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("hasHighlightedItem"),et("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",et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("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",et("hasHighlightedItem"),et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("hasHighlightedItem"),et("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",et("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:Te("isCustomValue",et("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 ew(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:vi(()=>Tn(n),{type:"listbox",defer:!0,exclude:()=>[Uo(n),ea(n),Mh(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 rC([Uo(e),Tn(e),ea(e),Mh(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Dh(n)||ea(n),i=()=>Vh(n);return e.set("currentPlacement",t("positioning").placement),lt(o,i,{...t("positioning"),defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=Uo(n);let a=[];const r=c=>{const d=o.current().type.includes("POINTER"),h=e.get("highlightedValue");if(d||!h)return;const u=Tn(n),p=t("scrollToIndexFn");if(p){const v=t("collection").indexOf(h);p({index:v,immediate:c,getElement:()=>Pi(n,h)});return}const m=Pi(n,h),g=J(()=>{ma(m,{rootEl:u,block:"nearest"})});a.push(g)},s=J(()=>r(!0));a.push(s);const l=Ta(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}){lt(()=>Dh(n),()=>Vh(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")?_o(n.get("value"),a):[a];(t=o("onSelect"))==null||t({value:r,itemValue:a}),n.set("value",r);const s=Lt(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(r),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){Xs(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=Pi(n,o),a=Tn(n),r=t("scrollToIndexFn");if(r){const s=t("collection").indexOf(o);r({index:s,immediate:!0,getElement:()=>Pi(n,o)});return}ma(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")?_o(t.get("value"),n.value):[n.value];(a=i("onSelect"))==null||a({value:r,itemValue:n.value}),t.set("value",r);const s=Lt(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=xo(t.get("value"),n.value);t.set("value",a);const r=Lt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",r)})},setInitialFocus({scope:e}){J(()=>{Rh(e)})},setFinalFocus({scope:e}){J(()=>{const t=ea(e);t?.dataset.focusable==null?Rh(e):Ok(e)})},syncInputValue({context:e,scope:t,event:n}){const o=Uo(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&Mx(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=Lt(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=Lt(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=Lt(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:()=>Pi(t,o)})}else{const o=Tn(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=Fh(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=Fh(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(Tn(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}){(Tn(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=Uo(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=Lt(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 Fh(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"]);nv.extendWith("empty");function Ll(e,t){return e-t*Math.floor(e/t)}const iv=1721426;function er(e,t,n,o){t=ou(e,t);let i=t-1,a=-2;return n<=2?a=0:Gr(t)&&(a=-1),iv-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+o)}function Gr(e){return e%4===0&&(e%100!==0||e%400===0)}function ou(e,t){return e==="BC"?1-t:t}function Pk(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const Vk={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 di=class{fromJulianDay(t){let n=t,o=n-iv,i=Math.floor(o/146097),a=Ll(o,146097),r=Math.floor(a/36524),s=Ll(a,36524),l=Math.floor(s/1461),c=Ll(s,1461),d=Math.floor(c/365),h=i*400+r*100+l*4+d+(r!==4&&d!==4?1:0),[u,p]=Pk(h),m=n-er(u,p,1,1),g=2;n<er(u,p,3,1)?g=0:Gr(p)&&(g=1);let v=Math.floor(((m+g)*12+373)/367),f=n-er(u,p,v,1)+1;return new ks(u,p,v,f)}toJulianDay(t){return er(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return Vk[Gr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Gr(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 Dk={"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 ul(e,t){return t=Ot(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Mk(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 Rk(e,t,n){let o=e.calendar.toJulianDay(e),i=zk(t),a=Math.ceil(o+1-i)%7;return a<0&&(a+=7),a}function Fk(e){return ln(Date.now(),e)}function av(e){return oi(Fk(e))}function rv(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Ak(e,t){return Ah(e)-Ah(t)}function Ah(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Nl=null;function iu(){return Nl==null&&(Nl=new Intl.DateTimeFormat().resolvedOptions().timeZone),Nl}function sv(e){return e.subtract({days:e.day-1})}function Lk(e){return sv(e.subtract({months:e.month-1}))}function Nk(e,t,n){let o=Rk(e,t);return e.subtract({days:o})}const Lh=new Map,Bl=new Map;function Bk(e){if(Intl.Locale){let n=Lh.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Lh.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function zk(e){let t=Bl.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Bl.set(e,t),t.firstDay}let n=Bk(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&&Dk[n]||0};Bl.set(e,t)}return t.firstDay}function lv(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function cv(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ui(e){e=Ot(e,new di);let t=ou(e.era,e.year);return dv(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function dv(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 Rc(e,t){if(t==="UTC")return 0;if(e>0&&t===iu())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=uv(e,t);return dv(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Nh=new Map;function uv(e,t){let n=Nh.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"}),Nh.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 Bh=864e5;function Hk(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>jk(e,t,i))}function jk(e,t,n){let o=uv(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 an(e,t,n="compatible"){let o=Eo(e);if(t==="UTC")return ui(o);if(t===iu()&&n==="compatible"){o=Ot(o,new di);let l=new Date,c=ou(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=ui(o),a=Rc(i-Bh,t),r=Rc(i+Bh,t),s=Hk(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 hv(e,t,n="compatible"){return new Date(an(e,t,n))}function ln(e,t){let n=Rc(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 xv(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,d)}function oi(e){return new ks(e.calendar,e.era,e.year,e.month,e.day)}function Eo(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 rE(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function Ot(e,t){if(Mk(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,Oo(o),o}function Wk(e,t,n){if(e instanceof xv)return e.timeZone===t?e:Uk(e,t);let o=an(e,t,n);return ln(o,t)}function Gk(e){let t=ui(e)-e.offset;return new Date(t)}function Uk(e,t){let n=ui(e)-e.offset;return Ot(ln(n,t),e.calendar)}const Vi=36e5;function hl(e,t){let n=e.copy(),o="hour"in n?Xk(n,t):0;Fc(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Ac(n),pv(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,Yk(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 Fc(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Ac(e){for(;e.month<1;)Fc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Fc(e,1)}function Yk(e){for(;e.day<1;)e.month--,Ac(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Ac(e)}function pv(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 Oo(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),pv(e)}function gv(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function fv(e,t){return hl(e,gv(t))}function au(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),Oo(n),n}function Ss(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),Kk(n),n}function qk(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=tr(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=tr(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=tr(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=tr(e.hour,24),t}function Kk(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 tr(e,t){let n=e%t;return n<0&&(n+=t),n}function Xk(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,qk(e)}function ru(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=cn(l,n,0,s.length-1,o?.round),i.era=s[l],Oo(i);break}case"year":var a,r;!((a=(r=i.calendar).isInverseEra)===null||a===void 0)&&a.call(r,i)&&(n=-n),i.year=cn(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=cn(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=cn(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),Oo(i),i}function mv(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=cn(a,n,r,s,o?.round);break}case"minute":i.minute=cn(e.minute,n,0,59,o?.round);break;case"second":i.second=cn(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=cn(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function cn(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 vv(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=hl(Eo(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=an(i,e.timeZone)}else n=ui(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=ln(n,e.timeZone);return Ot(o,e.calendar)}function Zk(e,t){return vv(e,gv(t))}function Jk(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=Eo(e),s=Ot(Ss(r,{hour:i}),new di),l=[an(s,e.timeZone,"earlier"),an(s,e.timeZone,"later")].filter(m=>ln(m,e.timeZone).day===s.day)[0],c=Ot(Ss(r,{hour:a}),new di),d=[an(c,e.timeZone,"earlier"),an(c,e.timeZone,"later")].filter(m=>ln(m,e.timeZone).day===c.day).pop(),h=ui(e)-e.offset,u=Math.floor(h/Vi),p=h%Vi;return h=cn(u,n,Math.floor(l/Vi),Math.floor(d/Vi),o?.round)*Vi+p,Ot(ln(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return mv(e,t,n,o);case"era":case"year":case"month":case"day":{let i=ru(Eo(e),t,n,o),a=an(i,e.timeZone);return Ot(ln(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function Qk(e,t,n){let o=Eo(e),i=Ss(au(o,t),t);if(i.compare(o)===0)return e;let a=an(i,e.timeZone,n);return Ot(ln(a,e.timeZone),e.calendar)}function eE(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 bv(e){let t=Ot(e,new di),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 yv(e){return`${bv(e)}T${eE(e)}`}function tE(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 nE(e){return`${yv(e)}${tE(e.offset)}[${e.timeZone}]`}function oE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function su(e,t,n){oE(e,t),t.set(e,n)}function lu(e){let t=typeof e[0]=="object"?e.shift():new di,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 iE=new WeakMap;let ks=class Lc{copy(){return this.era?new Lc(this.calendar,this.era,this.year,this.month,this.day):new Lc(this.calendar,this.year,this.month,this.day)}add(t){return hl(this,t)}subtract(t){return fv(this,t)}set(t){return au(this,t)}cycle(t,n,o){return ru(this,t,n,o)}toDate(t){return hv(this,t)}toString(){return bv(this)}compare(t){return rv(this,t)}constructor(...t){su(this,iE,{writable:!0,value:void 0});let[n,o,i,a,r]=lu(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,Oo(this)}};var aE=new WeakMap;let rE=class Nc{copy(){return this.era?new Nc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Nc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return hl(this,t)}subtract(t){return fv(this,t)}set(t){return au(Ss(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return ru(this,t,n,o);default:return mv(this,t,n,o)}}toDate(t,n){return hv(this,t,n)}toString(){return yv(this)}compare(t){let n=rv(this,t);return n===0?Ak(this,Eo(t)):n}constructor(...t){su(this,aE,{writable:!0,value:void 0});let[n,o,i,a,r]=lu(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,Oo(this)}};var sE=new WeakMap;let xv=class Bc{copy(){return this.era?new Bc(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Bc(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return vv(this,t)}subtract(t){return Zk(this,t)}set(t,n){return Qk(this,t,n)}cycle(t,n,o){return Jk(this,t,n,o)}toDate(){return Gk(this)}toString(){return nE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-Wk(t,this.timeZone).toDate().getTime()}constructor(...t){su(this,sE,{writable:!0,value:void 0});let[n,o,i,a,r]=lu(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,Oo(this)}},zl=new Map,Es=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 dE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=uE(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=wv(t,n),this.options=n}};const lE={true:{ja:"h11"},false:{}};function wv(e,t={}){if(typeof t.hour12=="boolean"&&cE()){t={...t};let i=lE[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(zl.has(n))return zl.get(n);let o=new Intl.DateTimeFormat(e,t);return zl.set(n,o),o}let Hl=null;function cE(){return Hl==null&&(Hl=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Hl}let jl=null;function dE(){return jl==null&&(jl=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),jl}function uE(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=wv(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 hE(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=Do(e,t,n).subtract(a);return Ma(e,r,t,n,o,i)}function Do(e,t,n,o,i){let a=e;return t.years?a=Lk(e):t.months?a=sv(e):t.weeks&&(a=Nk(e,n)),Ma(e,a,t,n,o,i)}function cu(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=Do(e,t,n).subtract(a);return Ma(e,r,t,n,o,i)}function Ma(e,t,n,o,i,a){return i&&e.compare(i)>=0&&(t=cv(t,Do(oi(i),n,o))),a&&e.compare(a)<=0&&(t=lv(t,cu(oi(a),n,o))),t}function rn(e,t,n){let o=oi(e);return t&&(o=cv(o,oi(t))),n&&(o=lv(o,oi(n))),o}function zh(e,t,n,o,i,a){switch(t){case"start":return Do(e,n,o,i,a);case"end":return cu(e,n,o,i,a);case"center":default:return hE(e,n,o,i,a)}}function fo(e,t){return t!=null&&ul(e,t)}function pl(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function pE(e,t,n){const o=e.subtract({days:1});return ul(o,e)||pl(o,t,n)}function gE(e,t,n){const o=e.add({days:1});return ul(o,e)||pl(o,t,n)}function Cv(e){let t={...e};for(let n in t)t[n]=1;return t}function _v(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function fE(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function mE(e,t){const n=Eo(av(t));return new Es(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:fE(n),timeZone:t})}function vE(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 bE(e,t,n,o){let i=e,a=e,r=mE(n,o);return ul(i,a)?r.format(i.toDate(o)):vE(i,a,r,(s,l)=>`${s} – ${l}`,o)}var yE=10;function xE(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+yE?(i-100).toString():i.toString()}return e}}function Hh(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 jh(e){return av(e??iu())}function Ra(e,t,n,o){return function(i){const{startDate:a,focusedDate:r}=i,s=_v(a,e);return pl(r,n,o)?{startDate:a,focusedDate:rn(r,n,o),endDate:s}:r.compare(a)<0?{startDate:cu(r,e,t,n,o),focusedDate:rn(r,n,o),endDate:s}:r.compare(s)>0?{startDate:Do(r,e,t,n,o),endDate:s,focusedDate:rn(r,n,o)}:{startDate:a,endDate:s,focusedDate:rn(r,n,o)}}}function Sv(e,t,n,o,i,a){const r=Ra(n,o,i,a),s=t.add(n);return r({focusedDate:e.add(n),startDate:Do(Ma(e,s,n,o,i,a),n,o)})}function kv(e,t,n,o,i,a){const r=Ra(n,o,i,a);let s=t.subtract(n);return r({focusedDate:e.subtract(n),startDate:Do(Ma(e,s,n,o,i,a),n,o)})}function wE(e,t,n,o,i,a,r){const s=Ra(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.add(Cv(o)),startDate:t});if(o.days)return Sv(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 CE(e,t,n,o,i,a,r){const s=Ra(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.subtract(Cv(o)),startDate:t});if(o.days)return kv(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 Wh=e=>e!=null&&e.length===4,_E=e=>e!=null&&parseFloat(e)<=12,SE=e=>e!=null&&parseFloat(e)<=31;function kE(e,t,n){const o=EE(t,n);let{year:i,month:a,day:r}=OE(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(Wh(i)||(i=xE(i)),Wh(i)&&_E(a)&&SE(r))return new ks(+i,+a,+r);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new ks(l.getFullYear(),l.getMonth()+1,l.getDate())}}function EE(e,t){return new Es(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 OE(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 nr="__live-region__";function Ev(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(nr);h?.remove(),d=d??i;const u=n.createElement("span");u.id=nr,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(nr);c?.remove()}return{announce:s,destroy:l,toJSON(){return nr}}}var Ov=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");Ov.build();var $E=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},IE=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},TE=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},PE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},VE=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},DE=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},ME=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},Gh=(e,t)=>em(Ur(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),Uh=e=>e.getById(PE(e)),Ur=e=>e.getById($E(e)),Di=e=>Hn($v(e),"[data-part=input]"),RE=e=>e.getById(ME(e)),FE=e=>e.getById(DE(e)),AE=e=>e.getById(IE(e)),LE=e=>e.getById(VE(e)),$v=e=>e.getById(TE(e));function Yh(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function or(e){return e.slice().sort((t,n)=>t.compare(n))}var qh=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year);function un(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function du(e){return e===0?"day":e===1?"month":"year"}function uu(e,t,n){return du(Ae(un(e,0),un(t,0),un(n,2)))}function NE(e,t){return un(e,0)>un(t,0)}function BE(e,t){return un(e,0)<un(t,0)}function zE(e,t,n){const o=un(e,0)+1;return uu(du(o),t,n)}function HE(e,t,n){const o=un(e,0)-1;return uu(du(o),t,n)}var jE=["day","month","year"];function WE(e){jE.forEach(t=>e(t))}var{and:ht}=Ye();function GE(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(!fo(e[o],t[o]))return!1;return!0}function ir(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}ht("shouldRestoreFocus","isInteractOutsideEvent"),ht("isRangePicker","hasSelectedRange"),ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),ht("isRangePicker","isSelectingEndDate","closeOnSelect"),ht("isRangePicker","isSelectingEndDate"),ht("closeOnSelect","isOpenControlled"),ht("isRangePicker","isSelectingEndDate"),ht("isRangePicker","hasSelectedRange"),ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),ht("isRangePicker","isSelectingEndDate","closeOnSelect"),ht("isRangePicker","isSelectingEndDate"),ht("closeOnSelect","isOpenControlled");var Yr=(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 WE(r=>{BE(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=Yr(e,t);if(fo(n.get("focusedValue"),a))return;const r=Ra(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 ar(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");fo(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 UE=Ov.extendWith("view");var Iv=ie("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger");Iv.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 YE=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,Tv=e=>e.isDirectory,zc=e=>e.isFile,Hc=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),qE=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=YE(n);if(!o)return null;if(Tv(o)&&t)return Pv(o.createReader(),`${o.name}`);if(zc(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?Hc(i,""):null)}if(zc(o))return new Promise(i=>{o.file(a=>{i(Hc(a,""))})})}).filter(n=>n)),Pv=(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(Tv(s))return Pv(s.createReader(),`${t}${s.name}`);if(zc(s))return new Promise(l=>{s.file(c=>{l(Hc(c,t))})})}).filter(s=>s);o.push(Promise.all(r)),i()})};i()});function KE(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function XE(e){return/^.*\.[\w]+$/.test(e)}var Kh=e=>KE(e)||XE(e);function ZE(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(Kh).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(Kh).join(",")}var rr=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,Mi=e=>e!=null;function JE(e,t,n){if(Mi(e.size))if(Mi(t)&&Mi(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(Mi(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(Mi(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var QE="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",eO=new Map(QE.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function tO(e){const t=e.split(".").pop();return t&&eO.get(t)||null}function nO(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||tO(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 oO(e,t){const n=e.type==="application/x-moz-file"||nO(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var iO=ie("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");iO.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 aO=ie("fieldset").parts("root","errorText","helperText","legend");aO.build();const[Vv,dt]=we("FileUploadContext"),rO=M({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=dt();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),sO=M({__name:"file-upload-context",setup(e){const t=dt();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),lO=M({__name:"file-upload-dropzone",props:qn({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=dt();return K(),(o,i)=>(C(),T(b(X).div,W(b(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),cO=M({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=mi();return K(),(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:P(()=>[L(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[dO,Fa]=we("FileUploadItemPropsContext"),uO=M({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa();return K(),(o,i)=>(C(),T(b(X).button,W(b(t).getItemDeleteTriggerProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[hO,pO]=we("FileUploadItemGroupPropsContext"),gO=M({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=A(()=>Vn(t,["type"])),o=dt();return hO(n),K(),(i,a)=>(C(),T(b(X).ul,W(b(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),fO=M({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa(),o=Bs();return K(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemNameProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default",{},()=>{var r;return[Ne(oe(((r=o.default)==null?void 0:r.call(o))||b(n).file.name),1)]})]),_:3},16,["as-child"]))}}),mO=M({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa(),o=ve("");return Cf(i=>{const a=t.value.createFileUrl(n.value.file,r=>o.value=r);i(a)}),K(),(i,a)=>o.value?(C(),T(b(X).img,st(W({key:0},b(t).getItemPreviewImageProps({...b(n),url:o.value}))),null,16)):Q("",!0)}}),vO=M({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa();return K(),(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:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"])):Q("",!0)}}),bO=M({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=dt(),n=Fa(),o=Bs();return K(),(i,a)=>(C(),T(b(X).div,W(b(t).getItemSizeTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default",{},()=>{var r;return[Ne(oe(((r=o.default)==null?void 0:r.call(o))||b(t).getFileSize(b(n).file)),1)]})]),_:3},16,["as-child"]))}}),yO=M({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=dt(),o=pO(),i=A(()=>({...t,type:o.value.type}));return dO(i),K(),(a,r)=>(C(),T(b(X).li,W(b(n).getItemProps(i.value),{"as-child":e.asChild}),{default:P(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),xO=M({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=dt();return K(),(n,o)=>(C(),T(b(X).label,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),wO=M({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Vv(n),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});function CO(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 _O=CO(Intl.NumberFormat);function SO(e,t,n={}){return _O(t,n).format(e)}var kO=["","kilo","mega","giga","tera"],EO=["","kilo","mega","giga","tera","peta"],OO=(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"?kO:EO,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 SO(p,t,{style:"unit",unit:l[h]+a,unitDisplay:r})},Dv=ie("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),pt=Dv.build(),Mv=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},Rv=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},jc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},$O=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},IO=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},TO=(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}`},PO=(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}`},VO=(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}`},DO=(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}`},MO=e=>e.getById(Mv(e)),Xh=e=>e.getById(jc(e)),RO=e=>e.getById(Rv(e));function Zh(e){const t=xe(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function FO(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 Jh(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]=oO(c,a("acceptAttr")),[p,m]=JE(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)})}}),FO(e,r.length,n)||(r.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),r.splice(0)),{acceptedFiles:r,rejectedFiles:s}}function AO(e,t){const n=_e(e);try{if("DataTransfer"in n){const o=new n.DataTransfer;t.forEach(i=>{o.items.add(i)}),e.files=o.files}}catch{}}var En="accepted";function LO(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=En){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 OO(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({...pt.root.attrs,dir:i("dir"),id:Mv(r),"data-disabled":j(l),"data-dragging":j(u)})},getDropzoneProps(m={}){return t.element({...pt.dropzone.attrs,dir:i("dir"),id:Rv(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===xe(g)&&(m.disableClick||g.key!=="Enter"&&g.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(g){l||g.defaultPrevented||m.disableClick||g.currentTarget===xe(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(!Zh(g))return;const v=g.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:v})},onDragLeave(g){l||d&&(Ue(g.currentTarget,g.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(g){if(l)return;d&&(g.preventDefault(),g.stopPropagation());const v=Zh(g);l||!v||qE(g.dataTransfer.items,i("directory")).then(f=>{o({type:"DROPZONE.DROP",files:om(f)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...pt.trigger.attrs,dir:i("dir"),id:$O(r),disabled:l,"data-disabled":j(l),"data-invalid":j(i("invalid")),type:"button",onClick(m){l||(Ue(RO(r),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:jc(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:Fd})},getItemGroupProps(m={}){const{type:g=En}=m;return t.element({...pt.itemGroup.attrs,dir:i("dir"),"data-disabled":j(l),"data-type":g})},getItemProps(m){const{file:g,type:v=En}=m;return t.element({...pt.item.attrs,dir:i("dir"),id:TO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemNameProps(m){const{file:g,type:v=En}=m;return t.element({...pt.itemName.attrs,dir:i("dir"),id:PO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemSizeTextProps(m){const{file:g,type:v=En}=m;return t.element({...pt.itemSizeText.attrs,dir:i("dir"),id:VO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewProps(m){const{file:g,type:v=En}=m;return t.element({...pt.itemPreview.attrs,dir:i("dir"),id:DO(r,g.name),"data-disabled":j(l),"data-type":v})},getItemPreviewImageProps(m){var g;const{file:v,url:f,type:y=En}=m;if(!v.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...pt.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=En}=m;return t.button({...pt.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({...pt.label.attrs,dir:i("dir"),id:IO(r),htmlFor:jc(r),"data-disabled":j(l),"data-required":j(c)})},getClearTriggerProps(){return t.button({...pt.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 NO={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)=>rr(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)=>rr(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})=>ZE(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=>{Ue(MO(t),xe(a))||a.preventDefault()};return va(se(n,"dragover",o,!1),se(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=Xh(e);if(!n)return;AO(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){J(()=>{var t;(t=Xh(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:a}=Jh(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}=Jh(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=>{gn(`[zag-js/file-upload] error transforming files
|
|
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=>!rr(o.file,t.file));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter(o=>!rr(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 BO=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=mi(),r=A(()=>{const l=Le(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,...Po(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=Ut(NO,r);return A(()=>LO(s,bn))},zO=M({__name:"file-upload-root",props:qn({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=BO(e,t);return Vv(n),K(),(o,i)=>(C(),T(b(X).div,W(b(n).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),HO=M({__name:"file-upload-trigger",props:{asChild:{type:Boolean}},setup(e){const t=dt();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),gt=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:rO,Context:sO,Dropzone:lO,HiddenInput:cO,Item:yO,ItemDeleteTrigger:uO,ItemGroup:gO,ItemName:fO,ItemPreview:vO,ItemPreviewImage:mO,ItemSizeText:bO,Label:xO,Root:zO,RootProvider:wO,Trigger:HO},Symbol.toStringTag,{value:"Module"})),jO=Symbol(),Qh=Object.getPrototypeOf,Wc=new WeakMap,WO=e=>e&&(Wc.has(e)?Wc.get(e):Qh(e)===Object.prototype||Qh(e)===Array.prototype),GO=e=>WO(e)&&e[jO]||null,ep=(e,t=!0)=>{Wc.set(e,t)};function UO(){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 Fv(e,t){const n=UO();return n?(n[e]||(n[e]=t()),n[e]):t()}var qr=Fv("__zag__refSet",()=>new WeakSet),YO=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,qO=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,KO=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",XO=e=>YO(e)||qO(e)||KO(e),Gc=e=>e!==null&&typeof e=="object",tp=e=>Gc(e)&&!qr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!XO(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),co=Fv("__zag__proxyStateMap",()=>new WeakMap),ZO=(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 ep(d,!0),n.set(s,[l,d]),Reflect.ownKeys(s).forEach(h=>{const u=Reflect.get(s,h);qr.has(u)?(ep(u,!1),d[h]=u):co.has(u)?d[h]=e$(u):d[h]=u}),Object.freeze(d)},i=new WeakMap,a=[1,1],r=s=>{if(!Gc(s))throw new Error("object required");const l=i.get(s);if(l)return l;let c=a[0];const d=new Set,h=(k,O=++a[0])=>{c!==O&&(c=O,d.forEach(_=>_(k,O)))};let u=a[1];const p=(k=++a[1])=>(u!==k&&!d.size&&(u=k,g.forEach(([O])=>{const _=O[1](k);_>c&&(c=_)})),c),m=k=>(O,_)=>{const E=[...O];E[1]=[k,...E[1]],h(E,_)},g=new Map,v=(k,O)=>{if(d.size){const _=O[3](m(k));g.set(k,[O,_])}else g.set(k,[O])},f=k=>{var O;const _=g.get(k);_&&(g.delete(k),(O=_[1])==null||O.call(_))},y=k=>(d.add(k),d.size===1&&g.forEach(([O,_],E)=>{const I=O[3](m(E));g.set(E,[O,I])}),()=>{d.delete(k),d.size===0&&g.forEach(([O,_],E)=>{_&&(_(),g.set(E,[O]))})}),x=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),w=t(x,{deleteProperty(k,O){const _=Reflect.get(k,O);f(O);const E=Reflect.deleteProperty(k,O);return E&&h(["delete",[O],_]),E},set(k,O,_,E){var I;const $=Reflect.has(k,O),R=Reflect.get(k,O,E);if($&&(e(R,_)||i.has(_)&&e(R,i.get(_))))return!0;f(O),Gc(_)&&(_=GO(_)||_);let q=_;if(!((I=Object.getOwnPropertyDescriptor(k,O))!=null&&I.set)){!co.has(_)&&tp(_)&&(q=Av(_));const V=!qr.has(q)&&co.get(q);V&&v(O,V)}return Reflect.set(k,O,q,E),h(["set",[O],_,R]),!0}});i.set(s,w);const S=[x,p,o,y];return co.set(w,S),Reflect.ownKeys(s).forEach(k=>{const O=Object.getOwnPropertyDescriptor(s,k);O.get||O.set?Object.defineProperty(x,k,O):w[k]=s[k]}),w})=>[r,co,qr,e,t,tp,n,o,i,a],[JO]=ZO();function Av(e={}){return JO(e)}function QO(e,t,n){const o=co.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 e$(e){const t=co.get(e),[n,o,i]=t;return i(n,o())}var t$=ie("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control");t$.build();var n$=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`float:${e.id}:trigger`},o$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`float:${e.id}:positioner`},i$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`float:${e.id}:content`},a$=e=>{var t;return((t=e.ids)==null?void 0:t.header)??`float:${e.id}:header`},np=e=>e.getById(n$(e)),op=e=>e.getById(o$(e)),ip=e=>e.getById(i$(e)),r$=e=>e.getById(a$(e)),On=(e,t,n)=>{let o;return ke(t)?o=xm(t):o=H1(e.getWin()),n&&(o=Pa({x:-o.width,y:o.minY,width:o.width*3,height:o.height*2})),Vn(o,["x","y","width","height"])},Ri=Av({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:ap,and:s$}=Ye(),l$={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"};ap("isMaximized"),ap("isMinimized"),s$("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 c$=ie("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");c$.build();var d$=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`hover-card:${e.id}:trigger`},u$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`hover-card:${e.id}:content`},h$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`hover-card:${e.id}:popper`},Wl=e=>e.getById(d$(e)),p$=e=>e.getById(u$(e)),rp=e=>e.getById(h$(e)),{not:sr,and:sp}=Ye();sp("isOpenControlled",sr("isPointer")),sr("isPointer"),sp("isOpenControlled",sr("isPointer")),sr("isPointer");Y()(["closeDelay","dir","getRootNode","id","ids","disabled","onOpenChange","defaultOpen","open","openDelay","positioning","onInteractOutside","onPointerDownOutside","onFocusOutside"]);var g$={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(g$).map(([e,t])=>[t,e]));const[Lv,ze]=we("TreeViewContext"),[f$,_t]=we("TreeViewNodePropsContext"),m$=M({__name:"tree-view-branch-content",props:{asChild:{type:Boolean}},setup(e){const t=c1(),n=ze(),o=_t(),i=A(()=>{const a=n.value.getBranchContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return K(),(a,r)=>(C(),T(b(vm).Content,W(i.value,{"as-child":e.asChild}),{default:P(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),v$=M({__name:"tree-view-branch-control",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchControlProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),b$=M({__name:"tree-view-branch-indent-guide",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchIndentGuideProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),y$=M({__name:"tree-view-branch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),x$=M({__name:"tree-view-branch-text",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getBranchTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),w$=M({__name:"tree-view-branch-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getBranchTriggerProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[C$,hu]=we("TreeViewNodeContext"),_$=M({__name:"tree-view-branch",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t(),o=hu(),i=Nd(),a=A(()=>t.value.getBranchContentProps(n));return K(),(r,s)=>(C(),T(b(vm).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:P(()=>[L(r.$slots,"default")]),_:3},16,["open","ids","lazy-mount","unmount-on-exit","as-child"]))}}),S$=M({__name:"tree-view-context",setup(e){const t=ze();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),k$=M({__name:"tree-view-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),E$=M({__name:"tree-view-item-text",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getItemTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),O$=M({__name:"tree-view-item",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),$$=M({__name:"tree-view-label",props:{asChild:{type:Boolean}},setup(e){const t=ze();return K(),(n,o)=>(C(),T(b(X).h3,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),I$=M({__name:"tree-view-node-checkbox",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getNodeCheckboxProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),T$=M({__name:"tree-view-node-checkbox-indicator",props:{indeterminate:{},fallback:{}},setup(e){const t=hu();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})}}),P$=M({__name:"tree-view-node-rename-input",props:{asChild:{type:Boolean}},setup(e){const t=ze(),n=_t();return K(),(o,i)=>(C(),T(b(X).input,W(b(t).getNodeRenameInputProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),V$=M({__name:"tree-view-node-context",setup(e){const t=hu();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),Nv=M({__name:"tree-view-node-provider",props:{node:{},indexPath:{}},setup(e){const t=e,n=ze(),o=A(()=>n.value.getNodeState(t));return C$(o),f$(t),K(),(i,a)=>L(i.$slots,"default")}}),D$=M({__name:"tree-view-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Lv(n),fi(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var Bv=ie("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),je=Bv.build(),zv=e=>new Wd(e);zv.empty=()=>new Wd({rootNode:{children:[]}});var M$=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tree:${e.id}:root`},lp=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`tree:${e.id}:label`},Hv=(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}`},Gl=e=>{var t;return((t=e.ids)==null?void 0:t.tree)??`tree:${e.id}:tree`},kt=(e,t)=>{var n;t!=null&&((n=e.getById(Hv(e,t)))==null||n.focus())},jv=(e,t)=>`tree:${e.id}:rename-input:${t}`,cp=(e,t)=>e.getById(jv(e,t));function Wv(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 R$(e,t,n){const o=e.getDescendantValues(t),i=o.every(a=>n.includes(a));return Bt(i?xo(n,...o):sn(n,...o))}function F$(e,t){const n=new Map;return e.visit({onEnter:o=>{const i=e.getNodeValue(o),a=e.isBranchNode(o),r=Wv(e,o,t);n.set(i,{type:a?"branch":"leaf",checked:r})}}),n}function A$(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(),S=w?s.getNodeValue(w):null;return{id:Hv(o,x),value:x,indexPath:y,valuePath:s.getValuePath(y),disabled:!!f.disabled,focused:u==null?S==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 Wv(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 F$(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){kt(o,v)},selectParent(v){const f=s.getParentNode(v);if(!f)return;const y=sn(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=sn(l,s.getNodeValue(f));r({type:"EXPANDED.SET",value:y,src:"expand.parent"})},setExpandedValue(v){const f=Bt(v);r({type:"EXPANDED.SET",value:f})},setSelectedValue(v){const f=Bt(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({...je.root.attrs,id:M$(o),dir:a("dir")})},getLabelProps(){return t.element({...je.label.attrs,id:lp(o),dir:a("dir")})},getTreeProps(){return t.element({...je.tree.attrs,id:Gl(o),dir:a("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":lp(o),"aria-multiselectable":a("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(v){if(v.defaultPrevented||wc(v))return;const f=xe(v);if(Us(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]"),S={ArrowDown(_){_n(_)||(_.preventDefault(),r({type:"NODE.ARROW_DOWN",id:x,shiftKey:_.shiftKey}))},ArrowUp(_){_n(_)||(_.preventDefault(),r({type:"NODE.ARROW_UP",id:x,shiftKey:_.shiftKey}))},ArrowLeft(_){_n(_)||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(_){_n(_)||(_.preventDefault(),r({type:"NODE.HOME",id:x,shiftKey:_.shiftKey}))},End(_){_n(_)||(_.preventDefault(),r({type:"NODE.END",id:x,shiftKey:_.shiftKey}))},Space(_){var E;y.dataset.disabled||(h?r({type:"TREE.TYPEAHEAD",key:_.key}):(E=S.Enter)==null||E.call(S,_))},Enter(_){y.dataset.disabled||jo(f)&&_n(_)||(r({type:w?"BRANCH_NODE.CLICK":"NODE.CLICK",id:x,src:"keyboard"}),jo(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 I=s.getIndexPath(x);if(I){const $=s.at(I);if($&&!E($,I))return}_.preventDefault(),r({type:"NODE.RENAME",value:x})}},k=Cc(v,{dir:a("dir")}),O=S[k];if(O){O(v);return}pn.isValidEvent(v)&&(r({type:"TREE.TYPEAHEAD",key:v.key,id:x}),v.preventDefault())}})},getNodeState:g,getItemProps(v){const f=g(v);return t.element({...je.item.attrs,id:f.id,dir:a("dir"),"data-ownedby":Gl(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":Ji(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||!Mr(y)||jo(y.currentTarget)&&_n(y))return;const x=y.metaKey||y.ctrlKey;r({type:"NODE.CLICK",id:f.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation(),jo(y.currentTarget)||y.preventDefault()}})},getItemTextProps(v){const f=g(v);return t.element({...je.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({...je.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({...je.branch.attrs,"data-depth":f.depth,dir:a("dir"),"data-branch":f.value,role:"treeitem","data-ownedby":Gl(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":Ji(f.disabled),"data-disabled":j(f.disabled),"data-loading":j(f.loading),"aria-busy":Ji(f.loading),style:{"--depth":f.depth}})},getBranchIndicatorProps(v){const f=g(v);return t.element({...je.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({...je.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({...je.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":Ji(f.loading),onFocus(y){r({type:"NODE.FOCUS",id:f.value}),y.stopPropagation()},onClick(y){if(f.disabled||f.loading||!Mr(y)||jo(y.currentTarget)&&_n(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({...je.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({...je.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({...je.branchIndentGuide.attrs,"data-depth":f.depth})},getNodeCheckboxProps(v){const f=g(v),y=f.checked;return t.element({...je.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||!Mr(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({...je.nodeRenameInput.attrs,id:jv(o,f.value),type:"text","aria-label":"Rename tree item",hidden:!f.renaming,onKeyDown(y){wc(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 lr(e,t){const{context:n,prop:o,refs:i}=e;if(!o("loadChildren")){n.set("expandedValue",g=>Bt(sn(g,...t)));return}const a=n.get("loadingStatus"),[r,s]=Nu(t,g=>a[g]==="loaded");if(r.length>0&&n.set("expandedValue",g=>Bt(sn(g,...r))),s.length===0)return;const l=o("collection"),[c,d]=Nu(s,g=>{const v=l.findNode(g);return l.getNodeChildren(v).length>0});if(c.length>0&&n.set("expandedValue",g=>Bt(sn(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");Ad(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 S=o("collection");g.forEach((k,O)=>{const{id:_,indexPath:E,node:I,valuePath:$}=h[O];k.status==="fulfilled"?(w[_]="loaded",y.push(_),S=S.replace(E,{...I,children:k.value})):(u.delete(_),Reflect.deleteProperty(w,_),x.push({node:I,error:k.reason,indexPath:E,valuePath:$}))}),n.set("loadingStatus",w),y.length&&(n.set("expandedValue",k=>Bt(sn(k,...y))),(v=o("onLoadChildrenComplete"))==null||v({collection:S})),x.length&&((f=o("onLoadChildrenError"))==null||f({nodes:x}))})}function $n(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:Dt}=Ye(),L$={props({props:e}){return{selectionMode:"single",collection:zv.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:Be,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:Be,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:Be,onChange(o){var i;(i=e("onCheckedChange"))==null||i({checkedValue:o})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:{...pn.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:$n({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:Dt("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:Dt("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Dt("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:Dt("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Dt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Dt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Dt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Dt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Dt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Dt("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&&Jo(n)?o.concat(...n):[Jo(n)?Js(n):n].filter(Boolean))},deselectNode({context:e,event:t}){const n=Fr(t.id||t.value);e.set("selectedValue",o=>xo(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;lr(e,[t.id])},expandBranches(e){const{context:t,event:n}=e,o=Fr(n.value);lr(e,Il(o,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>xo(n,t.id))},collapseBranches(e){const{context:t,event:n}=e,o=Fr(n.value);t.set("expandedValue",i=>xo(i,...o))},setExpanded({context:e,event:t}){Jo(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){Jo(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);kt(t,i)},focusTreeLastNode(e){const{prop:t,scope:n}=e,o=t("collection"),i=o.getLastNode(void 0,{skip:$n(e)}),a=o.getNodeValue(i);kt(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);kt(n,r)},focusTreeNextNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getNextNode(t.id,{skip:$n(e)});if(!a)return;const r=i.getNodeValue(a);kt(o,r)},focusTreePrevNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getPreviousNode(t.id,{skip:$n(e)});if(!a)return;const r=i.getNodeValue(a);kt(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;kt(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=pn(s,{state:o.get("typeaheadState"),activeId:t.get("focusedValue"),key:i.key});kt(a,l?.id)},toggleNodeSelection({context:e,event:t}){const n=_o(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){const{context:t,prop:n}=e,o=n("collection").getBranchValues(),i=Il(o,t.get("expandedValue"));lr(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=Il(r,t.get("expandedValue"));lr(e,s)},extendSelectionToNode(e){const{context:t,event:n,prop:o,computed:i}=e,a=o("collection"),r=ti(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",Bt(l))},extendSelectionToNextNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getNextNode(n.id,{skip:$n(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:$n(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=ti(t.get("selectedValue")),a=[];o.visit({skip:$n(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=ti(t.get("selectedValue")),a=[];let r=!1;o.visit({skip:$n(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?R$(o,t.value,i):_o(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),kt(o,a);return}(i=n("onRenameComplete"))==null||i({value:a,label:s,indexPath:r}),e.set("renamingValue",null),kt(o,a)},cancelRenaming({context:e,scope:t}){const n=e.get("renamingValue");e.set("renamingValue",null),n&&kt(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=cp(t,o);Et(s,r)},focusRenameInput({context:e,scope:t}){const n=e.get("renamingValue");if(!n)return;const o=cp(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 Gv=(e,t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=A(()=>{const s=Le(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Po(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=Ut(L$,a);return A(()=>A$(r,bn))},Uv=M({__name:"tree-view-root",props:qn({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=Gv(n,t);return Lv(o),fi(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),K(),(i,a)=>(C(),T(b(X).div,W(b(o).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Yv=M({__name:"tree-view-tree",props:{asChild:{type:Boolean}},setup(e){const t=ze();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getTreeProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),wn=Object.freeze(Object.defineProperty({__proto__:null,Branch:_$,BranchContent:m$,BranchControl:v$,BranchIndentGuide:b$,BranchIndicator:y$,BranchText:x$,BranchTrigger:w$,Context:S$,Item:O$,ItemIndicator:k$,ItemText:E$,Label:$$,NodeCheckbox:I$,NodeCheckboxIndicator:T$,NodeContext:V$,NodeProvider:Nv,NodeRenameInput:P$,Root:Uv,RootProvider:D$,Tree:Yv},Symbol.toStringTag,{value:"Module"}));var qv=ie("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText");qv.build();var Kv=e=>new Vo(e);Kv.empty=()=>new Vo({items:[]});var N$=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},B$=(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}`},dp=e=>e.getById(N$(e)),up=(e,t)=>e.getById(B$(e,t)),{guards:z$,createMachine:H$}=nl(),{or:j$}=z$;H$({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:Kv.empty(),orientation:"vertical",selectionMode:"single",...e}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Be,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:{...pn.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 o_(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:j$("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 zd({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||FC()!=="keyboard")return;const r=dp(n),s=t("scrollToIndexFn");if(s){const c=t("collection").indexOf(a);s?.({index:c,immediate:i,getElement(){return up(n,a)}});return}const l=up(n,a);ma(l,{rootEl:r,block:"nearest"})};return J(()=>o(!0)),Ta(()=>dp(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);Fi(r,s,t("onSelect")),e.set("value",Array.from(s))}else{const s=r.select(a,i,n.metaKey);Fi(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);Fi(i,r,t("onSelect")),e.set("value",Array.from(r));return}if(t("selectOnHighlight")){const r=i.replaceSelection(a,n.value);Fi(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);Fi(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 W$=(e,t)=>{const n=new Set(e);for(const o of t)n.delete(o);return n};function Fi(e,t,n){const o=W$(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"]);qv.extendWith("empty");var G$=ie("marquee").parts("root","viewport","content","edge","item");G$.build();Y()(["autoFill","defaultPaused","delay","dir","getRootNode","id","ids","loopCount","onComplete","onLoopComplete","onPauseChange","paused","pauseOnInteraction","reverse","side","spacing","speed","translations"]);var Xv=ie("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem");Xv.build();var Zv=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`menu:${e.id}:trigger`},U$=e=>{var t;return((t=e.ids)==null?void 0:t.contextTrigger)??`menu:${e.id}:ctx-trigger`},Jv=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`menu:${e.id}:content`},Y$=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`menu:${e.id}:popper`},Uc=(e,t)=>`${e.id}/${t}`,eo=e=>e?.dataset.value??null,Pn=e=>e.getById(Jv(e)),hp=e=>e.getById(Y$(e)),cr=e=>e.getById(Zv(e)),q$=(e,t)=>t?e.getById(Uc(e,t)):null,Ul=e=>e.getById(U$(e)),Aa=e=>{const t=`[role^="menuitem"][data-ownedby=${CSS.escape(Jv(e))}]:not([data-disabled])`;return Hn(Pn(e),t)},K$=e=>ti(Aa(e)),X$=e=>Js(Aa(e)),pu=(e,t)=>t?e.id===t||e.dataset.value===t:!1,Z$=(e,t)=>{const n=Aa(e),o=n.findIndex(i=>pu(i,t.value));return Z0(n,o,{loop:t.loop??t.loopFocus})},J$=(e,t)=>{const n=Aa(e),o=n.findIndex(i=>pu(i,t.value));return J0(n,o,{loop:t.loop??t.loopFocus})},Q$=(e,t)=>{const n=Aa(e),o=n.find(i=>pu(i,t.value));return pn(n,{state:t.typeaheadState,key:t.key,activeId:o?.id??null})},eI=e=>{var t;return!!((t=e?.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("aria-controls"))},tI="menu:select";function nI(e,t){if(!e)return;const n=_e(e),o=new n.CustomEvent(tI,{detail:{value:t}});e.dispatchEvent(o)}var{not:ft,and:Ao,or:oI}=Ye();ft("isSubmenu"),oI("isOpenAutoFocusEvent","isArrowDownEvent"),Ao(ft("isTriggerItem"),"isOpenControlled"),ft("isTriggerItem"),Ao("isSubmenu","isOpenControlled"),ft("isPointerSuspended"),Ao(ft("isPointerSuspended"),ft("isTriggerItem")),Ao(ft("isTriggerItemHighlighted"),ft("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),Ao(ft("isTriggerItemHighlighted"),ft("isHighlightedItemEditable"),"closeOnSelect"),Ao(ft("isTriggerItemHighlighted"),ft("isHighlightedItemEditable"));function pp(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function iI(e,t){return e?G1(e,t):!1}function aI(e,t,n){const o=Object.keys(e).length>0;if(!t)return null;if(!o)return Uc(n,t);for(const i in e){const a=e[i],r=Zv(a.scope);if(r===t)return r}return Uc(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 Yl=new Map,Yc=!1;try{Yc=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Os=!1;try{Os=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Qv={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let rI=class{format(t){let n="";if(!Yc&&this.options.signDisplay!=null?n=lI(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Os){var o;let{unit:i,unitDisplay:a="short",locale:r}=this.resolvedOptions();if(!i)return n;let s=(o=Qv[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!Yc&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Os&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=sI(t,n),this.options=n}};function sI(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Os){var o;let{unit:r,unitDisplay:s="short"}=t;if(!r)throw new Error('unit option must be provided with style: "unit"');if(!(!((o=Qv[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(Yl.has(i))return Yl.get(i);let a=new Intl.NumberFormat(e,t);return Yl.set(i,a),a}function lI(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 cI=new RegExp("^.*\\(.*\\).*$"),dI=["latn","arab","hanidec","deva","beng","fullwide"];let eb=class{parse(t){return ql(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,o){return ql(this.locale,this.options,t).isValidPartialNumber(t,n,o)}getNumberingSystem(t){return ql(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}};const gp=new Map;function ql(e,t,n){let o=fp(e,t);if(!e.includes("-nu-")&&!o.isValidPartialNumber(n)){for(let i of dI)if(i!==o.options.numberingSystem){let a=fp(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return o}function fp(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():""),o=gp.get(n);return o||(o=new uI(e,t),gp.set(n,o)),o}let uI=class{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=Lo(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 eb(this.locale,r).parse(new rI(this.locale,r).format(o))}return this.options.currencySign==="accounting"&&cI.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=Lo(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=Lo(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=Lo(t," ",this.symbols.group),t=Lo(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=Lo(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=pI(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 mp=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),hI=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function pI(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=hI.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(_=>!mp.has(_.type)).map(_=>vp(_.value)),y=h.flatMap(_=>_.filter(E=>!mp.has(E.type)).map(E=>vp(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"),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),k=new Map(S.map((_,E)=>[_,E])),O=new RegExp(`[${S.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:g,group:v,literals:w,numeral:O,index:_=>String(k.get(_))}}function Lo(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function vp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var gI=ie("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber");gI.build();var fI=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`number-input:${e.id}:input`},mI=e=>{var t;return((t=e.ids)==null?void 0:t.incrementTrigger)??`number-input:${e.id}:inc`},vI=e=>{var t;return((t=e.ids)==null?void 0:t.decrementTrigger)??`number-input:${e.id}:dec`},tb=e=>`number-input:${e.id}:cursor`,dr=e=>e.getById(fI(e)),bI=e=>e.getById(mI(e)),yI=e=>e.getById(vI(e)),nb=e=>e.getDoc().getElementById(tb(e)),xI=(e,t)=>{let n=null;return t==="increment"&&(n=bI(e)),t==="decrement"&&(n=yI(e)),n},wI=(e,t)=>{if(!Nf())return SI(e,t),()=>{var n;(n=nb(e))==null||n.remove()}},CI=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")}},_I=(e,t)=>{const{point:n,isRtl:o,event:i}=t,a=e.getWin(),r=Tl(i.movementX,a.devicePixelRatio),s=Tl(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=Tl(7.5,a.devicePixelRatio);return c.x=pw(c.x+h,d)-h,{hint:l,point:c}},SI=(e,t)=>{const n=e.getDoc(),o=n.createElement("div");o.className="scrubber--cursor",o.id=tb(e),Object.assign(o.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:Df,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)">
|
|
5
5
|
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z" style="stroke-width: 2px; stroke: white;"></path>
|
|
6
6
|
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z"></path>
|
|
7
7
|
</g>
|
|
8
|
-
</svg>`,n.body.appendChild(o)};function SI(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){const o=e.value.length;e.setSelectionRange(o,o);return}try{const o=e.value,{start:i,end:a,value:r}=t;if(o===r){e.setSelectionRange(i,a);return}const s=bp(r,o,i),l=i===a?s:bp(r,o,a),c=Math.max(0,Math.min(s,o.length)),d=Math.max(c,Math.min(l,o.length));e.setSelectionRange(c,d)}catch{const o=e.value.length;e.setSelectionRange(o,o)}}}function bp(e,t,n){const o=e.slice(0,n),i=e.slice(n);let a=0;const r=Math.min(o.length,t.length);for(let c=0;c<r&&o[c]===t[c];c++)a=c+1;let s=0;const l=Math.min(i.length,t.length-a);for(let c=0;c<l;c++){const d=i.length-1-c,h=t.length-1-c;if(i[d]===t[h])s=c+1;else break}if(a>=o.length)return a;if(s>=i.length)return t.length-s;if(a>0)return a;if(s>0)return t.length-s;if(e.length>0){const c=n/e.length;return Math.round(c*t.length)}return t.length}var kI=(e,t={})=>new Intl.NumberFormat(e,t),EI=(e,t={})=>new eb(e,t),Kl=(e,t)=>{const{prop:n,computed:o}=t;return n("formatOptions")?e===""?Number.NaN:o("parser").parse(e):parseFloat(e)},to=(e,t)=>{const{prop:n,computed:o}=t;return Number.isNaN(e)?"":n("formatOptions")?o("formatter").format(e):e.toString()},OI=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:$I,guards:II,createMachine:TI}=nl(),{not:yp,and:xp}=II;TI({props({props:e}){const t=OI(e.step,e.formatOptions);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,translations:{incrementLabel:"increment value",decrementLabel:"decrease value",...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(o){var i;const a=n(),r=Kl(o,{computed:a,prop:e});(i=e("onValueChange"))==null||i({value:o,valueAsNumber:r})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(o){return o?`x:${o.x}, y:${o.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Kl(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>to(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>gw(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>pw(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!dm(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>{var n,o;return(o=(n=e("translations")).valueText)==null?void 0:o.call(n,t.get("value"))},formatter:Ec(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>kI(e,t)),parser:Ec(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>EI(e,t))},watch({track:e,action:t,context:n,computed:o,prop:i}){e([()=>n.get("value"),()=>i("locale")],()=>{t(["syncInputElement"])}),e([()=>o("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:xp("clampValueOnBlur",yp("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur"]},{guard:yp("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:$I([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:xp("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){const t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){const t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){const n=dr(t);return $a(n,{onFieldsetDisabledChange(o){e.set("fieldsetDisabled",o)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){const n=e.get("scrubberCursorPoint");return xI(t,n)},preventTextSelection({scope:e}){return wI(e)},trackButtonDisabled({context:e,scope:t,send:n}){const o=e.get("hint"),i=yI(t,o);return Ta(i,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){const o=dr(e);if(!o||!e.isActiveElement(o)||!n("allowMouseWheel"))return;function i(a){a.preventDefault();const r=Math.sign(a.deltaY)*-1;r===1?t({type:"VALUE.INCREMENT"}):r===-1&&t({type:"VALUE.DECREMENT"})}return se(o,"wheel",i,{passive:!1})},activatePointerLock({scope:e}){if(!Nf())return P0(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:o}){const i=e.getDoc();function a(s){const l=n.get("scrubberCursorPoint"),c=o("isRtl"),d=CI(e,{point:l,isRtl:c,event:s});d.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:d.hint,point:d.point})}function r(){t({type:"SCRUBBER.POINTER_UP"})}return va(se(i,"mousemove",a,!1),se(i,"mouseup",r,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;const n=dr(e);e.isActiveElement(n)||J(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:o}){let i=bw(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=Fe(i,n("min"),n("max"))),e.set("value",to(i,{computed:o,prop:n}))},decrement({context:e,event:t,prop:n,computed:o}){let i=yw(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=Fe(i,n("min"),n("max"))),e.set("value",to(i,{computed:o,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){const o=Fe(n("valueAsNumber"),t("min"),t("max"));e.set("value",to(o,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:o}){let i=Kl(t.value,{computed:o,prop:n});n("allowOverflow")||(i=Fe(i,n("min"),n("max"))),e.set("value",to(i,{computed:o,prop:n}))},setValue({context:e,event:t}){var n;const o=((n=t.target)==null?void 0:n.value)??t.value;e.set("value",o)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){const o=to(t("max"),{computed:n,prop:t});e.set("value",o)},decrementToMin({context:e,prop:t,computed:n}){const o=to(t("min"),{computed:n,prop:t});e.set("value",o)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){var o;if(n.type==="INPUT.CHANGE")return;const i=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";(o=t("onValueInvalid"))==null||o({reason:i,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:o}){const i=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),a=dr(o),r=t.selection;J(()=>{Et(a,i),SI(a,r,o)})},setFormattedValue({context:e,computed:t}){e.set("value",t("formattedValue"))},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){const n=nb(t),o=e.get("scrubberCursorPoint");!n||!o||(n.style.transform=`translate3d(${o.x}px, ${o.y}px, 0px)`)}}}});Y()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]);var PI=ie("pagination").parts("root","item","ellipsis","prevTrigger","nextTrigger");PI.build();Y()(["count","dir","getRootNode","id","ids","onPageChange","onPageSizeChange","page","defaultPage","pageSize","defaultPageSize","siblingCount","translations","type","getPageUrl"]);Y()(["value","type"]);Y()(["index"]);var VI=ie("password-input").parts("root","input","label","control","indicator","visibilityTrigger");VI.build();Y()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]);var DI=ie("pinInput").parts("root","label","input","control");DI.build();Y()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]);var ob=ie("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger");ob.build();Y()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);var MI=ie("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange");MI.build();Y()(["dir","getRootNode","id","ids","max","min","orientation","translations","value","onValueChange","defaultValue","formatOptions","locale"]);var RI=ie("qr-code").parts("root","frame","pattern","overlay","downloadTrigger");RI.build();Y()(["ids","defaultValue","value","id","encoding","dir","getRootNode","onValueChange","pixelSize"]);var gu=ie("radio-group").parts("root","label","item","itemText","itemControl","indicator");gu.build();Y()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);Y()(["value","disabled","invalid"]);var FI=ie("rating-group").parts("root","label","item","control");FI.build();Y()(["allowHalf","autoFocus","count","dir","disabled","form","getRootNode","id","ids","name","onHoverChange","onValueChange","required","readOnly","translations","value","defaultValue"]);Y()(["index"]);var AI=ie("scroll-area").parts("root","viewport","content","scrollbar","thumb","corner");AI.build();Y()(["dir","getRootNode","ids","id"]);const LI=gu.rename("segment-group");LI.build();const[ib,He]=we("SelectContext"),NI=M({__name:"select-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),BI=M({__name:"select-content",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=_m(),o=A(()=>tl(t.value.getContentProps(),n.value.presenceProps));return K(),(i,a)=>b(n).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},o.value,{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),zI=M({__name:"select-context",setup(e){const t=He();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),HI=M({__name:"select-control",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getControlProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),jI={key:0,value:""},WI=["value","disabled"],GI=M({__name:"select-hidden-select",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=mi();return K(),(o,i)=>{var a;return C(),T(b(X).select,W({"aria-describedby":(a=b(n))==null?void 0:a.ariaDescribedby},b(t).getHiddenSelectProps()),{default:P(()=>[b(t).value.length===0?(C(),H("option",jI)):Q("",!0),(C(!0),H(Ce,null,Ge(b(t).collection.items,r=>(C(),H("option",{key:r.value,value:b(t).collection.getItemValue(r),disabled:b(t).collection.getItemDisabled(r)},oe(b(t).collection.stringifyItem(r))+" > ",9,WI))),128))]),_:1},16,["aria-describedby"])}}}),UI=M({__name:"select-indicator",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[YI,qI]=we("SelectItemContext"),KI=M({__name:"select-item-context",setup(e){const t=qI();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),[XI,ZI]=we("SelectItemGroupPropsContext"),JI=M({__name:"select-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=ZI();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemGroupLabelProps({htmlFor:b(n).id}),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),QI=M({__name:"select-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=He(),o=vn(),i=t.id??o;return XI({id:i}),K(),(a,r)=>(C(),T(b(X).div,W(b(n).getItemGroupProps({id:b(i)}),{"as-child":e.asChild}),{default:P(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),[eT,ab]=we("SelectItemPropsContext"),tT=M({__name:"select-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=ab();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),nT=M({__name:"select-item-text",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=ab();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getItemTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),oT=M({__name:"select-item",props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=He();return eT(t),YI(A(()=>n.value.getItemState(t))),K(),(o,i)=>(C(),T(b(X).div,W(b(n).getItemProps(t),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),iT=M({__name:"select-label",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).label,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),aT=M({__name:"select-list",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getListProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),rT=M({__name:"select-positioner",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=Nd(),o=wm(A(()=>({...n.value,present:t.value.open})));return Cm(o),K(),(i,a)=>b(o).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getPositionerProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),sT=M({__name:"select-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return ib(n),fi(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var rb=ie("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),We=rb.build(),sb=e=>new Vo(e);sb.empty=()=>new Vo({items:[]});var lT=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`select:${e.id}`},qc=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},Kc=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`select:${e.id}:trigger`},lb=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`select:${e.id}:clear-trigger`},ur=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`select:${e.id}:label`},cT=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`select:${e.id}:control`},Xc=(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}`},Zc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenSelect)??`select:${e.id}:select`},cb=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`select:${e.id}:positioner`},dT=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:o.call(n,t))??`select:${e.id}:optgroup:${t}`},wp=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:o.call(n,t))??`select:${e.id}:optgroup-label:${t}`},Xl=e=>e.getById(Zc(e)),Ai=e=>e.getById(qc(e)),mo=e=>e.getById(Kc(e)),uT=e=>e.getById(lb(e)),Cp=e=>e.getById(cb(e)),Zl=(e,t)=>t==null?null:e.getById(Xc(e,t));function hT(e,t){const{context:n,prop:o,scope:i,state:a,computed:r,send:s}=e,l=o("disabled")||n.get("fieldsetDisabled"),c=!!o("invalid"),d=!!o("required"),h=!!o("readOnly"),u=o("composite"),p=o("collection"),m=a.hasTag("open"),g=a.matches("focused"),v=n.get("highlightedValue"),f=n.get("highlightedItem"),y=n.get("selectedItems"),x=n.get("currentPlacement"),w=r("isTypingAhead"),S=r("isInteractive"),k=v?Xc(i,v):void 0;function O(E){const I=p.getItemDisabled(E.item),$=p.getItemValue(E.item);return Ad($,()=>`[zag-js] No value found for item ${JSON.stringify(E.item)}`),{value:$,disabled:!!(l||I),highlighted:v===$,selected:n.get("value").includes($)}}const _=ev({...o("positioning"),placement:x});return{open:m,focused:g,empty:n.get("value").length===0,highlightedItem:f,highlightedValue:v,selectedItems:y,hasSelectedItems:r("hasSelectedItems"),value:n.get("value"),valueAsString:r("valueAsString"),collection:p,multiple:!!o("multiple"),disabled:!!l,reposition(E={}){s({type:"POSITIONING.SET",options:E})},focus(){var E;(E=mo(i))==null||E.focus({preventScroll:!0})},setOpen(E){a.hasTag("open")!==E&&s({type:E?"OPEN":"CLOSE"})},selectValue(E){s({type:"ITEM.SELECT",value:E})},setValue(E){s({type:"VALUE.SET",value:E})},selectAll(){s({type:"VALUE.SET",value:p.getValues()})},setHighlightValue(E){s({type:"HIGHLIGHTED_VALUE.SET",value:E})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(E){s(E?{type:"ITEM.CLEAR",value:E}:{type:"VALUE.CLEAR"})},getItemState:O,getRootProps(){return t.element({...We.root.attrs,dir:o("dir"),id:lT(i),"data-invalid":j(c),"data-readonly":j(h)})},getLabelProps(){return t.label({dir:o("dir"),id:ur(i),...We.label.attrs,"data-disabled":j(l),"data-invalid":j(c),"data-readonly":j(h),"data-required":j(d),htmlFor:Zc(i),onClick(E){var I;E.defaultPrevented||l||(I=mo(i))==null||I.focus({preventScroll:!0})}})},getControlProps(){return t.element({...We.control.attrs,dir:o("dir"),id:cT(i),"data-state":m?"open":"closed","data-focus":j(g),"data-disabled":j(l),"data-invalid":j(c)})},getValueTextProps(){return t.element({...We.valueText.attrs,dir:o("dir"),"data-disabled":j(l),"data-invalid":j(c),"data-focus":j(g)})},getTriggerProps(){return t.button({id:Kc(i),disabled:l,dir:o("dir"),type:"button",role:"combobox","aria-controls":qc(i),"aria-expanded":m,"aria-haspopup":"listbox","data-state":m?"open":"closed","aria-invalid":c,"aria-required":d,"aria-labelledby":ur(i),...We.trigger.attrs,"data-disabled":j(l),"data-invalid":j(c),"data-readonly":j(h),"data-placement":x,"data-placeholder-shown":j(!r("hasSelectedItems")),onClick(E){S&&(E.defaultPrevented||s({type:"TRIGGER.CLICK"}))},onFocus(){s({type:"TRIGGER.FOCUS"})},onBlur(){s({type:"TRIGGER.BLUR"})},onKeyDown(E){if(E.defaultPrevented||!S)return;const I={ArrowUp(){s({type:"TRIGGER.ARROW_UP"})},ArrowDown($){s({type:$.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){s({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){s({type:"TRIGGER.ARROW_RIGHT"})},Home(){s({type:"TRIGGER.HOME"})},End(){s({type:"TRIGGER.END"})},Enter(){s({type:"TRIGGER.ENTER"})},Space($){s(w?{type:"TRIGGER.TYPEAHEAD",key:$.key}:{type:"TRIGGER.ENTER"})}}[Cc(E,{dir:o("dir"),orientation:"vertical"})];if(I){I(E),E.preventDefault();return}pn.isValidEvent(E)&&(s({type:"TRIGGER.TYPEAHEAD",key:E.key}),E.preventDefault())}})},getIndicatorProps(){return t.element({...We.indicator.attrs,dir:o("dir"),"aria-hidden":!0,"data-state":m?"open":"closed","data-disabled":j(l),"data-invalid":j(c),"data-readonly":j(h)})},getItemProps(E){const I=O(E);return t.element({id:Xc(i,I.value),role:"option",...We.item.attrs,dir:o("dir"),"data-value":I.value,"aria-selected":I.selected,"data-state":I.selected?"checked":"unchecked","data-highlighted":j(I.highlighted),"data-disabled":j(I.disabled),"aria-disabled":Ji(I.disabled),onPointerMove($){I.disabled||$.pointerType!=="mouse"||I.value!==v&&s({type:"ITEM.POINTER_MOVE",value:I.value})},onClick($){$.defaultPrevented||I.disabled||s({type:"ITEM.CLICK",src:"pointerup",value:I.value})},onPointerLeave($){var R;I.disabled||E.persistFocus||$.pointerType!=="mouse"||!((R=e.event.previous())!=null&&R.type.includes("POINTER"))||s({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(E){const I=O(E);return t.element({...We.itemText.attrs,"data-state":I.selected?"checked":"unchecked","data-disabled":j(I.disabled),"data-highlighted":j(I.highlighted)})},getItemIndicatorProps(E){const I=O(E);return t.element({"aria-hidden":!0,...We.itemIndicator.attrs,"data-state":I.selected?"checked":"unchecked",hidden:!I.selected})},getItemGroupLabelProps(E){const{htmlFor:I}=E;return t.element({...We.itemGroupLabel.attrs,id:wp(i,I),dir:o("dir"),role:"presentation"})},getItemGroupProps(E){const{id:I}=E;return t.element({...We.itemGroup.attrs,"data-disabled":j(l),id:dT(i,I),"aria-labelledby":wp(i,I),role:"group",dir:o("dir")})},getClearTriggerProps(){return t.button({...We.clearTrigger.attrs,id:lb(i),type:"button","aria-label":"Clear value","data-invalid":j(c),disabled:l,hidden:!r("hasSelectedItems"),dir:o("dir"),onClick(E){E.defaultPrevented||s({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const E=n.get("value"),I=o("multiple")?E:E?.[0];return t.select({name:o("name"),form:o("form"),disabled:l,multiple:o("multiple"),required:o("required"),"aria-hidden":!0,id:Zc(i),defaultValue:I,style:Fd,tabIndex:-1,onFocus(){var $;($=mo(i))==null||$.focus({preventScroll:!0})},"aria-labelledby":ur(i)})},getPositionerProps(){return t.element({...We.positioner.attrs,dir:o("dir"),id:cb(i),style:_.floating})},getContentProps(){return t.element({hidden:!m,dir:o("dir"),id:qc(i),role:u?"listbox":"dialog",...We.content.attrs,"data-state":m?"open":"closed","data-placement":x,"data-activedescendant":k,"aria-activedescendant":u?k:void 0,"aria-multiselectable":o("multiple")&&u?!0:void 0,"aria-labelledby":ur(i),tabIndex:0,onKeyDown(E){if(!S||!Ue(E.currentTarget,xe(E)))return;if(E.key==="Tab"&&!_0(E)){E.preventDefault();return}const I={ArrowUp(){s({type:"CONTENT.ARROW_UP"})},ArrowDown(){s({type:"CONTENT.ARROW_DOWN"})},Home(){s({type:"CONTENT.HOME"})},End(){s({type:"CONTENT.END"})},Enter(){s({type:"ITEM.CLICK",src:"keydown.enter"})},Space(q){var V;w?s({type:"CONTENT.TYPEAHEAD",key:q.key}):(V=I.Enter)==null||V.call(I,q)}},$=I[Cc(E)];if($){$(E),E.preventDefault();return}const R=xe(E);Us(R)||pn.isValidEvent(E)&&(s({type:"CONTENT.TYPEAHEAD",key:E.key}),E.preventDefault())}})},getListProps(){return t.element({...We.list.attrs,tabIndex:0,role:u?void 0:"listbox","aria-labelledby":Kc(i),"aria-activedescendant":u?void 0:k,"aria-multiselectable":!u&&o("multiple")?!0:void 0})}}}var{and:Li,not:no,or:pT}=Ye(),gT={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??sb.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},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"),onChange(n){var o;(o=e("onHighlightChange"))==null||o({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{const n=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:{...pn.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:o}){n([()=>e.get("value").toString()],()=>{o(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{o(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{o(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:pT("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Li(no("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:no("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Li(no("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:no("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:no("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:no("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:no("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Li("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Li("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Li("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>_p(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.CLICK"},isTriggerEnterEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ENTER"},isTriggerArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_UP"},isTriggerArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_DOWN"}},effects:{trackFormControlState({context:e,scope:t}){return $a(Xl(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){const n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){const o=()=>Ai(e);let i=!0;return vi(o,{type:"listbox",defer:!0,exclude:[mo(e),uT(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(a){var r;(r=n("onInteractOutside"))==null||r(a),i=!(a.detail.focusable||a.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){const o=t("positioning");return e.set("currentPlacement",o.placement),lt(()=>mo(n),()=>Cp(n),{defer:!0,...o,onComplete(i){e.set("currentPlacement",i.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=a=>{const r=e.get("highlightedValue");if(r==null||o.current().type.includes("POINTER"))return;const s=Ai(n),l=t("scrollToIndexFn");if(l){const d=t("collection").indexOf(r);l?.({index:d,immediate:a,getElement:()=>Zl(n,r)});return}const c=Zl(n,r);ma(c,{rootEl:s,block:"nearest"})};return J(()=>i(!0)),Ta(()=>Ai(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:o}){const i=()=>Cp(n);lt(mo(n),i,{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const o=t("collection").getPreviousValue(n,1,t("loopFocus"));o!=null&&e.set("highlightedValue",o)},highlightNextItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const o=t("collection").getNextValue(n,1,t("loopFocus"));o!=null&&e.set("highlightedValue",o)},highlightFirstItem({context:e,prop:t}){const n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){const n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){J(()=>{const t=Id({root:Ai(e)});t?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){_p(e)&&J(()=>{const n=mo(t);n?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){var o;let i=n.value??e.get("highlightedValue");i==null||!t("collection").has(i)||((o=t("onSelect"))==null||o({value:i}),i=t("deselectable")&&!t("multiple")&&e.get("value").includes(i)?null:i,e.set("value",a=>i==null?[]:t("multiple")?_o(a,i):[i]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){const o=t("collection"),i=n("hasSelectedItems")?o.sort(e.get("value"))[0]:o.firstValue;e.set("highlightedValue",i)},highlightComputedLastItem({context:e,prop:t,computed:n}){const o=t("collection"),i=n("hasSelectedItems")?o.sort(e.get("value"))[0]:o.lastValue;e.set("highlightedValue",i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;const o=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",o)},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}){var o;(o=t("onSelect"))==null||o({value:n.value});const i=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",a=>i==null?[]:t("multiple")?_o(a,i):[i])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(o=>o!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){const[n]=e.get("value"),o=t("collection").getPreviousValue(n);o&&e.set("value",[o])},selectNextItem({context:e,prop:t}){const[n]=e.get("value"),o=t("collection").getNextValue(n);o&&e.set("value",[o])},selectFirstItem({context:e,prop:t}){const n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){const n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:o}){const i=t("collection").search(n.key,{state:o.get("typeahead"),currentValue:e.get("value")[0]});i!=null&&e.set("value",[i])},scrollContentToTop({prop:e,scope:t}){var n,o;if(e("scrollToIndexFn")){const i=e("collection").firstValue;(n=e("scrollToIndexFn"))==null||n({index:0,immediate:!0,getElement:()=>Zl(t,i)})}else(o=Ai(t))==null||o.scrollTo(0,0)},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},syncSelectElement({context:e,prop:t,scope:n}){const o=Xl(n);if(o){if(e.get("value").length===0&&!t("multiple")){o.selectedIndex=-1;return}for(const i of o.options)i.selected=e.get("value").includes(i.value)}},syncCollection({context:e,prop:t}){const n=t("collection"),o=n.find(e.get("highlightedValue"));o&&e.set("highlightedItem",o);const i=n.findMany(e.get("value"));e.set("selectedItems",i)},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)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{const t=Xl(e);if(!t)return;const n=e.getWin(),o=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(o)})}}}};function _p(e){var t;const n=e.restoreFocus??((t=e.previousEvent)==null?void 0:t.restoreFocus);return n==null||!!n}Y()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]);Y()(["item","persistFocus"]);Y()(["id"]);Y()(["htmlFor"]);const fT=(e,t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=mi(),r=A(()=>{const l=Ae(e);return{id:n,ids:{label:a?.value.ids.label,hiddenSelect:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,value:l.modelValue,getRootNode:o?.value.getRootNode,...Po(l),onValueChange:c=>{var d;t?.("valueChange",c),t?.("update:modelValue",c.value),(d=l.onValueChange)==null||d.call(l,c)},onHighlightChange:c=>{var d;t?.("highlightChange",c),t?.("update:highlightedValue",c.highlightedValue),(d=l.onHighlightChange)==null||d.call(l,c)},onOpenChange:c=>{var d;t?.("openChange",c),t?.("update:open",c.open),(d=l.onOpenChange)==null||d.call(l,c)},onFocusOutside:c=>{var d;t?.("focusOutside",c),(d=l.onFocusOutside)==null||d.call(l,c)},onInteractOutside:c=>{var d;t?.("interactOutside",c),(d=l.onInteractOutside)==null||d.call(l,c)},onPointerDownOutside:c=>{var d;t?.("pointerDownOutside",c),(d=l.onPointerDownOutside)==null||d.call(l,c)},onSelect(c){var d;t?.("select",c),(d=l.onSelect)==null||d.call(l,c)}}}),s=Ut(gT,r);return A(()=>hT(s,bn))},mT=M({__name:"select-root",props:qn({closeOnSelect:{type:Boolean},collection:{},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},loopFocus:{type:Boolean},modelValue:{},multiple:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,deselectable:void 0,disabled:void 0,invalid:void 0,loopFocus:void 0,multiple:void 0,open:void 0,readOnly:void 0,required:void 0}),emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,o=fT(n,t);return ib(o),fi(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),K(),(i,a)=>(C(),T(b(X).div,W(b(o).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),vT=M({__name:"select-trigger",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),bT=M({__name:"select-value-text",props:{placeholder:{},asChild:{type:Boolean}},setup(e){const t=e,n=He(),o=Bs();return K(),(i,a)=>(C(),T(b(X).span,W(b(n).getValueTextProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default",{},()=>{var r;return[Le(oe(((r=o.default)==null?void 0:r.call(o))||b(n).valueAsString||t.placeholder),1)]})]),_:3},16,["as-child"]))}}),tt=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:NI,Content:BI,Context:zI,Control:HI,HiddenSelect:GI,Indicator:UI,Item:oT,ItemContext:KI,ItemGroup:QI,ItemGroupLabel:JI,ItemIndicator:tT,ItemText:nT,Label:iT,List:aT,Positioner:rT,Root:mT,RootProvider:sT,Trigger:vT,ValueText:bT},Symbol.toStringTag,{value:"Module"}));var yT=ie("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label");yT.build();Y()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]);var xT=ie("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator");xT.build();Y()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);Y()(["index","name"]);Y()(["value"]);var db=ie("splitter").parts("root","panel","resizeTrigger");db.build();Y()(["dir","getRootNode","id","ids","onResize","onResizeStart","onResizeEnd","onCollapse","onExpand","orientation","size","defaultSize","panels","keyboardResizeBy","nonce"]);Y()(["id"]);Y()(["disabled","id"]);const[wT,gl]=we("StepsContext"),[CT,ub]=we("StepsItemPropsContext"),_T=M({__name:"steps-indicator",props:{asChild:{type:Boolean}},setup(e){const t=gl(),n=ub();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[ST]=we("StepsItemContext"),kT=M({__name:"steps-item",props:{index:{},asChild:{type:Boolean}},setup(e){const t=e,n=gl(),o=A(()=>n.value.getItemState(t));return CT(t),ST(o),K(),(i,a)=>(C(),T(b(X).div,W(b(n).getItemProps(t),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),ET=M({__name:"steps-list",props:{asChild:{type:Boolean}},setup(e){const t=gl();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getListProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),OT=M({__name:"steps-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return wT(n),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var $T=ie("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Mt=$T.build(),IT=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},TT=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Sp=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.triggerId)==null?void 0:o.call(n,t))??`steps:${e.id}:trigger:${t}`},PT=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.contentId)==null?void 0:o.call(n,t))??`steps:${e.id}:content:${t}`};function VT(e,t){const{context:n,send:o,computed:i,prop:a,scope:r}=e,s=n.get("step"),l=a("count"),c=i("percent"),d=i("hasNextStep"),h=i("hasPrevStep"),u=f=>({triggerId:Sp(r,f.index),contentId:PT(r,f.index),current:f.index===s,completed:f.index<s,incomplete:f.index>s,index:f.index,first:f.index===0,last:f.index===l-1}),p=()=>{o({type:"STEP.NEXT",src:"next.trigger.click"})},m=()=>{o({type:"STEP.PREV",src:"prev.trigger.click"})},g=()=>{o({type:"STEP.RESET",src:"reset.trigger.click"})},v=f=>{o({type:"STEP.SET",value:f,src:"api.setValue"})};return{value:s,count:l,percent:c,hasNextStep:d,hasPrevStep:h,isCompleted:i("completed"),goToNextStep:p,goToPrevStep:m,resetStep:g,getItemState:u,setStep:v,getRootProps(){return t.element({...Mt.root.attrs,id:IT(r),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${c}%`}})},getListProps(){const f=q0(l).map((y,x)=>Sp(r,x));return t.element({...Mt.list.attrs,dir:a("dir"),id:TT(r),role:"tablist","aria-owns":f.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(f){const y=u(f);return t.element({...Mt.item.attrs,dir:a("dir"),"aria-current":y.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(f){const y=u(f);return t.button({...Mt.trigger.attrs,id:y.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||y.current?0:-1,"aria-selected":y.current,"aria-controls":y.contentId,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"data-complete":j(y.completed),"data-current":j(y.current),"data-incomplete":j(y.incomplete),onClick(x){x.defaultPrevented||a("linear")||o({type:"STEP.SET",value:f.index,src:"trigger.click"})}})},getContentProps(f){const y=u(f);return t.element({...Mt.content.attrs,dir:a("dir"),id:y.contentId,role:"tabpanel",tabIndex:0,hidden:!y.current,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":y.triggerId})},getIndicatorProps(f){const y=u(f);return t.element({...Mt.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":j(y.completed),"data-current":j(y.current),"data-incomplete":j(y.incomplete)})},getSeparatorProps(f){const y=u(f);return t.element({...Mt.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":j(y.completed),"data-current":j(y.current),"data-incomplete":j(y.incomplete)})},getNextTriggerProps(){return t.button({...Mt.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!d,onClick(f){f.defaultPrevented||p()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...Mt.prevTrigger.attrs,type:"button",disabled:!h,onClick(f){f.defaultPrevented||m()}})},getProgressProps(){return t.element({dir:a("dir"),...Mt.progress.attrs,role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${c}% complete`,"data-complete":j(c===100)})}}}var DT={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(n){var o,i;(o=e("onStepChange"))==null||o({step:n}),n==e("count")&&((i=e("onStepComplete"))==null||i())}}))}},computed:{percent:Ec(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const n=Math.min(e.get("step")+1,t("count"));e.set("step",n)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){MT(t("count"),e.get("step"))}}}},MT=(e,t)=>{if(!dm(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};Y()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);function RT(e={},t){const n=yn(xn),o=Zn(Xn),i=vn(),a=A(()=>{var s;const l=Ae(e);return{id:i,dir:o.value.dir,getRootNode:(s=n?.value)==null?void 0:s.getRootNode,...Po(l),onStepChange:c=>{var d;(d=l.onStepChange)==null||d.call(l,c)},onStepComplete:()=>{var c;(c=l.onStepComplete)==null||c.call(l)}}}),r=Ut(DT,a);return A(()=>VT(r,bn))}const FT=M({__name:"steps-trigger",props:{asChild:{type:Boolean}},setup(e){const t=gl(),n=ub();return K(),(o,i)=>(C(),T(b(X).button,W(b(t).getTriggerProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var hb=ie("switch").parts("root","label","control","thumb");hb.build();Y()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);var pb=ie("tabs").parts("root","list","trigger","content","indicator");pb.build();Y()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]);Y()(["disabled","value"]);Y()(["value"]);var AT=ie("tagsInput").parts("root","label","control","input","clearTrigger","item","itemPreview","itemInput","itemText","itemDeleteTrigger");AT.build();var LT=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tags-input:${e.id}`},NT=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`tags-input:${e.id}:input`},BT=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`tags-input:${e.id}:hidden-input`},Jc=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`tags-input:${e.id}:tag:${t.value}:${t.index}`},zT=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemInput)==null?void 0:o.call(n,t))??`${Jc(e,t)}:input`},HT=e=>`${e}:input`,kp=(e,t)=>e.getById(HT(t)),jT=e=>Hn(gb(e),"[data-part=item]"),WT=(e,t)=>e.getById(zT(e,t)),gb=e=>e.getById(LT(e)),Ni=e=>e.getById(NT(e)),fb=e=>e.getById(BT(e)),$o=e=>Hn(gb(e),"[data-part=item-preview]:not([data-disabled])"),GT=e=>$o(e)[0],UT=e=>$o(e)[$o(e).length-1],YT=(e,t)=>Md($o(e),t,!1),qT=(e,t)=>Dd($o(e),t,!1),KT=(e,t)=>$o(e)[t],Bi=(e,t)=>Zs($o(e),t),XT=(e,t)=>{const n=fb(e);n&&Hf(n,{value:t})},{and:zi,not:oo,or:ZT}=Ye();zi(ZT(oo("isAtMax"),"allowOverflow"),oo("isInputValueEmpty")),oo("hasHighlightedTag"),zi("hasTags","isCaretAtStart"),zi("hasTags","isCaretAtStart"),zi("hasTags","isCaretAtStart",oo("isLastTagHighlighted")),oo("isCaretAtStart"),zi("isTagEditable","hasHighlightedTag"),oo("isCaretAtStart"),oo("isCaretAtStart");Y()(["addOnPaste","allowOverflow","autoFocus","blurBehavior","delimiter","dir","disabled","editable","form","getRootNode","id","ids","inputValue","invalid","max","maxLength","name","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onPointerDownOutside","onValueChange","onValueInvalid","required","readOnly","translations","validate","value","defaultValue","defaultInputValue"]);Y()(["index","disabled","value"]);var JT=ie("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator");JT.build();Y()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]);var mb=ie("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),Yo=mb.build(),QT=e=>`toast-group:${e}`,Ep=(e,t)=>e.getById(`toast-group:${t}`),vb=e=>`toast:${e.id}`,Op=e=>e.getById(vb(e)),$p=e=>`toast:${e.id}:title`,Ip=e=>`toast:${e.id}:description`,eP=e=>`toast${e.id}:close`,Tp={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function Jl(e,t){return e??Tp[t]??Tp.DEFAULT}var tP=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;function nP(e,t){var n;const{prop:o,computed:i,context:a}=e,{offsets:r,gap:s}=o("store").attrs,l=a.get("heights"),c=tP(r),d=o("dir")==="rtl",h=t.replace("-start",d?"-right":"-left").replace("-end",d?"-left":"-right"),u=h.includes("right"),p=h.includes("left"),m={position:"fixed",pointerEvents:i("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${s}px`,"--first-height":`${((n=l[0])==null?void 0:n.height)||0}px`,zIndex:Df};let g="center";if(u&&(g="flex-end"),p&&(g="flex-start"),m.alignItems=g,h.includes("top")){const v=c.top;m.top=`max(env(safe-area-inset-top, 0px), ${v})`}if(h.includes("bottom")){const v=c.bottom;m.bottom=`max(env(safe-area-inset-bottom, 0px), ${v})`}if(!h.includes("left")){const v=c.right;m.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${v})`}if(!h.includes("right")){const v=c.left;m.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${v})`}return m}function oP(e,t){const{prop:n,context:o,computed:i}=e,a=n("parent"),r=a.computed("placement"),{gap:s}=a.prop("store").attrs,[l]=r.split("-"),c=o.get("mounted"),d=o.get("remainingTime"),h=i("height"),u=i("frontmost"),p=!u,m=!n("stacked"),g=n("stacked"),v=n("type")==="loading"?Number.MAX_SAFE_INTEGER:d,f=i("heightIndex")*s+i("heightBefore"),y={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${v}ms`,"--initial-height":`${h}px`,"--offset":`${f}px`,"--index":n("index"),"--z-index":i("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},x=w=>Object.assign(y,w);return l==="top"?x({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&x({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(x({"--y":"0","--opacity":"1"}),g&&x({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||x({"--opacity":"0",pointerEvents:"none"}),p&&m&&(x({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||x({"--y":"calc(var(--sign) * 40%)"})),p&&g&&!t&&x({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),u&&!t&&x({"--y":"calc(var(--lift) * -100%)"}),y}function iP(e,t){const{computed:n}=e,o={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},i=a=>Object.assign(o,a);return n("frontmost")&&!t&&i({height:"calc(var(--initial-height) + 80%)"}),o}function aP(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function rP(e,t){const{context:n,prop:o,send:i,refs:a,computed:r}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(s={}){const{label:l="Notifications"}=s,{hotkey:c}=o("store").attrs,d=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=r("placement"),[u,p="center"]=h.split("-");return t.element({...Yo.group.attrs,dir:o("dir"),tabIndex:-1,"aria-label":`${h} ${l} ${d}`,id:QT(h),"data-placement":h,"data-side":u,"data-align":p,"aria-live":"polite",role:"region",style:nP(e,h),onMouseEnter(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:h})},onMouseMove(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:h})},onMouseLeave(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_LEAVE",placement:h})},onFocus(m){i({type:"REGION.FOCUS",target:m.relatedTarget})},onBlur(m){a.get("isFocusWithin")&&!Ue(m.currentTarget,m.relatedTarget)&&queueMicrotask(()=>i({type:"REGION.BLUR"}))}})},subscribe(s){return o("store").subscribe(()=>s(n.get("toasts")))}}}var{guards:sP,createMachine:lP}=nl(),{and:cP}=sP,dP=lP({props({props:e}){return{dir:"ltr",id:rm(),...e,store:e.store}},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:Yf.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:cP("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){return t("store").subscribe(n=>{if(n.dismiss){e.set("toasts",o=>o.filter(i=>i.id!==n.id));return}e.set("toasts",o=>{const i=o.findIndex(a=>a.id===n.id);return i!==-1?[...o.slice(0,i),{...o[i],...n},...o.slice(i+1)]:[n,...o]})})},trackHotKeyPress({prop:e,send:t}){return se(document,"keydown",n=>{const{hotkey:o}=e("store").attrs;o.every(i=>n[i]||n.code===i)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){const{pauseOnPageIdle:o}=e("store").attrs;if(!o)return;const i=n.getDoc();return se(i,"visibilitychange",()=>{const a=i.visibilityState==="hidden";t({type:a?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:o}){var i;const a=t.get("toasts"),r=n("placement"),s=a.length>0;if(!s){(i=e.get("dismissableCleanup"))==null||i();return}if(s&&e.get("dismissableCleanup"))return;const l=Em(()=>Ep(o,r),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){var t;(t=e.get("dismissableCleanup"))==null||t()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{var n;(n=Ep(e,t("placement")))==null||n.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(o=>o.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){var t;!e.get("lastFocusedEl")||e.get("isPointerWithin")||((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){var t;e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){var t;e.get("lastFocusedEl")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});function uP(e,t){const{state:n,send:o,prop:i,scope:a,context:r,computed:s}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),d=r.get("mounted"),h=s("frontmost"),u=i("parent").computed("placement"),p=i("type"),m=i("stacked"),g=i("title"),v=i("description"),f=i("action"),[y,x="center"]=u.split("-");return{type:p,title:g,description:v,placement:u,visible:l,paused:c,closable:!!i("closable"),pause(){o({type:"PAUSE"})},resume(){o({type:"RESUME"})},dismiss(){o({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element({...Yo.root.attrs,dir:i("dir"),id:vb(a),"data-state":l?"open":"closed","data-type":p,"data-placement":u,"data-align":x,"data-side":y,"data-mounted":j(d),"data-paused":j(c),"data-first":j(h),"data-sibling":j(!h),"data-stack":j(m),"data-overlap":j(!m),role:"status","aria-atomic":"true","aria-describedby":v?Ip(a):void 0,"aria-labelledby":g?$p(a):void 0,tabIndex:0,style:oP(e,l),onKeyDown(w){w.defaultPrevented||w.key=="Escape"&&(o({type:"DISMISS",src:"keyboard"}),w.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:iP(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:aP()})},getTitleProps(){return t.element({...Yo.title.attrs,id:$p(a)})},getDescriptionProps(){return t.element({...Yo.description.attrs,id:Ip(a)})},getActionTriggerProps(){return t.button({...Yo.actionTrigger.attrs,type:"button",onClick(w){var S;w.defaultPrevented||((S=f?.onClick)==null||S.call(f),o({type:"DISMISS",src:"user"}))}})},getCloseTriggerProps(){return t.button({id:eP(a),...Yo.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(w){w.defaultPrevented||o({type:"DISMISS",src:"user"})}})}}}var{not:hP}=Ye(),pP={props({props:e}){return Ld(e,["id","type","parent","removeDelay"],"toast"),{closable:!0,...e,duration:Jl(e.duration,e.type)}},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:Jl(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{const t=e("parent").context.get("toasts"),n=t.findIndex(o=>o.id===e("id"));return t.length-n},height:({prop:e})=>{const t=e("parent").context.get("heights").find(n=>n.id===e("id"));return t?.height??0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(t=>t.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{const t=e("parent").context.get("heights"),n=t.findIndex(o=>o.id===e("id"));return t.reduce((o,i,a)=>a>=n?o:o+i.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{const o=t("message");o&&n({type:o,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:hP("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return Pl(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return Pl(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return Pl(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return J(()=>{const o=Op(e);if(!o)return;const i=()=>{const s=o.style.height;o.style.height="auto";const l=o.getBoundingClientRect().height;o.style.height=s;const c={id:t("id"),height:l};Pp(t("parent"),c)},a=e.getWin(),r=new a.MutationObserver(i);r.observe(o,{childList:!0,subtree:!0,characterData:!0}),n=()=>r.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){J(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{const o=Op(e);if(!o)return;const i=o.style.height;o.style.height="auto";const a=o.getBoundingClientRect().height;o.style.height=i,n.set("initialHeight",a);const r={id:t("id"),height:a};Pp(t("parent"),r)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",Jl(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{const o=t.get("closeTimerStartTime"),i=Date.now()-o;return t.set("lastCloseStartTimerStartTime",Date.now()),n-i})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){var n;(n=e("onStatusChange"))==null||n({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"unmounted"})},invokeOnVisible({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"visible"})}}}};function Pp(e,t){const{id:n,height:o}=t;e.context.set("heights",i=>i.find(a=>a.id===n)?i.map(a=>a.id===n?{...a,height:o}:a):[{id:n,height:o},...i])}var gP=(e,t)=>({...t,...el(e)});function fP(e={}){const t=gP(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0});let n=[],o=[],i=new Set,a=[];const r=u=>(n.push(u),()=>{const p=n.indexOf(u);n.splice(p,1)}),s=u=>(n.forEach(p=>p(u)),u),l=u=>{if(o.length>=t.max){a.push(u);return}s(u),o.unshift(u)},c=()=>{for(;a.length>0&&o.length<t.max;){const u=a.shift();u&&(s(u),o.unshift(u))}},d=u=>{const p=u.id??`toast:${rm()}`,m=o.find(g=>g.id===p);return i.has(p)&&i.delete(p),m?o=o.map(g=>g.id===p?s({...g,...u,id:p}):g):l({id:p,duration:t.duration,removeDelay:t.removeDelay,type:"info",...u,stacked:!t.overlap,gap:t.gap}),p},h=u=>(i.add(u),u?(n.forEach(p=>p({id:u,dismiss:!0})),o=o.filter(p=>p.id!==u),c()):(o.forEach(p=>{n.forEach(m=>m({id:p.id,dismiss:!0}))}),o=[],a=[]),u);return{attrs:t,subscribe:r,create:d,update:(u,p)=>d({id:u,...p}),remove:h,dismiss:u=>{u!=null?o=o.map(p=>p.id===u?s({...p,message:"DISMISS"}):p):o=o.map(p=>s({...p,message:"DISMISS"}))},error:u=>d({...u,type:"error"}),success:u=>d({...u,type:"success"}),info:u=>d({...u,type:"info"}),warning:u=>d({...u,type:"warning"}),loading:u=>d({...u,type:"loading"}),getVisibleToasts:()=>o.filter(u=>!i.has(u.id)),getCount:()=>o.length,promise:(u,p,m={})=>{if(!p||!p.loading){gn("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}const g=d({...m,...p.loading,promise:u,type:"loading"});let v=!0,f;const y=Ha(u).then(async x=>{if(f=["resolve",x],mP(x)&&!x.ok){v=!1;const w=Ha(p.error,`HTTP Error! status: ${x.status}`);d({...m,...w,id:g,type:"error"})}else if(p.success!==void 0){v=!1;const w=Ha(p.success,x);d({...m,...w,id:g,type:"success"})}}).catch(async x=>{if(f=["reject",x],p.error!==void 0){v=!1;const w=Ha(p.error,x);d({...m,...w,id:g,type:"error"})}}).finally(()=>{var x;v&&h(g),(x=p.finally)==null||x.call(p)});return{id:g,unwrap:()=>new Promise((x,w)=>y.then(()=>f[0]==="reject"?w(f[1]):x(f[1])).catch(w))}},pause:u=>{u!=null?o=o.map(p=>p.id===u?s({...p,message:"PAUSE"}):p):o=o.map(p=>s({...p,message:"PAUSE"}))},resume:u=>{u!=null?o=o.map(p=>p.id===u?s({...p,message:"RESUME"}):p):o=o.map(p=>s({...p,message:"RESUME"}))},isVisible:u=>!i.has(u)&&!!o.find(p=>p.id===u),isDismissed:u=>i.has(u),expand:()=>{o=o.map(u=>s({...u,stacked:!0}))},collapse:()=>{o=o.map(u=>s({...u,stacked:!1}))}}}var mP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Vp={connect:rP,machine:dP};const vP=e=>fP(e),[bP,bb]=we("ToastContext"),yP=M({__name:"toast-root",props:{asChild:{type:Boolean}},setup(e){const t=bb();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[z("div",st(xt(b(t).getGhostBeforeProps())),null,16),L(n.$slots,"default"),z("div",st(xt(b(t).getGhostAfterProps())),null,16)]),_:3},16,["as-child"]))}}),xP=M({__name:"toast-title",props:{asChild:{type:Boolean}},setup(e){const t=bb();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getTitleProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),wP=M({__name:"toaster-item",props:{value:{},index:{},parent:{}},setup(e){const t=e,n=yn(xn),o=A(()=>({...t.value,index:t.index,parent:t.parent,getRootNode:n?.value.getRootNode})),i=Ut(pP,o),a=A(()=>uP(i,bn));return bP(a),K(),(r,s)=>L(r.$slots,"default",st(xt(t.value)))}}),CP=M({__name:"toaster",props:{toaster:{},asChild:{type:Boolean}},setup(e){const t=e,n=Zn(Xn),o=yn(xn),i=Ut(Vp.machine,{store:t.toaster,id:vn(),dir:n?.value.dir,getRootNode:o?.value.getRootNode}),a=A(()=>Vp.connect(i,bn));return K(),(r,s)=>(C(),T(b(X).div,st(xt(a.value.getGroupProps())),{default:P(()=>[(C(!0),H(Ce,null,Ge(a.value.getToasts(),(l,c)=>(C(),T(wP,{key:l.id,value:l,parent:b(i),index:c},{default:P(d=>[L(r.$slots,"default",W({ref_for:!0},d))]),_:3},8,["value","parent","index"]))),128))]),_:3},16))}});var _P=ie("toggle",["root","indicator"]);_P.build();Y()(["defaultPressed","pressed","onPressedChange","disabled"]);const SP=ie("toggle",["root","indicator"]);SP.build();var kP=ie("toggle-group").parts("root","item");kP.build();var yb=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`toggle-group:${e.id}`},xb=e=>e.getById(yb(e)),fl=e=>{const t=`[data-ownedby='${CSS.escape(yb(e))}']:not([data-disabled])`;return Hn(xb(e),t)},Dp=e=>ti(fl(e)),EP=e=>Js(fl(e)),OP=(e,t,n)=>Dd(fl(e),t,n),$P=(e,t,n)=>Md(fl(e),t,n),{not:Mp,and:IP}=Ye();Mp(IP("isClickFocus","isTabbingBackward")),Mp("isFirstToggleFocused");Y()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]);Y()(["value","disabled"]);const[wb,xi]=we("TooltipContext"),TP=M({__name:"tooltip-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=xi();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getArrowTipProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),PP=M({__name:"tooltip-arrow",props:{asChild:{type:Boolean}},setup(e){const t=xi();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getArrowProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),VP=M({__name:"tooltip-content",props:{asChild:{type:Boolean}},setup(e){const t=xi(),n=_m(),o=A(()=>tl(t.value.getContentProps(),n.value.presenceProps));return K(),(i,a)=>b(n).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},o.value,{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),DP=M({__name:"tooltip-context",setup(e){const t=xi();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),MP=M({__name:"tooltip-positioner",props:{asChild:{type:Boolean}},setup(e){const t=xi(),n=Nd(),o=wm(A(()=>({...n.value,present:t.value.open})));return Cm(o),K(),(i,a)=>b(o).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getPositionerProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),RP=M({__name:"tooltip-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return wb(n),fi(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),K(),(o,i)=>L(o.$slots,"default")}});var Cb=ie("tooltip").parts("trigger","arrow","arrowTip","positioner","content"),Hi=Cb.build(),_b=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`tooltip:${e.id}:trigger`},FP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tooltip:${e.id}:content`},AP=e=>{var t;return((t=e.ids)==null?void 0:t.arrow)??`tooltip:${e.id}:arrow`},Sb=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tooltip:${e.id}:popper`},Ql=e=>e.getById(_b(e)),Rp=e=>e.getById(Sb(e)),nn=xw({id:null});function LP(e,t){const{state:n,context:o,send:i,scope:a,prop:r,event:s}=e,l=r("id"),c=!!r("aria-label"),d=n.matches("open","closing"),h=_b(a),u=FP(a),p=r("disabled"),m=ev({...r("positioning"),placement:o.get("currentPlacement")});return{open:d,setOpen(g){n.matches("open","closing")!==g&&i({type:g?"open":"close"})},reposition(g={}){i({type:"positioning.set",options:g})},getTriggerProps(){return t.button({...Hi.trigger.attrs,id:h,dir:r("dir"),"data-expanded":j(d),"data-state":d?"open":"closed","aria-describedby":d?u:void 0,onClick(g){g.defaultPrevented||p||r("closeOnClick")&&i({type:"close",src:"trigger.click"})},onFocus(g){queueMicrotask(()=>{g.defaultPrevented||p||s.src!=="trigger.pointerdown"&&ys()&&i({type:"open",src:"trigger.focus"})})},onBlur(g){g.defaultPrevented||p||l===nn.get("id")&&i({type:"close",src:"trigger.blur"})},onPointerDown(g){g.defaultPrevented||p||Mr(g)&&r("closeOnPointerDown")&&l===nn.get("id")&&i({type:"close",src:"trigger.pointerdown"})},onPointerMove(g){g.defaultPrevented||p||g.pointerType!=="touch"&&i({type:"pointer.move"})},onPointerLeave(){p||i({type:"pointer.leave"})},onPointerCancel(){p||i({type:"pointer.leave"})}})},getArrowProps(){return t.element({id:AP(a),...Hi.arrow.attrs,dir:r("dir"),style:m.arrow})},getArrowTipProps(){return t.element({...Hi.arrowTip.attrs,dir:r("dir"),style:m.arrowTip})},getPositionerProps(){return t.element({id:Sb(a),...Hi.positioner.attrs,dir:r("dir"),style:m.floating})},getContentProps(){return t.element({...Hi.content.attrs,dir:r("dir"),hidden:!d,"data-state":d?"open":"closed",role:c?void 0:"tooltip",id:c?void 0:u,"data-placement":o.get("currentPlacement"),onPointerEnter(){i({type:"content.pointer.move"})},onPointerLeave(){i({type:"content.pointer.leave"})},style:{pointerEvents:r("interactive")?"auto":"none"}})}}}var{and:NP,not:Fp}=Ye(),BP={initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",props({props:e}){const t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{id:"x",openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:"bottom",...e.positioning}}},effects:["trackFocusVisible","trackStore"],context:({bindable:e})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:!1}))}),watch({track:e,action:t,prop:n}){e([()=>n("disabled")],()=>{t(["closeIfDisabled"])}),e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{closed:{entry:["clearGlobalId"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":{actions:["clearPointerMoveOpened"]},"pointer.move":[{guard:NP("noVisibleTooltip",Fp("hasPointerMoveOpened")),target:"opening"},{guard:Fp("hasPointerMoveOpened"),target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}]}},opening:{effects:["trackScroll","trackPointerlockChange","waitForOpenDelay"],on:{"after.openDelay":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"controlled.open":{target:"open"},"controlled.close":{target:"closed"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":[{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose","toggleVisibility"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],close:[{guard:"isOpenControlled",actions:["invokeOnClose","toggleVisibility"]},{target:"closed",actions:["invokeOnClose"]}]}},open:{effects:["trackEscapeKey","trackScroll","trackPointerlockChange","trackPositioning"],entry:["setGlobalId"],on:{"controlled.close":{target:"closed"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.leave":[{guard:"isVisible",target:"closing",actions:["clearPointerMoveOpened"]},{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],"content.pointer.leave":{guard:"isInteractive",target:"closing"},"positioning.set":{actions:["reposition"]}}},closing:{effects:["trackPositioning","waitForCloseDelay"],on:{"after.closeDelay":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"controlled.close":{target:"closed"},"controlled.open":{target:"open"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.move":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen","toggleVisibility"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"content.pointer.move":{guard:"isInteractive",target:"open"},"positioning.set":{actions:["reposition"]}}}},implementations:{guards:{noVisibleTooltip:()=>nn.get("id")===null,isVisible:({prop:e})=>e("id")===nn.get("id"),isInteractive:({prop:e})=>!!e("interactive"),hasPointerMoveOpened:({context:e})=>e.get("hasPointerMoveOpened"),isOpenControlled:({prop:e})=>e("open")!==void 0},actions:{setGlobalId:({prop:e})=>{nn.set("id",e("id"))},clearGlobalId:({prop:e})=>{e("id")===nn.get("id")&&nn.set("id",null)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e("disabled")&&t({type:"close",src:"disabled.change"})},reposition:({context:e,event:t,prop:n,scope:o})=>{if(t.type!=="positioning.set")return;const i=()=>Rp(o);return lt(Ql(o),i,{...n("positioning"),...t.options,defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e("open")?"controlled.open":"controlled.close",previousEvent:t})})},setPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!0)},clearPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!1)}},effects:{trackFocusVisible:({scope:e})=>{var t;return zd({root:(t=e.getRootNode)==null?void 0:t.call(e)})},trackPositioning:({context:e,prop:t,scope:n})=>{e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);const o=()=>Rp(n);return lt(Ql(n),o,{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},trackPointerlockChange:({send:e,scope:t})=>{const n=t.getDoc();return se(n,"pointerlockchange",()=>e({type:"close",src:"pointerlock:change"}),!1)},trackScroll:({send:e,prop:t,scope:n})=>{if(!t("closeOnScroll"))return;const o=Ql(n);if(!o)return;const i=Xf(o).map(a=>se(a,"scroll",()=>{e({type:"close",src:"scroll"})},{passive:!0,capture:!0}));return()=>{i.forEach(a=>a?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=nn.subscribe(()=>{nn.get("id")!==e("id")&&t({type:"close",src:"id.change"})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t("closeOnEscape")?se(document,"keydown",n=>{wc(n)||n.key==="Escape"&&(n.stopPropagation(),e({type:"close",src:"keydown.escape"}))},!0):void 0,waitForOpenDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.openDelay"})},t("openDelay"));return()=>clearTimeout(n)},waitForCloseDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.closeDelay"})},t("closeDelay"));return()=>clearTimeout(n)}}}};Y()(["aria-label","closeDelay","closeOnEscape","closeOnPointerDown","closeOnScroll","closeOnClick","dir","disabled","getRootNode","id","ids","interactive","onOpenChange","defaultOpen","open","openDelay","positioning"]);const zP=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=A(()=>{const s=Ae(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Po(s),onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)}}}),r=Ut(BP,a);return A(()=>LP(r,bn))},HP=M({__name:"tooltip-root",props:qn({"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnClick:void 0,closeOnEscape:void 0,closeOnPointerDown:void 0,closeOnScroll:void 0,defaultOpen:void 0,disabled:void 0,interactive:void 0,open:void 0}),emits:["openChange","update:open"],setup(e,{emit:t}){const n=e,o=zP(n,t);return wb(o),fi(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),K(),(i,a)=>L(i.$slots,"default")}}),jP=M({__name:"tooltip-trigger",props:{asChild:{type:Boolean}},setup(e){const t=xi();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),No=Object.freeze(Object.defineProperty({__proto__:null,Arrow:PP,ArrowTip:TP,Content:VP,Context:DP,Positioner:MP,Root:HP,RootProvider:RP,Trigger:jP},Symbol.toStringTag,{value:"Module"}));var kb=ie("tour").parts("content","actionTrigger","closeTrigger","progressText","title","description","positioner","arrow","arrowTip","backdrop","spotlight");kb.build();var WP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tour-positioner-${e.id}`},GP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tour-content-${e.id}`},UP=e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`tour-backdrop-${e.id}`},Kr=e=>e.getById(GP(e)),Eb=e=>e.getById(WP(e)),YP=e=>e.getById(UP(e));function qP(e){return J(()=>{const t=Kr(e);if(!t)return;const n=li(t),o=Eb(e),i=YP(e);o&&(o.style.setProperty("--z-index",n.zIndex),o.style.setProperty("z-index","var(--z-index)")),i&&i.style.setProperty("--z-index",n.zIndex)})}var KP=e=>e?.type==="tooltip",XP=e=>e?.type==="dialog",ZP=e=>e?.type==="wait",Ob=e=>e.filter(t=>t.type!=="wait"),JP=(e,t)=>{const n=Ob(e).length;return(t+1)/n},QP=e=>e.type==="floating"?{backdrop:!1,arrow:!1,placement:"bottom-end",...e}:e.target==null||e.type==="dialog"?{type:"dialog",placement:"center",backdrop:!0,...e}:!e.type||e.type==="tooltip"?{type:"tooltip",arrow:!0,backdrop:!0,...e}:e,eV=(e,t)=>{const n=t!=null?e.find(o=>o.id===t):null;return n?QP(n):null},$s=(e,t)=>t!=null?e.findIndex(n=>n.id===t):-1;function Ap(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var tV=e=>{let t=e.clientX,n=e.clientY,o=e.view||window,i=Ap(o);for(;i;){const a=i.getBoundingClientRect(),r=getComputedStyle(i),s=a.left+(i.clientLeft+parseFloat(r.paddingLeft)),l=a.top+(i.clientTop+parseFloat(r.paddingTop));t+=s,n+=l,o=_e(i),i=Ap(o)}return{clientX:t,clientY:n}};function nV(e,t){const{clientX:n,clientY:o}=tV(t);return e.y<=o&&o<=e.y+e.height&&e.x<=n&&n<=e.x+e.width}function oV(e,t){const n=t.x||0,o=t.y||0;return{x:e.x-n,y:e.y-o,width:e.width+n+n,height:e.height+o+o}}var{and:ec}=Ye();ec("isValidStep","hasResolvedTarget"),ec("isValidStep","hasTarget"),ec("isValidStep","isWaitingStep");var In=class{constructor(t){this.params=t}transitionToStep(t){const n=this.params.context.get("steps"),o=sa(t)?$s(n,t):t;this.transitionTo(o)}next(t){const n=this.params.context.get("steps"),o=gs(n,t);this.transitionTo(o)}prev(t){const n=this.params.context.get("steps"),o=nm(n,t);this.transitionTo(o)}clear(){const{context:t}=this.params;t.set("targetRect",{width:0,height:0,x:0,y:0}),t.set("resolvedTarget",null),this.transitionTo(-1)}cleanupAll(){var t,n;const{refs:o,context:i}=this.params;(t=o.get("_targetCleanup"))==null||t(),o.set("_targetCleanup",void 0),o.set("_prevTarget",void 0),(n=o.get("_effectCleanup"))==null||n(),o.set("_effectCleanup",void 0),i.set("resolvedTarget",null)}cleanupStepEffect(){var t;const{refs:n}=this.params;n.get("_runningEffect")||((t=n.get("_effectCleanup"))==null||t(),n.set("_effectCleanup",void 0))}syncTarget(t){var n;const{refs:o,prop:i}=this.params,a=o.get("_prevTarget");if(t!==a&&((n=o.get("_targetCleanup"))==null||n(),o.set("_targetCleanup",void 0)),!t){o.set("_prevTarget",null);return}t!==a&&(i("preventInteraction")&&(t.inert=!0),t.setAttribute("data-tour-highlighted",""),o.set("_targetCleanup",()=>{i("preventInteraction")&&(t.inert=!1),t.removeAttribute("data-tour-highlighted")}),o.set("_prevTarget",t))}transitionTo(t){const{context:n,refs:o}=this.params,i=n.get("steps")[t];if(!i){n.set("stepId",null);return}if(Ne(n.get("stepId"),i.id)){o.set("_runningEffect",!1);return}this.cleanup();const a=this.createUtilities(i,t);i.effect?this.executeEffect(i,a):a.show()}cleanup(){var t,n;const{refs:o}=this.params;(t=o.get("_effectCleanup"))==null||t(),o.set("_effectCleanup",void 0),(n=o.get("_targetCleanup"))==null||n(),o.set("_targetCleanup",void 0)}createUtilities(t,n){const{context:o,computed:i,prop:a}=this.params,r=o.get("steps");return{show:()=>{o.set("stepId",t.id)},update:s=>{o.set("steps",l=>l.map((c,d)=>d===n?{...c,...s}:c))},next:()=>{const s=gs(r,i("stepIndex"));this.transitionTo(s)},goto:s=>{const l=$s(r,s);if(l===-1){gn(`[zag-js/tour] Step with id "${s}" not found`);return}this.transitionTo(l)},dismiss:()=>{var s;o.set("stepId",null),(s=a("onStatusChange"))==null||s({status:"dismissed",stepId:null,stepIndex:-1})},target:t.target}}executeEffect(t,n){const{refs:o}=this.params;o.set("_runningEffect",!0);let i;try{i=t.effect(n)}catch(a){o.set("_runningEffect",!1),console.error(a);return}o.set("_effectCleanup",i),ZP(t)&&n.show(),queueMicrotask(()=>{queueMicrotask(()=>{o.set("_runningEffect",!1)})})}};Y()(["closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","keyboardNavigation","onFocusOutside","onInteractOutside","onPointerDownOutside","onStatusChange","onStepChange","onStepsChange","preventInteraction","spotlightOffset","spotlightRadius","stepId","steps","translations"]);kb.extendWith("control");ne({slots:["root","avatarWrapper","avatar","image","fallback","overflowWrapper","overflow","overflowText"],base:{root:{display:"flex",alignItems:"center"},avatarWrapper:{position:"relative",cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{transform:"scale(1.05)",zIndex:"999 !important"},"&:focus":{outline:"none","& > div":{boxShadow:"state-focus-primary"},zIndex:"999 !important"},"&:active":{transform:"scale(0.95)"}},avatar:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",overflow:"hidden",background:"background.default",boxShadow:"stroke-bordered-interactive"},image:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",objectFit:"cover",zIndex:"1"},fallback:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",background:"#F2F2F5",color:"text.subtle",fontWeight:"medium",textAlign:"center",textTransform:"uppercase",userSelect:"none"},overflowWrapper:{position:"relative",cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{transform:"scale(1.05)",zIndex:"999 !important"},"&:focus":{outline:"none","& > div":{boxShadow:"state-focus-primary"},zIndex:"999 !important"},"&:active":{transform:"scale(0.95)"}},overflow:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",background:"background.default",boxShadow:"stroke-bordered-interactive"},overflowText:{color:"text.subtle",fontWeight:"medium",textAlign:"center",userSelect:"none"}},variants:{size:{xs:{avatar:{width:"16",height:"16"},overflow:{width:"16",height:"16"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},sm:{avatar:{width:"20",height:"20"},overflow:{width:"20",height:"20"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},md:{avatar:{width:"24",height:"24"},overflow:{width:"24",height:"24"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},lg:{avatar:{width:"32",height:"32"},overflow:{width:"32",height:"32"},fallback:{textStyle:"body_small_semibold"},overflowText:{textStyle:"body_small_semibold"}},xl:{avatar:{width:"40",height:"40"},overflow:{width:"40",height:"40"},fallback:{textStyle:"body_base_semibold"},overflowText:{textStyle:"body_base_semibold"}}}},defaultVariants:{size:"md"}});const iV={neutral:{backgroundColor:"graycoolalpha.10",color:"graycool.900",boxShadow:"none"},information:{backgroundColor:"blue.100",color:"seed.800"},feature:{backgroundColor:"purple.100",color:"purple.800",boxShadow:"0px 0px 0px 1px {colors.blackalpha.50} inset"},success:{backgroundColor:"green.100",color:"green.900"},warning:{backgroundColor:"orange.100",color:"orange.900"},critical:{backgroundColor:"red.100",color:"red.900"},ai:{backgroundColor:"purple.700",color:"whitealpha.1000"},new:{backgroundColor:"seed.700",color:"whitealpha.1000"},reserved:{backgroundColor:"blackalpha.900",color:"whitealpha.1000"},neutralCounter:{backgroundColor:"whitealpha.1000",color:"graycool.900"},criticalCounter:{backgroundColor:"red.700",color:"whitealpha.1000"}},aV=To({base:{display:"inline-flex",justifyContent:"center",alignItems:"center",gap:"4",borderRadius:"sm",textTransform:"uppercase",fontFamily:"sans",fontStyle:"normal",boxShadow:"0px 0px 0px 1px {colors.blackalpha.50} inset"},defaultVariants:{variant:"neutral",type:"decorative"},variants:{type:{decorative:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",fontSize:"xs",fontWeight:"bold",letterSpacing:"widest",lineHeight:"xxs"},counter:{minWidth:"5",paddingTop:"2",paddingBottom:"2",paddingLeft:"4",paddingRight:"4",fontSize:"sm",fontWeight:"regular",letterSpacing:"tighter",lineHeight:"sm"}},variant:iV}}),rV=M({__name:"Badge",props:{variant:{default:"neutral"},type:{default:"decorative"}},setup(e){const t=e,n=A(()=>aV({variant:t.variant,type:t.type}));return(o,i)=>(C(),H("div",{class:N(n.value)},[L(o.$slots,"default")],2))}}),sV={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"};function lV(e,t){return C(),H("svg",sV,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_2115_3244)"},[z("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.29505 0.21967C3.43571 0.0790177 3.62647 0 3.82538 0H8.17463C8.37352 0 8.56433 0.0790177 8.70495 0.21967L11.7803 3.29505C11.9209 3.4357 12 3.62647 12 3.82538V8.17463C12 8.37352 11.9209 8.56433 11.7803 8.70495L8.70495 11.7803C8.56433 11.9209 8.37352 12 8.17463 12H3.82538C3.62647 12 3.43571 11.9209 3.29505 11.7803L0.219671 8.70495C0.0790178 8.56433 0 8.37352 0 8.17463V3.82538C0 3.62647 0.0790177 3.43571 0.21967 3.29505L3.29505 0.21967ZM6.5625 2.8125V3.375V6V6.5625H5.4375V6V3.375V2.8125H6.5625ZM6 9C6.41422 9 6.75 8.66422 6.75 8.25C6.75 7.83577 6.41422 7.5 6 7.5C5.58579 7.5 5.25 7.83577 5.25 8.25C5.25 8.66422 5.58579 9 6 9Z"})],-1),z("defs",null,[z("clipPath",{id:"clip0_2115_3244"},[z("rect",{width:"12",height:"12",fill:"currentColor"})])],-1)])])}const cV={render:lV};ne({className:"link",slots:["icon","text","root"],base:{root:{fontFamily:"sans",fontStyle:"normal",fontWeight:"semimedium",lineHeight:"lg",letterSpacing:"normal",textAlign:"center",cursor:"pointer",display:"inline-flex",alignItems:"center"},icon:{marginLeft:"4"}},variants:{size:{default:{root:{fontSize:"base"}},small:{root:{fontSize:"sm"}}},type:{default:{root:{color:"{colors.text.normal}",textDecoration:"none",_visited:{color:"{colors.text.muted}"},_hover:{color:"{colors.text.subtle}",textDecoration:"none"},_focus:{color:"{colors.text.normal}",textDecoration:"none",boxShadow:"state-focus-primary"},_disabled:{color:"{colors.text.disabled}",cursor:"not-allowed",textDecoration:"none",_hover:{color:"{colors.text.disabled}",textDecoration:"none"}}},icon:{_groupDisabled:{color:"{colors.text.disabled}"},_groupVisited:{color:"{colors.text.normal}"},_groupHover:{color:"{colors.text.normal}"}}},interactive:{root:{color:"seed.700",textDecoration:"none",_visited:{color:"purple.800"},_hover:{color:"seed.700",textDecorationLine:"underline",textDecorationColor:"seed.700",textDecorationStyle:"solid",textDecorationSkipInk:"none",textDecorationThickness:"auto"},_disabled:{color:"seed.600 ",cursor:"not-allowed",textDecoration:"none ",_hover:{color:"seed.600 ",textDecoration:"none "}}},icon:{_groupHover:{color:"seed.800"},_groupDisabled:{color:"seed.700"},_groupVisited:{color:"seed.700"}}}}},defaultVariants:{size:"default",type:"default"}});ne({className:"link",slots:["root","content","title","action","icon","separator","dismissibleIcon"],base:{root:{padding:"12",display:"flex",justifyContent:"space-between"},content:{fontFamily:"sans",fontStyle:"normal",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},title:{fontWeight:"semibold",fontFamily:"sans",fontStyle:"normal",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},action:{fontWeight:"medium",marginTop:"8"},icon:{height:"100%",marginRight:"8",display:"flex",alignItems:"start",marginTop:"8"},dismissibleIcon:{height:"100%",display:"flex",alignItems:"start",color:"icon.subtle"},separator:{height:"1px",width:"100%"}},variants:{type:{error:{root:{background:"background.error-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.error-hover"},icon:{color:"icon.error-hover"},title:{color:"text.error-hover"},separator:{background:"border.error"}},info:{root:{background:"background.information-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.information-hover"},title:{color:"text.information-hover"},icon:{color:"text.information-hover"},separator:{background:"border.information"}},success:{root:{background:"background.success-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.success-hover"},title:{color:"text.success-hover"},icon:{color:"text.success-hover"},separator:{background:"border.success"}},emphasize:{root:{background:"background.discovery-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.discovery-hover"},title:{color:"text.discovery-hover"},icon:{color:"text.discovery-hover"},separator:{background:"border.discovery"}},warning:{root:{background:"background.warning-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.warning-hover"},title:{color:"text.warning-hover"},icon:{color:"text.warning-hover"},separator:{background:"border.warning"}},announcement:{root:{background:"background.neutral-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.subtle"},title:{color:"text.subtle"},icon:{color:"text.subtle"},separator:{background:"border.bold"}}}},defaultVariants:{type:"error"}});const dV={default:{root:{backgroundColor:"icon.brand-default","--beacon-shadow-color":"var(--colors-seed-600)","--beacon-shadow-color-light":"var(--colors-seed-25)"}},done:{root:{backgroundColor:"icon.accent-green-default","--beacon-shadow-color":"var(--colors-green-600)","--beacon-shadow-color-light":"var(--colors-green-25)"}},error:{root:{backgroundColor:"icon.error-default","--beacon-shadow-color":"var(--colors-red-600)","--beacon-shadow-color-light":"var(--colors-red-25)"}},waiting:{root:{backgroundColor:"icon.disabled","--beacon-shadow-color":"var(--colors-graycoolalpha-75)","--beacon-shadow-color-light":"var(--colors-graycoolalpha-25)"}}},uV={small:{root:{width:"8",height:"8","--beacon-shadow-spread-radius":"8px"}},medium:{root:{width:"16",height:"16","--beacon-shadow-spread-radius":"16px"}},large:{root:{width:"24",height:"24","--beacon-shadow-spread-radius":"24px"}}};ne({slots:["root"],base:{root:{borderRadius:"full",backgroundColor:"plum.800",animation:"pulse-animation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",boxShadow:"0px 0px 1px 1px var(--beacon-shadow-color)"}},variants:{variant:dV,size:uV,isAnimationDisabled:{true:{root:{animation:"none",boxShadow:"none"}}}},defaultVariants:{variant:"default",size:"small",isAnimationDisabled:!1}});const hV={xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",viewBox:"0 0 6 8",fill:"none"};function pV(e,t){return C(),H("svg",hV,[...t[0]||(t[0]=[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.86875 0.484377L2.33279 0.948477L4.80307 3.41878C5.14485 3.76049 5.14485 4.31451 4.80307 4.65622L2.33279 7.12654L1.86875 7.59058L0.940674 6.6625L1.40471 6.19846L3.56567 4.0375L1.40471 1.8765L0.940674 1.41249L1.86875 0.484377Z",fill:"#7E808A",style:{fill:"color(display-p3 0.4929 0.5038 0.5431)","fill-opacity":"1"}},null,-1)])])}const gV={render:pV};ne({className:"breadcrumb",slots:["root","list","item","link","separator","current","icon","currentIcon"],base:{root:{display:"flex",alignItems:"center"},list:{display:"flex",alignItems:"center",gap:"4"},item:{display:"flex",alignItems:"center",gap:"4"},link:{display:"flex",alignItems:"center",gap:"4",fontFamily:"sans",fontSize:"13",fontWeight:"medium",lineHeight:"lg",color:"text.subtle",textDecoration:"none",cursor:"pointer",_hover:{textDecoration:"underline"}},separator:{display:"flex",alignItems:"center",color:"icon.subtle",justifyContent:"center",width:"20",height:"20"},current:{display:"flex",alignItems:"center",gap:"4",fontFamily:"sans",fontSize:"13",fontWeight:"medium",lineHeight:"lg",color:"text.normal"},icon:{display:"flex",alignItems:"center",width:"16",height:"16",color:"icon.subtle"},currentIcon:{display:"flex",alignItems:"center",width:"20",height:"20",color:"icon.normal"}},variants:{},defaultVariants:{}});ne({slots:["root","content","prefix","suffix","label","rootWrapper","separator","separatorPlaceholder"],base:{rootWrapper:{boxShadow:"stroke-bordered",display:"inline-flex",borderRadius:"md"},separator:{width:"1px",height:"100%",marginTop:"0.125px",display:"flex",backgroundColor:"border.muted",position:"absolute",right:"-1",top:"0"},separatorPlaceholder:{width:"1",display:"flex"},root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",paddingY:"6",paddingX:"12",_hidden:{display:"none"},gap:"6"},content:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6"},prefix:{color:"inherit",display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},label:{}},defaultVariants:{size:"default"},variants:{size:{default:{root:{...Ve.default,height:"xxl",boxShadow:"none"},prefix:{width:"16",height:"16",fontSize:"base"}},small:{root:{...Ve.default,height:"xl",fontSize:"sm",boxShadow:"none"},prefix:{width:"14",height:"14"}}}}});ne({slots:["root","content","chevron","prefix","container","separator","separatorPlaceholder","icon"],base:{container:{alignItems:"center",boxShadow:"stroke-bordered-interactive",display:"inline-flex",borderRadius:"md"},icon:{display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},separator:{height:"100%",marginTop:"0.125px",display:"flex",position:"absolute",right:"-1",top:"0"},separatorPlaceholder:{display:"flex"},root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",gap:"6"},prefix:{display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},content:{display:"flex",alignItems:"center",gap:"6"},chevron:{display:"inline-block",transition:"transform 0.3s ease",'&[data-open="true"]':{transform:"rotate(180deg)"}}},defaultVariants:{type:"primary",action:"primary",size:"default"},variants:{type:{primary:{root:{...Ve.primary,boxShadow:"none"}},default:{root:{...Ve.default,boxShadow:"none"}}},action:{primary:{root:{borderTopLeftRadius:"md",borderBottomLeftRadius:"md",borderTopRightRadius:"0",borderBottomRightRadius:"0"}},secondary:{root:{borderTopRightRadius:"md",borderBottomRightRadius:"md",borderTopLeftRadius:"0",borderBottomLeftRadius:"0",paddingX:"6",paddingY:"8"}}},size:{default:{root:{},chevron:{width:"16",height:"16"}},small:{chevron:{width:"14",height:"14"}}}},compoundVariants:[{action:"primary",size:"default",css:{root:{paddingX:"12",paddingY:"6"}}},{action:"primary",size:"small",css:{root:{paddingX:"8",paddingY:"0",height:"24"}}},{action:"secondary",size:"small",css:{root:{height:"24",paddingY:"6"}}},{type:"primary",action:"primary",css:{root:{boxShadow:"none"}}},{type:"primary",action:"secondary",css:{root:{boxShadow:"none",_focus:{},'&[data-open="true"]':{backgroundColor:"seed.900"}}}},{type:"default",action:"secondary",css:{root:{'&[data-open="true"]':{backgroundColor:"graycoolalpha.20"},_focusVisible:{color:"seed.800"}}}},{type:"default",action:"primary",css:{root:{_focusVisible:{color:"seed.800"}}}},{type:"default",css:{separator:{width:"1px",backgroundColor:"border.muted"},separatorPlaceholder:{width:"1px"}}},{type:"primary",css:{separator:{width:"1px",backgroundColor:"border.muted",right:"0"},separatorPlaceholder:{width:"0px"}}}]});const fV={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"};function mV(e,t){return C(),H("svg",fV,[...t[0]||(t[0]=[z("path",{d:"M1.24033 3.98097L3.71905 6.45973C4.10957 6.85026 4.74274 6.85026 5.13326 6.45974L10.7599 0.833153",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const $b={render:mV},vV={width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bV(e,t){return C(),H("svg",vV,[...t[0]||(t[0]=[z("path",{id:"Vector",d:"M0 1.0361L8 0.963898",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const yV={render:bV},xV={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wV(e,t){return C(),H("svg",xV,[...t[0]||(t[0]=[z("g",{id:"icon-information","clip-path":"url(#clip0_2674_19124)"},[z("path",{id:"Vector","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 12.6875C10.1412 12.6875 12.6875 10.1412 12.6875 7C12.6875 3.85888 10.1412 1.3125 7 1.3125C3.85888 1.3125 1.3125 3.85888 1.3125 7C1.3125 10.1412 3.85888 12.6875 7 12.6875ZM7 14C10.866 14 14 10.866 14 7C14 3.134 10.866 0 7 0C3.134 0 0 3.134 0 7C0 10.866 3.134 14 7 14ZM5.46875 6.125H6.125H6.78124C7.26449 6.125 7.65624 6.51676 7.65624 7V10.0625V10.7188H6.34374V10.0625V7.4375H6.125H5.46875V6.125ZM7 5.25C7.48325 5.25 7.875 4.85824 7.875 4.375C7.875 3.89176 7.48325 3.5 7 3.5C6.51676 3.5 6.125 3.89176 6.125 4.375C6.125 4.85824 6.51676 5.25 7 5.25Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),z("defs",null,[z("clipPath",{id:"clip0_2674_19124"},[z("rect",{width:"14",height:"14",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const xa={render:wV},CV=ne({className:"tooltip",slots:Cb.keys(),base:{trigger:{backgroundColor:"transparent",border:"none",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",padding:"0"},content:{fontFamily:"sans",fontSize:"sm",backgroundColor:"graycool.25",paddingLeft:"8",paddingRight:"8",paddingTop:"4",paddingBottom:"4",borderRadius:"sm",gap:"6",maxWidth:"200",color:"graycool.800",fontWeight:"regular",boxShadow:"0px 1px 3px 0px {colors.blackalpha.100}",border:"0.5px solid {colors.graycool.500}",_open:{animation:"fadeIn 0.25s ease-out"},_closed:{animation:"fadeOut 0.2s ease-out"}}}}),_V={key:0,class:"tooltip-content"},fu=M({__name:"Tooltip",props:{placement:{default:"top"},title:{},"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>CV());return(o,i)=>(C(),T(b(No).Root,{positioning:{placement:t.placement}},{default:P(()=>[Z(b(No).Trigger,{class:N(n.value.trigger)},{default:P(()=>[L(o.$slots,"default")]),_:3},8,["class"]),Z(b(No).Positioner,{class:N(n.value.positioner)},{default:P(()=>[Z(b(No).Content,{class:N(n.value.content)},{default:P(()=>[Z(b(No).Arrow,{class:N(n.value.arrow)},{default:P(()=>[Z(b(No).ArrowTip,{class:N(n.value.arrowTip)},null,8,["class"])]),_:1},8,["class"]),t.title?(C(),H("div",_V,oe(t.title),1)):L(o.$slots,"content",{key:1})]),_:3},8,["class"])]),_:3},8,["class"])]),_:3},8,["positioning"]))}}),SV=ne({className:"checkbox",slots:Hd.keys(),base:{root:{alignItems:"center",display:"flex"},label:{color:"fg.default",fontSize:"base",fontWeight:"normal",fontFamily:"sans",paddingLeft:"8"},control:{alignItems:"center",borderWidth:"1px",cursor:"pointer",display:"flex",justifyContent:"center",transitionDuration:"normal",transitionProperty:"border-color, background",transitionTimingFunction:"default",width:"sm",height:"sm",borderRadius:"sm",boxShadow:"stroke-bordered-interactive","& svg":{width:"9.52",height:"6.33"},_hover:{background:"graycoolalpha.10"},_checked:{background:"seed.700",boxShadow:"inner-highlighted-ring",_hover:{background:"seed.800"},_disabled:{background:"graycoolalpha.20",boxShadow:"inner-highlighted-ring"}},_indeterminate:{background:"seed.700",boxShadow:"inner-highlighted-ring",_hover:{background:"seed.800"},"& svg":{width:"9.52"},_disabled:{background:"graycoolalpha.20",boxShadow:"inner-highlighted-ring"}},_focus:{boxShadow:"state-focus-primary"},_disabled:{color:"graycoolalpha.75",background:"graycoolalpha.20",cursor:"not-allowed",boxShadow:"inner-highlighted-ring",_hover:{color:"graycoolalpha.75",background:"graycoolalpha.20"}}},indicator:{color:"{colors.whitealpha.1000}",_checked:{"&:not(.indeterminate-icon)":{display:"flex",justifyContent:"center",alignItems:"center"}},_indeterminate:{"&.indeterminate-icon":{display:"flex",justifyContent:"center",alignItems:"center"}}}},defaultVariants:{type:"off"}}),kV={class:"checkbox-root"},EV={key:0,class:"checkbox-label-content"},OV={key:0,class:"checkbox-label-description"},$V=M({__name:"Checkbox",props:{disabled:{type:Boolean},checked:{},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!0},defaultChecked:{},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean},"aria-labelledby":{}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=SV();return(a,r)=>(C(),H("div",kV,[Z(b(Fo).Root,{class:N(b(i).root),checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],onCheckedChange:r[0]||(r[0]=s=>o("checkedChange",s))},{default:P(()=>[Z(b(Fo).Control,{class:N(b(i).control)},{default:P(()=>[Z(b(Fo).Indicator,{class:N(b(i).indicator)},{default:P(()=>[Z(b($b))]),_:1},8,["class"]),Z(b(Fo).Indicator,{indeterminate:"",class:N([b(i).indicator,"indeterminate-icon"])},{default:P(()=>[Z(b(yV))]),_:1},8,["class"])]),_:1},8,["class"]),n.hasLabel||e.iconTooltip?(C(),H("div",EV,[Z(b(Fo).Label,{class:N(b(i).label)},{default:P(()=>[L(a.$slots,"default",{},void 0,!0)]),_:3},8,["class"]),e.iconTooltip?(C(),T(fu,{key:0,title:e.iconTooltip},{default:P(()=>[(C(),T(Wt(e.suffixIcon&&b(xa)),{class:"suffix-icon"}))]),_:1},8,["title"])):(C(),T(Wt(e.suffixIcon&&b(xa)),{key:1,class:"suffix-icon"}))])):Q("",!0),Z(b(Fo).HiddenInput)]),_:3},8,["class","checked","disabled","aria-labelledby"]),e.description?(C(),H("p",OV,oe(e.description),1)):Q("",!0)]))}}),IV=$1($V,[["__scopeId","data-v-8f1bced0"]]);ne({slots:["root","label","dismissButton","dismissIcon","avatar","icon"],base:{root:{border:"none",display:"inline-flex",alignItems:"center",outline:"none",gap:"6",borderRadius:"full",cursor:"pointer",boxShadow:"stroke-bordered-interactive",_disabled:{cursor:"not-allowed",opacity:"0.5",boxShadow:"none",background:"background.disabled",color:"text.disabled",_hover:{background:"background.disabled"}},_focusVisible:{boxShadow:"state-focus-primary"},_active:{background:"background.pressed"}},label:{fontFamily:"sans",fontStyle:"normal",letterSpacing:"normal",whiteSpace:"nowrap",color:"text.subtle"},dismissButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"0",border:"none",background:"none",cursor:"pointer",_disabled:{cursor:"not-allowed"}},dismissIcon:{width:"12",height:"12",color:"text.subtle"},avatar:{width:"20",height:"20",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"stroke-bordered"},icon:{width:"16",height:"16",color:"text.subtle"}},variants:{size:{small:{root:{paddingTop:"4",paddingBottom:"4",paddingLeft:"8",paddingRight:"8",height:"24"},label:{fontSize:"12",lineHeight:"md",fontWeight:"semimedium",letterSpacing:"wide"},avatar:{width:"14",height:"14"},icon:{width:"12",height:"12"}},default:{root:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",height:"32"},label:{fontSize:"13",lineHeight:"md",fontWeight:"medium"}}},variant:{default:{root:{background:"background.default",_hover:{background:"background.hover"},_active:{background:"background.pressed"}}},selected:{root:{background:"{colors.seed.100}",_hover:{background:"background.selected-hover"},_active:{background:"background.selected-pressed"},_focusVisible:{boxShadow:"state-focus-primary"}},label:{color:"text.brand-default",_hover:{color:"text.brand-hover"},_active:{color:"text.brand-pressed"},_focusVisible:{color:"text.brand-pressed"}},icon:{color:"icon.selected",_active:{color:"text.brand-pressed"},_focusVisible:{color:"text.brand-pressed"}}}},hasAvatar:{true:{root:{paddingLeft:"6"}}},hasIcon:{true:{root:{paddingLeft:"6"}}},disabled:{true:{root:{opacity:"0.5",cursor:"not-allowed",background:"background.disabled",_hover:{background:"background.disabled"}},label:{color:"text.placeholder"},icon:{color:"text.placeholder"},avatar:{opacity:"0.5"}}}},defaultVariants:{size:"default",variant:"default",disabled:!1,hasAvatar:!1,hasIcon:!1}});ne({className:"prefix",slots:["root","icon","avatar","critical","selected","enter"],base:{root:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,gap:"4"},icon:{color:"icon.subtle",width:"14",height:"14"},avatar:{},critical:{color:"icon.error-hover",width:"14",height:"14"},selected:{color:"icon.normal",width:"14",height:"14"},enter:{color:"icon.subtle",width:"14",height:"14"}}});ne({className:"suffix",slots:["root","toggle","note","checkbox","radio","selected","button"],base:{root:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,gap:"4"},toggle:{},note:{color:"text.muted",fontWeight:"medium",fontSize:"base",lineHeight:"lg",letterSpacing:"normal",fontFamily:"sans",fontStyle:"normal"},checkbox:{},radio:{},selected:{color:"icon.normal",width:"14",height:"14"},button:{}}});ne({className:"radioGroup",slots:[...gu.keys(),"optionsContainer"],base:{root:{fontFamily:"sans",display:"flex",flexDirection:{_vertical:"column",_horizontal:"row"},gap:{_vertical:"8",_horizontal:"8"}},optionsContainer:{display:"flex",flexDirection:{_vertical:"column",_horizontal:"row"},gap:{_vertical:"6",_horizontal:"24"},rowGap:{_horizontal:"6"}},label:{color:"text.subtle",fontSize:"base",fontWeight:"medium",lineHeight:"lg",fontStyle:"normal",letterSpacing:"normal"},indicator:{background:"bg.default"},itemControl:{width:"sm",height:"sm",display:"flex",alignItems:"center",justifyContent:"center",background:"background.default",borderRadius:"full",boxShadow:"stroke-bordered-interactive",transitionDuration:"normal",transitionProperty:"background",transitionTimingFunction:"default",_hover:{background:"background.hover"},_focus:{boxShadow:"state-focus-primary"},_checked:{outlineWidth:"5px",outlineOffset:"-4px",outlineColor:"background.brand-bold-default",outlineStyle:"solid",boxShadow:"inner-highlighted-ring",transitionProperty:"outline-color",_hover:{outlineColor:"background.brand-bold-default"},_focus:{boxShadow:"state-focus-primary"}},_disabled:{background:"background.disabled",_hover:{background:"background.disabled"},_checked:{outlineColor:"icon.disabled",background:"background.disabled",borderColor:"background.disabled",_hover:{outlineColor:"icon.disabled",background:"background.disabled",borderColor:"background.disabled"}}}},item:{display:"flex",alignItems:"center",cursor:"pointer",_disabled:{cursor:"not-allowed"},gap:"8"},itemText:{color:"text.normal",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_disabled:{color:"text.disabled"}}},defaultVariants:{}});ne({className:"switch",slots:[...hb.keys(),"suffixIcon","labelContent","labelDescription"],base:{root:{display:"flex",alignItems:"center",gap:"6",position:"relative",width:"fit-content",cursor:"pointer",_disabled:{cursor:"not-allowed"}},control:{display:"inline-flex",alignItems:"center",boxSizing:"content-box",justifyContent:"flex-start",flexShrink:0,cursor:"pointer",borderRadius:"full",paddingRight:"0",position:"relative",transitionProperty:"all",transitionTimingFunction:"ease-in-out",transitionDuration:"150ms",background:"graycoolalpha.10",w:"26px",h:"16px",boxShadow:"stroke-bordered-interactive",_focus:{boxShadow:"state-focus-primary"},_checked:{background:"seed.800",_disabled:{background:"background.brand-pressed"},'&[data-loading="true"]':{background:"background.brand-pressed"}},_disabled:{cursor:"not-allowed",background:"background.disabled",'&[data-loading="true"]':{background:"background.disabled"},boxShadow:"none"}},label:{color:"graycool.1000",fontSize:"base",fontWeight:"normal",fontFamily:"sans",cursor:"pointer",lineHeight:"lg"},thumb:{background:"white",borderRadius:"full",h:"12px",w:"12px",transform:"translateX(2px)",boxShadow:"elevations-raised",transitionProperty:"transform",transitionTimingFunction:"ease-in-out",transitionDuration:"150ms",position:"relative",_checked:{transform:"translateX(12px)",background:"white",boxShadow:"elevations-raised",_disabled:{background:"white"},'&[data-loading="true"]':{"&::before":{borderTopColor:"background.brand-pressed"}}},_disabled:{background:"white"},'&[data-loading="true"]':{"&::before":{content:'""',position:"absolute",margin:"1px",top:"0",left:"0",right:"0",bottom:"0",borderRadius:"full",border:"2px solid white",borderTopColor:"background.disabled",borderStyle:"solid",backgroundColor:"transparent",animation:"spin 2s linear infinite",boxShadow:"0 0 8px rgba(255, 255, 255, 0.3)",transform:"rotate(0deg)",willChange:"transform",backfaceVisibility:"hidden"}}},suffixIcon:{color:"icon.disabled"},labelContent:{display:"flex",alignItems:"center",gap:"4"},labelDescription:{margin:"0",paddingLeft:"32",color:"text.subtle",fontSize:"sm",fontFamily:"sans"}}});ne({slots:[...GE.keys()],base:{root:{position:"relative"},trigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",border:"none",cursor:"pointer"},input:{marginBottom:12},viewControl:{display:"flex",alignItems:"center",paddingLeft:12,marginBottom:"4px"},viewTrigger:{display:"flex",alignItems:"center",justifyContent:"flex-start",borderRadius:"md",backgroundColor:"transparent",border:"none",pointerEvents:"none",textStyle:"body_base_medium",flexGrow:1},prevTrigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",backgroundColor:"transparent",border:"none",cursor:"pointer",outline:"none",_focus:{boxShadow:"none"},"& svg":{transform:"rotate(-90deg)"}},nextTrigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",backgroundColor:"transparent",border:"none",cursor:"pointer",_focus:{boxShadow:"none"},"& svg":{transform:"rotate(90deg)"}},content:{paddingX:"14px",paddingTop:"14px",paddingBottom:12,boxShadow:"elevations-overlay",borderRadius:"md",backgroundColor:"background.white"},table:{borderCollapse:"collapse",borderSpacing:0},tableHeader:{textStyle:"body_base_medium",color:"text.subtle",paddingY:"6",paddingX:"8",height:32,width:32,minWidth:32,maxWidth:32},tableCell:{width:32,height:32,padding:"0"},tableCellTrigger:{display:"flex",alignItems:"center",justifyContent:"center",textStyle:"body_base_regular",paddingY:"6",paddingX:"8",borderRadius:"md",border:"none",cursor:"pointer",height:"inherit",width:"inherit",_hover:{backgroundColor:"background.brand-selected"},"&[data-in-range]":{backgroundColor:"background.brand-selected",borderRadius:"0"},"&[data-selected]":{backgroundColor:"background.brand-bold-default",color:"text.inverse"},"&[data-range-start]":{borderRadius:"md"},"&[data-range-end]":{borderRadius:"md"},"&[data-in-range][data-selected]":{backgroundColor:"background.brand-bold-default",color:"text.inverse",borderRadius:"borderRadius.md"},"&[data-today]":{backgroundColor:"background.error-bold-default",color:"text.inverse",textStyle:"body_base_semibold",borderRadius:"50%"},"&[data-outside-range]":{color:"text.muted"},"&[data-disabled]":{cursor:"not-allowed",_hover:{backgroundColor:"transparent"}}}}});ne({className:"drawer",slots:[...Iv.keys(),"header","body","footer","actions","breadcrumbs","closeButton","titleNested","backAction","hintMessage","root"],base:{root:{},backdrop:{position:"fixed",inset:"0",backgroundColor:"blackalpha.600",zIndex:"40",_open:{animation:"backdrop-in"},_closed:{animation:"backdrop-out"}},positioner:{position:"fixed",top:"0",right:"0",height:"100vh",zIndex:"50",display:"flex",alignItems:"center"},content:{display:"flex",flexDirection:"column",backgroundColor:"background.default",height:"100vh",boxShadow:"stroke-bordered-interactive",_open:{animation:"drawer-in-right"},_closed:{animation:"drawer-out-right"}},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16"},title:{fontFamily:"sans",fontSize:"md",fontWeight:"bold",color:"text.normal",marginY:"0"},titleNested:{fontFamily:"sans",fontSize:"md",fontWeight:"bold",color:"text.normal",marginY:"0"},breadcrumbs:{display:"flex",alignItems:"center"},body:{flex:"1",padding:"16",overflowY:"auto",fontFamily:"sans"},footer:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"16",backgroundColor:"background.neutral-default"},actions:{display:"flex",gap:"12"},backAction:{marginRight:"auto"},hintMessage:{marginRight:"auto",maxWidth:"70%"},closeButton:{display:"flex",justifyContent:"center",alignItems:"center",color:"icon.subtle",backgroundColor:"transparent",border:"none",padding:"0",margin:"0"}},variants:{size:{narrow:{content:{width:"320"}},medium:{content:{width:"504"}},wide:{content:{width:"640"}},full:{content:{width:"100vw"}}},variant:{default:{},custom:{},nested:{}},footerVariant:{default:{},critical:{}},layout:{default:{},multiAction:{footer:{justifyContent:"space-between"}}}},defaultVariants:{size:"medium",variant:"default",footerVariant:"default",layout:"default"}});const hr={default:"text.muted",error:"text.error-hover",warning:"text.warning-hover",success:"text.success-hover"};ne({slots:["container","iconWrapper","message"],base:{container:{height:"md",display:"flex",columnGap:"4",alignItems:"center"},iconWrapper:{display:"flex",alignItems:"center"},message:{display:"inline-flex",fontSize:"xs",fontWeight:"regular",fontFamily:"sans",alignItems:"center",justifyContent:"center",lineHeight:"sm",fontStyle:"normal"}},variants:{type:{default:{message:{color:hr.default}},error:{message:{color:hr.error}},warning:{message:{color:hr.warning}},success:{message:{color:hr.success}}}},defaultVariants:{type:"default"}});ne({className:"empty-state",slots:["root","content","title","description","illustration"],base:{root:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12",width:"fit-content"},content:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8",width:"full"},title:{fontFamily:"sans",fontWeight:"bold",fontSize:"15",lineHeight:"lg",letterSpacing:"tighter",textAlign:"center",color:"text.normal",marginBottom:"0"},description:{fontFamily:"sans",fontWeight:"regular",fontSize:"13",lineHeight:"lg",textAlign:"center",color:"text.subtle",marginTop:{base:"0"},_firstOfType:{marginTop:"0"}},illustration:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",borderRadius:"md",borderWidth:"01",borderStyle:"solid",borderColor:"border.muted",color:"text.subtle",marginBottom:"0"}}});const TV={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function PV(e,t){return C(),H("svg",TV,[...t[0]||(t[0]=[z("path",{d:"M6 1C5.73478 1 5.48043 1.10536 5.29289 1.29289C5.10536 1.48043 5 1.73478 5 2V3H2C1.73478 3 1.48043 3.10536 1.29289 3.29289C1.10536 3.48043 1 3.73478 1 4C1 4.26522 1.10536 4.51957 1.29289 4.70711C1.48043 4.89464 1.73478 5 2 5H3V13C3 13.5304 3.21071 14.0391 3.58579 14.4142C3.96086 14.7893 4.46957 15 5 15H11C11.5304 15 12.0391 14.7893 12.4142 14.4142C12.7893 14.0391 13 13.5304 13 13V5H14C14.2652 5 14.5196 4.89464 14.7071 4.70711C14.8946 4.51957 15 4.26522 15 4C15 3.73478 14.8946 3.48043 14.7071 3.29289C14.5196 3.10536 14.2652 3 14 3H11V2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1H6ZM7 6C7.26522 6 7.51957 6.10536 7.70711 6.29289C7.89464 6.48043 8 6.73478 8 7V11C8 11.2652 7.89464 11.5196 7.70711 11.7071C7.51957 11.8946 7.26522 12 7 12C6.73478 12 6.48043 11.8946 6.29289 11.7071C6.10536 11.5196 6 11.2652 6 11V7C6 6.73478 6.10536 6.48043 6.29289 6.29289C6.48043 6.10536 6.73478 6 7 6ZM10 6C10.2652 6 10.5196 6.10536 10.7071 6.29289C10.8946 6.48043 11 6.73478 11 7V11C11 11.2652 10.8946 11.5196 10.7071 11.7071C10.5196 11.8946 10.2652 12 10 12C9.73478 12 9.48043 11.8946 9.29289 11.7071C9.10536 11.5196 9 11.2652 9 11V7C9 6.73478 9.10536 6.48043 9.29289 6.29289C9.48043 6.10536 9.73478 6 10 6Z",fill:"currentColor"},null,-1)])])}const VV={render:PV},DV=ne({slots:[...Dv.keys(),"fileIcon","deleteIcon","dropzoneContent","dropzoneText","itemInfo"],base:{root:{display:"flex",flexDirection:"column",gap:"0",width:"100%"},label:{textStyle:"body_small_medium",color:"text.default",marginBottom:"8"},dropzone:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12",padding:"48",borderRadius:"xl",border:"1px dashed",borderColor:"graycool.200",backgroundColor:"white",cursor:"pointer",transition:"all 0.2s ease-in-out",minHeight:"200px",_hover:{borderColor:"graycool.300"},"&[data-dragging]":{borderColor:"primary.default",backgroundColor:"primary.subtle"},"&[data-invalid]":{borderColor:"error.default",backgroundColor:"error.subtle"}},dropzoneContent:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12"},dropzoneText:{textStyle:"body_small_regular",color:"text.subtle"},trigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6",paddingX:"16",paddingY:"8",borderRadius:"md",backgroundColor:"background.brand-bold-default",boxShadow:"stroke-bordered-interactive",cursor:"pointer",textStyle:"body_small_medium",color:"white",transition:"all 0.2s ease-in-out",border:"none",_hover:{backgroundColor:"background.brand-bold-hover"},_disabled:{opacity:.5,cursor:"not-allowed"}},clearTrigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6",paddingX:"8",paddingY:"4",borderRadius:"md",backgroundColor:"transparent",cursor:"pointer",textStyle:"body_small_medium",color:"text.subtle",transition:"all 0.2s ease-in-out",_hover:{color:"text.default",backgroundColor:"background.hover"}},itemGroup:{display:"flex",flexDirection:"column",gap:"8",marginTop:"16"},item:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12",paddingX:"16",paddingY:"12",borderRadius:"xl",backgroundColor:"white",border:"1px solid",borderColor:"graycool.200"},itemInfo:{display:"flex",flexDirection:"column",gap:"2",flex:1,minWidth:0},itemPreview:{display:"none"},itemPreviewImage:{width:"100%",height:"100%",objectFit:"cover"},itemName:{textStyle:"body_small_medium",color:"text.default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},itemSizeText:{textStyle:"body_xsmall_regular",color:"text.subtle"},itemDeleteTrigger:{display:"flex",alignItems:"center",justifyContent:"center",width:"32",height:"32",borderRadius:"md",cursor:"pointer",color:"text.subtle",transition:"all 0.2s ease-in-out",flexShrink:0,_hover:{color:"text.default",backgroundColor:"background.hover"}},hiddenInput:{display:"none"},fileIcon:{width:"20",height:"20",color:"text.subtle"},deleteIcon:{width:"20",height:"20"}},variants:{variant:{default:{},error:{dropzone:{borderColor:"error.default"}}},disabled:{true:{root:{opacity:.5,pointerEvents:"none"}}}},defaultVariants:{variant:"default",disabled:!1}}),MV=M({__name:"FileUpload",props:{isDisabled:{type:Boolean},label:{},placeholder:{default:"Drop your files here"},triggerLabel:{default:"Open Dialog"},showDropzone:{type:Boolean,default:!0},variant:{default:"default"},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:{},transformFiles:{},asChild:{type:Boolean}},emits:["update:acceptedFiles","fileAccept","fileChange","fileReject"],setup(e,{emit:t}){const n=e,o=Ct(n,t),i=A(()=>DV({variant:n.variant,disabled:n.isDisabled})),a=r=>{if(r===0)return"0 Bytes";const s=1024,l=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,c)).toFixed(1))+" "+l[c]};return(r,s)=>(C(),T(b(gt).Root,W(b(o),{class:i.value.root,disabled:n.isDisabled,"data-testid":"atlantis-file-upload"}),{default:P(()=>[n.label?(C(),T(b(gt).Label,{key:0,class:N(i.value.label),"data-testid":"atlantis-file-upload-label"},{default:P(()=>[Le(oe(n.label),1)]),_:1},8,["class"])):Q("",!0),n.showDropzone?(C(),T(b(gt).Dropzone,{key:1,class:N(i.value.dropzone),"data-testid":"atlantis-file-upload-dropzone"},{default:P(()=>[L(r.$slots,"dropzone",{},()=>[z("div",{class:N(i.value.dropzoneContent)},[z("span",{class:N(i.value.dropzoneText)},oe(n.placeholder),3),Z(b(gt).Trigger,{class:N(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:P(()=>[Le(oe(n.triggerLabel),1)]),_:1},8,["class"])],2)])]),_:3},8,["class"])):Q("",!0),n.showDropzone?Q("",!0):(C(),T(b(gt).Trigger,{key:2,class:N(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:P(()=>[L(r.$slots,"trigger",{},()=>[z("span",null,oe(n.triggerLabel),1)])]),_:3},8,["class"])),Z(b(gt).ItemGroup,{class:N(i.value.itemGroup)},{default:P(()=>[Z(b(gt).Context,null,{default:P(({acceptedFiles:l})=>[(C(!0),H(Ce,null,Ge(l,c=>(C(),T(b(gt).Item,{key:c.name,file:c,class:N(i.value.item),"data-testid":"atlantis-file-upload-item"},{default:P(()=>[z("div",{class:N(i.value.itemInfo)},[Z(b(gt).ItemName,{class:N(i.value.itemName)},null,8,["class"]),Z(b(gt).ItemSizeText,{class:N(i.value.itemSizeText)},{default:P(()=>[Le(oe(a(c.size)),1)]),_:2},1032,["class"])],2),Z(b(gt).ItemDeleteTrigger,{class:N(i.value.itemDeleteTrigger),"data-testid":"atlantis-file-upload-delete"},{default:P(()=>[Z(b(VV),{class:N(i.value.deleteIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["file","class"]))),128))]),_:1})]),_:1},8,["class"]),Z(b(gt).HiddenInput,{"data-testid":"atlantis-file-upload-input"})]),_:3},16,["class","disabled"]))}});ne({slots:["root","checkboxItem","radioItemGroup","radioItem","itemDescription","section",...Xv.keys(),"back","create"],base:{root:{fontFamily:"sans",position:"relative",display:"flex",alignItems:"center"},arrow:{},arrowTip:{},checkboxItem:{},content:{flex:"1",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",background:"whitealpha.1000",boxShadow:"elevations-overlay",borderRadius:"md",paddingTop:"2",paddingBottom:"4",minWidth:"200px",zIndex:"1",outline:"none"},section:{color:"text.muted",fontWeight:"bold",fontSize:"xs",letterSpacing:"widest",textTransform:"uppercase",lineHeight:"xxs",paddingLeft:"8",paddingRight:"12",paddingTop:"16",paddingBottom:"6"},contextTrigger:{},back:{'& > [data-prefix="back-prefix"]':{color:"icon.subtle"},display:"flex",alignItems:"center",flexDirection:"row!",gap:"10",padding:"6"},create:{fontSize:"base",lineHeight:"lg",fontFamily:"sans",fontWeight:"normal",color:"text.normal",padding:"6",background:"background.hover",display:"flex",alignItems:"center",gap:"10",borderRadius:"md",cursor:"pointer",'& > [data-prefix="create-prefix"]':{color:"icon.subtle",display:"flex",alignItems:"center",justifyContent:"center"}},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{display:"flex",flexDirection:"column",alignItems:"flex-start",gridColumnGap:"6",paddingY:"6",paddingX:"8",borderRadius:"md",width:"100%",cursor:"pointer",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",letterSpacing:"normal",_hover:{background:"{colors.seed.50}"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_pressed:{background:"background.pressed"},_disabled:{opacity:"0.5",cursor:"not-allowed",color:"text.disabled",background:"none",_hover:{background:"none"}},"&[data-highlighted]":{backgroundColor:"background.brand-hover"},"&[data-focus]":{background:"{colors.seed.50}",boxShadow:"state-focus-primary"}},itemText:{fontFamily:"sans",fontWeight:"normal",fontSize:"sm",lineHeight:"lg"},itemDescription:{fontFamily:"sans",fontWeight:"normal",fontSize:"xs",lineHeight:"sm",color:"text.subtle"},positioner:{zIndex:"1"},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:"6",paddingY:"6",paddingX:"8",borderRadius:"md",width:"100%",cursor:"pointer",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",_after:{content:'"›"',marginLeft:"8px",color:"text.subtle"},_hover:{background:"background.hover"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_pressed:{background:"background.pressed"},_disabled:{opacity:"0.5",cursor:"not-allowed",color:"text.placeholder",background:"none"}},trigger:{background:"transparent",border:"none",outline:"none"}},variants:{variant:{critical:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{color:"text.error-default"},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},default:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{color:"text.normal"},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}}},size:{default:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},small:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},medium:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},large:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}}}},defaultVariants:{variant:"default",size:"default"}});ne({className:"header",slots:["root","container","titleSection","titleWrapper","iconWrapper","titleContent","title","subtitle","actions","tertiaryText"],base:{root:{display:"flex",flexDirection:"column",backgroundColor:"background.default",gap:"16",width:"100%",paddingRight:"24",paddingLeft:"24"},container:{display:"flex",alignItems:"center",justifyContent:"space-between",maxWidth:"100%",minHeight:"64"},titleSection:{display:"flex",alignItems:"center",flex:"0 0 auto",minWidth:"0"},titleWrapper:{display:"flex",alignItems:"center",gap:"12",minWidth:"0"},iconWrapper:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:"0",width:"32",height:"32",color:"icon.subtle"},titleContent:{display:"flex",flexDirection:"column",gap:"2",minWidth:"0"},title:{textStyle:"heading_text_h2",margin:"0",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{color:"text.subtle",textStyle:"body_base_regular",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",margin:"0"},actions:{display:"flex",alignItems:"center",gap:"8",flexShrink:"0"},tertiaryText:{overflow:"hidden",color:"text.muted",textOverflow:"ellipsis",whiteSpace:"nowrap",textStyle:"body_small_medium"}}});const RV=To({variants:{as:{h1:{textStyle:"heading_text_h1"},h2:{textStyle:"heading_text_h2"},h3:{textStyle:"heading_text_h3"},h4:{textStyle:"heading_text_h4"},h5:{textStyle:"heading_text_h5"}}}}),FV=M({__name:"Heading",props:{as:{default:"h2"}},setup(e){const t=e,n=A(()=>RV(t));return(o,i)=>(C(),T(Wt(e.as),{class:N(n.value)},{default:P(()=>[L(o.$slots,"default")]),_:3},8,["class"]))}}),AV={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function LV(e,t){return C(),H("svg",AV,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_9565_3071)"},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 6C12 9.31373 9.31373 12 6 12C2.68629 12 0 9.31373 0 6C0 2.68629 2.68629 0 6 0C9.31373 0 12 2.68629 12 6ZM7.875 8.67053L7.47725 8.27273L6 6.7955L4.52275 8.27273L4.125 8.67053L3.3295 7.875L3.72725 7.47725L5.2045 6L3.72725 4.52275L3.3295 4.125L4.125 3.3295L4.52275 3.72725L6 5.2045L7.47725 3.72725L7.875 3.3295L8.67053 4.125L8.27273 4.52275L6.7955 6L8.27273 7.47725L8.67053 7.875L7.875 8.67053Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),z("defs",null,[z("clipPath",{id:"clip0_9565_3071"},[z("rect",{width:"12",height:"12",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const NV={render:LV},Bo={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},iconDimensions:{fontSize:"1.1em",width:"1.1em",height:"1.1em"}},BV={default:{root:{boxShadow:"stroke-bordered-interactive",_focusWithin:{boxShadow:"state-focus-primary"},_focus:{boxShadow:"state-focus-primary"}}},error:{root:{boxShadow:"state-error",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},zV={gray:{prePostInput:{background:"background.hover"}},white:{prePostInput:{background:"background.default"}}},Zt=ne({slots:["root","input","prefix","suffix","prePostInput","preInput","postInput","shortcut","clearIconContainer"],base:{root:{...Bo.flexCenter,width:"100%",height:"xxl",px:"6",py:"6",columnGap:"6",borderRadius:"md",boxSizing:"border-box",cursor:"text",_hover:{backgroundColor:"background.gray-subtlest-hover"},transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",color:"graycool.1000",isolation:"isolate",minWidth:"0",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontWeight:"regular",fontFamily:"sans",fontStyle:"normal",lineHeight:"lg",whiteSpace:"nowrap",_hidden:{display:"none"},"& :where(svg)":Bo.iconDimensions},input:{height:"xxl",borderRadius:"md",flex:"1",border:"none",outline:"none",padding:"0",minWidth:"0",background:"transparent","&::placeholder":{color:"text.placeholder"}},prefix:{...Bo.flexCenter,flexShrink:"0"},suffix:{...Bo.flexCenter,flexShrink:"0"},clearIconContainer:{...Bo.flexCenter,width:"12",height:"12",cursor:"pointer",color:"icon.disabled",_hover:{color:"icon.muted"}},prePostInput:{...Bo.flexCenter,height:"xxl",paddingY:"6",paddingX:"12",gap:"8",flexShrink:"0",color:"text.subtle",fontFamily:"Inter",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"lg"},preInput:{borderRadius:"md 0 0 md",borderRight:"1px solid {colors.border.muted}"},postInput:{borderRadius:"0 md md 0",borderLeft:"1px solid {colors.border.muted}"}},variants:{variant:BV,theme:zV,state:{idle:{},disabled:{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"}}}},isBordered:{false:{root:{boxShadow:"none"}}},hasBackground:{true:{root:{backgroundColor:"background.gray-subtlest-default"}},false:{root:{backgroundColor:"transparent",_hover:{backgroundColor:"transparent"},_focusWithin:{boxShadow:"none"},_focus:{boxShadow:"none"}}}},hasPreInput:{true:{root:{paddingLeft:"0"}}},hasPostInput:{true:{root:{paddingRight:"0"}}}},defaultVariants:{variant:"default",state:"idle",isBordered:!0,theme:"gray"}}),HV=["placeholder","disabled","list","autofocus"],jV={key:1,id:"input-datalist"},WV=["value"],Ib=M({__name:"Input",props:{variant:{default:"default"},state:{default:"idle"},placeholder:{default:"Placeholder"},modelValue:{default:""},prefixText:{default:""},suffixText:{default:""},canClear:{type:Boolean,default:!1},shortcutKeys:{default:()=>[]},isAutocompleteEnable:{type:Boolean,default:!1},preInput:{default:""},postInput:{default:""},prePostInputTheme:{default:"gray"},options:{default:()=>["Alpha","Beta","Gamma","Zeta"]},isBordered:{type:Boolean,default:!0},hasBackground:{type:Boolean,default:!0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=ve(null),i=ve(n.modelValue??""),a=A(()=>n.state==="disabled"||n.disabled),r=A(()=>[Zt({variant:n.variant,state:a.value?"disabled":"idle",isBordered:n.isBordered,hasPreInput:n.preInput!=="",hasPostInput:n.postInput!=="",hasBackground:n.hasBackground}).root]),s=A(()=>Zt({state:a.value?"disabled":"idle"}).input),l=A(()=>[Zt({variant:n.variant}).prePostInput,Zt({theme:n.prePostInputTheme}).prePostInput]),c=A(()=>[...l.value,Zt({variant:n.variant}).preInput]),d=A(()=>[...l.value,Zt({variant:n.variant}).postInput]),h=A(()=>Zt().prefix),u=A(()=>Zt().suffix),p=A(()=>Zt().clearIconContainer),m=()=>i.value="",g=()=>{var f;(f=o.value)==null||f.focus()},v=t;return Be(i,f=>{v("update:modelValue",f)}),Be(()=>n.modelValue,f=>{f!==i.value&&(i.value=f??"")}),(f,y)=>(C(),H("div",{class:N(r.value),onClick:us(g,["stop"]),onKeydown:Iu(g,["enter"])},[n.preInput?(C(),H("div",{key:0,class:N(c.value)},[z("span",null,oe(n.preInput),1)],2)):Q("",!0),L(f.$slots,"prefixIcon",{},()=>[e.prefixText?(C(),H("span",{key:0,class:N(h.value)},oe(e.prefixText),3)):Q("",!0)]),Ay(z("input",W({ref_key:"inputRef",ref:o,role:"textbox"},f.$attrs,{placeholder:e.placeholder,disabled:a.value,list:e.isAutocompleteEnable?"input-datalist":void 0,class:s.value,"onUpdate:modelValue":y[0]||(y[0]=x=>i.value=x),autofocus:e.autofocus}),null,16,HV),[[Ly,i.value]]),e.isAutocompleteEnable?(C(),H("datalist",jV,[(C(!0),H(Ce,null,Ge(e.options,x=>(C(),H("option",{key:x,value:x},null,8,WV))),128))])):Q("",!0),L(f.$slots,"suffixIcon",{},()=>[e.suffixText?(C(),H("span",{key:0,class:N(u.value)},oe(e.suffixText),3)):Q("",!0)]),Z(ms,{keys:e.shortcutKeys,type:"default"},null,8,["keys"]),e.canClear&&i.value?(C(),H("span",{key:2,class:N(p.value),onClick:us(m,["stop"]),onKeydown:Iu(m,["enter"]),"data-testid":"clear"},[Z(b(NV))],34)):Q("",!0),n.postInput?(C(),H("div",{key:3,class:N(d.value)},[z("span",null,oe(n.postInput),1)],2)):Q("",!0)],34))}}),GV=ne({className:"label",slots:["root","text","mandatoryIndicator","description","suffixIcon"],base:{root:{display:"inline-block",textAlign:"left",paddingLeft:"2",color:"graycool.900",fontFamily:"sans",fontSize:"base",fontStyle:"normal",fontWeight:"semimedium",lineHeight:"lg",letterSpacing:"normal"},text:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4"},mandatoryIndicator:{color:"red.800",textAlign:"center"},description:{fontWeight:"regular",fontSize:"sm",lineHeight:"md",letterSpacing:"normal"},suffixIcon:{color:"graycoolalpha.75"}}}),UV=["for"],Tb=M({__name:"Label",props:{for:{},mandatory:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},iconTooltip:{},badgeVariant:{default:"neutral"},badgeLabel:{},description:{}},setup(e){const t=e,n=GV();return(o,i)=>(C(),H("label",{class:N(b(n).root),for:t.for},[z("span",{class:N(b(n).text)},[L(o.$slots,"default"),t.mandatory?(C(),H("span",{key:0,class:N(b(n).mandatoryIndicator)},"*",2)):Q("",!0),e.iconTooltip?(C(),T(fu,{key:1,title:e.iconTooltip},{default:P(()=>[(C(),T(Wt(e.suffixIcon&&b(xa)),{class:N(b(n).suffixIcon)},null,8,["class"]))]),_:1},8,["title"])):(C(),T(Wt(e.suffixIcon&&b(xa)),{key:2,class:N(b(n).suffixIcon)},null,8,["class"])),e.badgeVariant&&e.badgeLabel?(C(),T(rV,{key:3,variant:e.badgeVariant},{default:P(()=>[Le(oe(t.badgeLabel),1)]),_:1},8,["variant"])):Q("",!0)],2),t.description?(C(),H("span",{key:0,class:N(b(n).description)},oe(t.description),3)):Q("",!0)],10,UV))}});ne({slots:["root","icon"],base:{root:{display:"flex",alignItems:"center",gap:"4",borderRadius:"md",padding:"0",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",color:"text.subtle",lineHeight:"md",letterSpacing:"wider"},icon:{width:"12",height:"12",display:"flex",alignContent:"center"}},variants:{variant:{verified:{icon:{color:"success.default"}},draft:{icon:{color:"text.subtle"}},deprecated:{icon:{color:"error.default"}},disabled:{icon:{color:"text.subtle"}}}}});ne({slots:["root","accordionItemContent","accordionItemTrigger","contentWrapper","content","title","subtitle","suffixWrapper","logContent","stepsWrapper","firstHalfStep","secondHalfStep"],base:{root:{borderBottom:"none !important",backgroundColor:"inherit"},accordionItemContent:{paddingTop:0,paddingX:0,paddingY:0},accordionItemTrigger:{display:"flex",paddingLeft:0,paddingY:0},contentWrapper:{display:"flex",width:"100%",alignItems:"stretch",gap:"8"},content:{display:"flex",flexDirection:"column",gap:"2",paddingY:"8",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"md",letterSpacing:"wide",color:"text.subtle",flex:"1"},title:{fontWeight:"semimedium"},subtitle:{color:"text.muted",letterSpacing:"wider"},suffixWrapper:{display:"flex"},logContent:{paddingBottom:"8"},stepsWrapper:{display:"flex",flexDirection:"column",alignItems:"center",width:"20",flexShrink:"0"},firstHalfStep:{width:"0",height:"12",zIndex:"1",borderRight:"1px solid {colors.border.disabled}"},secondHalfStep:{width:"0",minHeight:"0",flex:"1",borderRight:"1px solid {colors.border.disabled}"}},variants:{variant:{default:{},waiting:{},done:{title:{color:"text.accent-green-default"}},error:{title:{color:"text.error-default"}}},isExpandable:{true:{},false:{accordionItemTrigger:{cursor:"default"}}},firstHalfStepVariant:{default:{},done:{firstHalfStep:{borderColor:"border.accent-green"}},error:{firstHalfStep:{borderColor:"border.error"}}},secondHalfStepVariant:{default:{},done:{secondHalfStep:{borderColor:"border.accent-green"}},error:{secondHalfStep:{borderColor:"border.error"}}},isFirstHalfStepHidden:{true:{firstHalfStep:{borderRight:"none"}}},isSecondHalfStepHidden:{true:{secondHalfStep:{borderRight:"none"}}},isSelected:{true:{root:{backgroundColor:"background.selected"}}}},defaultVariants:{variant:"default",isExpandable:!1,firstHalfStepVariant:"default",secondHalfStepVariant:"default",isFirstHalfStepHidden:!1,isSecondHalfStepHidden:!1,isSelected:!1}});ne({className:"separator",slots:["root","line"],base:{root:{display:"flex",justifyContent:"center",alignItems:"center",width:"auto",height:"auto"},line:{borderStyle:"solid",borderColor:"border.muted",borderWidth:"1px"}},variants:{orientation:{horizontal:{root:{padding:"4 0",flexDirection:"row"},line:{width:"100%",height:0,borderTopWidth:"1px",borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0}},vertical:{root:{alignItems:"flex-start",padding:"0 4",flexDirection:"column"},line:{height:"100%",width:0,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:"1px"}}},size:{1:{},2:{},3:{},4:{},full:{}}},defaultVariants:{orientation:"horizontal",size:"4"}});ne({slots:["root","label","value"],base:{root:{display:"flex",flexDirection:"column",padding:"16",width:"100%",height:"5.5rem",justifyContent:"flex-start",overflow:"hidden"},label:{textStyle:"body_xsmall_caps_medium",color:"text.subtle",paddingBottom:"8"},value:{textStyle:"heading_text_h3",color:"text.normal"}},variants:{size:{sm:{root:{minWidth:"min(100%, 223px)"}},md:{},xl:{root:{minWidth:"334px"}}},isTitle:{true:{root:{backgroundColor:"background.gray-subtler-default",height:"100%",minHeight:"100%",justifyContent:"flex-start"},label:{textStyle:"body_xsmall_caps_medium"},value:{textStyle:"heading_h1"}}},defaultBackgroundColor:{true:{root:{backgroundColor:"background.default"}}},hoverable:{true:{root:{cursor:"pointer",_hover:{backgroundColor:"background.brand-selected"}}}}}});ne({slots:["root","table","titleCell","metricCell","buttonCellContent"],base:{root:{border:"1px solid",borderColor:"border.muted",borderRadius:"lg",backgroundColor:"background.default",height:"100%",overflow:"hidden"},table:{width:"100%",borderCollapse:"collapse",height:"100%","& tr":{height:"100%"}},titleCell:{borderRight:"1px solid",borderColor:"border.muted",padding:"0",verticalAlign:"top",minWidth:"200px",width:"300px"},metricCell:{borderRight:"1px solid",borderBottom:"1px solid",borderColor:"border.muted",padding:"0",verticalAlign:"top",height:"5.5rem",minWidth:"200px",overflow:"hidden"},buttonCellContent:{display:"flex",flexDirection:"column",padding:"16",width:"100%",height:"5.5rem",justifyContent:"center",alignItems:"center"}},variants:{titlePosition:{left:{},top:{titleCell:{borderBottom:"1px solid"}}},showMoreButton:{true:{}},borderRadiusTopLeft:{none:{root:{borderTopLeftRadius:"none"}},sm:{root:{borderTopLeftRadius:"sm"}},md:{root:{borderTopLeftRadius:"md"}},lg:{root:{borderTopLeftRadius:"lg"}},xl:{root:{borderTopLeftRadius:"xl"}}},borderRadiusTopRight:{none:{root:{borderTopRightRadius:"none"}},sm:{root:{borderTopRightRadius:"sm"}},md:{root:{borderTopRightRadius:"md"}},lg:{root:{borderTopRightRadius:"lg"}},xl:{root:{borderTopRightRadius:"xl"}}},borderRadiusBottomLeft:{none:{root:{borderBottomLeftRadius:"none"}},sm:{root:{borderBottomLeftRadius:"sm"}},md:{root:{borderBottomLeftRadius:"md"}},lg:{root:{borderBottomLeftRadius:"lg"}},xl:{root:{borderBottomLeftRadius:"xl"}}},borderRadiusBottomRight:{none:{root:{borderBottomRightRadius:"none"}},sm:{root:{borderBottomRightRadius:"sm"}},md:{root:{borderBottomRightRadius:"md"}},lg:{root:{borderBottomRightRadius:"lg"}},xl:{root:{borderBottomRightRadius:"xl"}}},hideBorderTop:{true:{root:{borderTop:"none"}}},hideBorderBottom:{true:{root:{borderBottom:"none"}}},hideBorderLeft:{true:{root:{borderLeft:"none"}}},hideBorderRight:{true:{root:{borderRight:"0px"}}},isRightEdge:{true:{titleCell:{borderRight:"none"},metricCell:{borderRight:"none"}}},isBottomEdge:{true:{metricCell:{borderBottom:"none"}}}}});ne({slots:["root","backdrop","content","header","title","titleNested","breadcrumbs","closeButton","body","footer","actions"],base:{root:{fontFamily:"sans",outline:"none",position:"relative",zIndex:50},backdrop:{position:"fixed",inset:"0",backgroundColor:"{colors.blackalpha.500}",zIndex:40},content:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"350",backgroundColor:"background.default",borderRadius:"lg",outline:"none",boxShadow:"elevations-overlay",overflow:"hidden",zIndex:1},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16",width:"100%",position:"relative"},title:{color:"text.normal",fontWeight:"bold",fontSize:"md",lineHeight:"lg",letterSpacing:"tight",fontFamily:"sans",marginY:"0"},titleNested:{color:"text.normal",fontWeight:"bold",fontSize:"md",lineHeight:"lg",letterSpacing:"tight",display:"flex",alignItems:"center",marginY:"0"},breadcrumbs:{display:"flex",alignItems:"center","& .separator":{margin:"0 04",color:"text.subtle"},"& ol":{paddingInlineStart:"0",marginY:"0"}},closeButton:{backgroundColor:"transparent",border:"none",padding:"0",margin:"0",cursor:"pointer",color:"icon.normal"},body:{fontFamily:"sans",padding:"16",display:"flex",flexDirection:"column",gap:"16",color:"text.subtle",position:"relative"},footer:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"16",width:"100%",backgroundColor:"background.neutral-default",position:"relative"},actions:{display:"flex",gap:"12",position:"relative",zIndex:1}},variants:{size:{small:{content:{minWidth:"22em"}},large:{content:{minWidth:"39em"}}},variant:{default:{},custom:{},nested:{header:{padding:"16"},breadcrumbs:{width:"100%"}}},footerVariant:{default:{},critical:{}},layout:{default:{footer:{'&[data-variant="default"]':{justifyContent:"flex-end"},'&[data-variant="extra"]':{justifyContent:"space-between"}}},multiAction:{footer:{justifyContent:"space-between"}}}},defaultVariants:{size:"small",variant:"default",footerVariant:"default",layout:"default"}});ne({slots:[...ob.keys(),"contentDefault","header","footer"],base:{positioner:{background:"background.default",boxShadow:"elevations-overlay",borderRadius:"md",fontFamily:"sans"},content:{outline:"none",_focusVisible:{outline:"none"}},contentDefault:{paddingX:"8",paddingY:"12"},header:{borderBottom:"1px solid {colors.graycool.100}"},footer:{borderTop:"1px solid {colors.graycool.100}"},trigger:{padding:0,border:"none"}},variants:{},defaultVariants:{}});const Lp=ne({slots:["root","container","item","shortcut","icon","dependentField"],base:{root:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:"6",borderRadius:"md",gap:"4",background:"background.neutral-hover",width:"fit-content"},container:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4",width:"100%"},item:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6",borderRadius:"md",paddingY:"4",paddingX:"8",cursor:"pointer",whiteSpace:"nowrap",userSelect:"none",fontFamily:"sans",fontSize:"sm",lineHeight:"lg",transition:"all 0.2s ease",color:"text.subtle",fontWeight:"medium",position:"relative",border:"none",background:"transparent",_hover:{color:"text.normal",background:"background.hover"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_active:{color:"text.brand-default"}},icon:{display:"flex",alignItems:"center",justifyContent:"center",color:"icon.subtle",width:"16",height:"16"},dependentField:{position:"absolute",right:"8",display:"flex",alignItems:"center",justifyContent:"center"}},variants:{size:{medium:{root:{height:"40"},icon:{width:"16",height:"16"},item:{}}},isDisabled:{true:{root:{opacity:.5,cursor:"not-allowed"}}},state:{idle:{item:{_active:{color:"text.brand-default"}},icon:{color:"icon.subtle"},shortcut:{}},active:{item:{color:"text.brand-default",background:"background.default",boxShadow:"stroke-bordered-interactive",_hover:{color:"text.brand-default",background:"background.default"}},icon:{color:"icon.brand-default"},shortcut:{color:"text.subtle"}},disabled:{item:{cursor:"not-allowed",color:"text.placeholder",_hover:{background:"transparent",color:"text.placeholder"}},icon:{color:"icon.placeholder"},shortcut:{color:"text.placeholder"}}},hasIcon:{true:{}},hasShortcut:{true:{}},hasDependentField:{true:{item:{paddingRight:"40"}}}},compoundVariants:[{hasIcon:!0,css:{item:{gap:"4"}}}],defaultVariants:{size:"medium",isDisabled:!1,state:"idle",hasIcon:!1,hasShortcut:!1,hasDependentField:!1}}),YV=["id","aria-label"],qV=["id","aria-selected","aria-disabled","tabindex","onClick","onKeydown","data-state"],KV=M({__name:"Segmented",props:{id:{},options:{},modelValue:{default:""},size:{default:"medium"},isDisabled:{type:Boolean,default:!1},ariaLabel:{default:"Segmented Control"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=t,i=ve(n.modelValue);Cf(()=>{i.value=n.modelValue});const a=A(()=>Lp({size:n.size,isDisabled:n.isDisabled})),r=d=>{n.isDisabled||d.isDisabled||(i.value=d.value,o("update:modelValue",d.value),o("change",d.value))},s=(d,h,u)=>{var p,m;if(n.isDisabled)return;const g=n.options.filter(f=>!f.isDisabled),v=g.findIndex(f=>f.value===h.value);switch(d.preventDefault(),d.key){case"ArrowRight":case"ArrowDown":if(v<g.length-1){const f=g[v+1];r(f),(p=document.getElementById(`segmented-item-${f.value}`))==null||p.focus()}break;case"ArrowLeft":case"ArrowUp":if(v>0){const f=g[v-1];r(f),(m=document.getElementById(`segmented-item-${f.value}`))==null||m.focus()}break;case"Enter":case" ":r(h);break}},l=d=>n.isDisabled||d.isDisabled?"disabled":d.value===i.value?"active":"idle",c=d=>{var h,u;const p=l(d);return Lp({state:p,hasIcon:!!d.icon,hasShortcut:!!((h=d.shortcutKeys)!=null&&h.length)||!!((u=d.counterKey)!=null&&u.length),hasDependentField:!!d.hasDependentField,size:n.size,isDisabled:n.isDisabled||d.isDisabled})};return(d,h)=>(C(),H("div",{class:N(a.value.root),id:e.id,role:"tablist","aria-label":e.ariaLabel,"data-testid":"segmented-control"},[z("div",{class:N(a.value.container)},[(C(!0),H(Ce,null,Ge(e.options,(u,p)=>{var m,g;return C(),H("button",{key:u.value,type:"button",id:`segmented-item-${u.value}`,class:N(c(u).item),role:"tab","aria-selected":u.value===i.value,"aria-disabled":n.isDisabled||u.isDisabled,tabindex:u.value===i.value?0:-1,onClick:v=>r(u),onKeydown:v=>s(v,u),"data-testid":"segmented-item","data-state":u.value===i.value?"active":"idle"},[u.icon?(C(),T(Wt(u.icon),{key:0,class:N(c(u).icon)},null,8,["class"])):Q("",!0),z("span",null,oe(u.label),1),(m=u?.shortcutKeys)!=null&&m.length?(C(),T(ms,{key:1,keys:u.shortcutKeys,type:"default"},null,8,["keys"])):Q("",!0),(g=u?.counterKey)!=null&&g.length?(C(),T(ms,{key:2,keys:u.counterKey,type:"default"},null,8,["keys"])):Q("",!0),u.hasDependentField?(C(),H("span",{key:3,class:N(c(u).dependentField)},[L(d.$slots,`dependent-field-${u.value}`)],2)):Q("",!0)],42,qV)}),128))],2)],10,YV))}}),XV={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function ZV(e,t){return C(),H("svg",XV,[...t[0]||(t[0]=[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.96966 11.0303L10.5 11.5607L11.5607 10.5L11.0303 9.96966L9.06065 7.99999L11.0303 6.03032L11.5607 5.49999L10.5 4.43933L9.96966 4.96966L7.99999 6.93933L6.03032 4.96966L5.49999 4.43933L4.43933 5.49999L4.96966 6.03032L6.93933 7.99999L4.96966 9.96966L4.43933 10.5L5.49999 11.5607L6.03032 11.0303L7.99999 9.06065L9.96966 11.0303Z",fill:"currentColor"},null,-1)])])}const JV={render:ZV},St=ne({slots:[...Bv.keys(),"branchIndentGuide","nodeProvider","info","treeNodeIcon","treeNode","checkbox","branchControlButton"],base:{root:{width:"full",height:"fit-content",display:"flex",flexDirection:"column",gap:"2"},branchContent:{},treeNode:{},branchControl:{display:"flex",alignItems:"center",gap:"6",paddingY:"2",paddingLeft:"6",paddingRight:"4",borderRadius:"md"},branchControlButton:{flex:1,display:"flex",alignItems:"center",gap:"6",cursor:"pointer",color:"text.normal",_hover:{bg:"background.hover"},_focusVisible:{outline:"none",boxShadow:"state-focus-primary"},_selected:{backgroundColor:"{colors.seed.100}",_hover:{backgroundColor:"{colors.seed.100}"},outline:"none"},'&[aria-disabled="true"]':{opacity:.4,cursor:"not-allowed",_hover:{bg:"transparent"},pointerEvents:"none",color:"text.disabled"}},branchIndentGuide:{},branchIndicator:{display:"flex",alignItems:"center",justifyContent:"center",'&[data-state="open"]':{transform:"rotate(90deg)"}},branch:{},branchText:{fontSize:"base",fontFamily:"sans",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",color:"text.normal"},branchTrigger:{},item:{display:"flex",alignItems:"center",gap:"6",paddingY:"2",paddingLeft:"6",paddingRight:"4",borderRadius:"md",cursor:"pointer",color:"text.normal",_hover:{bg:"background.hover"},_focusVisible:{outline:"none",boxShadow:"state-focus-primary"},_selected:{outline:"none",bg:"{colors.seed.100}",_hover:{bg:"{colors.seed.100}"}},'&[aria-disabled="true"]':{opacity:.4,cursor:"not-allowed",_hover:{bg:"transparent"},pointerEvents:"none",color:"text.disabled"}},itemText:{fontSize:"base",fontFamily:"sans",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",color:"text.normal"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center",width:"16",height:"16",color:"icon.normal",'&[data-state="open"]':{transform:"rotate(90deg)"}},info:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"icon.disabled",width:"14",height:"14","& svg":{width:"100%",height:"100%"}},treeNodeIcon:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"text.normal",width:"16",height:"16","& svg":{width:"100%",height:"100%"}},label:{},nodeProvider:{},tree:{},checkbox:{display:"inline-flex",alignItems:"center"}}}),QV=M({__name:"TreeViewBranch",props:{"aria-level":{},"aria-posinset":{},"aria-setsize":{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).Branch,W(b(n),{"aria-level":t["aria-level"],"aria-posinset":t["aria-posinset"],"aria-setsize":t["aria-setsize"],class:[o.value.branch],"data-testid":"atlantis-tree-view-branch"}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["aria-level","aria-posinset","aria-setsize","class"]))}}),eD=M({__name:"TreeViewBranchContent",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).BranchContent,W(b(t),{class:[n.value.branchContent],"data-testid":"atlantis-tree-view-branch-content"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),tD=M({__name:"TreeViewBranchControl",props:{depth:{default:0},"aria-labelledby":{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).BranchControl,W(b(n),{"aria-labelledby":t["aria-labelledby"],class:[o.value.branchControl],"data-testid":"atlantis-tree-view-branch-control",style:t.depth>1?{marginLeft:`${(t.depth-1)*24}px`}:{}}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["aria-labelledby","class","style"]))}}),nD=M({__name:"TreeViewBranchIndentGuide",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).BranchIndentGuide,W(b(t),{class:[n.value.branchIndentGuide],"data-testid":"atlantis-tree-view-branch-indent-guide"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),oD=M({__name:"TreeViewBranchIndicator",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).BranchIndicator,W(b(t),{class:[n.value.branchIndicator],"data-testid":"atlantis-tree-view-branch-indicator"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),iD=M({__name:"TreeViewBranchText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).BranchText,W(b(n),{id:t.id,class:[o.value.branchText],"data-testid":"atlantis-tree-view-branch-text"}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["id","class"]))}}),aD=M({__name:"TreeViewItem",props:{depth:{default:0},asChild:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Ct(n),a=A(()=>St());return(r,s)=>(C(),T(b(wn).Item,W(b(i),{class:[a.value.item],"data-testid":"atlantis-tree-view-item",style:n.depth>1?{marginLeft:`${(n.depth-1)*24}px`}:{},onClick:s[0]||(s[0]=l=>o("click",l))}),{default:P(()=>[L(r.$slots,"default")]),_:3},16,["class","style"]))}}),rD=M({__name:"TreeViewItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).ItemIndicator,W(b(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-tree-view-item-indicator"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),sD=M({__name:"TreeViewItemText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).ItemText,W(b(n),{id:t.id,class:[o.value.itemText],"data-testid":"atlantis-tree-view-item-text"}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["id","class"]))}}),Np=M({__name:"TreeViewItemCheckbox",props:{"aria-labelledby":{},disabled:{type:Boolean,default:!1},checked:{default:!1},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!1},defaultChecked:{},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=Ct(n),a=A(()=>St());return(r,s)=>(C(),H("span",{class:N([a.value.checkbox])},[Z(IV,W(b(i),{checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],onCheckedChange:s[0]||(s[0]=l=>o("checkedChange",l)),onClick:s[1]||(s[1]=us(()=>{},["stop"]))}),{default:P(()=>[L(r.$slots,"default")]),_:3},16,["checked","disabled","aria-labelledby"])],2))}}),lD=M({__name:"TreeViewItemInfo",props:{placement:{default:"top"},title:{},"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>St());return(o,i)=>(C(),H("span",null,[Z(fu,{title:t.title,placement:t.placement},{default:P(()=>[L(o.$slots,"default",{},()=>[Z(b(xa),{class:N(n.value.info)},null,8,["class"])])]),_:3},8,["title","placement"])]))}}),Pb=M({__name:"TreeNode",props:{node:{},indexPath:{},treeView:{},selectionMode:{},selectedValue:{}},emits:["node-select"],setup(e,{emit:t}){const n=e,o=t,i=A(()=>St()),a=A(()=>`tree-node-text-${n.node.id}`),r=A(()=>Math.max(1,n.indexPath.length+1)),s=A(()=>{if(n.indexPath.length===0)return 1;const u=n.indexPath[n.indexPath.length-1];return Math.max(1,u+1)}),l=A(()=>{var u,p,m,g,v,f,y,x;if(n.indexPath.length===0){const O=((g=(m=(p=(u=n.treeView)==null?void 0:u.collection)==null?void 0:p.rootNode)==null?void 0:m.children)==null?void 0:g.length)||0;return Math.max(1,O)}const w=(f=(v=n.treeView)==null?void 0:v.collection)==null?void 0:f.rootNode;if(!w)return 1;let S=w;for(let O=0;O<n.indexPath.length-1;O++){const _=n.indexPath[O];if((y=S?.children)!=null&&y[_])S=S.children[_];else return 1}const k=((x=S?.children)==null?void 0:x.length)||0;return Math.max(1,k)}),c=()=>{(!n.node.children||n.node.children.length===0)&&o("node-select",n.node.id,!0)},d=u=>{const p=[];if(u.children)for(const m of u.children)p.push(m.id),m.children&&p.push(...d(m));return p},h=A(()=>{if(n.selectionMode!=="multiple")return n.selectedValue.includes(n.node.id);const u=n.selectedValue.includes(n.node.id);if(!n.node.children||n.node.children.length===0)return u;const p=d(n.node),m=p.filter(g=>n.selectedValue.includes(g)).length;return m===0?!!u:m===p.length?!0:"indeterminate"});return(u,p)=>(C(),T(b(Nv),{node:n.node,indexPath:n.indexPath},{default:P(()=>[n.node.children&&n.node.children.length>0?(C(),T(b(QV),{key:0,"aria-level":r.value,"aria-posinset":s.value,"aria-setsize":l.value},{default:P(()=>[Z(b(nD),null,{default:P(()=>[z("div",{class:N([i.value.branchControl])},[Z(b(tD),{disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,depth:n.indexPath.length,"aria-labelledby":a.value,class:N(i.value.branchControlButton)},{default:P(()=>[Z(b(oD),null,{default:P(()=>[Z(b(gV))]),_:1}),n.selectionMode==="multiple"?(C(),T(b(Np),{key:0,checked:h.value,disabled:n.node.isDisabled,"aria-labelledby":a.value,onCheckedChange:p[0]||(p[0]=()=>o("node-select",n.node.id,!1))},null,8,["checked","disabled","aria-labelledby"])):Q("",!0),n.node.icon?(C(),T(Wt(n.node.icon),{key:1,class:N([i.value.treeNodeIcon])},null,8,["class"])):Q("",!0),Z(b(iD),{id:a.value},{default:P(()=>[Le(oe(n.node.name),1)]),_:1},8,["id"])]),_:1},8,["disabled","aria-disabled","depth","aria-labelledby","class"])],2)]),_:1}),Z(b(eD),null,{default:P(()=>[(C(!0),H(Ce,null,Ge(n.node.children,(m,g)=>(C(),T(Pb,{key:m.id,node:m,indexPath:[...n.indexPath,g],treeView:n.treeView,selectedValue:n.selectedValue,selectionMode:n.selectionMode,onNodeSelect:p[1]||(p[1]=(v,f)=>o("node-select",v,f))},{default:P(()=>[L(u.$slots,"default")]),_:3},8,["node","indexPath","treeView","selectedValue","selectionMode"]))),128))]),_:3})]),_:3},8,["aria-level","aria-posinset","aria-setsize"])):(C(),T(b(aD),{key:1,depth:n.indexPath.length,disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,"aria-level":r.value,"aria-posinset":s.value,"aria-setsize":l.value,class:N([i.value.item]),onClick:c},{default:P(()=>{var m,g,v,f,y;return[n.selectionMode==="multiple"?(C(),T(b(Np),{key:0,checked:h.value,disabled:n.node.isDisabled,"aria-labelledby":a.value,onCheckedChange:p[2]||(p[2]=()=>o("node-select",n.node.id,!0))},null,8,["checked","disabled","aria-labelledby"])):Q("",!0),(m=n.node)!=null&&m.icon?(C(),T(b(rD),{key:1},{default:P(()=>[n.node.icon?(C(),T(Wt(n.node.icon),{key:0,class:N([i.value.treeNodeIcon])},null,8,["class"])):Q("",!0)]),_:1})):Q("",!0),Z(b(sD),{id:a.value},{default:P(()=>[Le(oe(n.node.name),1)]),_:1},8,["id"]),(v=(g=n.node)==null?void 0:g.info)!=null&&v.isVisible?(C(),T(b(lD),{key:2,title:(y=(f=n.node)==null?void 0:f.info)==null?void 0:y.title},null,8,["title"])):Q("",!0)]}),_:1},8,["depth","disabled","aria-disabled","aria-level","aria-posinset","aria-setsize","class"]))]),_:3},8,["node","indexPath"]))}}),Bp={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},noSurrounding:{boxShadow:"none",border:"none",outline:"none"}},cD={default:{trigger:{boxShadow:"stroke-bordered-interactive",_focusVisible:{boxShadow:"state-focus-primary"}}},error:{trigger:{boxShadow:"state-error",_focusVisible:{boxShadow:"state-focus-critical"}}}},$e=ne({slots:[...rb.keys(),"pillWrapper","pill","iconButton","crossIcon","checkIcon","loadingContainer","errorContainer","errorIcon"],base:{root:{width:"100%",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontFamily:"sans",display:"flex",flexDirection:"column",gap:"8"},errorContainer:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",minHeight:"32",width:"100%",gap:"8",color:"text.error-default"},errorIcon:{width:"16",height:"16",color:"icon.error-default"},loadingContainer:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",minHeight:"32",width:"100%",gap:"4",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",color:"text.subtle"},pillWrapper:{display:"flex",flexWrap:"wrap",gap:"6",alignItems:"center",width:"100%"},pill:{display:"flex",alignItems:"center",justifyContent:"center",gap:"4",height:"24",paddingLeft:"8",borderRadius:"md",background:"background.gray-subtlest-default",boxShadow:"inner-highlighted-ring",fontSize:"sm",lineHeight:"lg",letterSpacing:"wider",color:"text.normal",fontFamily:"sans",fontWeight:"normal"},crossIcon:{width:"14",height:"14",color:"icon.muted"},checkIcon:{width:"14",height:"14",color:"icon.selected"},iconButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"16",height:"16",padding:"0",border:"none",outline:"none",boxShadow:"none",cursor:"pointer",color:"icon.muted",borderRadius:"sm",marginRight:"4",background:"background.gray-subtlest-default",_hover:{color:"icon.hovered",backgroundColor:"background.gray-subtler-hover"},_focusVisible:{boxShadow:"state-focus-primary"}},control:{borderRadius:"md",boxSizing:"border-box",backgroundColor:"background.gray-subtlest-default",cursor:"pointer",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",lineHeight:"lg",display:"flex",alignItems:"center",outline:"none","& :where(svg)":{width:"16",height:"16",color:"icon.muted"},'&[data-state="open"]':{boxShadow:"state-selected"}},trigger:{...Bp.noSurrounding,display:"flex",alignItems:"center",borderRadius:"md",justifyContent:"space-between",width:"100%",background:"background.gray-subtlest-default",cursor:"pointer",paddingY:"6",paddingX:"12",minHeight:"32",gap:"6","&[data-placeholder-shown]":{color:"text.subtle",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},"&[data-disabled]":{backgroundColor:"background.disabled",color:"text.disabled","&:hover":{backgroundColor:"background.disabled"},boxShadow:"none"},"&[data-disabled]:not([data-placeholder-shown])":{color:"text.subtle"},"&:not([data-disabled]):hover":{background:"background.gray-subtlest-hover"},'&[data-state="open"]':{boxShadow:"state-selected","& [data-chevron]":{transform:"rotate(180deg)"}}},valueText:{flex:"1",textAlign:"left",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",color:"text.subtle","&[data-placeholder]":{color:"text.subtle"}},indicator:{...Bp.flexCenter,color:"icon.muted",_disabled:{color:"icon.disabled"},"& [data-chevron]":{transition:"transform 0.2s ease",transform:"rotate(0deg)"}},item:{paddingY:"6",paddingX:"8",my:"4",borderRadius:"md",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",_hover:{backgroundColor:"background.hover"},_selected:{backgroundColor:"background.selected",color:"text.selected",fontWeight:"medium"},_disabled:{cursor:"not-allowed",color:"text.disabled",backgroundColor:"transparent",_hover:{backgroundColor:"transparent"}},_focus:{backgroundColor:"background.hover",boxShadow:"state-focus-primary"},_highlighted:{backgroundColor:"background.hover"},"&[data-highlighted]":{backgroundColor:"background.hover"},"&[data-focus]":{backgroundColor:"background.hover",boxShadow:"state-focus-primary"}},itemGroup:{paddingX:"4",paddingY:"2"},positioner:{marginTop:"-4",width:"100%",borderRadius:"md"},content:{width:"100%",color:"text.normal",boxShadow:"elevations-overlay",background:"elevation.surface-raised-default",borderRadius:"md",maxHeight:"300",overflowY:"auto",padding:"4",outline:"none",zIndex:"dropdown"},itemIndicator:{marginLeft:"auto",width:"14",height:"14",color:"icon.selected"},label:{color:"text.subtle",fontSize:"sm",fontWeight:"medium",lineHeight:"md",fontFamily:"sans"}},variants:{variant:cD,state:{idle:{},disabled:{control:{cursor:"not-allowed",backgroundColor:"background.disabled",color:"text.disabled",boxShadow:"none",_hover:{backgroundColor:"background.disabled"}}}},isMultiple:{true:{},false:{}}},defaultVariants:{variant:"default",state:"idle"}}),dD=["aria-label","onClick","onKeydown"],uD={key:1},hD=["aria-label"],ml=M({__name:"Select",props:{modelValue:{},variant:{default:"default"},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},errorMessage:{default:""},options:{default:()=>[]},placeholder:{default:"Select an option"},label:{default:""},multiple:{type:Boolean,default:!1},defaultOpen:{type:Boolean,default:!1},loopFocus:{type:Boolean,default:!0},composite:{type:Boolean,default:!0},typeahead:{type:Boolean,default:!0},isTree:{type:Boolean,default:!1},closeOnSelect:{type:Boolean},defaultHighlightedValue:{},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,o=t,i=Ct(n,o),a=w=>{const S=[],k=O=>{for(const _ of O)S.push(_),_.children&&k(_.children)};return k(w),S},r=A(()=>n.modelValue?n.isTree?a(n.options).filter(w=>n.modelValue.includes(w.value)):n.options.filter(w=>n.modelValue.includes(w.value)):[]),s=y_({items:n.options}),l=w=>({id:w.value,name:w.label,isDisabled:w.disabled,children:w.children?w.children.map(l):void 0}),c=A(()=>{if(!n.isTree)return null;const w=n.options.map(l);return mh({nodeToValue:S=>S.id,nodeToString:S=>S.name,rootNode:{id:"ROOT",name:"",children:w}})}),d=mh({nodeToValue:w=>w.id,nodeToString:w=>w.name,rootNode:{id:"ROOT",name:"",children:[]}}),h=Gv({collection:c.value||d}),u=A(()=>({root:$e({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).root,trigger:$e({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).trigger,content:$e().content,item:$e().item,itemGroup:$e().itemGroup,indicator:$e().indicator,positioner:$e().positioner,selectedIndicator:$e().itemIndicator,label:$e().label,control:$e({variant:n.variant,state:n.isDisabled?"disabled":"idle",isMultiple:n.multiple}).control,pillWrapper:$e().pillWrapper,pill:$e().pill,iconButton:$e().iconButton,crossIcon:$e().crossIcon,checkIcon:$e().checkIcon,loadingContainer:$e().loadingContainer,errorMessage:$e().errorMessage,errorContainer:$e().errorContainer,errorIcon:$e().errorIcon})),p=w=>{const S=(n.modelValue||[]).filter(k=>k!==w.value);o("update:modelValue",S)},m=(w,S)=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),p(S))},g=w=>{const S=[];if(w.children)for(const k of w.children)S.push(k.id),S.push(...g(k));return S},v=(w,S)=>{for(const k of w){if(k.id===S)return k;if(k.children){const O=v(k.children,S);if(O)return O}}return null},f=(w,S)=>{const k=g(w);return k.length===0?!1:k.every(O=>S.includes(O))},y=(w,S)=>{const k=g(w);if(k.length===0)return!1;const O=k.filter(_=>S.includes(_)).length;return O>0&&O<k.length},x=(w,S)=>{if(!n.multiple||!n.isTree||!c.value){if(n.multiple){const $=[...n.modelValue||[]],R=$.indexOf(w);R>-1?$.splice(R,1):$.push(w),o("update:modelValue",$)}else o("update:modelValue",[w]);return}const k=c.value.rootNode.children||[],O=v(k,w);if(!O)return;const _=[...n.modelValue||[]];if(_.includes(w)){const $=_.indexOf(w);$>-1&&_.splice($,1);const R=g(O);for(const q of R){const V=_.indexOf(q);V>-1&&_.splice(V,1)}}else{_.includes(w)||_.push(w);const $=g(O);for(const R of $)_.includes(R)||_.push(R)}const E=[..._],I=$=>{for(const R of $)if(R.children&&R.children.length>0){I(R.children);const q=f(R,E),V=y(R,E);if(q)E.includes(R.id)||E.push(R.id);else if(!V){const D=E.indexOf(R.id);D>-1&&E.splice(D,1)}}};I(k),o("update:modelValue",E)};return(w,S)=>(C(),T(b(tt).Root,W(b(i),{collection:b(s),class:u.value.root,disabled:n.isDisabled,defaultOpen:n.defaultOpen,loopFocus:n.loopFocus,composite:n.composite,typeahead:n.typeahead}),{default:P(()=>[n.label?(C(),T(b(tt).Label,{key:0,class:N(u.value.label),"data-testid":"select-label",id:"select-label"},{default:P(()=>[Le(oe(n.label),1)]),_:1},8,["class"])):Q("",!0),Z(b(tt).Control,{class:N(u.value.control)},{default:P(()=>[Z(b(tt).Trigger,{class:N(u.value.trigger),"data-testid":"select-input","aria-labelledby":n.label?"select-label":void 0,"aria-expanded":n.defaultOpen,role:"combobox","aria-haspopup":n.isTree?"tree":"listbox","aria-invalid":n.variant==="error","aria-errormessage":n.errorMessage?"select-error":void 0},{default:P(()=>[n.multiple&&r.value.length?(C(),H("div",{key:0,class:N(u.value.pillWrapper)},[(C(!0),H(Ce,null,Ge(r.value,k=>(C(),H("div",{key:k.value,class:N(u.value.pill)},[z("span",null,oe(k.label),1),z("button",{type:"button",class:N(u.value.iconButton),"aria-label":"Remove "+k.label,onClick:us(O=>p(k),["stop"]),onKeydown:O=>m(O,k)},[Z(b(JV),{class:N(u.value.crossIcon)},null,8,["class"])],42,dD)],2))),128))],2)):n.isTree&&!n.multiple&&r.value.length?(C(),H("span",uD,oe(r.value[0].label),1)):(C(),T(b(tt).ValueText,{key:2,placeholder:e.placeholder},null,8,["placeholder"])),Z(b(tt).Indicator,{class:N(u.value.indicator)},{default:P(()=>[Z(b(u1),{"data-chevron":""})]),_:1},8,["class"])]),_:1},8,["class","aria-labelledby","aria-expanded","aria-haspopup","aria-invalid","aria-errormessage"])]),_:1},8,["class"]),Z(b(tt).Positioner,{class:N(u.value.positioner)},{default:P(()=>[Z(b(tt).Content,{class:N(u.value.content),role:n.isTree?void 0:"listbox"},{default:P(()=>[n.isLoading?(C(),H("div",{key:0,class:N(u.value.loadingContainer)},[L(w.$slots,"loading",{},()=>[Z(ym,{size:"sm"}),S[0]||(S[0]=z("span",null,"Loading...",-1))])],2)):n.variant==="error"&&n.errorMessage?(C(),H("div",{key:1,class:N(u.value.errorContainer),id:"select-error",role:"alert"},[L(w.$slots,"error-content",{},()=>[Z(b(cV),{class:N(u.value.errorIcon)},null,8,["class"]),z("span",null,oe(n.errorMessage),1)])],2)):n.isTree&&c.value?(C(),H("div",{key:2,class:N(u.value.itemGroup),role:"group","aria-label":n.label?`${n.label} tree options`:"Select options"},[Z(b(Uv),{collection:c.value},{default:P(()=>[Z(b(Yv),{"aria-label":n.label?`${n.label} tree`:"Options tree","aria-multiselectable":n.multiple},{default:P(()=>[(C(!0),H(Ce,null,Ge(c.value.rootNode.children,(k,O)=>(C(),T(Pb,{key:k.id,node:k,indexPath:[O],treeView:b(h),selectionMode:n.multiple?"multiple":"single",selectedValue:n.modelValue||[],onNodeSelect:x},null,8,["node","indexPath","treeView","selectionMode","selectedValue"]))),128))]),_:1},8,["aria-label","aria-multiselectable"])]),_:1},8,["collection"])],10,hD)):(C(),T(b(tt).ItemGroup,{key:3,class:N(u.value.itemGroup)},{default:P(()=>[(C(!0),H(Ce,null,Ge(n.options,k=>(C(),T(b(tt).Item,{key:k.value,item:k,class:N(u.value.item),disabled:k.disabled,"data-testid":"select-option-"+k.value,role:"option","aria-selected":(n.modelValue||[]).includes(k.value),"aria-disabled":k.disabled},{default:P(()=>[Z(b(tt).ItemText,null,{default:P(()=>[Le(oe(k.label),1)]),_:2},1024),Z(b(tt).ItemIndicator,{class:N(u.value.selectedIndicator),"aria-hidden":"true"},{default:P(()=>[Z(b($b),{class:N(u.value.checkIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["item","class","disabled","data-testid","aria-selected","aria-disabled"]))),128))]),_:1},8,["class"]))]),_:3},8,["class","role"])]),_:3},8,["class"]),Z(b(tt).HiddenSelect)]),_:3},16,["collection","class","disabled","defaultOpen","loopFocus","composite","typeahead"]))}});ne({slots:db.keys(),base:{root:{},resizeTrigger:{position:"relative",outlineWidth:"0",padding:"0",border:"0",_focus:{backgroundColor:"border.brand"},_focusWithin:{backgroundColor:"border.brand"},_after:{content:'""',display:"block",position:"absolute",background:"transparent"}}},variants:{orientation:{horizontal:{root:{"& > button[data-part='resize-trigger']":{width:"2",_after:{width:"8",height:"100%",top:"0",left:"-3"}}}},vertical:{root:{"& > button[data-part='resize-trigger']":{height:"2",_after:{height:"8",width:"100%",left:"0",top:"-3"}}}}}},defaultVariants:{orientation:"horizontal"}});ne({slots:["root"],base:{root:{display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"md",flexShrink:"0",width:"10",height:"10",position:"relative","& .waiting-icon":{position:"absolute",top:"-4.5",left:"0",color:"icon.muted",width:"100%",height:"100%","& svg":{width:"100%",height:"100%"}}}},variants:{status:{queued:{root:{background:"icon.brand-default"}},processing:{root:{background:"icon.warning-default"}},error:{root:{background:"icon.error-default"}},ready:{root:{background:"icon.success-default"}},disabled:{root:{background:"icon.disabled"}},waiting:{root:{background:"transparent"}}}},defaultVariants:{status:"queued"}});ne({slots:["root","label"],base:{root:{display:"inline-flex",alignItems:"center",gap:"4"},label:{fontFamily:"sans",fontStyle:"normal",fontWeight:"normal",whiteSpace:"nowrap",fontSize:"13",lineHeight:"xl"}},variants:{status:{queued:{label:{color:"text.accent-blue-pressed"}},processing:{label:{color:"text.normal"}},error:{label:{color:"text.normal"}},ready:{label:{color:"text.normal"}},disabled:{label:{color:"text.normal"}},waiting:{label:{color:"text.normal"}}}},defaultVariants:{status:"queued"}});const qo={Default:"default",Alt:"alt"},Ko={Horizontal:"horizontal",Vertical:"vertical"},pD={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gD(e,t){return C(),H("svg",pD,[...t[0]||(t[0]=[z("circle",{cx:"12",cy:"11.9999",r:"10",fill:"#E6EDFE",style:{fill:"color(display-p3 0.9036 0.9299 0.9965)","fill-opacity":"1"}},null,-1),z("path",{d:"M16 9L10.5 14.5L8 12",stroke:"#3E63DD",style:{stroke:"color(display-p3 0.2435 0.3889 0.8665)","stroke-opacity":"1"},"stroke-width":"1.125","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const fD={render:gD},mD={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vD(e,t){return C(),H("svg",mD,[...t[0]||(t[0]=[z("circle",{cx:"10",cy:"9.99994",r:"7",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}},null,-1),z("path",{d:"M13.3332 7.5L8.74984 12.0833L6.6665 10",stroke:"#F9FAFA",style:{stroke:"color(display-p3 0.9765 0.9804 0.9804)","stroke-opacity":"1"},"stroke-width":"0.9375","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const bD={render:vD},yD={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xD(e,t){return C(),H("svg",yD,[...t[0]||(t[0]=[z("g",{id:"State=Upcoming, Size=Small"},[z("circle",{id:"Ellipse 22",cx:"9.99997",cy:"9.99995",r:"6.5",transform:"rotate(-15 9.99997 9.99995)",stroke:"#60646C",style:{stroke:"color(display-p3 0.3760 0.3920 0.4240)","stroke-opacity":"1"},"stroke-dasharray":"2 2"})],-1)])])}const wD={render:xD},CD={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _D(e,t){return C(),H("svg",CD,[...t[0]||(t[0]=[z("g",{id:"State=Ongoing, Size=Small"},[z("circle",{id:"Ellipse 21",cx:"9.99997",cy:"9.99994",r:"6.5",transform:"rotate(-15 9.99997 9.99994)",stroke:"#3A5CCC",style:{stroke:"color(display-p3 0.2276 0.3608 0.7984)","stroke-opacity":"1"},"stroke-dasharray":"2 2"}),z("path",{id:"Ellipse 22",d:"M10 16.9999C8.14348 16.9999 6.36301 16.2624 5.05025 14.9497C3.7375 13.6369 3 11.8565 3 9.99994C3 8.14342 3.7375 6.36295 5.05025 5.05019C6.36301 3.73744 8.14348 2.99994 10 2.99994L10 9.99994L10 16.9999Z",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}})],-1)])])}const SD={render:_D},Vb=ne({className:"stepper",slots:["list","root","item","trigger","triggerContent","itemTitle","itemDescription","altIndicator","altIndicatorText","indicator","triggerContainer","itemLine","itemLineContainer"],base:{root:{display:"flex",flexDirection:"column",gap:"8"},list:{listStyle:"none",padding:"0",margin:"0",display:"flex",flexDirection:{_horizontal:"row",_vertical:"column"},gap:{_horizontal:"8",_vertical:"6"},width:"full",flex:"1"},item:{display:"flex",flexDirection:"column",gap:"2",flex:"1"},trigger:{backgroundColor:"transparent",border:"none",padding:"0",margin:"0",cursor:"pointer",fontFamily:"sans",fontStyle:"normal",letterSpacing:"normal"},triggerContent:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2",flex:"1"},itemTitle:{fontSize:"base",fontWeight:"medium",color:"text.normal",lineHeight:"lg",textAlign:"left"},itemDescription:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"full",color:"text.subtle",fontSize:"sm",fontWeight:"regular",lineHeight:"md",textAlign:"left"},triggerContainer:{display:"flex",gap:{_horizontal:"8",_vertical:"16"}},indicator:{},altIndicator:{display:"flex",justifyContent:"center",alignItems:"center"}},defaultVariants:{type:"default"},variants:{type:{default:{indicator:{paddingLeft:"4"},itemLineContainer:{_horizontal:{width:"full",paddingBottom:"8",paddingTop:"12",paddingLeft:"4",paddingRight:"4"},_vertical:{width:"full",height:"full",display:"flex",justifyContent:"center"}},itemLine:{_horizontal:{height:"1",_current:{backgroundColor:"border.brand"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}},_vertical:{width:"1px",height:"calc(100% - 20px)",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}}}},alt:{itemLineContainer:{_horizontal:{width:"full",paddingBottom:"12",paddingTop:"12",paddingLeft:"8",display:"flex",alignItems:"center"},_vertical:{width:"full",height:"calc(100% - 20px)",_complete:{height:"calc(100% - 24px)"},display:"flex",justifyContent:"center"}},itemLine:{_horizontal:{width:"full",height:"0.5",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}},_vertical:{width:"1px",height:"full",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}}},altIndicator:{width:"lg",height:"lg",minWidth:"lg",_complete:{backgroundColor:"background.brand-pressed",color:"border.brand"},_current:{backgroundColor:"text.selected",color:"text.inverse"},_incomplete:{backgroundColor:"background.neutral-default",color:"text.subtle"},borderRadius:"full",fontVariantNumeric:"slashed-zero",fontFamily:"sans",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"md",letterSpacing:"tighter",marginBottom:"1"},indicator:{_horizontal:{display:"flex",justifyContent:"center",alignItems:"center",paddingRight:"1",_complete:{paddingRight:"0"}},_vertical:{flexDirection:"column",paddingLeft:"0.5",paddingRight:"0.5",_complete:{paddingBottom:"0",paddingRight:"0",paddingLeft:"0"}}},triggerContainer:{_horizontal:{alignItems:"center"}},item:{_last:{flex:"none"}},triggerContent:{_horizontal:{flex:"none",width:"auto"}}}}}}),kD=["data-orientation"],ED=["data-orientation"],OD=["data-orientation"],$D=["data-orientation"],ID=["data-orientation"],TD=["data-orientation"],PD=["data-orientation"],VD=["data-orientation"],DD=M({__name:"StepperItem",props:{item:{},index:{},orientation:{default:Ko.Horizontal},type:{default:qo.Default},modelValue:{default:1},items:{},steps:{}},setup(e){const t=e,n=A(()=>Vb({type:t.type})),o=A(()=>t.steps.value),i=A(()=>({"data-complete":o.value>t.index?!0:void 0,"data-current":o.value===t.index?!0:void 0,"data-incomplete":o.value<t.index?!0:void 0}));return(a,r)=>(C(),T(b(FT),{class:N(n.value.trigger)},{default:P(()=>[t.type===b(qo).Default&&t.orientation===b(Ko).Horizontal?(C(),H("div",{key:0,class:N(n.value.itemLineContainer),"data-orientation":t.orientation},[z("div",W({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,ED)],10,kD)):Q("",!0),z("div",{class:N(n.value.triggerContainer),"data-orientation":t.orientation},[Z(b(_T),{class:N(n.value.indicator),"data-orientation":t.orientation},{default:P(()=>[t.type===b(qo).Default?(C(),H(Ce,{key:0},[o.value===e.index?(C(),T(b(SD),{key:0})):o.value>e.index?(C(),T(b(bD),{key:1})):o.value<e.index?(C(),T(b(wD),{key:2})):Q("",!0)],64)):(C(),H(Ce,{key:1},[o.value>e.index?(C(),T(b(fD),{key:0})):(C(),H("div",W({key:1,class:n.value.altIndicator},i.value),[z("span",{class:N(n.value.altIndicatorText)},oe(e.index+1),3)],16))],64)),t.orientation===b(Ko).Vertical&&e.index!==t.items.length-1?(C(),H("div",W({key:2,class:n.value.itemLineContainer},i.value,{"data-orientation":t.orientation}),[z("div",W({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,ID)],16,$D)):Q("",!0)]),_:1},8,["class","data-orientation"]),z("div",{class:N(n.value.triggerContent),"data-orientation":t.orientation},[z("span",{class:N(n.value.itemTitle)},oe(e.item.title),3),t.type!==b(qo).Alt||t.orientation!==b(Ko).Horizontal?(C(),H("span",{key:0,class:N(n.value.itemDescription)},oe(e.item.description),3)):Q("",!0)],10,TD),t.type===b(qo).Alt&&t.orientation===b(Ko).Horizontal&&e.index!==t.items.length-1?(C(),H("div",{key:0,class:N(n.value.itemLineContainer),"data-orientation":t.orientation},[z("div",W({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,VD)],10,PD)):Q("",!0)],10,OD)]),_:1},8,["class"]))}}),MD=M({__name:"Stepper",props:{orientation:{default:Ko.Horizontal},type:{default:qo.Default},modelValue:{default:1},items:{}},emits:["stepChange"],setup(e,{emit:t}){const n=e,o=t,i=A(()=>Vb({type:n.type})),a=s=>s<1?0:s>n.items.length?n.items.length-1:s-1,r=RT({count:n.items.length,modelValue:a(n.modelValue)});return Be(()=>n.modelValue,s=>{r.value.setStep(a(s))}),Be(()=>r.value.value,s=>{o("stepChange",s+1)}),(s,l)=>(C(),T(b(OT),{value:b(r)},{default:P(()=>[Z(b(ET),{class:N(i.value.list),"data-orientation":n.orientation},{default:P(()=>[(C(!0),H(Ce,null,Ge(n.items,(c,d)=>(C(),T(b(kT),{key:c.value,index:d,class:N(i.value.item),"data-testid":"stepper-item"},{default:P(()=>[Z(DD,W({item:c,index:d},{ref_for:!0},n,{steps:b(r)}),null,16,["item","index","steps"])]),_:2},1032,["index","class"]))),128))]),_:1},8,["class","data-orientation"])]),_:1},8,["value"]))}});ne({slots:["root","header","title","logContainer","logEntry","timestamp","logMessage","logLevel","emptyState","debug","info","warn","error","log","prompt","cursor","loadingSpinner","scrollButton"],base:{root:{display:"flex",flexDirection:"column",width:"100%",borderRadius:"md",background:"background.default",boxShadow:"stroke-container",overflowY:"auto",position:"relative"},logContainer:{display:"flex",flexDirection:"column",width:"100%",overflow:"auto",padding:"8",fontFamily:"mono",fontSize:"sm"},logEntry:{display:"flex",lineHeight:"sm",padding:"2 0",gap:"12"},timestamp:{color:"text.subtle",flexShrink:"0"},logMessage:{color:"text.subtle",wordBreak:"break-word"},logLevel:{lineHeight:"sm",fontWeight:"semibold",letterSpacing:"tight",width:"36"},emptyState:{display:"flex",alignItems:"center",justifyContent:"center",padding:"16",color:"text.muted"},prompt:{display:"flex",lineHeight:"sm",padding:"2 0",marginTop:"4",color:"text.success-default"},cursor:{display:"inline-block",width:"08",height:"16",marginLeft:"4",backgroundColor:"text.success-default",opacity:1,animation:"cursor-blink 1s step-end infinite"},loadingSpinner:{display:"flex",alignItems:"center",justifyContent:"center",padding:"2 0",marginTop:"4",color:"text.success-default"},debug:{color:"text.accent-purple-default"},info:{color:"text.information-default"},warn:{color:"text.warning-default"},error:{color:"text.error-default"},log:{color:"text.success-default"},scrollButton:{position:"absolute",bottom:"16",right:"16",zIndex:10,boxShadow:"stroke-container",borderRadius:"full"}}});ne({className:"tabItem",slots:["root","labelWrapper","icon","label","badge"],base:{root:{display:"inline-flex",p:"8",_hover:{"& .tabItem__labelWrapper":{backgroundColor:"background.brand-hover",borderRadius:"md"},"& .tabItem__label":{color:"text.selected"},"& .tabItem__icon":{color:"icon.selected"}}},labelWrapper:{display:"inline-flex",alignItems:"center",gap:"6",cursor:"pointer",userSelect:"none",color:"text.normal",px:"6",py:"2"},icon:{color:"icon.subtle"},label:{color:"text.muted",cursor:"pointer"},badge:{color:"text.subtle",borderRadius:"md",minWidth:"20"}},variants:{state:{default:{root:{borderBottom:"2px solid transparent"}},selected:{root:{color:"text.selected",borderBottomWidth:"2",borderBottomStyle:"solid",borderBottomColor:"border.selected",marginBottom:"-4"},icon:{color:"icon.selected"},label:{color:"text.selected"},labelWrapper:{backgroundColor:"background.brand-selected",borderRadius:"md"}},disabled:{root:{color:"text.disabled"},icon:{color:"icon.disabled"},label:{color:"text.disabled"}}}},defaultVariants:{state:"default"}});ne({className:"tabs",slots:pb.keys(),base:{root:{height:"100%"},list:{display:"flex"},trigger:{background:"none",border:"none",cursor:"pointer",_disabled:{cursor:"not-allowed",pointerEvents:"none"}},content:{padding:"12",height:"100%"}},variants:{bottomBorder:{true:{list:{borderBottom:"1px solid",borderBottomColor:"border.muted"}}},noContentPadding:{true:{content:{padding:"0"},list:{paddingLeft:"16"}}}}});ne({slots:["root","label","icon","avatar","dismissIcon"],base:{root:{display:"inline-flex",alignItems:"center",gap:"6",paddingLeft:"8",height:"xl",background:"background.gray-subtler-default",borderRadius:"md",boxShadow:"inner-highlighted-ring",_hover:{background:"background.gray-subtler-hover"},_disabled:{cursor:"not-allowed",color:"text.disabled",_hover:{background:"background.gray-subtler-default"}}},label:{fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"sm",letterSpacing:"wide",color:"text.normal"},icon:{display:"flex",alignItems:"center",justifyContent:"center",width:"md",height:"md",color:"icon.subtle"},avatar:{width:"md",height:"md",borderRadius:"md",overflow:"hidden",boxShadow:"stroke-container","& img":{width:"100%",height:"100%",objectFit:"cover"}},dismissIcon:{color:"icon.subtle",width:"3",height:"3"}},variants:{type:{default:{},icon:{root:{paddingLeft:"4"}},avatar:{root:{paddingLeft:"4"}}}},defaultVariants:{type:"default"}});To({base:{width:"100%",textAlign:"left",outline:"none",display:"flex",paddingY:"6",paddingX:"8",alignItems:"flex-start",justifyContent:"flex-start",gap:"6",flex:"1 0 0",alignSelf:"stretch",borderRadius:"md",background:"background.gray-subtlest-default",border:"none",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",fontFamily:"sans",fontSize:"base",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_hover:{backgroundColor:"background.gray-subtlest-hover"},_placeholder:{color:"text.placeholder"},_disabled:{backgroundColor:"background.disabled",color:"text.disabled",cursor:"not-allowed",_hover:{backgroundColor:"background.disabled"}},boxShadow:"stroke-bordered-interactive",_focus:{boxShadow:"state-focus-primary"}}});nt({position:"absolute",bottom:"1px",right:"3px",padding:"4px",pointerEvents:"none",color:"text.muted",textAlign:"right",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"sm",letterSpacing:"normal"});function La(e){return e+.5|0}const An=(e,t,n)=>Math.max(Math.min(e,n),t);function ta(e){return An(La(e*2.55),0,255)}function Bn(e){return An(La(e*255),0,255)}function on(e){return An(La(e/2.55)/100,0,1)}function zp(e){return An(La(e*100),0,100)}const mt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Qc=[..."0123456789ABCDEF"],RD=e=>Qc[e&15],FD=e=>Qc[(e&240)>>4]+Qc[e&15],pr=e=>(e&240)>>4===(e&15),AD=e=>pr(e.r)&&pr(e.g)&&pr(e.b)&&pr(e.a);function LD(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&mt[e[1]]*17,g:255&mt[e[2]]*17,b:255&mt[e[3]]*17,a:t===5?mt[e[4]]*17:255}:(t===7||t===9)&&(n={r:mt[e[1]]<<4|mt[e[2]],g:mt[e[3]]<<4|mt[e[4]],b:mt[e[5]]<<4|mt[e[6]],a:t===9?mt[e[7]]<<4|mt[e[8]]:255})),n}const ND=(e,t)=>e<255?t(e):"";function BD(e){var t=AD(e)?RD:FD;return e?"#"+t(e.r)+t(e.g)+t(e.b)+ND(e.a,t):void 0}const zD=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Db(e,t,n){const o=t*Math.min(n,1-n),i=(a,r=(a+e/30)%12)=>n-o*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function HD(e,t,n){const o=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[o(5),o(3),o(1)]}function jD(e,t,n){const o=Db(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)o[i]*=1-t-n,o[i]+=t;return o}function WD(e,t,n,o,i){return e===i?(t-n)/o+(t<n?6:0):t===i?(n-e)/o+2:(e-t)/o+4}function mu(e){const t=e.r/255,n=e.g/255,o=e.b/255,i=Math.max(t,n,o),a=Math.min(t,n,o),r=(i+a)/2;let s,l,c;return i!==a&&(c=i-a,l=r>.5?c/(2-i-a):c/(i+a),s=WD(t,n,o,c,i),s=s*60+.5),[s|0,l||0,r]}function vu(e,t,n,o){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,o)).map(Bn)}function bu(e,t,n){return vu(Db,e,t,n)}function GD(e,t,n){return vu(jD,e,t,n)}function UD(e,t,n){return vu(HD,e,t,n)}function Mb(e){return(e%360+360)%360}function YD(e){const t=zD.exec(e);let n=255,o;if(!t)return;t[5]!==o&&(n=t[6]?ta(+t[5]):Bn(+t[5]));const i=Mb(+t[2]),a=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?o=GD(i,a,r):t[1]==="hsv"?o=UD(i,a,r):o=bu(i,a,r),{r:o[0],g:o[1],b:o[2],a:n}}function qD(e,t){var n=mu(e);n[0]=Mb(n[0]+t),n=bu(n),e.r=n[0],e.g=n[1],e.b=n[2]}function KD(e){if(!e)return;const t=mu(e),n=t[0],o=zp(t[1]),i=zp(t[2]);return e.a<255?`hsla(${n}, ${o}%, ${i}%, ${on(e.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Hp={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},jp={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function XD(){const e={},t=Object.keys(jp),n=Object.keys(Hp);let o,i,a,r,s;for(o=0;o<t.length;o++){for(r=s=t[o],i=0;i<n.length;i++)a=n[i],s=s.replace(a,Hp[a]);a=parseInt(jp[r],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let gr;function ZD(e){gr||(gr=XD(),gr.transparent=[0,0,0,0]);const t=gr[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const JD=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function QD(e){const t=JD.exec(e);let n=255,o,i,a;if(t){if(t[7]!==o){const r=+t[7];n=t[8]?ta(r):An(r*255,0,255)}return o=+t[1],i=+t[3],a=+t[5],o=255&(t[2]?ta(o):An(o,0,255)),i=255&(t[4]?ta(i):An(i,0,255)),a=255&(t[6]?ta(a):An(a,0,255)),{r:o,g:i,b:a,a:n}}}function eM(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${on(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const tc=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,zo=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function tM(e,t,n){const o=zo(on(e.r)),i=zo(on(e.g)),a=zo(on(e.b));return{r:Bn(tc(o+n*(zo(on(t.r))-o))),g:Bn(tc(i+n*(zo(on(t.g))-i))),b:Bn(tc(a+n*(zo(on(t.b))-a))),a:e.a+n*(t.a-e.a)}}function fr(e,t,n){if(e){let o=mu(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=bu(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function Rb(e,t){return e&&Object.assign(t||{},e)}function Wp(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Bn(e[3]))):(t=Rb(e,{r:0,g:0,b:0,a:1}),t.a=Bn(t.a)),t}function nM(e){return e.charAt(0)==="r"?QD(e):YD(e)}let Fb=class ed{constructor(t){if(t instanceof ed)return t;const n=typeof t;let o;n==="object"?o=Wp(t):n==="string"&&(o=LD(t)||ZD(t)||nM(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=Rb(this._rgb);return t&&(t.a=on(t.a)),t}set rgb(t){this._rgb=Wp(t)}rgbString(){return this._valid?eM(this._rgb):void 0}hexString(){return this._valid?BD(this._rgb):void 0}hslString(){return this._valid?KD(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,i=t.rgb;let a;const r=n===a?.5:n,s=2*r-1,l=o.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,o.r=255&c*o.r+a*i.r+.5,o.g=255&c*o.g+a*i.g+.5,o.b=255&c*o.b+a*i.b+.5,o.a=r*o.a+(1-r)*i.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=tM(this._rgb,t._rgb,n)),this}clone(){return new ed(this.rgb)}alpha(t){return this._rgb.a=Bn(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=La(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return fr(this._rgb,2,t),this}darken(t){return fr(this._rgb,2,-t),this}saturate(t){return fr(this._rgb,1,t),this}desaturate(t){return fr(this._rgb,1,-t),this}rotate(t){return qD(this._rgb,t),this}};function Jt(){}const oM=(()=>{let e=0;return()=>e++})();function pe(e){return e==null}function De(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function de(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function wt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Rt(e,t){return wt(e)?e:t}function ye(e,t){return typeof e>"u"?t:e}const iM=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Se(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function he(e,t,n,o){let i,a,r;if(De(e))for(a=e.length,i=0;i<a;i++)t.call(n,e[i],i);else if(de(e))for(r=Object.keys(e),a=r.length,i=0;i<a;i++)t.call(n,e[r[i]],r[i])}function Is(e,t){let n,o,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,o=e.length;n<o;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function Ts(e){if(De(e))return e.map(Ts);if(de(e)){const t=Object.create(null),n=Object.keys(e),o=n.length;let i=0;for(;i<o;++i)t[n[i]]=Ts(e[n[i]]);return t}return e}function Ab(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function aM(e,t,n,o){if(!Ab(e))return;const i=t[e],a=n[e];de(i)&&de(a)?wa(i,a,o):t[e]=Ts(a)}function wa(e,t,n){const o=De(t)?t:[t],i=o.length;if(!de(e))return e;n=n||{};const a=n.merger||aM;let r;for(let s=0;s<i;++s){if(r=o[s],!de(r))continue;const l=Object.keys(r);for(let c=0,d=l.length;c<d;++c)a(l[c],e,r,n)}return e}function la(e,t){return wa(e,t,{merger:rM})}function rM(e,t,n){if(!Ab(e))return;const o=t[e],i=n[e];de(o)&&de(i)?la(o,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Ts(i))}const Gp={"":e=>e,x:e=>e.x,y:e=>e.y};function sM(e){const t=e.split("."),n=[];let o="";for(const i of t)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function lM(e){const t=sM(e);return n=>{for(const o of t){if(o==="")break;n=n&&n[o]}return n}}function hi(e,t){return(Gp[t]||(Gp[t]=lM(t)))(e)}function yu(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ca=e=>typeof e<"u",Gn=e=>typeof e=="function",Up=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function cM(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Qe=Math.PI,wo=2*Qe,Ps=Number.POSITIVE_INFINITY,dM=Qe/180,$t=Qe/2,io=Qe/4,Yp=Qe*2/3,Lb=Math.log10,zn=Math.sign;function Xr(e,t,n){return Math.abs(e-t)<n}function qp(e){const t=Math.round(e);e=Xr(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Lb(e))),o=e/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function uM(e){const t=[],n=Math.sqrt(e);let o;for(o=1;o<n;o++)e%o===0&&(t.push(o),t.push(e/o));return n===(n|0)&&t.push(n),t.sort((i,a)=>i-a).pop(),t}function hM(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Vs(e){return!hM(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function pM(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function gM(e,t,n){let o,i,a;for(o=0,i=e.length;o<i;o++)a=e[o][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function vo(e){return e*(Qe/180)}function fM(e){return e*(180/Qe)}function Kp(e){if(!wt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function mM(e,t){const n=t.x-e.x,o=t.y-e.y,i=Math.sqrt(n*n+o*o);let a=Math.atan2(o,n);return a<-.5*Qe&&(a+=wo),{angle:a,distance:i}}function vM(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ao(e){return(e%wo+wo)%wo}function bM(e,t,n,o){const i=ao(e),a=ao(t),r=ao(n),s=ao(a-i),l=ao(r-i),c=ao(i-a),d=ao(i-r);return i===a||i===r||o||s>l&&c<d}function It(e,t,n){return Math.max(t,Math.min(n,e))}function yM(e){return It(e,-32768,32767)}function Xp(e,t,n,o=1e-6){return e>=Math.min(t,n)-o&&e<=Math.max(t,n)+o}function xu(e,t,n){n=n||(r=>e[r]<t);let o=e.length-1,i=0,a;for(;o-i>1;)a=i+o>>1,n(a)?i=a:o=a;return{lo:i,hi:o}}const td=(e,t,n,o)=>xu(e,n,o?i=>{const a=e[i][t];return a<n||a===n&&e[i+1][t]===n}:i=>e[i][t]<n),xM=(e,t,n)=>xu(e,n,o=>e[o][t]>=n);function wM(e,t,n){let o=0,i=e.length;for(;o<i&&e[o]<t;)o++;for(;i>o&&e[i-1]>n;)i--;return o>0||i<e.length?e.slice(o,i):e}const Nb=["push","pop","shift","splice","unshift"];function CM(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Nb.forEach(n=>{const o="_onData"+yu(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const r=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[o]=="function"&&s[o](...a)}),r}})})}function Zp(e,t){const n=e._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(t);i!==-1&&o.splice(i,1),!(o.length>0)&&(Nb.forEach(a=>{delete e[a]}),delete e._chartjs)}function Bb(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const zb=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Hb(e,t){let n=[],o=!1;return function(...i){n=i,o||(o=!0,zb.call(window,()=>{o=!1,e.apply(t,n)}))}}function _M(e,t){let n;return function(...o){return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}const SM=e=>e==="start"?"left":e==="end"?"right":"center",Jp=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,mr=e=>e===0||e===1,Qp=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*wo/n)),eg=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*wo/n)+1,ca={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*$t)+1,easeOutSine:e=>Math.sin(e*$t),easeInOutSine:e=>-.5*(Math.cos(Qe*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>mr(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>mr(e)?e:Qp(e,.075,.3),easeOutElastic:e=>mr(e)?e:eg(e,.075,.3),easeInOutElastic(e){return mr(e)?e:e<.5?.5*Qp(e*2,.1125,.45):.5+.5*eg(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ca.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?ca.easeInBounce(e*2)*.5:ca.easeOutBounce(e*2-1)*.5+.5};function jb(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function tg(e){return jb(e)?e:new Fb(e)}function nc(e){return jb(e)?e:new Fb(e).saturate(.5).darken(.1).hexString()}const kM=["x","y","borderWidth","radius","tension"],EM=["color","borderColor","backgroundColor"];function OM(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:EM},numbers:{type:"number",properties:kM}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function $M(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const ng=new Map;function IM(e,t){t=t||{};const n=e+JSON.stringify(t);let o=ng.get(n);return o||(o=new Intl.NumberFormat(e,t),ng.set(n,o)),o}function Wb(e,t,n){return IM(t,n).format(e)}const TM={values(e){return De(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const o=this.chart.options.locale;let i,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=PM(e,n)}const r=Lb(Math.abs(a)),s=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Wb(e,o,l)}};function PM(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Gb={formatters:TM};function VM(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gb.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Io=Object.create(null),nd=Object.create(null);function da(e,t){if(!t)return e;const n=t.split(".");for(let o=0,i=n.length;o<i;++o){const a=n[o];e=e[a]||(e[a]=Object.create(null))}return e}function oc(e,t,n){return typeof t=="string"?wa(da(e,t),n):wa(da(e,""),t)}let DM=class{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,i)=>nc(i.backgroundColor),this.hoverBorderColor=(o,i)=>nc(i.borderColor),this.hoverColor=(o,i)=>nc(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return oc(this,t,n)}get(t){return da(this,t)}describe(t,n){return oc(nd,t,n)}override(t,n){return oc(Io,t,n)}route(t,n,o,i){const a=da(this,t),r=da(this,o),s="_"+n;Object.defineProperties(a,{[s]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=r[i];return de(l)?Object.assign({},c,l):ye(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}};var Oe=new DM({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[OM,$M,VM]);function MM(e){return!e||pe(e.size)||pe(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function og(e,t,n,o,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>o&&(o=a),o}function ro(e,t,n){const o=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*o)/o+i}function ig(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function ag(e,t,n,o){RM(e,t,n,o)}function RM(e,t,n,o,i){let a,r,s,l,c,d,h,u;const p=t.pointStyle,m=t.rotation,g=t.radius;let v=(m||0)*dM;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,o),e.rotate(v),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(g)||g<=0)){switch(e.beginPath(),p){default:e.arc(n,o,g,0,wo),e.closePath();break;case"triangle":d=g,e.moveTo(n+Math.sin(v)*d,o-Math.cos(v)*g),v+=Yp,e.lineTo(n+Math.sin(v)*d,o-Math.cos(v)*g),v+=Yp,e.lineTo(n+Math.sin(v)*d,o-Math.cos(v)*g),e.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(v+io)*l,h=Math.cos(v+io)*l,s=Math.sin(v+io)*l,u=Math.sin(v+io)*l,e.arc(n-h,o-s,c,v-Qe,v-$t),e.arc(n+u,o-r,c,v-$t,v),e.arc(n+h,o+s,c,v,v+$t),e.arc(n-u,o+r,c,v+$t,v+Qe),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,d=l,e.rect(n-d,o-l,2*d,2*l);break}v+=io;case"rectRot":h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+u,o-r),e.lineTo(n+h,o+s),e.lineTo(n-u,o+r),e.closePath();break;case"crossRot":v+=io;case"cross":h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+h,o+s),e.moveTo(n+u,o-r),e.lineTo(n-u,o+r);break;case"star":h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+h,o+s),e.moveTo(n+u,o-r),e.lineTo(n-u,o+r),v+=io,h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+h,o+s),e.moveTo(n+u,o-r),e.lineTo(n-u,o+r);break;case"line":r=Math.cos(v)*g,s=Math.sin(v)*g,e.moveTo(n-r,o-s),e.lineTo(n+r,o+s);break;case"dash":e.moveTo(n,o),e.lineTo(n+Math.cos(v)*g,o+Math.sin(v)*g);break;case!1:e.closePath();break}e.fill(),e.stroke()}}function Ub(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Yb(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function qb(e){e.restore()}function FM(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),pe(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function AM(e,t,n,o,i){if(i.strikethrough||i.underline){const a=e.measureText(o),r=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,d=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(r,d),e.lineTo(s,d),e.stroke()}}function LM(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function rg(e,t,n,o,i,a={}){const r=De(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,FM(e,a),l=0;l<r.length;++l)c=r[l],a.backdrop&&LM(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),pe(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,o,a.maxWidth)),e.fillText(c,n,o,a.maxWidth),AM(e,n,o,c,a),o+=Number(i.lineHeight);e.restore()}function od(e,t){const{x:n,y:o,w:i,h:a,radius:r}=t;e.arc(n+r.topLeft,o+r.topLeft,r.topLeft,1.5*Qe,Qe,!0),e.lineTo(n,o+a-r.bottomLeft),e.arc(n+r.bottomLeft,o+a-r.bottomLeft,r.bottomLeft,Qe,$t,!0),e.lineTo(n+i-r.bottomRight,o+a),e.arc(n+i-r.bottomRight,o+a-r.bottomRight,r.bottomRight,$t,0,!0),e.lineTo(n+i,o+r.topRight),e.arc(n+i-r.topRight,o+r.topRight,r.topRight,0,-$t,!0),e.lineTo(n+r.topLeft,o)}const NM=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,BM=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zM(e,t){const n=(""+e).match(NM);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const HM=e=>+e||0;function Kb(e,t){const n={},o=de(t),i=o?Object.keys(t):t,a=de(e)?o?r=>ye(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of i)n[r]=HM(a(r));return n}function Xb(e){return Kb(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ua(e){return Kb(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Un(e){const t=Xb(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ht(e,t){e=e||{},t=t||Oe.font;let n=ye(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let o=ye(e.style,t.style);o&&!(""+o).match(BM)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:ye(e.family,t.family),lineHeight:zM(ye(e.lineHeight,t.lineHeight),n),size:n,style:o,weight:ye(e.weight,t.weight),string:""};return i.string=MM(i),i}function vr(e,t,n,o){let i,a,r;for(i=0,a=e.length;i<a;++i)if(r=e[i],r!==void 0&&r!==void 0)return r}function jM(e,t,n){const{min:o,max:i}=e,a=iM(t,(i-o)/2),r=(s,l)=>n&&s===0?0:s+l;return{min:r(o,-Math.abs(a)),max:r(i,a)}}function wi(e,t){return Object.assign(Object.create(e),t)}function wu(e,t=[""],n,o,i=()=>e[0]){const a=n||e;typeof o>"u"&&(o=ey("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:o,_getTarget:i,override:s=>wu([s,...e],t,a,o)};return new Proxy(r,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return Jb(s,l,()=>ZM(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return lg(s).includes(l)},ownKeys(s){return lg(s)},set(s,l,c){const d=s._storage||(s._storage=i());return s[l]=d[l]=c,delete s._keys,!0}})}function pi(e,t,n,o){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Zb(e,o),setContext:a=>pi(e,a,n,o),override:a=>pi(e.override(a),t,n,o)};return new Proxy(i,{deleteProperty(a,r){return delete a[r],delete e[r],!0},get(a,r,s){return Jb(a,r,()=>GM(a,r,s))},getOwnPropertyDescriptor(a,r){return a._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(a,r,s){return e[r]=s,delete a[r],!0}})}function Zb(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:o=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:o,isScriptable:Gn(n)?n:()=>n,isIndexable:Gn(o)?o:()=>o}}const WM=(e,t)=>e?e+yu(t):t,Cu=(e,t)=>de(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Jb(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const o=n();return e[t]=o,o}function GM(e,t,n){const{_proxy:o,_context:i,_subProxy:a,_descriptors:r}=e;let s=o[t];return Gn(s)&&r.isScriptable(t)&&(s=UM(t,s,e,n)),De(s)&&s.length&&(s=YM(t,s,e,r.isIndexable)),Cu(t,s)&&(s=pi(s,i,a&&a[t],r)),s}function UM(e,t,n,o){const{_proxy:i,_context:a,_subProxy:r,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,r||o);return s.delete(e),Cu(e,l)&&(l=_u(i._scopes,i,e,l)),l}function YM(e,t,n,o){const{_proxy:i,_context:a,_subProxy:r,_descriptors:s}=n;if(typeof a.index<"u"&&o(e))return t[a.index%t.length];if(de(t[0])){const l=t,c=i._scopes.filter(d=>d!==l);t=[];for(const d of l){const h=_u(c,i,e,d);t.push(pi(h,a,r&&r[e],s))}}return t}function Qb(e,t,n){return Gn(e)?e(t,n):e}const qM=(e,t)=>e===!0?t:typeof e=="string"?hi(t,e):void 0;function KM(e,t,n,o,i){for(const a of t){const r=qM(n,a);if(r){e.add(r);const s=Qb(r._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==o)return s}else if(r===!1&&typeof o<"u"&&n!==o)return null}return!1}function _u(e,t,n,o){const i=t._rootScopes,a=Qb(t._fallback,n,o),r=[...e,...i],s=new Set;s.add(o);let l=sg(s,r,n,a||n,o);return l===null||typeof a<"u"&&a!==n&&(l=sg(s,r,a,l,o),l===null)?!1:wu(Array.from(s),[""],i,a,()=>XM(t,n,o))}function sg(e,t,n,o,i){for(;n;)n=KM(e,t,n,o,i);return n}function XM(e,t,n){const o=e._getTarget();t in o||(o[t]={});const i=o[t];return De(i)&&de(n)?n:i||{}}function ZM(e,t,n,o){let i;for(const a of t)if(i=ey(WM(a,e),n),typeof i<"u")return Cu(e,i)?_u(n,o,e,i):i}function ey(e,t){for(const n of t){if(!n)continue;const o=n[e];if(typeof o<"u")return o}}function lg(e){let t=e._keys;return t||(t=e._keys=JM(e._scopes)),t}function JM(e){const t=new Set;for(const n of e)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(o);return Array.from(t)}function Su(){return typeof window<"u"&&typeof document<"u"}function ku(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ds(e,t,n){let o;return typeof e=="string"?(o=parseInt(e,10),e.indexOf("%")!==-1&&(o=o/100*t.parentNode[n])):o=e,o}const vl=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function QM(e,t){return vl(e).getPropertyValue(t)}const e2=["top","right","bottom","left"];function Co(e,t,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=e2[i];o[a]=parseFloat(e[t+"-"+a+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const t2=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function n2(e,t){const n=e.touches,o=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=o;let r=!1,s,l;if(t2(i,a,e.target))s=i,l=a;else{const c=t.getBoundingClientRect();s=o.clientX-c.left,l=o.clientY-c.top,r=!0}return{x:s,y:l,box:r}}function lo(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:o}=t,i=vl(n),a=i.boxSizing==="border-box",r=Co(i,"padding"),s=Co(i,"border","width"),{x:l,y:c,box:d}=n2(e,n),h=r.left+(d&&s.left),u=r.top+(d&&s.top);let{width:p,height:m}=t;return a&&(p-=r.width+s.width,m-=r.height+s.height),{x:Math.round((l-h)/p*n.width/o),y:Math.round((c-u)/m*n.height/o)}}function o2(e,t,n){let o,i;if(t===void 0||n===void 0){const a=e&&ku(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const r=a.getBoundingClientRect(),s=vl(a),l=Co(s,"border","width"),c=Co(s,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,o=Ds(s.maxWidth,a,"clientWidth"),i=Ds(s.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:o||Ps,maxHeight:i||Ps}}const Ln=e=>Math.round(e*10)/10;function i2(e,t,n,o){const i=vl(e),a=Co(i,"margin"),r=Ds(i.maxWidth,e,"clientWidth")||Ps,s=Ds(i.maxHeight,e,"clientHeight")||Ps,l=o2(e,t,n);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const h=Co(i,"border","width"),u=Co(i,"padding");c-=u.width+h.width,d-=u.height+h.height}return c=Math.max(0,c-a.width),d=Math.max(0,o?c/o:d-a.height),c=Ln(Math.min(c,r,l.maxWidth)),d=Ln(Math.min(d,s,l.maxHeight)),c&&!d&&(d=Ln(c/2)),(t!==void 0||n!==void 0)&&o&&l.height&&d>l.height&&(d=l.height,c=Ln(Math.floor(d*o))),{width:c,height:d}}function cg(e,t,n){const o=t||1,i=Ln(e.height*o),a=Ln(e.width*o);e.height=Ln(e.height),e.width=Ln(e.width);const r=e.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==o||r.height!==i||r.width!==a?(e.currentDevicePixelRatio=o,r.height=i,r.width=a,e.ctx.setTransform(o,0,0,o,0,0),!0):!1}const a2=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Su()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function dg(e,t){const n=QM(e,t),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}const r2=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},s2=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ic(e,t,n){return e?r2(t,n):s2()}function l2(e,t){let n,o;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=o)}function c2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function br(e,t,n){return e.options.clip?e[n]:t[n]}function d2(e,t){const{xScale:n,yScale:o}=e;return n&&o?{left:br(n,t,"left"),right:br(n,t,"right"),top:br(o,t,"top"),bottom:br(o,t,"bottom")}:t}function u2(e,t){const n=t._clip;if(n.disabled)return!1;const o=d2(t,e.chartArea);return{left:n.left===!1?0:o.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:o.right+(n.right===!0?0:n.right),top:n.top===!1?0:o.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:o.bottom+(n.bottom===!0?0:n.bottom)}}var h2=Object.defineProperty,p2=(e,t,n)=>t in e?h2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ce=(e,t,n)=>p2(e,typeof t!="symbol"?t+"":t,n);class g2{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,i){const a=n.listeners[i],r=n.duration;a.forEach(s=>s({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(o-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=zb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const a=o.items;let r=a.length-1,s=!1,l;for(;r>=0;--r)l=a[r],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(t),s=!0):(a[r]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,o,t,"progress")),a.length||(o.running=!1,this._notify(i,o,t,"complete"),o.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let o=n.get(t);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,o)),o}listen(t,n,o){this._getAnims(t).listeners[n].push(o)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Qt=new g2;const ug="transparent",f2={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=tg(e||ug),i=o.valid&&tg(t||ug);return i&&i.valid?i.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class m2{constructor(t,n,o,i){const a=n[o];i=vr([t.to,i,a,t.from]);const r=vr([t.from,a,i]);this._active=!0,this._fn=t.fn||f2[t.type||typeof r],this._easing=ca[t.easing]||ca.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=o,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],a=o-this._start,r=this._duration-a;this._start=o,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=vr([t.to,n,i,t.from]),this._from=vr([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,o=this._duration,i=this._prop,a=this._from,r=this._loop,s=this._to;let l;if(this._active=a!==s&&(r||n<o),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=a;return}l=n/o%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,o)=>{t.push({res:n,rej:o})})}_notify(t){const n=t?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class ty{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!de(t))return;const n=Object.keys(Oe.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!de(a))return;const r={};for(const s of n)r[s]=a[s];(De(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!o.has(s))&&o.set(s,r)})})}_animateOptions(t,n){const o=n.options,i=b2(t,o);if(!i)return[];const a=this._createAnimations(i,o);return o.$shared&&v2(t.options.$animations,o).then(()=>{t.options=o},()=>{}),a}_createAnimations(t,n){const o=this._properties,i=[],a=t.$animations||(t.$animations={}),r=Object.keys(n),s=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[c];let h=a[c];const u=o.get(c);if(h)if(u&&h.active()){h.update(u,d,s);continue}else h.cancel();if(!u||!u.duration){t[c]=d;continue}a[c]=h=new m2(u,t,c,d),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const o=this._createAnimations(t,n);if(o.length)return Qt.add(this._chart,o),!0}}function v2(e,t){const n=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const a=e[o[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function b2(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function hg(e,t){const n=e&&e.options||{},o=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:o?a:i,end:o?i:a}}function y2(e,t,n){if(n===!1)return!1;const o=hg(e,n),i=hg(t,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function x2(e){let t,n,o,i;return de(e)?(t=e.top,n=e.right,o=e.bottom,i=e.left):t=n=o=i=e,{top:t,right:n,bottom:o,left:i,disabled:e===!1}}function ny(e,t){const n=[],o=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=o.length;i<a;++i)n.push(o[i].index);return n}function pg(e,t,n,o={}){const i=e.keys,a=o.mode==="single";let r,s,l,c;if(t===null)return;let d=!1;for(r=0,s=i.length;r<s;++r){if(l=+i[r],l===n){if(d=!0,o.all)continue;break}c=e.values[l],wt(c)&&(a||t===0||zn(t)===zn(c))&&(t+=c)}return!d&&!o.all?0:t}function w2(e,t){const{iScale:n,vScale:o}=t,i=n.axis==="x"?"x":"y",a=o.axis==="x"?"x":"y",r=Object.keys(e),s=new Array(r.length);let l,c,d;for(l=0,c=r.length;l<c;++l)d=r[l],s[l]={[i]:d,[a]:e[d]};return s}function ac(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function C2(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function _2(e){const{min:t,max:n,minDefined:o,maxDefined:i}=e.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function S2(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function gg(e,t,n,o){for(const i of t.getMatchingVisibleMetas(o).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function fg(e,t){const{chart:n,_cachedMeta:o}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:r,index:s}=o,l=a.axis,c=r.axis,d=C2(a,r,o),h=t.length;let u;for(let p=0;p<h;++p){const m=t[p],{[l]:g,[c]:v}=m,f=m._stacks||(m._stacks={});u=f[c]=S2(i,d,g),u[s]=v,u._top=gg(u,r,!0,o.type),u._bottom=gg(u,r,!1,o.type);const y=u._visualValues||(u._visualValues={});y[s]=v}}function rc(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function k2(e,t){return wi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function E2(e,t,n){return wi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ji(e,t){const n=e.controller.index,o=e.vScale&&e.vScale.axis;if(o){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[o]===void 0||a[o][n]===void 0)return;delete a[o][n],a[o]._visualValues!==void 0&&a[o]._visualValues[n]!==void 0&&delete a[o]._visualValues[n]}}}const sc=e=>e==="reset"||e==="none",mg=(e,t)=>t?e:Object.assign({},e),O2=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ny(n,!0),values:null};class ha{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ac(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ji(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(h,u,p,m)=>h==="x"?u:h==="r"?m:p,a=n.xAxisID=ye(o.xAxisID,rc(t,"x")),r=n.yAxisID=ye(o.yAxisID,rc(t,"y")),s=n.rAxisID=ye(o.rAxisID,rc(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,a,r,s),d=n.vAxisID=i(l,r,a,s);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Zp(this._data,this),t._stacked&&ji(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(de(n)){const i=this._cachedMeta;this._data=w2(n,i)}else if(o!==n){if(o){Zp(o,this);const i=this._cachedMeta;ji(i),i._parsed=[]}n&&Object.isExtensible(n)&&CM(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=ac(n.vScale,n),n.stack!==o.stack&&(i=!0,ji(n),n.stack=o.stack),this._resyncElements(t),(i||a!==n._stacked)&&(fg(this,n._parsed),n._stacked=ac(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:o,_data:i}=this,{iScale:a,_stacked:r}=o,s=a.axis;let l=t===0&&n===i.length?!0:o._sorted,c=t>0&&o._parsed[t-1],d,h,u;if(this._parsing===!1)o._parsed=i,o._sorted=!0,u=i;else{De(i[t])?u=this.parseArrayData(o,i,t,n):de(i[t])?u=this.parseObjectData(o,i,t,n):u=this.parsePrimitiveData(o,i,t,n);const p=()=>h[s]===null||c&&h[s]<c[s];for(d=0;d<n;++d)o._parsed[d+t]=h=u[d],l&&(p()&&(l=!1),c=h);o._sorted=l}r&&fg(this,u)}parsePrimitiveData(t,n,o,i){const{iScale:a,vScale:r}=t,s=a.axis,l=r.axis,c=a.getLabels(),d=a===r,h=new Array(i);let u,p,m;for(u=0,p=i;u<p;++u)m=u+o,h[u]={[s]:d||a.parse(c[m],m),[l]:r.parse(n[m],m)};return h}parseArrayData(t,n,o,i){const{xScale:a,yScale:r}=t,s=new Array(i);let l,c,d,h;for(l=0,c=i;l<c;++l)d=l+o,h=n[d],s[l]={x:a.parse(h[0],d),y:r.parse(h[1],d)};return s}parseObjectData(t,n,o,i){const{xScale:a,yScale:r}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let d,h,u,p;for(d=0,h=i;d<h;++d)u=d+o,p=n[u],c[d]={x:a.parse(hi(p,s),u),y:r.parse(hi(p,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const i=this.chart,a=this._cachedMeta,r=n[t.axis],s={keys:ny(i,!0),values:n._stacks[t.axis]._visualValues};return pg(s,r,a.index,{mode:o})}updateRangeFromParsed(t,n,o,i){const a=o[n.axis];let r=a===null?NaN:a;const s=i&&o._stacks[n.axis];i&&s&&(i.values=s,r=pg(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const o=this._cachedMeta,i=o._parsed,a=o._sorted&&t===o.iScale,r=i.length,s=this._getOtherScale(t),l=O2(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:h}=_2(s);let u,p;function m(){p=i[u];const g=p[s.axis];return!wt(p[t.axis])||d>g||h<g}for(u=0;u<r&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),a));++u);if(a){for(u=r-1;u>=0;--u)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let i,a,r;for(i=0,a=n.length;i<a;++i)r=n[i][t.axis],wt(r)&&o.push(r);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=x2(ye(this.options.clip,y2(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],a=n.chartArea,r=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let d;for(o.dataset&&o.dataset.draw(t,a,s,l),d=s;d<s+l;++d){const h=i[d];h.hidden||(h.active&&c?r.push(h):h.draw(t,a))}for(d=0;d<r.length;++d)r[d].draw(t,a)}getStyle(t,n){const o=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,n,o){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];a=r.$context||(r.$context=E2(this.getContext(),t,r)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=k2(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=o,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",o){const i=n==="active",a=this._cachedDataOpts,r=t+"-"+n,s=a[r],l=this.enableOptionSharing&&Ca(o);if(s)return mg(s,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),d),p=Object.keys(Oe.elements[t]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(u,p,m,h);return g.$shared&&(g.$shared=l,a[r]=Object.freeze(mg(g,l))),g}_resolveAnimations(t,n,o){const i=this.chart,a=this._cachedDataOpts,r=`animation-${n}`,s=a[r];if(s)return s;let l;if(i.options.animation!==!1){const d=this.chart.config,h=d.datasetAnimationScopeKeys(this._type,n),u=d.getOptionScopes(this.getDataset(),h);l=d.createResolver(u,this.getContext(t,o,n))}const c=new ty(i,l&&l.animations);return l&&l._cacheable&&(a[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||sc(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(o),r=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,o),{sharedOptions:a,includeOptions:r}}updateElement(t,n,o,i){sc(i)?Object.assign(t,o):this._resolveAnimations(n,i).update(t,o)}updateSharedOptions(t,n,o){t&&!sc(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,n,o){this._setStyle(t,o,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,o=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=o.length,a=n.length,r=Math.min(a,i);r&&this.parse(0,r),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,o=!0){const i=this._cachedMeta,a=i.data,r=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=r;s--)c[s]=c[s-n]};for(l(a),s=t;s<r;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),o&&this.updateElements(a,t,n,"reset")}updateElements(t,n,o,i){}_removeElements(t,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(t,n);o._stacked&&ji(o,i)}o.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,o,i]=t;this[n](o,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ce(ha,"defaults",{}),ce(ha,"datasetElementType",null),ce(ha,"dataElementType",null);function $2(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let i=0,a=n.length;i<a;i++)o=o.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Bb(o.sort((i,a)=>i-a))}return e._cache.$bar}function I2(e){const t=e.iScale,n=$2(t,e.type);let o=t._length,i,a,r,s;const l=()=>{r===32767||r===-32768||(Ca(s)&&(o=Math.min(o,Math.abs(r-s)||o)),s=r)};for(i=0,a=n.length;i<a;++i)r=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)r=t.getPixelForTick(i),l();return o}function T2(e,t,n,o){const i=n.barThickness;let a,r;return pe(i)?(a=t.min*n.categoryPercentage,r=n.barPercentage):(a=i*o,r=1),{chunk:a/o,ratio:r,start:t.pixels[e]-a/2}}function P2(e,t,n,o){const i=t.pixels,a=i[e];let r=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;r===null&&(r=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-r);const c=a-(a-Math.min(r,s))/2*l;return{chunk:Math.abs(s-r)/2*l/o,ratio:n.barPercentage,start:c}}function V2(e,t,n,o){const i=n.parse(e[0],o),a=n.parse(e[1],o),r=Math.min(i,a),s=Math.max(i,a);let l=r,c=s;Math.abs(r)>Math.abs(s)&&(l=s,c=r),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:r,max:s}}function oy(e,t,n,o){return De(e)?V2(e,t,n,o):t[n.axis]=n.parse(e,o),t}function vg(e,t,n,o){const i=e.iScale,a=e.vScale,r=i.getLabels(),s=i===a,l=[];let c,d,h,u;for(c=n,d=n+o;c<d;++c)u=t[c],h={},h[i.axis]=s||i.parse(r[c],c),l.push(oy(u,h,a,c));return l}function lc(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function D2(e,t,n){return e!==0?zn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function M2(e){let t,n,o,i,a;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:o,reverse:t,top:i,bottom:a}}function R2(e,t,n,o){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:s,reverse:l,top:c,bottom:d}=M2(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=d:(a[bg(d,r,s,l)]=!0,i=c)),a[bg(i,r,s,l)]=!0,e.borderSkipped=a}function bg(e,t,n,o){return o?(e=F2(e,t,n),e=yg(e,n,t)):e=yg(e,t,n),e}function F2(e,t,n){return e===t?n:e===n?t:e}function yg(e,t,n){return e==="start"?t:e==="end"?n:e}function A2(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Zr extends ha{parsePrimitiveData(t,n,o,i){return vg(t,n,o,i)}parseArrayData(t,n,o,i){return vg(t,n,o,i)}parseObjectData(t,n,o,i){const{iScale:a,vScale:r}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?s:l,d=r.axis==="x"?s:l,h=[];let u,p,m,g;for(u=o,p=o+i;u<p;++u)g=n[u],m={},m[a.axis]=a.parse(hi(g,c),u),h.push(oy(hi(g,d),m,r,u));return h}updateRangeFromParsed(t,n,o,i){super.updateRangeFromParsed(t,n,o,i);const a=o._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:i}=n,a=this.getParsed(t),r=a._custom,s=lc(r)?"["+r.start+", "+r.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,o,i){const a=i==="reset",{index:r,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),d=this._getRuler(),{sharedOptions:h,includeOptions:u}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=a||pe(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,d),f=(m._stacks||{})[s.axis],y={horizontal:c,base:g.base,enableBorderRadius:!f||lc(m._custom)||r===f._top||r===f._bottom,x:c?g.head:v.center,y:c?v.center:g.head,height:c?v.size:Math.abs(g.size),width:c?Math.abs(g.size):v.size};u&&(y.options=h||this.resolveDataElementOptions(p,t[p].active?"active":i));const x=y.options||t[p].options;R2(y,x,f,r),A2(y,x,d.ratio),this.updateElement(t[p],p,y,i)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=o.options.stacked,r=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[o.axis],c=d=>{const h=d._parsed.find(p=>p[o.axis]===l),u=h&&h[d.vScale.axis];if(pe(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&c(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(o=>t[o].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)t[ye(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,o){const i=this._getStacks(t,o),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,i=[];let a,r;for(a=0,r=n.data.length;a<r;++a)i.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));const s=t.barThickness;return{min:s||I2(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:a,minBarLength:r}}=this,s=a||0,l=this.getParsed(t),c=l._custom,d=lc(c);let h=l[n.axis],u=0,p=o?this.applyStack(n,l,o):h,m,g;p!==h&&(u=p-h,p=h),d&&(h=c.barStart,p=c.barEnd-c.barStart,h!==0&&zn(h)!==zn(c.barEnd)&&(u=0),u+=h);const v=!pe(a)&&!d?a:u;let f=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(u+p):m=f,g=m-f,Math.abs(g)<r){g=D2(g,n,s)*r,h===s&&(f-=g/2);const y=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),w=Math.min(y,x),S=Math.max(y,x);f=Math.max(Math.min(f,S),w),m=f+g,o&&!d&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(f))}if(f===n.getPixelForValue(s)){const y=zn(g)*n.getLineWidthForValue(s)/2;f+=y,g-=y}return{size:g,base:f,head:m,center:m+g/2}}_calculateBarIndexPixels(t,n){const o=n.scale,i=this.options,a=i.skipNull,r=ye(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const d=a?this._getStackCount(t):n.stackCount,h=i.barThickness==="flex"?P2(t,n,i,d*c):T2(t,n,i,d*c),u=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(ye(u,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+p;s=h.start+h.chunk*m+h.chunk/2,l=Math.min(r,h.chunk*h.ratio)}else s=o.getPixelForValue(this.getParsed(t)[o.axis],t),l=Math.min(r,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,o=t.data,i=o.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!o[a].hidden&&o[a].draw(this._ctx)}}ce(Zr,"id","bar"),ce(Zr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ce(Zr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function so(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Eu{constructor(t){ce(this,"options"),this.options=t||{}}static override(t){Object.assign(Eu.prototype,t)}init(){}formats(){return so()}parse(){return so()}format(){return so()}add(){return so()}diff(){return so()}startOf(){return so()}endOf(){return so()}}var iy={_date:Eu};function L2(e,t,n,o){const{controller:i,data:a,_sorted:r}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&r&&a.length){const c=s._reversePixels?xM:td;if(o){if(i._sharedOptions){const d=a[0],h=typeof d.getRange=="function"&&d.getRange(t);if(h){const u=c(a,t,n-h),p=c(a,t,n+h);return{lo:u.lo,hi:p.hi}}}}else{const d=c(a,t,n);if(l){const{vScale:h}=i._cachedMeta,{_parsed:u}=e,p=u.slice(0,d.lo+1).reverse().findIndex(g=>!pe(g[h.axis]));d.lo-=Math.max(0,p);const m=u.slice(d.hi).findIndex(g=>!pe(g[h.axis]));d.hi+=Math.max(0,m)}return d}}return{lo:0,hi:a.length-1}}function bl(e,t,n,o,i){const a=e.getSortedVisibleDatasetMetas(),r=n[t];for(let s=0,l=a.length;s<l;++s){const{index:c,data:d}=a[s],{lo:h,hi:u}=L2(a[s],t,r,i);for(let p=h;p<=u;++p){const m=d[p];m.skip||o(m,c,p)}}}function N2(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(o,i){const a=t?Math.abs(o.x-i.x):0,r=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function cc(e,t,n,o,i){const a=[];return!i&&!e.isPointInArea(t)||bl(e,n,t,function(r,s,l){!i&&!Ub(r,e.chartArea,0)||r.inRange(t.x,t.y,o)&&a.push({element:r,datasetIndex:s,index:l})},!0),a}function B2(e,t,n,o){let i=[];function a(r,s,l){const{startAngle:c,endAngle:d}=r.getProps(["startAngle","endAngle"],o),{angle:h}=mM(r,{x:t.x,y:t.y});bM(h,c,d)&&i.push({element:r,datasetIndex:s,index:l})}return bl(e,n,t,a),i}function z2(e,t,n,o,i,a){let r=[];const s=N2(n);let l=Number.POSITIVE_INFINITY;function c(d,h,u){const p=d.inRange(t.x,t.y,i);if(o&&!p)return;const m=d.getCenterPoint(i);if(!(a||e.isPointInArea(m))&&!p)return;const g=s(t,m);g<l?(r=[{element:d,datasetIndex:h,index:u}],l=g):g===l&&r.push({element:d,datasetIndex:h,index:u})}return bl(e,n,t,c),r}function dc(e,t,n,o,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!o?B2(e,t,n,i):z2(e,t,n,o,i,a)}function xg(e,t,n,o,i){const a=[],r=n==="x"?"inXRange":"inYRange";let s=!1;return bl(e,n,t,(l,c,d)=>{l[r]&&l[r](t[n],i)&&(a.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(t.x,t.y,i))}),o&&!s?[]:a}var H2={modes:{index(e,t,n,o){const i=lo(t,e),a=n.axis||"x",r=n.includeInvisible||!1,s=n.intersect?cc(e,i,a,o,r):dc(e,i,a,!1,o,r),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=s[0].index,h=c.data[d];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,o){const i=lo(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;let s=n.intersect?cc(e,i,a,o,r):dc(e,i,a,!1,o,r);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let d=0;d<c.length;++d)s.push({element:c[d],datasetIndex:l,index:d})}return s},point(e,t,n,o){const i=lo(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;return cc(e,i,a,o,r)},nearest(e,t,n,o){const i=lo(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;return dc(e,i,a,n.intersect,o,r)},x(e,t,n,o){const i=lo(t,e);return xg(e,i,"x",n.intersect,o)},y(e,t,n,o){const i=lo(t,e);return xg(e,i,"y",n.intersect,o)}}};const ay=["left","top","right","bottom"];function Wi(e,t){return e.filter(n=>n.pos===t)}function wg(e,t){return e.filter(n=>ay.indexOf(n.pos)===-1&&n.box.axis===t)}function Gi(e,t){return e.sort((n,o)=>{const i=t?o:n,a=t?n:o;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function j2(e){const t=[];let n,o,i,a,r,s;for(n=0,o=(e||[]).length;n<o;++n)i=e[n],{position:a,options:{stack:r,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:r&&a+r,stackWeight:s});return t}function W2(e){const t={};for(const n of e){const{stack:o,pos:i,stackWeight:a}=n;if(!o||!ay.includes(i))continue;const r=t[o]||(t[o]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=a}return t}function G2(e,t){const n=W2(e),{vBoxMaxWidth:o,hBoxMaxHeight:i}=t;let a,r,s;for(a=0,r=e.length;a<r;++a){s=e[a];const{fullSize:l}=s.box,c=n[s.stack],d=c&&s.stackWeight/c.weight;s.horizontal?(s.width=d?d*o:l&&t.availableWidth,s.height=i):(s.width=o,s.height=d?d*i:l&&t.availableHeight)}return n}function U2(e){const t=j2(e),n=Gi(t.filter(c=>c.box.fullSize),!0),o=Gi(Wi(t,"left"),!0),i=Gi(Wi(t,"right")),a=Gi(Wi(t,"top"),!0),r=Gi(Wi(t,"bottom")),s=wg(t,"x"),l=wg(t,"y");return{fullSize:n,leftAndTop:o.concat(a),rightAndBottom:i.concat(l).concat(r).concat(s),chartArea:Wi(t,"chartArea"),vertical:o.concat(i).concat(l),horizontal:a.concat(r).concat(s)}}function Cg(e,t,n,o){return Math.max(e[n],t[n])+Math.max(e[o],t[o])}function ry(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Y2(e,t,n,o){const{pos:i,box:a}=n,r=e.maxPadding;if(!de(i)){n.size&&(e[i]-=n.size);const h=o[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?a.height:a.width),n.size=h.size/h.count,e[i]+=n.size}a.getPadding&&ry(r,a.getPadding());const s=Math.max(0,t.outerWidth-Cg(r,e,"left","right")),l=Math.max(0,t.outerHeight-Cg(r,e,"top","bottom")),c=s!==e.w,d=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function q2(e){const t=e.maxPadding;function n(o){const i=Math.max(t[o]-e[o],0);return e[o]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function K2(e,t){const n=t.maxPadding;function o(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{a[r]=Math.max(t[r],n[r])}),a}return o(e?["left","right"]:["top","bottom"])}function na(e,t,n,o){const i=[];let a,r,s,l,c,d;for(a=0,r=e.length,c=0;a<r;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,K2(s.horizontal,t));const{same:h,other:u}=Y2(t,n,s,o);c|=h&&i.length,d=d||u,l.fullSize||i.push(s)}return c&&na(i,t,n,o)||d}function yr(e,t,n,o,i){e.top=n,e.left=t,e.right=t+o,e.bottom=n+i,e.width=o,e.height=i}function _g(e,t,n,o){const i=n.padding;let{x:a,y:r}=t;for(const s of e){const l=s.box,c=o[s.stack]||{placed:0,weight:1},d=s.stackWeight/c.weight||1;if(s.horizontal){const h=t.w*d,u=c.size||l.height;Ca(c.start)&&(r=c.start),l.fullSize?yr(l,i.left,r,n.outerWidth-i.right-i.left,u):yr(l,t.left+c.placed,r,h,u),c.start=r,c.placed+=h,r=l.bottom}else{const h=t.h*d,u=c.size||l.width;Ca(c.start)&&(a=c.start),l.fullSize?yr(l,a,i.top,u,n.outerHeight-i.bottom-i.top):yr(l,a,t.top+c.placed,u,h),c.start=a,c.placed+=h,a=l.right}}t.x=a,t.y=r}var xr={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,o){if(!e)return;const i=Un(e.options.layout.padding),a=Math.max(t-i.width,0),r=Math.max(n-i.height,0),s=U2(e.boxes),l=s.vertical,c=s.horizontal;he(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const d=l.reduce((g,v)=>v.box.options&&v.box.options.display===!1?g:g+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/d,hBoxMaxHeight:r/2}),u=Object.assign({},i);ry(u,Un(o));const p=Object.assign({maxPadding:u,w:a,h:r,x:i.left,y:i.top},i),m=G2(l.concat(c),h);na(s.fullSize,p,h,m),na(l,p,h,m),na(c,p,h,m)&&na(l,p,h,m),q2(p),_g(s.leftAndTop,p,h,m),p.x+=p.w,p.y+=p.h,_g(s.rightAndBottom,p,h,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},he(s.chartArea,g=>{const v=g.box;Object.assign(v,e.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class sy{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,o){}removeEventListener(t,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,o,i){return n=Math.max(0,n||t.width),o=o||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(t){return!0}updateConfig(t){}}class X2 extends sy{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Jr="$chartjs",Z2={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Sg=e=>e===null||e==="";function J2(e,t){const n=e.style,o=e.getAttribute("height"),i=e.getAttribute("width");if(e[Jr]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Sg(i)){const a=dg(e,"width");a!==void 0&&(e.width=a)}if(Sg(o))if(e.style.height==="")e.height=e.width/(t||2);else{const a=dg(e,"height");a!==void 0&&(e.height=a)}return e}const ly=a2?{passive:!0}:!1;function Q2(e,t,n){e&&e.addEventListener(t,n,ly)}function eR(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,ly)}function tR(e,t){const n=Z2[e.type]||e.type,{x:o,y:i}=lo(e,t);return{type:n,chart:t,native:e,x:o!==void 0?o:null,y:i!==void 0?i:null}}function Ms(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function nR(e,t,n){const o=e.canvas,i=new MutationObserver(a=>{let r=!1;for(const s of a)r=r||Ms(s.addedNodes,o),r=r&&!Ms(s.removedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function oR(e,t,n){const o=e.canvas,i=new MutationObserver(a=>{let r=!1;for(const s of a)r=r||Ms(s.removedNodes,o),r=r&&!Ms(s.addedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const _a=new Map;let kg=0;function cy(){const e=window.devicePixelRatio;e!==kg&&(kg=e,_a.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function iR(e,t){_a.size||window.addEventListener("resize",cy),_a.set(e,t)}function aR(e){_a.delete(e),_a.size||window.removeEventListener("resize",cy)}function rR(e,t,n){const o=e.canvas,i=o&&ku(o);if(!i)return;const a=Hb((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),r=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||a(c,d)});return r.observe(i),iR(e,a),r}function uc(e,t,n){n&&n.disconnect(),t==="resize"&&aR(e)}function sR(e,t,n){const o=e.canvas,i=Hb(a=>{e.ctx!==null&&n(tR(a,e))},e);return Q2(o,t,i),i}class lR extends sy{acquireContext(t,n){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(J2(t,n),o):null}releaseContext(t){const n=t.canvas;if(!n[Jr])return!1;const o=n[Jr].initial;["height","width"].forEach(a=>{const r=o[a];pe(r)?n.removeAttribute(a):n.setAttribute(a,r)});const i=o.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[Jr],!0}addEventListener(t,n,o){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:nR,detach:oR,resize:rR}[n]||sR;i[n]=a(t,n,o)}removeEventListener(t,n){const o=t.$proxies||(t.$proxies={}),i=o[n];i&&(({attach:uc,detach:uc,resize:uc}[n]||eR)(t,n,i),o[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,o,i){return i2(t,n,o,i)}isAttached(t){const n=t&&ku(t);return!!(n&&n.isConnected)}}function cR(e){return!Su()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?X2:lR}class gi{constructor(){ce(this,"x"),ce(this,"y"),ce(this,"active",!1),ce(this,"options"),ce(this,"$animations")}tooltipPosition(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}hasValue(){return Vs(this.x)&&Vs(this.y)}getProps(t,n){const o=this.$animations;if(!n||!o)return this;const i={};return t.forEach(a=>{i[a]=o[a]&&o[a].active()?o[a]._to:this[a]}),i}}ce(gi,"defaults",{}),ce(gi,"defaultRoutes");function dR(e,t){const n=e.options.ticks,o=uR(e),i=Math.min(n.maxTicksLimit||o,o),a=n.major.enabled?pR(t):[],r=a.length,s=a[0],l=a[r-1],c=[];if(r>i)return gR(t,c,a,r/i),c;const d=hR(a,t,i);if(r>0){let h,u;const p=r>1?Math.round((l-s)/(r-1)):null;for(wr(t,c,d,pe(p)?0:s-p,s),h=0,u=r-1;h<u;h++)wr(t,c,d,a[h],a[h+1]);return wr(t,c,d,l,pe(p)?t.length:l+p),c}return wr(t,c,d),c}function uR(e){const t=e.options.offset,n=e._tickSize(),o=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(o,i))}function hR(e,t,n){const o=fR(e),i=t.length/n;if(!o)return Math.max(i,1);const a=uM(o);for(let r=0,s=a.length-1;r<s;r++){const l=a[r];if(l>i)return l}return Math.max(i,1)}function pR(e){const t=[];let n,o;for(n=0,o=e.length;n<o;n++)e[n].major&&t.push(n);return t}function gR(e,t,n,o){let i=0,a=n[0],r;for(o=Math.ceil(o),r=0;r<e.length;r++)r===a&&(t.push(e[r]),i++,a=n[i*o])}function wr(e,t,n,o,i){const a=ye(o,0),r=Math.min(ye(i,e.length),e.length);let s=0,l,c,d;for(n=Math.ceil(n),i&&(l=i-o,n=l/Math.floor(l/n)),d=a;d<0;)s++,d=Math.round(a+s*n);for(c=Math.max(a,0);c<r;c++)c===d&&(t.push(e[c]),s++,d=Math.round(a+s*n))}function fR(e){const t=e.length;let n,o;if(t<2)return!1;for(o=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==o)return!1;return o}const mR=e=>e==="left"?"right":e==="right"?"left":e,Eg=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Og=(e,t)=>Math.min(t||e,e);function $g(e,t){const n=[],o=e.length/t,i=e.length;let a=0;for(;a<i;a+=o)n.push(e[Math.floor(a)]);return n}function vR(e,t,n){const o=e.ticks.length,i=Math.min(t,o-1),a=e._startPixel,r=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(l-a,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-s||l>r+s)))return l}function bR(e,t){he(e,n=>{const o=n.gc,i=o.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[o[a]];o.splice(0,i)}})}function Ui(e){return e.drawTicks?e.tickLength:0}function Ig(e,t){if(!e.display)return 0;const n=Ht(e.font,t),o=Un(e.padding);return(De(e.text)?e.text.length:1)*n.lineHeight+o.height}function yR(e,t){return wi(e,{scale:t,type:"scale"})}function xR(e,t,n){return wi(e,{tick:n,index:t,type:"tick"})}function wR(e,t,n){let o=SM(e);return(n&&t!=="right"||!n&&t==="right")&&(o=mR(o)),o}function CR(e,t,n,o){const{top:i,left:a,bottom:r,right:s,chart:l}=e,{chartArea:c,scales:d}=l;let h=0,u,p,m;const g=r-i,v=s-a;if(e.isHorizontal()){if(p=Jp(o,a,s),de(n)){const f=Object.keys(n)[0],y=n[f];m=d[f].getPixelForValue(y)+g-t}else n==="center"?m=(c.bottom+c.top)/2+g-t:m=Eg(e,n,t);u=s-a}else{if(de(n)){const f=Object.keys(n)[0],y=n[f];p=d[f].getPixelForValue(y)-v+t}else n==="center"?p=(c.left+c.right)/2-v+t:p=Eg(e,n,t);m=Jp(o,r,i),h=n==="left"?-$t:$t}return{titleX:p,titleY:m,maxWidth:u,rotation:h}}class Ci extends gi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return t=Rt(t,Number.POSITIVE_INFINITY),n=Rt(n,Number.NEGATIVE_INFINITY),o=Rt(o,Number.POSITIVE_INFINITY),i=Rt(i,Number.NEGATIVE_INFINITY),{min:Rt(t,o),max:Rt(n,i),minDefined:wt(t),maxDefined:wt(n)}}getMinMax(t){let{min:n,max:o,minDefined:i,maxDefined:a}=this.getUserBounds(),r;if(i&&a)return{min:n,max:o};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)r=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,r.min)),a||(o=Math.max(o,r.max));return n=a&&n>o?o:n,o=i&&n>o?n:o,{min:Rt(n,Rt(o,n)),max:Rt(o,Rt(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Se(this.options.beforeUpdate,[this])}update(t,n,o){const{beginAtZero:i,grace:a,ticks:r}=this.options,s=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=jM(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?$g(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=dR(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,t=!t),this._startPixel=n,this._endPixel=o,this._reversePixels=t,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Se(this.options.afterUpdate,[this])}beforeSetDimensions(){Se(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Se(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Se(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Se(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let o,i,a;for(o=0,i=t.length;o<i;o++)a=t[o],a.label=Se(n.callback,[a.value,o,t],this)}afterTickToLabelConversion(){Se(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Se(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,o=Og(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let r=i,s,l,c;if(!this._isVisible()||!n.display||i>=a||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),h=d.widest.width,u=d.highest.height,p=It(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/o:p/(o-1),h+6>s&&(s=p/(o-(t.offset?.5:1)),l=this.maxHeight-Ui(t.grid)-n.padding-Ig(t.title,this.chart.options.font),c=Math.sqrt(h*h+u*u),r=fM(Math.min(Math.asin(It((d.highest.height+6)/s,-1,1)),Math.asin(It(l/c,-1,1))-Math.asin(It(u/c,-1,1)))),r=Math.max(i,Math.min(a,r))),this.labelRotation=r}afterCalculateLabelRotation(){Se(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Se(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:a}}=this,r=this._isVisible(),s=this.isHorizontal();if(r){const l=Ig(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Ui(a)+l):(t.height=this.maxHeight,t.width=Ui(a)+l),o.display&&this.ticks.length){const{first:c,last:d,widest:h,highest:u}=this._getLabelSizes(),p=o.padding*2,m=vo(this.labelRotation),g=Math.cos(m),v=Math.sin(m);if(s){const f=o.mirror?0:v*h.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+f+p)}else{const f=o.mirror?0:g*h.width+v*u.height;t.width=Math.min(this.maxWidth,t.width+f+p)}this._calculatePadding(c,d,v,g)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,o,i){const{ticks:{align:a,padding:r},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,p=0;l?c?(u=i*t.width,p=o*n.height):(u=o*t.height,p=i*n.width):a==="start"?p=n.width:a==="end"?u=t.width:a!=="inner"&&(u=t.width/2,p=n.width/2),this.paddingLeft=Math.max((u-d+r)*this.width/(this.width-d),0),this.paddingRight=Math.max((p-h+r)*this.width/(this.width-h),0)}else{let d=n.height/2,h=t.height/2;a==="start"?(d=0,h=t.height):a==="end"&&(d=n.height,h=0),this.paddingTop=d+r,this.paddingBottom=h+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Se(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,o;for(n=0,o=t.length;n<o;n++)pe(t[n].label)&&(t.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=$g(o,n)),this._labelSizes=t=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,o){const{ctx:i,_longestTextCache:a}=this,r=[],s=[],l=Math.floor(n/Og(n,o));let c=0,d=0,h,u,p,m,g,v,f,y,x,w,S;for(h=0;h<n;h+=l){if(m=t[h].label,g=this._resolveTickFontOptions(h),i.font=v=g.string,f=a[v]=a[v]||{data:{},gc:[]},y=g.lineHeight,x=w=0,!pe(m)&&!De(m))x=og(i,f.data,f.gc,x,m),w=y;else if(De(m))for(u=0,p=m.length;u<p;++u)S=m[u],!pe(S)&&!De(S)&&(x=og(i,f.data,f.gc,x,S),w+=y);r.push(x),s.push(w),c=Math.max(x,c),d=Math.max(w,d)}bR(a,n);const k=r.indexOf(c),O=s.indexOf(d),_=E=>({width:r[E]||0,height:s[E]||0});return{first:_(0),last:_(n-1),widest:_(k),highest:_(O),widths:r,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return yM(this._alignToPixels?ro(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const o=n[t];return o.$context||(o.$context=xR(this.getContext(),t,o))}return this.$context||(this.$context=yR(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=vo(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,s=a?a.widest.width+r:0,l=a?a.highest.height+r:0;return this.isHorizontal()?l*o>s*i?s/o:l/i:l*i<s*o?l/o:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,o=this.chart,i=this.options,{grid:a,position:r,border:s}=i,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Ui(a),u=[],p=s.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,v=function(D){return ro(o,D,m)};let f,y,x,w,S,k,O,_,E,I,$,R;if(r==="top")f=v(this.bottom),k=this.bottom-h,_=f-g,I=v(t.top)+g,R=t.bottom;else if(r==="bottom")f=v(this.top),I=t.top,R=v(t.bottom)-g,k=f+g,_=this.top+h;else if(r==="left")f=v(this.right),S=this.right-h,O=f-g,E=v(t.left)+g,$=t.right;else if(r==="right")f=v(this.left),E=t.left,$=v(t.right)-g,S=f+g,O=this.left+h;else if(n==="x"){if(r==="center")f=v((t.top+t.bottom)/2+.5);else if(de(r)){const D=Object.keys(r)[0],F=r[D];f=v(this.chart.scales[D].getPixelForValue(F))}I=t.top,R=t.bottom,k=f+g,_=k+h}else if(n==="y"){if(r==="center")f=v((t.left+t.right)/2);else if(de(r)){const D=Object.keys(r)[0],F=r[D];f=v(this.chart.scales[D].getPixelForValue(F))}S=f-g,O=S-h,E=t.left,$=t.right}const q=ye(i.ticks.maxTicksLimit,d),V=Math.max(1,Math.ceil(d/q));for(y=0;y<d;y+=V){const D=this.getContext(y),F=a.setContext(D),U=s.setContext(D),G=F.lineWidth,ee=F.color,te=U.dash||[],ae=U.dashOffset,le=F.tickWidth,ue=F.tickColor,ge=F.tickBorderDash||[],Ee=F.tickBorderDashOffset;x=vR(this,y,l),x!==void 0&&(w=ro(o,x,G),c?S=O=E=$=w:k=_=I=R=w,u.push({tx1:S,ty1:k,tx2:O,ty2:_,x1:E,y1:I,x2:$,y2:R,width:G,color:ee,borderDash:te,borderDashOffset:ae,tickWidth:le,tickColor:ue,tickBorderDash:ge,tickBorderDashOffset:Ee}))}return this._ticksLength=d,this._borderValue=f,u}_computeLabelItems(t){const n=this.axis,o=this.options,{position:i,ticks:a}=o,r=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:d,mirror:h}=a,u=Ui(o.grid),p=u+d,m=h?-d:p,g=-vo(this.labelRotation),v=[];let f,y,x,w,S,k,O,_,E,I,$,R,q="middle";if(i==="top")k=this.bottom-m,O=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+m,O=this._getXAxisLabelAlignment();else if(i==="left"){const D=this._getYAxisLabelAlignment(u);O=D.textAlign,S=D.x}else if(i==="right"){const D=this._getYAxisLabelAlignment(u);O=D.textAlign,S=D.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+p;else if(de(i)){const D=Object.keys(i)[0],F=i[D];k=this.chart.scales[D].getPixelForValue(F)+p}O=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")S=(t.left+t.right)/2-p;else if(de(i)){const D=Object.keys(i)[0],F=i[D];S=this.chart.scales[D].getPixelForValue(F)}O=this._getYAxisLabelAlignment(u).textAlign}n==="y"&&(l==="start"?q="top":l==="end"&&(q="bottom"));const V=this._getLabelSizes();for(f=0,y=s.length;f<y;++f){x=s[f],w=x.label;const D=a.setContext(this.getContext(f));_=this.getPixelForTick(f)+a.labelOffset,E=this._resolveTickFontOptions(f),I=E.lineHeight,$=De(w)?w.length:1;const F=$/2,U=D.color,G=D.textStrokeColor,ee=D.textStrokeWidth;let te=O;r?(S=_,O==="inner"&&(f===y-1?te=this.options.reverse?"left":"right":f===0?te=this.options.reverse?"right":"left":te="center"),i==="top"?c==="near"||g!==0?R=-$*I+I/2:c==="center"?R=-V.highest.height/2-F*I+I:R=-V.highest.height+I/2:c==="near"||g!==0?R=I/2:c==="center"?R=V.highest.height/2-F*I:R=V.highest.height-$*I,h&&(R*=-1),g!==0&&!D.showLabelBackdrop&&(S+=I/2*Math.sin(g))):(k=_,R=(1-$)*I/2);let ae;if(D.showLabelBackdrop){const le=Un(D.backdropPadding),ue=V.heights[f],ge=V.widths[f];let Ee=R-le.top,qe=0-le.left;switch(q){case"middle":Ee-=ue/2;break;case"bottom":Ee-=ue;break}switch(O){case"center":qe-=ge/2;break;case"right":qe-=ge;break;case"inner":f===y-1?qe-=ge:f>0&&(qe-=ge/2);break}ae={left:qe,top:Ee,width:ge+le.width,height:ue+le.height,color:D.backdropColor}}v.push({label:w,font:E,textOffset:R,options:{rotation:g,color:U,strokeColor:G,strokeWidth:ee,textAlign:te,textBaseline:q,translation:[S,k],backdrop:ae}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-vo(this.labelRotation))return t==="top"?"left":"right";let o="center";return n.align==="start"?o="left":n.align==="end"?o="right":n.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:o,mirror:i,padding:a}}=this.options,r=this._getLabelSizes(),s=t+a,l=r.widest.width;let c,d;return n==="left"?i?(d=this.right+a,o==="near"?c="left":o==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-s,o==="near"?c="right":o==="center"?(c="center",d-=l/2):(c="left",d=this.left)):n==="right"?i?(d=this.left+a,o==="near"?c="right":o==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+s,o==="near"?c="left":o==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:o,top:i,width:a,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(o,i,a,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const o=this.ticks.findIndex(i=>i.value===t);return o>=0?n.setContext(this.getContext(o)).lineWidth:0}drawGrid(t){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,r;const s=(l,c,d)=>{!d.width||!d.color||(o.save(),o.lineWidth=d.width,o.strokeStyle=d.color,o.setLineDash(d.borderDash||[]),o.lineDashOffset=d.borderDashOffset,o.beginPath(),o.moveTo(l.x,l.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(a=0,r=i.length;a<r;++a){const l=i[a];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:o,grid:i}}=this,a=o.setContext(this.getContext()),r=o.display?a.width:0;if(!r)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,h,u;this.isHorizontal()?(c=ro(t,this.left,r)-r/2,d=ro(t,this.right,s)+s/2,h=u=l):(h=ro(t,this.top,r)-r/2,u=ro(t,this.bottom,s)+s/2,c=d=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,h),n.lineTo(d,u),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,o=this._computeLabelArea();o&&Yb(n,o);const i=this.getLabelItems(t);for(const a of i){const r=a.options,s=a.font,l=a.label,c=a.textOffset;rg(n,l,0,c,s,r)}o&&qb(n)}drawTitle(){const{ctx:t,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const a=Ht(o.font),r=Un(o.padding),s=o.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||de(n)?(l+=r.bottom,De(o.text)&&(l+=a.lineHeight*(o.text.length-1))):l+=r.top;const{titleX:c,titleY:d,maxWidth:h,rotation:u}=CR(this,l,n,s);rg(t,o.text,0,0,a,{color:o.color,maxWidth:h,rotation:u,textAlign:wR(s,n,i),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,o=ye(t.grid&&t.grid.z,-1),i=ye(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Ci.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:o,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let a,r;for(a=0,r=n.length;a<r;++a){const s=n[a];s[o]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Ht(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Cr{constructor(t,n,o){this.type=t,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let o;kR(n)&&(o=this.register(n));const i=this.items,a=t.id,r=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,_R(t,r,o),this.override&&Oe.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,o=t.id,i=this.scope;o in n&&delete n[o],i&&o in Oe[i]&&(delete Oe[i][o],this.override&&delete Io[o])}}function _R(e,t,n){const o=wa(Object.create(null),[n?Oe.get(n):{},Oe.get(t),e.defaults]);Oe.set(t,o),e.defaultRoutes&&SR(t,e.defaultRoutes),e.descriptors&&Oe.describe(t,e.descriptors)}function SR(e,t){Object.keys(t).forEach(n=>{const o=n.split("."),i=o.pop(),a=[e].concat(o).join("."),r=t[n].split("."),s=r.pop(),l=r.join(".");Oe.route(a,i,l,s)})}function kR(e){return"id"in e&&"defaults"in e}class ER{constructor(){this.controllers=new Cr(ha,"datasets",!0),this.elements=new Cr(gi,"elements"),this.plugins=new Cr(Object,"plugins"),this.scales=new Cr(Ci,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,o){[...n].forEach(i=>{const a=o||this._getRegistryForType(i);o||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):he(i,r=>{const s=o||this._getRegistryForType(r);this._exec(t,s,r)})})}_exec(t,n,o){const i=yu(t);Se(o["before"+i],[],o),n[t](o),Se(o["after"+i],[],o)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(t))return o}return this.plugins}_get(t,n,o){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+o+".");return i}}var Nt=new ER;class OR{constructor(){this._init=void 0}notify(t,n,o,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const a=i?this._descriptors(t).filter(i):this._descriptors(t),r=this._notify(a,t,n,o);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),r}_notify(t,n,o,i){i=i||{};for(const a of t){const r=a.plugin,s=r[o],l=[n,i,a.options];if(Se(s,l,r)===!1&&i.cancelable)return!1}return!0}invalidate(){pe(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const o=t&&t.config,i=ye(o.options&&o.options.plugins,{}),a=$R(o);return i===!1&&!n?[]:TR(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],o=this._cache,i=(a,r)=>a.filter(s=>!r.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,o),t,"stop"),this._notify(i(o,n),t,"start")}}function $R(e){const t={},n=[],o=Object.keys(Nt.plugins.items);for(let a=0;a<o.length;a++)n.push(Nt.getPlugin(o[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const r=i[a];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function IR(e,t){return!t&&e===!1?null:e===!0?{}:e}function TR(e,{plugins:t,localIds:n},o,i){const a=[],r=e.getContext();for(const s of t){const l=s.id,c=IR(o[l],i);c!==null&&a.push({plugin:s,options:PR(e.config,{plugin:s,local:n[l]},c,r)})}return a}function PR(e,{plugin:t,local:n},o,i){const a=e.pluginScopeKeys(t),r=e.getOptionScopes(o,a);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function id(e,t){const n=Oe.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function VR(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function DR(e,t){return e===t?"_index_":"_value_"}function Tg(e){if(e==="x"||e==="y"||e==="r")return e}function MR(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function ad(e,...t){if(Tg(e))return e;for(const n of t){const o=n.axis||MR(n.position)||e.length>1&&Tg(e[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Pg(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function RR(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(o=>o.xAxisID===e||o.yAxisID===e);if(n.length)return Pg(e,"x",n[0])||Pg(e,"y",n[0])}return{}}function FR(e,t){const n=Io[e.type]||{scales:{}},o=t.scales||{},i=id(e.type,t),a=Object.create(null);return Object.keys(o).forEach(r=>{const s=o[r];if(!de(s))return console.error(`Invalid scale configuration for scale: ${r}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=ad(r,s,RR(r,e),Oe.scales[s.type]),c=DR(l,i),d=n.scales||{};a[r]=la(Object.create(null),[{axis:l},s,d[l],d[c]])}),e.data.datasets.forEach(r=>{const s=r.type||e.type,l=r.indexAxis||id(s,t),c=(Io[s]||{}).scales||{};Object.keys(c).forEach(d=>{const h=VR(d,l),u=r[h+"AxisID"]||h;a[u]=a[u]||Object.create(null),la(a[u],[{axis:h},o[u],c[d]])})}),Object.keys(a).forEach(r=>{const s=a[r];la(s,[Oe.scales[s.type],Oe.scale])}),a}function dy(e){const t=e.options||(e.options={});t.plugins=ye(t.plugins,{}),t.scales=FR(e,t)}function uy(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function AR(e){return e=e||{},e.data=uy(e.data),dy(e),e}const Vg=new Map,hy=new Set;function _r(e,t){let n=Vg.get(e);return n||(n=t(),Vg.set(e,n),hy.add(n)),n}const Yi=(e,t,n)=>{const o=hi(t,n);o!==void 0&&e.add(o)};class LR{constructor(t){this._config=AR(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=uy(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),dy(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return _r(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return _r(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return _r(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,o=this.type;return _r(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const o=this._scopeCache;let i=o.get(t);return(!i||n)&&(i=new Map,o.set(t,i)),i}getOptionScopes(t,n,o){const{options:i,type:a}=this,r=this._cachedScopes(t,o),s=r.get(n);if(s)return s;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(h=>Yi(l,t,h))),d.forEach(h=>Yi(l,i,h)),d.forEach(h=>Yi(l,Io[a]||{},h)),d.forEach(h=>Yi(l,Oe,h)),d.forEach(h=>Yi(l,nd,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),hy.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Io[n]||{},Oe.datasets[n]||{},{type:n},Oe,nd]}resolveNamedOptions(t,n,o,i=[""]){const a={$shared:!0},{resolver:r,subPrefixes:s}=Dg(this._resolverCache,t,i);let l=r;if(BR(r,n)){a.$shared=!1,o=Gn(o)?o():o;const c=this.createResolver(t,o,s);l=pi(r,o,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,o=[""],i){const{resolver:a}=Dg(this._resolverCache,t,o);return de(n)?pi(a,n,void 0,i):a}}function Dg(e,t,n){let o=e.get(t);o||(o=new Map,e.set(t,o));const i=n.join();let a=o.get(i);return a||(a={resolver:wu(t,n),subPrefixes:n.filter(r=>!r.toLowerCase().includes("hover"))},o.set(i,a)),a}const NR=e=>de(e)&&Object.getOwnPropertyNames(e).some(t=>Gn(e[t]));function BR(e,t){const{isScriptable:n,isIndexable:o}=Zb(e);for(const i of t){const a=n(i),r=o(i),s=(r||a)&&e[i];if(a&&(Gn(s)||NR(s))||r&&De(s))return!0}return!1}var zR="4.5.1";const HR=["top","bottom","left","right","chartArea"];function Mg(e,t){return e==="top"||e==="bottom"||HR.indexOf(e)===-1&&t==="x"}function Rg(e,t){return function(n,o){return n[e]===o[e]?n[t]-o[t]:n[e]-o[e]}}function Fg(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Se(n&&n.onComplete,[e],t)}function jR(e){const t=e.chart,n=t.options.animation;Se(n&&n.onProgress,[e],t)}function py(e){return Su()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Rs={},gy=e=>{const t=py(e);return Object.values(Rs).filter(n=>n.canvas===t).pop()};function WR(e,t,n){const o=Object.keys(e);for(const i of o){const a=+i;if(a>=t){const r=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=r)}}}function GR(e,t,n,o){return!n||e.type==="mouseout"?null:o?t:e}class Dn{static register(...t){Nt.add(...t),Ag()}static unregister(...t){Nt.remove(...t),Ag()}constructor(t,n){const o=this.config=new LR(n),i=py(t),a=gy(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const r=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||cR(i)),this.platform.updateConfig(o);const s=this.platform.acquireContext(i,r.aspectRatio),l=s&&s.canvas,c=l&&l.height,d=l&&l.width;if(this.id=oM(),this.ctx=s,this.canvas=l,this.width=d,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new OR,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_M(h=>this.update(h),r.resizeDelay||0),this._dataChanges=[],Rs[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Qt.listen(this,"complete",Fg),Qt.listen(this,"progress",jR),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:o,height:i,_aspectRatio:a}=this;return pe(t)?n&&a?a:i?o/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Nt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ig(this.canvas,this.ctx),this}stop(){return Qt.stop(this),this}resize(t,n){Qt.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const o=this.options,i=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,t,n,a),s=o.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,cg(this,s,!0)&&(this.notifyPlugins("resize",{size:r}),Se(o.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};he(t,(n,o)=>{n.id=o})}buildOrUpdateScales(){const t=this.options,n=t.scales,o=this.scales,i=Object.keys(o).reduce((r,s)=>(r[s]=!1,r),{});let a=[];n&&(a=a.concat(Object.keys(n).map(r=>{const s=n[r],l=ad(r,s),c=l==="r",d=l==="x";return{options:s,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),he(a,r=>{const s=r.options,l=s.id,c=ad(l,s),d=ye(s.type,r.dtype);(s.position===void 0||Mg(s.position,c)!==Mg(r.dposition))&&(s.position=r.dposition),i[l]=!0;let h=null;if(l in o&&o[l].type===d)h=o[l];else{const u=Nt.getScale(d);h=new u({id:l,type:d,ctx:this.ctx,chart:this}),o[h.id]=h}h.init(s,t)}),he(i,(r,s)=>{r||delete o[s]}),he(o,r=>{xr.configure(this,r,r.options),xr.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,o=t.length;if(t.sort((i,a)=>i.index-a.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);t.splice(n,o-n)}this._sortedMetasets=t.slice(0).sort(Rg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((o,i)=>{n.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const a=n[o];let r=this.getDatasetMeta(o);const s=a.type||this.config.type;if(r.type&&r.type!==s&&(this._destroyDatasetMeta(o),r=this.getDatasetMeta(o)),r.type=s,r.indexAxis=a.indexAxis||id(s,this.options),r.order=a.order||0,r.index=o,r.label=""+a.label,r.visible=this.isDatasetVisible(o),r.controller)r.controller.updateIndex(o),r.controller.linkScales();else{const l=Nt.getController(s),{datasetElementType:c,dataElementType:d}=Oe.datasets[s];Object.assign(l,{dataElementType:Nt.getElement(d),datasetElementType:c&&Nt.getElement(c)}),r.controller=new l(this,o),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){he(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:h}=this.getDatasetMeta(c),u=!i&&a.indexOf(h)===-1;h.buildOrUpdateElements(u),r=Math.max(+h.getMaxOverflow(),r)}r=this._minPadding=o.layout.autoPadding?r:0,this._updateLayout(r),i||he(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Rg("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){he(this.scales,t=>{xr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(t.events);(!Up(n,o)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:a}of n){const r=o==="_removeElements"?-a:a;WR(t,i,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=a=>new Set(t.filter(r=>r[0]===a).map((r,s)=>s+","+r.splice(1).join(","))),i=o(0);for(let a=1;a<n;a++)if(!Up(i,o(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xr.update(this,this.width,this.height,t);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],he(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Gn(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const o=this.getDatasetMeta(t),i={meta:o,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Qt.has(this)?this.attached&&!Qt.running(this)&&Qt.start(this):(this.draw(),Fg({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,o=[];let i,a;for(i=0,a=n.length;i<a;++i){const r=n[i];(!t||r.visible)&&o.push(r)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,o={meta:t,index:t.index,cancelable:!0},i=u2(this,t);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Yb(n,i),t.controller.draw(),i&&qb(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Ub(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,o,i){const a=H2.modes[n];return typeof a=="function"?a(this,t,o,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],o=this._metasets;let i=o.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=wi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const o=this.getDatasetMeta(t);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(t,n){const o=this.getDatasetMeta(t);o.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,o){const i=o?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,i);Ca(n)?(a.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(t,o),r.update(a,{visible:o}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Qt.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ig(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Rs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,o=(a,r)=>{n.addEventListener(this,a,r),t[a]=r},i=(a,r,s)=>{a.offsetX=r,a.offsetY=s,this._eventHandler(a)};he(this.options.events,a=>o(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,o=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const s=()=>{i("attach",s),this.attached=!0,this.resize(),o("resize",a),o("detach",r)};r=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),o("attach",s)},n.isAttached(this.canvas)?s():r()}unbindEvents(){he(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},he(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,o){const i=o?"set":"remove";let a,r,s,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){r=t[s];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[i+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],o=t.map(({datasetIndex:i,index:a})=>{const r=this.getDatasetMeta(i);if(!r)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:r.data[a],index:a}});!Is(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(t,n,o){return this._plugins.notify(this,t,n,o)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,o){const i=this.options.hover,a=(l,c)=>l.filter(d=>!c.some(h=>d.datasetIndex===h.datasetIndex&&d.index===h.index)),r=a(n,t),s=o?t:a(t,n);r.length&&this.updateHoverStyle(r,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const o={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const a=this._handleEvent(t,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(a||o.changed)&&this.render(),this}_handleEvent(t,n,o){const{_active:i=[],options:a}=this,r=n,s=this._getActiveElements(t,i,o,r),l=cM(t),c=GR(t,this._lastEvent,o,l);o&&(this._lastEvent=null,Se(a.onHover,[t,s,this],this),l&&Se(a.onClick,[t,s,this],this));const d=!Is(s,i);return(d||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,d}_getActiveElements(t,n,o,i){if(t.type==="mouseout")return[];if(!o)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}ce(Dn,"defaults",Oe),ce(Dn,"instances",Rs),ce(Dn,"overrides",Io),ce(Dn,"registry",Nt),ce(Dn,"version",zR),ce(Dn,"getChart",gy);function Ag(){return he(Dn.instances,e=>e._plugins.invalidate())}function fy(e,t){const{x:n,y:o,base:i,width:a,height:r}=e.getProps(["x","y","base","width","height"],t);let s,l,c,d,h;return e.horizontal?(h=r/2,s=Math.min(n,i),l=Math.max(n,i),c=o-h,d=o+h):(h=a/2,s=n-h,l=n+h,c=Math.min(o,i),d=Math.max(o,i)),{left:s,top:c,right:l,bottom:d}}function Nn(e,t,n,o){return e?0:It(t,n,o)}function UR(e,t,n){const o=e.options.borderWidth,i=e.borderSkipped,a=Xb(o);return{t:Nn(i.top,a.top,0,n),r:Nn(i.right,a.right,0,t),b:Nn(i.bottom,a.bottom,0,n),l:Nn(i.left,a.left,0,t)}}function YR(e,t,n){const{enableBorderRadius:o}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=ua(i),r=Math.min(t,n),s=e.borderSkipped,l=o||de(i);return{topLeft:Nn(!l||s.top||s.left,a.topLeft,0,r),topRight:Nn(!l||s.top||s.right,a.topRight,0,r),bottomLeft:Nn(!l||s.bottom||s.left,a.bottomLeft,0,r),bottomRight:Nn(!l||s.bottom||s.right,a.bottomRight,0,r)}}function qR(e){const t=fy(e),n=t.right-t.left,o=t.bottom-t.top,i=UR(e,n/2,o/2),a=YR(e,n/2,o/2);return{outer:{x:t.left,y:t.top,w:n,h:o,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function hc(e,t,n,o){const i=t===null,a=n===null,r=e&&!(i&&a)&&fy(e,o);return r&&(i||Xp(t,r.left,r.right))&&(a||Xp(n,r.top,r.bottom))}function KR(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function XR(e,t){e.rect(t.x,t.y,t.w,t.h)}function pc(e,t,n={}){const o=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-o,r=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+o,y:e.y+i,w:e.w+a,h:e.h+r,radius:e.radius}}class Qr extends gi{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:a,outer:r}=qR(this),s=KR(r.radius)?od:XR;t.save(),(r.w!==a.w||r.h!==a.h)&&(t.beginPath(),s(t,pc(r,n,a)),t.clip(),s(t,pc(a,-n,r)),t.fillStyle=o,t.fill("evenodd")),t.beginPath(),s(t,pc(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,o){return hc(this,t,n,o)}inXRange(t,n){return hc(this,t,null,n)}inYRange(t,n){return hc(this,null,t,n)}getCenterPoint(t){const{x:n,y:o,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?o:(o+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}ce(Qr,"id","bar"),ce(Qr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ce(Qr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const pa={average(e){if(!e.length)return!1;let t,n,o=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){const r=e[t].element;if(r&&r.hasValue()){const s=r.tooltipPosition();o.add(s.x),i+=s.y,++a}}return a===0||o.size===0?!1:{x:[...o].reduce((r,s)=>r+s)/o.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,i=Number.POSITIVE_INFINITY,a,r,s;for(a=0,r=e.length;a<r;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=vM(t,c);d<i&&(i=d,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,o=l.y}return{x:n,y:o}}};function Ft(e,t){return t&&(De(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function en(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
8
|
+
</svg>`,n.body.appendChild(o)};function kI(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){const o=e.value.length;e.setSelectionRange(o,o);return}try{const o=e.value,{start:i,end:a,value:r}=t;if(o===r){e.setSelectionRange(i,a);return}const s=bp(r,o,i),l=i===a?s:bp(r,o,a),c=Math.max(0,Math.min(s,o.length)),d=Math.max(c,Math.min(l,o.length));e.setSelectionRange(c,d)}catch{const o=e.value.length;e.setSelectionRange(o,o)}}}function bp(e,t,n){const o=e.slice(0,n),i=e.slice(n);let a=0;const r=Math.min(o.length,t.length);for(let c=0;c<r&&o[c]===t[c];c++)a=c+1;let s=0;const l=Math.min(i.length,t.length-a);for(let c=0;c<l;c++){const d=i.length-1-c,h=t.length-1-c;if(i[d]===t[h])s=c+1;else break}if(a>=o.length)return a;if(s>=i.length)return t.length-s;if(a>0)return a;if(s>0)return t.length-s;if(e.length>0){const c=n/e.length;return Math.round(c*t.length)}return t.length}var EI=(e,t={})=>new Intl.NumberFormat(e,t),OI=(e,t={})=>new eb(e,t),Kl=(e,t)=>{const{prop:n,computed:o}=t;return n("formatOptions")?e===""?Number.NaN:o("parser").parse(e):parseFloat(e)},to=(e,t)=>{const{prop:n,computed:o}=t;return Number.isNaN(e)?"":n("formatOptions")?o("formatter").format(e):e.toString()},$I=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:II,guards:TI,createMachine:PI}=nl(),{not:yp,and:xp}=TI;PI({props({props:e}){const t=$I(e.step,e.formatOptions);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,translations:{incrementLabel:"increment value",decrementLabel:"decrease value",...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(o){var i;const a=n(),r=Kl(o,{computed:a,prop:e});(i=e("onValueChange"))==null||i({value:o,valueAsNumber:r})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(o){return o?`x:${o.x}, y:${o.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Kl(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>to(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>fw(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>gw(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!dm(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>{var n,o;return(o=(n=e("translations")).valueText)==null?void 0:o.call(n,t.get("value"))},formatter:Ec(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>EI(e,t)),parser:Ec(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>OI(e,t))},watch({track:e,action:t,context:n,computed:o,prop:i}){e([()=>n.get("value"),()=>i("locale")],()=>{t(["syncInputElement"])}),e([()=>o("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:xp("clampValueOnBlur",yp("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur"]},{guard:yp("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:II([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:xp("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){const t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){const t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){const n=dr(t);return $a(n,{onFieldsetDisabledChange(o){e.set("fieldsetDisabled",o)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){const n=e.get("scrubberCursorPoint");return wI(t,n)},preventTextSelection({scope:e}){return CI(e)},trackButtonDisabled({context:e,scope:t,send:n}){const o=e.get("hint"),i=xI(t,o);return Ta(i,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){const o=dr(e);if(!o||!e.isActiveElement(o)||!n("allowMouseWheel"))return;function i(a){a.preventDefault();const r=Math.sign(a.deltaY)*-1;r===1?t({type:"VALUE.INCREMENT"}):r===-1&&t({type:"VALUE.DECREMENT"})}return se(o,"wheel",i,{passive:!1})},activatePointerLock({scope:e}){if(!Nf())return V0(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:o}){const i=e.getDoc();function a(s){const l=n.get("scrubberCursorPoint"),c=o("isRtl"),d=_I(e,{point:l,isRtl:c,event:s});d.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:d.hint,point:d.point})}function r(){t({type:"SCRUBBER.POINTER_UP"})}return va(se(i,"mousemove",a,!1),se(i,"mouseup",r,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;const n=dr(e);e.isActiveElement(n)||J(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:o}){let i=yw(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=Ae(i,n("min"),n("max"))),e.set("value",to(i,{computed:o,prop:n}))},decrement({context:e,event:t,prop:n,computed:o}){let i=xw(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=Ae(i,n("min"),n("max"))),e.set("value",to(i,{computed:o,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){const o=Ae(n("valueAsNumber"),t("min"),t("max"));e.set("value",to(o,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:o}){let i=Kl(t.value,{computed:o,prop:n});n("allowOverflow")||(i=Ae(i,n("min"),n("max"))),e.set("value",to(i,{computed:o,prop:n}))},setValue({context:e,event:t}){var n;const o=((n=t.target)==null?void 0:n.value)??t.value;e.set("value",o)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){const o=to(t("max"),{computed:n,prop:t});e.set("value",o)},decrementToMin({context:e,prop:t,computed:n}){const o=to(t("min"),{computed:n,prop:t});e.set("value",o)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){var o;if(n.type==="INPUT.CHANGE")return;const i=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";(o=t("onValueInvalid"))==null||o({reason:i,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:o}){const i=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),a=dr(o),r=t.selection;J(()=>{Et(a,i),kI(a,r,o)})},setFormattedValue({context:e,computed:t}){e.set("value",t("formattedValue"))},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){const n=nb(t),o=e.get("scrubberCursorPoint");!n||!o||(n.style.transform=`translate3d(${o.x}px, ${o.y}px, 0px)`)}}}});Y()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]);var VI=ie("pagination").parts("root","item","ellipsis","prevTrigger","nextTrigger");VI.build();Y()(["count","dir","getRootNode","id","ids","onPageChange","onPageSizeChange","page","defaultPage","pageSize","defaultPageSize","siblingCount","translations","type","getPageUrl"]);Y()(["value","type"]);Y()(["index"]);var DI=ie("password-input").parts("root","input","label","control","indicator","visibilityTrigger");DI.build();Y()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]);var MI=ie("pinInput").parts("root","label","input","control");MI.build();Y()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]);var ob=ie("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger");ob.build();Y()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);var RI=ie("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange");RI.build();Y()(["dir","getRootNode","id","ids","max","min","orientation","translations","value","onValueChange","defaultValue","formatOptions","locale"]);var FI=ie("qr-code").parts("root","frame","pattern","overlay","downloadTrigger");FI.build();Y()(["ids","defaultValue","value","id","encoding","dir","getRootNode","onValueChange","pixelSize"]);var gu=ie("radio-group").parts("root","label","item","itemText","itemControl","indicator");gu.build();Y()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);Y()(["value","disabled","invalid"]);var AI=ie("rating-group").parts("root","label","item","control");AI.build();Y()(["allowHalf","autoFocus","count","dir","disabled","form","getRootNode","id","ids","name","onHoverChange","onValueChange","required","readOnly","translations","value","defaultValue"]);Y()(["index"]);var LI=ie("scroll-area").parts("root","viewport","content","scrollbar","thumb","corner");LI.build();Y()(["dir","getRootNode","ids","id"]);const NI=gu.rename("segment-group");NI.build();const[ib,He]=we("SelectContext"),BI=M({__name:"select-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),zI=M({__name:"select-content",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=_m(),o=A(()=>tl(t.value.getContentProps(),n.value.presenceProps));return K(),(i,a)=>b(n).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},o.value,{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),HI=M({__name:"select-context",setup(e){const t=He();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),jI=M({__name:"select-control",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getControlProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),WI={key:0,value:""},GI=["value","disabled"],UI=M({__name:"select-hidden-select",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=mi();return K(),(o,i)=>{var a;return C(),T(b(X).select,W({"aria-describedby":(a=b(n))==null?void 0:a.ariaDescribedby},b(t).getHiddenSelectProps()),{default:P(()=>[b(t).value.length===0?(C(),H("option",WI)):Q("",!0),(C(!0),H(Ce,null,Ge(b(t).collection.items,r=>(C(),H("option",{key:r.value,value:b(t).collection.getItemValue(r),disabled:b(t).collection.getItemDisabled(r)},oe(b(t).collection.stringifyItem(r))+" > ",9,GI))),128))]),_:1},16,["aria-describedby"])}}}),YI=M({__name:"select-indicator",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[qI,KI]=we("SelectItemContext"),XI=M({__name:"select-item-context",setup(e){const t=KI();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),[ZI,JI]=we("SelectItemGroupPropsContext"),QI=M({__name:"select-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=JI();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemGroupLabelProps({htmlFor:b(n).id}),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),eT=M({__name:"select-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=He(),o=vn(),i=t.id??o;return ZI({id:i}),K(),(a,r)=>(C(),T(b(X).div,W(b(n).getItemGroupProps({id:b(i)}),{"as-child":e.asChild}),{default:P(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),[tT,ab]=we("SelectItemPropsContext"),nT=M({__name:"select-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=ab();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getItemIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),oT=M({__name:"select-item-text",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=ab();return K(),(o,i)=>(C(),T(b(X).span,W(b(t).getItemTextProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),iT=M({__name:"select-item",props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=He();return tT(t),qI(A(()=>n.value.getItemState(t))),K(),(o,i)=>(C(),T(b(X).div,W(b(n).getItemProps(t),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),aT=M({__name:"select-label",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).label,W(b(t).getLabelProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),rT=M({__name:"select-list",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getListProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),sT=M({__name:"select-positioner",props:{asChild:{type:Boolean}},setup(e){const t=He(),n=Nd(),o=wm(A(()=>({...n.value,present:t.value.open})));return Cm(o),K(),(i,a)=>b(o).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getPositionerProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),lT=M({__name:"select-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return ib(n),fi(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var rb=ie("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),We=rb.build(),sb=e=>new Vo(e);sb.empty=()=>new Vo({items:[]});var cT=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`select:${e.id}`},qc=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},Kc=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`select:${e.id}:trigger`},lb=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`select:${e.id}:clear-trigger`},ur=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`select:${e.id}:label`},dT=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`select:${e.id}:control`},Xc=(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}`},Zc=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenSelect)??`select:${e.id}:select`},cb=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`select:${e.id}:positioner`},uT=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:o.call(n,t))??`select:${e.id}:optgroup:${t}`},wp=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:o.call(n,t))??`select:${e.id}:optgroup-label:${t}`},Xl=e=>e.getById(Zc(e)),Ai=e=>e.getById(qc(e)),mo=e=>e.getById(Kc(e)),hT=e=>e.getById(lb(e)),Cp=e=>e.getById(cb(e)),Zl=(e,t)=>t==null?null:e.getById(Xc(e,t));function pT(e,t){const{context:n,prop:o,scope:i,state:a,computed:r,send:s}=e,l=o("disabled")||n.get("fieldsetDisabled"),c=!!o("invalid"),d=!!o("required"),h=!!o("readOnly"),u=o("composite"),p=o("collection"),m=a.hasTag("open"),g=a.matches("focused"),v=n.get("highlightedValue"),f=n.get("highlightedItem"),y=n.get("selectedItems"),x=n.get("currentPlacement"),w=r("isTypingAhead"),S=r("isInteractive"),k=v?Xc(i,v):void 0;function O(E){const I=p.getItemDisabled(E.item),$=p.getItemValue(E.item);return Ad($,()=>`[zag-js] No value found for item ${JSON.stringify(E.item)}`),{value:$,disabled:!!(l||I),highlighted:v===$,selected:n.get("value").includes($)}}const _=ev({...o("positioning"),placement:x});return{open:m,focused:g,empty:n.get("value").length===0,highlightedItem:f,highlightedValue:v,selectedItems:y,hasSelectedItems:r("hasSelectedItems"),value:n.get("value"),valueAsString:r("valueAsString"),collection:p,multiple:!!o("multiple"),disabled:!!l,reposition(E={}){s({type:"POSITIONING.SET",options:E})},focus(){var E;(E=mo(i))==null||E.focus({preventScroll:!0})},setOpen(E){a.hasTag("open")!==E&&s({type:E?"OPEN":"CLOSE"})},selectValue(E){s({type:"ITEM.SELECT",value:E})},setValue(E){s({type:"VALUE.SET",value:E})},selectAll(){s({type:"VALUE.SET",value:p.getValues()})},setHighlightValue(E){s({type:"HIGHLIGHTED_VALUE.SET",value:E})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(E){s(E?{type:"ITEM.CLEAR",value:E}:{type:"VALUE.CLEAR"})},getItemState:O,getRootProps(){return t.element({...We.root.attrs,dir:o("dir"),id:cT(i),"data-invalid":j(c),"data-readonly":j(h)})},getLabelProps(){return t.label({dir:o("dir"),id:ur(i),...We.label.attrs,"data-disabled":j(l),"data-invalid":j(c),"data-readonly":j(h),"data-required":j(d),htmlFor:Zc(i),onClick(E){var I;E.defaultPrevented||l||(I=mo(i))==null||I.focus({preventScroll:!0})}})},getControlProps(){return t.element({...We.control.attrs,dir:o("dir"),id:dT(i),"data-state":m?"open":"closed","data-focus":j(g),"data-disabled":j(l),"data-invalid":j(c)})},getValueTextProps(){return t.element({...We.valueText.attrs,dir:o("dir"),"data-disabled":j(l),"data-invalid":j(c),"data-focus":j(g)})},getTriggerProps(){return t.button({id:Kc(i),disabled:l,dir:o("dir"),type:"button",role:"combobox","aria-controls":qc(i),"aria-expanded":m,"aria-haspopup":"listbox","data-state":m?"open":"closed","aria-invalid":c,"aria-required":d,"aria-labelledby":ur(i),...We.trigger.attrs,"data-disabled":j(l),"data-invalid":j(c),"data-readonly":j(h),"data-placement":x,"data-placeholder-shown":j(!r("hasSelectedItems")),onClick(E){S&&(E.defaultPrevented||s({type:"TRIGGER.CLICK"}))},onFocus(){s({type:"TRIGGER.FOCUS"})},onBlur(){s({type:"TRIGGER.BLUR"})},onKeyDown(E){if(E.defaultPrevented||!S)return;const I={ArrowUp(){s({type:"TRIGGER.ARROW_UP"})},ArrowDown($){s({type:$.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){s({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){s({type:"TRIGGER.ARROW_RIGHT"})},Home(){s({type:"TRIGGER.HOME"})},End(){s({type:"TRIGGER.END"})},Enter(){s({type:"TRIGGER.ENTER"})},Space($){s(w?{type:"TRIGGER.TYPEAHEAD",key:$.key}:{type:"TRIGGER.ENTER"})}}[Cc(E,{dir:o("dir"),orientation:"vertical"})];if(I){I(E),E.preventDefault();return}pn.isValidEvent(E)&&(s({type:"TRIGGER.TYPEAHEAD",key:E.key}),E.preventDefault())}})},getIndicatorProps(){return t.element({...We.indicator.attrs,dir:o("dir"),"aria-hidden":!0,"data-state":m?"open":"closed","data-disabled":j(l),"data-invalid":j(c),"data-readonly":j(h)})},getItemProps(E){const I=O(E);return t.element({id:Xc(i,I.value),role:"option",...We.item.attrs,dir:o("dir"),"data-value":I.value,"aria-selected":I.selected,"data-state":I.selected?"checked":"unchecked","data-highlighted":j(I.highlighted),"data-disabled":j(I.disabled),"aria-disabled":Ji(I.disabled),onPointerMove($){I.disabled||$.pointerType!=="mouse"||I.value!==v&&s({type:"ITEM.POINTER_MOVE",value:I.value})},onClick($){$.defaultPrevented||I.disabled||s({type:"ITEM.CLICK",src:"pointerup",value:I.value})},onPointerLeave($){var R;I.disabled||E.persistFocus||$.pointerType!=="mouse"||!((R=e.event.previous())!=null&&R.type.includes("POINTER"))||s({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(E){const I=O(E);return t.element({...We.itemText.attrs,"data-state":I.selected?"checked":"unchecked","data-disabled":j(I.disabled),"data-highlighted":j(I.highlighted)})},getItemIndicatorProps(E){const I=O(E);return t.element({"aria-hidden":!0,...We.itemIndicator.attrs,"data-state":I.selected?"checked":"unchecked",hidden:!I.selected})},getItemGroupLabelProps(E){const{htmlFor:I}=E;return t.element({...We.itemGroupLabel.attrs,id:wp(i,I),dir:o("dir"),role:"presentation"})},getItemGroupProps(E){const{id:I}=E;return t.element({...We.itemGroup.attrs,"data-disabled":j(l),id:uT(i,I),"aria-labelledby":wp(i,I),role:"group",dir:o("dir")})},getClearTriggerProps(){return t.button({...We.clearTrigger.attrs,id:lb(i),type:"button","aria-label":"Clear value","data-invalid":j(c),disabled:l,hidden:!r("hasSelectedItems"),dir:o("dir"),onClick(E){E.defaultPrevented||s({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const E=n.get("value"),I=o("multiple")?E:E?.[0];return t.select({name:o("name"),form:o("form"),disabled:l,multiple:o("multiple"),required:o("required"),"aria-hidden":!0,id:Zc(i),defaultValue:I,style:Fd,tabIndex:-1,onFocus(){var $;($=mo(i))==null||$.focus({preventScroll:!0})},"aria-labelledby":ur(i)})},getPositionerProps(){return t.element({...We.positioner.attrs,dir:o("dir"),id:cb(i),style:_.floating})},getContentProps(){return t.element({hidden:!m,dir:o("dir"),id:qc(i),role:u?"listbox":"dialog",...We.content.attrs,"data-state":m?"open":"closed","data-placement":x,"data-activedescendant":k,"aria-activedescendant":u?k:void 0,"aria-multiselectable":o("multiple")&&u?!0:void 0,"aria-labelledby":ur(i),tabIndex:0,onKeyDown(E){if(!S||!Ue(E.currentTarget,xe(E)))return;if(E.key==="Tab"&&!S0(E)){E.preventDefault();return}const I={ArrowUp(){s({type:"CONTENT.ARROW_UP"})},ArrowDown(){s({type:"CONTENT.ARROW_DOWN"})},Home(){s({type:"CONTENT.HOME"})},End(){s({type:"CONTENT.END"})},Enter(){s({type:"ITEM.CLICK",src:"keydown.enter"})},Space(q){var V;w?s({type:"CONTENT.TYPEAHEAD",key:q.key}):(V=I.Enter)==null||V.call(I,q)}},$=I[Cc(E)];if($){$(E),E.preventDefault();return}const R=xe(E);Us(R)||pn.isValidEvent(E)&&(s({type:"CONTENT.TYPEAHEAD",key:E.key}),E.preventDefault())}})},getListProps(){return t.element({...We.list.attrs,tabIndex:0,role:u?void 0:"listbox","aria-labelledby":Kc(i),"aria-activedescendant":u?void 0:k,"aria-multiselectable":!u&&o("multiple")?!0:void 0})}}}var{and:Li,not:no,or:gT}=Ye(),fT={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??sb.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Be,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"),onChange(n){var o;(o=e("onHighlightChange"))==null||o({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{const n=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:{...pn.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:o}){n([()=>e.get("value").toString()],()=>{o(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{o(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{o(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:gT("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Li(no("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:no("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Li(no("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:no("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:no("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:no("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:no("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Li("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Li("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Li("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>_p(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.CLICK"},isTriggerEnterEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ENTER"},isTriggerArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_UP"},isTriggerArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_DOWN"}},effects:{trackFormControlState({context:e,scope:t}){return $a(Xl(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){const n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){const o=()=>Ai(e);let i=!0;return vi(o,{type:"listbox",defer:!0,exclude:[mo(e),hT(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(a){var r;(r=n("onInteractOutside"))==null||r(a),i=!(a.detail.focusable||a.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){const o=t("positioning");return e.set("currentPlacement",o.placement),lt(()=>mo(n),()=>Cp(n),{defer:!0,...o,onComplete(i){e.set("currentPlacement",i.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=a=>{const r=e.get("highlightedValue");if(r==null||o.current().type.includes("POINTER"))return;const s=Ai(n),l=t("scrollToIndexFn");if(l){const d=t("collection").indexOf(r);l?.({index:d,immediate:a,getElement:()=>Zl(n,r)});return}const c=Zl(n,r);ma(c,{rootEl:s,block:"nearest"})};return J(()=>i(!0)),Ta(()=>Ai(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:o}){const i=()=>Cp(n);lt(mo(n),i,{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const o=t("collection").getPreviousValue(n,1,t("loopFocus"));o!=null&&e.set("highlightedValue",o)},highlightNextItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const o=t("collection").getNextValue(n,1,t("loopFocus"));o!=null&&e.set("highlightedValue",o)},highlightFirstItem({context:e,prop:t}){const n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){const n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){J(()=>{const t=Id({root:Ai(e)});t?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){_p(e)&&J(()=>{const n=mo(t);n?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){var o;let i=n.value??e.get("highlightedValue");i==null||!t("collection").has(i)||((o=t("onSelect"))==null||o({value:i}),i=t("deselectable")&&!t("multiple")&&e.get("value").includes(i)?null:i,e.set("value",a=>i==null?[]:t("multiple")?_o(a,i):[i]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){const o=t("collection"),i=n("hasSelectedItems")?o.sort(e.get("value"))[0]:o.firstValue;e.set("highlightedValue",i)},highlightComputedLastItem({context:e,prop:t,computed:n}){const o=t("collection"),i=n("hasSelectedItems")?o.sort(e.get("value"))[0]:o.lastValue;e.set("highlightedValue",i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;const o=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",o)},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}){var o;(o=t("onSelect"))==null||o({value:n.value});const i=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",a=>i==null?[]:t("multiple")?_o(a,i):[i])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(o=>o!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){const[n]=e.get("value"),o=t("collection").getPreviousValue(n);o&&e.set("value",[o])},selectNextItem({context:e,prop:t}){const[n]=e.get("value"),o=t("collection").getNextValue(n);o&&e.set("value",[o])},selectFirstItem({context:e,prop:t}){const n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){const n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:o}){const i=t("collection").search(n.key,{state:o.get("typeahead"),currentValue:e.get("value")[0]});i!=null&&e.set("value",[i])},scrollContentToTop({prop:e,scope:t}){var n,o;if(e("scrollToIndexFn")){const i=e("collection").firstValue;(n=e("scrollToIndexFn"))==null||n({index:0,immediate:!0,getElement:()=>Zl(t,i)})}else(o=Ai(t))==null||o.scrollTo(0,0)},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},syncSelectElement({context:e,prop:t,scope:n}){const o=Xl(n);if(o){if(e.get("value").length===0&&!t("multiple")){o.selectedIndex=-1;return}for(const i of o.options)i.selected=e.get("value").includes(i.value)}},syncCollection({context:e,prop:t}){const n=t("collection"),o=n.find(e.get("highlightedValue"));o&&e.set("highlightedItem",o);const i=n.findMany(e.get("value"));e.set("selectedItems",i)},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)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{const t=Xl(e);if(!t)return;const n=e.getWin(),o=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(o)})}}}};function _p(e){var t;const n=e.restoreFocus??((t=e.previousEvent)==null?void 0:t.restoreFocus);return n==null||!!n}Y()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]);Y()(["item","persistFocus"]);Y()(["id"]);Y()(["htmlFor"]);const mT=(e,t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=mi(),r=A(()=>{const l=Le(e);return{id:n,ids:{label:a?.value.ids.label,hiddenSelect:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,value:l.modelValue,getRootNode:o?.value.getRootNode,...Po(l),onValueChange:c=>{var d;t?.("valueChange",c),t?.("update:modelValue",c.value),(d=l.onValueChange)==null||d.call(l,c)},onHighlightChange:c=>{var d;t?.("highlightChange",c),t?.("update:highlightedValue",c.highlightedValue),(d=l.onHighlightChange)==null||d.call(l,c)},onOpenChange:c=>{var d;t?.("openChange",c),t?.("update:open",c.open),(d=l.onOpenChange)==null||d.call(l,c)},onFocusOutside:c=>{var d;t?.("focusOutside",c),(d=l.onFocusOutside)==null||d.call(l,c)},onInteractOutside:c=>{var d;t?.("interactOutside",c),(d=l.onInteractOutside)==null||d.call(l,c)},onPointerDownOutside:c=>{var d;t?.("pointerDownOutside",c),(d=l.onPointerDownOutside)==null||d.call(l,c)},onSelect(c){var d;t?.("select",c),(d=l.onSelect)==null||d.call(l,c)}}}),s=Ut(fT,r);return A(()=>pT(s,bn))},vT=M({__name:"select-root",props:qn({closeOnSelect:{type:Boolean},collection:{},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},loopFocus:{type:Boolean},modelValue:{},multiple:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,deselectable:void 0,disabled:void 0,invalid:void 0,loopFocus:void 0,multiple:void 0,open:void 0,readOnly:void 0,required:void 0}),emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,o=mT(n,t);return ib(o),fi(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),K(),(i,a)=>(C(),T(b(X).div,W(b(o).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),bT=M({__name:"select-trigger",props:{asChild:{type:Boolean}},setup(e){const t=He();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),yT=M({__name:"select-value-text",props:{placeholder:{},asChild:{type:Boolean}},setup(e){const t=e,n=He(),o=Bs();return K(),(i,a)=>(C(),T(b(X).span,W(b(n).getValueTextProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default",{},()=>{var r;return[Ne(oe(((r=o.default)==null?void 0:r.call(o))||b(n).valueAsString||t.placeholder),1)]})]),_:3},16,["as-child"]))}}),tt=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:BI,Content:zI,Context:HI,Control:jI,HiddenSelect:UI,Indicator:YI,Item:iT,ItemContext:XI,ItemGroup:eT,ItemGroupLabel:QI,ItemIndicator:nT,ItemText:oT,Label:aT,List:rT,Positioner:sT,Root:vT,RootProvider:lT,Trigger:bT,ValueText:yT},Symbol.toStringTag,{value:"Module"}));var xT=ie("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label");xT.build();Y()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]);var wT=ie("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator");wT.build();Y()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);Y()(["index","name"]);Y()(["value"]);var db=ie("splitter").parts("root","panel","resizeTrigger");db.build();Y()(["dir","getRootNode","id","ids","onResize","onResizeStart","onResizeEnd","onCollapse","onExpand","orientation","size","defaultSize","panels","keyboardResizeBy","nonce"]);Y()(["id"]);Y()(["disabled","id"]);const[CT,gl]=we("StepsContext"),[_T,ub]=we("StepsItemPropsContext"),ST=M({__name:"steps-indicator",props:{asChild:{type:Boolean}},setup(e){const t=gl(),n=ub();return K(),(o,i)=>(C(),T(b(X).div,W(b(t).getIndicatorProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),[kT]=we("StepsItemContext"),ET=M({__name:"steps-item",props:{index:{},asChild:{type:Boolean}},setup(e){const t=e,n=gl(),o=A(()=>n.value.getItemState(t));return _T(t),kT(o),K(),(i,a)=>(C(),T(b(X).div,W(b(n).getItemProps(t),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),OT=M({__name:"steps-list",props:{asChild:{type:Boolean}},setup(e){const t=gl();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getListProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),$T=M({__name:"steps-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return CT(n),K(),(o,i)=>(C(),T(b(X).div,W(n.value.getRootProps(),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var IT=ie("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Mt=IT.build(),TT=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},PT=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Sp=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.triggerId)==null?void 0:o.call(n,t))??`steps:${e.id}:trigger:${t}`},VT=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.contentId)==null?void 0:o.call(n,t))??`steps:${e.id}:content:${t}`};function DT(e,t){const{context:n,send:o,computed:i,prop:a,scope:r}=e,s=n.get("step"),l=a("count"),c=i("percent"),d=i("hasNextStep"),h=i("hasPrevStep"),u=f=>({triggerId:Sp(r,f.index),contentId:VT(r,f.index),current:f.index===s,completed:f.index<s,incomplete:f.index>s,index:f.index,first:f.index===0,last:f.index===l-1}),p=()=>{o({type:"STEP.NEXT",src:"next.trigger.click"})},m=()=>{o({type:"STEP.PREV",src:"prev.trigger.click"})},g=()=>{o({type:"STEP.RESET",src:"reset.trigger.click"})},v=f=>{o({type:"STEP.SET",value:f,src:"api.setValue"})};return{value:s,count:l,percent:c,hasNextStep:d,hasPrevStep:h,isCompleted:i("completed"),goToNextStep:p,goToPrevStep:m,resetStep:g,getItemState:u,setStep:v,getRootProps(){return t.element({...Mt.root.attrs,id:TT(r),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${c}%`}})},getListProps(){const f=K0(l).map((y,x)=>Sp(r,x));return t.element({...Mt.list.attrs,dir:a("dir"),id:PT(r),role:"tablist","aria-owns":f.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(f){const y=u(f);return t.element({...Mt.item.attrs,dir:a("dir"),"aria-current":y.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(f){const y=u(f);return t.button({...Mt.trigger.attrs,id:y.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||y.current?0:-1,"aria-selected":y.current,"aria-controls":y.contentId,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"data-complete":j(y.completed),"data-current":j(y.current),"data-incomplete":j(y.incomplete),onClick(x){x.defaultPrevented||a("linear")||o({type:"STEP.SET",value:f.index,src:"trigger.click"})}})},getContentProps(f){const y=u(f);return t.element({...Mt.content.attrs,dir:a("dir"),id:y.contentId,role:"tabpanel",tabIndex:0,hidden:!y.current,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":y.triggerId})},getIndicatorProps(f){const y=u(f);return t.element({...Mt.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":j(y.completed),"data-current":j(y.current),"data-incomplete":j(y.incomplete)})},getSeparatorProps(f){const y=u(f);return t.element({...Mt.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":j(y.completed),"data-current":j(y.current),"data-incomplete":j(y.incomplete)})},getNextTriggerProps(){return t.button({...Mt.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!d,onClick(f){f.defaultPrevented||p()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...Mt.prevTrigger.attrs,type:"button",disabled:!h,onClick(f){f.defaultPrevented||m()}})},getProgressProps(){return t.element({dir:a("dir"),...Mt.progress.attrs,role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${c}% complete`,"data-complete":j(c===100)})}}}var MT={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(n){var o,i;(o=e("onStepChange"))==null||o({step:n}),n==e("count")&&((i=e("onStepComplete"))==null||i())}}))}},computed:{percent:Ec(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const n=Math.min(e.get("step")+1,t("count"));e.set("step",n)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){RT(t("count"),e.get("step"))}}}},RT=(e,t)=>{if(!dm(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};Y()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);function FT(e={},t){const n=yn(xn),o=Zn(Xn),i=vn(),a=A(()=>{var s;const l=Le(e);return{id:i,dir:o.value.dir,getRootNode:(s=n?.value)==null?void 0:s.getRootNode,...Po(l),onStepChange:c=>{var d;(d=l.onStepChange)==null||d.call(l,c)},onStepComplete:()=>{var c;(c=l.onStepComplete)==null||c.call(l)}}}),r=Ut(MT,a);return A(()=>DT(r,bn))}const AT=M({__name:"steps-trigger",props:{asChild:{type:Boolean}},setup(e){const t=gl(),n=ub();return K(),(o,i)=>(C(),T(b(X).button,W(b(t).getTriggerProps(b(n)),{"as-child":e.asChild}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}});var hb=ie("switch").parts("root","label","control","thumb");hb.build();Y()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);var pb=ie("tabs").parts("root","list","trigger","content","indicator");pb.build();Y()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]);Y()(["disabled","value"]);Y()(["value"]);var LT=ie("tagsInput").parts("root","label","control","input","clearTrigger","item","itemPreview","itemInput","itemText","itemDeleteTrigger");LT.build();var NT=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tags-input:${e.id}`},BT=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`tags-input:${e.id}:input`},zT=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`tags-input:${e.id}:hidden-input`},Jc=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`tags-input:${e.id}:tag:${t.value}:${t.index}`},HT=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemInput)==null?void 0:o.call(n,t))??`${Jc(e,t)}:input`},jT=e=>`${e}:input`,kp=(e,t)=>e.getById(jT(t)),WT=e=>Hn(gb(e),"[data-part=item]"),GT=(e,t)=>e.getById(HT(e,t)),gb=e=>e.getById(NT(e)),Ni=e=>e.getById(BT(e)),fb=e=>e.getById(zT(e)),$o=e=>Hn(gb(e),"[data-part=item-preview]:not([data-disabled])"),UT=e=>$o(e)[0],YT=e=>$o(e)[$o(e).length-1],qT=(e,t)=>Md($o(e),t,!1),KT=(e,t)=>Dd($o(e),t,!1),XT=(e,t)=>$o(e)[t],Bi=(e,t)=>Zs($o(e),t),ZT=(e,t)=>{const n=fb(e);n&&Hf(n,{value:t})},{and:zi,not:oo,or:JT}=Ye();zi(JT(oo("isAtMax"),"allowOverflow"),oo("isInputValueEmpty")),oo("hasHighlightedTag"),zi("hasTags","isCaretAtStart"),zi("hasTags","isCaretAtStart"),zi("hasTags","isCaretAtStart",oo("isLastTagHighlighted")),oo("isCaretAtStart"),zi("isTagEditable","hasHighlightedTag"),oo("isCaretAtStart"),oo("isCaretAtStart");Y()(["addOnPaste","allowOverflow","autoFocus","blurBehavior","delimiter","dir","disabled","editable","form","getRootNode","id","ids","inputValue","invalid","max","maxLength","name","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onPointerDownOutside","onValueChange","onValueInvalid","required","readOnly","translations","validate","value","defaultValue","defaultInputValue"]);Y()(["index","disabled","value"]);var QT=ie("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator");QT.build();Y()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]);var mb=ie("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),Yo=mb.build(),eP=e=>`toast-group:${e}`,Ep=(e,t)=>e.getById(`toast-group:${t}`),vb=e=>`toast:${e.id}`,Op=e=>e.getById(vb(e)),$p=e=>`toast:${e.id}:title`,Ip=e=>`toast:${e.id}:description`,tP=e=>`toast${e.id}:close`,Tp={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function Jl(e,t){return e??Tp[t]??Tp.DEFAULT}var nP=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;function oP(e,t){var n;const{prop:o,computed:i,context:a}=e,{offsets:r,gap:s}=o("store").attrs,l=a.get("heights"),c=nP(r),d=o("dir")==="rtl",h=t.replace("-start",d?"-right":"-left").replace("-end",d?"-left":"-right"),u=h.includes("right"),p=h.includes("left"),m={position:"fixed",pointerEvents:i("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${s}px`,"--first-height":`${((n=l[0])==null?void 0:n.height)||0}px`,zIndex:Df};let g="center";if(u&&(g="flex-end"),p&&(g="flex-start"),m.alignItems=g,h.includes("top")){const v=c.top;m.top=`max(env(safe-area-inset-top, 0px), ${v})`}if(h.includes("bottom")){const v=c.bottom;m.bottom=`max(env(safe-area-inset-bottom, 0px), ${v})`}if(!h.includes("left")){const v=c.right;m.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${v})`}if(!h.includes("right")){const v=c.left;m.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${v})`}return m}function iP(e,t){const{prop:n,context:o,computed:i}=e,a=n("parent"),r=a.computed("placement"),{gap:s}=a.prop("store").attrs,[l]=r.split("-"),c=o.get("mounted"),d=o.get("remainingTime"),h=i("height"),u=i("frontmost"),p=!u,m=!n("stacked"),g=n("stacked"),v=n("type")==="loading"?Number.MAX_SAFE_INTEGER:d,f=i("heightIndex")*s+i("heightBefore"),y={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${v}ms`,"--initial-height":`${h}px`,"--offset":`${f}px`,"--index":n("index"),"--z-index":i("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},x=w=>Object.assign(y,w);return l==="top"?x({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&x({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(x({"--y":"0","--opacity":"1"}),g&&x({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||x({"--opacity":"0",pointerEvents:"none"}),p&&m&&(x({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||x({"--y":"calc(var(--sign) * 40%)"})),p&&g&&!t&&x({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),u&&!t&&x({"--y":"calc(var(--lift) * -100%)"}),y}function aP(e,t){const{computed:n}=e,o={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},i=a=>Object.assign(o,a);return n("frontmost")&&!t&&i({height:"calc(var(--initial-height) + 80%)"}),o}function rP(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function sP(e,t){const{context:n,prop:o,send:i,refs:a,computed:r}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(s={}){const{label:l="Notifications"}=s,{hotkey:c}=o("store").attrs,d=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=r("placement"),[u,p="center"]=h.split("-");return t.element({...Yo.group.attrs,dir:o("dir"),tabIndex:-1,"aria-label":`${h} ${l} ${d}`,id:eP(h),"data-placement":h,"data-side":u,"data-align":p,"aria-live":"polite",role:"region",style:oP(e,h),onMouseEnter(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:h})},onMouseMove(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:h})},onMouseLeave(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_LEAVE",placement:h})},onFocus(m){i({type:"REGION.FOCUS",target:m.relatedTarget})},onBlur(m){a.get("isFocusWithin")&&!Ue(m.currentTarget,m.relatedTarget)&&queueMicrotask(()=>i({type:"REGION.BLUR"}))}})},subscribe(s){return o("store").subscribe(()=>s(n.get("toasts")))}}}var{guards:lP,createMachine:cP}=nl(),{and:dP}=lP,uP=cP({props({props:e}){return{dir:"ltr",id:rm(),...e,store:e.store}},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:Yf.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:dP("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){return t("store").subscribe(n=>{if(n.dismiss){e.set("toasts",o=>o.filter(i=>i.id!==n.id));return}e.set("toasts",o=>{const i=o.findIndex(a=>a.id===n.id);return i!==-1?[...o.slice(0,i),{...o[i],...n},...o.slice(i+1)]:[n,...o]})})},trackHotKeyPress({prop:e,send:t}){return se(document,"keydown",n=>{const{hotkey:o}=e("store").attrs;o.every(i=>n[i]||n.code===i)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){const{pauseOnPageIdle:o}=e("store").attrs;if(!o)return;const i=n.getDoc();return se(i,"visibilitychange",()=>{const a=i.visibilityState==="hidden";t({type:a?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:o}){var i;const a=t.get("toasts"),r=n("placement"),s=a.length>0;if(!s){(i=e.get("dismissableCleanup"))==null||i();return}if(s&&e.get("dismissableCleanup"))return;const l=Em(()=>Ep(o,r),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){var t;(t=e.get("dismissableCleanup"))==null||t()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{var n;(n=Ep(e,t("placement")))==null||n.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(o=>o.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){var t;!e.get("lastFocusedEl")||e.get("isPointerWithin")||((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){var t;e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){var t;e.get("lastFocusedEl")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});function hP(e,t){const{state:n,send:o,prop:i,scope:a,context:r,computed:s}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),d=r.get("mounted"),h=s("frontmost"),u=i("parent").computed("placement"),p=i("type"),m=i("stacked"),g=i("title"),v=i("description"),f=i("action"),[y,x="center"]=u.split("-");return{type:p,title:g,description:v,placement:u,visible:l,paused:c,closable:!!i("closable"),pause(){o({type:"PAUSE"})},resume(){o({type:"RESUME"})},dismiss(){o({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element({...Yo.root.attrs,dir:i("dir"),id:vb(a),"data-state":l?"open":"closed","data-type":p,"data-placement":u,"data-align":x,"data-side":y,"data-mounted":j(d),"data-paused":j(c),"data-first":j(h),"data-sibling":j(!h),"data-stack":j(m),"data-overlap":j(!m),role:"status","aria-atomic":"true","aria-describedby":v?Ip(a):void 0,"aria-labelledby":g?$p(a):void 0,tabIndex:0,style:iP(e,l),onKeyDown(w){w.defaultPrevented||w.key=="Escape"&&(o({type:"DISMISS",src:"keyboard"}),w.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:aP(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:rP()})},getTitleProps(){return t.element({...Yo.title.attrs,id:$p(a)})},getDescriptionProps(){return t.element({...Yo.description.attrs,id:Ip(a)})},getActionTriggerProps(){return t.button({...Yo.actionTrigger.attrs,type:"button",onClick(w){var S;w.defaultPrevented||((S=f?.onClick)==null||S.call(f),o({type:"DISMISS",src:"user"}))}})},getCloseTriggerProps(){return t.button({id:tP(a),...Yo.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(w){w.defaultPrevented||o({type:"DISMISS",src:"user"})}})}}}var{not:pP}=Ye(),gP={props({props:e}){return Ld(e,["id","type","parent","removeDelay"],"toast"),{closable:!0,...e,duration:Jl(e.duration,e.type)}},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:Jl(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{const t=e("parent").context.get("toasts"),n=t.findIndex(o=>o.id===e("id"));return t.length-n},height:({prop:e})=>{const t=e("parent").context.get("heights").find(n=>n.id===e("id"));return t?.height??0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(t=>t.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{const t=e("parent").context.get("heights"),n=t.findIndex(o=>o.id===e("id"));return t.reduce((o,i,a)=>a>=n?o:o+i.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{const o=t("message");o&&n({type:o,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:pP("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return Pl(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return Pl(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return Pl(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return J(()=>{const o=Op(e);if(!o)return;const i=()=>{const s=o.style.height;o.style.height="auto";const l=o.getBoundingClientRect().height;o.style.height=s;const c={id:t("id"),height:l};Pp(t("parent"),c)},a=e.getWin(),r=new a.MutationObserver(i);r.observe(o,{childList:!0,subtree:!0,characterData:!0}),n=()=>r.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){J(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{const o=Op(e);if(!o)return;const i=o.style.height;o.style.height="auto";const a=o.getBoundingClientRect().height;o.style.height=i,n.set("initialHeight",a);const r={id:t("id"),height:a};Pp(t("parent"),r)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",Jl(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{const o=t.get("closeTimerStartTime"),i=Date.now()-o;return t.set("lastCloseStartTimerStartTime",Date.now()),n-i})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){var n;(n=e("onStatusChange"))==null||n({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"unmounted"})},invokeOnVisible({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"visible"})}}}};function Pp(e,t){const{id:n,height:o}=t;e.context.set("heights",i=>i.find(a=>a.id===n)?i.map(a=>a.id===n?{...a,height:o}:a):[{id:n,height:o},...i])}var fP=(e,t)=>({...t,...el(e)});function mP(e={}){const t=fP(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0});let n=[],o=[],i=new Set,a=[];const r=u=>(n.push(u),()=>{const p=n.indexOf(u);n.splice(p,1)}),s=u=>(n.forEach(p=>p(u)),u),l=u=>{if(o.length>=t.max){a.push(u);return}s(u),o.unshift(u)},c=()=>{for(;a.length>0&&o.length<t.max;){const u=a.shift();u&&(s(u),o.unshift(u))}},d=u=>{const p=u.id??`toast:${rm()}`,m=o.find(g=>g.id===p);return i.has(p)&&i.delete(p),m?o=o.map(g=>g.id===p?s({...g,...u,id:p}):g):l({id:p,duration:t.duration,removeDelay:t.removeDelay,type:"info",...u,stacked:!t.overlap,gap:t.gap}),p},h=u=>(i.add(u),u?(n.forEach(p=>p({id:u,dismiss:!0})),o=o.filter(p=>p.id!==u),c()):(o.forEach(p=>{n.forEach(m=>m({id:p.id,dismiss:!0}))}),o=[],a=[]),u);return{attrs:t,subscribe:r,create:d,update:(u,p)=>d({id:u,...p}),remove:h,dismiss:u=>{u!=null?o=o.map(p=>p.id===u?s({...p,message:"DISMISS"}):p):o=o.map(p=>s({...p,message:"DISMISS"}))},error:u=>d({...u,type:"error"}),success:u=>d({...u,type:"success"}),info:u=>d({...u,type:"info"}),warning:u=>d({...u,type:"warning"}),loading:u=>d({...u,type:"loading"}),getVisibleToasts:()=>o.filter(u=>!i.has(u.id)),getCount:()=>o.length,promise:(u,p,m={})=>{if(!p||!p.loading){gn("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}const g=d({...m,...p.loading,promise:u,type:"loading"});let v=!0,f;const y=Ha(u).then(async x=>{if(f=["resolve",x],vP(x)&&!x.ok){v=!1;const w=Ha(p.error,`HTTP Error! status: ${x.status}`);d({...m,...w,id:g,type:"error"})}else if(p.success!==void 0){v=!1;const w=Ha(p.success,x);d({...m,...w,id:g,type:"success"})}}).catch(async x=>{if(f=["reject",x],p.error!==void 0){v=!1;const w=Ha(p.error,x);d({...m,...w,id:g,type:"error"})}}).finally(()=>{var x;v&&h(g),(x=p.finally)==null||x.call(p)});return{id:g,unwrap:()=>new Promise((x,w)=>y.then(()=>f[0]==="reject"?w(f[1]):x(f[1])).catch(w))}},pause:u=>{u!=null?o=o.map(p=>p.id===u?s({...p,message:"PAUSE"}):p):o=o.map(p=>s({...p,message:"PAUSE"}))},resume:u=>{u!=null?o=o.map(p=>p.id===u?s({...p,message:"RESUME"}):p):o=o.map(p=>s({...p,message:"RESUME"}))},isVisible:u=>!i.has(u)&&!!o.find(p=>p.id===u),isDismissed:u=>i.has(u),expand:()=>{o=o.map(u=>s({...u,stacked:!0}))},collapse:()=>{o=o.map(u=>s({...u,stacked:!1}))}}}var vP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Vp={connect:sP,machine:uP};const bP=e=>mP(e),[yP,bb]=we("ToastContext"),xP=M({__name:"toast-root",props:{asChild:{type:Boolean}},setup(e){const t=bb();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getRootProps(),{"as-child":e.asChild}),{default:P(()=>[z("div",st(xt(b(t).getGhostBeforeProps())),null,16),L(n.$slots,"default"),z("div",st(xt(b(t).getGhostAfterProps())),null,16)]),_:3},16,["as-child"]))}}),wP=M({__name:"toast-title",props:{asChild:{type:Boolean}},setup(e){const t=bb();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getTitleProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),CP=M({__name:"toaster-item",props:{value:{},index:{},parent:{}},setup(e){const t=e,n=yn(xn),o=A(()=>({...t.value,index:t.index,parent:t.parent,getRootNode:n?.value.getRootNode})),i=Ut(gP,o),a=A(()=>hP(i,bn));return yP(a),K(),(r,s)=>L(r.$slots,"default",st(xt(t.value)))}}),_P=M({__name:"toaster",props:{toaster:{},asChild:{type:Boolean}},setup(e){const t=e,n=Zn(Xn),o=yn(xn),i=Ut(Vp.machine,{store:t.toaster,id:vn(),dir:n?.value.dir,getRootNode:o?.value.getRootNode}),a=A(()=>Vp.connect(i,bn));return K(),(r,s)=>(C(),T(b(X).div,st(xt(a.value.getGroupProps())),{default:P(()=>[(C(!0),H(Ce,null,Ge(a.value.getToasts(),(l,c)=>(C(),T(CP,{key:l.id,value:l,parent:b(i),index:c},{default:P(d=>[L(r.$slots,"default",W({ref_for:!0},d))]),_:3},8,["value","parent","index"]))),128))]),_:3},16))}});var SP=ie("toggle",["root","indicator"]);SP.build();Y()(["defaultPressed","pressed","onPressedChange","disabled"]);const kP=ie("toggle",["root","indicator"]);kP.build();var EP=ie("toggle-group").parts("root","item");EP.build();var yb=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`toggle-group:${e.id}`},xb=e=>e.getById(yb(e)),fl=e=>{const t=`[data-ownedby='${CSS.escape(yb(e))}']:not([data-disabled])`;return Hn(xb(e),t)},Dp=e=>ti(fl(e)),OP=e=>Js(fl(e)),$P=(e,t,n)=>Dd(fl(e),t,n),IP=(e,t,n)=>Md(fl(e),t,n),{not:Mp,and:TP}=Ye();Mp(TP("isClickFocus","isTabbingBackward")),Mp("isFirstToggleFocused");Y()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]);Y()(["value","disabled"]);const[wb,xi]=we("TooltipContext"),PP=M({__name:"tooltip-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=xi();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getArrowTipProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),VP=M({__name:"tooltip-arrow",props:{asChild:{type:Boolean}},setup(e){const t=xi();return K(),(n,o)=>(C(),T(b(X).div,W(b(t).getArrowProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),DP=M({__name:"tooltip-content",props:{asChild:{type:Boolean}},setup(e){const t=xi(),n=_m(),o=A(()=>tl(t.value.getContentProps(),n.value.presenceProps));return K(),(i,a)=>b(n).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},o.value,{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),MP=M({__name:"tooltip-context",setup(e){const t=xi();return(n,o)=>L(n.$slots,"default",st(xt(b(t))))}}),RP=M({__name:"tooltip-positioner",props:{asChild:{type:Boolean}},setup(e){const t=xi(),n=Nd(),o=wm(A(()=>({...n.value,present:t.value.open})));return Cm(o),K(),(i,a)=>b(o).unmounted?Q("",!0):(C(),T(b(X).div,W({key:0},b(t).getPositionerProps(),{"as-child":e.asChild}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),FP=M({__name:"tooltip-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return wb(n),fi(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),K(),(o,i)=>L(o.$slots,"default")}});var Cb=ie("tooltip").parts("trigger","arrow","arrowTip","positioner","content"),Hi=Cb.build(),_b=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`tooltip:${e.id}:trigger`},AP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tooltip:${e.id}:content`},LP=e=>{var t;return((t=e.ids)==null?void 0:t.arrow)??`tooltip:${e.id}:arrow`},Sb=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tooltip:${e.id}:popper`},Ql=e=>e.getById(_b(e)),Rp=e=>e.getById(Sb(e)),nn=ww({id:null});function NP(e,t){const{state:n,context:o,send:i,scope:a,prop:r,event:s}=e,l=r("id"),c=!!r("aria-label"),d=n.matches("open","closing"),h=_b(a),u=AP(a),p=r("disabled"),m=ev({...r("positioning"),placement:o.get("currentPlacement")});return{open:d,setOpen(g){n.matches("open","closing")!==g&&i({type:g?"open":"close"})},reposition(g={}){i({type:"positioning.set",options:g})},getTriggerProps(){return t.button({...Hi.trigger.attrs,id:h,dir:r("dir"),"data-expanded":j(d),"data-state":d?"open":"closed","aria-describedby":d?u:void 0,onClick(g){g.defaultPrevented||p||r("closeOnClick")&&i({type:"close",src:"trigger.click"})},onFocus(g){queueMicrotask(()=>{g.defaultPrevented||p||s.src!=="trigger.pointerdown"&&ys()&&i({type:"open",src:"trigger.focus"})})},onBlur(g){g.defaultPrevented||p||l===nn.get("id")&&i({type:"close",src:"trigger.blur"})},onPointerDown(g){g.defaultPrevented||p||Mr(g)&&r("closeOnPointerDown")&&l===nn.get("id")&&i({type:"close",src:"trigger.pointerdown"})},onPointerMove(g){g.defaultPrevented||p||g.pointerType!=="touch"&&i({type:"pointer.move"})},onPointerLeave(){p||i({type:"pointer.leave"})},onPointerCancel(){p||i({type:"pointer.leave"})}})},getArrowProps(){return t.element({id:LP(a),...Hi.arrow.attrs,dir:r("dir"),style:m.arrow})},getArrowTipProps(){return t.element({...Hi.arrowTip.attrs,dir:r("dir"),style:m.arrowTip})},getPositionerProps(){return t.element({id:Sb(a),...Hi.positioner.attrs,dir:r("dir"),style:m.floating})},getContentProps(){return t.element({...Hi.content.attrs,dir:r("dir"),hidden:!d,"data-state":d?"open":"closed",role:c?void 0:"tooltip",id:c?void 0:u,"data-placement":o.get("currentPlacement"),onPointerEnter(){i({type:"content.pointer.move"})},onPointerLeave(){i({type:"content.pointer.leave"})},style:{pointerEvents:r("interactive")?"auto":"none"}})}}}var{and:BP,not:Fp}=Ye(),zP={initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",props({props:e}){const t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{id:"x",openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:"bottom",...e.positioning}}},effects:["trackFocusVisible","trackStore"],context:({bindable:e})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:!1}))}),watch({track:e,action:t,prop:n}){e([()=>n("disabled")],()=>{t(["closeIfDisabled"])}),e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{closed:{entry:["clearGlobalId"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":{actions:["clearPointerMoveOpened"]},"pointer.move":[{guard:BP("noVisibleTooltip",Fp("hasPointerMoveOpened")),target:"opening"},{guard:Fp("hasPointerMoveOpened"),target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}]}},opening:{effects:["trackScroll","trackPointerlockChange","waitForOpenDelay"],on:{"after.openDelay":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"controlled.open":{target:"open"},"controlled.close":{target:"closed"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":[{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose","toggleVisibility"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],close:[{guard:"isOpenControlled",actions:["invokeOnClose","toggleVisibility"]},{target:"closed",actions:["invokeOnClose"]}]}},open:{effects:["trackEscapeKey","trackScroll","trackPointerlockChange","trackPositioning"],entry:["setGlobalId"],on:{"controlled.close":{target:"closed"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.leave":[{guard:"isVisible",target:"closing",actions:["clearPointerMoveOpened"]},{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],"content.pointer.leave":{guard:"isInteractive",target:"closing"},"positioning.set":{actions:["reposition"]}}},closing:{effects:["trackPositioning","waitForCloseDelay"],on:{"after.closeDelay":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"controlled.close":{target:"closed"},"controlled.open":{target:"open"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.move":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen","toggleVisibility"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"content.pointer.move":{guard:"isInteractive",target:"open"},"positioning.set":{actions:["reposition"]}}}},implementations:{guards:{noVisibleTooltip:()=>nn.get("id")===null,isVisible:({prop:e})=>e("id")===nn.get("id"),isInteractive:({prop:e})=>!!e("interactive"),hasPointerMoveOpened:({context:e})=>e.get("hasPointerMoveOpened"),isOpenControlled:({prop:e})=>e("open")!==void 0},actions:{setGlobalId:({prop:e})=>{nn.set("id",e("id"))},clearGlobalId:({prop:e})=>{e("id")===nn.get("id")&&nn.set("id",null)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e("disabled")&&t({type:"close",src:"disabled.change"})},reposition:({context:e,event:t,prop:n,scope:o})=>{if(t.type!=="positioning.set")return;const i=()=>Rp(o);return lt(Ql(o),i,{...n("positioning"),...t.options,defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e("open")?"controlled.open":"controlled.close",previousEvent:t})})},setPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!0)},clearPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!1)}},effects:{trackFocusVisible:({scope:e})=>{var t;return zd({root:(t=e.getRootNode)==null?void 0:t.call(e)})},trackPositioning:({context:e,prop:t,scope:n})=>{e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);const o=()=>Rp(n);return lt(Ql(n),o,{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},trackPointerlockChange:({send:e,scope:t})=>{const n=t.getDoc();return se(n,"pointerlockchange",()=>e({type:"close",src:"pointerlock:change"}),!1)},trackScroll:({send:e,prop:t,scope:n})=>{if(!t("closeOnScroll"))return;const o=Ql(n);if(!o)return;const i=Xf(o).map(a=>se(a,"scroll",()=>{e({type:"close",src:"scroll"})},{passive:!0,capture:!0}));return()=>{i.forEach(a=>a?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=nn.subscribe(()=>{nn.get("id")!==e("id")&&t({type:"close",src:"id.change"})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t("closeOnEscape")?se(document,"keydown",n=>{wc(n)||n.key==="Escape"&&(n.stopPropagation(),e({type:"close",src:"keydown.escape"}))},!0):void 0,waitForOpenDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.openDelay"})},t("openDelay"));return()=>clearTimeout(n)},waitForCloseDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.closeDelay"})},t("closeDelay"));return()=>clearTimeout(n)}}}};Y()(["aria-label","closeDelay","closeOnEscape","closeOnPointerDown","closeOnScroll","closeOnClick","dir","disabled","getRootNode","id","ids","interactive","onOpenChange","defaultOpen","open","openDelay","positioning"]);const HP=(e={},t)=>{const n=vn(),o=yn(xn),i=Zn(Xn),a=A(()=>{const s=Le(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Po(s),onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)}}}),r=Ut(zP,a);return A(()=>NP(r,bn))},jP=M({__name:"tooltip-root",props:qn({"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnClick:void 0,closeOnEscape:void 0,closeOnPointerDown:void 0,closeOnScroll:void 0,defaultOpen:void 0,disabled:void 0,interactive:void 0,open:void 0}),emits:["openChange","update:open"],setup(e,{emit:t}){const n=e,o=HP(n,t);return wb(o),fi(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),K(),(i,a)=>L(i.$slots,"default")}}),WP=M({__name:"tooltip-trigger",props:{asChild:{type:Boolean}},setup(e){const t=xi();return K(),(n,o)=>(C(),T(b(X).button,W(b(t).getTriggerProps(),{"as-child":e.asChild}),{default:P(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),No=Object.freeze(Object.defineProperty({__proto__:null,Arrow:VP,ArrowTip:PP,Content:DP,Context:MP,Positioner:RP,Root:jP,RootProvider:FP,Trigger:WP},Symbol.toStringTag,{value:"Module"}));var kb=ie("tour").parts("content","actionTrigger","closeTrigger","progressText","title","description","positioner","arrow","arrowTip","backdrop","spotlight");kb.build();var GP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tour-positioner-${e.id}`},UP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tour-content-${e.id}`},YP=e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`tour-backdrop-${e.id}`},Kr=e=>e.getById(UP(e)),Eb=e=>e.getById(GP(e)),qP=e=>e.getById(YP(e));function KP(e){return J(()=>{const t=Kr(e);if(!t)return;const n=li(t),o=Eb(e),i=qP(e);o&&(o.style.setProperty("--z-index",n.zIndex),o.style.setProperty("z-index","var(--z-index)")),i&&i.style.setProperty("--z-index",n.zIndex)})}var XP=e=>e?.type==="tooltip",ZP=e=>e?.type==="dialog",JP=e=>e?.type==="wait",Ob=e=>e.filter(t=>t.type!=="wait"),QP=(e,t)=>{const n=Ob(e).length;return(t+1)/n},eV=e=>e.type==="floating"?{backdrop:!1,arrow:!1,placement:"bottom-end",...e}:e.target==null||e.type==="dialog"?{type:"dialog",placement:"center",backdrop:!0,...e}:!e.type||e.type==="tooltip"?{type:"tooltip",arrow:!0,backdrop:!0,...e}:e,tV=(e,t)=>{const n=t!=null?e.find(o=>o.id===t):null;return n?eV(n):null},$s=(e,t)=>t!=null?e.findIndex(n=>n.id===t):-1;function Ap(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var nV=e=>{let t=e.clientX,n=e.clientY,o=e.view||window,i=Ap(o);for(;i;){const a=i.getBoundingClientRect(),r=getComputedStyle(i),s=a.left+(i.clientLeft+parseFloat(r.paddingLeft)),l=a.top+(i.clientTop+parseFloat(r.paddingTop));t+=s,n+=l,o=_e(i),i=Ap(o)}return{clientX:t,clientY:n}};function oV(e,t){const{clientX:n,clientY:o}=nV(t);return e.y<=o&&o<=e.y+e.height&&e.x<=n&&n<=e.x+e.width}function iV(e,t){const n=t.x||0,o=t.y||0;return{x:e.x-n,y:e.y-o,width:e.width+n+n,height:e.height+o+o}}var{and:ec}=Ye();ec("isValidStep","hasResolvedTarget"),ec("isValidStep","hasTarget"),ec("isValidStep","isWaitingStep");var In=class{constructor(t){this.params=t}transitionToStep(t){const n=this.params.context.get("steps"),o=sa(t)?$s(n,t):t;this.transitionTo(o)}next(t){const n=this.params.context.get("steps"),o=gs(n,t);this.transitionTo(o)}prev(t){const n=this.params.context.get("steps"),o=nm(n,t);this.transitionTo(o)}clear(){const{context:t}=this.params;t.set("targetRect",{width:0,height:0,x:0,y:0}),t.set("resolvedTarget",null),this.transitionTo(-1)}cleanupAll(){var t,n;const{refs:o,context:i}=this.params;(t=o.get("_targetCleanup"))==null||t(),o.set("_targetCleanup",void 0),o.set("_prevTarget",void 0),(n=o.get("_effectCleanup"))==null||n(),o.set("_effectCleanup",void 0),i.set("resolvedTarget",null)}cleanupStepEffect(){var t;const{refs:n}=this.params;n.get("_runningEffect")||((t=n.get("_effectCleanup"))==null||t(),n.set("_effectCleanup",void 0))}syncTarget(t){var n;const{refs:o,prop:i}=this.params,a=o.get("_prevTarget");if(t!==a&&((n=o.get("_targetCleanup"))==null||n(),o.set("_targetCleanup",void 0)),!t){o.set("_prevTarget",null);return}t!==a&&(i("preventInteraction")&&(t.inert=!0),t.setAttribute("data-tour-highlighted",""),o.set("_targetCleanup",()=>{i("preventInteraction")&&(t.inert=!1),t.removeAttribute("data-tour-highlighted")}),o.set("_prevTarget",t))}transitionTo(t){const{context:n,refs:o}=this.params,i=n.get("steps")[t];if(!i){n.set("stepId",null);return}if(Be(n.get("stepId"),i.id)){o.set("_runningEffect",!1);return}this.cleanup();const a=this.createUtilities(i,t);i.effect?this.executeEffect(i,a):a.show()}cleanup(){var t,n;const{refs:o}=this.params;(t=o.get("_effectCleanup"))==null||t(),o.set("_effectCleanup",void 0),(n=o.get("_targetCleanup"))==null||n(),o.set("_targetCleanup",void 0)}createUtilities(t,n){const{context:o,computed:i,prop:a}=this.params,r=o.get("steps");return{show:()=>{o.set("stepId",t.id)},update:s=>{o.set("steps",l=>l.map((c,d)=>d===n?{...c,...s}:c))},next:()=>{const s=gs(r,i("stepIndex"));this.transitionTo(s)},goto:s=>{const l=$s(r,s);if(l===-1){gn(`[zag-js/tour] Step with id "${s}" not found`);return}this.transitionTo(l)},dismiss:()=>{var s;o.set("stepId",null),(s=a("onStatusChange"))==null||s({status:"dismissed",stepId:null,stepIndex:-1})},target:t.target}}executeEffect(t,n){const{refs:o}=this.params;o.set("_runningEffect",!0);let i;try{i=t.effect(n)}catch(a){o.set("_runningEffect",!1),console.error(a);return}o.set("_effectCleanup",i),JP(t)&&n.show(),queueMicrotask(()=>{queueMicrotask(()=>{o.set("_runningEffect",!1)})})}};Y()(["closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","keyboardNavigation","onFocusOutside","onInteractOutside","onPointerDownOutside","onStatusChange","onStepChange","onStepsChange","preventInteraction","spotlightOffset","spotlightRadius","stepId","steps","translations"]);kb.extendWith("control");ne({slots:["root","avatarWrapper","avatar","image","fallback","overflowWrapper","overflow","overflowText"],base:{root:{display:"flex",alignItems:"center"},avatarWrapper:{position:"relative",cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{transform:"scale(1.05)",zIndex:"999 !important"},"&:focus":{outline:"none","& > div":{boxShadow:"state-focus-primary"},zIndex:"999 !important"},"&:active":{transform:"scale(0.95)"}},avatar:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",overflow:"hidden",background:"background.default",boxShadow:"stroke-bordered-interactive"},image:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",objectFit:"cover",zIndex:"1"},fallback:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",background:"#F2F2F5",color:"text.subtle",fontWeight:"medium",textAlign:"center",textTransform:"uppercase",userSelect:"none"},overflowWrapper:{position:"relative",cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{transform:"scale(1.05)",zIndex:"999 !important"},"&:focus":{outline:"none","& > div":{boxShadow:"state-focus-primary"},zIndex:"999 !important"},"&:active":{transform:"scale(0.95)"}},overflow:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",background:"background.default",boxShadow:"stroke-bordered-interactive"},overflowText:{color:"text.subtle",fontWeight:"medium",textAlign:"center",userSelect:"none"}},variants:{size:{xs:{avatar:{width:"16",height:"16"},overflow:{width:"16",height:"16"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},sm:{avatar:{width:"20",height:"20"},overflow:{width:"20",height:"20"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},md:{avatar:{width:"24",height:"24"},overflow:{width:"24",height:"24"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},lg:{avatar:{width:"32",height:"32"},overflow:{width:"32",height:"32"},fallback:{textStyle:"body_small_semibold"},overflowText:{textStyle:"body_small_semibold"}},xl:{avatar:{width:"40",height:"40"},overflow:{width:"40",height:"40"},fallback:{textStyle:"body_base_semibold"},overflowText:{textStyle:"body_base_semibold"}}}},defaultVariants:{size:"md"}});const aV={neutral:{backgroundColor:"graycoolalpha.10",color:"graycool.900",boxShadow:"none"},information:{backgroundColor:"blue.100",color:"seed.800"},feature:{backgroundColor:"purple.100",color:"purple.800",boxShadow:"0px 0px 0px 1px {colors.blackalpha.50} inset"},success:{backgroundColor:"green.100",color:"green.900"},warning:{backgroundColor:"orange.100",color:"orange.900"},critical:{backgroundColor:"red.100",color:"red.900"},ai:{backgroundColor:"purple.700",color:"whitealpha.1000"},new:{backgroundColor:"seed.700",color:"whitealpha.1000"},reserved:{backgroundColor:"blackalpha.900",color:"whitealpha.1000"},neutralCounter:{backgroundColor:"whitealpha.1000",color:"graycool.900"},criticalCounter:{backgroundColor:"red.700",color:"whitealpha.1000"}},rV=To({base:{display:"inline-flex",justifyContent:"center",alignItems:"center",gap:"4",borderRadius:"sm",textTransform:"uppercase",fontFamily:"sans",fontStyle:"normal",boxShadow:"0px 0px 0px 1px {colors.blackalpha.50} inset"},defaultVariants:{variant:"neutral",type:"decorative"},variants:{type:{decorative:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",fontSize:"xs",fontWeight:"bold",letterSpacing:"widest",lineHeight:"xxs"},counter:{minWidth:"5",paddingTop:"2",paddingBottom:"2",paddingLeft:"4",paddingRight:"4",fontSize:"sm",fontWeight:"regular",letterSpacing:"tighter",lineHeight:"sm"}},variant:aV}}),sV=M({__name:"Badge",props:{variant:{default:"neutral"},type:{default:"decorative"}},setup(e){const t=e,n=A(()=>rV({variant:t.variant,type:t.type}));return(o,i)=>(C(),H("div",{class:N(n.value)},[L(o.$slots,"default")],2))}}),lV={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"};function cV(e,t){return C(),H("svg",lV,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_2115_3244)"},[z("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.29505 0.21967C3.43571 0.0790177 3.62647 0 3.82538 0H8.17463C8.37352 0 8.56433 0.0790177 8.70495 0.21967L11.7803 3.29505C11.9209 3.4357 12 3.62647 12 3.82538V8.17463C12 8.37352 11.9209 8.56433 11.7803 8.70495L8.70495 11.7803C8.56433 11.9209 8.37352 12 8.17463 12H3.82538C3.62647 12 3.43571 11.9209 3.29505 11.7803L0.219671 8.70495C0.0790178 8.56433 0 8.37352 0 8.17463V3.82538C0 3.62647 0.0790177 3.43571 0.21967 3.29505L3.29505 0.21967ZM6.5625 2.8125V3.375V6V6.5625H5.4375V6V3.375V2.8125H6.5625ZM6 9C6.41422 9 6.75 8.66422 6.75 8.25C6.75 7.83577 6.41422 7.5 6 7.5C5.58579 7.5 5.25 7.83577 5.25 8.25C5.25 8.66422 5.58579 9 6 9Z"})],-1),z("defs",null,[z("clipPath",{id:"clip0_2115_3244"},[z("rect",{width:"12",height:"12",fill:"currentColor"})])],-1)])])}const dV={render:cV};ne({className:"link",slots:["icon","text","root"],base:{root:{fontFamily:"sans",fontStyle:"normal",fontWeight:"semimedium",lineHeight:"lg",letterSpacing:"normal",textAlign:"center",cursor:"pointer",display:"inline-flex",alignItems:"center"},icon:{marginLeft:"4"}},variants:{size:{default:{root:{fontSize:"base"}},small:{root:{fontSize:"sm"}}},type:{default:{root:{color:"{colors.text.normal}",textDecoration:"none",_visited:{color:"{colors.text.muted}"},_hover:{color:"{colors.text.subtle}",textDecoration:"none"},_focus:{color:"{colors.text.normal}",textDecoration:"none",boxShadow:"state-focus-primary"},_disabled:{color:"{colors.text.disabled}",cursor:"not-allowed",textDecoration:"none",_hover:{color:"{colors.text.disabled}",textDecoration:"none"}}},icon:{_groupDisabled:{color:"{colors.text.disabled}"},_groupVisited:{color:"{colors.text.normal}"},_groupHover:{color:"{colors.text.normal}"}}},interactive:{root:{color:"seed.700",textDecoration:"none",_visited:{color:"purple.800"},_hover:{color:"seed.700",textDecorationLine:"underline",textDecorationColor:"seed.700",textDecorationStyle:"solid",textDecorationSkipInk:"none",textDecorationThickness:"auto"},_disabled:{color:"seed.600 ",cursor:"not-allowed",textDecoration:"none ",_hover:{color:"seed.600 ",textDecoration:"none "}}},icon:{_groupHover:{color:"seed.800"},_groupDisabled:{color:"seed.700"},_groupVisited:{color:"seed.700"}}}}},defaultVariants:{size:"default",type:"default"}});ne({className:"link",slots:["root","content","title","action","icon","separator","dismissibleIcon"],base:{root:{padding:"12",display:"flex",justifyContent:"space-between"},content:{fontFamily:"sans",fontStyle:"normal",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},title:{fontWeight:"semibold",fontFamily:"sans",fontStyle:"normal",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},action:{fontWeight:"medium",marginTop:"8"},icon:{height:"100%",marginRight:"8",display:"flex",alignItems:"start",marginTop:"8"},dismissibleIcon:{height:"100%",display:"flex",alignItems:"start",color:"icon.subtle"},separator:{height:"1px",width:"100%"}},variants:{type:{error:{root:{background:"background.error-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.error-hover"},icon:{color:"icon.error-hover"},title:{color:"text.error-hover"},separator:{background:"border.error"}},info:{root:{background:"background.information-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.information-hover"},title:{color:"text.information-hover"},icon:{color:"text.information-hover"},separator:{background:"border.information"}},success:{root:{background:"background.success-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.success-hover"},title:{color:"text.success-hover"},icon:{color:"text.success-hover"},separator:{background:"border.success"}},emphasize:{root:{background:"background.discovery-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.discovery-hover"},title:{color:"text.discovery-hover"},icon:{color:"text.discovery-hover"},separator:{background:"border.discovery"}},warning:{root:{background:"background.warning-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.warning-hover"},title:{color:"text.warning-hover"},icon:{color:"text.warning-hover"},separator:{background:"border.warning"}},announcement:{root:{background:"background.neutral-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.subtle"},title:{color:"text.subtle"},icon:{color:"text.subtle"},separator:{background:"border.bold"}}}},defaultVariants:{type:"error"}});const uV={default:{root:{backgroundColor:"icon.brand-default","--beacon-shadow-color":"var(--colors-seed-600)","--beacon-shadow-color-light":"var(--colors-seed-25)"}},done:{root:{backgroundColor:"icon.accent-green-default","--beacon-shadow-color":"var(--colors-green-600)","--beacon-shadow-color-light":"var(--colors-green-25)"}},error:{root:{backgroundColor:"icon.error-default","--beacon-shadow-color":"var(--colors-red-600)","--beacon-shadow-color-light":"var(--colors-red-25)"}},waiting:{root:{backgroundColor:"icon.disabled","--beacon-shadow-color":"var(--colors-graycoolalpha-75)","--beacon-shadow-color-light":"var(--colors-graycoolalpha-25)"}}},hV={small:{root:{width:"8",height:"8","--beacon-shadow-spread-radius":"8px"}},medium:{root:{width:"16",height:"16","--beacon-shadow-spread-radius":"16px"}},large:{root:{width:"24",height:"24","--beacon-shadow-spread-radius":"24px"}}};ne({slots:["root"],base:{root:{borderRadius:"full",backgroundColor:"plum.800",animation:"pulse-animation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",boxShadow:"0px 0px 1px 1px var(--beacon-shadow-color)"}},variants:{variant:uV,size:hV,isAnimationDisabled:{true:{root:{animation:"none",boxShadow:"none"}}}},defaultVariants:{variant:"default",size:"small",isAnimationDisabled:!1}});const pV={xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",viewBox:"0 0 6 8",fill:"none"};function gV(e,t){return C(),H("svg",pV,[...t[0]||(t[0]=[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.86875 0.484377L2.33279 0.948477L4.80307 3.41878C5.14485 3.76049 5.14485 4.31451 4.80307 4.65622L2.33279 7.12654L1.86875 7.59058L0.940674 6.6625L1.40471 6.19846L3.56567 4.0375L1.40471 1.8765L0.940674 1.41249L1.86875 0.484377Z",fill:"#7E808A",style:{fill:"color(display-p3 0.4929 0.5038 0.5431)","fill-opacity":"1"}},null,-1)])])}const fV={render:gV};ne({className:"breadcrumb",slots:["root","list","item","link","separator","current","icon","currentIcon"],base:{root:{display:"flex",alignItems:"center"},list:{display:"flex",alignItems:"center",gap:"4"},item:{display:"flex",alignItems:"center",gap:"4"},link:{display:"flex",alignItems:"center",gap:"4",fontFamily:"sans",fontSize:"13",fontWeight:"medium",lineHeight:"lg",color:"text.subtle",textDecoration:"none",cursor:"pointer",_hover:{textDecoration:"underline"}},separator:{display:"flex",alignItems:"center",color:"icon.subtle",justifyContent:"center",width:"20",height:"20"},current:{display:"flex",alignItems:"center",gap:"4",fontFamily:"sans",fontSize:"13",fontWeight:"medium",lineHeight:"lg",color:"text.normal"},icon:{display:"flex",alignItems:"center",width:"16",height:"16",color:"icon.subtle"},currentIcon:{display:"flex",alignItems:"center",width:"20",height:"20",color:"icon.normal"}},variants:{},defaultVariants:{}});ne({slots:["root","content","prefix","suffix","label","rootWrapper","separator","separatorPlaceholder"],base:{rootWrapper:{boxShadow:"stroke-bordered",display:"inline-flex",borderRadius:"md"},separator:{width:"1px",height:"100%",marginTop:"0.125px",display:"flex",backgroundColor:"border.muted",position:"absolute",right:"-1",top:"0"},separatorPlaceholder:{width:"1",display:"flex"},root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",paddingY:"6",paddingX:"12",_hidden:{display:"none"},gap:"6"},content:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6"},prefix:{color:"inherit",display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},label:{}},defaultVariants:{size:"default"},variants:{size:{default:{root:{...Ve.default,height:"xxl",boxShadow:"none"},prefix:{width:"16",height:"16",fontSize:"base"}},small:{root:{...Ve.default,height:"xl",fontSize:"sm",boxShadow:"none"},prefix:{width:"14",height:"14"}}}}});ne({slots:["root","content","chevron","prefix","container","separator","separatorPlaceholder","icon"],base:{container:{alignItems:"center",boxShadow:"stroke-bordered-interactive",display:"inline-flex",borderRadius:"md"},icon:{display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},separator:{height:"100%",marginTop:"0.125px",display:"flex",position:"absolute",right:"-1",top:"0"},separatorPlaceholder:{display:"flex"},root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",gap:"6"},prefix:{display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},content:{display:"flex",alignItems:"center",gap:"6"},chevron:{display:"inline-block",transition:"transform 0.3s ease",'&[data-open="true"]':{transform:"rotate(180deg)"}}},defaultVariants:{type:"primary",action:"primary",size:"default"},variants:{type:{primary:{root:{...Ve.primary,boxShadow:"none"}},default:{root:{...Ve.default,boxShadow:"none"}}},action:{primary:{root:{borderTopLeftRadius:"md",borderBottomLeftRadius:"md",borderTopRightRadius:"0",borderBottomRightRadius:"0"}},secondary:{root:{borderTopRightRadius:"md",borderBottomRightRadius:"md",borderTopLeftRadius:"0",borderBottomLeftRadius:"0",paddingX:"6",paddingY:"8"}}},size:{default:{root:{},chevron:{width:"16",height:"16"}},small:{chevron:{width:"14",height:"14"}}}},compoundVariants:[{action:"primary",size:"default",css:{root:{paddingX:"12",paddingY:"6"}}},{action:"primary",size:"small",css:{root:{paddingX:"8",paddingY:"0",height:"24"}}},{action:"secondary",size:"small",css:{root:{height:"24",paddingY:"6"}}},{type:"primary",action:"primary",css:{root:{boxShadow:"none"}}},{type:"primary",action:"secondary",css:{root:{boxShadow:"none",_focus:{},'&[data-open="true"]':{backgroundColor:"seed.900"}}}},{type:"default",action:"secondary",css:{root:{'&[data-open="true"]':{backgroundColor:"graycoolalpha.20"},_focusVisible:{color:"seed.800"}}}},{type:"default",action:"primary",css:{root:{_focusVisible:{color:"seed.800"}}}},{type:"default",css:{separator:{width:"1px",backgroundColor:"border.muted"},separatorPlaceholder:{width:"1px"}}},{type:"primary",css:{separator:{width:"1px",backgroundColor:"border.muted",right:"0"},separatorPlaceholder:{width:"0px"}}}]});const mV={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"};function vV(e,t){return C(),H("svg",mV,[...t[0]||(t[0]=[z("path",{d:"M1.24033 3.98097L3.71905 6.45973C4.10957 6.85026 4.74274 6.85026 5.13326 6.45974L10.7599 0.833153",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const $b={render:vV},bV={width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yV(e,t){return C(),H("svg",bV,[...t[0]||(t[0]=[z("path",{id:"Vector",d:"M0 1.0361L8 0.963898",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const xV={render:yV},wV={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function CV(e,t){return C(),H("svg",wV,[...t[0]||(t[0]=[z("g",{id:"icon-information","clip-path":"url(#clip0_2674_19124)"},[z("path",{id:"Vector","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 12.6875C10.1412 12.6875 12.6875 10.1412 12.6875 7C12.6875 3.85888 10.1412 1.3125 7 1.3125C3.85888 1.3125 1.3125 3.85888 1.3125 7C1.3125 10.1412 3.85888 12.6875 7 12.6875ZM7 14C10.866 14 14 10.866 14 7C14 3.134 10.866 0 7 0C3.134 0 0 3.134 0 7C0 10.866 3.134 14 7 14ZM5.46875 6.125H6.125H6.78124C7.26449 6.125 7.65624 6.51676 7.65624 7V10.0625V10.7188H6.34374V10.0625V7.4375H6.125H5.46875V6.125ZM7 5.25C7.48325 5.25 7.875 4.85824 7.875 4.375C7.875 3.89176 7.48325 3.5 7 3.5C6.51676 3.5 6.125 3.89176 6.125 4.375C6.125 4.85824 6.51676 5.25 7 5.25Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),z("defs",null,[z("clipPath",{id:"clip0_2674_19124"},[z("rect",{width:"14",height:"14",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const xa={render:CV},_V=ne({className:"tooltip",slots:Cb.keys(),base:{trigger:{backgroundColor:"transparent",border:"none",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",padding:"0"},content:{fontFamily:"sans",fontSize:"sm",backgroundColor:"graycool.25",paddingLeft:"8",paddingRight:"8",paddingTop:"4",paddingBottom:"4",borderRadius:"sm",gap:"6",maxWidth:"200",color:"graycool.800",fontWeight:"regular",boxShadow:"0px 1px 3px 0px {colors.blackalpha.100}",border:"0.5px solid {colors.graycool.500}",_open:{animation:"fadeIn 0.25s ease-out"},_closed:{animation:"fadeOut 0.2s ease-out"}}}}),SV={key:0,class:"tooltip-content"},fu=M({__name:"Tooltip",props:{placement:{default:"top"},title:{},"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>_V());return(o,i)=>(C(),T(b(No).Root,{positioning:{placement:t.placement}},{default:P(()=>[Z(b(No).Trigger,{class:N(n.value.trigger)},{default:P(()=>[L(o.$slots,"default")]),_:3},8,["class"]),Z(b(No).Positioner,{class:N(n.value.positioner)},{default:P(()=>[Z(b(No).Content,{class:N(n.value.content)},{default:P(()=>[Z(b(No).Arrow,{class:N(n.value.arrow)},{default:P(()=>[Z(b(No).ArrowTip,{class:N(n.value.arrowTip)},null,8,["class"])]),_:1},8,["class"]),t.title?(C(),H("div",SV,oe(t.title),1)):L(o.$slots,"content",{key:1})]),_:3},8,["class"])]),_:3},8,["class"])]),_:3},8,["positioning"]))}}),kV=ne({className:"checkbox",slots:Hd.keys(),base:{root:{alignItems:"center",display:"flex"},label:{color:"fg.default",fontSize:"base",fontWeight:"normal",fontFamily:"sans",paddingLeft:"8"},control:{alignItems:"center",borderWidth:"1px",cursor:"pointer",display:"flex",justifyContent:"center",transitionDuration:"normal",transitionProperty:"border-color, background",transitionTimingFunction:"default",width:"sm",height:"sm",borderRadius:"sm",boxShadow:"stroke-bordered-interactive","& svg":{width:"9.52",height:"6.33"},_hover:{background:"graycoolalpha.10"},_checked:{background:"seed.700",boxShadow:"inner-highlighted-ring",_hover:{background:"seed.800"},_disabled:{background:"graycoolalpha.20",boxShadow:"inner-highlighted-ring"}},_indeterminate:{background:"seed.700",boxShadow:"inner-highlighted-ring",_hover:{background:"seed.800"},"& svg":{width:"9.52"},_disabled:{background:"graycoolalpha.20",boxShadow:"inner-highlighted-ring"}},_focus:{boxShadow:"state-focus-primary"},_disabled:{color:"graycoolalpha.75",background:"graycoolalpha.20",cursor:"not-allowed",boxShadow:"inner-highlighted-ring",_hover:{color:"graycoolalpha.75",background:"graycoolalpha.20"}}},indicator:{color:"{colors.whitealpha.1000}",_checked:{"&:not(.indeterminate-icon)":{display:"flex",justifyContent:"center",alignItems:"center"}},_indeterminate:{"&.indeterminate-icon":{display:"flex",justifyContent:"center",alignItems:"center"}}}},defaultVariants:{type:"off"}}),EV={class:"checkbox-root"},OV={key:0,class:"checkbox-label-content"},$V={key:0,class:"checkbox-label-description"},IV=M({__name:"Checkbox",props:{disabled:{type:Boolean},checked:{},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!0},defaultChecked:{},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean},"aria-labelledby":{}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=kV();return(a,r)=>(C(),H("div",EV,[Z(b(Fo).Root,{class:N(b(i).root),checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],onCheckedChange:r[0]||(r[0]=s=>o("checkedChange",s))},{default:P(()=>[Z(b(Fo).Control,{class:N(b(i).control)},{default:P(()=>[Z(b(Fo).Indicator,{class:N(b(i).indicator)},{default:P(()=>[Z(b($b))]),_:1},8,["class"]),Z(b(Fo).Indicator,{indeterminate:"",class:N([b(i).indicator,"indeterminate-icon"])},{default:P(()=>[Z(b(xV))]),_:1},8,["class"])]),_:1},8,["class"]),n.hasLabel||e.iconTooltip?(C(),H("div",OV,[Z(b(Fo).Label,{class:N(b(i).label)},{default:P(()=>[L(a.$slots,"default",{},void 0,!0)]),_:3},8,["class"]),e.iconTooltip?(C(),T(fu,{key:0,title:e.iconTooltip},{default:P(()=>[(C(),T(Wt(e.suffixIcon&&b(xa)),{class:"suffix-icon"}))]),_:1},8,["title"])):(C(),T(Wt(e.suffixIcon&&b(xa)),{key:1,class:"suffix-icon"}))])):Q("",!0),Z(b(Fo).HiddenInput)]),_:3},8,["class","checked","disabled","aria-labelledby"]),e.description?(C(),H("p",$V,oe(e.description),1)):Q("",!0)]))}}),TV=I1(IV,[["__scopeId","data-v-8f1bced0"]]);ne({slots:["root","label","dismissButton","dismissIcon","avatar","icon"],base:{root:{border:"none",display:"inline-flex",alignItems:"center",outline:"none",gap:"6",borderRadius:"full",cursor:"pointer",boxShadow:"stroke-bordered-interactive",_disabled:{cursor:"not-allowed",opacity:"0.5",boxShadow:"none",background:"background.disabled",color:"text.disabled",_hover:{background:"background.disabled"}},_focusVisible:{boxShadow:"state-focus-primary"},_active:{background:"background.pressed"}},label:{fontFamily:"sans",fontStyle:"normal",letterSpacing:"normal",whiteSpace:"nowrap",color:"text.subtle"},dismissButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"0",border:"none",background:"none",cursor:"pointer",_disabled:{cursor:"not-allowed"}},dismissIcon:{width:"12",height:"12",color:"text.subtle"},avatar:{width:"20",height:"20",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"stroke-bordered"},icon:{width:"16",height:"16",color:"text.subtle"}},variants:{size:{small:{root:{paddingTop:"4",paddingBottom:"4",paddingLeft:"8",paddingRight:"8",height:"24"},label:{fontSize:"12",lineHeight:"md",fontWeight:"semimedium",letterSpacing:"wide"},avatar:{width:"14",height:"14"},icon:{width:"12",height:"12"}},default:{root:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",height:"32"},label:{fontSize:"13",lineHeight:"md",fontWeight:"medium"}}},variant:{default:{root:{background:"background.default",_hover:{background:"background.hover"},_active:{background:"background.pressed"}}},selected:{root:{background:"{colors.seed.100}",_hover:{background:"background.selected-hover"},_active:{background:"background.selected-pressed"},_focusVisible:{boxShadow:"state-focus-primary"}},label:{color:"text.brand-default",_hover:{color:"text.brand-hover"},_active:{color:"text.brand-pressed"},_focusVisible:{color:"text.brand-pressed"}},icon:{color:"icon.selected",_active:{color:"text.brand-pressed"},_focusVisible:{color:"text.brand-pressed"}}}},hasAvatar:{true:{root:{paddingLeft:"6"}}},hasIcon:{true:{root:{paddingLeft:"6"}}},disabled:{true:{root:{opacity:"0.5",cursor:"not-allowed",background:"background.disabled",_hover:{background:"background.disabled"}},label:{color:"text.placeholder"},icon:{color:"text.placeholder"},avatar:{opacity:"0.5"}}}},defaultVariants:{size:"default",variant:"default",disabled:!1,hasAvatar:!1,hasIcon:!1}});ne({className:"prefix",slots:["root","icon","avatar","critical","selected","enter"],base:{root:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,gap:"4"},icon:{color:"icon.subtle",width:"14",height:"14"},avatar:{},critical:{color:"icon.error-hover",width:"14",height:"14"},selected:{color:"icon.normal",width:"14",height:"14"},enter:{color:"icon.subtle",width:"14",height:"14"}}});ne({className:"suffix",slots:["root","toggle","note","checkbox","radio","selected","button"],base:{root:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,gap:"4"},toggle:{},note:{color:"text.muted",fontWeight:"medium",fontSize:"base",lineHeight:"lg",letterSpacing:"normal",fontFamily:"sans",fontStyle:"normal"},checkbox:{},radio:{},selected:{color:"icon.normal",width:"14",height:"14"},button:{}}});ne({className:"radioGroup",slots:[...gu.keys(),"optionsContainer"],base:{root:{fontFamily:"sans",display:"flex",flexDirection:{_vertical:"column",_horizontal:"row"},gap:{_vertical:"8",_horizontal:"8"}},optionsContainer:{display:"flex",flexDirection:{_vertical:"column",_horizontal:"row"},gap:{_vertical:"6",_horizontal:"24"},rowGap:{_horizontal:"6"}},label:{color:"text.subtle",fontSize:"base",fontWeight:"medium",lineHeight:"lg",fontStyle:"normal",letterSpacing:"normal"},indicator:{background:"bg.default"},itemControl:{width:"sm",height:"sm",display:"flex",alignItems:"center",justifyContent:"center",background:"background.default",borderRadius:"full",boxShadow:"stroke-bordered-interactive",transitionDuration:"normal",transitionProperty:"background",transitionTimingFunction:"default",_hover:{background:"background.hover"},_focus:{boxShadow:"state-focus-primary"},_checked:{outlineWidth:"5px",outlineOffset:"-4px",outlineColor:"background.brand-bold-default",outlineStyle:"solid",boxShadow:"inner-highlighted-ring",transitionProperty:"outline-color",_hover:{outlineColor:"background.brand-bold-default"},_focus:{boxShadow:"state-focus-primary"}},_disabled:{background:"background.disabled",_hover:{background:"background.disabled"},_checked:{outlineColor:"icon.disabled",background:"background.disabled",borderColor:"background.disabled",_hover:{outlineColor:"icon.disabled",background:"background.disabled",borderColor:"background.disabled"}}}},item:{display:"flex",alignItems:"center",cursor:"pointer",_disabled:{cursor:"not-allowed"},gap:"8"},itemText:{color:"text.normal",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_disabled:{color:"text.disabled"}}},defaultVariants:{}});ne({className:"switch",slots:[...hb.keys(),"suffixIcon","labelContent","labelDescription"],base:{root:{display:"flex",alignItems:"center",gap:"6",position:"relative",width:"fit-content",cursor:"pointer",_disabled:{cursor:"not-allowed"}},control:{display:"inline-flex",alignItems:"center",boxSizing:"content-box",justifyContent:"flex-start",flexShrink:0,cursor:"pointer",borderRadius:"full",paddingRight:"0",position:"relative",transitionProperty:"all",transitionTimingFunction:"ease-in-out",transitionDuration:"150ms",background:"graycoolalpha.10",w:"26px",h:"16px",boxShadow:"stroke-bordered-interactive",_focus:{boxShadow:"state-focus-primary"},_checked:{background:"seed.800",_disabled:{background:"background.brand-pressed"},'&[data-loading="true"]':{background:"background.brand-pressed"}},_disabled:{cursor:"not-allowed",background:"background.disabled",'&[data-loading="true"]':{background:"background.disabled"},boxShadow:"none"}},label:{color:"graycool.1000",fontSize:"base",fontWeight:"normal",fontFamily:"sans",cursor:"pointer",lineHeight:"lg"},thumb:{background:"white",borderRadius:"full",h:"12px",w:"12px",transform:"translateX(2px)",boxShadow:"elevations-raised",transitionProperty:"transform",transitionTimingFunction:"ease-in-out",transitionDuration:"150ms",position:"relative",_checked:{transform:"translateX(12px)",background:"white",boxShadow:"elevations-raised",_disabled:{background:"white"},'&[data-loading="true"]':{"&::before":{borderTopColor:"background.brand-pressed"}}},_disabled:{background:"white"},'&[data-loading="true"]':{"&::before":{content:'""',position:"absolute",margin:"1px",top:"0",left:"0",right:"0",bottom:"0",borderRadius:"full",border:"2px solid white",borderTopColor:"background.disabled",borderStyle:"solid",backgroundColor:"transparent",animation:"spin 2s linear infinite",boxShadow:"0 0 8px rgba(255, 255, 255, 0.3)",transform:"rotate(0deg)",willChange:"transform",backfaceVisibility:"hidden"}}},suffixIcon:{color:"icon.disabled"},labelContent:{display:"flex",alignItems:"center",gap:"4"},labelDescription:{margin:"0",paddingLeft:"32",color:"text.subtle",fontSize:"sm",fontFamily:"sans"}}});ne({slots:[...UE.keys()],base:{root:{position:"relative"},trigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",border:"none",cursor:"pointer"},input:{marginBottom:12},viewControl:{display:"flex",alignItems:"center",paddingLeft:12,marginBottom:"4px"},viewTrigger:{display:"flex",alignItems:"center",justifyContent:"flex-start",borderRadius:"md",backgroundColor:"transparent",border:"none",pointerEvents:"none",textStyle:"body_base_medium",flexGrow:1},prevTrigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",backgroundColor:"transparent",border:"none",cursor:"pointer",outline:"none",_focus:{boxShadow:"none"},"& svg":{transform:"rotate(-90deg)"}},nextTrigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",backgroundColor:"transparent",border:"none",cursor:"pointer",_focus:{boxShadow:"none"},"& svg":{transform:"rotate(90deg)"}},content:{paddingX:"14px",paddingTop:"14px",paddingBottom:12,boxShadow:"elevations-overlay",borderRadius:"md",backgroundColor:"background.white"},table:{borderCollapse:"collapse",borderSpacing:0},tableHeader:{textStyle:"body_base_medium",color:"text.subtle",paddingY:"6",paddingX:"8",height:32,width:32,minWidth:32,maxWidth:32},tableCell:{width:32,height:32,padding:"0"},tableCellTrigger:{display:"flex",alignItems:"center",justifyContent:"center",textStyle:"body_base_regular",paddingY:"6",paddingX:"8",borderRadius:"md",border:"none",cursor:"pointer",height:"inherit",width:"inherit",_hover:{backgroundColor:"background.brand-selected"},"&[data-in-range]":{backgroundColor:"background.brand-selected",borderRadius:"0"},"&[data-selected]":{backgroundColor:"background.brand-bold-default",color:"text.inverse"},"&[data-range-start]":{borderRadius:"md"},"&[data-range-end]":{borderRadius:"md"},"&[data-in-range][data-selected]":{backgroundColor:"background.brand-bold-default",color:"text.inverse",borderRadius:"borderRadius.md"},"&[data-today]":{backgroundColor:"background.error-bold-default",color:"text.inverse",textStyle:"body_base_semibold",borderRadius:"50%"},"&[data-outside-range]":{color:"text.muted"},"&[data-disabled]":{cursor:"not-allowed",_hover:{backgroundColor:"transparent"}}}}});ne({className:"drawer",slots:[...Iv.keys(),"header","body","footer","actions","breadcrumbs","closeButton","titleNested","backAction","hintMessage","root"],base:{root:{},backdrop:{position:"fixed",inset:"0",backgroundColor:"blackalpha.600",zIndex:"40",_open:{animation:"backdrop-in"},_closed:{animation:"backdrop-out"}},positioner:{position:"fixed",top:"0",right:"0",height:"100vh",zIndex:"50",display:"flex",alignItems:"center"},content:{display:"flex",flexDirection:"column",backgroundColor:"background.default",height:"100vh",boxShadow:"stroke-bordered-interactive",_open:{animation:"drawer-in-right"},_closed:{animation:"drawer-out-right"}},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16"},title:{fontFamily:"sans",fontSize:"md",fontWeight:"bold",color:"text.normal",marginY:"0"},titleNested:{fontFamily:"sans",fontSize:"md",fontWeight:"bold",color:"text.normal",marginY:"0"},breadcrumbs:{display:"flex",alignItems:"center"},body:{flex:"1",padding:"16",overflowY:"auto",fontFamily:"sans"},footer:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"16",backgroundColor:"background.neutral-default"},actions:{display:"flex",gap:"12"},backAction:{marginRight:"auto"},hintMessage:{marginRight:"auto",maxWidth:"70%"},closeButton:{display:"flex",justifyContent:"center",alignItems:"center",color:"icon.subtle",backgroundColor:"transparent",border:"none",padding:"0",margin:"0"}},variants:{size:{narrow:{content:{width:"320"}},medium:{content:{width:"504"}},wide:{content:{width:"640"}},full:{content:{width:"100vw"}}},variant:{default:{},custom:{},nested:{}},footerVariant:{default:{},critical:{}},layout:{default:{},multiAction:{footer:{justifyContent:"space-between"}}}},defaultVariants:{size:"medium",variant:"default",footerVariant:"default",layout:"default"}});const hr={default:"text.muted",error:"text.error-hover",warning:"text.warning-hover",success:"text.success-hover"};ne({slots:["container","iconWrapper","message"],base:{container:{height:"md",display:"flex",columnGap:"4",alignItems:"center"},iconWrapper:{display:"flex",alignItems:"center"},message:{display:"inline-flex",fontSize:"xs",fontWeight:"regular",fontFamily:"sans",alignItems:"center",justifyContent:"center",lineHeight:"sm",fontStyle:"normal"}},variants:{type:{default:{message:{color:hr.default}},error:{message:{color:hr.error}},warning:{message:{color:hr.warning}},success:{message:{color:hr.success}}}},defaultVariants:{type:"default"}});ne({className:"empty-state",slots:["root","content","title","description","illustration"],base:{root:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12",width:"fit-content"},content:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8",width:"full"},title:{fontFamily:"sans",fontWeight:"bold",fontSize:"15",lineHeight:"lg",letterSpacing:"tighter",textAlign:"center",color:"text.normal",marginBottom:"0"},description:{fontFamily:"sans",fontWeight:"regular",fontSize:"13",lineHeight:"lg",textAlign:"center",color:"text.subtle",marginTop:{base:"0"},_firstOfType:{marginTop:"0"}},illustration:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",borderRadius:"md",borderWidth:"01",borderStyle:"solid",borderColor:"border.muted",color:"text.subtle",marginBottom:"0"}}});const PV={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VV(e,t){return C(),H("svg",PV,[...t[0]||(t[0]=[z("path",{d:"M6 1C5.73478 1 5.48043 1.10536 5.29289 1.29289C5.10536 1.48043 5 1.73478 5 2V3H2C1.73478 3 1.48043 3.10536 1.29289 3.29289C1.10536 3.48043 1 3.73478 1 4C1 4.26522 1.10536 4.51957 1.29289 4.70711C1.48043 4.89464 1.73478 5 2 5H3V13C3 13.5304 3.21071 14.0391 3.58579 14.4142C3.96086 14.7893 4.46957 15 5 15H11C11.5304 15 12.0391 14.7893 12.4142 14.4142C12.7893 14.0391 13 13.5304 13 13V5H14C14.2652 5 14.5196 4.89464 14.7071 4.70711C14.8946 4.51957 15 4.26522 15 4C15 3.73478 14.8946 3.48043 14.7071 3.29289C14.5196 3.10536 14.2652 3 14 3H11V2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1H6ZM7 6C7.26522 6 7.51957 6.10536 7.70711 6.29289C7.89464 6.48043 8 6.73478 8 7V11C8 11.2652 7.89464 11.5196 7.70711 11.7071C7.51957 11.8946 7.26522 12 7 12C6.73478 12 6.48043 11.8946 6.29289 11.7071C6.10536 11.5196 6 11.2652 6 11V7C6 6.73478 6.10536 6.48043 6.29289 6.29289C6.48043 6.10536 6.73478 6 7 6ZM10 6C10.2652 6 10.5196 6.10536 10.7071 6.29289C10.8946 6.48043 11 6.73478 11 7V11C11 11.2652 10.8946 11.5196 10.7071 11.7071C10.5196 11.8946 10.2652 12 10 12C9.73478 12 9.48043 11.8946 9.29289 11.7071C9.10536 11.5196 9 11.2652 9 11V7C9 6.73478 9.10536 6.48043 9.29289 6.29289C9.48043 6.10536 9.73478 6 10 6Z",fill:"currentColor"},null,-1)])])}const DV={render:VV},MV=ne({slots:[...Dv.keys(),"fileIcon","deleteIcon","dropzoneContent","dropzoneText","itemInfo"],base:{root:{display:"flex",flexDirection:"column",gap:"0",width:"100%"},label:{textStyle:"body_small_medium",color:"text.default",marginBottom:"8"},dropzone:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12",padding:"48",borderRadius:"xl",border:"1px dashed",borderColor:"graycool.200",backgroundColor:"white",cursor:"pointer",transition:"all 0.2s ease-in-out",minHeight:"200px",_hover:{borderColor:"graycool.300"},"&[data-dragging]":{borderColor:"primary.default",backgroundColor:"primary.subtle"},"&[data-invalid]":{borderColor:"error.default",backgroundColor:"error.subtle"}},dropzoneContent:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12"},dropzoneText:{textStyle:"body_small_regular",color:"text.subtle"},trigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6",paddingX:"16",paddingY:"8",borderRadius:"md",backgroundColor:"background.brand-bold-default",boxShadow:"stroke-bordered-interactive",cursor:"pointer",textStyle:"body_small_medium",color:"white",transition:"all 0.2s ease-in-out",border:"none",_hover:{backgroundColor:"background.brand-bold-hover"},_disabled:{opacity:.5,cursor:"not-allowed"}},clearTrigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6",paddingX:"8",paddingY:"4",borderRadius:"md",backgroundColor:"transparent",cursor:"pointer",textStyle:"body_small_medium",color:"text.subtle",transition:"all 0.2s ease-in-out",_hover:{color:"text.default",backgroundColor:"background.hover"}},itemGroup:{display:"flex",flexDirection:"column",gap:"8",marginTop:"16"},item:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12",paddingX:"16",paddingY:"12",borderRadius:"xl",backgroundColor:"white",border:"1px solid",borderColor:"graycool.200"},itemInfo:{display:"flex",flexDirection:"column",gap:"2",flex:1,minWidth:0},itemPreview:{display:"none"},itemPreviewImage:{width:"100%",height:"100%",objectFit:"cover"},itemName:{textStyle:"body_small_medium",color:"text.default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},itemSizeText:{textStyle:"body_xsmall_regular",color:"text.subtle"},itemDeleteTrigger:{display:"flex",alignItems:"center",justifyContent:"center",width:"32",height:"32",borderRadius:"md",cursor:"pointer",color:"text.subtle",transition:"all 0.2s ease-in-out",flexShrink:0,_hover:{color:"text.default",backgroundColor:"background.hover"}},hiddenInput:{display:"none"},fileIcon:{width:"20",height:"20",color:"text.subtle"},deleteIcon:{width:"20",height:"20"}},variants:{variant:{default:{},error:{dropzone:{borderColor:"error.default"}}},disabled:{true:{root:{opacity:.5,pointerEvents:"none"}}}},defaultVariants:{variant:"default",disabled:!1}}),RV=M({__name:"FileUpload",props:{isDisabled:{type:Boolean},label:{},placeholder:{default:"Drop your files here"},triggerLabel:{default:"Open Dialog"},showDropzone:{type:Boolean,default:!0},variant:{default:"default"},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:{},transformFiles:{},asChild:{type:Boolean}},emits:["update:acceptedFiles","fileAccept","fileChange","fileReject"],setup(e,{emit:t}){const n=e,o=Ct(n,t),i=A(()=>MV({variant:n.variant,disabled:n.isDisabled})),a=r=>{if(r===0)return"0 Bytes";const s=1024,l=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,c)).toFixed(1))+" "+l[c]};return(r,s)=>(C(),T(b(gt).Root,W(b(o),{class:i.value.root,disabled:n.isDisabled,"data-testid":"atlantis-file-upload"}),{default:P(()=>[n.label?(C(),T(b(gt).Label,{key:0,class:N(i.value.label),"data-testid":"atlantis-file-upload-label"},{default:P(()=>[Ne(oe(n.label),1)]),_:1},8,["class"])):Q("",!0),n.showDropzone?(C(),T(b(gt).Dropzone,{key:1,class:N(i.value.dropzone),"data-testid":"atlantis-file-upload-dropzone"},{default:P(()=>[L(r.$slots,"dropzone",{},()=>[z("div",{class:N(i.value.dropzoneContent)},[z("span",{class:N(i.value.dropzoneText)},oe(n.placeholder),3),Z(b(gt).Trigger,{class:N(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:P(()=>[Ne(oe(n.triggerLabel),1)]),_:1},8,["class"])],2)])]),_:3},8,["class"])):Q("",!0),n.showDropzone?Q("",!0):(C(),T(b(gt).Trigger,{key:2,class:N(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:P(()=>[L(r.$slots,"trigger",{},()=>[z("span",null,oe(n.triggerLabel),1)])]),_:3},8,["class"])),Z(b(gt).ItemGroup,{class:N(i.value.itemGroup)},{default:P(()=>[Z(b(gt).Context,null,{default:P(({acceptedFiles:l})=>[(C(!0),H(Ce,null,Ge(l,c=>(C(),T(b(gt).Item,{key:c.name,file:c,class:N(i.value.item),"data-testid":"atlantis-file-upload-item"},{default:P(()=>[z("div",{class:N(i.value.itemInfo)},[Z(b(gt).ItemName,{class:N(i.value.itemName)},null,8,["class"]),Z(b(gt).ItemSizeText,{class:N(i.value.itemSizeText)},{default:P(()=>[Ne(oe(a(c.size)),1)]),_:2},1032,["class"])],2),Z(b(gt).ItemDeleteTrigger,{class:N(i.value.itemDeleteTrigger),"data-testid":"atlantis-file-upload-delete"},{default:P(()=>[Z(b(DV),{class:N(i.value.deleteIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["file","class"]))),128))]),_:1})]),_:1},8,["class"]),Z(b(gt).HiddenInput,{"data-testid":"atlantis-file-upload-input"})]),_:3},16,["class","disabled"]))}});ne({slots:["root","checkboxItem","radioItemGroup","radioItem","itemDescription","section",...Xv.keys(),"back","create"],base:{root:{fontFamily:"sans",position:"relative",display:"flex",alignItems:"center"},arrow:{},arrowTip:{},checkboxItem:{},content:{flex:"1",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",background:"whitealpha.1000",boxShadow:"elevations-overlay",borderRadius:"md",paddingTop:"2",paddingBottom:"4",minWidth:"200px",zIndex:"1",outline:"none"},section:{color:"text.muted",fontWeight:"bold",fontSize:"xs",letterSpacing:"widest",textTransform:"uppercase",lineHeight:"xxs",paddingLeft:"8",paddingRight:"12",paddingTop:"16",paddingBottom:"6"},contextTrigger:{},back:{'& > [data-prefix="back-prefix"]':{color:"icon.subtle"},display:"flex",alignItems:"center",flexDirection:"row!",gap:"10",padding:"6"},create:{fontSize:"base",lineHeight:"lg",fontFamily:"sans",fontWeight:"normal",color:"text.normal",padding:"6",background:"background.hover",display:"flex",alignItems:"center",gap:"10",borderRadius:"md",cursor:"pointer",'& > [data-prefix="create-prefix"]':{color:"icon.subtle",display:"flex",alignItems:"center",justifyContent:"center"}},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{display:"flex",flexDirection:"column",alignItems:"flex-start",gridColumnGap:"6",paddingY:"6",paddingX:"8",borderRadius:"md",width:"100%",cursor:"pointer",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",letterSpacing:"normal",_hover:{background:"{colors.seed.50}"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_pressed:{background:"background.pressed"},_disabled:{opacity:"0.5",cursor:"not-allowed",color:"text.disabled",background:"none",_hover:{background:"none"}},"&[data-highlighted]":{backgroundColor:"background.brand-hover"},"&[data-focus]":{background:"{colors.seed.50}",boxShadow:"state-focus-primary"}},itemText:{fontFamily:"sans",fontWeight:"normal",fontSize:"sm",lineHeight:"lg"},itemDescription:{fontFamily:"sans",fontWeight:"normal",fontSize:"xs",lineHeight:"sm",color:"text.subtle"},positioner:{zIndex:"1"},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:"6",paddingY:"6",paddingX:"8",borderRadius:"md",width:"100%",cursor:"pointer",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",_after:{content:'"›"',marginLeft:"8px",color:"text.subtle"},_hover:{background:"background.hover"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_pressed:{background:"background.pressed"},_disabled:{opacity:"0.5",cursor:"not-allowed",color:"text.placeholder",background:"none"}},trigger:{background:"transparent",border:"none",outline:"none"}},variants:{variant:{critical:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{color:"text.error-default"},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},default:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{color:"text.normal"},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}}},size:{default:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},small:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},medium:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},large:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}}}},defaultVariants:{variant:"default",size:"default"}});ne({className:"header",slots:["root","container","titleSection","titleWrapper","iconWrapper","titleContent","title","subtitle","actions","tertiaryText"],base:{root:{display:"flex",flexDirection:"column",backgroundColor:"background.default",gap:"16",width:"100%",paddingRight:"24",paddingLeft:"24"},container:{display:"flex",alignItems:"center",justifyContent:"space-between",maxWidth:"100%",minHeight:"64"},titleSection:{display:"flex",alignItems:"center",flex:"0 0 auto",minWidth:"0"},titleWrapper:{display:"flex",alignItems:"center",gap:"12",minWidth:"0"},iconWrapper:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:"0",width:"32",height:"32",color:"icon.subtle"},titleContent:{display:"flex",flexDirection:"column",gap:"2",minWidth:"0"},title:{textStyle:"heading_text_h2",margin:"0",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{color:"text.subtle",textStyle:"body_base_regular",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",margin:"0"},actions:{display:"flex",alignItems:"center",gap:"8",flexShrink:"0"},tertiaryText:{overflow:"hidden",color:"text.muted",textOverflow:"ellipsis",whiteSpace:"nowrap",textStyle:"body_small_medium"}}});const FV=To({variants:{as:{h1:{textStyle:"heading_text_h1"},h2:{textStyle:"heading_text_h2"},h3:{textStyle:"heading_text_h3"},h4:{textStyle:"heading_text_h4"},h5:{textStyle:"heading_text_h5"}}}}),AV=M({__name:"Heading",props:{as:{default:"h2"}},setup(e){const t=e,n=A(()=>FV(t));return(o,i)=>(C(),T(Wt(e.as),{class:N(n.value)},{default:P(()=>[L(o.$slots,"default")]),_:3},8,["class"]))}}),LV={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function NV(e,t){return C(),H("svg",LV,[...t[0]||(t[0]=[z("g",{"clip-path":"url(#clip0_9565_3071)"},[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 6C12 9.31373 9.31373 12 6 12C2.68629 12 0 9.31373 0 6C0 2.68629 2.68629 0 6 0C9.31373 0 12 2.68629 12 6ZM7.875 8.67053L7.47725 8.27273L6 6.7955L4.52275 8.27273L4.125 8.67053L3.3295 7.875L3.72725 7.47725L5.2045 6L3.72725 4.52275L3.3295 4.125L4.125 3.3295L4.52275 3.72725L6 5.2045L7.47725 3.72725L7.875 3.3295L8.67053 4.125L8.27273 4.52275L6.7955 6L8.27273 7.47725L8.67053 7.875L7.875 8.67053Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),z("defs",null,[z("clipPath",{id:"clip0_9565_3071"},[z("rect",{width:"12",height:"12",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const BV={render:NV},Bo={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},iconDimensions:{fontSize:"1.1em",width:"1.1em",height:"1.1em"}},zV={default:{root:{boxShadow:"stroke-bordered-interactive",_focusWithin:{boxShadow:"state-focus-primary"},_focus:{boxShadow:"state-focus-primary"}}},error:{root:{boxShadow:"state-error",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},HV={gray:{prePostInput:{background:"background.hover"}},white:{prePostInput:{background:"background.default"}}},Zt=ne({slots:["root","input","prefix","suffix","prePostInput","preInput","postInput","shortcut","clearIconContainer"],base:{root:{...Bo.flexCenter,width:"100%",height:"xxl",px:"6",py:"6",columnGap:"6",borderRadius:"md",boxSizing:"border-box",cursor:"text",_hover:{backgroundColor:"background.gray-subtlest-hover"},transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",color:"graycool.1000",isolation:"isolate",minWidth:"0",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontWeight:"regular",fontFamily:"sans",fontStyle:"normal",lineHeight:"lg",whiteSpace:"nowrap",_hidden:{display:"none"},"& :where(svg)":Bo.iconDimensions},input:{height:"xxl",borderRadius:"md",flex:"1",border:"none",outline:"none",padding:"0",minWidth:"0",background:"transparent","&::placeholder":{color:"text.placeholder"}},prefix:{...Bo.flexCenter,flexShrink:"0"},suffix:{...Bo.flexCenter,flexShrink:"0"},clearIconContainer:{...Bo.flexCenter,width:"12",height:"12",cursor:"pointer",color:"icon.disabled",_hover:{color:"icon.muted"}},prePostInput:{...Bo.flexCenter,height:"xxl",paddingY:"6",paddingX:"12",gap:"8",flexShrink:"0",color:"text.subtle",fontFamily:"Inter",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"lg"},preInput:{borderRadius:"md 0 0 md",borderRight:"1px solid {colors.border.muted}"},postInput:{borderRadius:"0 md md 0",borderLeft:"1px solid {colors.border.muted}"}},variants:{variant:zV,theme:HV,state:{idle:{},disabled:{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"}}}},isBordered:{false:{root:{boxShadow:"none"}}},hasBackground:{true:{root:{backgroundColor:"background.gray-subtlest-default"}},false:{root:{backgroundColor:"transparent",_hover:{backgroundColor:"transparent"},_focusWithin:{boxShadow:"none"},_focus:{boxShadow:"none"}}}},hasPreInput:{true:{root:{paddingLeft:"0"}}},hasPostInput:{true:{root:{paddingRight:"0"}}}},defaultVariants:{variant:"default",state:"idle",isBordered:!0,theme:"gray"}}),jV=["placeholder","disabled","list","autofocus"],WV={key:1,id:"input-datalist"},GV=["value"],Ib=M({__name:"Input",props:{variant:{default:"default"},state:{default:"idle"},placeholder:{default:"Placeholder"},modelValue:{default:""},prefixText:{default:""},suffixText:{default:""},canClear:{type:Boolean,default:!1},shortcutKeys:{default:()=>[]},isAutocompleteEnable:{type:Boolean,default:!1},preInput:{default:""},postInput:{default:""},prePostInputTheme:{default:"gray"},options:{default:()=>["Alpha","Beta","Gamma","Zeta"]},isBordered:{type:Boolean,default:!0},hasBackground:{type:Boolean,default:!0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=ve(null),i=ve(n.modelValue??""),a=A(()=>n.state==="disabled"||n.disabled),r=A(()=>[Zt({variant:n.variant,state:a.value?"disabled":"idle",isBordered:n.isBordered,hasPreInput:n.preInput!=="",hasPostInput:n.postInput!=="",hasBackground:n.hasBackground}).root]),s=A(()=>Zt({state:a.value?"disabled":"idle"}).input),l=A(()=>[Zt({variant:n.variant}).prePostInput,Zt({theme:n.prePostInputTheme}).prePostInput]),c=A(()=>[...l.value,Zt({variant:n.variant}).preInput]),d=A(()=>[...l.value,Zt({variant:n.variant}).postInput]),h=A(()=>Zt().prefix),u=A(()=>Zt().suffix),p=A(()=>Zt().clearIconContainer),m=()=>i.value="",g=()=>{var f;(f=o.value)==null||f.focus()},v=t;return Me(i,f=>{v("update:modelValue",f)}),Me(()=>n.modelValue,f=>{f!==i.value&&(i.value=f??"")}),(f,y)=>(C(),H("div",{class:N(r.value),onClick:us(g,["stop"]),onKeydown:Iu(g,["enter"])},[n.preInput?(C(),H("div",{key:0,class:N(c.value)},[z("span",null,oe(n.preInput),1)],2)):Q("",!0),L(f.$slots,"prefixIcon",{},()=>[e.prefixText?(C(),H("span",{key:0,class:N(h.value)},oe(e.prefixText),3)):Q("",!0)]),Ly(z("input",W({ref_key:"inputRef",ref:o,role:"textbox"},f.$attrs,{placeholder:e.placeholder,disabled:a.value,list:e.isAutocompleteEnable?"input-datalist":void 0,class:s.value,"onUpdate:modelValue":y[0]||(y[0]=x=>i.value=x),autofocus:e.autofocus}),null,16,jV),[[Ny,i.value]]),e.isAutocompleteEnable?(C(),H("datalist",WV,[(C(!0),H(Ce,null,Ge(e.options,x=>(C(),H("option",{key:x,value:x},null,8,GV))),128))])):Q("",!0),L(f.$slots,"suffixIcon",{},()=>[e.suffixText?(C(),H("span",{key:0,class:N(u.value)},oe(e.suffixText),3)):Q("",!0)]),Z(ms,{keys:e.shortcutKeys,type:"default"},null,8,["keys"]),e.canClear&&i.value?(C(),H("span",{key:2,class:N(p.value),onClick:us(m,["stop"]),onKeydown:Iu(m,["enter"]),"data-testid":"clear"},[Z(b(BV))],34)):Q("",!0),n.postInput?(C(),H("div",{key:3,class:N(d.value)},[z("span",null,oe(n.postInput),1)],2)):Q("",!0)],34))}}),UV=ne({className:"label",slots:["root","text","mandatoryIndicator","description","suffixIcon"],base:{root:{display:"inline-block",textAlign:"left",paddingLeft:"2",color:"graycool.900",fontFamily:"sans",fontSize:"base",fontStyle:"normal",fontWeight:"semimedium",lineHeight:"lg",letterSpacing:"normal"},text:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4"},mandatoryIndicator:{color:"red.800",textAlign:"center"},description:{fontWeight:"regular",fontSize:"sm",lineHeight:"md",letterSpacing:"normal"},suffixIcon:{color:"graycoolalpha.75"}}}),YV=["for"],Tb=M({__name:"Label",props:{for:{},mandatory:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},iconTooltip:{},badgeVariant:{default:"neutral"},badgeLabel:{},description:{}},setup(e){const t=e,n=UV();return(o,i)=>(C(),H("label",{class:N(b(n).root),for:t.for},[z("span",{class:N(b(n).text)},[L(o.$slots,"default"),t.mandatory?(C(),H("span",{key:0,class:N(b(n).mandatoryIndicator)},"*",2)):Q("",!0),e.iconTooltip?(C(),T(fu,{key:1,title:e.iconTooltip},{default:P(()=>[(C(),T(Wt(e.suffixIcon&&b(xa)),{class:N(b(n).suffixIcon)},null,8,["class"]))]),_:1},8,["title"])):(C(),T(Wt(e.suffixIcon&&b(xa)),{key:2,class:N(b(n).suffixIcon)},null,8,["class"])),e.badgeVariant&&e.badgeLabel?(C(),T(sV,{key:3,variant:e.badgeVariant},{default:P(()=>[Ne(oe(t.badgeLabel),1)]),_:1},8,["variant"])):Q("",!0)],2),t.description?(C(),H("span",{key:0,class:N(b(n).description)},oe(t.description),3)):Q("",!0)],10,YV))}});ne({slots:["root","icon"],base:{root:{display:"flex",alignItems:"center",gap:"4",borderRadius:"md",padding:"0",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",color:"text.subtle",lineHeight:"md",letterSpacing:"wider"},icon:{width:"12",height:"12",display:"flex",alignContent:"center"}},variants:{variant:{verified:{icon:{color:"success.default"}},draft:{icon:{color:"text.subtle"}},deprecated:{icon:{color:"error.default"}},disabled:{icon:{color:"text.subtle"}}}}});ne({slots:["root","accordionItemContent","accordionItemTrigger","contentWrapper","content","title","subtitle","suffixWrapper","logContent","stepsWrapper","firstHalfStep","secondHalfStep"],base:{root:{borderBottom:"none !important",backgroundColor:"inherit"},accordionItemContent:{paddingTop:0,paddingX:0,paddingY:0},accordionItemTrigger:{display:"flex",paddingLeft:0,paddingY:0},contentWrapper:{display:"flex",width:"100%",alignItems:"stretch",gap:"8"},content:{display:"flex",flexDirection:"column",gap:"2",paddingY:"8",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"md",letterSpacing:"wide",color:"text.subtle",flex:"1"},title:{fontWeight:"semimedium"},subtitle:{color:"text.muted",letterSpacing:"wider"},suffixWrapper:{display:"flex"},logContent:{paddingBottom:"8"},stepsWrapper:{display:"flex",flexDirection:"column",alignItems:"center",width:"20",flexShrink:"0"},firstHalfStep:{width:"0",height:"12",zIndex:"1",borderRight:"1px solid {colors.border.disabled}"},secondHalfStep:{width:"0",minHeight:"0",flex:"1",borderRight:"1px solid {colors.border.disabled}"}},variants:{variant:{default:{},waiting:{},done:{title:{color:"text.accent-green-default"}},error:{title:{color:"text.error-default"}}},isExpandable:{true:{},false:{accordionItemTrigger:{cursor:"default"}}},firstHalfStepVariant:{default:{},done:{firstHalfStep:{borderColor:"border.accent-green"}},error:{firstHalfStep:{borderColor:"border.error"}}},secondHalfStepVariant:{default:{},done:{secondHalfStep:{borderColor:"border.accent-green"}},error:{secondHalfStep:{borderColor:"border.error"}}},isFirstHalfStepHidden:{true:{firstHalfStep:{borderRight:"none"}}},isSecondHalfStepHidden:{true:{secondHalfStep:{borderRight:"none"}}},isSelected:{true:{root:{backgroundColor:"background.selected"}}}},defaultVariants:{variant:"default",isExpandable:!1,firstHalfStepVariant:"default",secondHalfStepVariant:"default",isFirstHalfStepHidden:!1,isSecondHalfStepHidden:!1,isSelected:!1}});ne({className:"separator",slots:["root","line"],base:{root:{display:"flex",justifyContent:"center",alignItems:"center",width:"auto",height:"auto"},line:{borderStyle:"solid",borderColor:"border.muted",borderWidth:"1px"}},variants:{orientation:{horizontal:{root:{padding:"4 0",flexDirection:"row"},line:{width:"100%",height:0,borderTopWidth:"1px",borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0}},vertical:{root:{alignItems:"flex-start",padding:"0 4",flexDirection:"column"},line:{height:"100%",width:0,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:"1px"}}},size:{1:{},2:{},3:{},4:{},full:{}}},defaultVariants:{orientation:"horizontal",size:"4"}});ne({slots:["root","label","value"],base:{root:{display:"flex",flexDirection:"column",padding:"16",width:"100%",height:"5.5rem",justifyContent:"flex-start",overflow:"hidden"},label:{textStyle:"body_xsmall_caps_medium",color:"text.subtle",paddingBottom:"8"},value:{textStyle:"heading_text_h3",color:"text.normal"}},variants:{size:{sm:{root:{minWidth:"min(100%, 223px)"}},md:{},xl:{root:{minWidth:"334px"}}},isTitle:{true:{root:{backgroundColor:"background.gray-subtler-default",height:"100%",minHeight:"100%",justifyContent:"flex-start"},label:{textStyle:"body_xsmall_caps_medium"},value:{textStyle:"heading_h1"}}},defaultBackgroundColor:{true:{root:{backgroundColor:"background.default"}}},hoverable:{true:{root:{cursor:"pointer",_hover:{backgroundColor:"background.brand-selected"}}}}}});ne({slots:["root","table","titleCell","metricCell","buttonCellContent"],base:{root:{border:"1px solid",borderColor:"border.muted",borderRadius:"lg",backgroundColor:"background.default",height:"100%",overflow:"hidden"},table:{width:"100%",borderCollapse:"collapse",height:"100%","& tr":{height:"100%"}},titleCell:{borderRight:"1px solid",borderColor:"border.muted",padding:"0",verticalAlign:"top",minWidth:"200px",width:"300px"},metricCell:{borderRight:"1px solid",borderBottom:"1px solid",borderColor:"border.muted",padding:"0",verticalAlign:"top",height:"5.5rem",minWidth:"200px",overflow:"hidden"},buttonCellContent:{display:"flex",flexDirection:"column",padding:"16",width:"100%",height:"5.5rem",justifyContent:"center",alignItems:"center"}},variants:{titlePosition:{left:{},top:{titleCell:{borderBottom:"1px solid"}}},showMoreButton:{true:{}},borderRadiusTopLeft:{none:{root:{borderTopLeftRadius:"none"}},sm:{root:{borderTopLeftRadius:"sm"}},md:{root:{borderTopLeftRadius:"md"}},lg:{root:{borderTopLeftRadius:"lg"}},xl:{root:{borderTopLeftRadius:"xl"}}},borderRadiusTopRight:{none:{root:{borderTopRightRadius:"none"}},sm:{root:{borderTopRightRadius:"sm"}},md:{root:{borderTopRightRadius:"md"}},lg:{root:{borderTopRightRadius:"lg"}},xl:{root:{borderTopRightRadius:"xl"}}},borderRadiusBottomLeft:{none:{root:{borderBottomLeftRadius:"none"}},sm:{root:{borderBottomLeftRadius:"sm"}},md:{root:{borderBottomLeftRadius:"md"}},lg:{root:{borderBottomLeftRadius:"lg"}},xl:{root:{borderBottomLeftRadius:"xl"}}},borderRadiusBottomRight:{none:{root:{borderBottomRightRadius:"none"}},sm:{root:{borderBottomRightRadius:"sm"}},md:{root:{borderBottomRightRadius:"md"}},lg:{root:{borderBottomRightRadius:"lg"}},xl:{root:{borderBottomRightRadius:"xl"}}},hideBorderTop:{true:{root:{borderTop:"none"}}},hideBorderBottom:{true:{root:{borderBottom:"none"}}},hideBorderLeft:{true:{root:{borderLeft:"none"}}},hideBorderRight:{true:{root:{borderRight:"0px"}}},isRightEdge:{true:{titleCell:{borderRight:"none"},metricCell:{borderRight:"none"}}},isBottomEdge:{true:{metricCell:{borderBottom:"none"}}}}});ne({slots:["root","backdrop","content","header","title","titleNested","breadcrumbs","closeButton","body","footer","actions"],base:{root:{fontFamily:"sans",outline:"none",position:"relative",zIndex:50},backdrop:{position:"fixed",inset:"0",backgroundColor:"{colors.blackalpha.500}",zIndex:40},content:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"350",backgroundColor:"background.default",borderRadius:"lg",outline:"none",boxShadow:"elevations-overlay",overflow:"hidden",zIndex:1},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16",width:"100%",position:"relative"},title:{color:"text.normal",fontWeight:"bold",fontSize:"md",lineHeight:"lg",letterSpacing:"tight",fontFamily:"sans",marginY:"0"},titleNested:{color:"text.normal",fontWeight:"bold",fontSize:"md",lineHeight:"lg",letterSpacing:"tight",display:"flex",alignItems:"center",marginY:"0"},breadcrumbs:{display:"flex",alignItems:"center","& .separator":{margin:"0 04",color:"text.subtle"},"& ol":{paddingInlineStart:"0",marginY:"0"}},closeButton:{backgroundColor:"transparent",border:"none",padding:"0",margin:"0",cursor:"pointer",color:"icon.normal"},body:{fontFamily:"sans",padding:"16",display:"flex",flexDirection:"column",gap:"16",color:"text.subtle",position:"relative"},footer:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"16",width:"100%",backgroundColor:"background.neutral-default",position:"relative"},actions:{display:"flex",gap:"12",position:"relative",zIndex:1}},variants:{size:{small:{content:{minWidth:"22em"}},large:{content:{minWidth:"39em"}}},variant:{default:{},custom:{},nested:{header:{padding:"16"},breadcrumbs:{width:"100%"}}},footerVariant:{default:{},critical:{}},layout:{default:{footer:{'&[data-variant="default"]':{justifyContent:"flex-end"},'&[data-variant="extra"]':{justifyContent:"space-between"}}},multiAction:{footer:{justifyContent:"space-between"}}}},defaultVariants:{size:"small",variant:"default",footerVariant:"default",layout:"default"}});ne({slots:[...ob.keys(),"contentDefault","header","footer"],base:{positioner:{background:"background.default",boxShadow:"elevations-overlay",borderRadius:"md",fontFamily:"sans"},content:{outline:"none",_focusVisible:{outline:"none"}},contentDefault:{paddingX:"8",paddingY:"12"},header:{borderBottom:"1px solid {colors.graycool.100}"},footer:{borderTop:"1px solid {colors.graycool.100}"},trigger:{padding:0,border:"none"}},variants:{},defaultVariants:{}});const Lp=ne({slots:["root","container","item","shortcut","icon","dependentField"],base:{root:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:"6",borderRadius:"md",gap:"4",background:"background.neutral-hover",width:"fit-content"},container:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4",width:"100%"},item:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6",borderRadius:"md",paddingY:"4",paddingX:"8",cursor:"pointer",whiteSpace:"nowrap",userSelect:"none",fontFamily:"sans",fontSize:"sm",lineHeight:"lg",transition:"all 0.2s ease",color:"text.subtle",fontWeight:"medium",position:"relative",border:"none",background:"transparent",_hover:{color:"text.normal",background:"background.hover"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_active:{color:"text.brand-default"}},icon:{display:"flex",alignItems:"center",justifyContent:"center",color:"icon.subtle",width:"16",height:"16"},dependentField:{position:"absolute",right:"8",display:"flex",alignItems:"center",justifyContent:"center"}},variants:{size:{medium:{root:{height:"40"},icon:{width:"16",height:"16"},item:{}}},isDisabled:{true:{root:{opacity:.5,cursor:"not-allowed"}}},state:{idle:{item:{_active:{color:"text.brand-default"}},icon:{color:"icon.subtle"},shortcut:{}},active:{item:{color:"text.brand-default",background:"background.default",boxShadow:"stroke-bordered-interactive",_hover:{color:"text.brand-default",background:"background.default"}},icon:{color:"icon.brand-default"},shortcut:{color:"text.subtle"}},disabled:{item:{cursor:"not-allowed",color:"text.placeholder",_hover:{background:"transparent",color:"text.placeholder"}},icon:{color:"icon.placeholder"},shortcut:{color:"text.placeholder"}}},hasIcon:{true:{}},hasShortcut:{true:{}},hasDependentField:{true:{item:{paddingRight:"40"}}}},compoundVariants:[{hasIcon:!0,css:{item:{gap:"4"}}}],defaultVariants:{size:"medium",isDisabled:!1,state:"idle",hasIcon:!1,hasShortcut:!1,hasDependentField:!1}}),qV=["id","aria-label"],KV=["id","aria-selected","aria-disabled","tabindex","onClick","onKeydown","data-state"],XV=M({__name:"Segmented",props:{id:{},options:{},modelValue:{default:""},size:{default:"medium"},isDisabled:{type:Boolean,default:!1},ariaLabel:{default:"Segmented Control"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=t,i=ve(n.modelValue);Cf(()=>{i.value=n.modelValue});const a=A(()=>Lp({size:n.size,isDisabled:n.isDisabled})),r=d=>{n.isDisabled||d.isDisabled||(i.value=d.value,o("update:modelValue",d.value),o("change",d.value))},s=(d,h,u)=>{var p,m;if(n.isDisabled)return;const g=n.options.filter(f=>!f.isDisabled),v=g.findIndex(f=>f.value===h.value);switch(d.preventDefault(),d.key){case"ArrowRight":case"ArrowDown":if(v<g.length-1){const f=g[v+1];r(f),(p=document.getElementById(`segmented-item-${f.value}`))==null||p.focus()}break;case"ArrowLeft":case"ArrowUp":if(v>0){const f=g[v-1];r(f),(m=document.getElementById(`segmented-item-${f.value}`))==null||m.focus()}break;case"Enter":case" ":r(h);break}},l=d=>n.isDisabled||d.isDisabled?"disabled":d.value===i.value?"active":"idle",c=d=>{var h,u;const p=l(d);return Lp({state:p,hasIcon:!!d.icon,hasShortcut:!!((h=d.shortcutKeys)!=null&&h.length)||!!((u=d.counterKey)!=null&&u.length),hasDependentField:!!d.hasDependentField,size:n.size,isDisabled:n.isDisabled||d.isDisabled})};return(d,h)=>(C(),H("div",{class:N(a.value.root),id:e.id,role:"tablist","aria-label":e.ariaLabel,"data-testid":"segmented-control"},[z("div",{class:N(a.value.container)},[(C(!0),H(Ce,null,Ge(e.options,(u,p)=>{var m,g;return C(),H("button",{key:u.value,type:"button",id:`segmented-item-${u.value}`,class:N(c(u).item),role:"tab","aria-selected":u.value===i.value,"aria-disabled":n.isDisabled||u.isDisabled,tabindex:u.value===i.value?0:-1,onClick:v=>r(u),onKeydown:v=>s(v,u),"data-testid":"segmented-item","data-state":u.value===i.value?"active":"idle"},[u.icon?(C(),T(Wt(u.icon),{key:0,class:N(c(u).icon)},null,8,["class"])):Q("",!0),z("span",null,oe(u.label),1),(m=u?.shortcutKeys)!=null&&m.length?(C(),T(ms,{key:1,keys:u.shortcutKeys,type:"default"},null,8,["keys"])):Q("",!0),(g=u?.counterKey)!=null&&g.length?(C(),T(ms,{key:2,keys:u.counterKey,type:"default"},null,8,["keys"])):Q("",!0),u.hasDependentField?(C(),H("span",{key:3,class:N(c(u).dependentField)},[L(d.$slots,`dependent-field-${u.value}`)],2)):Q("",!0)],42,KV)}),128))],2)],10,qV))}}),ZV={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function JV(e,t){return C(),H("svg",ZV,[...t[0]||(t[0]=[z("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.96966 11.0303L10.5 11.5607L11.5607 10.5L11.0303 9.96966L9.06065 7.99999L11.0303 6.03032L11.5607 5.49999L10.5 4.43933L9.96966 4.96966L7.99999 6.93933L6.03032 4.96966L5.49999 4.43933L4.43933 5.49999L4.96966 6.03032L6.93933 7.99999L4.96966 9.96966L4.43933 10.5L5.49999 11.5607L6.03032 11.0303L7.99999 9.06065L9.96966 11.0303Z",fill:"currentColor"},null,-1)])])}const QV={render:JV},St=ne({slots:[...Bv.keys(),"branchIndentGuide","nodeProvider","info","treeNodeIcon","treeNode","checkbox","branchControlButton"],base:{root:{width:"full",height:"fit-content",display:"flex",flexDirection:"column",gap:"2"},branchContent:{},treeNode:{},branchControl:{display:"flex",alignItems:"center",gap:"6",paddingY:"2",paddingLeft:"6",paddingRight:"4",borderRadius:"md"},branchControlButton:{flex:1,display:"flex",alignItems:"center",gap:"6",cursor:"pointer",color:"text.normal",_hover:{bg:"background.hover"},_focusVisible:{outline:"none",boxShadow:"state-focus-primary"},_selected:{backgroundColor:"{colors.seed.100}",_hover:{backgroundColor:"{colors.seed.100}"},outline:"none"},'&[aria-disabled="true"]':{opacity:.4,cursor:"not-allowed",_hover:{bg:"transparent"},pointerEvents:"none",color:"text.disabled"}},branchIndentGuide:{},branchIndicator:{display:"flex",alignItems:"center",justifyContent:"center",'&[data-state="open"]':{transform:"rotate(90deg)"}},branch:{},branchText:{fontSize:"base",fontFamily:"sans",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",color:"text.normal"},branchTrigger:{},item:{display:"flex",alignItems:"center",gap:"6",paddingY:"2",paddingLeft:"6",paddingRight:"4",borderRadius:"md",cursor:"pointer",color:"text.normal",_hover:{bg:"background.hover"},_focusVisible:{outline:"none",boxShadow:"state-focus-primary"},_selected:{outline:"none",bg:"{colors.seed.100}",_hover:{bg:"{colors.seed.100}"}},'&[aria-disabled="true"]':{opacity:.4,cursor:"not-allowed",_hover:{bg:"transparent"},pointerEvents:"none",color:"text.disabled"}},itemText:{fontSize:"base",fontFamily:"sans",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",color:"text.normal"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center",width:"16",height:"16",color:"icon.normal",'&[data-state="open"]':{transform:"rotate(90deg)"}},info:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"icon.disabled",width:"14",height:"14","& svg":{width:"100%",height:"100%"}},treeNodeIcon:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"text.normal",width:"16",height:"16","& svg":{width:"100%",height:"100%"}},label:{},nodeProvider:{},tree:{},checkbox:{display:"inline-flex",alignItems:"center"}}}),eD=M({__name:"TreeViewBranch",props:{"aria-level":{},"aria-posinset":{},"aria-setsize":{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).Branch,W(b(n),{"aria-level":t["aria-level"],"aria-posinset":t["aria-posinset"],"aria-setsize":t["aria-setsize"],class:[o.value.branch],"data-testid":"atlantis-tree-view-branch"}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["aria-level","aria-posinset","aria-setsize","class"]))}}),tD=M({__name:"TreeViewBranchContent",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).BranchContent,W(b(t),{class:[n.value.branchContent],"data-testid":"atlantis-tree-view-branch-content"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),nD=M({__name:"TreeViewBranchControl",props:{depth:{default:0},"aria-labelledby":{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).BranchControl,W(b(n),{"aria-labelledby":t["aria-labelledby"],class:[o.value.branchControl],"data-testid":"atlantis-tree-view-branch-control",style:t.depth>1?{marginLeft:`${(t.depth-1)*24}px`}:{}}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["aria-labelledby","class","style"]))}}),oD=M({__name:"TreeViewBranchIndentGuide",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).BranchIndentGuide,W(b(t),{class:[n.value.branchIndentGuide],"data-testid":"atlantis-tree-view-branch-indent-guide"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),iD=M({__name:"TreeViewBranchIndicator",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).BranchIndicator,W(b(t),{class:[n.value.branchIndicator],"data-testid":"atlantis-tree-view-branch-indicator"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),aD=M({__name:"TreeViewBranchText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).BranchText,W(b(n),{id:t.id,class:[o.value.branchText],"data-testid":"atlantis-tree-view-branch-text"}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["id","class"]))}}),rD=M({__name:"TreeViewItem",props:{depth:{default:0},asChild:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Ct(n),a=A(()=>St());return(r,s)=>(C(),T(b(wn).Item,W(b(i),{class:[a.value.item],"data-testid":"atlantis-tree-view-item",style:n.depth>1?{marginLeft:`${(n.depth-1)*24}px`}:{},onClick:s[0]||(s[0]=l=>o("click",l))}),{default:P(()=>[L(r.$slots,"default")]),_:3},16,["class","style"]))}}),sD=M({__name:"TreeViewItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=Ct(e),n=A(()=>St());return(o,i)=>(C(),T(b(wn).ItemIndicator,W(b(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-tree-view-item-indicator"}),{default:P(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),lD=M({__name:"TreeViewItemText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(t),o=A(()=>St());return(i,a)=>(C(),T(b(wn).ItemText,W(b(n),{id:t.id,class:[o.value.itemText],"data-testid":"atlantis-tree-view-item-text"}),{default:P(()=>[L(i.$slots,"default")]),_:3},16,["id","class"]))}}),Np=M({__name:"TreeViewItemCheckbox",props:{"aria-labelledby":{},disabled:{type:Boolean,default:!1},checked:{default:!1},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!1},defaultChecked:{},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=Ct(n),a=A(()=>St());return(r,s)=>(C(),H("span",{class:N([a.value.checkbox])},[Z(TV,W(b(i),{checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],onCheckedChange:s[0]||(s[0]=l=>o("checkedChange",l)),onClick:s[1]||(s[1]=us(()=>{},["stop"]))}),{default:P(()=>[L(r.$slots,"default")]),_:3},16,["checked","disabled","aria-labelledby"])],2))}}),cD=M({__name:"TreeViewItemInfo",props:{placement:{default:"top"},title:{},"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>St());return(o,i)=>(C(),H("span",null,[Z(fu,{title:t.title,placement:t.placement},{default:P(()=>[L(o.$slots,"default",{},()=>[Z(b(xa),{class:N(n.value.info)},null,8,["class"])])]),_:3},8,["title","placement"])]))}}),Pb=M({__name:"TreeNode",props:{node:{},indexPath:{},treeView:{},selectionMode:{},selectedValue:{}},emits:["node-select"],setup(e,{emit:t}){const n=e,o=t,i=A(()=>St()),a=A(()=>`tree-node-text-${n.node.id}`),r=A(()=>Math.max(1,n.indexPath.length+1)),s=A(()=>{if(n.indexPath.length===0)return 1;const u=n.indexPath[n.indexPath.length-1];return Math.max(1,u+1)}),l=A(()=>{var u,p,m,g,v,f,y,x;if(n.indexPath.length===0){const O=((g=(m=(p=(u=n.treeView)==null?void 0:u.collection)==null?void 0:p.rootNode)==null?void 0:m.children)==null?void 0:g.length)||0;return Math.max(1,O)}const w=(f=(v=n.treeView)==null?void 0:v.collection)==null?void 0:f.rootNode;if(!w)return 1;let S=w;for(let O=0;O<n.indexPath.length-1;O++){const _=n.indexPath[O];if((y=S?.children)!=null&&y[_])S=S.children[_];else return 1}const k=((x=S?.children)==null?void 0:x.length)||0;return Math.max(1,k)}),c=()=>{(!n.node.children||n.node.children.length===0)&&o("node-select",n.node.id,!0)},d=u=>{const p=[];if(u.children)for(const m of u.children)p.push(m.id),m.children&&p.push(...d(m));return p},h=A(()=>{if(n.selectionMode!=="multiple")return n.selectedValue.includes(n.node.id);const u=n.selectedValue.includes(n.node.id);if(!n.node.children||n.node.children.length===0)return u;const p=d(n.node),m=p.filter(g=>n.selectedValue.includes(g)).length;return m===0?!!u:m===p.length?!0:"indeterminate"});return(u,p)=>(C(),T(b(Nv),{node:n.node,indexPath:n.indexPath},{default:P(()=>[n.node.children&&n.node.children.length>0?(C(),T(b(eD),{key:0,"aria-level":r.value,"aria-posinset":s.value,"aria-setsize":l.value},{default:P(()=>[Z(b(oD),null,{default:P(()=>[z("div",{class:N([i.value.branchControl])},[Z(b(nD),{disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,depth:n.indexPath.length,"aria-labelledby":a.value,class:N(i.value.branchControlButton)},{default:P(()=>[Z(b(iD),null,{default:P(()=>[Z(b(fV))]),_:1}),n.selectionMode==="multiple"?(C(),T(b(Np),{key:0,checked:h.value,disabled:n.node.isDisabled,"aria-labelledby":a.value,onCheckedChange:p[0]||(p[0]=()=>o("node-select",n.node.id,!1))},null,8,["checked","disabled","aria-labelledby"])):Q("",!0),n.node.icon?(C(),T(Wt(n.node.icon),{key:1,class:N([i.value.treeNodeIcon])},null,8,["class"])):Q("",!0),Z(b(aD),{id:a.value},{default:P(()=>[Ne(oe(n.node.name),1)]),_:1},8,["id"])]),_:1},8,["disabled","aria-disabled","depth","aria-labelledby","class"])],2)]),_:1}),Z(b(tD),null,{default:P(()=>[(C(!0),H(Ce,null,Ge(n.node.children,(m,g)=>(C(),T(Pb,{key:m.id,node:m,indexPath:[...n.indexPath,g],treeView:n.treeView,selectedValue:n.selectedValue,selectionMode:n.selectionMode,onNodeSelect:p[1]||(p[1]=(v,f)=>o("node-select",v,f))},{default:P(()=>[L(u.$slots,"default")]),_:3},8,["node","indexPath","treeView","selectedValue","selectionMode"]))),128))]),_:3})]),_:3},8,["aria-level","aria-posinset","aria-setsize"])):(C(),T(b(rD),{key:1,depth:n.indexPath.length,disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,"aria-level":r.value,"aria-posinset":s.value,"aria-setsize":l.value,class:N([i.value.item]),onClick:c},{default:P(()=>{var m,g,v,f,y;return[n.selectionMode==="multiple"?(C(),T(b(Np),{key:0,checked:h.value,disabled:n.node.isDisabled,"aria-labelledby":a.value,onCheckedChange:p[2]||(p[2]=()=>o("node-select",n.node.id,!0))},null,8,["checked","disabled","aria-labelledby"])):Q("",!0),(m=n.node)!=null&&m.icon?(C(),T(b(sD),{key:1},{default:P(()=>[n.node.icon?(C(),T(Wt(n.node.icon),{key:0,class:N([i.value.treeNodeIcon])},null,8,["class"])):Q("",!0)]),_:1})):Q("",!0),Z(b(lD),{id:a.value},{default:P(()=>[Ne(oe(n.node.name),1)]),_:1},8,["id"]),(v=(g=n.node)==null?void 0:g.info)!=null&&v.isVisible?(C(),T(b(cD),{key:2,title:(y=(f=n.node)==null?void 0:f.info)==null?void 0:y.title},null,8,["title"])):Q("",!0)]}),_:1},8,["depth","disabled","aria-disabled","aria-level","aria-posinset","aria-setsize","class"]))]),_:3},8,["node","indexPath"]))}}),Bp={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},noSurrounding:{boxShadow:"none",border:"none",outline:"none"}},dD={default:{trigger:{boxShadow:"stroke-bordered-interactive",_focusVisible:{boxShadow:"state-focus-primary"}}},error:{trigger:{boxShadow:"state-error",_focusVisible:{boxShadow:"state-focus-critical"}}}},$e=ne({slots:[...rb.keys(),"pillWrapper","pill","iconButton","crossIcon","checkIcon","loadingContainer","errorContainer","errorIcon"],base:{root:{width:"100%",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontFamily:"sans",display:"flex",flexDirection:"column",gap:"8"},errorContainer:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",minHeight:"32",width:"100%",gap:"8",color:"text.error-default"},errorIcon:{width:"16",height:"16",color:"icon.error-default"},loadingContainer:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",minHeight:"32",width:"100%",gap:"4",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",color:"text.subtle"},pillWrapper:{display:"flex",flexWrap:"wrap",gap:"6",alignItems:"center",width:"100%"},pill:{display:"flex",alignItems:"center",justifyContent:"center",gap:"4",height:"24",paddingLeft:"8",borderRadius:"md",background:"background.gray-subtlest-default",boxShadow:"inner-highlighted-ring",fontSize:"sm",lineHeight:"lg",letterSpacing:"wider",color:"text.normal",fontFamily:"sans",fontWeight:"normal"},crossIcon:{width:"14",height:"14",color:"icon.muted"},checkIcon:{width:"14",height:"14",color:"icon.selected"},iconButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"16",height:"16",padding:"0",border:"none",outline:"none",boxShadow:"none",cursor:"pointer",color:"icon.muted",borderRadius:"sm",marginRight:"4",background:"background.gray-subtlest-default",_hover:{color:"icon.hovered",backgroundColor:"background.gray-subtler-hover"},_focusVisible:{boxShadow:"state-focus-primary"}},control:{borderRadius:"md",boxSizing:"border-box",backgroundColor:"background.gray-subtlest-default",cursor:"pointer",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",lineHeight:"lg",display:"flex",alignItems:"center",outline:"none","& :where(svg)":{width:"16",height:"16",color:"icon.muted"},'&[data-state="open"]':{boxShadow:"state-selected"}},trigger:{...Bp.noSurrounding,display:"flex",alignItems:"center",borderRadius:"md",justifyContent:"space-between",width:"100%",background:"background.gray-subtlest-default",cursor:"pointer",paddingY:"6",paddingX:"12",minHeight:"32",gap:"6","&[data-placeholder-shown]":{color:"text.subtle",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},"&[data-disabled]":{backgroundColor:"background.disabled",color:"text.disabled","&:hover":{backgroundColor:"background.disabled"},boxShadow:"none"},"&[data-disabled]:not([data-placeholder-shown])":{color:"text.subtle"},"&:not([data-disabled]):hover":{background:"background.gray-subtlest-hover"},'&[data-state="open"]':{boxShadow:"state-selected","& [data-chevron]":{transform:"rotate(180deg)"}}},valueText:{flex:"1",textAlign:"left",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",color:"text.subtle","&[data-placeholder]":{color:"text.subtle"}},indicator:{...Bp.flexCenter,color:"icon.muted",_disabled:{color:"icon.disabled"},"& [data-chevron]":{transition:"transform 0.2s ease",transform:"rotate(0deg)"}},item:{paddingY:"6",paddingX:"8",my:"4",borderRadius:"md",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",_hover:{backgroundColor:"background.hover"},_selected:{backgroundColor:"background.selected",color:"text.selected",fontWeight:"medium"},_disabled:{cursor:"not-allowed",color:"text.disabled",backgroundColor:"transparent",_hover:{backgroundColor:"transparent"}},_focus:{backgroundColor:"background.hover",boxShadow:"state-focus-primary"},_highlighted:{backgroundColor:"background.hover"},"&[data-highlighted]":{backgroundColor:"background.hover"},"&[data-focus]":{backgroundColor:"background.hover",boxShadow:"state-focus-primary"}},itemGroup:{paddingX:"4",paddingY:"2"},positioner:{marginTop:"-4",width:"100%",borderRadius:"md"},content:{width:"100%",color:"text.normal",boxShadow:"elevations-overlay",background:"elevation.surface-raised-default",borderRadius:"md",maxHeight:"300",overflowY:"auto",padding:"4",outline:"none",zIndex:"dropdown"},itemIndicator:{marginLeft:"auto",width:"14",height:"14",color:"icon.selected"},label:{color:"text.subtle",fontSize:"sm",fontWeight:"medium",lineHeight:"md",fontFamily:"sans"}},variants:{variant:dD,state:{idle:{},disabled:{control:{cursor:"not-allowed",backgroundColor:"background.disabled",color:"text.disabled",boxShadow:"none",_hover:{backgroundColor:"background.disabled"}}}},isMultiple:{true:{},false:{}}},defaultVariants:{variant:"default",state:"idle"}}),uD=["aria-label","onClick","onKeydown"],hD={key:1},pD=["aria-label"],ml=M({__name:"Select",props:{modelValue:{},variant:{default:"default"},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},errorMessage:{default:""},options:{default:()=>[]},placeholder:{default:"Select an option"},label:{default:""},multiple:{type:Boolean,default:!1},defaultOpen:{type:Boolean,default:!1},loopFocus:{type:Boolean,default:!0},composite:{type:Boolean,default:!0},typeahead:{type:Boolean,default:!0},isTree:{type:Boolean,default:!1},closeOnSelect:{type:Boolean},defaultHighlightedValue:{},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,o=t,i=Ct(n,o),a=w=>{const S=[],k=O=>{for(const _ of O)S.push(_),_.children&&k(_.children)};return k(w),S},r=A(()=>n.modelValue?n.isTree?a(n.options).filter(w=>n.modelValue.includes(w.value)):n.options.filter(w=>n.modelValue.includes(w.value)):[]),s=x_({items:n.options}),l=w=>({id:w.value,name:w.label,isDisabled:w.disabled,children:w.children?w.children.map(l):void 0}),c=A(()=>{if(!n.isTree)return null;const w=n.options.map(l);return mh({nodeToValue:S=>S.id,nodeToString:S=>S.name,rootNode:{id:"ROOT",name:"",children:w}})}),d=mh({nodeToValue:w=>w.id,nodeToString:w=>w.name,rootNode:{id:"ROOT",name:"",children:[]}}),h=Gv({collection:c.value||d}),u=A(()=>({root:$e({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).root,trigger:$e({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).trigger,content:$e().content,item:$e().item,itemGroup:$e().itemGroup,indicator:$e().indicator,positioner:$e().positioner,selectedIndicator:$e().itemIndicator,label:$e().label,control:$e({variant:n.variant,state:n.isDisabled?"disabled":"idle",isMultiple:n.multiple}).control,pillWrapper:$e().pillWrapper,pill:$e().pill,iconButton:$e().iconButton,crossIcon:$e().crossIcon,checkIcon:$e().checkIcon,loadingContainer:$e().loadingContainer,errorMessage:$e().errorMessage,errorContainer:$e().errorContainer,errorIcon:$e().errorIcon})),p=w=>{const S=(n.modelValue||[]).filter(k=>k!==w.value);o("update:modelValue",S)},m=(w,S)=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),p(S))},g=w=>{const S=[];if(w.children)for(const k of w.children)S.push(k.id),S.push(...g(k));return S},v=(w,S)=>{for(const k of w){if(k.id===S)return k;if(k.children){const O=v(k.children,S);if(O)return O}}return null},f=(w,S)=>{const k=g(w);return k.length===0?!1:k.every(O=>S.includes(O))},y=(w,S)=>{const k=g(w);if(k.length===0)return!1;const O=k.filter(_=>S.includes(_)).length;return O>0&&O<k.length},x=(w,S)=>{if(!n.multiple||!n.isTree||!c.value){if(n.multiple){const $=[...n.modelValue||[]],R=$.indexOf(w);R>-1?$.splice(R,1):$.push(w),o("update:modelValue",$)}else o("update:modelValue",[w]);return}const k=c.value.rootNode.children||[],O=v(k,w);if(!O)return;const _=[...n.modelValue||[]];if(_.includes(w)){const $=_.indexOf(w);$>-1&&_.splice($,1);const R=g(O);for(const q of R){const V=_.indexOf(q);V>-1&&_.splice(V,1)}}else{_.includes(w)||_.push(w);const $=g(O);for(const R of $)_.includes(R)||_.push(R)}const E=[..._],I=$=>{for(const R of $)if(R.children&&R.children.length>0){I(R.children);const q=f(R,E),V=y(R,E);if(q)E.includes(R.id)||E.push(R.id);else if(!V){const D=E.indexOf(R.id);D>-1&&E.splice(D,1)}}};I(k),o("update:modelValue",E)};return(w,S)=>(C(),T(b(tt).Root,W(b(i),{collection:b(s),class:u.value.root,disabled:n.isDisabled,defaultOpen:n.defaultOpen,loopFocus:n.loopFocus,composite:n.composite,typeahead:n.typeahead}),{default:P(()=>[n.label?(C(),T(b(tt).Label,{key:0,class:N(u.value.label),"data-testid":"select-label",id:"select-label"},{default:P(()=>[Ne(oe(n.label),1)]),_:1},8,["class"])):Q("",!0),Z(b(tt).Control,{class:N(u.value.control)},{default:P(()=>[Z(b(tt).Trigger,{class:N(u.value.trigger),"data-testid":"select-input","aria-labelledby":n.label?"select-label":void 0,"aria-expanded":n.defaultOpen,role:"combobox","aria-haspopup":n.isTree?"tree":"listbox","aria-invalid":n.variant==="error","aria-errormessage":n.errorMessage?"select-error":void 0},{default:P(()=>[n.multiple&&r.value.length?(C(),H("div",{key:0,class:N(u.value.pillWrapper)},[(C(!0),H(Ce,null,Ge(r.value,k=>(C(),H("div",{key:k.value,class:N(u.value.pill)},[z("span",null,oe(k.label),1),z("button",{type:"button",class:N(u.value.iconButton),"aria-label":"Remove "+k.label,onClick:us(O=>p(k),["stop"]),onKeydown:O=>m(O,k)},[Z(b(QV),{class:N(u.value.crossIcon)},null,8,["class"])],42,uD)],2))),128))],2)):n.isTree&&!n.multiple&&r.value.length?(C(),H("span",hD,oe(r.value[0].label),1)):(C(),T(b(tt).ValueText,{key:2,placeholder:e.placeholder},null,8,["placeholder"])),Z(b(tt).Indicator,{class:N(u.value.indicator)},{default:P(()=>[Z(b(h1),{"data-chevron":""})]),_:1},8,["class"])]),_:1},8,["class","aria-labelledby","aria-expanded","aria-haspopup","aria-invalid","aria-errormessage"])]),_:1},8,["class"]),Z(b(tt).Positioner,{class:N(u.value.positioner)},{default:P(()=>[Z(b(tt).Content,{class:N(u.value.content),role:n.isTree?void 0:"listbox"},{default:P(()=>[n.isLoading?(C(),H("div",{key:0,class:N(u.value.loadingContainer)},[L(w.$slots,"loading",{},()=>[Z(ym,{size:"sm"}),S[0]||(S[0]=z("span",null,"Loading...",-1))])],2)):n.variant==="error"&&n.errorMessage?(C(),H("div",{key:1,class:N(u.value.errorContainer),id:"select-error",role:"alert"},[L(w.$slots,"error-content",{},()=>[Z(b(dV),{class:N(u.value.errorIcon)},null,8,["class"]),z("span",null,oe(n.errorMessage),1)])],2)):n.isTree&&c.value?(C(),H("div",{key:2,class:N(u.value.itemGroup),role:"group","aria-label":n.label?`${n.label} tree options`:"Select options"},[Z(b(Uv),{collection:c.value},{default:P(()=>[Z(b(Yv),{"aria-label":n.label?`${n.label} tree`:"Options tree","aria-multiselectable":n.multiple},{default:P(()=>[(C(!0),H(Ce,null,Ge(c.value.rootNode.children,(k,O)=>(C(),T(Pb,{key:k.id,node:k,indexPath:[O],treeView:b(h),selectionMode:n.multiple?"multiple":"single",selectedValue:n.modelValue||[],onNodeSelect:x},null,8,["node","indexPath","treeView","selectionMode","selectedValue"]))),128))]),_:1},8,["aria-label","aria-multiselectable"])]),_:1},8,["collection"])],10,pD)):(C(),T(b(tt).ItemGroup,{key:3,class:N(u.value.itemGroup)},{default:P(()=>[(C(!0),H(Ce,null,Ge(n.options,k=>(C(),T(b(tt).Item,{key:k.value,item:k,class:N(u.value.item),disabled:k.disabled,"data-testid":"select-option-"+k.value,role:"option","aria-selected":(n.modelValue||[]).includes(k.value),"aria-disabled":k.disabled},{default:P(()=>[Z(b(tt).ItemText,null,{default:P(()=>[Ne(oe(k.label),1)]),_:2},1024),Z(b(tt).ItemIndicator,{class:N(u.value.selectedIndicator),"aria-hidden":"true"},{default:P(()=>[Z(b($b),{class:N(u.value.checkIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["item","class","disabled","data-testid","aria-selected","aria-disabled"]))),128))]),_:1},8,["class"]))]),_:3},8,["class","role"])]),_:3},8,["class"]),Z(b(tt).HiddenSelect)]),_:3},16,["collection","class","disabled","defaultOpen","loopFocus","composite","typeahead"]))}});ne({slots:db.keys(),base:{root:{},resizeTrigger:{position:"relative",outlineWidth:"0",padding:"0",border:"0",_focus:{backgroundColor:"border.brand"},_focusWithin:{backgroundColor:"border.brand"},_after:{content:'""',display:"block",position:"absolute",background:"transparent"}}},variants:{orientation:{horizontal:{root:{"& > button[data-part='resize-trigger']":{width:"2",_after:{width:"8",height:"100%",top:"0",left:"-3"}}}},vertical:{root:{"& > button[data-part='resize-trigger']":{height:"2",_after:{height:"8",width:"100%",left:"0",top:"-3"}}}}}},defaultVariants:{orientation:"horizontal"}});ne({slots:["root"],base:{root:{display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"md",flexShrink:"0",width:"10",height:"10",position:"relative","& .waiting-icon":{position:"absolute",top:"-4.5",left:"0",color:"icon.muted",width:"100%",height:"100%","& svg":{width:"100%",height:"100%"}}}},variants:{status:{queued:{root:{background:"icon.brand-default"}},processing:{root:{background:"icon.warning-default"}},error:{root:{background:"icon.error-default"}},ready:{root:{background:"icon.success-default"}},disabled:{root:{background:"icon.disabled"}},waiting:{root:{background:"transparent"}}}},defaultVariants:{status:"queued"}});ne({slots:["root","label"],base:{root:{display:"inline-flex",alignItems:"center",gap:"4"},label:{fontFamily:"sans",fontStyle:"normal",fontWeight:"normal",whiteSpace:"nowrap",fontSize:"13",lineHeight:"xl"}},variants:{status:{queued:{label:{color:"text.accent-blue-pressed"}},processing:{label:{color:"text.normal"}},error:{label:{color:"text.normal"}},ready:{label:{color:"text.normal"}},disabled:{label:{color:"text.normal"}},waiting:{label:{color:"text.normal"}}}},defaultVariants:{status:"queued"}});const qo={Default:"default",Alt:"alt"},Ko={Horizontal:"horizontal",Vertical:"vertical"},gD={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fD(e,t){return C(),H("svg",gD,[...t[0]||(t[0]=[z("circle",{cx:"12",cy:"11.9999",r:"10",fill:"#E6EDFE",style:{fill:"color(display-p3 0.9036 0.9299 0.9965)","fill-opacity":"1"}},null,-1),z("path",{d:"M16 9L10.5 14.5L8 12",stroke:"#3E63DD",style:{stroke:"color(display-p3 0.2435 0.3889 0.8665)","stroke-opacity":"1"},"stroke-width":"1.125","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const mD={render:fD},vD={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bD(e,t){return C(),H("svg",vD,[...t[0]||(t[0]=[z("circle",{cx:"10",cy:"9.99994",r:"7",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}},null,-1),z("path",{d:"M13.3332 7.5L8.74984 12.0833L6.6665 10",stroke:"#F9FAFA",style:{stroke:"color(display-p3 0.9765 0.9804 0.9804)","stroke-opacity":"1"},"stroke-width":"0.9375","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const yD={render:bD},xD={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wD(e,t){return C(),H("svg",xD,[...t[0]||(t[0]=[z("g",{id:"State=Upcoming, Size=Small"},[z("circle",{id:"Ellipse 22",cx:"9.99997",cy:"9.99995",r:"6.5",transform:"rotate(-15 9.99997 9.99995)",stroke:"#60646C",style:{stroke:"color(display-p3 0.3760 0.3920 0.4240)","stroke-opacity":"1"},"stroke-dasharray":"2 2"})],-1)])])}const CD={render:wD},_D={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SD(e,t){return C(),H("svg",_D,[...t[0]||(t[0]=[z("g",{id:"State=Ongoing, Size=Small"},[z("circle",{id:"Ellipse 21",cx:"9.99997",cy:"9.99994",r:"6.5",transform:"rotate(-15 9.99997 9.99994)",stroke:"#3A5CCC",style:{stroke:"color(display-p3 0.2276 0.3608 0.7984)","stroke-opacity":"1"},"stroke-dasharray":"2 2"}),z("path",{id:"Ellipse 22",d:"M10 16.9999C8.14348 16.9999 6.36301 16.2624 5.05025 14.9497C3.7375 13.6369 3 11.8565 3 9.99994C3 8.14342 3.7375 6.36295 5.05025 5.05019C6.36301 3.73744 8.14348 2.99994 10 2.99994L10 9.99994L10 16.9999Z",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}})],-1)])])}const kD={render:SD},Vb=ne({className:"stepper",slots:["list","root","item","trigger","triggerContent","itemTitle","itemDescription","altIndicator","altIndicatorText","indicator","triggerContainer","itemLine","itemLineContainer"],base:{root:{display:"flex",flexDirection:"column",gap:"8"},list:{listStyle:"none",padding:"0",margin:"0",display:"flex",flexDirection:{_horizontal:"row",_vertical:"column"},gap:{_horizontal:"8",_vertical:"6"},width:"full",flex:"1"},item:{display:"flex",flexDirection:"column",gap:"2",flex:"1"},trigger:{backgroundColor:"transparent",border:"none",padding:"0",margin:"0",cursor:"pointer",fontFamily:"sans",fontStyle:"normal",letterSpacing:"normal"},triggerContent:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2",flex:"1"},itemTitle:{fontSize:"base",fontWeight:"medium",color:"text.normal",lineHeight:"lg",textAlign:"left"},itemDescription:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"full",color:"text.subtle",fontSize:"sm",fontWeight:"regular",lineHeight:"md",textAlign:"left"},triggerContainer:{display:"flex",gap:{_horizontal:"8",_vertical:"16"}},indicator:{},altIndicator:{display:"flex",justifyContent:"center",alignItems:"center"}},defaultVariants:{type:"default"},variants:{type:{default:{indicator:{paddingLeft:"4"},itemLineContainer:{_horizontal:{width:"full",paddingBottom:"8",paddingTop:"12",paddingLeft:"4",paddingRight:"4"},_vertical:{width:"full",height:"full",display:"flex",justifyContent:"center"}},itemLine:{_horizontal:{height:"1",_current:{backgroundColor:"border.brand"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}},_vertical:{width:"1px",height:"calc(100% - 20px)",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}}}},alt:{itemLineContainer:{_horizontal:{width:"full",paddingBottom:"12",paddingTop:"12",paddingLeft:"8",display:"flex",alignItems:"center"},_vertical:{width:"full",height:"calc(100% - 20px)",_complete:{height:"calc(100% - 24px)"},display:"flex",justifyContent:"center"}},itemLine:{_horizontal:{width:"full",height:"0.5",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}},_vertical:{width:"1px",height:"full",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}}},altIndicator:{width:"lg",height:"lg",minWidth:"lg",_complete:{backgroundColor:"background.brand-pressed",color:"border.brand"},_current:{backgroundColor:"text.selected",color:"text.inverse"},_incomplete:{backgroundColor:"background.neutral-default",color:"text.subtle"},borderRadius:"full",fontVariantNumeric:"slashed-zero",fontFamily:"sans",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"md",letterSpacing:"tighter",marginBottom:"1"},indicator:{_horizontal:{display:"flex",justifyContent:"center",alignItems:"center",paddingRight:"1",_complete:{paddingRight:"0"}},_vertical:{flexDirection:"column",paddingLeft:"0.5",paddingRight:"0.5",_complete:{paddingBottom:"0",paddingRight:"0",paddingLeft:"0"}}},triggerContainer:{_horizontal:{alignItems:"center"}},item:{_last:{flex:"none"}},triggerContent:{_horizontal:{flex:"none",width:"auto"}}}}}}),ED=["data-orientation"],OD=["data-orientation"],$D=["data-orientation"],ID=["data-orientation"],TD=["data-orientation"],PD=["data-orientation"],VD=["data-orientation"],DD=["data-orientation"],MD=M({__name:"StepperItem",props:{item:{},index:{},orientation:{default:Ko.Horizontal},type:{default:qo.Default},modelValue:{default:1},items:{},steps:{}},setup(e){const t=e,n=A(()=>Vb({type:t.type})),o=A(()=>t.steps.value),i=A(()=>({"data-complete":o.value>t.index?!0:void 0,"data-current":o.value===t.index?!0:void 0,"data-incomplete":o.value<t.index?!0:void 0}));return(a,r)=>(C(),T(b(AT),{class:N(n.value.trigger)},{default:P(()=>[t.type===b(qo).Default&&t.orientation===b(Ko).Horizontal?(C(),H("div",{key:0,class:N(n.value.itemLineContainer),"data-orientation":t.orientation},[z("div",W({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,OD)],10,ED)):Q("",!0),z("div",{class:N(n.value.triggerContainer),"data-orientation":t.orientation},[Z(b(ST),{class:N(n.value.indicator),"data-orientation":t.orientation},{default:P(()=>[t.type===b(qo).Default?(C(),H(Ce,{key:0},[o.value===e.index?(C(),T(b(kD),{key:0})):o.value>e.index?(C(),T(b(yD),{key:1})):o.value<e.index?(C(),T(b(CD),{key:2})):Q("",!0)],64)):(C(),H(Ce,{key:1},[o.value>e.index?(C(),T(b(mD),{key:0})):(C(),H("div",W({key:1,class:n.value.altIndicator},i.value),[z("span",{class:N(n.value.altIndicatorText)},oe(e.index+1),3)],16))],64)),t.orientation===b(Ko).Vertical&&e.index!==t.items.length-1?(C(),H("div",W({key:2,class:n.value.itemLineContainer},i.value,{"data-orientation":t.orientation}),[z("div",W({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,TD)],16,ID)):Q("",!0)]),_:1},8,["class","data-orientation"]),z("div",{class:N(n.value.triggerContent),"data-orientation":t.orientation},[z("span",{class:N(n.value.itemTitle)},oe(e.item.title),3),t.type!==b(qo).Alt||t.orientation!==b(Ko).Horizontal?(C(),H("span",{key:0,class:N(n.value.itemDescription)},oe(e.item.description),3)):Q("",!0)],10,PD),t.type===b(qo).Alt&&t.orientation===b(Ko).Horizontal&&e.index!==t.items.length-1?(C(),H("div",{key:0,class:N(n.value.itemLineContainer),"data-orientation":t.orientation},[z("div",W({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,DD)],10,VD)):Q("",!0)],10,$D)]),_:1},8,["class"]))}}),RD=M({__name:"Stepper",props:{orientation:{default:Ko.Horizontal},type:{default:qo.Default},modelValue:{default:1},items:{}},emits:["stepChange"],setup(e,{emit:t}){const n=e,o=t,i=A(()=>Vb({type:n.type})),a=s=>s<1?0:s>n.items.length?n.items.length-1:s-1,r=FT({count:n.items.length,modelValue:a(n.modelValue)});return Me(()=>n.modelValue,s=>{r.value.setStep(a(s))}),Me(()=>r.value.value,s=>{o("stepChange",s+1)}),(s,l)=>(C(),T(b($T),{value:b(r)},{default:P(()=>[Z(b(OT),{class:N(i.value.list),"data-orientation":n.orientation},{default:P(()=>[(C(!0),H(Ce,null,Ge(n.items,(c,d)=>(C(),T(b(ET),{key:c.value,index:d,class:N(i.value.item),"data-testid":"stepper-item"},{default:P(()=>[Z(MD,W({item:c,index:d},{ref_for:!0},n,{steps:b(r)}),null,16,["item","index","steps"])]),_:2},1032,["index","class"]))),128))]),_:1},8,["class","data-orientation"])]),_:1},8,["value"]))}});ne({slots:["root","header","title","logContainer","logEntry","timestamp","logMessage","logLevel","emptyState","debug","info","warn","error","log","prompt","cursor","loadingSpinner","scrollButton"],base:{root:{display:"flex",flexDirection:"column",width:"100%",borderRadius:"md",background:"background.default",boxShadow:"stroke-container",overflowY:"auto",position:"relative"},logContainer:{display:"flex",flexDirection:"column",width:"100%",overflow:"auto",padding:"8",fontFamily:"mono",fontSize:"sm"},logEntry:{display:"flex",lineHeight:"sm",padding:"2 0",gap:"12"},timestamp:{color:"text.subtle",flexShrink:"0"},logMessage:{color:"text.subtle",wordBreak:"break-word"},logLevel:{lineHeight:"sm",fontWeight:"semibold",letterSpacing:"tight",width:"36"},emptyState:{display:"flex",alignItems:"center",justifyContent:"center",padding:"16",color:"text.muted"},prompt:{display:"flex",lineHeight:"sm",padding:"2 0",marginTop:"4",color:"text.success-default"},cursor:{display:"inline-block",width:"08",height:"16",marginLeft:"4",backgroundColor:"text.success-default",opacity:1,animation:"cursor-blink 1s step-end infinite"},loadingSpinner:{display:"flex",alignItems:"center",justifyContent:"center",padding:"2 0",marginTop:"4",color:"text.success-default"},debug:{color:"text.accent-purple-default"},info:{color:"text.information-default"},warn:{color:"text.warning-default"},error:{color:"text.error-default"},log:{color:"text.success-default"},scrollButton:{position:"absolute",bottom:"16",right:"16",zIndex:10,boxShadow:"stroke-container",borderRadius:"full"}}});ne({className:"tabItem",slots:["root","labelWrapper","icon","label","badge"],base:{root:{display:"inline-flex",p:"8",_hover:{"& .tabItem__labelWrapper":{backgroundColor:"background.brand-hover",borderRadius:"md"},"& .tabItem__label":{color:"text.selected"},"& .tabItem__icon":{color:"icon.selected"}}},labelWrapper:{display:"inline-flex",alignItems:"center",gap:"6",cursor:"pointer",userSelect:"none",color:"text.normal",px:"6",py:"2"},icon:{color:"icon.subtle"},label:{color:"text.muted",cursor:"pointer"},badge:{color:"text.subtle",borderRadius:"md",minWidth:"20"}},variants:{state:{default:{root:{borderBottom:"2px solid transparent"}},selected:{root:{color:"text.selected",borderBottomWidth:"2",borderBottomStyle:"solid",borderBottomColor:"border.selected",marginBottom:"-4"},icon:{color:"icon.selected"},label:{color:"text.selected"},labelWrapper:{backgroundColor:"background.brand-selected",borderRadius:"md"}},disabled:{root:{color:"text.disabled"},icon:{color:"icon.disabled"},label:{color:"text.disabled"}}}},defaultVariants:{state:"default"}});ne({className:"tabs",slots:pb.keys(),base:{root:{height:"100%"},list:{display:"flex"},trigger:{background:"none",border:"none",cursor:"pointer",_disabled:{cursor:"not-allowed",pointerEvents:"none"}},content:{padding:"12",height:"100%"}},variants:{bottomBorder:{true:{list:{borderBottom:"1px solid",borderBottomColor:"border.muted"}}},noContentPadding:{true:{content:{padding:"0"},list:{paddingLeft:"16"}}}}});ne({slots:["root","label","icon","avatar","dismissIcon"],base:{root:{display:"inline-flex",alignItems:"center",gap:"6",paddingLeft:"8",height:"xl",background:"background.gray-subtler-default",borderRadius:"md",boxShadow:"inner-highlighted-ring",_hover:{background:"background.gray-subtler-hover"},_disabled:{cursor:"not-allowed",color:"text.disabled",_hover:{background:"background.gray-subtler-default"}}},label:{fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"sm",letterSpacing:"wide",color:"text.normal"},icon:{display:"flex",alignItems:"center",justifyContent:"center",width:"md",height:"md",color:"icon.subtle"},avatar:{width:"md",height:"md",borderRadius:"md",overflow:"hidden",boxShadow:"stroke-container","& img":{width:"100%",height:"100%",objectFit:"cover"}},dismissIcon:{color:"icon.subtle",width:"3",height:"3"}},variants:{type:{default:{},icon:{root:{paddingLeft:"4"}},avatar:{root:{paddingLeft:"4"}}}},defaultVariants:{type:"default"}});To({base:{width:"100%",textAlign:"left",outline:"none",display:"flex",paddingY:"6",paddingX:"8",alignItems:"flex-start",justifyContent:"flex-start",gap:"6",flex:"1 0 0",alignSelf:"stretch",borderRadius:"md",background:"background.gray-subtlest-default",border:"none",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",fontFamily:"sans",fontSize:"base",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_hover:{backgroundColor:"background.gray-subtlest-hover"},_placeholder:{color:"text.placeholder"},_disabled:{backgroundColor:"background.disabled",color:"text.disabled",cursor:"not-allowed",_hover:{backgroundColor:"background.disabled"}},boxShadow:"stroke-bordered-interactive",_focus:{boxShadow:"state-focus-primary"}}});nt({position:"absolute",bottom:"1px",right:"3px",padding:"4px",pointerEvents:"none",color:"text.muted",textAlign:"right",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"sm",letterSpacing:"normal"});function La(e){return e+.5|0}const An=(e,t,n)=>Math.max(Math.min(e,n),t);function ta(e){return An(La(e*2.55),0,255)}function Bn(e){return An(La(e*255),0,255)}function on(e){return An(La(e/2.55)/100,0,1)}function zp(e){return An(La(e*100),0,100)}const mt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Qc=[..."0123456789ABCDEF"],FD=e=>Qc[e&15],AD=e=>Qc[(e&240)>>4]+Qc[e&15],pr=e=>(e&240)>>4===(e&15),LD=e=>pr(e.r)&&pr(e.g)&&pr(e.b)&&pr(e.a);function ND(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&mt[e[1]]*17,g:255&mt[e[2]]*17,b:255&mt[e[3]]*17,a:t===5?mt[e[4]]*17:255}:(t===7||t===9)&&(n={r:mt[e[1]]<<4|mt[e[2]],g:mt[e[3]]<<4|mt[e[4]],b:mt[e[5]]<<4|mt[e[6]],a:t===9?mt[e[7]]<<4|mt[e[8]]:255})),n}const BD=(e,t)=>e<255?t(e):"";function zD(e){var t=LD(e)?FD:AD;return e?"#"+t(e.r)+t(e.g)+t(e.b)+BD(e.a,t):void 0}const HD=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Db(e,t,n){const o=t*Math.min(n,1-n),i=(a,r=(a+e/30)%12)=>n-o*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function jD(e,t,n){const o=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[o(5),o(3),o(1)]}function WD(e,t,n){const o=Db(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)o[i]*=1-t-n,o[i]+=t;return o}function GD(e,t,n,o,i){return e===i?(t-n)/o+(t<n?6:0):t===i?(n-e)/o+2:(e-t)/o+4}function mu(e){const t=e.r/255,n=e.g/255,o=e.b/255,i=Math.max(t,n,o),a=Math.min(t,n,o),r=(i+a)/2;let s,l,c;return i!==a&&(c=i-a,l=r>.5?c/(2-i-a):c/(i+a),s=GD(t,n,o,c,i),s=s*60+.5),[s|0,l||0,r]}function vu(e,t,n,o){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,o)).map(Bn)}function bu(e,t,n){return vu(Db,e,t,n)}function UD(e,t,n){return vu(WD,e,t,n)}function YD(e,t,n){return vu(jD,e,t,n)}function Mb(e){return(e%360+360)%360}function qD(e){const t=HD.exec(e);let n=255,o;if(!t)return;t[5]!==o&&(n=t[6]?ta(+t[5]):Bn(+t[5]));const i=Mb(+t[2]),a=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?o=UD(i,a,r):t[1]==="hsv"?o=YD(i,a,r):o=bu(i,a,r),{r:o[0],g:o[1],b:o[2],a:n}}function KD(e,t){var n=mu(e);n[0]=Mb(n[0]+t),n=bu(n),e.r=n[0],e.g=n[1],e.b=n[2]}function XD(e){if(!e)return;const t=mu(e),n=t[0],o=zp(t[1]),i=zp(t[2]);return e.a<255?`hsla(${n}, ${o}%, ${i}%, ${on(e.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Hp={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},jp={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ZD(){const e={},t=Object.keys(jp),n=Object.keys(Hp);let o,i,a,r,s;for(o=0;o<t.length;o++){for(r=s=t[o],i=0;i<n.length;i++)a=n[i],s=s.replace(a,Hp[a]);a=parseInt(jp[r],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let gr;function JD(e){gr||(gr=ZD(),gr.transparent=[0,0,0,0]);const t=gr[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const QD=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function eM(e){const t=QD.exec(e);let n=255,o,i,a;if(t){if(t[7]!==o){const r=+t[7];n=t[8]?ta(r):An(r*255,0,255)}return o=+t[1],i=+t[3],a=+t[5],o=255&(t[2]?ta(o):An(o,0,255)),i=255&(t[4]?ta(i):An(i,0,255)),a=255&(t[6]?ta(a):An(a,0,255)),{r:o,g:i,b:a,a:n}}}function tM(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${on(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const tc=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,zo=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function nM(e,t,n){const o=zo(on(e.r)),i=zo(on(e.g)),a=zo(on(e.b));return{r:Bn(tc(o+n*(zo(on(t.r))-o))),g:Bn(tc(i+n*(zo(on(t.g))-i))),b:Bn(tc(a+n*(zo(on(t.b))-a))),a:e.a+n*(t.a-e.a)}}function fr(e,t,n){if(e){let o=mu(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=bu(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function Rb(e,t){return e&&Object.assign(t||{},e)}function Wp(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Bn(e[3]))):(t=Rb(e,{r:0,g:0,b:0,a:1}),t.a=Bn(t.a)),t}function oM(e){return e.charAt(0)==="r"?eM(e):qD(e)}let Fb=class ed{constructor(t){if(t instanceof ed)return t;const n=typeof t;let o;n==="object"?o=Wp(t):n==="string"&&(o=ND(t)||JD(t)||oM(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=Rb(this._rgb);return t&&(t.a=on(t.a)),t}set rgb(t){this._rgb=Wp(t)}rgbString(){return this._valid?tM(this._rgb):void 0}hexString(){return this._valid?zD(this._rgb):void 0}hslString(){return this._valid?XD(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,i=t.rgb;let a;const r=n===a?.5:n,s=2*r-1,l=o.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,o.r=255&c*o.r+a*i.r+.5,o.g=255&c*o.g+a*i.g+.5,o.b=255&c*o.b+a*i.b+.5,o.a=r*o.a+(1-r)*i.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=nM(this._rgb,t._rgb,n)),this}clone(){return new ed(this.rgb)}alpha(t){return this._rgb.a=Bn(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=La(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return fr(this._rgb,2,t),this}darken(t){return fr(this._rgb,2,-t),this}saturate(t){return fr(this._rgb,1,t),this}desaturate(t){return fr(this._rgb,1,-t),this}rotate(t){return KD(this._rgb,t),this}};function Jt(){}const iM=(()=>{let e=0;return()=>e++})();function pe(e){return e==null}function De(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function de(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function wt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Rt(e,t){return wt(e)?e:t}function ye(e,t){return typeof e>"u"?t:e}const aM=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Se(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function he(e,t,n,o){let i,a,r;if(De(e))for(a=e.length,i=0;i<a;i++)t.call(n,e[i],i);else if(de(e))for(r=Object.keys(e),a=r.length,i=0;i<a;i++)t.call(n,e[r[i]],r[i])}function Is(e,t){let n,o,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,o=e.length;n<o;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function Ts(e){if(De(e))return e.map(Ts);if(de(e)){const t=Object.create(null),n=Object.keys(e),o=n.length;let i=0;for(;i<o;++i)t[n[i]]=Ts(e[n[i]]);return t}return e}function Ab(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function rM(e,t,n,o){if(!Ab(e))return;const i=t[e],a=n[e];de(i)&&de(a)?wa(i,a,o):t[e]=Ts(a)}function wa(e,t,n){const o=De(t)?t:[t],i=o.length;if(!de(e))return e;n=n||{};const a=n.merger||rM;let r;for(let s=0;s<i;++s){if(r=o[s],!de(r))continue;const l=Object.keys(r);for(let c=0,d=l.length;c<d;++c)a(l[c],e,r,n)}return e}function la(e,t){return wa(e,t,{merger:sM})}function sM(e,t,n){if(!Ab(e))return;const o=t[e],i=n[e];de(o)&&de(i)?la(o,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Ts(i))}const Gp={"":e=>e,x:e=>e.x,y:e=>e.y};function lM(e){const t=e.split("."),n=[];let o="";for(const i of t)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function cM(e){const t=lM(e);return n=>{for(const o of t){if(o==="")break;n=n&&n[o]}return n}}function hi(e,t){return(Gp[t]||(Gp[t]=cM(t)))(e)}function yu(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ca=e=>typeof e<"u",Gn=e=>typeof e=="function",Up=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function dM(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Qe=Math.PI,wo=2*Qe,Ps=Number.POSITIVE_INFINITY,uM=Qe/180,$t=Qe/2,io=Qe/4,Yp=Qe*2/3,Lb=Math.log10,zn=Math.sign;function Xr(e,t,n){return Math.abs(e-t)<n}function qp(e){const t=Math.round(e);e=Xr(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Lb(e))),o=e/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function hM(e){const t=[],n=Math.sqrt(e);let o;for(o=1;o<n;o++)e%o===0&&(t.push(o),t.push(e/o));return n===(n|0)&&t.push(n),t.sort((i,a)=>i-a).pop(),t}function pM(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Vs(e){return!pM(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function gM(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function fM(e,t,n){let o,i,a;for(o=0,i=e.length;o<i;o++)a=e[o][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function vo(e){return e*(Qe/180)}function mM(e){return e*(180/Qe)}function Kp(e){if(!wt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function vM(e,t){const n=t.x-e.x,o=t.y-e.y,i=Math.sqrt(n*n+o*o);let a=Math.atan2(o,n);return a<-.5*Qe&&(a+=wo),{angle:a,distance:i}}function bM(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ao(e){return(e%wo+wo)%wo}function yM(e,t,n,o){const i=ao(e),a=ao(t),r=ao(n),s=ao(a-i),l=ao(r-i),c=ao(i-a),d=ao(i-r);return i===a||i===r||o||s>l&&c<d}function It(e,t,n){return Math.max(t,Math.min(n,e))}function xM(e){return It(e,-32768,32767)}function Xp(e,t,n,o=1e-6){return e>=Math.min(t,n)-o&&e<=Math.max(t,n)+o}function xu(e,t,n){n=n||(r=>e[r]<t);let o=e.length-1,i=0,a;for(;o-i>1;)a=i+o>>1,n(a)?i=a:o=a;return{lo:i,hi:o}}const td=(e,t,n,o)=>xu(e,n,o?i=>{const a=e[i][t];return a<n||a===n&&e[i+1][t]===n}:i=>e[i][t]<n),wM=(e,t,n)=>xu(e,n,o=>e[o][t]>=n);function CM(e,t,n){let o=0,i=e.length;for(;o<i&&e[o]<t;)o++;for(;i>o&&e[i-1]>n;)i--;return o>0||i<e.length?e.slice(o,i):e}const Nb=["push","pop","shift","splice","unshift"];function _M(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Nb.forEach(n=>{const o="_onData"+yu(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const r=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[o]=="function"&&s[o](...a)}),r}})})}function Zp(e,t){const n=e._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(t);i!==-1&&o.splice(i,1),!(o.length>0)&&(Nb.forEach(a=>{delete e[a]}),delete e._chartjs)}function Bb(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const zb=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Hb(e,t){let n=[],o=!1;return function(...i){n=i,o||(o=!0,zb.call(window,()=>{o=!1,e.apply(t,n)}))}}function SM(e,t){let n;return function(...o){return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}const kM=e=>e==="start"?"left":e==="end"?"right":"center",Jp=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,mr=e=>e===0||e===1,Qp=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*wo/n)),eg=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*wo/n)+1,ca={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*$t)+1,easeOutSine:e=>Math.sin(e*$t),easeInOutSine:e=>-.5*(Math.cos(Qe*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>mr(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>mr(e)?e:Qp(e,.075,.3),easeOutElastic:e=>mr(e)?e:eg(e,.075,.3),easeInOutElastic(e){return mr(e)?e:e<.5?.5*Qp(e*2,.1125,.45):.5+.5*eg(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ca.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?ca.easeInBounce(e*2)*.5:ca.easeOutBounce(e*2-1)*.5+.5};function jb(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function tg(e){return jb(e)?e:new Fb(e)}function nc(e){return jb(e)?e:new Fb(e).saturate(.5).darken(.1).hexString()}const EM=["x","y","borderWidth","radius","tension"],OM=["color","borderColor","backgroundColor"];function $M(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:OM},numbers:{type:"number",properties:EM}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function IM(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const ng=new Map;function TM(e,t){t=t||{};const n=e+JSON.stringify(t);let o=ng.get(n);return o||(o=new Intl.NumberFormat(e,t),ng.set(n,o)),o}function Wb(e,t,n){return TM(t,n).format(e)}const PM={values(e){return De(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const o=this.chart.options.locale;let i,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=VM(e,n)}const r=Lb(Math.abs(a)),s=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Wb(e,o,l)}};function VM(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Gb={formatters:PM};function DM(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gb.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Io=Object.create(null),nd=Object.create(null);function da(e,t){if(!t)return e;const n=t.split(".");for(let o=0,i=n.length;o<i;++o){const a=n[o];e=e[a]||(e[a]=Object.create(null))}return e}function oc(e,t,n){return typeof t=="string"?wa(da(e,t),n):wa(da(e,""),t)}let MM=class{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,i)=>nc(i.backgroundColor),this.hoverBorderColor=(o,i)=>nc(i.borderColor),this.hoverColor=(o,i)=>nc(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return oc(this,t,n)}get(t){return da(this,t)}describe(t,n){return oc(nd,t,n)}override(t,n){return oc(Io,t,n)}route(t,n,o,i){const a=da(this,t),r=da(this,o),s="_"+n;Object.defineProperties(a,{[s]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=r[i];return de(l)?Object.assign({},c,l):ye(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}};var Oe=new MM({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[$M,IM,DM]);function RM(e){return!e||pe(e.size)||pe(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function og(e,t,n,o,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>o&&(o=a),o}function ro(e,t,n){const o=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*o)/o+i}function ig(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function ag(e,t,n,o){FM(e,t,n,o)}function FM(e,t,n,o,i){let a,r,s,l,c,d,h,u;const p=t.pointStyle,m=t.rotation,g=t.radius;let v=(m||0)*uM;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,o),e.rotate(v),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(g)||g<=0)){switch(e.beginPath(),p){default:e.arc(n,o,g,0,wo),e.closePath();break;case"triangle":d=g,e.moveTo(n+Math.sin(v)*d,o-Math.cos(v)*g),v+=Yp,e.lineTo(n+Math.sin(v)*d,o-Math.cos(v)*g),v+=Yp,e.lineTo(n+Math.sin(v)*d,o-Math.cos(v)*g),e.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(v+io)*l,h=Math.cos(v+io)*l,s=Math.sin(v+io)*l,u=Math.sin(v+io)*l,e.arc(n-h,o-s,c,v-Qe,v-$t),e.arc(n+u,o-r,c,v-$t,v),e.arc(n+h,o+s,c,v,v+$t),e.arc(n-u,o+r,c,v+$t,v+Qe),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,d=l,e.rect(n-d,o-l,2*d,2*l);break}v+=io;case"rectRot":h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+u,o-r),e.lineTo(n+h,o+s),e.lineTo(n-u,o+r),e.closePath();break;case"crossRot":v+=io;case"cross":h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+h,o+s),e.moveTo(n+u,o-r),e.lineTo(n-u,o+r);break;case"star":h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+h,o+s),e.moveTo(n+u,o-r),e.lineTo(n-u,o+r),v+=io,h=Math.cos(v)*g,r=Math.cos(v)*g,s=Math.sin(v)*g,u=Math.sin(v)*g,e.moveTo(n-h,o-s),e.lineTo(n+h,o+s),e.moveTo(n+u,o-r),e.lineTo(n-u,o+r);break;case"line":r=Math.cos(v)*g,s=Math.sin(v)*g,e.moveTo(n-r,o-s),e.lineTo(n+r,o+s);break;case"dash":e.moveTo(n,o),e.lineTo(n+Math.cos(v)*g,o+Math.sin(v)*g);break;case!1:e.closePath();break}e.fill(),e.stroke()}}function Ub(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Yb(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function qb(e){e.restore()}function AM(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),pe(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function LM(e,t,n,o,i){if(i.strikethrough||i.underline){const a=e.measureText(o),r=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,d=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(r,d),e.lineTo(s,d),e.stroke()}}function NM(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function rg(e,t,n,o,i,a={}){const r=De(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,AM(e,a),l=0;l<r.length;++l)c=r[l],a.backdrop&&NM(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),pe(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,o,a.maxWidth)),e.fillText(c,n,o,a.maxWidth),LM(e,n,o,c,a),o+=Number(i.lineHeight);e.restore()}function od(e,t){const{x:n,y:o,w:i,h:a,radius:r}=t;e.arc(n+r.topLeft,o+r.topLeft,r.topLeft,1.5*Qe,Qe,!0),e.lineTo(n,o+a-r.bottomLeft),e.arc(n+r.bottomLeft,o+a-r.bottomLeft,r.bottomLeft,Qe,$t,!0),e.lineTo(n+i-r.bottomRight,o+a),e.arc(n+i-r.bottomRight,o+a-r.bottomRight,r.bottomRight,$t,0,!0),e.lineTo(n+i,o+r.topRight),e.arc(n+i-r.topRight,o+r.topRight,r.topRight,0,-$t,!0),e.lineTo(n+r.topLeft,o)}const BM=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,zM=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function HM(e,t){const n=(""+e).match(BM);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const jM=e=>+e||0;function Kb(e,t){const n={},o=de(t),i=o?Object.keys(t):t,a=de(e)?o?r=>ye(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of i)n[r]=jM(a(r));return n}function Xb(e){return Kb(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ua(e){return Kb(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Un(e){const t=Xb(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ht(e,t){e=e||{},t=t||Oe.font;let n=ye(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let o=ye(e.style,t.style);o&&!(""+o).match(zM)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:ye(e.family,t.family),lineHeight:HM(ye(e.lineHeight,t.lineHeight),n),size:n,style:o,weight:ye(e.weight,t.weight),string:""};return i.string=RM(i),i}function vr(e,t,n,o){let i,a,r;for(i=0,a=e.length;i<a;++i)if(r=e[i],r!==void 0&&r!==void 0)return r}function WM(e,t,n){const{min:o,max:i}=e,a=aM(t,(i-o)/2),r=(s,l)=>n&&s===0?0:s+l;return{min:r(o,-Math.abs(a)),max:r(i,a)}}function wi(e,t){return Object.assign(Object.create(e),t)}function wu(e,t=[""],n,o,i=()=>e[0]){const a=n||e;typeof o>"u"&&(o=ey("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:o,_getTarget:i,override:s=>wu([s,...e],t,a,o)};return new Proxy(r,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return Jb(s,l,()=>JM(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return lg(s).includes(l)},ownKeys(s){return lg(s)},set(s,l,c){const d=s._storage||(s._storage=i());return s[l]=d[l]=c,delete s._keys,!0}})}function pi(e,t,n,o){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Zb(e,o),setContext:a=>pi(e,a,n,o),override:a=>pi(e.override(a),t,n,o)};return new Proxy(i,{deleteProperty(a,r){return delete a[r],delete e[r],!0},get(a,r,s){return Jb(a,r,()=>UM(a,r,s))},getOwnPropertyDescriptor(a,r){return a._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(a,r,s){return e[r]=s,delete a[r],!0}})}function Zb(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:o=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:o,isScriptable:Gn(n)?n:()=>n,isIndexable:Gn(o)?o:()=>o}}const GM=(e,t)=>e?e+yu(t):t,Cu=(e,t)=>de(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Jb(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const o=n();return e[t]=o,o}function UM(e,t,n){const{_proxy:o,_context:i,_subProxy:a,_descriptors:r}=e;let s=o[t];return Gn(s)&&r.isScriptable(t)&&(s=YM(t,s,e,n)),De(s)&&s.length&&(s=qM(t,s,e,r.isIndexable)),Cu(t,s)&&(s=pi(s,i,a&&a[t],r)),s}function YM(e,t,n,o){const{_proxy:i,_context:a,_subProxy:r,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,r||o);return s.delete(e),Cu(e,l)&&(l=_u(i._scopes,i,e,l)),l}function qM(e,t,n,o){const{_proxy:i,_context:a,_subProxy:r,_descriptors:s}=n;if(typeof a.index<"u"&&o(e))return t[a.index%t.length];if(de(t[0])){const l=t,c=i._scopes.filter(d=>d!==l);t=[];for(const d of l){const h=_u(c,i,e,d);t.push(pi(h,a,r&&r[e],s))}}return t}function Qb(e,t,n){return Gn(e)?e(t,n):e}const KM=(e,t)=>e===!0?t:typeof e=="string"?hi(t,e):void 0;function XM(e,t,n,o,i){for(const a of t){const r=KM(n,a);if(r){e.add(r);const s=Qb(r._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==o)return s}else if(r===!1&&typeof o<"u"&&n!==o)return null}return!1}function _u(e,t,n,o){const i=t._rootScopes,a=Qb(t._fallback,n,o),r=[...e,...i],s=new Set;s.add(o);let l=sg(s,r,n,a||n,o);return l===null||typeof a<"u"&&a!==n&&(l=sg(s,r,a,l,o),l===null)?!1:wu(Array.from(s),[""],i,a,()=>ZM(t,n,o))}function sg(e,t,n,o,i){for(;n;)n=XM(e,t,n,o,i);return n}function ZM(e,t,n){const o=e._getTarget();t in o||(o[t]={});const i=o[t];return De(i)&&de(n)?n:i||{}}function JM(e,t,n,o){let i;for(const a of t)if(i=ey(GM(a,e),n),typeof i<"u")return Cu(e,i)?_u(n,o,e,i):i}function ey(e,t){for(const n of t){if(!n)continue;const o=n[e];if(typeof o<"u")return o}}function lg(e){let t=e._keys;return t||(t=e._keys=QM(e._scopes)),t}function QM(e){const t=new Set;for(const n of e)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(o);return Array.from(t)}function Su(){return typeof window<"u"&&typeof document<"u"}function ku(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ds(e,t,n){let o;return typeof e=="string"?(o=parseInt(e,10),e.indexOf("%")!==-1&&(o=o/100*t.parentNode[n])):o=e,o}const vl=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function e2(e,t){return vl(e).getPropertyValue(t)}const t2=["top","right","bottom","left"];function Co(e,t,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=t2[i];o[a]=parseFloat(e[t+"-"+a+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const n2=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function o2(e,t){const n=e.touches,o=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=o;let r=!1,s,l;if(n2(i,a,e.target))s=i,l=a;else{const c=t.getBoundingClientRect();s=o.clientX-c.left,l=o.clientY-c.top,r=!0}return{x:s,y:l,box:r}}function lo(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:o}=t,i=vl(n),a=i.boxSizing==="border-box",r=Co(i,"padding"),s=Co(i,"border","width"),{x:l,y:c,box:d}=o2(e,n),h=r.left+(d&&s.left),u=r.top+(d&&s.top);let{width:p,height:m}=t;return a&&(p-=r.width+s.width,m-=r.height+s.height),{x:Math.round((l-h)/p*n.width/o),y:Math.round((c-u)/m*n.height/o)}}function i2(e,t,n){let o,i;if(t===void 0||n===void 0){const a=e&&ku(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const r=a.getBoundingClientRect(),s=vl(a),l=Co(s,"border","width"),c=Co(s,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,o=Ds(s.maxWidth,a,"clientWidth"),i=Ds(s.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:o||Ps,maxHeight:i||Ps}}const Ln=e=>Math.round(e*10)/10;function a2(e,t,n,o){const i=vl(e),a=Co(i,"margin"),r=Ds(i.maxWidth,e,"clientWidth")||Ps,s=Ds(i.maxHeight,e,"clientHeight")||Ps,l=i2(e,t,n);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const h=Co(i,"border","width"),u=Co(i,"padding");c-=u.width+h.width,d-=u.height+h.height}return c=Math.max(0,c-a.width),d=Math.max(0,o?c/o:d-a.height),c=Ln(Math.min(c,r,l.maxWidth)),d=Ln(Math.min(d,s,l.maxHeight)),c&&!d&&(d=Ln(c/2)),(t!==void 0||n!==void 0)&&o&&l.height&&d>l.height&&(d=l.height,c=Ln(Math.floor(d*o))),{width:c,height:d}}function cg(e,t,n){const o=t||1,i=Ln(e.height*o),a=Ln(e.width*o);e.height=Ln(e.height),e.width=Ln(e.width);const r=e.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==o||r.height!==i||r.width!==a?(e.currentDevicePixelRatio=o,r.height=i,r.width=a,e.ctx.setTransform(o,0,0,o,0,0),!0):!1}const r2=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Su()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function dg(e,t){const n=e2(e,t),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}const s2=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},l2=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ic(e,t,n){return e?s2(t,n):l2()}function c2(e,t){let n,o;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=o)}function d2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function br(e,t,n){return e.options.clip?e[n]:t[n]}function u2(e,t){const{xScale:n,yScale:o}=e;return n&&o?{left:br(n,t,"left"),right:br(n,t,"right"),top:br(o,t,"top"),bottom:br(o,t,"bottom")}:t}function h2(e,t){const n=t._clip;if(n.disabled)return!1;const o=u2(t,e.chartArea);return{left:n.left===!1?0:o.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:o.right+(n.right===!0?0:n.right),top:n.top===!1?0:o.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:o.bottom+(n.bottom===!0?0:n.bottom)}}var p2=Object.defineProperty,g2=(e,t,n)=>t in e?p2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ce=(e,t,n)=>g2(e,typeof t!="symbol"?t+"":t,n);class f2{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,i){const a=n.listeners[i],r=n.duration;a.forEach(s=>s({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(o-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=zb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const a=o.items;let r=a.length-1,s=!1,l;for(;r>=0;--r)l=a[r],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(t),s=!0):(a[r]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,o,t,"progress")),a.length||(o.running=!1,this._notify(i,o,t,"complete"),o.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let o=n.get(t);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,o)),o}listen(t,n,o){this._getAnims(t).listeners[n].push(o)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Qt=new f2;const ug="transparent",m2={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=tg(e||ug),i=o.valid&&tg(t||ug);return i&&i.valid?i.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class v2{constructor(t,n,o,i){const a=n[o];i=vr([t.to,i,a,t.from]);const r=vr([t.from,a,i]);this._active=!0,this._fn=t.fn||m2[t.type||typeof r],this._easing=ca[t.easing]||ca.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=o,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],a=o-this._start,r=this._duration-a;this._start=o,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=vr([t.to,n,i,t.from]),this._from=vr([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,o=this._duration,i=this._prop,a=this._from,r=this._loop,s=this._to;let l;if(this._active=a!==s&&(r||n<o),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=a;return}l=n/o%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,o)=>{t.push({res:n,rej:o})})}_notify(t){const n=t?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class ty{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!de(t))return;const n=Object.keys(Oe.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!de(a))return;const r={};for(const s of n)r[s]=a[s];(De(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!o.has(s))&&o.set(s,r)})})}_animateOptions(t,n){const o=n.options,i=y2(t,o);if(!i)return[];const a=this._createAnimations(i,o);return o.$shared&&b2(t.options.$animations,o).then(()=>{t.options=o},()=>{}),a}_createAnimations(t,n){const o=this._properties,i=[],a=t.$animations||(t.$animations={}),r=Object.keys(n),s=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[c];let h=a[c];const u=o.get(c);if(h)if(u&&h.active()){h.update(u,d,s);continue}else h.cancel();if(!u||!u.duration){t[c]=d;continue}a[c]=h=new v2(u,t,c,d),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const o=this._createAnimations(t,n);if(o.length)return Qt.add(this._chart,o),!0}}function b2(e,t){const n=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const a=e[o[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function y2(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function hg(e,t){const n=e&&e.options||{},o=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:o?a:i,end:o?i:a}}function x2(e,t,n){if(n===!1)return!1;const o=hg(e,n),i=hg(t,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function w2(e){let t,n,o,i;return de(e)?(t=e.top,n=e.right,o=e.bottom,i=e.left):t=n=o=i=e,{top:t,right:n,bottom:o,left:i,disabled:e===!1}}function ny(e,t){const n=[],o=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=o.length;i<a;++i)n.push(o[i].index);return n}function pg(e,t,n,o={}){const i=e.keys,a=o.mode==="single";let r,s,l,c;if(t===null)return;let d=!1;for(r=0,s=i.length;r<s;++r){if(l=+i[r],l===n){if(d=!0,o.all)continue;break}c=e.values[l],wt(c)&&(a||t===0||zn(t)===zn(c))&&(t+=c)}return!d&&!o.all?0:t}function C2(e,t){const{iScale:n,vScale:o}=t,i=n.axis==="x"?"x":"y",a=o.axis==="x"?"x":"y",r=Object.keys(e),s=new Array(r.length);let l,c,d;for(l=0,c=r.length;l<c;++l)d=r[l],s[l]={[i]:d,[a]:e[d]};return s}function ac(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function _2(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function S2(e){const{min:t,max:n,minDefined:o,maxDefined:i}=e.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function k2(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function gg(e,t,n,o){for(const i of t.getMatchingVisibleMetas(o).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function fg(e,t){const{chart:n,_cachedMeta:o}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:r,index:s}=o,l=a.axis,c=r.axis,d=_2(a,r,o),h=t.length;let u;for(let p=0;p<h;++p){const m=t[p],{[l]:g,[c]:v}=m,f=m._stacks||(m._stacks={});u=f[c]=k2(i,d,g),u[s]=v,u._top=gg(u,r,!0,o.type),u._bottom=gg(u,r,!1,o.type);const y=u._visualValues||(u._visualValues={});y[s]=v}}function rc(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function E2(e,t){return wi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function O2(e,t,n){return wi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ji(e,t){const n=e.controller.index,o=e.vScale&&e.vScale.axis;if(o){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[o]===void 0||a[o][n]===void 0)return;delete a[o][n],a[o]._visualValues!==void 0&&a[o]._visualValues[n]!==void 0&&delete a[o]._visualValues[n]}}}const sc=e=>e==="reset"||e==="none",mg=(e,t)=>t?e:Object.assign({},e),$2=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ny(n,!0),values:null};class ha{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ac(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ji(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(h,u,p,m)=>h==="x"?u:h==="r"?m:p,a=n.xAxisID=ye(o.xAxisID,rc(t,"x")),r=n.yAxisID=ye(o.yAxisID,rc(t,"y")),s=n.rAxisID=ye(o.rAxisID,rc(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,a,r,s),d=n.vAxisID=i(l,r,a,s);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Zp(this._data,this),t._stacked&&ji(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(de(n)){const i=this._cachedMeta;this._data=C2(n,i)}else if(o!==n){if(o){Zp(o,this);const i=this._cachedMeta;ji(i),i._parsed=[]}n&&Object.isExtensible(n)&&_M(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=ac(n.vScale,n),n.stack!==o.stack&&(i=!0,ji(n),n.stack=o.stack),this._resyncElements(t),(i||a!==n._stacked)&&(fg(this,n._parsed),n._stacked=ac(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:o,_data:i}=this,{iScale:a,_stacked:r}=o,s=a.axis;let l=t===0&&n===i.length?!0:o._sorted,c=t>0&&o._parsed[t-1],d,h,u;if(this._parsing===!1)o._parsed=i,o._sorted=!0,u=i;else{De(i[t])?u=this.parseArrayData(o,i,t,n):de(i[t])?u=this.parseObjectData(o,i,t,n):u=this.parsePrimitiveData(o,i,t,n);const p=()=>h[s]===null||c&&h[s]<c[s];for(d=0;d<n;++d)o._parsed[d+t]=h=u[d],l&&(p()&&(l=!1),c=h);o._sorted=l}r&&fg(this,u)}parsePrimitiveData(t,n,o,i){const{iScale:a,vScale:r}=t,s=a.axis,l=r.axis,c=a.getLabels(),d=a===r,h=new Array(i);let u,p,m;for(u=0,p=i;u<p;++u)m=u+o,h[u]={[s]:d||a.parse(c[m],m),[l]:r.parse(n[m],m)};return h}parseArrayData(t,n,o,i){const{xScale:a,yScale:r}=t,s=new Array(i);let l,c,d,h;for(l=0,c=i;l<c;++l)d=l+o,h=n[d],s[l]={x:a.parse(h[0],d),y:r.parse(h[1],d)};return s}parseObjectData(t,n,o,i){const{xScale:a,yScale:r}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let d,h,u,p;for(d=0,h=i;d<h;++d)u=d+o,p=n[u],c[d]={x:a.parse(hi(p,s),u),y:r.parse(hi(p,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const i=this.chart,a=this._cachedMeta,r=n[t.axis],s={keys:ny(i,!0),values:n._stacks[t.axis]._visualValues};return pg(s,r,a.index,{mode:o})}updateRangeFromParsed(t,n,o,i){const a=o[n.axis];let r=a===null?NaN:a;const s=i&&o._stacks[n.axis];i&&s&&(i.values=s,r=pg(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const o=this._cachedMeta,i=o._parsed,a=o._sorted&&t===o.iScale,r=i.length,s=this._getOtherScale(t),l=$2(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:h}=S2(s);let u,p;function m(){p=i[u];const g=p[s.axis];return!wt(p[t.axis])||d>g||h<g}for(u=0;u<r&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),a));++u);if(a){for(u=r-1;u>=0;--u)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let i,a,r;for(i=0,a=n.length;i<a;++i)r=n[i][t.axis],wt(r)&&o.push(r);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=w2(ye(this.options.clip,x2(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],a=n.chartArea,r=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let d;for(o.dataset&&o.dataset.draw(t,a,s,l),d=s;d<s+l;++d){const h=i[d];h.hidden||(h.active&&c?r.push(h):h.draw(t,a))}for(d=0;d<r.length;++d)r[d].draw(t,a)}getStyle(t,n){const o=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,n,o){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];a=r.$context||(r.$context=O2(this.getContext(),t,r)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=E2(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=o,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",o){const i=n==="active",a=this._cachedDataOpts,r=t+"-"+n,s=a[r],l=this.enableOptionSharing&&Ca(o);if(s)return mg(s,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),d),p=Object.keys(Oe.elements[t]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(u,p,m,h);return g.$shared&&(g.$shared=l,a[r]=Object.freeze(mg(g,l))),g}_resolveAnimations(t,n,o){const i=this.chart,a=this._cachedDataOpts,r=`animation-${n}`,s=a[r];if(s)return s;let l;if(i.options.animation!==!1){const d=this.chart.config,h=d.datasetAnimationScopeKeys(this._type,n),u=d.getOptionScopes(this.getDataset(),h);l=d.createResolver(u,this.getContext(t,o,n))}const c=new ty(i,l&&l.animations);return l&&l._cacheable&&(a[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||sc(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(o),r=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,o),{sharedOptions:a,includeOptions:r}}updateElement(t,n,o,i){sc(i)?Object.assign(t,o):this._resolveAnimations(n,i).update(t,o)}updateSharedOptions(t,n,o){t&&!sc(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,n,o){this._setStyle(t,o,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,o=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=o.length,a=n.length,r=Math.min(a,i);r&&this.parse(0,r),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,o=!0){const i=this._cachedMeta,a=i.data,r=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=r;s--)c[s]=c[s-n]};for(l(a),s=t;s<r;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),o&&this.updateElements(a,t,n,"reset")}updateElements(t,n,o,i){}_removeElements(t,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(t,n);o._stacked&&ji(o,i)}o.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,o,i]=t;this[n](o,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ce(ha,"defaults",{}),ce(ha,"datasetElementType",null),ce(ha,"dataElementType",null);function I2(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let i=0,a=n.length;i<a;i++)o=o.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Bb(o.sort((i,a)=>i-a))}return e._cache.$bar}function T2(e){const t=e.iScale,n=I2(t,e.type);let o=t._length,i,a,r,s;const l=()=>{r===32767||r===-32768||(Ca(s)&&(o=Math.min(o,Math.abs(r-s)||o)),s=r)};for(i=0,a=n.length;i<a;++i)r=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)r=t.getPixelForTick(i),l();return o}function P2(e,t,n,o){const i=n.barThickness;let a,r;return pe(i)?(a=t.min*n.categoryPercentage,r=n.barPercentage):(a=i*o,r=1),{chunk:a/o,ratio:r,start:t.pixels[e]-a/2}}function V2(e,t,n,o){const i=t.pixels,a=i[e];let r=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;r===null&&(r=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-r);const c=a-(a-Math.min(r,s))/2*l;return{chunk:Math.abs(s-r)/2*l/o,ratio:n.barPercentage,start:c}}function D2(e,t,n,o){const i=n.parse(e[0],o),a=n.parse(e[1],o),r=Math.min(i,a),s=Math.max(i,a);let l=r,c=s;Math.abs(r)>Math.abs(s)&&(l=s,c=r),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:r,max:s}}function oy(e,t,n,o){return De(e)?D2(e,t,n,o):t[n.axis]=n.parse(e,o),t}function vg(e,t,n,o){const i=e.iScale,a=e.vScale,r=i.getLabels(),s=i===a,l=[];let c,d,h,u;for(c=n,d=n+o;c<d;++c)u=t[c],h={},h[i.axis]=s||i.parse(r[c],c),l.push(oy(u,h,a,c));return l}function lc(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function M2(e,t,n){return e!==0?zn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function R2(e){let t,n,o,i,a;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:o,reverse:t,top:i,bottom:a}}function F2(e,t,n,o){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:s,reverse:l,top:c,bottom:d}=R2(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=d:(a[bg(d,r,s,l)]=!0,i=c)),a[bg(i,r,s,l)]=!0,e.borderSkipped=a}function bg(e,t,n,o){return o?(e=A2(e,t,n),e=yg(e,n,t)):e=yg(e,t,n),e}function A2(e,t,n){return e===t?n:e===n?t:e}function yg(e,t,n){return e==="start"?t:e==="end"?n:e}function L2(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Zr extends ha{parsePrimitiveData(t,n,o,i){return vg(t,n,o,i)}parseArrayData(t,n,o,i){return vg(t,n,o,i)}parseObjectData(t,n,o,i){const{iScale:a,vScale:r}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?s:l,d=r.axis==="x"?s:l,h=[];let u,p,m,g;for(u=o,p=o+i;u<p;++u)g=n[u],m={},m[a.axis]=a.parse(hi(g,c),u),h.push(oy(hi(g,d),m,r,u));return h}updateRangeFromParsed(t,n,o,i){super.updateRangeFromParsed(t,n,o,i);const a=o._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:i}=n,a=this.getParsed(t),r=a._custom,s=lc(r)?"["+r.start+", "+r.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,o,i){const a=i==="reset",{index:r,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),d=this._getRuler(),{sharedOptions:h,includeOptions:u}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=a||pe(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,d),f=(m._stacks||{})[s.axis],y={horizontal:c,base:g.base,enableBorderRadius:!f||lc(m._custom)||r===f._top||r===f._bottom,x:c?g.head:v.center,y:c?v.center:g.head,height:c?v.size:Math.abs(g.size),width:c?Math.abs(g.size):v.size};u&&(y.options=h||this.resolveDataElementOptions(p,t[p].active?"active":i));const x=y.options||t[p].options;F2(y,x,f,r),L2(y,x,d.ratio),this.updateElement(t[p],p,y,i)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=o.options.stacked,r=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[o.axis],c=d=>{const h=d._parsed.find(p=>p[o.axis]===l),u=h&&h[d.vScale.axis];if(pe(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&c(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(o=>t[o].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)t[ye(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,o){const i=this._getStacks(t,o),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,i=[];let a,r;for(a=0,r=n.data.length;a<r;++a)i.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));const s=t.barThickness;return{min:s||T2(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:a,minBarLength:r}}=this,s=a||0,l=this.getParsed(t),c=l._custom,d=lc(c);let h=l[n.axis],u=0,p=o?this.applyStack(n,l,o):h,m,g;p!==h&&(u=p-h,p=h),d&&(h=c.barStart,p=c.barEnd-c.barStart,h!==0&&zn(h)!==zn(c.barEnd)&&(u=0),u+=h);const v=!pe(a)&&!d?a:u;let f=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(u+p):m=f,g=m-f,Math.abs(g)<r){g=M2(g,n,s)*r,h===s&&(f-=g/2);const y=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),w=Math.min(y,x),S=Math.max(y,x);f=Math.max(Math.min(f,S),w),m=f+g,o&&!d&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(f))}if(f===n.getPixelForValue(s)){const y=zn(g)*n.getLineWidthForValue(s)/2;f+=y,g-=y}return{size:g,base:f,head:m,center:m+g/2}}_calculateBarIndexPixels(t,n){const o=n.scale,i=this.options,a=i.skipNull,r=ye(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const d=a?this._getStackCount(t):n.stackCount,h=i.barThickness==="flex"?V2(t,n,i,d*c):P2(t,n,i,d*c),u=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(ye(u,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+p;s=h.start+h.chunk*m+h.chunk/2,l=Math.min(r,h.chunk*h.ratio)}else s=o.getPixelForValue(this.getParsed(t)[o.axis],t),l=Math.min(r,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,o=t.data,i=o.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!o[a].hidden&&o[a].draw(this._ctx)}}ce(Zr,"id","bar"),ce(Zr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ce(Zr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function so(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Eu{constructor(t){ce(this,"options"),this.options=t||{}}static override(t){Object.assign(Eu.prototype,t)}init(){}formats(){return so()}parse(){return so()}format(){return so()}add(){return so()}diff(){return so()}startOf(){return so()}endOf(){return so()}}var iy={_date:Eu};function N2(e,t,n,o){const{controller:i,data:a,_sorted:r}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&r&&a.length){const c=s._reversePixels?wM:td;if(o){if(i._sharedOptions){const d=a[0],h=typeof d.getRange=="function"&&d.getRange(t);if(h){const u=c(a,t,n-h),p=c(a,t,n+h);return{lo:u.lo,hi:p.hi}}}}else{const d=c(a,t,n);if(l){const{vScale:h}=i._cachedMeta,{_parsed:u}=e,p=u.slice(0,d.lo+1).reverse().findIndex(g=>!pe(g[h.axis]));d.lo-=Math.max(0,p);const m=u.slice(d.hi).findIndex(g=>!pe(g[h.axis]));d.hi+=Math.max(0,m)}return d}}return{lo:0,hi:a.length-1}}function bl(e,t,n,o,i){const a=e.getSortedVisibleDatasetMetas(),r=n[t];for(let s=0,l=a.length;s<l;++s){const{index:c,data:d}=a[s],{lo:h,hi:u}=N2(a[s],t,r,i);for(let p=h;p<=u;++p){const m=d[p];m.skip||o(m,c,p)}}}function B2(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(o,i){const a=t?Math.abs(o.x-i.x):0,r=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function cc(e,t,n,o,i){const a=[];return!i&&!e.isPointInArea(t)||bl(e,n,t,function(r,s,l){!i&&!Ub(r,e.chartArea,0)||r.inRange(t.x,t.y,o)&&a.push({element:r,datasetIndex:s,index:l})},!0),a}function z2(e,t,n,o){let i=[];function a(r,s,l){const{startAngle:c,endAngle:d}=r.getProps(["startAngle","endAngle"],o),{angle:h}=vM(r,{x:t.x,y:t.y});yM(h,c,d)&&i.push({element:r,datasetIndex:s,index:l})}return bl(e,n,t,a),i}function H2(e,t,n,o,i,a){let r=[];const s=B2(n);let l=Number.POSITIVE_INFINITY;function c(d,h,u){const p=d.inRange(t.x,t.y,i);if(o&&!p)return;const m=d.getCenterPoint(i);if(!(a||e.isPointInArea(m))&&!p)return;const g=s(t,m);g<l?(r=[{element:d,datasetIndex:h,index:u}],l=g):g===l&&r.push({element:d,datasetIndex:h,index:u})}return bl(e,n,t,c),r}function dc(e,t,n,o,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!o?z2(e,t,n,i):H2(e,t,n,o,i,a)}function xg(e,t,n,o,i){const a=[],r=n==="x"?"inXRange":"inYRange";let s=!1;return bl(e,n,t,(l,c,d)=>{l[r]&&l[r](t[n],i)&&(a.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(t.x,t.y,i))}),o&&!s?[]:a}var j2={modes:{index(e,t,n,o){const i=lo(t,e),a=n.axis||"x",r=n.includeInvisible||!1,s=n.intersect?cc(e,i,a,o,r):dc(e,i,a,!1,o,r),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=s[0].index,h=c.data[d];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,o){const i=lo(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;let s=n.intersect?cc(e,i,a,o,r):dc(e,i,a,!1,o,r);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let d=0;d<c.length;++d)s.push({element:c[d],datasetIndex:l,index:d})}return s},point(e,t,n,o){const i=lo(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;return cc(e,i,a,o,r)},nearest(e,t,n,o){const i=lo(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;return dc(e,i,a,n.intersect,o,r)},x(e,t,n,o){const i=lo(t,e);return xg(e,i,"x",n.intersect,o)},y(e,t,n,o){const i=lo(t,e);return xg(e,i,"y",n.intersect,o)}}};const ay=["left","top","right","bottom"];function Wi(e,t){return e.filter(n=>n.pos===t)}function wg(e,t){return e.filter(n=>ay.indexOf(n.pos)===-1&&n.box.axis===t)}function Gi(e,t){return e.sort((n,o)=>{const i=t?o:n,a=t?n:o;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function W2(e){const t=[];let n,o,i,a,r,s;for(n=0,o=(e||[]).length;n<o;++n)i=e[n],{position:a,options:{stack:r,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:r&&a+r,stackWeight:s});return t}function G2(e){const t={};for(const n of e){const{stack:o,pos:i,stackWeight:a}=n;if(!o||!ay.includes(i))continue;const r=t[o]||(t[o]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=a}return t}function U2(e,t){const n=G2(e),{vBoxMaxWidth:o,hBoxMaxHeight:i}=t;let a,r,s;for(a=0,r=e.length;a<r;++a){s=e[a];const{fullSize:l}=s.box,c=n[s.stack],d=c&&s.stackWeight/c.weight;s.horizontal?(s.width=d?d*o:l&&t.availableWidth,s.height=i):(s.width=o,s.height=d?d*i:l&&t.availableHeight)}return n}function Y2(e){const t=W2(e),n=Gi(t.filter(c=>c.box.fullSize),!0),o=Gi(Wi(t,"left"),!0),i=Gi(Wi(t,"right")),a=Gi(Wi(t,"top"),!0),r=Gi(Wi(t,"bottom")),s=wg(t,"x"),l=wg(t,"y");return{fullSize:n,leftAndTop:o.concat(a),rightAndBottom:i.concat(l).concat(r).concat(s),chartArea:Wi(t,"chartArea"),vertical:o.concat(i).concat(l),horizontal:a.concat(r).concat(s)}}function Cg(e,t,n,o){return Math.max(e[n],t[n])+Math.max(e[o],t[o])}function ry(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function q2(e,t,n,o){const{pos:i,box:a}=n,r=e.maxPadding;if(!de(i)){n.size&&(e[i]-=n.size);const h=o[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?a.height:a.width),n.size=h.size/h.count,e[i]+=n.size}a.getPadding&&ry(r,a.getPadding());const s=Math.max(0,t.outerWidth-Cg(r,e,"left","right")),l=Math.max(0,t.outerHeight-Cg(r,e,"top","bottom")),c=s!==e.w,d=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function K2(e){const t=e.maxPadding;function n(o){const i=Math.max(t[o]-e[o],0);return e[o]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function X2(e,t){const n=t.maxPadding;function o(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{a[r]=Math.max(t[r],n[r])}),a}return o(e?["left","right"]:["top","bottom"])}function na(e,t,n,o){const i=[];let a,r,s,l,c,d;for(a=0,r=e.length,c=0;a<r;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,X2(s.horizontal,t));const{same:h,other:u}=q2(t,n,s,o);c|=h&&i.length,d=d||u,l.fullSize||i.push(s)}return c&&na(i,t,n,o)||d}function yr(e,t,n,o,i){e.top=n,e.left=t,e.right=t+o,e.bottom=n+i,e.width=o,e.height=i}function _g(e,t,n,o){const i=n.padding;let{x:a,y:r}=t;for(const s of e){const l=s.box,c=o[s.stack]||{placed:0,weight:1},d=s.stackWeight/c.weight||1;if(s.horizontal){const h=t.w*d,u=c.size||l.height;Ca(c.start)&&(r=c.start),l.fullSize?yr(l,i.left,r,n.outerWidth-i.right-i.left,u):yr(l,t.left+c.placed,r,h,u),c.start=r,c.placed+=h,r=l.bottom}else{const h=t.h*d,u=c.size||l.width;Ca(c.start)&&(a=c.start),l.fullSize?yr(l,a,i.top,u,n.outerHeight-i.bottom-i.top):yr(l,a,t.top+c.placed,u,h),c.start=a,c.placed+=h,a=l.right}}t.x=a,t.y=r}var xr={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,o){if(!e)return;const i=Un(e.options.layout.padding),a=Math.max(t-i.width,0),r=Math.max(n-i.height,0),s=Y2(e.boxes),l=s.vertical,c=s.horizontal;he(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const d=l.reduce((g,v)=>v.box.options&&v.box.options.display===!1?g:g+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/d,hBoxMaxHeight:r/2}),u=Object.assign({},i);ry(u,Un(o));const p=Object.assign({maxPadding:u,w:a,h:r,x:i.left,y:i.top},i),m=U2(l.concat(c),h);na(s.fullSize,p,h,m),na(l,p,h,m),na(c,p,h,m)&&na(l,p,h,m),K2(p),_g(s.leftAndTop,p,h,m),p.x+=p.w,p.y+=p.h,_g(s.rightAndBottom,p,h,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},he(s.chartArea,g=>{const v=g.box;Object.assign(v,e.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class sy{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,o){}removeEventListener(t,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,o,i){return n=Math.max(0,n||t.width),o=o||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(t){return!0}updateConfig(t){}}class Z2 extends sy{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Jr="$chartjs",J2={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Sg=e=>e===null||e==="";function Q2(e,t){const n=e.style,o=e.getAttribute("height"),i=e.getAttribute("width");if(e[Jr]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Sg(i)){const a=dg(e,"width");a!==void 0&&(e.width=a)}if(Sg(o))if(e.style.height==="")e.height=e.width/(t||2);else{const a=dg(e,"height");a!==void 0&&(e.height=a)}return e}const ly=r2?{passive:!0}:!1;function eR(e,t,n){e&&e.addEventListener(t,n,ly)}function tR(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,ly)}function nR(e,t){const n=J2[e.type]||e.type,{x:o,y:i}=lo(e,t);return{type:n,chart:t,native:e,x:o!==void 0?o:null,y:i!==void 0?i:null}}function Ms(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function oR(e,t,n){const o=e.canvas,i=new MutationObserver(a=>{let r=!1;for(const s of a)r=r||Ms(s.addedNodes,o),r=r&&!Ms(s.removedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function iR(e,t,n){const o=e.canvas,i=new MutationObserver(a=>{let r=!1;for(const s of a)r=r||Ms(s.removedNodes,o),r=r&&!Ms(s.addedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const _a=new Map;let kg=0;function cy(){const e=window.devicePixelRatio;e!==kg&&(kg=e,_a.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function aR(e,t){_a.size||window.addEventListener("resize",cy),_a.set(e,t)}function rR(e){_a.delete(e),_a.size||window.removeEventListener("resize",cy)}function sR(e,t,n){const o=e.canvas,i=o&&ku(o);if(!i)return;const a=Hb((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),r=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||a(c,d)});return r.observe(i),aR(e,a),r}function uc(e,t,n){n&&n.disconnect(),t==="resize"&&rR(e)}function lR(e,t,n){const o=e.canvas,i=Hb(a=>{e.ctx!==null&&n(nR(a,e))},e);return eR(o,t,i),i}class cR extends sy{acquireContext(t,n){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(Q2(t,n),o):null}releaseContext(t){const n=t.canvas;if(!n[Jr])return!1;const o=n[Jr].initial;["height","width"].forEach(a=>{const r=o[a];pe(r)?n.removeAttribute(a):n.setAttribute(a,r)});const i=o.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[Jr],!0}addEventListener(t,n,o){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:oR,detach:iR,resize:sR}[n]||lR;i[n]=a(t,n,o)}removeEventListener(t,n){const o=t.$proxies||(t.$proxies={}),i=o[n];i&&(({attach:uc,detach:uc,resize:uc}[n]||tR)(t,n,i),o[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,o,i){return a2(t,n,o,i)}isAttached(t){const n=t&&ku(t);return!!(n&&n.isConnected)}}function dR(e){return!Su()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Z2:cR}class gi{constructor(){ce(this,"x"),ce(this,"y"),ce(this,"active",!1),ce(this,"options"),ce(this,"$animations")}tooltipPosition(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}hasValue(){return Vs(this.x)&&Vs(this.y)}getProps(t,n){const o=this.$animations;if(!n||!o)return this;const i={};return t.forEach(a=>{i[a]=o[a]&&o[a].active()?o[a]._to:this[a]}),i}}ce(gi,"defaults",{}),ce(gi,"defaultRoutes");function uR(e,t){const n=e.options.ticks,o=hR(e),i=Math.min(n.maxTicksLimit||o,o),a=n.major.enabled?gR(t):[],r=a.length,s=a[0],l=a[r-1],c=[];if(r>i)return fR(t,c,a,r/i),c;const d=pR(a,t,i);if(r>0){let h,u;const p=r>1?Math.round((l-s)/(r-1)):null;for(wr(t,c,d,pe(p)?0:s-p,s),h=0,u=r-1;h<u;h++)wr(t,c,d,a[h],a[h+1]);return wr(t,c,d,l,pe(p)?t.length:l+p),c}return wr(t,c,d),c}function hR(e){const t=e.options.offset,n=e._tickSize(),o=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(o,i))}function pR(e,t,n){const o=mR(e),i=t.length/n;if(!o)return Math.max(i,1);const a=hM(o);for(let r=0,s=a.length-1;r<s;r++){const l=a[r];if(l>i)return l}return Math.max(i,1)}function gR(e){const t=[];let n,o;for(n=0,o=e.length;n<o;n++)e[n].major&&t.push(n);return t}function fR(e,t,n,o){let i=0,a=n[0],r;for(o=Math.ceil(o),r=0;r<e.length;r++)r===a&&(t.push(e[r]),i++,a=n[i*o])}function wr(e,t,n,o,i){const a=ye(o,0),r=Math.min(ye(i,e.length),e.length);let s=0,l,c,d;for(n=Math.ceil(n),i&&(l=i-o,n=l/Math.floor(l/n)),d=a;d<0;)s++,d=Math.round(a+s*n);for(c=Math.max(a,0);c<r;c++)c===d&&(t.push(e[c]),s++,d=Math.round(a+s*n))}function mR(e){const t=e.length;let n,o;if(t<2)return!1;for(o=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==o)return!1;return o}const vR=e=>e==="left"?"right":e==="right"?"left":e,Eg=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Og=(e,t)=>Math.min(t||e,e);function $g(e,t){const n=[],o=e.length/t,i=e.length;let a=0;for(;a<i;a+=o)n.push(e[Math.floor(a)]);return n}function bR(e,t,n){const o=e.ticks.length,i=Math.min(t,o-1),a=e._startPixel,r=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(l-a,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-s||l>r+s)))return l}function yR(e,t){he(e,n=>{const o=n.gc,i=o.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[o[a]];o.splice(0,i)}})}function Ui(e){return e.drawTicks?e.tickLength:0}function Ig(e,t){if(!e.display)return 0;const n=Ht(e.font,t),o=Un(e.padding);return(De(e.text)?e.text.length:1)*n.lineHeight+o.height}function xR(e,t){return wi(e,{scale:t,type:"scale"})}function wR(e,t,n){return wi(e,{tick:n,index:t,type:"tick"})}function CR(e,t,n){let o=kM(e);return(n&&t!=="right"||!n&&t==="right")&&(o=vR(o)),o}function _R(e,t,n,o){const{top:i,left:a,bottom:r,right:s,chart:l}=e,{chartArea:c,scales:d}=l;let h=0,u,p,m;const g=r-i,v=s-a;if(e.isHorizontal()){if(p=Jp(o,a,s),de(n)){const f=Object.keys(n)[0],y=n[f];m=d[f].getPixelForValue(y)+g-t}else n==="center"?m=(c.bottom+c.top)/2+g-t:m=Eg(e,n,t);u=s-a}else{if(de(n)){const f=Object.keys(n)[0],y=n[f];p=d[f].getPixelForValue(y)-v+t}else n==="center"?p=(c.left+c.right)/2-v+t:p=Eg(e,n,t);m=Jp(o,r,i),h=n==="left"?-$t:$t}return{titleX:p,titleY:m,maxWidth:u,rotation:h}}class Ci extends gi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return t=Rt(t,Number.POSITIVE_INFINITY),n=Rt(n,Number.NEGATIVE_INFINITY),o=Rt(o,Number.POSITIVE_INFINITY),i=Rt(i,Number.NEGATIVE_INFINITY),{min:Rt(t,o),max:Rt(n,i),minDefined:wt(t),maxDefined:wt(n)}}getMinMax(t){let{min:n,max:o,minDefined:i,maxDefined:a}=this.getUserBounds(),r;if(i&&a)return{min:n,max:o};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)r=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,r.min)),a||(o=Math.max(o,r.max));return n=a&&n>o?o:n,o=i&&n>o?n:o,{min:Rt(n,Rt(o,n)),max:Rt(o,Rt(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Se(this.options.beforeUpdate,[this])}update(t,n,o){const{beginAtZero:i,grace:a,ticks:r}=this.options,s=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=WM(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?$g(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=uR(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,t=!t),this._startPixel=n,this._endPixel=o,this._reversePixels=t,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Se(this.options.afterUpdate,[this])}beforeSetDimensions(){Se(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Se(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Se(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Se(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let o,i,a;for(o=0,i=t.length;o<i;o++)a=t[o],a.label=Se(n.callback,[a.value,o,t],this)}afterTickToLabelConversion(){Se(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Se(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,o=Og(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let r=i,s,l,c;if(!this._isVisible()||!n.display||i>=a||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),h=d.widest.width,u=d.highest.height,p=It(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/o:p/(o-1),h+6>s&&(s=p/(o-(t.offset?.5:1)),l=this.maxHeight-Ui(t.grid)-n.padding-Ig(t.title,this.chart.options.font),c=Math.sqrt(h*h+u*u),r=mM(Math.min(Math.asin(It((d.highest.height+6)/s,-1,1)),Math.asin(It(l/c,-1,1))-Math.asin(It(u/c,-1,1)))),r=Math.max(i,Math.min(a,r))),this.labelRotation=r}afterCalculateLabelRotation(){Se(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Se(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:a}}=this,r=this._isVisible(),s=this.isHorizontal();if(r){const l=Ig(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Ui(a)+l):(t.height=this.maxHeight,t.width=Ui(a)+l),o.display&&this.ticks.length){const{first:c,last:d,widest:h,highest:u}=this._getLabelSizes(),p=o.padding*2,m=vo(this.labelRotation),g=Math.cos(m),v=Math.sin(m);if(s){const f=o.mirror?0:v*h.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+f+p)}else{const f=o.mirror?0:g*h.width+v*u.height;t.width=Math.min(this.maxWidth,t.width+f+p)}this._calculatePadding(c,d,v,g)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,o,i){const{ticks:{align:a,padding:r},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,p=0;l?c?(u=i*t.width,p=o*n.height):(u=o*t.height,p=i*n.width):a==="start"?p=n.width:a==="end"?u=t.width:a!=="inner"&&(u=t.width/2,p=n.width/2),this.paddingLeft=Math.max((u-d+r)*this.width/(this.width-d),0),this.paddingRight=Math.max((p-h+r)*this.width/(this.width-h),0)}else{let d=n.height/2,h=t.height/2;a==="start"?(d=0,h=t.height):a==="end"&&(d=n.height,h=0),this.paddingTop=d+r,this.paddingBottom=h+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Se(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,o;for(n=0,o=t.length;n<o;n++)pe(t[n].label)&&(t.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=$g(o,n)),this._labelSizes=t=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,o){const{ctx:i,_longestTextCache:a}=this,r=[],s=[],l=Math.floor(n/Og(n,o));let c=0,d=0,h,u,p,m,g,v,f,y,x,w,S;for(h=0;h<n;h+=l){if(m=t[h].label,g=this._resolveTickFontOptions(h),i.font=v=g.string,f=a[v]=a[v]||{data:{},gc:[]},y=g.lineHeight,x=w=0,!pe(m)&&!De(m))x=og(i,f.data,f.gc,x,m),w=y;else if(De(m))for(u=0,p=m.length;u<p;++u)S=m[u],!pe(S)&&!De(S)&&(x=og(i,f.data,f.gc,x,S),w+=y);r.push(x),s.push(w),c=Math.max(x,c),d=Math.max(w,d)}yR(a,n);const k=r.indexOf(c),O=s.indexOf(d),_=E=>({width:r[E]||0,height:s[E]||0});return{first:_(0),last:_(n-1),widest:_(k),highest:_(O),widths:r,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return xM(this._alignToPixels?ro(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const o=n[t];return o.$context||(o.$context=wR(this.getContext(),t,o))}return this.$context||(this.$context=xR(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=vo(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,s=a?a.widest.width+r:0,l=a?a.highest.height+r:0;return this.isHorizontal()?l*o>s*i?s/o:l/i:l*i<s*o?l/o:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,o=this.chart,i=this.options,{grid:a,position:r,border:s}=i,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Ui(a),u=[],p=s.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,v=function(D){return ro(o,D,m)};let f,y,x,w,S,k,O,_,E,I,$,R;if(r==="top")f=v(this.bottom),k=this.bottom-h,_=f-g,I=v(t.top)+g,R=t.bottom;else if(r==="bottom")f=v(this.top),I=t.top,R=v(t.bottom)-g,k=f+g,_=this.top+h;else if(r==="left")f=v(this.right),S=this.right-h,O=f-g,E=v(t.left)+g,$=t.right;else if(r==="right")f=v(this.left),E=t.left,$=v(t.right)-g,S=f+g,O=this.left+h;else if(n==="x"){if(r==="center")f=v((t.top+t.bottom)/2+.5);else if(de(r)){const D=Object.keys(r)[0],F=r[D];f=v(this.chart.scales[D].getPixelForValue(F))}I=t.top,R=t.bottom,k=f+g,_=k+h}else if(n==="y"){if(r==="center")f=v((t.left+t.right)/2);else if(de(r)){const D=Object.keys(r)[0],F=r[D];f=v(this.chart.scales[D].getPixelForValue(F))}S=f-g,O=S-h,E=t.left,$=t.right}const q=ye(i.ticks.maxTicksLimit,d),V=Math.max(1,Math.ceil(d/q));for(y=0;y<d;y+=V){const D=this.getContext(y),F=a.setContext(D),U=s.setContext(D),G=F.lineWidth,ee=F.color,te=U.dash||[],ae=U.dashOffset,le=F.tickWidth,ue=F.tickColor,ge=F.tickBorderDash||[],Ee=F.tickBorderDashOffset;x=bR(this,y,l),x!==void 0&&(w=ro(o,x,G),c?S=O=E=$=w:k=_=I=R=w,u.push({tx1:S,ty1:k,tx2:O,ty2:_,x1:E,y1:I,x2:$,y2:R,width:G,color:ee,borderDash:te,borderDashOffset:ae,tickWidth:le,tickColor:ue,tickBorderDash:ge,tickBorderDashOffset:Ee}))}return this._ticksLength=d,this._borderValue=f,u}_computeLabelItems(t){const n=this.axis,o=this.options,{position:i,ticks:a}=o,r=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:d,mirror:h}=a,u=Ui(o.grid),p=u+d,m=h?-d:p,g=-vo(this.labelRotation),v=[];let f,y,x,w,S,k,O,_,E,I,$,R,q="middle";if(i==="top")k=this.bottom-m,O=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+m,O=this._getXAxisLabelAlignment();else if(i==="left"){const D=this._getYAxisLabelAlignment(u);O=D.textAlign,S=D.x}else if(i==="right"){const D=this._getYAxisLabelAlignment(u);O=D.textAlign,S=D.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+p;else if(de(i)){const D=Object.keys(i)[0],F=i[D];k=this.chart.scales[D].getPixelForValue(F)+p}O=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")S=(t.left+t.right)/2-p;else if(de(i)){const D=Object.keys(i)[0],F=i[D];S=this.chart.scales[D].getPixelForValue(F)}O=this._getYAxisLabelAlignment(u).textAlign}n==="y"&&(l==="start"?q="top":l==="end"&&(q="bottom"));const V=this._getLabelSizes();for(f=0,y=s.length;f<y;++f){x=s[f],w=x.label;const D=a.setContext(this.getContext(f));_=this.getPixelForTick(f)+a.labelOffset,E=this._resolveTickFontOptions(f),I=E.lineHeight,$=De(w)?w.length:1;const F=$/2,U=D.color,G=D.textStrokeColor,ee=D.textStrokeWidth;let te=O;r?(S=_,O==="inner"&&(f===y-1?te=this.options.reverse?"left":"right":f===0?te=this.options.reverse?"right":"left":te="center"),i==="top"?c==="near"||g!==0?R=-$*I+I/2:c==="center"?R=-V.highest.height/2-F*I+I:R=-V.highest.height+I/2:c==="near"||g!==0?R=I/2:c==="center"?R=V.highest.height/2-F*I:R=V.highest.height-$*I,h&&(R*=-1),g!==0&&!D.showLabelBackdrop&&(S+=I/2*Math.sin(g))):(k=_,R=(1-$)*I/2);let ae;if(D.showLabelBackdrop){const le=Un(D.backdropPadding),ue=V.heights[f],ge=V.widths[f];let Ee=R-le.top,qe=0-le.left;switch(q){case"middle":Ee-=ue/2;break;case"bottom":Ee-=ue;break}switch(O){case"center":qe-=ge/2;break;case"right":qe-=ge;break;case"inner":f===y-1?qe-=ge:f>0&&(qe-=ge/2);break}ae={left:qe,top:Ee,width:ge+le.width,height:ue+le.height,color:D.backdropColor}}v.push({label:w,font:E,textOffset:R,options:{rotation:g,color:U,strokeColor:G,strokeWidth:ee,textAlign:te,textBaseline:q,translation:[S,k],backdrop:ae}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-vo(this.labelRotation))return t==="top"?"left":"right";let o="center";return n.align==="start"?o="left":n.align==="end"?o="right":n.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:o,mirror:i,padding:a}}=this.options,r=this._getLabelSizes(),s=t+a,l=r.widest.width;let c,d;return n==="left"?i?(d=this.right+a,o==="near"?c="left":o==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-s,o==="near"?c="right":o==="center"?(c="center",d-=l/2):(c="left",d=this.left)):n==="right"?i?(d=this.left+a,o==="near"?c="right":o==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+s,o==="near"?c="left":o==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:o,top:i,width:a,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(o,i,a,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const o=this.ticks.findIndex(i=>i.value===t);return o>=0?n.setContext(this.getContext(o)).lineWidth:0}drawGrid(t){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,r;const s=(l,c,d)=>{!d.width||!d.color||(o.save(),o.lineWidth=d.width,o.strokeStyle=d.color,o.setLineDash(d.borderDash||[]),o.lineDashOffset=d.borderDashOffset,o.beginPath(),o.moveTo(l.x,l.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(a=0,r=i.length;a<r;++a){const l=i[a];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:o,grid:i}}=this,a=o.setContext(this.getContext()),r=o.display?a.width:0;if(!r)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,h,u;this.isHorizontal()?(c=ro(t,this.left,r)-r/2,d=ro(t,this.right,s)+s/2,h=u=l):(h=ro(t,this.top,r)-r/2,u=ro(t,this.bottom,s)+s/2,c=d=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,h),n.lineTo(d,u),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,o=this._computeLabelArea();o&&Yb(n,o);const i=this.getLabelItems(t);for(const a of i){const r=a.options,s=a.font,l=a.label,c=a.textOffset;rg(n,l,0,c,s,r)}o&&qb(n)}drawTitle(){const{ctx:t,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const a=Ht(o.font),r=Un(o.padding),s=o.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||de(n)?(l+=r.bottom,De(o.text)&&(l+=a.lineHeight*(o.text.length-1))):l+=r.top;const{titleX:c,titleY:d,maxWidth:h,rotation:u}=_R(this,l,n,s);rg(t,o.text,0,0,a,{color:o.color,maxWidth:h,rotation:u,textAlign:CR(s,n,i),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,o=ye(t.grid&&t.grid.z,-1),i=ye(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Ci.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:o,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let a,r;for(a=0,r=n.length;a<r;++a){const s=n[a];s[o]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Ht(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Cr{constructor(t,n,o){this.type=t,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let o;ER(n)&&(o=this.register(n));const i=this.items,a=t.id,r=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,SR(t,r,o),this.override&&Oe.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,o=t.id,i=this.scope;o in n&&delete n[o],i&&o in Oe[i]&&(delete Oe[i][o],this.override&&delete Io[o])}}function SR(e,t,n){const o=wa(Object.create(null),[n?Oe.get(n):{},Oe.get(t),e.defaults]);Oe.set(t,o),e.defaultRoutes&&kR(t,e.defaultRoutes),e.descriptors&&Oe.describe(t,e.descriptors)}function kR(e,t){Object.keys(t).forEach(n=>{const o=n.split("."),i=o.pop(),a=[e].concat(o).join("."),r=t[n].split("."),s=r.pop(),l=r.join(".");Oe.route(a,i,l,s)})}function ER(e){return"id"in e&&"defaults"in e}class OR{constructor(){this.controllers=new Cr(ha,"datasets",!0),this.elements=new Cr(gi,"elements"),this.plugins=new Cr(Object,"plugins"),this.scales=new Cr(Ci,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,o){[...n].forEach(i=>{const a=o||this._getRegistryForType(i);o||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):he(i,r=>{const s=o||this._getRegistryForType(r);this._exec(t,s,r)})})}_exec(t,n,o){const i=yu(t);Se(o["before"+i],[],o),n[t](o),Se(o["after"+i],[],o)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(t))return o}return this.plugins}_get(t,n,o){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+o+".");return i}}var Nt=new OR;class $R{constructor(){this._init=void 0}notify(t,n,o,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const a=i?this._descriptors(t).filter(i):this._descriptors(t),r=this._notify(a,t,n,o);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),r}_notify(t,n,o,i){i=i||{};for(const a of t){const r=a.plugin,s=r[o],l=[n,i,a.options];if(Se(s,l,r)===!1&&i.cancelable)return!1}return!0}invalidate(){pe(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const o=t&&t.config,i=ye(o.options&&o.options.plugins,{}),a=IR(o);return i===!1&&!n?[]:PR(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],o=this._cache,i=(a,r)=>a.filter(s=>!r.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,o),t,"stop"),this._notify(i(o,n),t,"start")}}function IR(e){const t={},n=[],o=Object.keys(Nt.plugins.items);for(let a=0;a<o.length;a++)n.push(Nt.getPlugin(o[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const r=i[a];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function TR(e,t){return!t&&e===!1?null:e===!0?{}:e}function PR(e,{plugins:t,localIds:n},o,i){const a=[],r=e.getContext();for(const s of t){const l=s.id,c=TR(o[l],i);c!==null&&a.push({plugin:s,options:VR(e.config,{plugin:s,local:n[l]},c,r)})}return a}function VR(e,{plugin:t,local:n},o,i){const a=e.pluginScopeKeys(t),r=e.getOptionScopes(o,a);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function id(e,t){const n=Oe.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function DR(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function MR(e,t){return e===t?"_index_":"_value_"}function Tg(e){if(e==="x"||e==="y"||e==="r")return e}function RR(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function ad(e,...t){if(Tg(e))return e;for(const n of t){const o=n.axis||RR(n.position)||e.length>1&&Tg(e[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Pg(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function FR(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(o=>o.xAxisID===e||o.yAxisID===e);if(n.length)return Pg(e,"x",n[0])||Pg(e,"y",n[0])}return{}}function AR(e,t){const n=Io[e.type]||{scales:{}},o=t.scales||{},i=id(e.type,t),a=Object.create(null);return Object.keys(o).forEach(r=>{const s=o[r];if(!de(s))return console.error(`Invalid scale configuration for scale: ${r}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=ad(r,s,FR(r,e),Oe.scales[s.type]),c=MR(l,i),d=n.scales||{};a[r]=la(Object.create(null),[{axis:l},s,d[l],d[c]])}),e.data.datasets.forEach(r=>{const s=r.type||e.type,l=r.indexAxis||id(s,t),c=(Io[s]||{}).scales||{};Object.keys(c).forEach(d=>{const h=DR(d,l),u=r[h+"AxisID"]||h;a[u]=a[u]||Object.create(null),la(a[u],[{axis:h},o[u],c[d]])})}),Object.keys(a).forEach(r=>{const s=a[r];la(s,[Oe.scales[s.type],Oe.scale])}),a}function dy(e){const t=e.options||(e.options={});t.plugins=ye(t.plugins,{}),t.scales=AR(e,t)}function uy(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function LR(e){return e=e||{},e.data=uy(e.data),dy(e),e}const Vg=new Map,hy=new Set;function _r(e,t){let n=Vg.get(e);return n||(n=t(),Vg.set(e,n),hy.add(n)),n}const Yi=(e,t,n)=>{const o=hi(t,n);o!==void 0&&e.add(o)};class NR{constructor(t){this._config=LR(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=uy(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),dy(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return _r(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return _r(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return _r(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,o=this.type;return _r(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const o=this._scopeCache;let i=o.get(t);return(!i||n)&&(i=new Map,o.set(t,i)),i}getOptionScopes(t,n,o){const{options:i,type:a}=this,r=this._cachedScopes(t,o),s=r.get(n);if(s)return s;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(h=>Yi(l,t,h))),d.forEach(h=>Yi(l,i,h)),d.forEach(h=>Yi(l,Io[a]||{},h)),d.forEach(h=>Yi(l,Oe,h)),d.forEach(h=>Yi(l,nd,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),hy.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Io[n]||{},Oe.datasets[n]||{},{type:n},Oe,nd]}resolveNamedOptions(t,n,o,i=[""]){const a={$shared:!0},{resolver:r,subPrefixes:s}=Dg(this._resolverCache,t,i);let l=r;if(zR(r,n)){a.$shared=!1,o=Gn(o)?o():o;const c=this.createResolver(t,o,s);l=pi(r,o,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,o=[""],i){const{resolver:a}=Dg(this._resolverCache,t,o);return de(n)?pi(a,n,void 0,i):a}}function Dg(e,t,n){let o=e.get(t);o||(o=new Map,e.set(t,o));const i=n.join();let a=o.get(i);return a||(a={resolver:wu(t,n),subPrefixes:n.filter(r=>!r.toLowerCase().includes("hover"))},o.set(i,a)),a}const BR=e=>de(e)&&Object.getOwnPropertyNames(e).some(t=>Gn(e[t]));function zR(e,t){const{isScriptable:n,isIndexable:o}=Zb(e);for(const i of t){const a=n(i),r=o(i),s=(r||a)&&e[i];if(a&&(Gn(s)||BR(s))||r&&De(s))return!0}return!1}var HR="4.5.1";const jR=["top","bottom","left","right","chartArea"];function Mg(e,t){return e==="top"||e==="bottom"||jR.indexOf(e)===-1&&t==="x"}function Rg(e,t){return function(n,o){return n[e]===o[e]?n[t]-o[t]:n[e]-o[e]}}function Fg(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Se(n&&n.onComplete,[e],t)}function WR(e){const t=e.chart,n=t.options.animation;Se(n&&n.onProgress,[e],t)}function py(e){return Su()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Rs={},gy=e=>{const t=py(e);return Object.values(Rs).filter(n=>n.canvas===t).pop()};function GR(e,t,n){const o=Object.keys(e);for(const i of o){const a=+i;if(a>=t){const r=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=r)}}}function UR(e,t,n,o){return!n||e.type==="mouseout"?null:o?t:e}class Dn{static register(...t){Nt.add(...t),Ag()}static unregister(...t){Nt.remove(...t),Ag()}constructor(t,n){const o=this.config=new NR(n),i=py(t),a=gy(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const r=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||dR(i)),this.platform.updateConfig(o);const s=this.platform.acquireContext(i,r.aspectRatio),l=s&&s.canvas,c=l&&l.height,d=l&&l.width;if(this.id=iM(),this.ctx=s,this.canvas=l,this.width=d,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $R,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=SM(h=>this.update(h),r.resizeDelay||0),this._dataChanges=[],Rs[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Qt.listen(this,"complete",Fg),Qt.listen(this,"progress",WR),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:o,height:i,_aspectRatio:a}=this;return pe(t)?n&&a?a:i?o/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Nt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ig(this.canvas,this.ctx),this}stop(){return Qt.stop(this),this}resize(t,n){Qt.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const o=this.options,i=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,t,n,a),s=o.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,cg(this,s,!0)&&(this.notifyPlugins("resize",{size:r}),Se(o.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};he(t,(n,o)=>{n.id=o})}buildOrUpdateScales(){const t=this.options,n=t.scales,o=this.scales,i=Object.keys(o).reduce((r,s)=>(r[s]=!1,r),{});let a=[];n&&(a=a.concat(Object.keys(n).map(r=>{const s=n[r],l=ad(r,s),c=l==="r",d=l==="x";return{options:s,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),he(a,r=>{const s=r.options,l=s.id,c=ad(l,s),d=ye(s.type,r.dtype);(s.position===void 0||Mg(s.position,c)!==Mg(r.dposition))&&(s.position=r.dposition),i[l]=!0;let h=null;if(l in o&&o[l].type===d)h=o[l];else{const u=Nt.getScale(d);h=new u({id:l,type:d,ctx:this.ctx,chart:this}),o[h.id]=h}h.init(s,t)}),he(i,(r,s)=>{r||delete o[s]}),he(o,r=>{xr.configure(this,r,r.options),xr.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,o=t.length;if(t.sort((i,a)=>i.index-a.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);t.splice(n,o-n)}this._sortedMetasets=t.slice(0).sort(Rg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((o,i)=>{n.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const a=n[o];let r=this.getDatasetMeta(o);const s=a.type||this.config.type;if(r.type&&r.type!==s&&(this._destroyDatasetMeta(o),r=this.getDatasetMeta(o)),r.type=s,r.indexAxis=a.indexAxis||id(s,this.options),r.order=a.order||0,r.index=o,r.label=""+a.label,r.visible=this.isDatasetVisible(o),r.controller)r.controller.updateIndex(o),r.controller.linkScales();else{const l=Nt.getController(s),{datasetElementType:c,dataElementType:d}=Oe.datasets[s];Object.assign(l,{dataElementType:Nt.getElement(d),datasetElementType:c&&Nt.getElement(c)}),r.controller=new l(this,o),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){he(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:h}=this.getDatasetMeta(c),u=!i&&a.indexOf(h)===-1;h.buildOrUpdateElements(u),r=Math.max(+h.getMaxOverflow(),r)}r=this._minPadding=o.layout.autoPadding?r:0,this._updateLayout(r),i||he(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Rg("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){he(this.scales,t=>{xr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(t.events);(!Up(n,o)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:a}of n){const r=o==="_removeElements"?-a:a;GR(t,i,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=a=>new Set(t.filter(r=>r[0]===a).map((r,s)=>s+","+r.splice(1).join(","))),i=o(0);for(let a=1;a<n;a++)if(!Up(i,o(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xr.update(this,this.width,this.height,t);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],he(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Gn(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const o=this.getDatasetMeta(t),i={meta:o,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Qt.has(this)?this.attached&&!Qt.running(this)&&Qt.start(this):(this.draw(),Fg({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,o=[];let i,a;for(i=0,a=n.length;i<a;++i){const r=n[i];(!t||r.visible)&&o.push(r)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,o={meta:t,index:t.index,cancelable:!0},i=h2(this,t);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Yb(n,i),t.controller.draw(),i&&qb(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Ub(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,o,i){const a=j2.modes[n];return typeof a=="function"?a(this,t,o,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],o=this._metasets;let i=o.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=wi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const o=this.getDatasetMeta(t);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(t,n){const o=this.getDatasetMeta(t);o.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,o){const i=o?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,i);Ca(n)?(a.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(t,o),r.update(a,{visible:o}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Qt.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ig(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Rs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,o=(a,r)=>{n.addEventListener(this,a,r),t[a]=r},i=(a,r,s)=>{a.offsetX=r,a.offsetY=s,this._eventHandler(a)};he(this.options.events,a=>o(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,o=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const s=()=>{i("attach",s),this.attached=!0,this.resize(),o("resize",a),o("detach",r)};r=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),o("attach",s)},n.isAttached(this.canvas)?s():r()}unbindEvents(){he(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},he(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,o){const i=o?"set":"remove";let a,r,s,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){r=t[s];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[i+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],o=t.map(({datasetIndex:i,index:a})=>{const r=this.getDatasetMeta(i);if(!r)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:r.data[a],index:a}});!Is(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(t,n,o){return this._plugins.notify(this,t,n,o)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,o){const i=this.options.hover,a=(l,c)=>l.filter(d=>!c.some(h=>d.datasetIndex===h.datasetIndex&&d.index===h.index)),r=a(n,t),s=o?t:a(t,n);r.length&&this.updateHoverStyle(r,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const o={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const a=this._handleEvent(t,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(a||o.changed)&&this.render(),this}_handleEvent(t,n,o){const{_active:i=[],options:a}=this,r=n,s=this._getActiveElements(t,i,o,r),l=dM(t),c=UR(t,this._lastEvent,o,l);o&&(this._lastEvent=null,Se(a.onHover,[t,s,this],this),l&&Se(a.onClick,[t,s,this],this));const d=!Is(s,i);return(d||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,d}_getActiveElements(t,n,o,i){if(t.type==="mouseout")return[];if(!o)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}ce(Dn,"defaults",Oe),ce(Dn,"instances",Rs),ce(Dn,"overrides",Io),ce(Dn,"registry",Nt),ce(Dn,"version",HR),ce(Dn,"getChart",gy);function Ag(){return he(Dn.instances,e=>e._plugins.invalidate())}function fy(e,t){const{x:n,y:o,base:i,width:a,height:r}=e.getProps(["x","y","base","width","height"],t);let s,l,c,d,h;return e.horizontal?(h=r/2,s=Math.min(n,i),l=Math.max(n,i),c=o-h,d=o+h):(h=a/2,s=n-h,l=n+h,c=Math.min(o,i),d=Math.max(o,i)),{left:s,top:c,right:l,bottom:d}}function Nn(e,t,n,o){return e?0:It(t,n,o)}function YR(e,t,n){const o=e.options.borderWidth,i=e.borderSkipped,a=Xb(o);return{t:Nn(i.top,a.top,0,n),r:Nn(i.right,a.right,0,t),b:Nn(i.bottom,a.bottom,0,n),l:Nn(i.left,a.left,0,t)}}function qR(e,t,n){const{enableBorderRadius:o}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=ua(i),r=Math.min(t,n),s=e.borderSkipped,l=o||de(i);return{topLeft:Nn(!l||s.top||s.left,a.topLeft,0,r),topRight:Nn(!l||s.top||s.right,a.topRight,0,r),bottomLeft:Nn(!l||s.bottom||s.left,a.bottomLeft,0,r),bottomRight:Nn(!l||s.bottom||s.right,a.bottomRight,0,r)}}function KR(e){const t=fy(e),n=t.right-t.left,o=t.bottom-t.top,i=YR(e,n/2,o/2),a=qR(e,n/2,o/2);return{outer:{x:t.left,y:t.top,w:n,h:o,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function hc(e,t,n,o){const i=t===null,a=n===null,r=e&&!(i&&a)&&fy(e,o);return r&&(i||Xp(t,r.left,r.right))&&(a||Xp(n,r.top,r.bottom))}function XR(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function ZR(e,t){e.rect(t.x,t.y,t.w,t.h)}function pc(e,t,n={}){const o=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-o,r=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+o,y:e.y+i,w:e.w+a,h:e.h+r,radius:e.radius}}class Qr extends gi{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:a,outer:r}=KR(this),s=XR(r.radius)?od:ZR;t.save(),(r.w!==a.w||r.h!==a.h)&&(t.beginPath(),s(t,pc(r,n,a)),t.clip(),s(t,pc(a,-n,r)),t.fillStyle=o,t.fill("evenodd")),t.beginPath(),s(t,pc(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,o){return hc(this,t,n,o)}inXRange(t,n){return hc(this,t,null,n)}inYRange(t,n){return hc(this,null,t,n)}getCenterPoint(t){const{x:n,y:o,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?o:(o+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}ce(Qr,"id","bar"),ce(Qr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ce(Qr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const pa={average(e){if(!e.length)return!1;let t,n,o=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){const r=e[t].element;if(r&&r.hasValue()){const s=r.tooltipPosition();o.add(s.x),i+=s.y,++a}}return a===0||o.size===0?!1:{x:[...o].reduce((r,s)=>r+s)/o.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,i=Number.POSITIVE_INFINITY,a,r,s;for(a=0,r=e.length;a<r;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=bM(t,c);d<i&&(i=d,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,o=l.y}return{x:n,y:o}}};function Ft(e,t){return t&&(De(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function en(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
9
9
|
`)>-1?e.split(`
|
|
10
|
-
`):e}function ZR(e,t){const{element:n,datasetIndex:o,index:i}=t,a=e.getDatasetMeta(o).controller,{label:r,value:s}=a.getLabelAndValue(i);return{chart:e,label:r,parsed:a.getParsed(i),raw:e.data.datasets[o].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Lg(e,t){const n=e.chart.ctx,{body:o,footer:i,title:a}=e,{boxWidth:r,boxHeight:s}=t,l=Ht(t.bodyFont),c=Ht(t.titleFont),d=Ht(t.footerFont),h=a.length,u=i.length,p=o.length,m=Un(t.padding);let g=m.height,v=0,f=o.reduce((w,S)=>w+S.before.length+S.lines.length+S.after.length,0);if(f+=e.beforeBody.length+e.afterBody.length,h&&(g+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),f){const w=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;g+=p*w+(f-p)*l.lineHeight+(f-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*d.lineHeight+(u-1)*t.footerSpacing);let y=0;const x=function(w){v=Math.max(v,n.measureText(w).width+y)};return n.save(),n.font=c.string,he(e.title,x),n.font=l.string,he(e.beforeBody.concat(e.afterBody),x),y=t.displayColors?r+2+t.boxPadding:0,he(o,w=>{he(w.before,x),he(w.lines,x),he(w.after,x)}),y=0,n.font=d.string,he(e.footer,x),n.restore(),v+=m.width,{width:v,height:g}}function JR(e,t){const{y:n,height:o}=t;return n<o/2?"top":n>e.height-o/2?"bottom":"center"}function QR(e,t,n,o){const{x:i,width:a}=o,r=n.caretSize+n.caretPadding;if(e==="left"&&i+a+r>t.width||e==="right"&&i-a-r<0)return!0}function eF(e,t,n,o){const{x:i,width:a}=n,{width:r,chartArea:{left:s,right:l}}=e;let c="center";return o==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=r-a/2&&(c="right"),QR(c,e,t,n)&&(c="center"),c}function Ng(e,t,n){const o=n.yAlign||t.yAlign||JR(e,n);return{xAlign:n.xAlign||t.xAlign||eF(e,t,n,o),yAlign:o}}function tF(e,t){let{x:n,width:o}=e;return t==="right"?n-=o:t==="center"&&(n-=o/2),n}function nF(e,t,n){let{y:o,height:i}=e;return t==="top"?o+=n:t==="bottom"?o-=i+n:o-=i/2,o}function Bg(e,t,n,o){const{caretSize:i,caretPadding:a,cornerRadius:r}=e,{xAlign:s,yAlign:l}=n,c=i+a,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:p}=ua(r);let m=tF(t,s);const g=nF(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(d,u)+i:s==="right"&&(m+=Math.max(h,p)+i),{x:It(m,0,o.width-t.width),y:It(g,0,o.height-t.height)}}function Sr(e,t,n){const o=Un(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-o.right:e.x+o.left}function zg(e){return Ft([],en(e))}function oF(e,t,n){return wi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Hg(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const my={beforeTitle:Jt,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(o>0&&t.dataIndex<o)return n[t.dataIndex]}return""},afterTitle:Jt,beforeBody:Jt,beforeLabel:Jt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return pe(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Jt,afterBody:Jt,beforeFooter:Jt,footer:Jt,afterFooter:Jt};function Ke(e,t,n,o){const i=e[t].call(n,o);return typeof i>"u"?my[t].call(n,o):i}class rd extends gi{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,a=new ty(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=oF(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:o}=n,i=Ke(o,"beforeTitle",this,t),a=Ke(o,"title",this,t),r=Ke(o,"afterTitle",this,t);let s=[];return s=Ft(s,en(i)),s=Ft(s,en(a)),s=Ft(s,en(r)),s}getBeforeBody(t,n){return zg(Ke(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:o}=n,i=[];return he(t,a=>{const r={before:[],lines:[],after:[]},s=Hg(o,a);Ft(r.before,en(Ke(s,"beforeLabel",this,a))),Ft(r.lines,Ke(s,"label",this,a)),Ft(r.after,en(Ke(s,"afterLabel",this,a))),i.push(r)}),i}getAfterBody(t,n){return zg(Ke(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:o}=n,i=Ke(o,"beforeFooter",this,t),a=Ke(o,"footer",this,t),r=Ke(o,"afterFooter",this,t);let s=[];return s=Ft(s,en(i)),s=Ft(s,en(a)),s=Ft(s,en(r)),s}_createItems(t){const n=this._active,o=this.chart.data,i=[],a=[],r=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(ZR(this.chart,n[l]));return t.filter&&(s=s.filter((d,h,u)=>t.filter(d,h,u,o))),t.itemSort&&(s=s.sort((d,h)=>t.itemSort(d,h,o))),he(s,d=>{const h=Hg(t.callbacks,d);i.push(Ke(h,"labelColor",this,d)),a.push(Ke(h,"labelPointStyle",this,d)),r.push(Ke(h,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=s,s}update(t,n){const o=this.options.setContext(this.getContext()),i=this._active;let a,r=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=pa[o.position].call(this,i,this._eventPosition);r=this._createItems(o),this.title=this.getTitle(r,o),this.beforeBody=this.getBeforeBody(r,o),this.body=this.getBody(r,o),this.afterBody=this.getAfterBody(r,o),this.footer=this.getFooter(r,o);const l=this._size=Lg(this,o),c=Object.assign({},s,l),d=Ng(this.chart,o,c),h=Bg(o,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,o,i){const a=this.getCaretPosition(t,o,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,o){const{xAlign:i,yAlign:a}=this,{caretSize:r,cornerRadius:s}=o,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:h}=ua(s),{x:u,y:p}=t,{width:m,height:g}=n;let v,f,y,x,w,S;return a==="center"?(w=p+g/2,i==="left"?(v=u,f=v-r,x=w+r,S=w-r):(v=u+m,f=v+r,x=w-r,S=w+r),y=v):(i==="left"?f=u+Math.max(l,d)+r:i==="right"?f=u+m-Math.max(c,h)-r:f=this.caretX,a==="top"?(x=p,w=x-r,v=f-r,y=f+r):(x=p+g,w=x+r,v=f+r,y=f-r),S=x),{x1:v,x2:f,x3:y,y1:x,y2:w,y3:S}}drawTitle(t,n,o){const i=this.title,a=i.length;let r,s,l;if(a){const c=ic(o.rtl,this.x,this.width);for(t.x=Sr(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",r=Ht(o.titleFont),s=o.titleSpacing,n.fillStyle=o.titleColor,n.font=r.string,l=0;l<a;++l)n.fillText(i[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s,l+1===a&&(t.y+=o.titleMarginBottom-s)}}_drawColorBox(t,n,o,i,a){const r=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:c}=a,d=Ht(a.bodyFont),h=Sr(this,"left",a),u=i.x(h),p=l<d.lineHeight?(d.lineHeight-l)/2:0,m=n.y+p;if(a.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation},v=i.leftForLtr(u,c)+c/2,f=m+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,ag(t,g,v,f),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,ag(t,g,v,f)}else{t.lineWidth=de(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=i.leftForLtr(u,c),v=i.leftForLtr(i.xPlus(u,1),c-2),f=ua(r.borderRadius);Object.values(f).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,od(t,{x:g,y:m,w:c,h:l,radius:f}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),od(t,{x:v,y:m+1,w:c-2,h:l-2,radius:f}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(g,m,c,l),t.strokeRect(g,m,c,l),t.fillStyle=r.backgroundColor,t.fillRect(v,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[o]}drawBody(t,n,o){const{body:i}=this,{bodySpacing:a,bodyAlign:r,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:d}=o,h=Ht(o.bodyFont);let u=h.lineHeight,p=0;const m=ic(o.rtl,this.x,this.width),g=function(_){n.fillText(_,m.x(t.x+p),t.y+u/2),t.y+=u+a},v=m.textAlign(r);let f,y,x,w,S,k,O;for(n.textAlign=r,n.textBaseline="middle",n.font=h.string,t.x=Sr(this,v,o),n.fillStyle=o.bodyColor,he(this.beforeBody,g),p=s&&v!=="right"?r==="center"?c/2+d:c+2+d:0,w=0,k=i.length;w<k;++w){for(f=i[w],y=this.labelTextColors[w],n.fillStyle=y,he(f.before,g),x=f.lines,s&&x.length&&(this._drawColorBox(n,t,w,m,o),u=Math.max(h.lineHeight,l)),S=0,O=x.length;S<O;++S)g(x[S]),u=h.lineHeight;he(f.after,g)}p=0,u=h.lineHeight,he(this.afterBody,g),t.y-=a}drawFooter(t,n,o){const i=this.footer,a=i.length;let r,s;if(a){const l=ic(o.rtl,this.x,this.width);for(t.x=Sr(this,o.footerAlign,o),t.y+=o.footerMarginTop,n.textAlign=l.textAlign(o.footerAlign),n.textBaseline="middle",r=Ht(o.footerFont),n.fillStyle=o.footerColor,n.font=r.string,s=0;s<a;++s)n.fillText(i[s],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+o.footerSpacing}}drawBackground(t,n,o,i){const{xAlign:a,yAlign:r}=this,{x:s,y:l}=t,{width:c,height:d}=o,{topLeft:h,topRight:u,bottomLeft:p,bottomRight:m}=ua(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+h,l),r==="top"&&this.drawCaret(t,n,o,i),n.lineTo(s+c-u,l),n.quadraticCurveTo(s+c,l,s+c,l+u),r==="center"&&a==="right"&&this.drawCaret(t,n,o,i),n.lineTo(s+c,l+d-m),n.quadraticCurveTo(s+c,l+d,s+c-m,l+d),r==="bottom"&&this.drawCaret(t,n,o,i),n.lineTo(s+p,l+d),n.quadraticCurveTo(s,l+d,s,l+d-p),r==="center"&&a==="left"&&this.drawCaret(t,n,o,i),n.lineTo(s,l+h),n.quadraticCurveTo(s,l,s+h,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,o=this.$animations,i=o&&o.x,a=o&&o.y;if(i||a){const r=pa[t.position].call(this,this._active,this._eventPosition);if(!r)return;const s=this._size=Lg(this,t),l=Object.assign({},r,this._size),c=Ng(n,t,l),d=Bg(t,l,c,n);(i._to!==d.x||a._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const r=Un(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=o,this.drawBackground(a,t,i,n),l2(t,n.textDirection),a.y+=r.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),c2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const o=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!Is(o,i),r=this._positionChanged(i,n);(a||r)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],r=this._getActiveElements(t,a,n,o),s=this._positionChanged(r,t),l=n||!Is(r,a)||s;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,o,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,a.mode,a,o);return a.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:o,caretY:i,options:a}=this,r=pa[a.position].call(this,t,n);return r!==!1&&(o!==r.x||i!==r.y)}}ce(rd,"positioners",pa);var iF={id:"tooltip",_element:rd,positioners:pa,afterInit(e,t,n){n&&(e.tooltip=new rd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:my},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const aF=(e,t,n,o)=>(typeof t=="string"?(n=e.push(t)-1,o.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function rF(e,t,n,o){const i=e.indexOf(t);if(i===-1)return aF(e,t,n,o);const a=e.lastIndexOf(t);return i!==a?n:i}const sF=(e,t)=>e===null?null:It(Math.round(e),0,t);function vy(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class sd extends Ci{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:a}of n)o[i]===a&&o.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(pe(t))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===t?n:rF(o,t,ye(n,t),this._addedLabels),sF(n,o.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const t=this.min,n=this.max,o=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let r=t;r<=n;r++)i.push({value:r});return i}getLabelForValue(t){return vy.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ce(sd,"id","category"),ce(sd,"defaults",{ticks:{callback:vy}});function lF(e,t){const n=[],{bounds:o,step:i,min:a,max:r,precision:s,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=e,u=i||1,p=c-1,{min:m,max:g}=t,v=!pe(a),f=!pe(r),y=!pe(l),x=(g-m)/(d+1);let w=qp((g-m)/p/u)*u,S,k,O,_;if(w<1e-14&&!v&&!f)return[{value:m},{value:g}];_=Math.ceil(g/w)-Math.floor(m/w),_>p&&(w=qp(_*w/p/u)*u),pe(s)||(S=Math.pow(10,s),w=Math.ceil(w*S)/S),o==="ticks"?(k=Math.floor(m/w)*w,O=Math.ceil(g/w)*w):(k=m,O=g),v&&f&&i&&pM((r-a)/i,w/1e3)?(_=Math.round(Math.min((r-a)/w,c)),w=(r-a)/_,k=a,O=r):y?(k=v?a:k,O=f?r:O,_=l-1,w=(O-k)/_):(_=(O-k)/w,Xr(_,Math.round(_),w/1e3)?_=Math.round(_):_=Math.ceil(_));const E=Math.max(Kp(w),Kp(k));S=Math.pow(10,pe(s)?E:s),k=Math.round(k*S)/S,O=Math.round(O*S)/S;let I=0;for(v&&(h&&k!==a?(n.push({value:a}),k<a&&I++,Xr(Math.round((k+I*w)*S)/S,a,jg(a,x,e))&&I++):k<a&&I++);I<_;++I){const $=Math.round((k+I*w)*S)/S;if(f&&$>r)break;n.push({value:$})}return f&&h&&O!==r?n.length&&Xr(n[n.length-1].value,r,jg(r,x,e))?n[n.length-1].value=r:n.push({value:r}):(!f||O===r)&&n.push({value:O}),n}function jg(e,t,{horizontal:n,minRotation:o}){const i=vo(o),a=(n?Math.sin(i):Math.cos(i))||.001,r=.75*t*(""+e).length;return Math.min(t/a,r)}class cF extends Ci{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return pe(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:a}=this;const r=l=>i=n?i:l,s=l=>a=o?a:l;if(t){const l=zn(i),c=zn(a);l<0&&c<0?s(0):l>0&&c>0&&r(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||r(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=t,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,r=lF(i,a);return t.bounds==="ticks"&&gM(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&t.length){const i=(o-n)/Math.max(t.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(t){return Wb(t,this.chart.options.locale,this.options.ticks.format)}}class ld extends cF{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=wt(t)?t:0,this.max=wt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,o=vo(this.options.ticks.minRotation),i=(t?Math.sin(o):Math.cos(o))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ce(ld,"id","linear"),ce(ld,"defaults",{ticks:{callback:Gb.formatters.numeric}});const yl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Je=Object.keys(yl);function Wg(e,t){return e-t}function Gg(e,t){if(pe(t))return null;const n=e._adapter,{parser:o,round:i,isoWeekday:a}=e._parseOpts;let r=t;return typeof o=="function"&&(r=o(r)),wt(r)||(r=typeof o=="string"?n.parse(r,o):n.parse(r)),r===null?null:(i&&(r=i==="week"&&(Vs(a)||a===!0)?n.startOf(r,"isoWeek",a):n.startOf(r,i)),+r)}function Ug(e,t,n,o){const i=Je.length;for(let a=Je.indexOf(e);a<i-1;++a){const r=yl[Je[a]],s=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(s*r.size))<=o)return Je[a]}return Je[i-1]}function dF(e,t,n,o,i){for(let a=Je.length-1;a>=Je.indexOf(n);a--){const r=Je[a];if(yl[r].common&&e._adapter.diff(i,o,r)>=t-1)return r}return Je[n?Je.indexOf(n):0]}function uF(e){for(let t=Je.indexOf(e)+1,n=Je.length;t<n;++t)if(yl[Je[t]].common)return Je[t]}function Yg(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:o,hi:i}=xu(n,t),a=n[o]>=t?n[o]:n[i];e[a]=!0}}function hF(e,t,n,o){const i=e._adapter,a=+i.startOf(t[0].value,o),r=t[t.length-1].value;let s,l;for(s=a;s<=r;s=+i.add(s,1,o))l=n[s],l>=0&&(t[l].major=!0);return t}function qg(e,t,n){const o=[],i={},a=t.length;let r,s;for(r=0;r<a;++r)s=t[r],i[s]=r,o.push({value:s,major:!1});return a===0||!n?o:hF(e,o,i,n)}class Sa extends Ci{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const o=t.time||(t.time={}),i=this._adapter=new iy._date(t.adapters.date);i.init(n),la(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Gg(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,o=t.time.unit||"day";let{min:i,max:a,minDefined:r,maxDefined:s}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!r||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=wt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),a=wt(a)&&!isNaN(a)?a:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],o=t[t.length-1]),{min:n,max:o}}buildTicks(){const t=this.options,n=t.time,o=t.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,r=this.max,s=wM(i,a,r);return this._unit=n.unit||(o.autoSkip?Ug(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):dF(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:uF(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),qg(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,o=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?o=a:o=(a-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=It(n,0,r),o=It(o,0,r),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,n=this.min,o=this.max,i=this.options,a=i.time,r=a.unit||Ug(a.minUnit,n,o,this._getLabelCapacity(n)),s=ye(i.ticks.stepSize,1),l=r==="week"?a.isoWeekday:!1,c=Vs(l)||l===!0,d={};let h=n,u,p;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":r),t.diff(o,n,r)>1e5*s)throw new Error(n+" and "+o+" are too far apart with stepSize of "+s+" "+r);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(u=h,p=0;u<o;u=+t.add(u,s,r),p++)Yg(d,u,m);return(u===o||i.bounds==="ticks"||p===1)&&Yg(d,u,m),Object.keys(d).sort(Wg).map(g=>+g)}getLabelForValue(t){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(t,o.tooltipFormat):n.format(t,o.displayFormats.datetime)}format(t,n){const o=this.options.time.displayFormats,i=this._unit,a=n||o[i];return this._adapter.format(t,a)}_tickFormatFunction(t,n,o,i){const a=this.options,r=a.ticks.callback;if(r)return Se(r,[t,n,o],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&s[l],h=c&&s[c],u=o[n],p=c&&h&&u&&u.major;return this._adapter.format(t,i||(p?h:d))}generateTickLabels(t){let n,o,i;for(n=0,o=t.length;n<o;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,o=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,o=this.ctx.measureText(t).width,i=vo(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),r=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:o*a+s*r,h:o*r+s*a}}_getLabelCapacity(t){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,a=this._tickFormatFunction(t,0,qg(this,[t],this._majorUnit),i),r=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,o;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,o;if(t.length)return t;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)t.push(Gg(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Bb(t.sort(Wg))}}ce(Sa,"id","time"),ce(Sa,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function kr(e,t,n){let o=0,i=e.length-1,a,r,s,l;n?(t>=e[o].pos&&t<=e[i].pos&&({lo:o,hi:i}=td(e,"pos",t)),{pos:a,time:s}=e[o],{pos:r,time:l}=e[i]):(t>=e[o].time&&t<=e[i].time&&({lo:o,hi:i}=td(e,"time",t)),{time:a,pos:s}=e[o],{time:r,pos:l}=e[i]);const c=r-a;return c?s+(l-s)*(t-a)/c:s}class Kg extends Sa{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=kr(n,this.min),this._tableRange=kr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:o}=this,i=[],a=[];let r,s,l,c,d;for(r=0,s=t.length;r<s;++r)c=t[r],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(r=0,s=i.length;r<s;++r)d=i[r+1],l=i[r-1],c=i[r],Math.round((d+l)/2)!==c&&a.push({time:c,pos:r/(s-1)});return a}_generate(){const t=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(t)||!o.length)&&o.splice(0,0,t),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?t=this.normalize(n.concat(o)):t=n.length?n:o,t=this._cache.all=t,t}getDecimalForValue(t){return(kr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return kr(this._table,o*this._tableRange+this._minPos,!0)}}ce(Kg,"id","timeseries"),ce(Kg,"defaults",Sa.defaults);function _i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var es={exports:{}},pF=es.exports,Xg;function gF(){return Xg||(Xg=1,function(e,t){(function(n,o){e.exports=o()})(pF,function(){var n=1e3,o=6e4,i=36e5,a="millisecond",r="second",s="minute",l="hour",c="day",d="week",h="month",u="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var D=["th","st","nd","rd"],F=V%100;return"["+V+(D[(F-20)%10]||D[F]||D[0])+"]"}},x=function(V,D,F){var U=String(V);return!U||U.length>=D?V:""+Array(D+1-U.length).join(F)+V},w={s:x,z:function(V){var D=-V.utcOffset(),F=Math.abs(D),U=Math.floor(F/60),G=F%60;return(D<=0?"+":"-")+x(U,2,"0")+":"+x(G,2,"0")},m:function V(D,F){if(D.date()<F.date())return-V(F,D);var U=12*(F.year()-D.year())+(F.month()-D.month()),G=D.clone().add(U,h),ee=F-G<0,te=D.clone().add(U+(ee?-1:1),h);return+(-(U+(F-G)/(ee?G-te:te-G))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:h,y:p,w:d,d:c,D:m,h:l,m:s,s:r,ms:a,Q:u}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},S="en",k={};k[S]=y;var O="$isDayjsObject",_=function(V){return V instanceof R||!(!V||!V[O])},E=function V(D,F,U){var G;if(!D)return S;if(typeof D=="string"){var ee=D.toLowerCase();k[ee]&&(G=ee),F&&(k[ee]=F,G=ee);var te=D.split("-");if(!G&&te.length>1)return V(te[0])}else{var ae=D.name;k[ae]=D,G=ae}return!U&&G&&(S=G),G||!U&&S},I=function(V,D){if(_(V))return V.clone();var F=typeof D=="object"?D:{};return F.date=V,F.args=arguments,new R(F)},$=w;$.l=E,$.i=_,$.w=function(V,D){return I(V,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var R=function(){function V(F){this.$L=E(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[O]=!0}var D=V.prototype;return D.parse=function(F){this.$d=function(U){var G=U.date,ee=U.utc;if(G===null)return new Date(NaN);if($.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var te=G.match(v);if(te){var ae=te[2]-1||0,le=(te[7]||"0").substring(0,3);return ee?new Date(Date.UTC(te[1],ae,te[3]||1,te[4]||0,te[5]||0,te[6]||0,le)):new Date(te[1],ae,te[3]||1,te[4]||0,te[5]||0,te[6]||0,le)}}return new Date(G)}(F),this.init()},D.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},D.$utils=function(){return $},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(F,U){var G=I(F);return this.startOf(U)<=G&&G<=this.endOf(U)},D.isAfter=function(F,U){return I(F)<this.startOf(U)},D.isBefore=function(F,U){return this.endOf(U)<I(F)},D.$g=function(F,U,G){return $.u(F)?this[U]:this.set(G,F)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(F,U){var G=this,ee=!!$.u(U)||U,te=$.p(F),ae=function(Vt,Me){var ut=$.w(G.$u?Date.UTC(G.$y,Me,Vt):new Date(G.$y,Me,Vt),G);return ee?ut:ut.endOf(c)},le=function(Vt,Me){return $.w(G.toDate()[Vt].apply(G.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Me)),G)},ue=this.$W,ge=this.$M,Ee=this.$D,qe="set"+(this.$u?"UTC":"");switch(te){case p:return ee?ae(1,0):ae(31,11);case h:return ee?ae(1,ge):ae(0,ge+1);case d:var qt=this.$locale().weekStart||0,Qn=(ue<qt?ue+7:ue)-qt;return ae(ee?Ee-Qn:Ee+(6-Qn),ge);case c:case m:return le(qe+"Hours",0);case l:return le(qe+"Minutes",1);case s:return le(qe+"Seconds",2);case r:return le(qe+"Milliseconds",3);default:return this.clone()}},D.endOf=function(F){return this.startOf(F,!1)},D.$set=function(F,U){var G,ee=$.p(F),te="set"+(this.$u?"UTC":""),ae=(G={},G[c]=te+"Date",G[m]=te+"Date",G[h]=te+"Month",G[p]=te+"FullYear",G[l]=te+"Hours",G[s]=te+"Minutes",G[r]=te+"Seconds",G[a]=te+"Milliseconds",G)[ee],le=ee===c?this.$D+(U-this.$W):U;if(ee===h||ee===p){var ue=this.clone().set(m,1);ue.$d[ae](le),ue.init(),this.$d=ue.set(m,Math.min(this.$D,ue.daysInMonth())).$d}else ae&&this.$d[ae](le);return this.init(),this},D.set=function(F,U){return this.clone().$set(F,U)},D.get=function(F){return this[$.p(F)]()},D.add=function(F,U){var G,ee=this;F=Number(F);var te=$.p(U),ae=function(ge){var Ee=I(ee);return $.w(Ee.date(Ee.date()+Math.round(ge*F)),ee)};if(te===h)return this.set(h,this.$M+F);if(te===p)return this.set(p,this.$y+F);if(te===c)return ae(1);if(te===d)return ae(7);var le=(G={},G[s]=o,G[l]=i,G[r]=n,G)[te]||1,ue=this.$d.getTime()+F*le;return $.w(ue,this)},D.subtract=function(F,U){return this.add(-1*F,U)},D.format=function(F){var U=this,G=this.$locale();if(!this.isValid())return G.invalidDate||g;var ee=F||"YYYY-MM-DDTHH:mm:ssZ",te=$.z(this),ae=this.$H,le=this.$m,ue=this.$M,ge=G.weekdays,Ee=G.months,qe=G.meridiem,qt=function(Me,ut,Kt,Cn){return Me&&(Me[ut]||Me(U,ee))||Kt[ut].slice(0,Cn)},Qn=function(Me){return $.s(ae%12||12,Me,"0")},Vt=qe||function(Me,ut,Kt){var Cn=Me<12?"AM":"PM";return Kt?Cn.toLowerCase():Cn};return ee.replace(f,function(Me,ut){return ut||function(Kt){switch(Kt){case"YY":return String(U.$y).slice(-2);case"YYYY":return $.s(U.$y,4,"0");case"M":return ue+1;case"MM":return $.s(ue+1,2,"0");case"MMM":return qt(G.monthsShort,ue,Ee,3);case"MMMM":return qt(Ee,ue);case"D":return U.$D;case"DD":return $.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return qt(G.weekdaysMin,U.$W,ge,2);case"ddd":return qt(G.weekdaysShort,U.$W,ge,3);case"dddd":return ge[U.$W];case"H":return String(ae);case"HH":return $.s(ae,2,"0");case"h":return Qn(1);case"hh":return Qn(2);case"a":return Vt(ae,le,!0);case"A":return Vt(ae,le,!1);case"m":return String(le);case"mm":return $.s(le,2,"0");case"s":return String(U.$s);case"ss":return $.s(U.$s,2,"0");case"SSS":return $.s(U.$ms,3,"0");case"Z":return te}return null}(Me)||te.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(F,U,G){var ee,te=this,ae=$.p(U),le=I(F),ue=(le.utcOffset()-this.utcOffset())*o,ge=this-le,Ee=function(){return $.m(te,le)};switch(ae){case p:ee=Ee()/12;break;case h:ee=Ee();break;case u:ee=Ee()/3;break;case d:ee=(ge-ue)/6048e5;break;case c:ee=(ge-ue)/864e5;break;case l:ee=ge/i;break;case s:ee=ge/o;break;case r:ee=ge/n;break;default:ee=ge}return G?ee:$.a(ee)},D.daysInMonth=function(){return this.endOf(h).$D},D.$locale=function(){return k[this.$L]},D.locale=function(F,U){if(!F)return this.$L;var G=this.clone(),ee=E(F,U,!0);return ee&&(G.$L=ee),G},D.clone=function(){return $.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},V}(),q=R.prototype;return I.prototype=q,[["$ms",a],["$s",r],["$m",s],["$H",l],["$W",c],["$M",h],["$y",p],["$D",m]].forEach(function(V){q[V[1]]=function(D){return this.$g(D,V[0],V[1])}}),I.extend=function(V,D){return V.$i||(V(D,R,I),V.$i=!0),I},I.locale=E,I.isDayjs=_,I.unix=function(V){return I(1e3*V)},I.en=k[S],I.Ls=k,I.p={},I})}(es)),es.exports}var fF=gF();const Re=_i(fF);var ts={exports:{}},mF=ts.exports,Zg;function vF(){return Zg||(Zg=1,function(e,t){(function(n,o){e.exports=o()})(mF,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(f){this[v]=+f}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(f){if(!f||f==="Z")return 0;var y=f.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x}(v)}],u=function(v){var f=l[v];return f&&(f.indexOf?f:f.s.concat(f.f))},p=function(v,f){var y,x=l.meridiem;if(x){for(var w=1;w<=24;w+=1)if(v.indexOf(x(w,0,f))>-1){y=w>12;break}}else y=v===(f?"pm":"PM");return y},m={A:[s,function(v){this.afternoon=p(v,!1)}],a:[s,function(v){this.afternoon=p(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[r,d("seconds")],ss:[r,d("seconds")],m:[r,d("minutes")],mm:[r,d("minutes")],H:[r,d("hours")],h:[r,d("hours")],HH:[r,d("hours")],hh:[r,d("hours")],D:[r,d("day")],DD:[a,d("day")],Do:[s,function(v){var f=l.ordinal,y=v.match(/\d+/);if(this.day=y[0],f)for(var x=1;x<=31;x+=1)f(x).replace(/\[|\]/g,"")===v&&(this.day=x)}],w:[r,d("week")],ww:[a,d("week")],M:[r,d("month")],MM:[a,d("month")],MMM:[s,function(v){var f=u("months"),y=(u("monthsShort")||f.map(function(x){return x.slice(0,3)})).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[s,function(v){var f=u("months").indexOf(v)+1;if(f<1)throw new Error;this.month=f%12||f}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(v){this.year=c(v)}],YYYY:[/\d{4}/,d("year")],Z:h,ZZ:h};function g(v){var f,y;f=v,y=l&&l.formats;for(var x=(v=f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,$,R){var q=R&&R.toUpperCase();return $||y[R]||n[R]||y[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,D,F){return D||F.slice(1)})})).match(o),w=x.length,S=0;S<w;S+=1){var k=x[S],O=m[k],_=O&&O[0],E=O&&O[1];x[S]=E?{regex:_,parser:E}:k.replace(/^\[|\]$/g,"")}return function(I){for(var $={},R=0,q=0;R<w;R+=1){var V=x[R];if(typeof V=="string")q+=V.length;else{var D=V.regex,F=V.parser,U=I.slice(q),G=D.exec(U)[0];F.call($,G),I=I.replace(G,"")}}return function(ee){var te=ee.afternoon;if(te!==void 0){var ae=ee.hours;te?ae<12&&(ee.hours+=12):ae===12&&(ee.hours=0),delete ee.afternoon}}($),$}}return function(v,f,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var x=f.prototype,w=x.parse;x.parse=function(S){var k=S.date,O=S.utc,_=S.args;this.$u=O;var E=_[1];if(typeof E=="string"){var I=_[2]===!0,$=_[3]===!0,R=I||$,q=_[2];$&&(q=_[2]),l=this.$locale(),!I&&q&&(l=y.Ls[q]),this.$d=function(U,G,ee,te){try{if(["x","X"].indexOf(G)>-1)return new Date((G==="X"?1e3:1)*U);var ae=g(G)(U),le=ae.year,ue=ae.month,ge=ae.day,Ee=ae.hours,qe=ae.minutes,qt=ae.seconds,Qn=ae.milliseconds,Vt=ae.zone,Me=ae.week,ut=new Date,Kt=ge||(le||ue?1:ut.getDate()),Cn=le||ut.getFullYear(),Ba=0;le&&!ue||(Ba=ue>0?ue-1:ut.getMonth());var za,Cl=Ee||0,_l=qe||0,Sl=qt||0,kl=Qn||0;return Vt?new Date(Date.UTC(Cn,Ba,Kt,Cl,_l,Sl,kl+60*Vt.offset*1e3)):ee?new Date(Date.UTC(Cn,Ba,Kt,Cl,_l,Sl,kl)):(za=new Date(Cn,Ba,Kt,Cl,_l,Sl,kl),Me&&(za=te(za).week(Me).toDate()),za)}catch{return new Date("")}}(k,E,O,y),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),R&&k!=this.format(E)&&(this.$d=new Date("")),l={}}else if(E instanceof Array)for(var V=E.length,D=1;D<=V;D+=1){_[1]=E[D-1];var F=y.apply(this,_);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}D===V&&(this.$d=new Date(""))}else w.call(this,S)}}})}(ts)),ts.exports}var bF=vF();const yF=_i(bF);var ns={exports:{}},xF=ns.exports,Jg;function wF(){return Jg||(Jg=1,function(e,t){(function(n,o){e.exports=o()})(xF,function(){return function(n,o){var i=o.prototype,a=i.format;i.format=function(r){var s=this,l=this.$locale();if(!this.isValid())return a.bind(this)(r);var c=this.$utils(),d=(r||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),h==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),h==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return h}});return a.bind(this)(d)}}})}(ns)),ns.exports}var CF=wF();const _F=_i(CF);var os={exports:{}},SF=os.exports,Qg;function kF(){return Qg||(Qg=1,function(e,t){(function(n,o){e.exports=o()})(SF,function(){var n="month",o="quarter";return function(i,a){var r=a.prototype;r.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var s=r.add;r.add=function(c,d){return c=Number(c),this.$utils().p(d)===o?this.add(3*c,n):s.bind(this)(c,d)};var l=r.startOf;r.startOf=function(c,d){var h=this.$utils(),u=!!h.u(d)||d;if(h.p(c)===o){var p=this.quarter()-1;return u?this.month(3*p).startOf(n).startOf("day"):this.month(3*p+2).endOf(n).endOf("day")}return l.bind(this)(c,d)}}})}(os)),os.exports}var EF=kF();const OF=_i(EF);var is={exports:{}},$F=is.exports,ef;function IF(){return ef||(ef=1,function(e,t){(function(n,o){e.exports=o()})($F,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(o,i,a){var r=i.prototype,s=r.format;a.en.formats=n,r.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,d=function(h,u){return h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,m,g){var v=g&&g.toUpperCase();return m||u[g]||n[g]||u[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,y,x){return y||x.slice(1)})})}(l,c===void 0?{}:c);return s.call(this,d)}}})}(is)),is.exports}var TF=IF();const PF=_i(TF);var as={exports:{}},VF=as.exports,tf;function DF(){return tf||(tf=1,function(e,t){(function(n,o){e.exports=o()})(VF,function(){var n="day";return function(o,i,a){var r=function(c){return c.add(4-c.isoWeekday(),n)},s=i.prototype;s.isoWeekYear=function(){return r(this).year()},s.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),n);var d,h,u,p,m=r(this),g=(d=this.isoWeekYear(),h=this.$u,u=(h?a.utc:a)().year(d).startOf("year"),p=4-u.isoWeekday(),u.isoWeekday()>4&&(p+=7),u.add(p,n));return m.diff(g,"week")+1},s.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var l=s.startOf;s.startOf=function(c,d){var h=this.$utils(),u=!!h.u(d)||d;return h.p(c)==="isoweek"?u?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(c,d)}}})}(as)),as.exports}var MF=DF();const RF=_i(MF);Re.extend(_F);Re.extend(OF);Re.extend(PF);Re.extend(yF);Re.extend(RF);var FF={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};iy._date.override({formats:function(){return FF},parse:function(e,t){var n=typeof e;return e===null||n==="undefined"?null:n==="string"&&typeof t=="string"?Re(e,t).isValid()?Re(e,t).valueOf():null:e instanceof Re?null:Re(e).isValid()?Re(e).valueOf():null},format:function(e,t){return Re(e).format(t)},add:function(e,t,n){return Re(e).add(t,n).valueOf()},diff:function(e,t,n){return Re(e).diff(Re(t),n)},startOf:function(e,t,n){if(t==="isoWeek"){var o=typeof n=="number"&&n>0&&n<7?n:1;return Re(e).isoWeekday(o).startOf("day").valueOf()}return Re(e).startOf(t).valueOf()},endOf:function(e,t){return Re(e).endOf(t).valueOf()}});const AF=ne({className:"timelineTooltip",slots:["container","arrow","indicator","content","title","row","label","value"],variants:{placement:{top:{},"top-start":{},"top-end":{},bottom:{},"bottom-start":{},"bottom-end":{},left:{},right:{}}},defaultVariants:{placement:"top"},base:{container:{position:"relative",display:"flex",background:"background.default",border:"1px solid",borderColor:"border.muted",borderRadius:"md",boxShadow:"stroke-bordered",fontFamily:"sans",fontSize:"xs",color:"text.subtle",pointerEvents:"none",transition:"opacity 0.1s ease"},arrow:{position:"absolute",width:"8",height:"8",background:"background.default",border:"1px solid",borderColor:"border.muted",transform:"rotate(45deg)",zIndex:-1},indicator:{width:"4",background:"background.success-bold-default",borderRadius:"2px 0 0 2px",flexShrink:0},content:{padding:"8"},title:{color:"text.subtle",marginBottom:"6",textStyle:"body_small_semibold"},row:{display:"flex",justifyContent:"space-between",marginBottom:"2",gap:"20"},label:{color:"text.subtle",textStyle:"body_xsmall_regular",minWidth:"max-content"},value:{color:"text.subtle",textStyle:"body_xsmall_regular",textAlign:"right"}},compoundVariants:[{placement:"top",css:{arrow:{bottom:"-4px",left:"50%",marginLeft:"-4px"}}},{placement:"top-start",css:{arrow:{bottom:"-4px",left:"25%",marginLeft:"-4px"}}},{placement:"top-end",css:{arrow:{bottom:"-4px",left:"75%",marginLeft:"-4px"}}},{placement:"bottom",css:{arrow:{top:"-4px",left:"50%",marginLeft:"-4px"}}},{placement:"bottom-start",css:{arrow:{top:"-4px",left:"25%",marginLeft:"-4px"}}},{placement:"bottom-end",css:{arrow:{top:"-4px",left:"75%",marginLeft:"-4px"}}},{placement:"left",css:{arrow:{right:"-4px",top:"50%",marginTop:"-4px"}}},{placement:"right",css:{arrow:{left:"-4px",top:"50%",marginTop:"-4px"}}}]}),nf=M({__name:"TimelineTooltip",props:{data:{},placement:{default:"top"},targetPosition:{}},setup(e){const t=e,n=A(()=>AF({placement:t.placement})),o=A(()=>({backgroundColor:t.data.barColor||void 0})),i=A(()=>{if(t.data.isRunning){const s=Date.now()-t.data.startTime.getTime(),l=Math.round(s/(1e3*60));return l<60?`${l} min`:`${Math.floor(l/60)}h ${l%60}m`}else{const s=t.data.endTime.getTime()-t.data.startTime.getTime(),l=Math.round(s/(1e3*60));return l<60?`${l} min`:`${Math.floor(l/60)}h ${l%60}m`}}),a=A(()=>t.data.startTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"})),r=A(()=>t.data.endTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"}));return(s,l)=>(C(),H("div",{class:N(n.value.container),"data-testid":"timeline-tooltip"},[z("div",{class:N(n.value.arrow)},null,2),z("div",{class:N(n.value.indicator),style:Ny(o.value)},null,6),z("div",{class:N(n.value.content)},[z("div",{class:N(n.value.title)},oe(e.data.title),3),z("div",{class:N(n.value.row)},[z("span",{class:N(n.value.label)},oe(e.data.isRunning?"Running for":"Run Duration"),3),z("span",{class:N(n.value.value)},oe(i.value),3)],2),z("div",{class:N(n.value.row)},[z("span",{class:N(n.value.label)},"Start Time",2),z("span",{class:N(n.value.value)},oe(a.value),3)],2),e.data.isRunning?Q("",!0):(C(),H("div",{key:0,class:N(n.value.row)},[z("span",{class:N(n.value.label)},"End Time",2),z("span",{class:N(n.value.value)},oe(r.value),3)],2)),e.data.extraData?(C(!0),H(Ce,{key:1},Ge(Object.entries(e.data.extraData),([c,d])=>(C(),H("div",{key:c,class:N(n.value.row)},[z("span",{class:N(n.value.label)},oe(c),3),z("span",{class:N(n.value.value)},oe(d),3)],2))),128)):Q("",!0)],2)],2))}});var LF=Object.defineProperty,NF=(e,t,n)=>t in e?LF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qi=(e,t,n)=>NF(e,typeof t!="symbol"?t+"":t,n);class BF{constructor(){qi(this,"app",null),qi(this,"container",null),qi(this,"tooltipId","timeline-tooltip"),qi(this,"VIEWPORT_PADDING",8),qi(this,"ARROW_SIZE",8)}calculateOptimalPosition(t,n){const o={width:window.innerWidth,height:window.innerHeight,scrollX:window.pageXOffset,scrollY:window.pageYOffset},{left:i,top:a}=t,{height:r}=n,s=["top","bottom","top-start","top-end","bottom-start","bottom-end","left","right"];for(const l of s){const c=this.getPositionForPlacement(l,t,n);if(this.isPositionInViewport(c,n,o))return{...c,placement:l}}return{...this.constrainToViewport({left:i,top:a-r-this.ARROW_SIZE},n,o),placement:"top"}}getPositionForPlacement(t,n,o){const{left:i,top:a}=n,{width:r,height:s}=o;switch(t){case"top":return{left:i-r/2,top:a-s-this.ARROW_SIZE};case"bottom":return{left:i-r/2,top:a+this.ARROW_SIZE};case"top-start":return{left:i-r*.25,top:a-s-this.ARROW_SIZE};case"top-end":return{left:i-r*.75,top:a-s-this.ARROW_SIZE};case"bottom-start":return{left:i-r*.25,top:a+this.ARROW_SIZE};case"bottom-end":return{left:i-r*.75,top:a+this.ARROW_SIZE};case"left":return{left:i-r-this.ARROW_SIZE,top:a-s/2};case"right":return{left:i+this.ARROW_SIZE,top:a-s/2};default:return{left:i-r/2,top:a-s-this.ARROW_SIZE}}}isPositionInViewport(t,n,o){const{left:i,top:a}=t,{width:r,height:s}=n;return i>=o.scrollX+this.VIEWPORT_PADDING&&a>=o.scrollY+this.VIEWPORT_PADDING&&i+r<=o.scrollX+o.width-this.VIEWPORT_PADDING&&a+s<=o.scrollY+o.height-this.VIEWPORT_PADDING}constrainToViewport(t,n,o){const{width:i,height:a}=n;let{left:r,top:s}=t;const l=o.scrollX+this.VIEWPORT_PADDING,c=o.scrollX+o.width-i-this.VIEWPORT_PADDING;r=Math.max(l,Math.min(r,c));const d=o.scrollY+this.VIEWPORT_PADDING,h=o.scrollY+o.height-a-this.VIEWPORT_PADDING;return s=Math.max(d,Math.min(s,h)),{left:r,top:s}}show(t,n){this.hide();const o=document.createElement("div");o.style.cssText=`
|
|
10
|
+
`):e}function JR(e,t){const{element:n,datasetIndex:o,index:i}=t,a=e.getDatasetMeta(o).controller,{label:r,value:s}=a.getLabelAndValue(i);return{chart:e,label:r,parsed:a.getParsed(i),raw:e.data.datasets[o].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Lg(e,t){const n=e.chart.ctx,{body:o,footer:i,title:a}=e,{boxWidth:r,boxHeight:s}=t,l=Ht(t.bodyFont),c=Ht(t.titleFont),d=Ht(t.footerFont),h=a.length,u=i.length,p=o.length,m=Un(t.padding);let g=m.height,v=0,f=o.reduce((w,S)=>w+S.before.length+S.lines.length+S.after.length,0);if(f+=e.beforeBody.length+e.afterBody.length,h&&(g+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),f){const w=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;g+=p*w+(f-p)*l.lineHeight+(f-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*d.lineHeight+(u-1)*t.footerSpacing);let y=0;const x=function(w){v=Math.max(v,n.measureText(w).width+y)};return n.save(),n.font=c.string,he(e.title,x),n.font=l.string,he(e.beforeBody.concat(e.afterBody),x),y=t.displayColors?r+2+t.boxPadding:0,he(o,w=>{he(w.before,x),he(w.lines,x),he(w.after,x)}),y=0,n.font=d.string,he(e.footer,x),n.restore(),v+=m.width,{width:v,height:g}}function QR(e,t){const{y:n,height:o}=t;return n<o/2?"top":n>e.height-o/2?"bottom":"center"}function eF(e,t,n,o){const{x:i,width:a}=o,r=n.caretSize+n.caretPadding;if(e==="left"&&i+a+r>t.width||e==="right"&&i-a-r<0)return!0}function tF(e,t,n,o){const{x:i,width:a}=n,{width:r,chartArea:{left:s,right:l}}=e;let c="center";return o==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=r-a/2&&(c="right"),eF(c,e,t,n)&&(c="center"),c}function Ng(e,t,n){const o=n.yAlign||t.yAlign||QR(e,n);return{xAlign:n.xAlign||t.xAlign||tF(e,t,n,o),yAlign:o}}function nF(e,t){let{x:n,width:o}=e;return t==="right"?n-=o:t==="center"&&(n-=o/2),n}function oF(e,t,n){let{y:o,height:i}=e;return t==="top"?o+=n:t==="bottom"?o-=i+n:o-=i/2,o}function Bg(e,t,n,o){const{caretSize:i,caretPadding:a,cornerRadius:r}=e,{xAlign:s,yAlign:l}=n,c=i+a,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:p}=ua(r);let m=nF(t,s);const g=oF(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(d,u)+i:s==="right"&&(m+=Math.max(h,p)+i),{x:It(m,0,o.width-t.width),y:It(g,0,o.height-t.height)}}function Sr(e,t,n){const o=Un(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-o.right:e.x+o.left}function zg(e){return Ft([],en(e))}function iF(e,t,n){return wi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Hg(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const my={beforeTitle:Jt,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(o>0&&t.dataIndex<o)return n[t.dataIndex]}return""},afterTitle:Jt,beforeBody:Jt,beforeLabel:Jt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return pe(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Jt,afterBody:Jt,beforeFooter:Jt,footer:Jt,afterFooter:Jt};function Ke(e,t,n,o){const i=e[t].call(n,o);return typeof i>"u"?my[t].call(n,o):i}class rd extends gi{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,a=new ty(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=iF(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:o}=n,i=Ke(o,"beforeTitle",this,t),a=Ke(o,"title",this,t),r=Ke(o,"afterTitle",this,t);let s=[];return s=Ft(s,en(i)),s=Ft(s,en(a)),s=Ft(s,en(r)),s}getBeforeBody(t,n){return zg(Ke(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:o}=n,i=[];return he(t,a=>{const r={before:[],lines:[],after:[]},s=Hg(o,a);Ft(r.before,en(Ke(s,"beforeLabel",this,a))),Ft(r.lines,Ke(s,"label",this,a)),Ft(r.after,en(Ke(s,"afterLabel",this,a))),i.push(r)}),i}getAfterBody(t,n){return zg(Ke(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:o}=n,i=Ke(o,"beforeFooter",this,t),a=Ke(o,"footer",this,t),r=Ke(o,"afterFooter",this,t);let s=[];return s=Ft(s,en(i)),s=Ft(s,en(a)),s=Ft(s,en(r)),s}_createItems(t){const n=this._active,o=this.chart.data,i=[],a=[],r=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(JR(this.chart,n[l]));return t.filter&&(s=s.filter((d,h,u)=>t.filter(d,h,u,o))),t.itemSort&&(s=s.sort((d,h)=>t.itemSort(d,h,o))),he(s,d=>{const h=Hg(t.callbacks,d);i.push(Ke(h,"labelColor",this,d)),a.push(Ke(h,"labelPointStyle",this,d)),r.push(Ke(h,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=s,s}update(t,n){const o=this.options.setContext(this.getContext()),i=this._active;let a,r=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=pa[o.position].call(this,i,this._eventPosition);r=this._createItems(o),this.title=this.getTitle(r,o),this.beforeBody=this.getBeforeBody(r,o),this.body=this.getBody(r,o),this.afterBody=this.getAfterBody(r,o),this.footer=this.getFooter(r,o);const l=this._size=Lg(this,o),c=Object.assign({},s,l),d=Ng(this.chart,o,c),h=Bg(o,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,o,i){const a=this.getCaretPosition(t,o,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,o){const{xAlign:i,yAlign:a}=this,{caretSize:r,cornerRadius:s}=o,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:h}=ua(s),{x:u,y:p}=t,{width:m,height:g}=n;let v,f,y,x,w,S;return a==="center"?(w=p+g/2,i==="left"?(v=u,f=v-r,x=w+r,S=w-r):(v=u+m,f=v+r,x=w-r,S=w+r),y=v):(i==="left"?f=u+Math.max(l,d)+r:i==="right"?f=u+m-Math.max(c,h)-r:f=this.caretX,a==="top"?(x=p,w=x-r,v=f-r,y=f+r):(x=p+g,w=x+r,v=f+r,y=f-r),S=x),{x1:v,x2:f,x3:y,y1:x,y2:w,y3:S}}drawTitle(t,n,o){const i=this.title,a=i.length;let r,s,l;if(a){const c=ic(o.rtl,this.x,this.width);for(t.x=Sr(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",r=Ht(o.titleFont),s=o.titleSpacing,n.fillStyle=o.titleColor,n.font=r.string,l=0;l<a;++l)n.fillText(i[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s,l+1===a&&(t.y+=o.titleMarginBottom-s)}}_drawColorBox(t,n,o,i,a){const r=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:c}=a,d=Ht(a.bodyFont),h=Sr(this,"left",a),u=i.x(h),p=l<d.lineHeight?(d.lineHeight-l)/2:0,m=n.y+p;if(a.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation},v=i.leftForLtr(u,c)+c/2,f=m+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,ag(t,g,v,f),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,ag(t,g,v,f)}else{t.lineWidth=de(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=i.leftForLtr(u,c),v=i.leftForLtr(i.xPlus(u,1),c-2),f=ua(r.borderRadius);Object.values(f).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,od(t,{x:g,y:m,w:c,h:l,radius:f}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),od(t,{x:v,y:m+1,w:c-2,h:l-2,radius:f}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(g,m,c,l),t.strokeRect(g,m,c,l),t.fillStyle=r.backgroundColor,t.fillRect(v,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[o]}drawBody(t,n,o){const{body:i}=this,{bodySpacing:a,bodyAlign:r,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:d}=o,h=Ht(o.bodyFont);let u=h.lineHeight,p=0;const m=ic(o.rtl,this.x,this.width),g=function(_){n.fillText(_,m.x(t.x+p),t.y+u/2),t.y+=u+a},v=m.textAlign(r);let f,y,x,w,S,k,O;for(n.textAlign=r,n.textBaseline="middle",n.font=h.string,t.x=Sr(this,v,o),n.fillStyle=o.bodyColor,he(this.beforeBody,g),p=s&&v!=="right"?r==="center"?c/2+d:c+2+d:0,w=0,k=i.length;w<k;++w){for(f=i[w],y=this.labelTextColors[w],n.fillStyle=y,he(f.before,g),x=f.lines,s&&x.length&&(this._drawColorBox(n,t,w,m,o),u=Math.max(h.lineHeight,l)),S=0,O=x.length;S<O;++S)g(x[S]),u=h.lineHeight;he(f.after,g)}p=0,u=h.lineHeight,he(this.afterBody,g),t.y-=a}drawFooter(t,n,o){const i=this.footer,a=i.length;let r,s;if(a){const l=ic(o.rtl,this.x,this.width);for(t.x=Sr(this,o.footerAlign,o),t.y+=o.footerMarginTop,n.textAlign=l.textAlign(o.footerAlign),n.textBaseline="middle",r=Ht(o.footerFont),n.fillStyle=o.footerColor,n.font=r.string,s=0;s<a;++s)n.fillText(i[s],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+o.footerSpacing}}drawBackground(t,n,o,i){const{xAlign:a,yAlign:r}=this,{x:s,y:l}=t,{width:c,height:d}=o,{topLeft:h,topRight:u,bottomLeft:p,bottomRight:m}=ua(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+h,l),r==="top"&&this.drawCaret(t,n,o,i),n.lineTo(s+c-u,l),n.quadraticCurveTo(s+c,l,s+c,l+u),r==="center"&&a==="right"&&this.drawCaret(t,n,o,i),n.lineTo(s+c,l+d-m),n.quadraticCurveTo(s+c,l+d,s+c-m,l+d),r==="bottom"&&this.drawCaret(t,n,o,i),n.lineTo(s+p,l+d),n.quadraticCurveTo(s,l+d,s,l+d-p),r==="center"&&a==="left"&&this.drawCaret(t,n,o,i),n.lineTo(s,l+h),n.quadraticCurveTo(s,l,s+h,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,o=this.$animations,i=o&&o.x,a=o&&o.y;if(i||a){const r=pa[t.position].call(this,this._active,this._eventPosition);if(!r)return;const s=this._size=Lg(this,t),l=Object.assign({},r,this._size),c=Ng(n,t,l),d=Bg(t,l,c,n);(i._to!==d.x||a._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const r=Un(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=o,this.drawBackground(a,t,i,n),c2(t,n.textDirection),a.y+=r.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),d2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const o=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!Is(o,i),r=this._positionChanged(i,n);(a||r)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],r=this._getActiveElements(t,a,n,o),s=this._positionChanged(r,t),l=n||!Is(r,a)||s;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,o,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,a.mode,a,o);return a.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:o,caretY:i,options:a}=this,r=pa[a.position].call(this,t,n);return r!==!1&&(o!==r.x||i!==r.y)}}ce(rd,"positioners",pa);var aF={id:"tooltip",_element:rd,positioners:pa,afterInit(e,t,n){n&&(e.tooltip=new rd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:my},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const rF=(e,t,n,o)=>(typeof t=="string"?(n=e.push(t)-1,o.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function sF(e,t,n,o){const i=e.indexOf(t);if(i===-1)return rF(e,t,n,o);const a=e.lastIndexOf(t);return i!==a?n:i}const lF=(e,t)=>e===null?null:It(Math.round(e),0,t);function vy(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class sd extends Ci{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:a}of n)o[i]===a&&o.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(pe(t))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===t?n:sF(o,t,ye(n,t),this._addedLabels),lF(n,o.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const t=this.min,n=this.max,o=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let r=t;r<=n;r++)i.push({value:r});return i}getLabelForValue(t){return vy.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ce(sd,"id","category"),ce(sd,"defaults",{ticks:{callback:vy}});function cF(e,t){const n=[],{bounds:o,step:i,min:a,max:r,precision:s,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=e,u=i||1,p=c-1,{min:m,max:g}=t,v=!pe(a),f=!pe(r),y=!pe(l),x=(g-m)/(d+1);let w=qp((g-m)/p/u)*u,S,k,O,_;if(w<1e-14&&!v&&!f)return[{value:m},{value:g}];_=Math.ceil(g/w)-Math.floor(m/w),_>p&&(w=qp(_*w/p/u)*u),pe(s)||(S=Math.pow(10,s),w=Math.ceil(w*S)/S),o==="ticks"?(k=Math.floor(m/w)*w,O=Math.ceil(g/w)*w):(k=m,O=g),v&&f&&i&&gM((r-a)/i,w/1e3)?(_=Math.round(Math.min((r-a)/w,c)),w=(r-a)/_,k=a,O=r):y?(k=v?a:k,O=f?r:O,_=l-1,w=(O-k)/_):(_=(O-k)/w,Xr(_,Math.round(_),w/1e3)?_=Math.round(_):_=Math.ceil(_));const E=Math.max(Kp(w),Kp(k));S=Math.pow(10,pe(s)?E:s),k=Math.round(k*S)/S,O=Math.round(O*S)/S;let I=0;for(v&&(h&&k!==a?(n.push({value:a}),k<a&&I++,Xr(Math.round((k+I*w)*S)/S,a,jg(a,x,e))&&I++):k<a&&I++);I<_;++I){const $=Math.round((k+I*w)*S)/S;if(f&&$>r)break;n.push({value:$})}return f&&h&&O!==r?n.length&&Xr(n[n.length-1].value,r,jg(r,x,e))?n[n.length-1].value=r:n.push({value:r}):(!f||O===r)&&n.push({value:O}),n}function jg(e,t,{horizontal:n,minRotation:o}){const i=vo(o),a=(n?Math.sin(i):Math.cos(i))||.001,r=.75*t*(""+e).length;return Math.min(t/a,r)}class dF extends Ci{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return pe(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:a}=this;const r=l=>i=n?i:l,s=l=>a=o?a:l;if(t){const l=zn(i),c=zn(a);l<0&&c<0?s(0):l>0&&c>0&&r(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||r(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=t,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,r=cF(i,a);return t.bounds==="ticks"&&fM(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&t.length){const i=(o-n)/Math.max(t.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(t){return Wb(t,this.chart.options.locale,this.options.ticks.format)}}class ld extends dF{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=wt(t)?t:0,this.max=wt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,o=vo(this.options.ticks.minRotation),i=(t?Math.sin(o):Math.cos(o))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ce(ld,"id","linear"),ce(ld,"defaults",{ticks:{callback:Gb.formatters.numeric}});const yl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Je=Object.keys(yl);function Wg(e,t){return e-t}function Gg(e,t){if(pe(t))return null;const n=e._adapter,{parser:o,round:i,isoWeekday:a}=e._parseOpts;let r=t;return typeof o=="function"&&(r=o(r)),wt(r)||(r=typeof o=="string"?n.parse(r,o):n.parse(r)),r===null?null:(i&&(r=i==="week"&&(Vs(a)||a===!0)?n.startOf(r,"isoWeek",a):n.startOf(r,i)),+r)}function Ug(e,t,n,o){const i=Je.length;for(let a=Je.indexOf(e);a<i-1;++a){const r=yl[Je[a]],s=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(s*r.size))<=o)return Je[a]}return Je[i-1]}function uF(e,t,n,o,i){for(let a=Je.length-1;a>=Je.indexOf(n);a--){const r=Je[a];if(yl[r].common&&e._adapter.diff(i,o,r)>=t-1)return r}return Je[n?Je.indexOf(n):0]}function hF(e){for(let t=Je.indexOf(e)+1,n=Je.length;t<n;++t)if(yl[Je[t]].common)return Je[t]}function Yg(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:o,hi:i}=xu(n,t),a=n[o]>=t?n[o]:n[i];e[a]=!0}}function pF(e,t,n,o){const i=e._adapter,a=+i.startOf(t[0].value,o),r=t[t.length-1].value;let s,l;for(s=a;s<=r;s=+i.add(s,1,o))l=n[s],l>=0&&(t[l].major=!0);return t}function qg(e,t,n){const o=[],i={},a=t.length;let r,s;for(r=0;r<a;++r)s=t[r],i[s]=r,o.push({value:s,major:!1});return a===0||!n?o:pF(e,o,i,n)}class Sa extends Ci{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const o=t.time||(t.time={}),i=this._adapter=new iy._date(t.adapters.date);i.init(n),la(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Gg(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,o=t.time.unit||"day";let{min:i,max:a,minDefined:r,maxDefined:s}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!r||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=wt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),a=wt(a)&&!isNaN(a)?a:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],o=t[t.length-1]),{min:n,max:o}}buildTicks(){const t=this.options,n=t.time,o=t.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,r=this.max,s=CM(i,a,r);return this._unit=n.unit||(o.autoSkip?Ug(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):uF(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:hF(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),qg(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,o=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?o=a:o=(a-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=It(n,0,r),o=It(o,0,r),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,n=this.min,o=this.max,i=this.options,a=i.time,r=a.unit||Ug(a.minUnit,n,o,this._getLabelCapacity(n)),s=ye(i.ticks.stepSize,1),l=r==="week"?a.isoWeekday:!1,c=Vs(l)||l===!0,d={};let h=n,u,p;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":r),t.diff(o,n,r)>1e5*s)throw new Error(n+" and "+o+" are too far apart with stepSize of "+s+" "+r);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(u=h,p=0;u<o;u=+t.add(u,s,r),p++)Yg(d,u,m);return(u===o||i.bounds==="ticks"||p===1)&&Yg(d,u,m),Object.keys(d).sort(Wg).map(g=>+g)}getLabelForValue(t){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(t,o.tooltipFormat):n.format(t,o.displayFormats.datetime)}format(t,n){const o=this.options.time.displayFormats,i=this._unit,a=n||o[i];return this._adapter.format(t,a)}_tickFormatFunction(t,n,o,i){const a=this.options,r=a.ticks.callback;if(r)return Se(r,[t,n,o],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&s[l],h=c&&s[c],u=o[n],p=c&&h&&u&&u.major;return this._adapter.format(t,i||(p?h:d))}generateTickLabels(t){let n,o,i;for(n=0,o=t.length;n<o;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,o=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,o=this.ctx.measureText(t).width,i=vo(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),r=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:o*a+s*r,h:o*r+s*a}}_getLabelCapacity(t){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,a=this._tickFormatFunction(t,0,qg(this,[t],this._majorUnit),i),r=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,o;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,o;if(t.length)return t;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)t.push(Gg(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Bb(t.sort(Wg))}}ce(Sa,"id","time"),ce(Sa,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function kr(e,t,n){let o=0,i=e.length-1,a,r,s,l;n?(t>=e[o].pos&&t<=e[i].pos&&({lo:o,hi:i}=td(e,"pos",t)),{pos:a,time:s}=e[o],{pos:r,time:l}=e[i]):(t>=e[o].time&&t<=e[i].time&&({lo:o,hi:i}=td(e,"time",t)),{time:a,pos:s}=e[o],{time:r,pos:l}=e[i]);const c=r-a;return c?s+(l-s)*(t-a)/c:s}class Kg extends Sa{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=kr(n,this.min),this._tableRange=kr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:o}=this,i=[],a=[];let r,s,l,c,d;for(r=0,s=t.length;r<s;++r)c=t[r],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(r=0,s=i.length;r<s;++r)d=i[r+1],l=i[r-1],c=i[r],Math.round((d+l)/2)!==c&&a.push({time:c,pos:r/(s-1)});return a}_generate(){const t=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(t)||!o.length)&&o.splice(0,0,t),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?t=this.normalize(n.concat(o)):t=n.length?n:o,t=this._cache.all=t,t}getDecimalForValue(t){return(kr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return kr(this._table,o*this._tableRange+this._minPos,!0)}}ce(Kg,"id","timeseries"),ce(Kg,"defaults",Sa.defaults);function _i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var es={exports:{}},gF=es.exports,Xg;function fF(){return Xg||(Xg=1,function(e,t){(function(n,o){e.exports=o()})(gF,function(){var n=1e3,o=6e4,i=36e5,a="millisecond",r="second",s="minute",l="hour",c="day",d="week",h="month",u="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var D=["th","st","nd","rd"],F=V%100;return"["+V+(D[(F-20)%10]||D[F]||D[0])+"]"}},x=function(V,D,F){var U=String(V);return!U||U.length>=D?V:""+Array(D+1-U.length).join(F)+V},w={s:x,z:function(V){var D=-V.utcOffset(),F=Math.abs(D),U=Math.floor(F/60),G=F%60;return(D<=0?"+":"-")+x(U,2,"0")+":"+x(G,2,"0")},m:function V(D,F){if(D.date()<F.date())return-V(F,D);var U=12*(F.year()-D.year())+(F.month()-D.month()),G=D.clone().add(U,h),ee=F-G<0,te=D.clone().add(U+(ee?-1:1),h);return+(-(U+(F-G)/(ee?G-te:te-G))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:h,y:p,w:d,d:c,D:m,h:l,m:s,s:r,ms:a,Q:u}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},S="en",k={};k[S]=y;var O="$isDayjsObject",_=function(V){return V instanceof R||!(!V||!V[O])},E=function V(D,F,U){var G;if(!D)return S;if(typeof D=="string"){var ee=D.toLowerCase();k[ee]&&(G=ee),F&&(k[ee]=F,G=ee);var te=D.split("-");if(!G&&te.length>1)return V(te[0])}else{var ae=D.name;k[ae]=D,G=ae}return!U&&G&&(S=G),G||!U&&S},I=function(V,D){if(_(V))return V.clone();var F=typeof D=="object"?D:{};return F.date=V,F.args=arguments,new R(F)},$=w;$.l=E,$.i=_,$.w=function(V,D){return I(V,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var R=function(){function V(F){this.$L=E(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[O]=!0}var D=V.prototype;return D.parse=function(F){this.$d=function(U){var G=U.date,ee=U.utc;if(G===null)return new Date(NaN);if($.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var te=G.match(v);if(te){var ae=te[2]-1||0,le=(te[7]||"0").substring(0,3);return ee?new Date(Date.UTC(te[1],ae,te[3]||1,te[4]||0,te[5]||0,te[6]||0,le)):new Date(te[1],ae,te[3]||1,te[4]||0,te[5]||0,te[6]||0,le)}}return new Date(G)}(F),this.init()},D.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},D.$utils=function(){return $},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(F,U){var G=I(F);return this.startOf(U)<=G&&G<=this.endOf(U)},D.isAfter=function(F,U){return I(F)<this.startOf(U)},D.isBefore=function(F,U){return this.endOf(U)<I(F)},D.$g=function(F,U,G){return $.u(F)?this[U]:this.set(G,F)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(F,U){var G=this,ee=!!$.u(U)||U,te=$.p(F),ae=function(Vt,Re){var ut=$.w(G.$u?Date.UTC(G.$y,Re,Vt):new Date(G.$y,Re,Vt),G);return ee?ut:ut.endOf(c)},le=function(Vt,Re){return $.w(G.toDate()[Vt].apply(G.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Re)),G)},ue=this.$W,ge=this.$M,Ee=this.$D,qe="set"+(this.$u?"UTC":"");switch(te){case p:return ee?ae(1,0):ae(31,11);case h:return ee?ae(1,ge):ae(0,ge+1);case d:var qt=this.$locale().weekStart||0,Qn=(ue<qt?ue+7:ue)-qt;return ae(ee?Ee-Qn:Ee+(6-Qn),ge);case c:case m:return le(qe+"Hours",0);case l:return le(qe+"Minutes",1);case s:return le(qe+"Seconds",2);case r:return le(qe+"Milliseconds",3);default:return this.clone()}},D.endOf=function(F){return this.startOf(F,!1)},D.$set=function(F,U){var G,ee=$.p(F),te="set"+(this.$u?"UTC":""),ae=(G={},G[c]=te+"Date",G[m]=te+"Date",G[h]=te+"Month",G[p]=te+"FullYear",G[l]=te+"Hours",G[s]=te+"Minutes",G[r]=te+"Seconds",G[a]=te+"Milliseconds",G)[ee],le=ee===c?this.$D+(U-this.$W):U;if(ee===h||ee===p){var ue=this.clone().set(m,1);ue.$d[ae](le),ue.init(),this.$d=ue.set(m,Math.min(this.$D,ue.daysInMonth())).$d}else ae&&this.$d[ae](le);return this.init(),this},D.set=function(F,U){return this.clone().$set(F,U)},D.get=function(F){return this[$.p(F)]()},D.add=function(F,U){var G,ee=this;F=Number(F);var te=$.p(U),ae=function(ge){var Ee=I(ee);return $.w(Ee.date(Ee.date()+Math.round(ge*F)),ee)};if(te===h)return this.set(h,this.$M+F);if(te===p)return this.set(p,this.$y+F);if(te===c)return ae(1);if(te===d)return ae(7);var le=(G={},G[s]=o,G[l]=i,G[r]=n,G)[te]||1,ue=this.$d.getTime()+F*le;return $.w(ue,this)},D.subtract=function(F,U){return this.add(-1*F,U)},D.format=function(F){var U=this,G=this.$locale();if(!this.isValid())return G.invalidDate||g;var ee=F||"YYYY-MM-DDTHH:mm:ssZ",te=$.z(this),ae=this.$H,le=this.$m,ue=this.$M,ge=G.weekdays,Ee=G.months,qe=G.meridiem,qt=function(Re,ut,Kt,Cn){return Re&&(Re[ut]||Re(U,ee))||Kt[ut].slice(0,Cn)},Qn=function(Re){return $.s(ae%12||12,Re,"0")},Vt=qe||function(Re,ut,Kt){var Cn=Re<12?"AM":"PM";return Kt?Cn.toLowerCase():Cn};return ee.replace(f,function(Re,ut){return ut||function(Kt){switch(Kt){case"YY":return String(U.$y).slice(-2);case"YYYY":return $.s(U.$y,4,"0");case"M":return ue+1;case"MM":return $.s(ue+1,2,"0");case"MMM":return qt(G.monthsShort,ue,Ee,3);case"MMMM":return qt(Ee,ue);case"D":return U.$D;case"DD":return $.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return qt(G.weekdaysMin,U.$W,ge,2);case"ddd":return qt(G.weekdaysShort,U.$W,ge,3);case"dddd":return ge[U.$W];case"H":return String(ae);case"HH":return $.s(ae,2,"0");case"h":return Qn(1);case"hh":return Qn(2);case"a":return Vt(ae,le,!0);case"A":return Vt(ae,le,!1);case"m":return String(le);case"mm":return $.s(le,2,"0");case"s":return String(U.$s);case"ss":return $.s(U.$s,2,"0");case"SSS":return $.s(U.$ms,3,"0");case"Z":return te}return null}(Re)||te.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(F,U,G){var ee,te=this,ae=$.p(U),le=I(F),ue=(le.utcOffset()-this.utcOffset())*o,ge=this-le,Ee=function(){return $.m(te,le)};switch(ae){case p:ee=Ee()/12;break;case h:ee=Ee();break;case u:ee=Ee()/3;break;case d:ee=(ge-ue)/6048e5;break;case c:ee=(ge-ue)/864e5;break;case l:ee=ge/i;break;case s:ee=ge/o;break;case r:ee=ge/n;break;default:ee=ge}return G?ee:$.a(ee)},D.daysInMonth=function(){return this.endOf(h).$D},D.$locale=function(){return k[this.$L]},D.locale=function(F,U){if(!F)return this.$L;var G=this.clone(),ee=E(F,U,!0);return ee&&(G.$L=ee),G},D.clone=function(){return $.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},V}(),q=R.prototype;return I.prototype=q,[["$ms",a],["$s",r],["$m",s],["$H",l],["$W",c],["$M",h],["$y",p],["$D",m]].forEach(function(V){q[V[1]]=function(D){return this.$g(D,V[0],V[1])}}),I.extend=function(V,D){return V.$i||(V(D,R,I),V.$i=!0),I},I.locale=E,I.isDayjs=_,I.unix=function(V){return I(1e3*V)},I.en=k[S],I.Ls=k,I.p={},I})}(es)),es.exports}var mF=fF();const Fe=_i(mF);var ts={exports:{}},vF=ts.exports,Zg;function bF(){return Zg||(Zg=1,function(e,t){(function(n,o){e.exports=o()})(vF,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(f){this[v]=+f}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(f){if(!f||f==="Z")return 0;var y=f.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x}(v)}],u=function(v){var f=l[v];return f&&(f.indexOf?f:f.s.concat(f.f))},p=function(v,f){var y,x=l.meridiem;if(x){for(var w=1;w<=24;w+=1)if(v.indexOf(x(w,0,f))>-1){y=w>12;break}}else y=v===(f?"pm":"PM");return y},m={A:[s,function(v){this.afternoon=p(v,!1)}],a:[s,function(v){this.afternoon=p(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[r,d("seconds")],ss:[r,d("seconds")],m:[r,d("minutes")],mm:[r,d("minutes")],H:[r,d("hours")],h:[r,d("hours")],HH:[r,d("hours")],hh:[r,d("hours")],D:[r,d("day")],DD:[a,d("day")],Do:[s,function(v){var f=l.ordinal,y=v.match(/\d+/);if(this.day=y[0],f)for(var x=1;x<=31;x+=1)f(x).replace(/\[|\]/g,"")===v&&(this.day=x)}],w:[r,d("week")],ww:[a,d("week")],M:[r,d("month")],MM:[a,d("month")],MMM:[s,function(v){var f=u("months"),y=(u("monthsShort")||f.map(function(x){return x.slice(0,3)})).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[s,function(v){var f=u("months").indexOf(v)+1;if(f<1)throw new Error;this.month=f%12||f}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(v){this.year=c(v)}],YYYY:[/\d{4}/,d("year")],Z:h,ZZ:h};function g(v){var f,y;f=v,y=l&&l.formats;for(var x=(v=f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,$,R){var q=R&&R.toUpperCase();return $||y[R]||n[R]||y[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,D,F){return D||F.slice(1)})})).match(o),w=x.length,S=0;S<w;S+=1){var k=x[S],O=m[k],_=O&&O[0],E=O&&O[1];x[S]=E?{regex:_,parser:E}:k.replace(/^\[|\]$/g,"")}return function(I){for(var $={},R=0,q=0;R<w;R+=1){var V=x[R];if(typeof V=="string")q+=V.length;else{var D=V.regex,F=V.parser,U=I.slice(q),G=D.exec(U)[0];F.call($,G),I=I.replace(G,"")}}return function(ee){var te=ee.afternoon;if(te!==void 0){var ae=ee.hours;te?ae<12&&(ee.hours+=12):ae===12&&(ee.hours=0),delete ee.afternoon}}($),$}}return function(v,f,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var x=f.prototype,w=x.parse;x.parse=function(S){var k=S.date,O=S.utc,_=S.args;this.$u=O;var E=_[1];if(typeof E=="string"){var I=_[2]===!0,$=_[3]===!0,R=I||$,q=_[2];$&&(q=_[2]),l=this.$locale(),!I&&q&&(l=y.Ls[q]),this.$d=function(U,G,ee,te){try{if(["x","X"].indexOf(G)>-1)return new Date((G==="X"?1e3:1)*U);var ae=g(G)(U),le=ae.year,ue=ae.month,ge=ae.day,Ee=ae.hours,qe=ae.minutes,qt=ae.seconds,Qn=ae.milliseconds,Vt=ae.zone,Re=ae.week,ut=new Date,Kt=ge||(le||ue?1:ut.getDate()),Cn=le||ut.getFullYear(),Ba=0;le&&!ue||(Ba=ue>0?ue-1:ut.getMonth());var za,Cl=Ee||0,_l=qe||0,Sl=qt||0,kl=Qn||0;return Vt?new Date(Date.UTC(Cn,Ba,Kt,Cl,_l,Sl,kl+60*Vt.offset*1e3)):ee?new Date(Date.UTC(Cn,Ba,Kt,Cl,_l,Sl,kl)):(za=new Date(Cn,Ba,Kt,Cl,_l,Sl,kl),Re&&(za=te(za).week(Re).toDate()),za)}catch{return new Date("")}}(k,E,O,y),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),R&&k!=this.format(E)&&(this.$d=new Date("")),l={}}else if(E instanceof Array)for(var V=E.length,D=1;D<=V;D+=1){_[1]=E[D-1];var F=y.apply(this,_);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}D===V&&(this.$d=new Date(""))}else w.call(this,S)}}})}(ts)),ts.exports}var yF=bF();const xF=_i(yF);var ns={exports:{}},wF=ns.exports,Jg;function CF(){return Jg||(Jg=1,function(e,t){(function(n,o){e.exports=o()})(wF,function(){return function(n,o){var i=o.prototype,a=i.format;i.format=function(r){var s=this,l=this.$locale();if(!this.isValid())return a.bind(this)(r);var c=this.$utils(),d=(r||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),h==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),h==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return h}});return a.bind(this)(d)}}})}(ns)),ns.exports}var _F=CF();const SF=_i(_F);var os={exports:{}},kF=os.exports,Qg;function EF(){return Qg||(Qg=1,function(e,t){(function(n,o){e.exports=o()})(kF,function(){var n="month",o="quarter";return function(i,a){var r=a.prototype;r.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var s=r.add;r.add=function(c,d){return c=Number(c),this.$utils().p(d)===o?this.add(3*c,n):s.bind(this)(c,d)};var l=r.startOf;r.startOf=function(c,d){var h=this.$utils(),u=!!h.u(d)||d;if(h.p(c)===o){var p=this.quarter()-1;return u?this.month(3*p).startOf(n).startOf("day"):this.month(3*p+2).endOf(n).endOf("day")}return l.bind(this)(c,d)}}})}(os)),os.exports}var OF=EF();const $F=_i(OF);var is={exports:{}},IF=is.exports,ef;function TF(){return ef||(ef=1,function(e,t){(function(n,o){e.exports=o()})(IF,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(o,i,a){var r=i.prototype,s=r.format;a.en.formats=n,r.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,d=function(h,u){return h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,m,g){var v=g&&g.toUpperCase();return m||u[g]||n[g]||u[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,y,x){return y||x.slice(1)})})}(l,c===void 0?{}:c);return s.call(this,d)}}})}(is)),is.exports}var PF=TF();const VF=_i(PF);var as={exports:{}},DF=as.exports,tf;function MF(){return tf||(tf=1,function(e,t){(function(n,o){e.exports=o()})(DF,function(){var n="day";return function(o,i,a){var r=function(c){return c.add(4-c.isoWeekday(),n)},s=i.prototype;s.isoWeekYear=function(){return r(this).year()},s.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),n);var d,h,u,p,m=r(this),g=(d=this.isoWeekYear(),h=this.$u,u=(h?a.utc:a)().year(d).startOf("year"),p=4-u.isoWeekday(),u.isoWeekday()>4&&(p+=7),u.add(p,n));return m.diff(g,"week")+1},s.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var l=s.startOf;s.startOf=function(c,d){var h=this.$utils(),u=!!h.u(d)||d;return h.p(c)==="isoweek"?u?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(c,d)}}})}(as)),as.exports}var RF=MF();const FF=_i(RF);Fe.extend(SF);Fe.extend($F);Fe.extend(VF);Fe.extend(xF);Fe.extend(FF);var AF={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};iy._date.override({formats:function(){return AF},parse:function(e,t){var n=typeof e;return e===null||n==="undefined"?null:n==="string"&&typeof t=="string"?Fe(e,t).isValid()?Fe(e,t).valueOf():null:e instanceof Fe?null:Fe(e).isValid()?Fe(e).valueOf():null},format:function(e,t){return Fe(e).format(t)},add:function(e,t,n){return Fe(e).add(t,n).valueOf()},diff:function(e,t,n){return Fe(e).diff(Fe(t),n)},startOf:function(e,t,n){if(t==="isoWeek"){var o=typeof n=="number"&&n>0&&n<7?n:1;return Fe(e).isoWeekday(o).startOf("day").valueOf()}return Fe(e).startOf(t).valueOf()},endOf:function(e,t){return Fe(e).endOf(t).valueOf()}});const LF=ne({className:"timelineTooltip",slots:["container","arrow","indicator","content","title","row","label","value"],variants:{placement:{top:{},"top-start":{},"top-end":{},bottom:{},"bottom-start":{},"bottom-end":{},left:{},right:{}}},defaultVariants:{placement:"top"},base:{container:{position:"relative",display:"flex",background:"background.default",border:"1px solid",borderColor:"border.muted",borderRadius:"md",boxShadow:"stroke-bordered",fontFamily:"sans",fontSize:"xs",color:"text.subtle",pointerEvents:"none",transition:"opacity 0.1s ease"},arrow:{position:"absolute",width:"8",height:"8",background:"background.default",border:"1px solid",borderColor:"border.muted",transform:"rotate(45deg)",zIndex:-1},indicator:{width:"4",background:"background.success-bold-default",borderRadius:"2px 0 0 2px",flexShrink:0},content:{padding:"8"},title:{color:"text.subtle",marginBottom:"6",textStyle:"body_small_semibold"},row:{display:"flex",justifyContent:"space-between",marginBottom:"2",gap:"20"},label:{color:"text.subtle",textStyle:"body_xsmall_regular",minWidth:"max-content"},value:{color:"text.subtle",textStyle:"body_xsmall_regular",textAlign:"right"}},compoundVariants:[{placement:"top",css:{arrow:{bottom:"-4px",left:"50%",marginLeft:"-4px"}}},{placement:"top-start",css:{arrow:{bottom:"-4px",left:"25%",marginLeft:"-4px"}}},{placement:"top-end",css:{arrow:{bottom:"-4px",left:"75%",marginLeft:"-4px"}}},{placement:"bottom",css:{arrow:{top:"-4px",left:"50%",marginLeft:"-4px"}}},{placement:"bottom-start",css:{arrow:{top:"-4px",left:"25%",marginLeft:"-4px"}}},{placement:"bottom-end",css:{arrow:{top:"-4px",left:"75%",marginLeft:"-4px"}}},{placement:"left",css:{arrow:{right:"-4px",top:"50%",marginTop:"-4px"}}},{placement:"right",css:{arrow:{left:"-4px",top:"50%",marginTop:"-4px"}}}]}),nf=M({__name:"TimelineTooltip",props:{data:{},placement:{default:"top"},targetPosition:{}},setup(e){const t=e,n=A(()=>LF({placement:t.placement})),o=A(()=>({backgroundColor:t.data.barColor||void 0})),i=A(()=>{if(t.data.isRunning){const s=Date.now()-t.data.startTime.getTime(),l=Math.round(s/(1e3*60));return l<60?`${l} min`:`${Math.floor(l/60)}h ${l%60}m`}else{const s=t.data.endTime.getTime()-t.data.startTime.getTime(),l=Math.round(s/(1e3*60));return l<60?`${l} min`:`${Math.floor(l/60)}h ${l%60}m`}}),a=A(()=>t.data.startTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"})),r=A(()=>t.data.endTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"}));return(s,l)=>(C(),H("div",{class:N(n.value.container),"data-testid":"timeline-tooltip"},[z("div",{class:N(n.value.arrow)},null,2),z("div",{class:N(n.value.indicator),style:By(o.value)},null,6),z("div",{class:N(n.value.content)},[z("div",{class:N(n.value.title)},oe(e.data.title),3),z("div",{class:N(n.value.row)},[z("span",{class:N(n.value.label)},oe(e.data.isRunning?"Running for":"Run Duration"),3),z("span",{class:N(n.value.value)},oe(i.value),3)],2),z("div",{class:N(n.value.row)},[z("span",{class:N(n.value.label)},"Start Time",2),z("span",{class:N(n.value.value)},oe(a.value),3)],2),e.data.isRunning?Q("",!0):(C(),H("div",{key:0,class:N(n.value.row)},[z("span",{class:N(n.value.label)},"End Time",2),z("span",{class:N(n.value.value)},oe(r.value),3)],2)),e.data.extraData?(C(!0),H(Ce,{key:1},Ge(Object.entries(e.data.extraData),([c,d])=>(C(),H("div",{key:c,class:N(n.value.row)},[z("span",{class:N(n.value.label)},oe(c),3),z("span",{class:N(n.value.value)},oe(d),3)],2))),128)):Q("",!0)],2)],2))}});var NF=Object.defineProperty,BF=(e,t,n)=>t in e?NF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qi=(e,t,n)=>BF(e,typeof t!="symbol"?t+"":t,n);class zF{constructor(){qi(this,"app",null),qi(this,"container",null),qi(this,"tooltipId","timeline-tooltip"),qi(this,"VIEWPORT_PADDING",8),qi(this,"ARROW_SIZE",8)}calculateOptimalPosition(t,n){const o={width:window.innerWidth,height:window.innerHeight,scrollX:window.pageXOffset,scrollY:window.pageYOffset},{left:i,top:a}=t,{height:r}=n,s=["top","bottom","top-start","top-end","bottom-start","bottom-end","left","right"];for(const l of s){const c=this.getPositionForPlacement(l,t,n);if(this.isPositionInViewport(c,n,o))return{...c,placement:l}}return{...this.constrainToViewport({left:i,top:a-r-this.ARROW_SIZE},n,o),placement:"top"}}getPositionForPlacement(t,n,o){const{left:i,top:a}=n,{width:r,height:s}=o;switch(t){case"top":return{left:i-r/2,top:a-s-this.ARROW_SIZE};case"bottom":return{left:i-r/2,top:a+this.ARROW_SIZE};case"top-start":return{left:i-r*.25,top:a-s-this.ARROW_SIZE};case"top-end":return{left:i-r*.75,top:a-s-this.ARROW_SIZE};case"bottom-start":return{left:i-r*.25,top:a+this.ARROW_SIZE};case"bottom-end":return{left:i-r*.75,top:a+this.ARROW_SIZE};case"left":return{left:i-r-this.ARROW_SIZE,top:a-s/2};case"right":return{left:i+this.ARROW_SIZE,top:a-s/2};default:return{left:i-r/2,top:a-s-this.ARROW_SIZE}}}isPositionInViewport(t,n,o){const{left:i,top:a}=t,{width:r,height:s}=n;return i>=o.scrollX+this.VIEWPORT_PADDING&&a>=o.scrollY+this.VIEWPORT_PADDING&&i+r<=o.scrollX+o.width-this.VIEWPORT_PADDING&&a+s<=o.scrollY+o.height-this.VIEWPORT_PADDING}constrainToViewport(t,n,o){const{width:i,height:a}=n;let{left:r,top:s}=t;const l=o.scrollX+this.VIEWPORT_PADDING,c=o.scrollX+o.width-i-this.VIEWPORT_PADDING;r=Math.max(l,Math.min(r,c));const d=o.scrollY+this.VIEWPORT_PADDING,h=o.scrollY+o.height-a-this.VIEWPORT_PADDING;return s=Math.max(d,Math.min(s,h)),{left:r,top:s}}show(t,n){this.hide();const o=document.createElement("div");o.style.cssText=`
|
|
11
11
|
position: absolute;
|
|
12
12
|
left: -9999px;
|
|
13
13
|
top: -9999px;
|
|
@@ -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=yc(nf,{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 BF;let of=!1;of||(Dn.register(sd,ld,Qr,Zr,iF,Sa),of=!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 zF={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function HF(e,t){return C(),H("svg",zF,[...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 jF={render:HF},WF={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function GF(e,t){return C(),H("svg",WF,[...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 UF={render:GF},YF=ne({className:"toast",slots:[...mb.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"}}),gc=(e,t,n)=>{const o=YF({variant:t}),i=vP({...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:bt(jF,{class:o.icon}),failed:bt(UF,{class:o.icon}),default:bt("",null)})[s],r=document.createElement("div");document.body.appendChild(r),yc({render:()=>bt(CP,{toaster:i},{default:()=>bt(yP,{class:o.root,"data-testid":`toast-${t}`},[a(t),bt(xP,null,e)])})}).mount(r)},ii={success:(e,t)=>gc(e,"success",t),failed:(e,t)=>gc(e,"failed",t),default:(e,t)=>gc(e,"default",t)};To({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 qF=M({name:"InputWidget",__name:"Input",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>e.property.ui);return(n,o)=>(C(),T(b(Ib),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"]))}}),fc=Object.assign(qF,{__name:"Input"}),KF=M({name:"RadioWidget",__name:"Radio",props:{property:{},field:{}},setup(e){const t=A(()=>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(KV),{"model-value":e.field.state.value,options:b(t),"onUpdate:modelValue":e.field.handleChange},null,8,["model-value","options","onUpdate:modelValue"])]))}}),XF=Object.assign(KF,{__name:"Radio"}),Si=Symbol("form"),by=Symbol("getPayloadFn"),af=(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}},yy=Array.isArray,xy=e=>!!e&&e.constructor===Object,ZF=(e,t,n=o=>o)=>e.reduce((o,i)=>(o[t(i)]=n(i),o),{}),JF=(e,t)=>{const n=e.reduce((o,i)=>{const a=i;return o[a]||(o[a]=i),o},{});return Object.values(n)},QF=(e,t)=>Object.keys(e).reduce((o,i)=>(o[i]=t(e[i],i),o),{}),eA=(e,t)=>e?t.reduce((n,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]),n),{}):{},tA=(e,t)=>e?!t||t.length===0?e:t.reduce((n,o)=>(delete n[o],n),{...e}):{},nA=(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},oA=e=>{if(!e)return[];const t=(n,o)=>xy(n)?Object.entries(n).flatMap(([i,a])=>t(a,[...o,i])):yy(n)?n.flatMap((i,a)=>t(i,[...o,`${a}`])):[o.join(".")];return t(e,[])},cd=e=>e?ZF(oA(e),t=>t,t=>nA(e,t)):{},iA={trailing:!0};function aA(e,t=25,n={}){if(n={...iA,...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=rA(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 rA(e,t,n){return await e.apply(t,n)}function xl(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;sA(e[0],e[1])&&e.unshift(t);let[n,o,i={}]=e,a=!1;const r=A(()=>Ae(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=By();i.server??=!0,i.default??=cA,i.getCachedData??=Cy,i.lazy??=!1,i.immediate??=!0,i.deep??=zy.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]=rf(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 S=s._asyncData[w];S?._deps&&(S._deps--,S._deps===0&&S?._off())};const g=Ea();if(g&&h&&i.immediate&&!g.sp&&(g.sp=[]),g&&!g._nuxtOnBeforeMountCbs){g._nuxtOnBeforeMountCbs=[];const w=g._nuxtOnBeforeMountCbs;Hy(()=>{w.forEach(S=>{S()}),w.splice(0,w.length)}),Cd(()=>w.splice(0,w.length))}const v=g&&(g._nuxtClientOnly||Yn(jy,!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=Gy(),y=Be(r,(w,S)=>{if((w||S)&&w!==S){a=!0;const k=s._asyncData[S]?.data.value!==void 0,O=s._asyncDataPromises[S]!==void 0,_={cause:"initial",dedupe:i.dedupe};if(!s._asyncData[w]?._init){let E;S&&k?E=s._asyncData[S].data.value:(E=i.getCachedData(w,s,{cause:"initial"}),_.cachedData=E),s._asyncData[w]=rf(s,w,o,i,E)}s._asyncData[w]._deps++,S&&m(S),(i.immediate||k||O)&&s._asyncData[w].execute(_),Yy(()=>{a=!1})}},{flush:"sync"}),x=i.watch?Be(i.watch,()=>{a||d._execute({cause:"watch",dedupe:i.dedupe})}):()=>{};f&&Wy(()=>{y(),x(),m(r.value)})}const u={data:Er(()=>s._asyncData[r.value]?.data),pending:Er(()=>s._asyncData[r.value]?.pending),status:Er(()=>s._asyncData[r.value]?.status),error:Er(()=>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}wy(s,r.value)}},p=Promise.resolve(s._asyncDataPromises[r.value]).then(()=>u);return Object.assign(p,u),p}function Er(e){return A({get(){return e()?.value},set(t){const n=e();n&&(n.value=t)}})}function sA(e,t){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof t=="function")}function wy(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 lA(e,t){const n={};for(const o of t)n[o]=e[o];return n}function rf(e,t,n,o,i){e.payload._errors[t]??=void 0;const a=o.getCachedData!==Cy,r=n,s=o.deep?ve:ds,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:A(()=>d.status.value==="pending"),error:wf(e.payload._errors,t),status:ds("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=dA([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=lA(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=Uy(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:aA((...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||wd(()=>{e._asyncData[t]?._init||(wy(e,t),d.execute=()=>Promise.resolve())})}};return d}const cA=()=>{},Cy=(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 dA(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 Ou(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]=Ou(o))}),t}const uA={class:"flex mt-3"},hA={key:1,class:"p-3 mt-4 border rounded-md border-green-400 bg-green-100"},pA={key:0,class:"mt-1"},gA={class:"text-sm text-green-600"},fA={key:2,class:"p-3 mt-4 border rounded-md border-new-red-400 bg-new-red-100"},mA={class:"mt-1"},vA={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},bA=M({__name:"CredentialWidget",props:{property:{},modelValue:{}},async setup(e){let t,n;const o=Hs(()=>js(()=>Promise.resolve().then(()=>wl),void 0,import.meta.url)),i=Yn(Si),{data:a}=([t,n]=zs(()=>xl(()=>`credential_${e.property.ui.credentialType}`,()=>$fetch(`/workflows/v1/configmap/${e.property.ui.credentialType}`),"$K3FgAi8HjS")),t=await t,n(),t),r=i.useStore(d=>tA(d.values,["credential_guid_body"]));Be(r,d=>{d&&i.setFieldValue("credential_guid_body",af(cd(d),e.property.id,e.property.ui?.credentialType,void 0))},{immediate:!0}),Be(a,d=>{Object.entries(Ou(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(af(cd(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(Ce,{key:0},[Z(b(o),{"config-map":b(a).data.config,"base-key":e.property.id},null,8,["config-map","base-key"]),z("div",uA,[Z(b(Mn),{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",hA,[h[0]||(h[0]=z("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),b(l).message?(C(),H("div",pA,[z("span",gA,oe(b(l).message),1)])):Q("",!0)])):Q("",!0),b(l)&&!b(l).success?(C(),H("div",fA,[h[1]||(h[1]=z("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),z("div",mA,[z("span",vA,oe(b(l).message),1)])])):Q("",!0)],2))}}),yA=Object.assign(bA,{__name:"CredentialWidget"}),xA=M({name:"NestedWidget",__name:"Nested",props:{property:{},modelValue:{}},setup(e){const t=Hs(()=>js(()=>Promise.resolve().then(()=>wl),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"]))}}),wA=Object.assign(xA,{__name:"Nested"}),CA=M({name:"PasswordWidget",__name:"Password",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>e.property.ui);return(n,o)=>(C(),T(b(Ib),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"]))}}),_A=Object.assign(CA,{__name:"Password"}),SA=M({name:"SelectWidget",__name:"Select",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>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(ml),{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"]))}}),kA=Object.assign(SA,{__name:"Select"}),EA=M({__name:"SQLTree",props:{field:{}},async setup(e){let t,n;const o=Yn(Si),{data:i}=([t,n]=zs(()=>xl("metadata",()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),t=await t,n(),t),a=A(()=>i.value?JF(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(ml),{isTree:"",multiple:"",options:b(a),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),OA=Object.assign(EA,{__name:"SQLTree"}),$A=M({__name:"APITree",props:{field:{},property:{}},async setup(e){let t,n;const o=Yn(Si),{data:i}=([t,n]=zs(()=>xl(`${e.property.id}_metadata`,()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),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=A(()=>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(ml),{isTree:"",multiple:"",options:b(r),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),IA=Object.assign($A,{__name:"APITree"}),TA={class:"border border-gray-200 rounded-lg p-6 bg-white"},PA={class:"flex items-center justify-between mb-4"},VA={key:0,class:"mt-4 space-y-3"},DA={class:"flex items-start gap-3"},MA={class:"flex-1"},RA={class:"flex items-center gap-2"},FA={class:"font-medium text-gray-900 capitalize"},AA={key:0,class:"text-sm text-gray-600 mt-1"},LA={key:1,class:"text-sm text-red-600 mt-1"},NA={key:1,class:"mt-4 text-center text-gray-500 text-sm"},BA=M({name:"SageWidget",__name:"Sage",props:{property:{},field:{}},setup(e){const t=Yn(by),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?ii.success("Pre-flight checks completed!",{placement:"top",duration:3e3}):ii.failed("Some pre-flight checks failed",{placement:"top",duration:3e3})}catch(s){ii.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",TA,[z("div",PA,[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(Mn),{label:"Check","is-loading":b(n),onClick:i},null,8,["is-loading"])]),b(o)?(C(),H("div",VA,[(C(!0),H(Ce,null,Ge(b(o),(c,d)=>(C(),H("div",{key:d,class:"border border-gray-200 rounded-md p-4"},[z("div",DA,[z("span",{class:N(["text-xl font-bold",r(c.success)])},oe(a(c.success)),3),z("div",MA,[z("div",RA,[z("h4",FA,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",AA,oe(c.successMessage),1)):Q("",!0),!c.success&&c.failureMessage?(C(),H("p",LA,oe(c.failureMessage),1)):Q("",!0)])])]))),128))])):b(n)?Q("",!0):(C(),H("div",NA,' Click "Check" to run pre-flight checks '))]))}}),zA=Object.assign(BA,{__name:"Sage"}),HA=M({__name:"Connection",props:{property:{},modelValue:{}},setup(e){const t=Hs(()=>js(()=>Promise.resolve().then(()=>wl),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"]))}}),jA=Object.assign(HA,{__name:"Connection"}),WA={key:0,class:"text-sm text-gray-500 mt-2"},GA={key:1,class:"text-sm text-red-500 mt-2"},UA={key:2,class:"text-sm text-gray-600 mt-2"},YA=M({name:"FileUploadWidget",__name:"FileUpload",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=ve(!1),n=ve(null),o=async r=>{const s=e.property.ui?.uploadEndpoint||"/api/files/upload",l=new FormData;return l.append("file",r),(await $fetch(s,{method:"POST",body:l})).fileId},i=async r=>{const{files:s}=r;if(!(!s||s.length===0)){t.value=!0,n.value=null;try{const l=s.map(d=>o(d)),c=await Promise.all(l);if(e.property.ui?.maxFiles===1)e.field.handleChange(c[0]);else{const d=Array.isArray(e.field.state.value)?e.field.state.value:e.field.state.value?[e.field.state.value]:[];e.field.handleChange([...d,...c])}}catch(l){console.error("File upload failed:",l),n.value=l instanceof Error?l.message:"Failed to upload file"}finally{t.value=!1}}},a=A(()=>({placeholder:e.property.ui?.placeholder||"Drag and drop files here",accept:e.property.ui?.accept,maxFiles:e.property.ui?.maxFiles,maxFileSize:e.property.ui?.maxFileSize,isDisabled:e.disabled||t.value}));return(r,s)=>(C(),H("div",null,[Z(b(MV),W(b(a),{onFileAccept:i,onBlur:e.field.handleBlur}),null,16,["onBlur"]),b(t)?(C(),H("div",WA," Uploading... ")):Q("",!0),b(n)?(C(),H("div",GA,oe(b(n)),1)):Q("",!0),e.field.state.value?(C(),H("div",UA,[Array.isArray(e.field.state.value)?(C(),H(Ce,{key:0},[Le(oe(e.field.state.value.length)+" file(s) uploaded ",1)],64)):(C(),H(Ce,{key:1},[Le(" File uploaded: "+oe(e.field.state.value),1)],64))])):Q("",!0)]))}}),qA=Object.assign(YA,{__name:"FileUpload"});const sf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),XA=e=>{const t=KA(e);return t.charAt(0).toUpperCase()+t.slice(1)},ZA=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),lf=e=>e==="";var Ki={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 JA=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":a,size:r=Ki.width,color:s=Ki.stroke,...l},{slots:c})=>bt("svg",{...Ki,...l,width:r,height:r,stroke:s,"stroke-width":lf(n)||lf(o)||n===!0||o===!0?Number(i||a||Ki["stroke-width"])*24/Number(r):i||a||Ki["stroke-width"],class:ZA("lucide",l.class,...e?[`lucide-${sf(XA(e))}-icon`,`lucide-${sf(e)}`]:["lucide-icon"])},[...t.map(d=>bt(...d)),...c.default?[c.default()]:[]]);const QA=(e,t)=>(n,{slots:o,attrs:i})=>bt(JA,{...i,...n,iconNode:t,name:e},o);const eL=QA("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"}]]),tL={key:0,class:"text-red-500"},nL={key:0,class:"absolute right-3 top-3 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},oL={class:"flex justify-center"},iL=M({__name:"Repeater",props:{property:{}},setup(e){const t=Hs(()=>js(()=>Promise.resolve().then(()=>wl),void 0,import.meta.url)),n=Yn(Si),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:P(({field:l})=>[z("div",null,[z("div",null,[Z(b(Tb),null,{default:P(()=>[Le(oe(e.property.ui?.label)+" ",1),e.property?.required?(C(),H("span",tL," * ")):Q("",!0)]),_:1})]),(C(!0),H(Ce,null,Ge(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",nL,[Z(b(eL),{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",oL,[Z(b(Mn),{type:"default",label:`Add to ${e.property.ui.label}`,disabled:a(l),onClick:()=>{o(l)}},null,8,["label","disabled","onClick"])])])]),_:1},8,["name"]))}}),aL=Object.assign(iL,{__name:"Repeater"}),rL=M({name:"ConnectionSelector",__name:"ConnectionSelector",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>e.property.enumNames?.map((n,o)=>({label:n,value:e.property.enum?.[o]}))||[{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"}]);return(n,o)=>(C(),T(b(ml),{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"]))}}),sL=Object.assign(rL,{__name:"ConnectionSelector"});function bo(){return bo=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},bo.apply(this,arguments)}function lL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ka(e,t)}function dd(e){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dd(e)}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},ka(e,t)}function cL(){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 rs(e,t,n){return cL()?rs=Reflect.construct.bind():rs=function(i,a,r){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),c=new l;return r&&ka(c,r.prototype),c},rs.apply(null,arguments)}function dL(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ud(e){var t=typeof Map=="function"?new Map:void 0;return ud=function(o){if(o===null||!dL(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 rs(o,arguments,dd(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ka(i,o)},ud(e)}var uL=/%[sdj%]/g,hL=function(){};function hd(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 at(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(uL,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 pL(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||pL(t)&&typeof e=="string"&&!e)}function gL(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 cf(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 fL(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var df=function(e){lL(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}(ud(Error));function mL(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 df(f,hd(f))):u(i)},g=fL(e);cf(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 df(d,hd(d))):u(i)};s.length||(o(d),u(i)),s.forEach(function(g){var v=e[g];r.indexOf(g)!==-1?cf(v,n,m):gL(v,n,m)})});return h.catch(function(u){return u}),h}function vL(e){return!!(e&&e.message!==void 0)}function bL(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function uf(e,t){return function(n){var o;return e.fullFields?o=bL(t,e.fullFields):o=t[n.field||e.fullField],vL(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 hf(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]=bo({},e[n],o):e[n]=o}}return e}var _y=function(t,n,o,i,a,r){t.required&&(!o.hasOwnProperty(t.field)||Ie(n,r||t.type))&&i.push(at(a.messages.required,t.fullField))},yL=function(t,n,o,i,a){(/^\s+$/.test(n)||n==="")&&i.push(at(a.messages.whitespace,t.fullField))},Or,xL=function(){if(Or)return Or;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=yc(nf,{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 zF;let of=!1;of||(Dn.register(sd,ld,Qr,Zr,aF,Sa),of=!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 HF={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function jF(e,t){return C(),H("svg",HF,[...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 WF={render:jF},GF={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function UF(e,t){return C(),H("svg",GF,[...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 YF={render:UF},qF=ne({className:"toast",slots:[...mb.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"}}),gc=(e,t,n)=>{const o=qF({variant:t}),i=bP({...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:bt(WF,{class:o.icon}),failed:bt(YF,{class:o.icon}),default:bt("",null)})[s],r=document.createElement("div");document.body.appendChild(r),yc({render:()=>bt(_P,{toaster:i},{default:()=>bt(xP,{class:o.root,"data-testid":`toast-${t}`},[a(t),bt(wP,null,e)])})}).mount(r)},ii={success:(e,t)=>gc(e,"success",t),failed:(e,t)=>gc(e,"failed",t),default:(e,t)=>gc(e,"default",t)};To({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 KF=M({name:"InputWidget",__name:"Input",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>e.property.ui);return(n,o)=>(C(),T(b(Ib),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"]))}}),fc=Object.assign(KF,{__name:"Input"}),XF=M({name:"RadioWidget",__name:"Radio",props:{property:{},field:{}},setup(e){const t=A(()=>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(XV),{"model-value":e.field.state.value,options:b(t),"onUpdate:modelValue":e.field.handleChange},null,8,["model-value","options","onUpdate:modelValue"])]))}}),ZF=Object.assign(XF,{__name:"Radio"}),Si=Symbol("form"),by=Symbol("getPayloadFn"),af=(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}},yy=Array.isArray,xy=e=>!!e&&e.constructor===Object,JF=(e,t,n=o=>o)=>e.reduce((o,i)=>(o[t(i)]=n(i),o),{}),QF=(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),{}),tA=(e,t)=>e?t.reduce((n,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]),n),{}):{},wy=(e,t)=>e?!t||t.length===0?e:t.reduce((n,o)=>(delete n[o],n),{...e}):{},nA=(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},oA=e=>{if(!e)return[];const t=(n,o)=>xy(n)?Object.entries(n).flatMap(([i,a])=>t(a,[...o,i])):yy(n)?n.flatMap((i,a)=>t(i,[...o,`${a}`])):[o.join(".")];return t(e,[])},cd=e=>e?JF(oA(e),t=>t,t=>nA(e,t)):{},iA={trailing:!0};function aA(e,t=25,n={}){if(n={...iA,...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=rA(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 rA(e,t,n){return await e.apply(t,n)}function xl(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;sA(e[0],e[1])&&e.unshift(t);let[n,o,i={}]=e,a=!1;const r=A(()=>Le(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=zy();i.server??=!0,i.default??=cA,i.getCachedData??=_y,i.lazy??=!1,i.immediate??=!0,i.deep??=Hy.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]=rf(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 S=s._asyncData[w];S?._deps&&(S._deps--,S._deps===0&&S?._off())};const g=Ea();if(g&&h&&i.immediate&&!g.sp&&(g.sp=[]),g&&!g._nuxtOnBeforeMountCbs){g._nuxtOnBeforeMountCbs=[];const w=g._nuxtOnBeforeMountCbs;jy(()=>{w.forEach(S=>{S()}),w.splice(0,w.length)}),Cd(()=>w.splice(0,w.length))}const v=g&&(g._nuxtClientOnly||Yn(Wy,!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=Uy(),y=Me(r,(w,S)=>{if((w||S)&&w!==S){a=!0;const k=s._asyncData[S]?.data.value!==void 0,O=s._asyncDataPromises[S]!==void 0,_={cause:"initial",dedupe:i.dedupe};if(!s._asyncData[w]?._init){let E;S&&k?E=s._asyncData[S].data.value:(E=i.getCachedData(w,s,{cause:"initial"}),_.cachedData=E),s._asyncData[w]=rf(s,w,o,i,E)}s._asyncData[w]._deps++,S&&m(S),(i.immediate||k||O)&&s._asyncData[w].execute(_),qy(()=>{a=!1})}},{flush:"sync"}),x=i.watch?Me(i.watch,()=>{a||d._execute({cause:"watch",dedupe:i.dedupe})}):()=>{};f&&Gy(()=>{y(),x(),m(r.value)})}const u={data:Er(()=>s._asyncData[r.value]?.data),pending:Er(()=>s._asyncData[r.value]?.pending),status:Er(()=>s._asyncData[r.value]?.status),error:Er(()=>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}Cy(s,r.value)}},p=Promise.resolve(s._asyncDataPromises[r.value]).then(()=>u);return Object.assign(p,u),p}function Er(e){return A({get(){return e()?.value},set(t){const n=e();n&&(n.value=t)}})}function sA(e,t){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof t=="function")}function Cy(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 lA(e,t){const n={};for(const o of t)n[o]=e[o];return n}function rf(e,t,n,o,i){e.payload._errors[t]??=void 0;const a=o.getCachedData!==_y,r=n,s=o.deep?ve:ds,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:A(()=>d.status.value==="pending"),error:wf(e.payload._errors,t),status:ds("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=dA([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=lA(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=Yy(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:aA((...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||wd(()=>{e._asyncData[t]?._init||(Cy(e,t),d.execute=()=>Promise.resolve())})}};return d}const cA=()=>{},_y=(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 dA(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 Ou(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]=Ou(o))}),t}const uA={class:"flex mt-3"},hA={key:1,class:"p-3 mt-4 border rounded-md border-green-400 bg-green-100"},pA={key:0,class:"mt-1"},gA={class:"text-sm text-green-600"},fA={key:2,class:"p-3 mt-4 border rounded-md border-new-red-400 bg-new-red-100"},mA={class:"mt-1"},vA={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},bA=M({__name:"CredentialWidget",props:{property:{},modelValue:{}},async setup(e){let t,n;const o=Hs(()=>js(()=>Promise.resolve().then(()=>wl),void 0,import.meta.url)),i=Yn(Si),{data:a}=([t,n]=zs(()=>xl(()=>`credential_${e.property.ui.credentialType}`,()=>$fetch(`/workflows/v1/configmap/${e.property.ui.credentialType}`),"$K3FgAi8HjS")),t=await t,n(),t),r=i.useStore(d=>wy(d.values,["credential_guid_body","credential_property_id"]));Me(()=>e.property,d=>{d&&i.setFieldValue("credential_property_id",d.id)},{immediate:!0}),Me(r,d=>{d&&i.setFieldValue("credential_guid_body",af(cd(d),e.property.id,e.property.ui?.credentialType,void 0))},{immediate:!0}),Me(a,d=>{Object.entries(Ou(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(af(cd(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(Ce,{key:0},[Z(b(o),{"config-map":b(a).data.config,"base-key":e.property.id},null,8,["config-map","base-key"]),z("div",uA,[Z(b(Mn),{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",hA,[h[0]||(h[0]=z("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),b(l).message?(C(),H("div",pA,[z("span",gA,oe(b(l).message),1)])):Q("",!0)])):Q("",!0),b(l)&&!b(l).success?(C(),H("div",fA,[h[1]||(h[1]=z("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),z("div",mA,[z("span",vA,oe(b(l).message),1)])])):Q("",!0)],2))}}),yA=Object.assign(bA,{__name:"CredentialWidget"}),xA=M({name:"NestedWidget",__name:"Nested",props:{property:{},modelValue:{}},setup(e){const t=Hs(()=>js(()=>Promise.resolve().then(()=>wl),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"]))}}),wA=Object.assign(xA,{__name:"Nested"}),CA=M({name:"PasswordWidget",__name:"Password",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>e.property.ui);return(n,o)=>(C(),T(b(Ib),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"]))}}),_A=Object.assign(CA,{__name:"Password"}),SA=M({name:"SelectWidget",__name:"Select",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>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(ml),{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"]))}}),kA=Object.assign(SA,{__name:"Select"}),EA=M({__name:"SQLTree",props:{field:{}},async setup(e){let t,n;const o=Yn(Si),{data:i}=([t,n]=zs(()=>xl("metadata",()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),t=await t,n(),t),a=A(()=>i.value?QF(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(ml),{isTree:"",multiple:"",options:b(a),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),OA=Object.assign(EA,{__name:"SQLTree"}),$A=M({__name:"APITree",props:{field:{},property:{}},async setup(e){let t,n;const o=Yn(Si),{data:i}=([t,n]=zs(()=>xl(`${e.property.id}_metadata`,()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),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=A(()=>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(ml),{isTree:"",multiple:"",options:b(r),modelValue:b(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),IA=Object.assign($A,{__name:"APITree"}),TA={class:"border border-gray-200 rounded-lg p-6 bg-white"},PA={class:"flex items-center justify-between mb-4"},VA={key:0,class:"mt-4 space-y-3"},DA={class:"flex items-start gap-3"},MA={class:"flex-1"},RA={class:"flex items-center gap-2"},FA={class:"font-medium text-gray-900 capitalize"},AA={key:0,class:"text-sm text-gray-600 mt-1"},LA={key:1,class:"text-sm text-red-600 mt-1"},NA={key:1,class:"mt-4 text-center text-gray-500 text-sm"},BA=M({name:"SageWidget",__name:"Sage",props:{property:{},field:{}},setup(e){const t=Yn(by),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?ii.success("Pre-flight checks completed!",{placement:"top",duration:3e3}):ii.failed("Some pre-flight checks failed",{placement:"top",duration:3e3})}catch(s){ii.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",TA,[z("div",PA,[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(Mn),{label:"Check","is-loading":b(n),onClick:i},null,8,["is-loading"])]),b(o)?(C(),H("div",VA,[(C(!0),H(Ce,null,Ge(b(o),(c,d)=>(C(),H("div",{key:d,class:"border border-gray-200 rounded-md p-4"},[z("div",DA,[z("span",{class:N(["text-xl font-bold",r(c.success)])},oe(a(c.success)),3),z("div",MA,[z("div",RA,[z("h4",FA,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",AA,oe(c.successMessage),1)):Q("",!0),!c.success&&c.failureMessage?(C(),H("p",LA,oe(c.failureMessage),1)):Q("",!0)])])]))),128))])):b(n)?Q("",!0):(C(),H("div",NA,' Click "Check" to run pre-flight checks '))]))}}),zA=Object.assign(BA,{__name:"Sage"}),HA=M({__name:"Connection",props:{property:{},modelValue:{}},setup(e){const t=Hs(()=>js(()=>Promise.resolve().then(()=>wl),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"]))}}),jA=Object.assign(HA,{__name:"Connection"}),WA={key:0,class:"text-sm text-gray-500 mt-2"},GA={key:1,class:"text-sm text-red-500 mt-2"},UA={key:2,class:"text-sm text-gray-600 mt-2"},YA=M({name:"FileUploadWidget",__name:"FileUpload",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=ve(!1),n=ve(null),o=async r=>{const s=e.property.ui?.uploadEndpoint||"/api/files/upload",l=new FormData;return l.append("file",r),(await $fetch(s,{method:"POST",body:l})).fileId},i=async r=>{const{files:s}=r;if(!(!s||s.length===0)){t.value=!0,n.value=null;try{const l=s.map(d=>o(d)),c=await Promise.all(l);if(e.property.ui?.maxFiles===1)e.field.handleChange(c[0]);else{const d=Array.isArray(e.field.state.value)?e.field.state.value:e.field.state.value?[e.field.state.value]:[];e.field.handleChange([...d,...c])}}catch(l){console.error("File upload failed:",l),n.value=l instanceof Error?l.message:"Failed to upload file"}finally{t.value=!1}}},a=A(()=>({placeholder:e.property.ui?.placeholder||"Drag and drop files here",accept:e.property.ui?.accept,maxFiles:e.property.ui?.maxFiles,maxFileSize:e.property.ui?.maxFileSize,isDisabled:e.disabled||t.value}));return(r,s)=>(C(),H("div",null,[Z(b(RV),W(b(a),{onFileAccept:i,onBlur:e.field.handleBlur}),null,16,["onBlur"]),b(t)?(C(),H("div",WA," Uploading... ")):Q("",!0),b(n)?(C(),H("div",GA,oe(b(n)),1)):Q("",!0),e.field.state.value?(C(),H("div",UA,[Array.isArray(e.field.state.value)?(C(),H(Ce,{key:0},[Ne(oe(e.field.state.value.length)+" file(s) uploaded ",1)],64)):(C(),H(Ce,{key:1},[Ne(" File uploaded: "+oe(e.field.state.value),1)],64))])):Q("",!0)]))}}),qA=Object.assign(YA,{__name:"FileUpload"});const sf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),XA=e=>{const t=KA(e);return t.charAt(0).toUpperCase()+t.slice(1)},ZA=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),lf=e=>e==="";var Ki={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 JA=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":a,size:r=Ki.width,color:s=Ki.stroke,...l},{slots:c})=>bt("svg",{...Ki,...l,width:r,height:r,stroke:s,"stroke-width":lf(n)||lf(o)||n===!0||o===!0?Number(i||a||Ki["stroke-width"])*24/Number(r):i||a||Ki["stroke-width"],class:ZA("lucide",l.class,...e?[`lucide-${sf(XA(e))}-icon`,`lucide-${sf(e)}`]:["lucide-icon"])},[...t.map(d=>bt(...d)),...c.default?[c.default()]:[]]);const QA=(e,t)=>(n,{slots:o,attrs:i})=>bt(JA,{...i,...n,iconNode:t,name:e},o);const eL=QA("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"}]]),tL={key:0,class:"text-red-500"},nL={key:0,class:"absolute right-3 top-3 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},oL={class:"flex justify-center"},iL=M({__name:"Repeater",props:{property:{}},setup(e){const t=Hs(()=>js(()=>Promise.resolve().then(()=>wl),void 0,import.meta.url)),n=Yn(Si),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:P(({field:l})=>[z("div",null,[z("div",null,[Z(b(Tb),null,{default:P(()=>[Ne(oe(e.property.ui?.label)+" ",1),e.property?.required?(C(),H("span",tL," * ")):Q("",!0)]),_:1})]),(C(!0),H(Ce,null,Ge(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",nL,[Z(b(eL),{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",oL,[Z(b(Mn),{type:"default",label:`Add to ${e.property.ui.label}`,disabled:a(l),onClick:()=>{o(l)}},null,8,["label","disabled","onClick"])])])]),_:1},8,["name"]))}}),aL=Object.assign(iL,{__name:"Repeater"}),rL=M({name:"ConnectionSelector",__name:"ConnectionSelector",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=A(()=>e.property.enumNames?.map((n,o)=>({label:n,value:e.property.enum?.[o]}))||[{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"}]);return(n,o)=>(C(),T(b(ml),{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"]))}}),sL=Object.assign(rL,{__name:"ConnectionSelector"});function bo(){return bo=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},bo.apply(this,arguments)}function lL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ka(e,t)}function dd(e){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dd(e)}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},ka(e,t)}function cL(){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 rs(e,t,n){return cL()?rs=Reflect.construct.bind():rs=function(i,a,r){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),c=new l;return r&&ka(c,r.prototype),c},rs.apply(null,arguments)}function dL(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ud(e){var t=typeof Map=="function"?new Map:void 0;return ud=function(o){if(o===null||!dL(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 rs(o,arguments,dd(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ka(i,o)},ud(e)}var uL=/%[sdj%]/g,hL=function(){};function hd(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 at(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(uL,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 pL(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||pL(t)&&typeof e=="string"&&!e)}function gL(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 cf(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 fL(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var df=function(e){lL(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}(ud(Error));function mL(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 df(f,hd(f))):u(i)},g=fL(e);cf(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 df(d,hd(d))):u(i)};s.length||(o(d),u(i)),s.forEach(function(g){var v=e[g];r.indexOf(g)!==-1?cf(v,n,m):gL(v,n,m)})});return h.catch(function(u){return u}),h}function vL(e){return!!(e&&e.message!==void 0)}function bL(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function uf(e,t){return function(n){var o;return e.fullFields?o=bL(t,e.fullFields):o=t[n.field||e.fullField],vL(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 hf(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]=bo({},e[n],o):e[n]=o}}return e}var Sy=function(t,n,o,i,a,r){t.required&&(!o.hasOwnProperty(t.field)||Ie(n,r||t.type))&&i.push(at(a.messages.required,t.fullField))},yL=function(t,n,o,i,a){(/^\s+$/.test(n)||n==="")&&i.push(at(a.messages.whitespace,t.fullField))},Or,xL=function(){if(Or)return Or;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
|
|
@@ -30,4 +30,4 @@ ${h}`)}).finally(()=>{n.set("transforming",!1)})):c(s)},removeFile({context:e,ev
|
|
|
30
30
|
(?:`+o+":){1}(?:(?::"+o+"){0,4}:"+n+"|(?::"+o+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
31
31
|
(?::(?:(?::`+o+"){0,5}:"+n+"|(?::"+o+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
32
32
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
33
|
-
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),r=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(w){return w&&w.exact?a:new RegExp("(?:"+t(w)+n+t(w)+")|(?:"+t(w)+i+t(w)+")","g")};l.v4=function(x){return x&&x.exact?r:new RegExp(""+t(x)+n+t(x),"g")},l.v6=function(x){return x&&x.exact?s:new RegExp(""+t(x)+i+t(x),"g")};var c="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",h=l.v4().source,u=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",f='(?:[/?#][^\\s"]*)?',y="(?:"+c+"|www\\.)"+d+"(?:localhost|"+h+"|"+u+"|"+p+m+g+")"+v+f;return Or=new RegExp("(?:^"+y+"$)","i"),Or},pf={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},oa={integer:function(t){return oa.number(t)&&parseInt(t,10)===t},float:function(t){return oa.number(t)&&!oa.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!oa.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(pf.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(xL())},hex:function(t){return typeof t=="string"&&!!t.match(pf.hex)}},wL=function(t,n,o,i,a){if(t.required&&n===void 0){_y(t,n,o,i,a);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;r.indexOf(s)>-1?oa[s](n)||i.push(at(a.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&i.push(at(a.messages.types[s],t.fullField,t.type))},CL=function(t,n,o,i,a){var r=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=n,h=null,u=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(u?h="number":p?h="string":m&&(h="array"),!h)return!1;m&&(d=n.length),p&&(d=n.replace(c,"_").length),r?d!==t.len&&i.push(at(a.messages[h].len,t.fullField,t.len)):s&&!l&&d<t.min?i.push(at(a.messages[h].min,t.fullField,t.min)):l&&!s&&d>t.max?i.push(at(a.messages[h].max,t.fullField,t.max)):s&&l&&(d<t.min||d>t.max)&&i.push(at(a.messages[h].range,t.fullField,t.min,t.max))},Ho="enum",_L=function(t,n,o,i,a){t[Ho]=Array.isArray(t[Ho])?t[Ho]:[],t[Ho].indexOf(n)===-1&&i.push(at(a.messages[Ho],t.fullField,t[Ho].join(", ")))},SL=function(t,n,o,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(at(a.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var r=new RegExp(t.pattern);r.test(n)||i.push(at(a.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},re={required:_y,whitespace:yL,type:wL,range:CL,enum:_L,pattern:SL},kL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n,"string")&&!t.required)return o();re.required(t,n,i,r,a,"string"),Ie(n,"string")||(re.type(t,n,i,r,a),re.range(t,n,i,r,a),re.pattern(t,n,i,r,a),t.whitespace===!0&&re.whitespace(t,n,i,r,a))}o(r)},EL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re.type(t,n,i,r,a)}o(r)},OL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},$L=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re.type(t,n,i,r,a)}o(r)},IL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),Ie(n)||re.type(t,n,i,r,a)}o(r)},TL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},PL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},VL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return o();re.required(t,n,i,r,a,"array"),n!=null&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},DL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re.type(t,n,i,r,a)}o(r)},ML="enum",RL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re[ML](t,n,i,r,a)}o(r)},FL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n,"string")&&!t.required)return o();re.required(t,n,i,r,a),Ie(n,"string")||re.pattern(t,n,i,r,a)}o(r)},AL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n,"date")&&!t.required)return o();if(re.required(t,n,i,r,a),!Ie(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),re.type(t,l,i,r,a),l&&re.range(t,l.getTime(),i,r,a)}}o(r)},LL=function(t,n,o,i,a){var r=[],s=Array.isArray(n)?"array":typeof n;re.required(t,n,i,r,a,s),o(r)},mc=function(t,n,o,i,a){var r=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(Ie(n,r)&&!t.required)return o();re.required(t,n,i,s,a,r),Ie(n,r)||re.type(t,n,i,s,a)}o(s)},NL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a)}o(r)},ga={string:kL,method:EL,number:OL,boolean:$L,regexp:IL,integer:TL,float:PL,array:VL,object:DL,enum:RL,pattern:FL,date:AL,url:mc,hex:mc,email:mc,required:LL,any:NL};function pd(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var gd=pd(),Na=function(){function e(n){this.rules=null,this._messages=gd,this.define(n)}var t=e.prototype;return t.define=function(o){var i=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(a){var r=o[a];i.rules[a]=Array.isArray(r)?r:[r]})},t.messages=function(o){return o&&(this._messages=hf(pd(),o)),this._messages},t.validate=function(o,i,a){var r=this;i===void 0&&(i={}),a===void 0&&(a=function(){});var s=o,l=i,c=a;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function d(g){var v=[],f={};function y(w){if(Array.isArray(w)){var S;v=(S=v).concat.apply(S,w)}else v.push(w)}for(var x=0;x<g.length;x++)y(g[x]);v.length?(f=hd(v),c(v,f)):c(null,s)}if(l.messages){var h=this.messages();h===gd&&(h=pd()),hf(h,l.messages),l.messages=h}else l.messages=this.messages();var u={},p=l.keys||Object.keys(this.rules);p.forEach(function(g){var v=r.rules[g],f=s[g];v.forEach(function(y){var x=y;typeof x.transform=="function"&&(s===o&&(s=bo({},s)),f=s[g]=x.transform(f)),typeof x=="function"?x={validator:x}:x=bo({},x),x.validator=r.getValidationMethod(x),x.validator&&(x.field=g,x.fullField=x.fullField||g,x.type=r.getType(x),u[g]=u[g]||[],u[g].push({rule:x,value:f,source:s,field:g}))})});var m={};return mL(u,l,function(g,v){var f=g.rule,y=(f.type==="object"||f.type==="array")&&(typeof f.fields=="object"||typeof f.defaultField=="object");y=y&&(f.required||!f.required&&g.value),f.field=g.field;function x(k,O){return bo({},O,{fullField:f.fullField+"."+k,fullFields:f.fullFields?[].concat(f.fullFields,[k]):[k]})}function w(k){k===void 0&&(k=[]);var O=Array.isArray(k)?k:[k];!l.suppressWarning&&O.length&&e.warning("async-validator:",O),O.length&&f.message!==void 0&&(O=[].concat(f.message));var _=O.map(uf(f,s));if(l.first&&_.length)return m[f.field]=1,v(_);if(!y)v(_);else{if(f.required&&!g.value)return f.message!==void 0?_=[].concat(f.message).map(uf(f,s)):l.error&&(_=[l.error(f,at(l.messages.required,f.field))]),v(_);var E={};f.defaultField&&Object.keys(g.value).map(function(R){E[R]=f.defaultField}),E=bo({},E,g.rule.fields);var I={};Object.keys(E).forEach(function(R){var q=E[R],V=Array.isArray(q)?q:[q];I[R]=V.map(x.bind(null,R))});var $=new e(I);$.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),$.validate(g.value,g.rule.options||l,function(R){var q=[];_&&_.length&&q.push.apply(q,_),R&&R.length&&q.push.apply(q,R),v(q.length?q:null)})}}var S;if(f.asyncValidator)S=f.asyncValidator(f,g.value,w,g.source,l);else if(f.validator){try{S=f.validator(f,g.value,w,g.source,l)}catch(k){console.error?.(k),l.suppressValidatorError||setTimeout(function(){throw k},0),w(k.message)}S===!0?w():S===!1?w(typeof f.message=="function"?f.message(f.fullField||f.field):f.message||(f.fullField||f.field)+" fails"):S instanceof Array?w(S):S instanceof Error&&w(S.message)}S&&S.then&&S.then(function(){return w()},function(k){return w(k)})},function(g){d(g)},s)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!ga.hasOwnProperty(o.type))throw new Error(at("Unknown rule type %s",o.type));return o.type||"string"},t.getValidationMethod=function(o){if(typeof o.validator=="function")return o.validator;var i=Object.keys(o),a=i.indexOf("message");return a!==-1&&i.splice(a,1),i.length===1&&i[0]==="required"?ga.required:ga[this.getType(o)]||void 0},e}();Na.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");ga[t]=n};Na.warning=hL;Na.messages=gd;Na.validators=ga;function BL(e){const t=new Na({[e.id]:e.ui?.rules??[]});return{onBlurAsync:async({value:n})=>{try{await t.validate({[e.id]:n})}catch({errors:o}){return o[0].message}}}}const zL={class:"grid grid-cols-8 gap-x-4 gap-y-4"},HL={key:0,class:"text-red-500"},jL={key:1,class:"text-red-500 text-xs"},WL=M({__name:"DynamicForm",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=Yn(Si),o=n.useStore(u=>cd(u.values)),i=(u=8,p,m)=>{let g=`col-span-${u}`;return p&&(g+=` col-start-${p}`),m&&(g+=` col-start-${p}`),g},a=u=>e.baseKey?`${e.baseKey}.${u}`:u,r=A(()=>{const u=JSON.parse(JSON.stringify(e.configMap));if(u.anyOf){u.anyOf.forEach(m=>{m.required.forEach(g=>{u.properties&&u.properties[g]&&(u.properties[g].ui.hidden=!0)})});const p=[];u.anyOf.forEach(m=>{Object.keys(m.properties).every(v=>{if(o.value[a(v)]?.toString()===m.properties[v]?.const?.toString())return!0})&&p.push(m)}),p.length>0&&p.forEach(m=>{m.required.forEach(g=>{u.properties&&u.properties[g]&&(u.properties[g].ui.hidden=!1)})})}return u}),s=u=>{const p=r.value?.properties[u];let m={id:a(u),name:a(u)};if(p.type==="conditional"){const{conditions:g,...v}=p,f=g?.find(y=>y.regex?new RegExp(y.regex).test(o.value[y.property]):o.value[y.property]===y.value);m={...m,...v,...f}}else m={...m,...p};return m},l=A(()=>{{const u=[];return r.value?.properties&&(e.currentStep?.properties?e.currentStep.properties.forEach(p=>{Object.keys(r?.value?.properties).find(g=>g===p)&&(r.value?.properties[p].ui?.hidden||u.push(s(p)))}):Object.keys(r?.value?.properties).forEach(p=>{r.value?.properties[p].ui?.hidden||u.push(s(p))})),u}}),c=["credential","nested","connection","sage","Repeater"],d=u=>{if(u.ui?.widget)switch(u.ui?.widget?.toLowerCase()){case"divider":return"a-divider";case"header":return"h5";case"radio":return XF;case"credential":return yA;case"nested":return wA;case"input":return fc;case"password":return _A;case"select":return kA;case"sqltree":return OA;case"apitree":return IA;case"sage":return zA;case"connection":return jA;case"fileupload":return qA;case"repeater":return aL;case"connectionselector":return sL;default:return u.ui.widget}else switch(u.type){case"string":case"number":return fc;case"boolean":return"Boolean";case"array":return"Select";case"object":return"Form";case"code":return"CodeBlock";case"banner":return"Banner";default:return fc}};async function h(){if(await n.handleSubmit(),!n.state.isValid)throw new Error("Form is invalid");return n.state.values}return t({validate:h}),(u,p)=>(C(),H("div",zL,[(C(!0),H(Ce,null,Ge(b(l),m=>(C(),H(Ce,{key:`${m.id}`},[m.ui?.hidden?Q("",!0):(C(),H("div",{key:0,class:N(i(m.ui?.grid,m.ui?.start,m.ui?.end))},[c.includes(m?.ui?.widget)?(C(),T(Wt(d(m)),{key:0,property:m},null,8,["property"])):(C(),T(b(n).Field,{key:1,name:m.id,validators:b(BL)(m)},{default:P(({field:g})=>[m.ui?.label?(C(),T(b(Tb),{key:0},{default:P(()=>[Le(oe(m.ui?.label)+" ",1),m?.required?(C(),H("span",HL," * ")):Q("",!0)]),_:2},1024)):Q("",!0),(C(),T(Wt(d(m)),{field:g,"base-key":e.baseKey,property:m},null,8,["field","base-key","property"])),g.state.meta.isTouched&&!g.state.meta.isValid?(C(),H("span",jL,oe(g.state.meta.errors.join(", ")),1)):Q("",!0)]),_:2},1032,["name","validators"]))],2))],64))),128))]))}}),Sy=Object.assign(WL,{__name:"DynamicForm"}),wl=Object.freeze(Object.defineProperty({__proto__:null,default:Sy},Symbol.toStringTag,{value:"Module"})),ai=new WeakMap,ss=new WeakMap,Fs={current:[]};let vc=!1,fa=0;const ia=new Set,$r=new Map;function ky(e){const t=Array.from(e).sort((n,o)=>n instanceof hn&&n.options.deps.includes(o)?1:o instanceof hn&&o.options.deps.includes(n)?-1:0);for(const n of t){if(Fs.current.includes(n))continue;Fs.current.push(n),n.recompute();const o=ss.get(n);if(o)for(const i of o){const a=ai.get(i);a&&ky(a)}}}function GL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function UL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Ey(e){if(fa>0&&!$r.has(e)&&$r.set(e,e.prevState),ia.add(e),!(fa>0)&&!vc)try{for(vc=!0;ia.size>0;){const t=Array.from(ia);ia.clear();for(const n of t){const o=$r.get(n)??n.prevState;n.prevState=o,GL(n)}for(const n of t){const o=ai.get(n);o&&(Fs.current.push(n),ky(o))}for(const n of t){const o=ai.get(n);if(o)for(const i of o)UL(i)}}}finally{vc=!1,Fs.current=[],$r.clear()}}function At(e){fa++;try{e()}finally{if(fa--,fa===0){const t=ia.values().next().value;t&&Ey(t)}}}function YL(e){return typeof e=="function"}class As{constructor(t,n){this.listeners=new Set,this.subscribe=o=>{var i,a;this.listeners.add(o);const r=(a=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:a.call(i,o,this);return()=>{this.listeners.delete(o),r?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,o,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):YL(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),Ey(this)}}class hn{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,o=new Array(n),i=new Array(n);for(let a=0;a<n;a++){const r=this.options.deps[a];o[a]=r.prevState,i[a]=r.state}return this.lastSeenDepValues=i,{prevDepVals:o,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,o;this.prevState=this.state;const i=this.getDepVals();this.state=this.options.fn(i),(o=(n=this.options).onUpdate)==null||o.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const a of this.options.deps)a instanceof hn&&a.checkIfRecalculationNeededDeeply();let n=!1;const o=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let a=0;a<i.length;a++)if(i[a]!==o[a]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var o,i;this.listeners.add(n);const a=(i=(o=this.options).onSubscribe)==null?void 0:i.call(o,n,this);return()=>{this.listeners.delete(n),a?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof hn)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof As){let o=ai.get(n);o||(o=new Set,ai.set(n,o)),o.add(this);let i=ss.get(this);i||(i=new Set,ss.set(this,i)),i.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof hn)this.unregisterFromGraph(n.options.deps);else if(n instanceof As){const o=ai.get(n);o&&o.delete(this);const i=ss.get(this);i&&i.delete(n)}}}function qL(e){return typeof e=="function"}function gf(e,...t){return qL(e)?e(...t):e}function KL(e){return e||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"")}class Oy{#n=!0;#e;#t;#a;#o;#i;#r;#s;#c=0;#u=5;#d=()=>{this.debugLog("Connected to event bus"),this.#i=!0,this.debugLog("Emitting queued events",this.#o),this.#o.forEach(t=>this.emitEventToBus(t)),this.#o=[],this.stopConnectLoop(),this.#t().removeEventListener("tanstack-connect-success",this.#d)};#l=()=>{if(this.#t().addEventListener("tanstack-connect-success",this.#d),this.#c<this.#u){this.#c++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#t().removeEventListener("tanstack-connect",this.#l),this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};constructor({pluginId:t,debug:n=!1,enabled:o=!0,reconnectEveryMs:i=1e3}){this.#e=t,this.#n=o,this.#t=this.getGlobalTarget,this.#a=n,this.debugLog(" Initializing event subscription for plugin",this.#e),this.#o=[],this.#i=!1,this.#r=null,this.#s=i}startConnectLoop(){this.#r!==null||this.#i||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#r=setInterval(this.#l,this.#s))}stopConnectLoop(){this.#r!==null&&(clearInterval(this.#r),this.#r=null,this.debugLog("Stopped connect loop"))}debugLog(...t){this.#a&&console.log(`🌴 [tanstack-devtools:${this.#e}-plugin]`,...t)}getGlobalTarget(){if(typeof globalThis<"u"&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<"u"&&typeof window.addEventListener<"u")return this.debugLog("Using window as event target"),window;const t=typeof EventTarget<"u"?new EventTarget:void 0;return typeof t>"u"||typeof t.addEventListener>"u"?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),t)}getPluginId(){return this.#e}dispatchCustomEventShim(t,n){try{const o=new Event(t,{detail:n});this.#t().dispatchEvent(o)}catch{this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(t,n){try{this.#t().dispatchEvent(new CustomEvent(t,{detail:n}))}catch{this.dispatchCustomEventShim(t,n)}}emitEventToBus(t){this.debugLog("Emitting event to client bus",t),this.dispatchCustomEvent("tanstack-dispatch-event",t)}emit(t,n){if(!this.#n){this.debugLog("Event bus client is disabled, not emitting event",t,n);return}if(!this.#i){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#o.push({type:`${this.#e}:${t}`,payload:n,pluginId:this.#e}),typeof CustomEvent<"u"&&(this.#l(),this.startConnectLoop());return}return this.emitEventToBus({type:`${this.#e}:${t}`,payload:n,pluginId:this.#e})}on(t,n){const o=`${this.#e}:${t}`;if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event",o),()=>{};const i=a=>{this.debugLog("Received event from bus",a.detail),n(a.detail)};return this.#t().addEventListener(o,i),this.debugLog("Registered event to bus",o),()=>{this.#t().removeEventListener(o,i)}}onAll(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=o=>{const i=o.detail;t(i)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}onAllPluginEvents(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=o=>{const i=o.detail;this.#e&&i.pluginId!==this.#e||t(i)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}}class XL extends Oy{constructor(t){super({pluginId:"pacer",debug:t?.debug})}}const ZL=(e,t)=>{$y.emit(e,t)},$y=new XL;function ff(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}const JL={enabled:!0,leading:!0,trailing:!0,wait:0};class QL{constructor(t,n){this.fn=t,this.store=new As(ff()),this.setOptions=o=>{this.options={...this.options,...o},this.#t()||this.cancel()},this.#e=o=>{this.store.setState(i=>{const a={...i,...o},{isPending:r}=a;return{...a,status:this.#t()?r?"pending":"idle":"disabled"}}),ZL("Throttler",this)},this.#t=()=>!!gf(this.options.enabled,this),this.#a=()=>gf(this.options.wait,this),this.maybeExecute=(...o)=>{this.#e({maybeExecuteCount:this.store.state.maybeExecuteCount+1});const i=Date.now(),a=i-this.store.state.lastExecutionTime,r=this.#a();if(this.options.leading&&a>=r)this.#o(...o);else if(this.#e({lastArgs:o}),!this.#n&&this.options.trailing){const s=this.store.state.lastExecutionTime?i-this.store.state.lastExecutionTime:0,l=r-s;this.#e({isPending:!0}),this.#n=setTimeout(()=>{const{lastArgs:c}=this.store.state;c!==void 0&&this.#o(...c)},l)}},this.#o=(...o)=>{if(!this.#t())return;this.fn(...o);const i=Date.now(),a=i+this.#a();this.#i(),this.#e({executionCount:this.store.state.executionCount+1,lastExecutionTime:i,nextExecutionTime:a,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(o,this),setTimeout(()=>{this.store.state.isPending||this.#e({nextExecutionTime:void 0})},this.#a())},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&this.#o(...this.store.state.lastArgs)},this.#i=()=>{this.#n&&(clearTimeout(this.#n),this.#n=void 0)},this.cancel=()=>{this.#i(),this.#e({lastArgs:void 0,isPending:!1})},this.reset=()=>{this.#e(ff())},this.key=KL(n.key),this.options={...JL,...n},this.#e(this.options.initialState??{}),$y.on("d-Throttler",o=>{o.payload.key===this.key&&(this.#e(o.payload.store.state),this.setOptions(o.payload.options))})}#n;#e;#t;#a;#o;#i}function eN(e,t){return new QL(e,t).maybeExecute}function Iy(e,t){return typeof e=="function"?e(t):e}function aa(e,t){return $u(t).reduce((o,i)=>{if(o===null)return null;if(typeof o<"u")return o[i]},e)}function Ir(e,t,n){const o=$u(t);function i(a){if(!o.length)return Iy(n,a);const r=o.shift();if(typeof r=="string"||typeof r=="number"&&!Array.isArray(a))return typeof a=="object"?(a===null&&(a={}),{...a,[r]:i(a[r])}):{[r]:i()};if(Array.isArray(a)&&typeof r=="number"){const s=a.slice(0,r);return[...s.length?s:new Array(r),i(a[r]),...a.slice(r+1)]}return[...new Array(r),i()]}return i(e)}function tN(e,t){const n=$u(t);function o(i){if(!i)return;if(n.length===1){const r=n[0];if(Array.isArray(i)&&typeof r=="number")return i.filter((c,d)=>d!==r);const{[r]:s,...l}=i;return l}const a=n.shift();if(typeof a=="string"&&typeof i=="object")return{...i,[a]:o(i[a])};if(typeof a=="number"&&Array.isArray(i)){if(a>=i.length)return i;const r=i.slice(0,a);return[...r.length?r:new Array(a),o(i[a]),...i.slice(a+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return o(e)}const nN=/^(\d+)$/gm,oN=/\.(\d+)(?=\.)/gm,iN=/^(\d+)\./gm,aN=/\.(\d+$)/gm,rN=/\.{2,}/gm,fd="__int__",Tr=`${fd}$1`;function $u(e){if(Array.isArray(e))return[...e];if(typeof e!="string")throw new Error("Path must be a string.");return e.replace(/(^\[)|]/gm,"").replace(/\[/g,".").replace(nN,Tr).replace(oN,`.${Tr}.`).replace(iN,`${Tr}.`).replace(aN,`.${Tr}`).replace(rN,".").split(".").map(t=>{if(t.startsWith(fd)){const n=t.substring(fd.length),o=parseInt(n,10);return String(o)===n?o:n}return t})}function sN(e){return!(Array.isArray(e)&&e.length===0)}function md(e,t){const n=o=>o.validators.filter(Boolean).map(i=>({cause:i.cause,validate:i.fn}));return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!1},runValidation:n})}function vd(e,t){const{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:o,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},r=n??0,s=l=>l.validators.filter(Boolean).map(c=>{const d=c?.cause||e;let h=r;switch(d){case"change":h=i??r;break;case"blur":h=o??r;break;case"dynamic":h=a??r;break;case"submit":h=0;break}return e==="submit"&&(h=0),{cause:d,validate:c.fn,debounceMs:h}});return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!0},runValidation:s})}const bd=e=>!!e&&typeof e=="object"&&"fields"in e;function Xo(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,a]of e)if(!t.has(i)||!Object.is(a,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const i of n)if(!o.includes(i)||!Xo(e[i],t[i]))return!1;return!0}const mf=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:"form"}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:"field"}:{newErrorValue:void 0,newSource:void 0},vf=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:"field"}:e?{newErrorValue:e,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function Xe(e,t){return e==null?t:{...e,...t}}let yo=256;const ls=[];let Pr;for(;yo--;)ls[yo]=(yo+256).toString(16).substring(1);function lN(){let e=0,t,n="";if(!Pr||yo+16>256){for(Pr=new Array(256),e=256;e--;)Pr[e]=256*Math.random()|0;e=0,yo=0}for(;e<16;e++)t=Pr[yo+e],e===6?n+=ls[t&15|64]:e===8?n+=ls[t&63|128]:n+=ls[t],e&1&&e>1&&e<11&&(n+="-");return yo++,n}const ei=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});const t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:"mount"},o={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:"change"},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:"blur"},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:"submit"},r=t?void 0:{fn:()=>{},cause:"server"};switch(e.event.type){case"mount":return e.runValidation({validators:[n],form:e.form});case"submit":return e.runValidation({validators:[o,i,a,r],form:e.form});case"server":return e.runValidation({validators:[],form:e.form});case"blur":return e.runValidation({validators:[i,r],form:e.form});case"change":return e.runValidation({validators:[o,r],form:e.form});default:throw new Error(`Unknown validation event type: ${e.event.type}`)}};function cN(e,t){const n=new Map;for(const o of e){const i=o.path??[];let a=t,r="";for(let s=0;s<i.length;s++){const l=i[s];if(l===void 0)continue;const c=typeof l=="object"?l.key:l,d=Number(c);Array.isArray(a)&&!Number.isNaN(d)?r+=`[${d}]`:r+=(s>0?".":"")+String(c),typeof a=="object"&&a!==null?a=a[c]:a=void 0}n.set(r,(n.get(r)??[]).concat(o))}return Object.fromEntries(n)}const bf=(e,t)=>{const n=cN(e,t);return{form:n,fields:n}},ri={validate({value:e,validationSource:t},n){const o=n["~standard"].validate(e);if(o instanceof Promise)throw new Error("async function passed to sync validator");if(o.issues)return t==="field"?o.issues:bf(o.issues,e)},async validateAsync({value:e,validationSource:t},n){const o=await n["~standard"].validate(e);if(o.issues)return t==="field"?o.issues:bf(o.issues,e)}},Ty=e=>!!e&&"~standard"in e,Ls={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function Vr(e){function t(h,u,p,m){const g=o(h,u,p,m);({insert:()=>s(g,h,u),remove:()=>l(g),swap:()=>m!==void 0&&d(g,h,u,m),move:()=>m!==void 0&&c(g,h,u,m)})[p]()}function n(h,u){return`${h}[${u}]`}function o(h,u,p,m){const g=[n(h,u)];if(p==="swap")g.push(n(h,m));else if(p==="move"){const[v,f]=[Math.min(u,m),Math.max(u,m)];for(let y=v;y<=f;y++)g.push(n(h,y))}else{const v=e.getFieldValue(h),f=Array.isArray(v)?v.length:0;for(let y=u+1;y<f;y++)g.push(n(h,y))}return Object.keys(e.fieldInfo).filter(v=>g.some(f=>v.startsWith(f)))}function i(h,u){return h.replace(/\[(\d+)\]/,(p,m)=>{const g=parseInt(m,10);return`[${u==="up"?g+1:Math.max(0,g-1)}]`})}function a(h,u){(u==="up"?h:[...h].reverse()).forEach(m=>{const g=i(m.toString(),u),v=e.getFieldMeta(g);v?e.setFieldMeta(m,v):e.setFieldMeta(m,r())})}const r=()=>Ls,s=(h,u,p)=>{a(h,"down"),h.forEach(m=>{m.toString().startsWith(n(u,p))&&e.setFieldMeta(m,r())})},l=h=>{a(h,"up")},c=(h,u,p,m)=>{const g=new Map(Object.keys(e.fieldInfo).filter(v=>v.startsWith(n(u,p))).map(v=>[v,e.getFieldMeta(v)]));a(h,p<m?"up":"down"),Object.keys(e.fieldInfo).filter(v=>v.startsWith(n(u,m))).forEach(v=>{const f=v.replace(n(u,m),n(u,p)),y=g.get(f);y&&e.setFieldMeta(v,y)})},d=(h,u,p,m)=>{h.forEach(g=>{if(!g.toString().startsWith(n(u,p)))return;const v=g.toString().replace(n(u,p),n(u,m)),[f,y]=[e.getFieldMeta(g),e.getFieldMeta(v)];f&&e.setFieldMeta(v,f),y&&e.setFieldMeta(g,y)})};return{handleArrayFieldMetaShift:t}}class dN extends Oy{constructor(){super({pluginId:"form-devtools"})}}const vt=new dN;function bc(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}class uN{constructor(t){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const o=this.fieldMetaDerived.mount(),i=this.store.mount(),a=()=>{o(),i(),vt.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:r}=this.options.validators||{};return vt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),r&&this.validateSync("mount"),a},this.update=o=>{if(!o)return;const i=this.options;this.options=o;const a=!!o.transform?.deps?.some((l,c)=>l!==this.prevTransformArray[c]),r=o.defaultValues&&!Xo(o.defaultValues,i.defaultValues)&&!this.state.isTouched,s=!Xo(o.defaultState,i.defaultState)&&!this.state.isTouched;!r&&!s&&!a||(At(()=>{this.baseStore.setState(()=>bc(Object.assign({},this.state,s?o.defaultState:{},r?{values:o.defaultValues}:{},a?{_force_re_eval:!this.state._force_re_eval}:{})))}),vt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(o,i)=>{const{fieldMeta:a}=this.state,r=this.resetFieldMeta(a);o&&!i?.keepDefaultValues&&(this.options={...this.options,defaultValues:o}),this.baseStore.setState(()=>bc({...this.options.defaultState,values:o??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:r}))},this.validateAllFields=async o=>{const i=[];return At(()=>{Object.values(this.fieldInfo).forEach(r=>{if(!r.instance)return;const s=r.instance;i.push(Promise.resolve().then(()=>s.validate(o,{skipFormValidation:!0}))),r.instance.state.meta.isTouched||r.instance.setMeta(l=>({...l,isTouched:!0}))})}),(await Promise.all(i)).flat()},this.validateArrayFieldsStartingFrom=async(o,i,a)=>{const r=this.getFieldValue(o),s=Array.isArray(r)?Math.max(r.length-1,0):null,l=[`${o}[${i}]`];for(let u=i+1;u<=(s??0);u++)l.push(`${o}[${u}]`);const c=Object.keys(this.fieldInfo).filter(u=>l.some(p=>u.startsWith(p))),d=[];return At(()=>{c.forEach(u=>{d.push(Promise.resolve().then(()=>this.validateField(u,a)))})}),(await Promise.all(d)).flat()},this.validateField=(o,i)=>{const a=this.fieldInfo[o]?.instance;return a?(a.state.meta.isTouched||a.setMeta(r=>({...r,isTouched:!0})),a.validate(i)):[]},this.validateSync=o=>{const i=md(o,{...this.options,form:this,validationLogic:this.options.validationLogic||ei});let a=!1;const r={};return At(()=>{for(const c of i){if(!c.validate)continue;const d=this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:h,fieldErrors:u}=cs(d),p=Xi(c.cause);for(const m of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[m]===void 0)continue;const g=this.getFieldMeta(m);if(!g)continue;const{errorMap:v,errorSourceMap:f}=g,y=u?.[m],{newErrorValue:x,newSource:w}=mf({newFormValidatorError:y,isPreviousErrorFromFormValidator:f?.[p]==="form",previousErrorValue:v?.[p]});w==="form"&&(r[m]={...r[m],[p]:y}),v?.[p]!==x&&this.setFieldMeta(m,S=>({...S,errorMap:{...S.errorMap,[p]:x},errorSourceMap:{...S.errorSourceMap,[p]:w}}))}this.state.errorMap?.[p]!==h&&this.baseStore.setState(m=>({...m,errorMap:{...m.errorMap,[p]:h}})),(h||u)&&(a=!0)}const s=Xi("submit");this.state.errorMap?.[s]&&o!=="submit"&&!a&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[s]:void 0}}));const l=Xi("server");this.state.errorMap?.[l]&&o!=="server"&&!a&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[l]:void 0}}))}),{hasErrored:a,fieldsErrorMap:r}},this.validateAsync=async o=>{const i=vd(o,{...this.options,form:this,validationLogic:this.options.validationLogic||ei});this.state.isFormValidating||this.baseStore.setState(c=>({...c,isFormValidating:!0}));const a=[];let r;for(const c of i){if(!c.validate)continue;const d=Xi(c.cause);this.state.validationMetaMap[d]?.lastAbortController.abort();const u=new AbortController;this.state.validationMetaMap[d]={lastAbortController:u},a.push(new Promise(async p=>{let m;try{m=await new Promise((y,x)=>{setTimeout(async()=>{if(u.signal.aborted)return y(void 0);try{y(await this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:u.signal},type:"validateAsync"}))}catch(w){x(w)}},c.debounceMs)})}catch(y){m=y}const{formError:g,fieldErrors:v}=cs(m);v&&(r=r?{...r,...v}:v);const f=Xi(c.cause);for(const y of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[y]===void 0)continue;const x=this.getFieldMeta(y);if(!x)continue;const{errorMap:w,errorSourceMap:S}=x,k=r?.[y],{newErrorValue:O,newSource:_}=mf({newFormValidatorError:k,isPreviousErrorFromFormValidator:S?.[f]==="form",previousErrorValue:w?.[f]});w?.[f]!==O&&this.setFieldMeta(y,E=>({...E,errorMap:{...E.errorMap,[f]:O},errorSourceMap:{...E.errorSourceMap,[f]:_}}))}this.baseStore.setState(y=>({...y,errorMap:{...y.errorMap,[f]:g}})),p(r?{fieldErrors:r,errorMapKey:f}:void 0)}))}let s=[];const l={};if(a.length){s=await Promise.all(a);for(const c of s)if(c?.fieldErrors){const{errorMapKey:d}=c;for(const[h,u]of Object.entries(c.fieldErrors)){const m={...l[h]||{},[d]:u};l[h]=m}}}return this.baseStore.setState(c=>({...c,isFormValidating:!1})),l},this.validate=o=>{const{hasErrored:i,fieldsErrorMap:a}=this.validateSync(o);return i&&!this.options.asyncAlways?a:this.validateAsync(o)},this.getFieldValue=o=>aa(this.state.values,o),this.getFieldMeta=o=>this.state.fieldMeta[o],this.getFieldInfo=o=>this.fieldInfo[o]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(o,i)=>{this.baseStore.setState(a=>({...a,fieldMetaBase:{...a.fieldMetaBase,[o]:Iy(i,a.fieldMetaBase[o])}}))},this.resetFieldMeta=o=>Object.keys(o).reduce((i,a)=>{const r=a;return i[r]=Ls,i},{}),this.setFieldValue=(o,i,a)=>{const r=a?.dontUpdateMeta??!1,s=a?.dontRunListeners??!1,l=a?.dontValidate??!1;At(()=>{r||this.setFieldMeta(o,c=>({...c,isTouched:!0,isDirty:!0,errorMap:{...c?.errorMap,onMount:void 0}})),this.baseStore.setState(c=>({...c,values:Ir(c.values,o,i)}))}),s||this.getFieldInfo(o).instance?.triggerOnChangeListener(),l||this.validateField(o,"change")},this.deleteField=o=>{const a=[...Object.keys(this.fieldInfo).filter(r=>{const s=o.toString();return r!==s&&r.startsWith(s)}),o];this.baseStore.setState(r=>{const s={...r};return a.forEach(l=>{s.values=tN(s.values,l),delete this.fieldInfo[l],delete s.fieldMetaBase[l]}),s})},this.pushFieldValue=(o,i,a)=>{this.setFieldValue(o,r=>[...Array.isArray(r)?r:[],i],a)},this.insertFieldValue=async(o,i,a,r)=>{this.setFieldValue(o,l=>[...l.slice(0,i),a,...l.slice(i)],Xe(r,{dontValidate:!0}));const s=r?.dontValidate??!1;s||await this.validateField(o,"change"),Vr(this).handleArrayFieldMetaShift(o,i,"insert"),s||await this.validateArrayFieldsStartingFrom(o,i,"change")},this.replaceFieldValue=async(o,i,a,r)=>{this.setFieldValue(o,l=>l.map((c,d)=>d===i?a:c),Xe(r,{dontValidate:!0})),(r?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.removeFieldValue=async(o,i,a)=>{const r=this.getFieldValue(o),s=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(o,c=>c.filter((d,h)=>h!==i),Xe(a,{dontValidate:!0})),Vr(this).handleArrayFieldMetaShift(o,i,"remove"),s!==null){const c=`${o}[${s}]`;this.deleteField(c)}(a?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.swapFieldValues=(o,i,a,r)=>{this.setFieldValue(o,l=>{const c=l[i],d=l[a];return Ir(Ir(l,`${i}`,d),`${a}`,c)},Xe(r,{dontValidate:!0})),Vr(this).handleArrayFieldMetaShift(o,i,"swap",a),(r?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${a}]`,"change"))},this.moveFieldValues=(o,i,a,r)=>{this.setFieldValue(o,l=>{const c=[...l];return c.splice(a,0,c.splice(i,1)[0]),c},Xe(r,{dontValidate:!0})),Vr(this).handleArrayFieldMetaShift(o,i,"move",a),(r?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${a}]`,"change"))},this.clearFieldValues=(o,i)=>{const a=this.getFieldValue(o),r=Array.isArray(a)?Math.max(a.length-1,0):null;if(this.setFieldValue(o,[],Xe(i,{dontValidate:!0})),r!==null)for(let l=0;l<=r;l++){const c=`${o}[${l}]`;this.deleteField(c)}(i?.dontValidate??!1)||this.validateField(o,"change")},this.resetField=o=>{this.baseStore.setState(i=>({...i,fieldMetaBase:{...i.fieldMetaBase,[o]:Ls},values:this.options.defaultValues?Ir(i.values,o,aa(this.options.defaultValues,o)):i.values}))},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((o,[i,a])=>(Object.keys(a).length&&a.errors.length&&(o[i]={errors:a.errors,errorMap:a.errorMap}),o),{})}),this.parseValuesWithSchema=o=>ri.validate({value:this.state.values,validationSource:"form"},o),this.parseValuesWithSchemaAsync=o=>ri.validateAsync({value:this.state.values,validationSource:"form"},o),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=t?.formId??lN(),this._devtoolsSubmissionOverride=!1,this.baseStore=new As(bc({...t?.defaultState,values:t?.defaultValues??t?.defaultState?.values})),this.fieldMetaDerived=new hn({deps:[this.baseStore],fn:({prevDepVals:o,currDepVals:i,prevVal:a})=>{const r=a,s=o?.[0],l=i[0];let c=0;const d={};for(const h of Object.keys(l.fieldMetaBase)){const u=l.fieldMetaBase[h],p=s?.fieldMetaBase[h],m=r?.[h],g=aa(l.values,h);let v=m?.errors;if(!p||u.errorMap!==p.errorMap){v=Object.values(u.errorMap??{}).filter(S=>S!==void 0);const w=this.getFieldInfo(h)?.instance;w&&!w.options.disableErrorFlat&&(v=v?.flat(1))}const f=!sN(v??[]),y=!u.isDirty,x=Xo(g,aa(this.options.defaultValues,h))||Xo(g,this.getFieldInfo(h)?.instance?.options.defaultValue);if(m&&m.isPristine===y&&m.isValid===f&&m.isDefaultValue===x&&m.errors===v&&u===p){d[h]=m,c++;continue}d[h]={...u,errors:v,isPristine:y,isValid:f,isDefaultValue:x}}return Object.keys(l.fieldMetaBase).length&&r&&c===Object.keys(l.fieldMetaBase).length?r:d}}),this.store=new hn({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:o,currDepVals:i,prevVal:a})=>{const r=a,s=o?.[0],l=i[0],c=i[1],d=Object.values(c).filter(Boolean),h=d.some(V=>V.isValidating),u=d.every(V=>V.isValid),p=d.some(V=>V.isTouched),m=d.some(V=>V.isBlurred),g=d.every(V=>V.isDefaultValue),v=p&&l.errorMap?.onMount,f=d.some(V=>V.isDirty),y=!f,x=!!(l.errorMap?.onMount||d.some(V=>V?.errorMap?.onMount)),w=!!h;let S=r?.errors??[];(!s||l.errorMap!==s.errorMap)&&(S=Object.values(l.errorMap).reduce((V,D)=>D===void 0?V:D&&bd(D)?(V.push(D.form),V):(V.push(D),V),[]));const k=S.length===0,O=u&&k,_=this.options.canSubmitWhenInvalid??!1,E=l.submissionAttempts===0&&!p&&!x||!w&&!l.isSubmitting&&O||_;let I=l.errorMap;if(v&&(S=S.filter(V=>V!==l.errorMap.onMount),I=Object.assign(I,{onMount:void 0})),r&&s&&r.errorMap===I&&r.fieldMeta===this.fieldMetaDerived.state&&r.errors===S&&r.isFieldsValidating===h&&r.isFieldsValid===u&&r.isFormValid===k&&r.isValid===O&&r.canSubmit===E&&r.isTouched===p&&r.isBlurred===m&&r.isPristine===y&&r.isDefaultValue===g&&r.isDirty===f&&Xo(s,l))return r;let $={...l,errorMap:I,fieldMeta:this.fieldMetaDerived.state,errors:S,isFieldsValidating:h,isFieldsValid:u,isFormValid:k,isValid:O,canSubmit:E,isTouched:p,isBlurred:m,isPristine:y,isDefaultValue:g,isDirty:f};const R=this.options.transform?.deps??[];if(R.length!==this.prevTransformArray.length||R.some((V,D)=>V!==this.prevTransformArray[D])){const V=Object.assign({},this,{state:$});this.options.transform?.fn(V),$=V.state,this.prevTransformArray=R}return $}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(t||{});const n=eN(o=>vt.emit("form-state",{id:this._formId,state:o}),{wait:300});this.store.subscribe(()=>{n(this.store.state)}),vt.on("request-form-state",o=>{o.payload.id===this._formId&&vt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),vt.on("request-form-reset",o=>{o.payload.id===this._formId&&this.reset()}),vt.on("request-form-force-submit",o=>{o.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)})}get state(){return this.store.state}get formId(){return this._formId}runValidator(t){return Ty(t.validate)?ri[t.type](t.value,t.validate):t.validate(t.value)}async handleSubmit(t){this.baseStore.setState(i=>({...i,isSubmitted:!1,submissionAttempts:i.submissionAttempts+1,isSubmitSuccessful:!1})),At(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance&&(i.instance.state.meta.isTouched||i.instance.setMeta(a=>({...a,isTouched:!0})))})});const n=t??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n});return}this.baseStore.setState(i=>({...i,isSubmitting:!0}));const o=()=>{this.baseStore.setState(i=>({...i,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){o(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validateAllFields",errors:Object.values(this.state.fieldMeta).map(i=>i.errors).flat()});return}if(await this.validate("submit"),!this.state.isValid){o(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}At(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance?.options.listeners?.onSubmit?.({value:i.instance.state.value,fieldApi:i.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:n});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:n}),At(()=>{this.baseStore.setState(i=>({...i,isSubmitted:!0,isSubmitSuccessful:!0})),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),o()})}catch(i){throw this.baseStore.setState(a=>({...a,isSubmitSuccessful:!1})),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:i}),o(),i}}setErrorMap(t){At(()=>{Object.entries(t).forEach(([n,o])=>{const i=n;if(bd(o)){const{formError:a,fieldErrors:r}=cs(o);for(const s of Object.keys(this.fieldInfo))this.getFieldMeta(s)&&this.setFieldMeta(s,c=>({...c,errorMap:{...c.errorMap,[i]:r?.[s]},errorSourceMap:{...c.errorSourceMap,[i]:"form"}}));this.baseStore.setState(s=>({...s,errorMap:{...s.errorMap,[i]:a}}))}else this.baseStore.setState(a=>({...a,errorMap:{...a.errorMap,[i]:o}}))})})}}function cs(e){if(e){if(bd(e)){const t=cs(e.form).formError,n=e.fields;return{formError:t,fieldErrors:n}}return{formError:e}}return{formError:void 0}}function Xi(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}class hN{constructor(t){this.options={},this.mount=()=>{const n=this.store.mount();this.options.defaultValue!==void 0&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});const o=this.getInfo();o.instance=this,this.update(this.options);const{onMount:i}=this.options.validators||{};if(i){const a=this.runValidator({validate:i,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});a&&this.setMeta(r=>({...r,errorMap:{...r?.errorMap,onMount:a},errorSourceMap:{...r?.errorSourceMap,onMount:"field"}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),n},this.update=n=>{this.options=n;const o=this.name!==n.name;if(this.name=n.name,this.state.value===void 0){const i=aa(n.form.options.defaultValues,n.name),a=n.defaultValue??i;o?this.setValue(r=>r||a,{dontUpdateMeta:!0}):a!==void 0&&this.setValue(a,{dontUpdateMeta:!0})}this.form.getFieldMeta(this.name)===void 0&&this.setMeta(this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(n,o)=>{this.form.setFieldValue(this.name,n,Xe(o,{dontRunListeners:!0,dontValidate:!0})),o?.dontRunListeners||this.triggerOnChangeListener(),o?.dontValidate||this.validate("change")},this.getMeta=()=>this.store.state.meta,this.setMeta=n=>this.form.setFieldMeta(this.name,n),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(n,o)=>{this.form.pushFieldValue(this.name,n,Xe(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(n,o,i)=>{this.form.insertFieldValue(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(n,o,i)=>{this.form.replaceFieldValue(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(n,o)=>{this.form.removeFieldValue(this.name,n,Xe(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(n,o,i)=>{this.form.swapFieldValues(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(n,o,i)=>{this.form.moveFieldValues(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=n=>{this.form.clearFieldValues(this.name,Xe(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=n=>{const o=Object.values(this.form.fieldInfo),i=[];for(const a of o){if(!a.instance)continue;const{onChangeListenTo:r,onBlurListenTo:s}=a.instance.options.validators||{};n==="change"&&r?.includes(this.name)&&i.push(a.instance),n==="blur"&&s?.includes(this.name)&&i.push(a.instance)}return i},this.validateSync=(n,o)=>{const i=md(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||ei}),r=this.getLinkedFields(n).reduce((c,d)=>{const h=md(n,{...d.options,form:d.form,validationLogic:d.form.options.validationLogic||ei});return h.forEach(u=>{u.field=d}),c.concat(h)},[]);let s=!1;At(()=>{const c=(d,h)=>{const u=Dr(h.cause),p=h.validate?yf(d.runValidator({validate:h.validate,value:{value:d.store.state.value,validationSource:"field",fieldApi:d},type:"validate"})):void 0,m=o[u],{newErrorValue:g,newSource:v}=vf({formLevelError:m,fieldLevelError:p});d.state.meta.errorMap?.[u]!==g&&d.setMeta(f=>({...f,errorMap:{...f.errorMap,[u]:g},errorSourceMap:{...f.errorSourceMap,[u]:v}})),g&&(s=!0)};for(const d of i)c(this,d);for(const d of r)d.validate&&c(d.field,d)});const l=Dr("submit");return this.state.meta.errorMap?.[l]&&n!=="submit"&&!s&&this.setMeta(c=>({...c,errorMap:{...c.errorMap,[l]:void 0},errorSourceMap:{...c.errorSourceMap,[l]:void 0}})),{hasErrored:s}},this.validateAsync=async(n,o)=>{const i=vd(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||ei}),a=await o,r=this.getLinkedFields(n),s=r.reduce((u,p)=>{const m=vd(n,{...p.options,form:p.form,validationLogic:p.form.options.validationLogic||ei});return m.forEach(g=>{g.field=p}),u.concat(m)},[]);this.state.meta.isValidating||this.setMeta(u=>({...u,isValidating:!0}));for(const u of r)u.setMeta(p=>({...p,isValidating:!0}));const l=[],c=[],d=(u,p,m)=>{const g=Dr(p.cause);u.getInfo().validationMetaMap[g]?.lastAbortController.abort();const f=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:f},m.push(new Promise(async y=>{let x;try{x=await new Promise((_,E)=>{this.timeoutIds.validations[p.cause]&&clearTimeout(this.timeoutIds.validations[p.cause]),this.timeoutIds.validations[p.cause]=setTimeout(async()=>{if(f.signal.aborted)return _(void 0);try{_(await this.runValidator({validate:p.validate,value:{value:u.store.state.value,fieldApi:u,signal:f.signal,validationSource:"field"},type:"validateAsync"}))}catch(I){E(I)}},p.debounceMs)})}catch(_){x=_}if(f.signal.aborted)return y(void 0);const w=yf(x),S=a[this.name]?.[g],{newErrorValue:k,newSource:O}=vf({formLevelError:S,fieldLevelError:w});u.setMeta(_=>({..._,errorMap:{..._?.errorMap,[g]:k},errorSourceMap:{..._.errorSourceMap,[g]:O}})),y(k)}))};for(const u of i)u.validate&&d(this,u,l);for(const u of s)u.validate&&d(u.field,u,c);let h=[];(l.length||c.length)&&(h=await Promise.all(l),await Promise.all(c)),this.setMeta(u=>({...u,isValidating:!1}));for(const u of r)u.setMeta(p=>({...p,isValidating:!1}));return h.filter(Boolean)},this.validate=(n,o)=>{if(!this.state.meta.isTouched)return[];const{fieldsErrorMap:i}=o?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(n),{hasErrored:a}=this.validateSync(n,i[this.name]??{});if(a&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[Dr(n)]?.lastAbortController.abort(),this.state.meta.errors;const r=o?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(n);return this.validateAsync(n,r)},this.handleChange=n=>{this.setValue(n)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(o=>({...o,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(o=>({...o,isBlurred:!0})),this.validate("blur"),this.triggerOnBlurListener()},this.parseValueWithSchema=n=>ri.validate({value:this.state.value,validationSource:"field"},n),this.parseValueWithSchemaAsync=n=>ri.validateAsync({value:this.state.value,validationSource:"field"},n),this.form=t.form,this.name=t.name,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new hn({deps:[this.form.store],fn:()=>{const n=this.form.getFieldValue(this.name),o=this.form.getFieldMeta(this.name)??{...Ls,...t.defaultMeta};return{value:n,meta:o}}}),this.options=t}get state(){return this.store.state}runValidator(t){return Ty(t.validate)?ri[t.type](t.value,t.validate):t.validate(t.value)}setErrorMap(t){this.setMeta(n=>({...n,errorMap:{...n.errorMap,...t}}))}triggerOnBlurListener(){const t=this.form.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},t)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onBlurDebounceMs;n&&n>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}triggerOnChangeListener(){const t=this.form.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},t)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onChangeDebounceMs;n&&n>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})}}function yf(e){if(e)return e}function Dr(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}function yd(e,t=n=>n){const n=ve(t(e.state));return Be(()=>e,(o,i,a)=>{const r=o.subscribe(()=>{const s=t(o.state);pN(Ky(n.value),s)||(n.value=s)});a(()=>{r()})},{immediate:!0}),qy(n)}function pN(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,i]of e)if(!t.has(o)||!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}function Py(e){const t=(()=>{const a=new hN({...e,form:e.form,name:e.name});return a.Field=Vy,a})(),n=yd(t.store,i=>i);let o;return Ns(()=>{o=t.mount()}),Cd(()=>{o()}),Be(()=>e,()=>{t.update({...e,form:e.form})}),{api:t,state:n}}const Vy=M((e,t)=>{const n=Py({...e,...t.attrs});return()=>t.slots.default({field:n.api,state:n.state.value})},{name:"Field",inheritAttrs:!1});function gN(e){const t=(()=>{const n=new uN(e),o=n;return o.Field=M((i,a)=>()=>bt(Vy,{...i,...a.attrs,form:n},a.slots),{name:"APIField",inheritAttrs:!1}),o.useField=i=>Py({...i,form:n}),o.useStore=i=>yd(n.store,i),o.Subscribe=M((i,a)=>{const s={...i,...a.attrs}.selector??(c=>c),l=yd(n.store,s);return()=>a.slots.default(l.value)},{name:"Subscribe",inheritAttrs:!1}),o})();return Ns(t.mount),t.update(e),t}const fN=M({__name:"DynamicFormWrapper",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=e,o=gN({defaultValues:Ou(n.configMap)}),i=_f("formRef");xd(Si,o);async function a(){const r=await i.value.validate();return n.currentStep?eA(r,[...n.currentStep.properties,"credential_guid_body"]):r}return t({validate:a,form:o}),(r,s)=>{const l=Sy;return C(),T(l,W({ref:"formRef"},n),null,16)}}}),mN=Object.assign(fN,{__name:"DynamicFormWrapper"}),vN={class:"min-h-screen bg-gray-50 py-8 flex flex-col"},bN={class:"w-[700px] mx-auto px-4 flex flex-col flex-1"},yN={class:"flex items-center justify-between mb-8"},xN={class:"flex items-center gap-4"},wN=["src"],CN={class:"mb-8 overflow-x-auto pb-3"},_N={class:"bg-white rounded-lg shadow-sm p-8 flex gap-8 grow"},SN={class:"flex-1 w-full"},kN={class:"flex justify-between py-3 border-t"},EN={key:2,class:"flex ml-auto gap-x-2"},ON={key:3,class:"flex ml-auto gap-x-2"},HN=M({__name:"index",async setup(e){let t,n;const{data:o}=([t,n]=zs(()=>xl("workflow",()=>$fetch("/workflows/v1/configmap/workflow"))),t=await t,n(),t),i=A(()=>o.value.data),a=ve(1),r=A(()=>i.value.config.steps||[]),s=A(()=>r.value?r.value[a.value-1]:{}),l=A(()=>r.value.map(v=>({...v,value:v.id}))),c=ve(!1),d=ve({}),h=ve(""),u=ve(!1),p=_f("formRef");async function m(){const v=QF(await p.value.validate(),f=>xy(f)||yy(f)?JSON.stringify(f):f);return d.value={...d.value,[s.value.id]:v},{...d.value,connection:{connection_name:"test-connection",connection_qualified_name:`default/${i.value.id}/${Math.round(new Date().getTime()/1e3)}`},credentials:v.credential_guid_body?JSON.parse(v.credential_guid_body):null}}xd(by,m);async function g(){c.value=!0,h.value="";try{const v=await m();if(a.value===r.value.length){try{await $fetch("/workflows/v1/start",{method:"POST",body:v}),a.value=1,d.value={},p.value.form.reset(),ii.success("Workflow started successfully!",{placement:"top",duration:3e3})}catch{ii.failed("Failed to start workflow. Please try again.",{placement:"top",duration:3e3})}return}a.value=a.value+1}catch(v){ii.failed("Failed to validate form: "+v.message,{placement:"top"})}finally{c.value=!1}}return(v,f)=>{const y=mN;return C(),H("div",vN,[z("div",bN,[z("div",yN,[z("div",xN,[z("img",{src:b(i).logo,alt:"PostgreSQL Logo",class:"w-16 h-16"},null,8,wN),Z(b(FV),{as:"h1",size:"xl"},{default:P(()=>[Le(oe(b(i).name)+" App ",1)]),_:1})])]),z("div",CN,[Z(b(MD),{items:b(l),"model-value":b(a),orientation:"horizontal",type:"default",onStepChange:f[0]||(f[0]=x=>a.value=x)},null,8,["items","model-value"])]),z("div",_N,[z("div",SN,[Z(y,{ref:"formRef","current-step":b(s),"config-map":b(i).config},null,8,["current-step","config-map"])])]),z("div",kN,[b(a)>0?(C(),T(b(Mn),{key:0,type:"subtle",label:"Back",onClick:f[1]||(f[1]=()=>{a.value=b(a)-1})})):Q("",!0),b(a)<b(r).length?(C(),T(b(Mn),{key:1,label:"Next",class:"ml-auto","is-loading":b(c),onClick:g},null,8,["is-loading"])):b(a)===b(r).length&&!b(u)?(C(),H("div",EN,[b(h)?(C(),T(b(Mn),{key:1,label:"Retry",type:"subtle","is-loading":b(c),onClick:g},null,8,["is-loading"])):(C(),T(b(Mn),{key:0,label:"Start Workflow","is-loading":b(c),onClick:g},null,8,["is-loading"]))])):b(u)?(C(),H("div",ON,[Z(b(Mn),{label:"Workflow Started!",type:"success",disabled:!0})])):Q("",!0)])])])}}});export{HN as default};
|
|
33
|
+
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),r=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(w){return w&&w.exact?a:new RegExp("(?:"+t(w)+n+t(w)+")|(?:"+t(w)+i+t(w)+")","g")};l.v4=function(x){return x&&x.exact?r:new RegExp(""+t(x)+n+t(x),"g")},l.v6=function(x){return x&&x.exact?s:new RegExp(""+t(x)+i+t(x),"g")};var c="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",h=l.v4().source,u=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",f='(?:[/?#][^\\s"]*)?',y="(?:"+c+"|www\\.)"+d+"(?:localhost|"+h+"|"+u+"|"+p+m+g+")"+v+f;return Or=new RegExp("(?:^"+y+"$)","i"),Or},pf={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},oa={integer:function(t){return oa.number(t)&&parseInt(t,10)===t},float:function(t){return oa.number(t)&&!oa.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!oa.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(pf.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(xL())},hex:function(t){return typeof t=="string"&&!!t.match(pf.hex)}},wL=function(t,n,o,i,a){if(t.required&&n===void 0){Sy(t,n,o,i,a);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;r.indexOf(s)>-1?oa[s](n)||i.push(at(a.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&i.push(at(a.messages.types[s],t.fullField,t.type))},CL=function(t,n,o,i,a){var r=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=n,h=null,u=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(u?h="number":p?h="string":m&&(h="array"),!h)return!1;m&&(d=n.length),p&&(d=n.replace(c,"_").length),r?d!==t.len&&i.push(at(a.messages[h].len,t.fullField,t.len)):s&&!l&&d<t.min?i.push(at(a.messages[h].min,t.fullField,t.min)):l&&!s&&d>t.max?i.push(at(a.messages[h].max,t.fullField,t.max)):s&&l&&(d<t.min||d>t.max)&&i.push(at(a.messages[h].range,t.fullField,t.min,t.max))},Ho="enum",_L=function(t,n,o,i,a){t[Ho]=Array.isArray(t[Ho])?t[Ho]:[],t[Ho].indexOf(n)===-1&&i.push(at(a.messages[Ho],t.fullField,t[Ho].join(", ")))},SL=function(t,n,o,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(at(a.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var r=new RegExp(t.pattern);r.test(n)||i.push(at(a.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},re={required:Sy,whitespace:yL,type:wL,range:CL,enum:_L,pattern:SL},kL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n,"string")&&!t.required)return o();re.required(t,n,i,r,a,"string"),Ie(n,"string")||(re.type(t,n,i,r,a),re.range(t,n,i,r,a),re.pattern(t,n,i,r,a),t.whitespace===!0&&re.whitespace(t,n,i,r,a))}o(r)},EL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re.type(t,n,i,r,a)}o(r)},OL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},$L=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re.type(t,n,i,r,a)}o(r)},IL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),Ie(n)||re.type(t,n,i,r,a)}o(r)},TL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},PL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},VL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return o();re.required(t,n,i,r,a,"array"),n!=null&&(re.type(t,n,i,r,a),re.range(t,n,i,r,a))}o(r)},DL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re.type(t,n,i,r,a)}o(r)},ML="enum",RL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a),n!==void 0&&re[ML](t,n,i,r,a)}o(r)},FL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n,"string")&&!t.required)return o();re.required(t,n,i,r,a),Ie(n,"string")||re.pattern(t,n,i,r,a)}o(r)},AL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n,"date")&&!t.required)return o();if(re.required(t,n,i,r,a),!Ie(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),re.type(t,l,i,r,a),l&&re.range(t,l.getTime(),i,r,a)}}o(r)},LL=function(t,n,o,i,a){var r=[],s=Array.isArray(n)?"array":typeof n;re.required(t,n,i,r,a,s),o(r)},mc=function(t,n,o,i,a){var r=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(Ie(n,r)&&!t.required)return o();re.required(t,n,i,s,a,r),Ie(n,r)||re.type(t,n,i,s,a)}o(s)},NL=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Ie(n)&&!t.required)return o();re.required(t,n,i,r,a)}o(r)},ga={string:kL,method:EL,number:OL,boolean:$L,regexp:IL,integer:TL,float:PL,array:VL,object:DL,enum:RL,pattern:FL,date:AL,url:mc,hex:mc,email:mc,required:LL,any:NL};function pd(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var gd=pd(),Na=function(){function e(n){this.rules=null,this._messages=gd,this.define(n)}var t=e.prototype;return t.define=function(o){var i=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(a){var r=o[a];i.rules[a]=Array.isArray(r)?r:[r]})},t.messages=function(o){return o&&(this._messages=hf(pd(),o)),this._messages},t.validate=function(o,i,a){var r=this;i===void 0&&(i={}),a===void 0&&(a=function(){});var s=o,l=i,c=a;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function d(g){var v=[],f={};function y(w){if(Array.isArray(w)){var S;v=(S=v).concat.apply(S,w)}else v.push(w)}for(var x=0;x<g.length;x++)y(g[x]);v.length?(f=hd(v),c(v,f)):c(null,s)}if(l.messages){var h=this.messages();h===gd&&(h=pd()),hf(h,l.messages),l.messages=h}else l.messages=this.messages();var u={},p=l.keys||Object.keys(this.rules);p.forEach(function(g){var v=r.rules[g],f=s[g];v.forEach(function(y){var x=y;typeof x.transform=="function"&&(s===o&&(s=bo({},s)),f=s[g]=x.transform(f)),typeof x=="function"?x={validator:x}:x=bo({},x),x.validator=r.getValidationMethod(x),x.validator&&(x.field=g,x.fullField=x.fullField||g,x.type=r.getType(x),u[g]=u[g]||[],u[g].push({rule:x,value:f,source:s,field:g}))})});var m={};return mL(u,l,function(g,v){var f=g.rule,y=(f.type==="object"||f.type==="array")&&(typeof f.fields=="object"||typeof f.defaultField=="object");y=y&&(f.required||!f.required&&g.value),f.field=g.field;function x(k,O){return bo({},O,{fullField:f.fullField+"."+k,fullFields:f.fullFields?[].concat(f.fullFields,[k]):[k]})}function w(k){k===void 0&&(k=[]);var O=Array.isArray(k)?k:[k];!l.suppressWarning&&O.length&&e.warning("async-validator:",O),O.length&&f.message!==void 0&&(O=[].concat(f.message));var _=O.map(uf(f,s));if(l.first&&_.length)return m[f.field]=1,v(_);if(!y)v(_);else{if(f.required&&!g.value)return f.message!==void 0?_=[].concat(f.message).map(uf(f,s)):l.error&&(_=[l.error(f,at(l.messages.required,f.field))]),v(_);var E={};f.defaultField&&Object.keys(g.value).map(function(R){E[R]=f.defaultField}),E=bo({},E,g.rule.fields);var I={};Object.keys(E).forEach(function(R){var q=E[R],V=Array.isArray(q)?q:[q];I[R]=V.map(x.bind(null,R))});var $=new e(I);$.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),$.validate(g.value,g.rule.options||l,function(R){var q=[];_&&_.length&&q.push.apply(q,_),R&&R.length&&q.push.apply(q,R),v(q.length?q:null)})}}var S;if(f.asyncValidator)S=f.asyncValidator(f,g.value,w,g.source,l);else if(f.validator){try{S=f.validator(f,g.value,w,g.source,l)}catch(k){console.error?.(k),l.suppressValidatorError||setTimeout(function(){throw k},0),w(k.message)}S===!0?w():S===!1?w(typeof f.message=="function"?f.message(f.fullField||f.field):f.message||(f.fullField||f.field)+" fails"):S instanceof Array?w(S):S instanceof Error&&w(S.message)}S&&S.then&&S.then(function(){return w()},function(k){return w(k)})},function(g){d(g)},s)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!ga.hasOwnProperty(o.type))throw new Error(at("Unknown rule type %s",o.type));return o.type||"string"},t.getValidationMethod=function(o){if(typeof o.validator=="function")return o.validator;var i=Object.keys(o),a=i.indexOf("message");return a!==-1&&i.splice(a,1),i.length===1&&i[0]==="required"?ga.required:ga[this.getType(o)]||void 0},e}();Na.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");ga[t]=n};Na.warning=hL;Na.messages=gd;Na.validators=ga;function BL(e){const t=new Na({[e.id]:e.ui?.rules??[]});return{onBlurAsync:async({value:n})=>{try{await t.validate({[e.id]:n})}catch({errors:o}){return o[0].message}}}}const zL={class:"grid grid-cols-8 gap-x-4 gap-y-4"},HL={key:0,class:"text-red-500"},jL={key:1,class:"text-red-500 text-xs"},WL=M({__name:"DynamicForm",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=Yn(Si),o=n.useStore(u=>cd(u.values)),i=(u=8,p,m)=>{let g=`col-span-${u}`;return p&&(g+=` col-start-${p}`),m&&(g+=` col-start-${p}`),g},a=u=>e.baseKey?`${e.baseKey}.${u}`:u,r=A(()=>{const u=JSON.parse(JSON.stringify(e.configMap));if(u.anyOf){u.anyOf.forEach(m=>{m.required.forEach(g=>{u.properties&&u.properties[g]&&(u.properties[g].ui.hidden=!0)})});const p=[];u.anyOf.forEach(m=>{Object.keys(m.properties).every(v=>{if(o.value[a(v)]?.toString()===m.properties[v]?.const?.toString())return!0})&&p.push(m)}),p.length>0&&p.forEach(m=>{m.required.forEach(g=>{u.properties&&u.properties[g]&&(u.properties[g].ui.hidden=!1)})})}return u}),s=u=>{const p=r.value?.properties[u];let m={id:a(u),name:a(u)};if(p.type==="conditional"){const{conditions:g,...v}=p,f=g?.find(y=>y.regex?new RegExp(y.regex).test(o.value[y.property]):o.value[y.property]===y.value);m={...m,...v,...f}}else m={...m,...p};return m},l=A(()=>{{const u=[];return r.value?.properties&&(e.currentStep?.properties?e.currentStep.properties.forEach(p=>{Object.keys(r?.value?.properties).find(g=>g===p)&&(r.value?.properties[p].ui?.hidden||u.push(s(p)))}):Object.keys(r?.value?.properties).forEach(p=>{r.value?.properties[p].ui?.hidden||u.push(s(p))})),u}}),c=["credential","nested","connection","sage","Repeater"],d=u=>{if(u.ui?.widget)switch(u.ui?.widget?.toLowerCase()){case"divider":return"a-divider";case"header":return"h5";case"radio":return ZF;case"credential":return yA;case"nested":return wA;case"input":return fc;case"password":return _A;case"select":return kA;case"sqltree":return OA;case"apitree":return IA;case"sage":return zA;case"connection":return jA;case"fileupload":return qA;case"repeater":return aL;case"connectionselector":return sL;default:return u.ui.widget}else switch(u.type){case"string":case"number":return fc;case"boolean":return"Boolean";case"array":return"Select";case"object":return"Form";case"code":return"CodeBlock";case"banner":return"Banner";default:return fc}};async function h(){if(await n.handleSubmit(),!n.state.isValid)throw new Error("Form is invalid");return n.state.values}return t({validate:h}),(u,p)=>(C(),H("div",zL,[(C(!0),H(Ce,null,Ge(b(l),m=>(C(),H(Ce,{key:`${m.id}`},[m.ui?.hidden?Q("",!0):(C(),H("div",{key:0,class:N(i(m.ui?.grid,m.ui?.start,m.ui?.end))},[c.includes(m?.ui?.widget)?(C(),T(Wt(d(m)),{key:0,property:m},null,8,["property"])):(C(),T(b(n).Field,{key:1,name:m.id,validators:b(BL)(m)},{default:P(({field:g})=>[m.ui?.label?(C(),T(b(Tb),{key:0},{default:P(()=>[Ne(oe(m.ui?.label)+" ",1),m?.required?(C(),H("span",HL," * ")):Q("",!0)]),_:2},1024)):Q("",!0),(C(),T(Wt(d(m)),{field:g,"base-key":e.baseKey,property:m},null,8,["field","base-key","property"])),g.state.meta.isTouched&&!g.state.meta.isValid?(C(),H("span",jL,oe(g.state.meta.errors.join(", ")),1)):Q("",!0)]),_:2},1032,["name","validators"]))],2))],64))),128))]))}}),ky=Object.assign(WL,{__name:"DynamicForm"}),wl=Object.freeze(Object.defineProperty({__proto__:null,default:ky},Symbol.toStringTag,{value:"Module"})),ai=new WeakMap,ss=new WeakMap,Fs={current:[]};let vc=!1,fa=0;const ia=new Set,$r=new Map;function Ey(e){const t=Array.from(e).sort((n,o)=>n instanceof hn&&n.options.deps.includes(o)?1:o instanceof hn&&o.options.deps.includes(n)?-1:0);for(const n of t){if(Fs.current.includes(n))continue;Fs.current.push(n),n.recompute();const o=ss.get(n);if(o)for(const i of o){const a=ai.get(i);a&&Ey(a)}}}function GL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function UL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Oy(e){if(fa>0&&!$r.has(e)&&$r.set(e,e.prevState),ia.add(e),!(fa>0)&&!vc)try{for(vc=!0;ia.size>0;){const t=Array.from(ia);ia.clear();for(const n of t){const o=$r.get(n)??n.prevState;n.prevState=o,GL(n)}for(const n of t){const o=ai.get(n);o&&(Fs.current.push(n),Ey(o))}for(const n of t){const o=ai.get(n);if(o)for(const i of o)UL(i)}}}finally{vc=!1,Fs.current=[],$r.clear()}}function At(e){fa++;try{e()}finally{if(fa--,fa===0){const t=ia.values().next().value;t&&Oy(t)}}}function YL(e){return typeof e=="function"}class As{constructor(t,n){this.listeners=new Set,this.subscribe=o=>{var i,a;this.listeners.add(o);const r=(a=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:a.call(i,o,this);return()=>{this.listeners.delete(o),r?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,o,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):YL(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),Oy(this)}}class hn{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,o=new Array(n),i=new Array(n);for(let a=0;a<n;a++){const r=this.options.deps[a];o[a]=r.prevState,i[a]=r.state}return this.lastSeenDepValues=i,{prevDepVals:o,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,o;this.prevState=this.state;const i=this.getDepVals();this.state=this.options.fn(i),(o=(n=this.options).onUpdate)==null||o.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const a of this.options.deps)a instanceof hn&&a.checkIfRecalculationNeededDeeply();let n=!1;const o=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let a=0;a<i.length;a++)if(i[a]!==o[a]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var o,i;this.listeners.add(n);const a=(i=(o=this.options).onSubscribe)==null?void 0:i.call(o,n,this);return()=>{this.listeners.delete(n),a?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof hn)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof As){let o=ai.get(n);o||(o=new Set,ai.set(n,o)),o.add(this);let i=ss.get(this);i||(i=new Set,ss.set(this,i)),i.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof hn)this.unregisterFromGraph(n.options.deps);else if(n instanceof As){const o=ai.get(n);o&&o.delete(this);const i=ss.get(this);i&&i.delete(n)}}}function qL(e){return typeof e=="function"}function gf(e,...t){return qL(e)?e(...t):e}function KL(e){return e||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"")}class $y{#n=!0;#e;#t;#a;#o;#i;#r;#s;#c=0;#u=5;#d=()=>{this.debugLog("Connected to event bus"),this.#i=!0,this.debugLog("Emitting queued events",this.#o),this.#o.forEach(t=>this.emitEventToBus(t)),this.#o=[],this.stopConnectLoop(),this.#t().removeEventListener("tanstack-connect-success",this.#d)};#l=()=>{if(this.#t().addEventListener("tanstack-connect-success",this.#d),this.#c<this.#u){this.#c++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#t().removeEventListener("tanstack-connect",this.#l),this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};constructor({pluginId:t,debug:n=!1,enabled:o=!0,reconnectEveryMs:i=1e3}){this.#e=t,this.#n=o,this.#t=this.getGlobalTarget,this.#a=n,this.debugLog(" Initializing event subscription for plugin",this.#e),this.#o=[],this.#i=!1,this.#r=null,this.#s=i}startConnectLoop(){this.#r!==null||this.#i||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#r=setInterval(this.#l,this.#s))}stopConnectLoop(){this.#r!==null&&(clearInterval(this.#r),this.#r=null,this.debugLog("Stopped connect loop"))}debugLog(...t){this.#a&&console.log(`🌴 [tanstack-devtools:${this.#e}-plugin]`,...t)}getGlobalTarget(){if(typeof globalThis<"u"&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<"u"&&typeof window.addEventListener<"u")return this.debugLog("Using window as event target"),window;const t=typeof EventTarget<"u"?new EventTarget:void 0;return typeof t>"u"||typeof t.addEventListener>"u"?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),t)}getPluginId(){return this.#e}dispatchCustomEventShim(t,n){try{const o=new Event(t,{detail:n});this.#t().dispatchEvent(o)}catch{this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(t,n){try{this.#t().dispatchEvent(new CustomEvent(t,{detail:n}))}catch{this.dispatchCustomEventShim(t,n)}}emitEventToBus(t){this.debugLog("Emitting event to client bus",t),this.dispatchCustomEvent("tanstack-dispatch-event",t)}emit(t,n){if(!this.#n){this.debugLog("Event bus client is disabled, not emitting event",t,n);return}if(!this.#i){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#o.push({type:`${this.#e}:${t}`,payload:n,pluginId:this.#e}),typeof CustomEvent<"u"&&(this.#l(),this.startConnectLoop());return}return this.emitEventToBus({type:`${this.#e}:${t}`,payload:n,pluginId:this.#e})}on(t,n){const o=`${this.#e}:${t}`;if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event",o),()=>{};const i=a=>{this.debugLog("Received event from bus",a.detail),n(a.detail)};return this.#t().addEventListener(o,i),this.debugLog("Registered event to bus",o),()=>{this.#t().removeEventListener(o,i)}}onAll(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=o=>{const i=o.detail;t(i)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}onAllPluginEvents(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=o=>{const i=o.detail;this.#e&&i.pluginId!==this.#e||t(i)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}}class XL extends $y{constructor(t){super({pluginId:"pacer",debug:t?.debug})}}const ZL=(e,t)=>{Iy.emit(e,t)},Iy=new XL;function ff(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}const JL={enabled:!0,leading:!0,trailing:!0,wait:0};class QL{constructor(t,n){this.fn=t,this.store=new As(ff()),this.setOptions=o=>{this.options={...this.options,...o},this.#t()||this.cancel()},this.#e=o=>{this.store.setState(i=>{const a={...i,...o},{isPending:r}=a;return{...a,status:this.#t()?r?"pending":"idle":"disabled"}}),ZL("Throttler",this)},this.#t=()=>!!gf(this.options.enabled,this),this.#a=()=>gf(this.options.wait,this),this.maybeExecute=(...o)=>{this.#e({maybeExecuteCount:this.store.state.maybeExecuteCount+1});const i=Date.now(),a=i-this.store.state.lastExecutionTime,r=this.#a();if(this.options.leading&&a>=r)this.#o(...o);else if(this.#e({lastArgs:o}),!this.#n&&this.options.trailing){const s=this.store.state.lastExecutionTime?i-this.store.state.lastExecutionTime:0,l=r-s;this.#e({isPending:!0}),this.#n=setTimeout(()=>{const{lastArgs:c}=this.store.state;c!==void 0&&this.#o(...c)},l)}},this.#o=(...o)=>{if(!this.#t())return;this.fn(...o);const i=Date.now(),a=i+this.#a();this.#i(),this.#e({executionCount:this.store.state.executionCount+1,lastExecutionTime:i,nextExecutionTime:a,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(o,this),setTimeout(()=>{this.store.state.isPending||this.#e({nextExecutionTime:void 0})},this.#a())},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&this.#o(...this.store.state.lastArgs)},this.#i=()=>{this.#n&&(clearTimeout(this.#n),this.#n=void 0)},this.cancel=()=>{this.#i(),this.#e({lastArgs:void 0,isPending:!1})},this.reset=()=>{this.#e(ff())},this.key=KL(n.key),this.options={...JL,...n},this.#e(this.options.initialState??{}),Iy.on("d-Throttler",o=>{o.payload.key===this.key&&(this.#e(o.payload.store.state),this.setOptions(o.payload.options))})}#n;#e;#t;#a;#o;#i}function eN(e,t){return new QL(e,t).maybeExecute}function Ty(e,t){return typeof e=="function"?e(t):e}function aa(e,t){return $u(t).reduce((o,i)=>{if(o===null)return null;if(typeof o<"u")return o[i]},e)}function Ir(e,t,n){const o=$u(t);function i(a){if(!o.length)return Ty(n,a);const r=o.shift();if(typeof r=="string"||typeof r=="number"&&!Array.isArray(a))return typeof a=="object"?(a===null&&(a={}),{...a,[r]:i(a[r])}):{[r]:i()};if(Array.isArray(a)&&typeof r=="number"){const s=a.slice(0,r);return[...s.length?s:new Array(r),i(a[r]),...a.slice(r+1)]}return[...new Array(r),i()]}return i(e)}function tN(e,t){const n=$u(t);function o(i){if(!i)return;if(n.length===1){const r=n[0];if(Array.isArray(i)&&typeof r=="number")return i.filter((c,d)=>d!==r);const{[r]:s,...l}=i;return l}const a=n.shift();if(typeof a=="string"&&typeof i=="object")return{...i,[a]:o(i[a])};if(typeof a=="number"&&Array.isArray(i)){if(a>=i.length)return i;const r=i.slice(0,a);return[...r.length?r:new Array(a),o(i[a]),...i.slice(a+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return o(e)}const nN=/^(\d+)$/gm,oN=/\.(\d+)(?=\.)/gm,iN=/^(\d+)\./gm,aN=/\.(\d+$)/gm,rN=/\.{2,}/gm,fd="__int__",Tr=`${fd}$1`;function $u(e){if(Array.isArray(e))return[...e];if(typeof e!="string")throw new Error("Path must be a string.");return e.replace(/(^\[)|]/gm,"").replace(/\[/g,".").replace(nN,Tr).replace(oN,`.${Tr}.`).replace(iN,`${Tr}.`).replace(aN,`.${Tr}`).replace(rN,".").split(".").map(t=>{if(t.startsWith(fd)){const n=t.substring(fd.length),o=parseInt(n,10);return String(o)===n?o:n}return t})}function sN(e){return!(Array.isArray(e)&&e.length===0)}function md(e,t){const n=o=>o.validators.filter(Boolean).map(i=>({cause:i.cause,validate:i.fn}));return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!1},runValidation:n})}function vd(e,t){const{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:o,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},r=n??0,s=l=>l.validators.filter(Boolean).map(c=>{const d=c?.cause||e;let h=r;switch(d){case"change":h=i??r;break;case"blur":h=o??r;break;case"dynamic":h=a??r;break;case"submit":h=0;break}return e==="submit"&&(h=0),{cause:d,validate:c.fn,debounceMs:h}});return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!0},runValidation:s})}const bd=e=>!!e&&typeof e=="object"&&"fields"in e;function Xo(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,a]of e)if(!t.has(i)||!Object.is(a,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const i of n)if(!o.includes(i)||!Xo(e[i],t[i]))return!1;return!0}const mf=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:"form"}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:"field"}:{newErrorValue:void 0,newSource:void 0},vf=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:"field"}:e?{newErrorValue:e,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function Xe(e,t){return e==null?t:{...e,...t}}let yo=256;const ls=[];let Pr;for(;yo--;)ls[yo]=(yo+256).toString(16).substring(1);function lN(){let e=0,t,n="";if(!Pr||yo+16>256){for(Pr=new Array(256),e=256;e--;)Pr[e]=256*Math.random()|0;e=0,yo=0}for(;e<16;e++)t=Pr[yo+e],e===6?n+=ls[t&15|64]:e===8?n+=ls[t&63|128]:n+=ls[t],e&1&&e>1&&e<11&&(n+="-");return yo++,n}const ei=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});const t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:"mount"},o={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:"change"},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:"blur"},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:"submit"},r=t?void 0:{fn:()=>{},cause:"server"};switch(e.event.type){case"mount":return e.runValidation({validators:[n],form:e.form});case"submit":return e.runValidation({validators:[o,i,a,r],form:e.form});case"server":return e.runValidation({validators:[],form:e.form});case"blur":return e.runValidation({validators:[i,r],form:e.form});case"change":return e.runValidation({validators:[o,r],form:e.form});default:throw new Error(`Unknown validation event type: ${e.event.type}`)}};function cN(e,t){const n=new Map;for(const o of e){const i=o.path??[];let a=t,r="";for(let s=0;s<i.length;s++){const l=i[s];if(l===void 0)continue;const c=typeof l=="object"?l.key:l,d=Number(c);Array.isArray(a)&&!Number.isNaN(d)?r+=`[${d}]`:r+=(s>0?".":"")+String(c),typeof a=="object"&&a!==null?a=a[c]:a=void 0}n.set(r,(n.get(r)??[]).concat(o))}return Object.fromEntries(n)}const bf=(e,t)=>{const n=cN(e,t);return{form:n,fields:n}},ri={validate({value:e,validationSource:t},n){const o=n["~standard"].validate(e);if(o instanceof Promise)throw new Error("async function passed to sync validator");if(o.issues)return t==="field"?o.issues:bf(o.issues,e)},async validateAsync({value:e,validationSource:t},n){const o=await n["~standard"].validate(e);if(o.issues)return t==="field"?o.issues:bf(o.issues,e)}},Py=e=>!!e&&"~standard"in e,Ls={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function Vr(e){function t(h,u,p,m){const g=o(h,u,p,m);({insert:()=>s(g,h,u),remove:()=>l(g),swap:()=>m!==void 0&&d(g,h,u,m),move:()=>m!==void 0&&c(g,h,u,m)})[p]()}function n(h,u){return`${h}[${u}]`}function o(h,u,p,m){const g=[n(h,u)];if(p==="swap")g.push(n(h,m));else if(p==="move"){const[v,f]=[Math.min(u,m),Math.max(u,m)];for(let y=v;y<=f;y++)g.push(n(h,y))}else{const v=e.getFieldValue(h),f=Array.isArray(v)?v.length:0;for(let y=u+1;y<f;y++)g.push(n(h,y))}return Object.keys(e.fieldInfo).filter(v=>g.some(f=>v.startsWith(f)))}function i(h,u){return h.replace(/\[(\d+)\]/,(p,m)=>{const g=parseInt(m,10);return`[${u==="up"?g+1:Math.max(0,g-1)}]`})}function a(h,u){(u==="up"?h:[...h].reverse()).forEach(m=>{const g=i(m.toString(),u),v=e.getFieldMeta(g);v?e.setFieldMeta(m,v):e.setFieldMeta(m,r())})}const r=()=>Ls,s=(h,u,p)=>{a(h,"down"),h.forEach(m=>{m.toString().startsWith(n(u,p))&&e.setFieldMeta(m,r())})},l=h=>{a(h,"up")},c=(h,u,p,m)=>{const g=new Map(Object.keys(e.fieldInfo).filter(v=>v.startsWith(n(u,p))).map(v=>[v,e.getFieldMeta(v)]));a(h,p<m?"up":"down"),Object.keys(e.fieldInfo).filter(v=>v.startsWith(n(u,m))).forEach(v=>{const f=v.replace(n(u,m),n(u,p)),y=g.get(f);y&&e.setFieldMeta(v,y)})},d=(h,u,p,m)=>{h.forEach(g=>{if(!g.toString().startsWith(n(u,p)))return;const v=g.toString().replace(n(u,p),n(u,m)),[f,y]=[e.getFieldMeta(g),e.getFieldMeta(v)];f&&e.setFieldMeta(v,f),y&&e.setFieldMeta(g,y)})};return{handleArrayFieldMetaShift:t}}class dN extends $y{constructor(){super({pluginId:"form-devtools"})}}const vt=new dN;function bc(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}class uN{constructor(t){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const o=this.fieldMetaDerived.mount(),i=this.store.mount(),a=()=>{o(),i(),vt.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:r}=this.options.validators||{};return vt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),r&&this.validateSync("mount"),a},this.update=o=>{if(!o)return;const i=this.options;this.options=o;const a=!!o.transform?.deps?.some((l,c)=>l!==this.prevTransformArray[c]),r=o.defaultValues&&!Xo(o.defaultValues,i.defaultValues)&&!this.state.isTouched,s=!Xo(o.defaultState,i.defaultState)&&!this.state.isTouched;!r&&!s&&!a||(At(()=>{this.baseStore.setState(()=>bc(Object.assign({},this.state,s?o.defaultState:{},r?{values:o.defaultValues}:{},a?{_force_re_eval:!this.state._force_re_eval}:{})))}),vt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(o,i)=>{const{fieldMeta:a}=this.state,r=this.resetFieldMeta(a);o&&!i?.keepDefaultValues&&(this.options={...this.options,defaultValues:o}),this.baseStore.setState(()=>bc({...this.options.defaultState,values:o??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:r}))},this.validateAllFields=async o=>{const i=[];return At(()=>{Object.values(this.fieldInfo).forEach(r=>{if(!r.instance)return;const s=r.instance;i.push(Promise.resolve().then(()=>s.validate(o,{skipFormValidation:!0}))),r.instance.state.meta.isTouched||r.instance.setMeta(l=>({...l,isTouched:!0}))})}),(await Promise.all(i)).flat()},this.validateArrayFieldsStartingFrom=async(o,i,a)=>{const r=this.getFieldValue(o),s=Array.isArray(r)?Math.max(r.length-1,0):null,l=[`${o}[${i}]`];for(let u=i+1;u<=(s??0);u++)l.push(`${o}[${u}]`);const c=Object.keys(this.fieldInfo).filter(u=>l.some(p=>u.startsWith(p))),d=[];return At(()=>{c.forEach(u=>{d.push(Promise.resolve().then(()=>this.validateField(u,a)))})}),(await Promise.all(d)).flat()},this.validateField=(o,i)=>{const a=this.fieldInfo[o]?.instance;return a?(a.state.meta.isTouched||a.setMeta(r=>({...r,isTouched:!0})),a.validate(i)):[]},this.validateSync=o=>{const i=md(o,{...this.options,form:this,validationLogic:this.options.validationLogic||ei});let a=!1;const r={};return At(()=>{for(const c of i){if(!c.validate)continue;const d=this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:h,fieldErrors:u}=cs(d),p=Xi(c.cause);for(const m of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[m]===void 0)continue;const g=this.getFieldMeta(m);if(!g)continue;const{errorMap:v,errorSourceMap:f}=g,y=u?.[m],{newErrorValue:x,newSource:w}=mf({newFormValidatorError:y,isPreviousErrorFromFormValidator:f?.[p]==="form",previousErrorValue:v?.[p]});w==="form"&&(r[m]={...r[m],[p]:y}),v?.[p]!==x&&this.setFieldMeta(m,S=>({...S,errorMap:{...S.errorMap,[p]:x},errorSourceMap:{...S.errorSourceMap,[p]:w}}))}this.state.errorMap?.[p]!==h&&this.baseStore.setState(m=>({...m,errorMap:{...m.errorMap,[p]:h}})),(h||u)&&(a=!0)}const s=Xi("submit");this.state.errorMap?.[s]&&o!=="submit"&&!a&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[s]:void 0}}));const l=Xi("server");this.state.errorMap?.[l]&&o!=="server"&&!a&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[l]:void 0}}))}),{hasErrored:a,fieldsErrorMap:r}},this.validateAsync=async o=>{const i=vd(o,{...this.options,form:this,validationLogic:this.options.validationLogic||ei});this.state.isFormValidating||this.baseStore.setState(c=>({...c,isFormValidating:!0}));const a=[];let r;for(const c of i){if(!c.validate)continue;const d=Xi(c.cause);this.state.validationMetaMap[d]?.lastAbortController.abort();const u=new AbortController;this.state.validationMetaMap[d]={lastAbortController:u},a.push(new Promise(async p=>{let m;try{m=await new Promise((y,x)=>{setTimeout(async()=>{if(u.signal.aborted)return y(void 0);try{y(await this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:u.signal},type:"validateAsync"}))}catch(w){x(w)}},c.debounceMs)})}catch(y){m=y}const{formError:g,fieldErrors:v}=cs(m);v&&(r=r?{...r,...v}:v);const f=Xi(c.cause);for(const y of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[y]===void 0)continue;const x=this.getFieldMeta(y);if(!x)continue;const{errorMap:w,errorSourceMap:S}=x,k=r?.[y],{newErrorValue:O,newSource:_}=mf({newFormValidatorError:k,isPreviousErrorFromFormValidator:S?.[f]==="form",previousErrorValue:w?.[f]});w?.[f]!==O&&this.setFieldMeta(y,E=>({...E,errorMap:{...E.errorMap,[f]:O},errorSourceMap:{...E.errorSourceMap,[f]:_}}))}this.baseStore.setState(y=>({...y,errorMap:{...y.errorMap,[f]:g}})),p(r?{fieldErrors:r,errorMapKey:f}:void 0)}))}let s=[];const l={};if(a.length){s=await Promise.all(a);for(const c of s)if(c?.fieldErrors){const{errorMapKey:d}=c;for(const[h,u]of Object.entries(c.fieldErrors)){const m={...l[h]||{},[d]:u};l[h]=m}}}return this.baseStore.setState(c=>({...c,isFormValidating:!1})),l},this.validate=o=>{const{hasErrored:i,fieldsErrorMap:a}=this.validateSync(o);return i&&!this.options.asyncAlways?a:this.validateAsync(o)},this.getFieldValue=o=>aa(this.state.values,o),this.getFieldMeta=o=>this.state.fieldMeta[o],this.getFieldInfo=o=>this.fieldInfo[o]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(o,i)=>{this.baseStore.setState(a=>({...a,fieldMetaBase:{...a.fieldMetaBase,[o]:Ty(i,a.fieldMetaBase[o])}}))},this.resetFieldMeta=o=>Object.keys(o).reduce((i,a)=>{const r=a;return i[r]=Ls,i},{}),this.setFieldValue=(o,i,a)=>{const r=a?.dontUpdateMeta??!1,s=a?.dontRunListeners??!1,l=a?.dontValidate??!1;At(()=>{r||this.setFieldMeta(o,c=>({...c,isTouched:!0,isDirty:!0,errorMap:{...c?.errorMap,onMount:void 0}})),this.baseStore.setState(c=>({...c,values:Ir(c.values,o,i)}))}),s||this.getFieldInfo(o).instance?.triggerOnChangeListener(),l||this.validateField(o,"change")},this.deleteField=o=>{const a=[...Object.keys(this.fieldInfo).filter(r=>{const s=o.toString();return r!==s&&r.startsWith(s)}),o];this.baseStore.setState(r=>{const s={...r};return a.forEach(l=>{s.values=tN(s.values,l),delete this.fieldInfo[l],delete s.fieldMetaBase[l]}),s})},this.pushFieldValue=(o,i,a)=>{this.setFieldValue(o,r=>[...Array.isArray(r)?r:[],i],a)},this.insertFieldValue=async(o,i,a,r)=>{this.setFieldValue(o,l=>[...l.slice(0,i),a,...l.slice(i)],Xe(r,{dontValidate:!0}));const s=r?.dontValidate??!1;s||await this.validateField(o,"change"),Vr(this).handleArrayFieldMetaShift(o,i,"insert"),s||await this.validateArrayFieldsStartingFrom(o,i,"change")},this.replaceFieldValue=async(o,i,a,r)=>{this.setFieldValue(o,l=>l.map((c,d)=>d===i?a:c),Xe(r,{dontValidate:!0})),(r?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.removeFieldValue=async(o,i,a)=>{const r=this.getFieldValue(o),s=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(o,c=>c.filter((d,h)=>h!==i),Xe(a,{dontValidate:!0})),Vr(this).handleArrayFieldMetaShift(o,i,"remove"),s!==null){const c=`${o}[${s}]`;this.deleteField(c)}(a?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.swapFieldValues=(o,i,a,r)=>{this.setFieldValue(o,l=>{const c=l[i],d=l[a];return Ir(Ir(l,`${i}`,d),`${a}`,c)},Xe(r,{dontValidate:!0})),Vr(this).handleArrayFieldMetaShift(o,i,"swap",a),(r?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${a}]`,"change"))},this.moveFieldValues=(o,i,a,r)=>{this.setFieldValue(o,l=>{const c=[...l];return c.splice(a,0,c.splice(i,1)[0]),c},Xe(r,{dontValidate:!0})),Vr(this).handleArrayFieldMetaShift(o,i,"move",a),(r?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${a}]`,"change"))},this.clearFieldValues=(o,i)=>{const a=this.getFieldValue(o),r=Array.isArray(a)?Math.max(a.length-1,0):null;if(this.setFieldValue(o,[],Xe(i,{dontValidate:!0})),r!==null)for(let l=0;l<=r;l++){const c=`${o}[${l}]`;this.deleteField(c)}(i?.dontValidate??!1)||this.validateField(o,"change")},this.resetField=o=>{this.baseStore.setState(i=>({...i,fieldMetaBase:{...i.fieldMetaBase,[o]:Ls},values:this.options.defaultValues?Ir(i.values,o,aa(this.options.defaultValues,o)):i.values}))},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((o,[i,a])=>(Object.keys(a).length&&a.errors.length&&(o[i]={errors:a.errors,errorMap:a.errorMap}),o),{})}),this.parseValuesWithSchema=o=>ri.validate({value:this.state.values,validationSource:"form"},o),this.parseValuesWithSchemaAsync=o=>ri.validateAsync({value:this.state.values,validationSource:"form"},o),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=t?.formId??lN(),this._devtoolsSubmissionOverride=!1,this.baseStore=new As(bc({...t?.defaultState,values:t?.defaultValues??t?.defaultState?.values})),this.fieldMetaDerived=new hn({deps:[this.baseStore],fn:({prevDepVals:o,currDepVals:i,prevVal:a})=>{const r=a,s=o?.[0],l=i[0];let c=0;const d={};for(const h of Object.keys(l.fieldMetaBase)){const u=l.fieldMetaBase[h],p=s?.fieldMetaBase[h],m=r?.[h],g=aa(l.values,h);let v=m?.errors;if(!p||u.errorMap!==p.errorMap){v=Object.values(u.errorMap??{}).filter(S=>S!==void 0);const w=this.getFieldInfo(h)?.instance;w&&!w.options.disableErrorFlat&&(v=v?.flat(1))}const f=!sN(v??[]),y=!u.isDirty,x=Xo(g,aa(this.options.defaultValues,h))||Xo(g,this.getFieldInfo(h)?.instance?.options.defaultValue);if(m&&m.isPristine===y&&m.isValid===f&&m.isDefaultValue===x&&m.errors===v&&u===p){d[h]=m,c++;continue}d[h]={...u,errors:v,isPristine:y,isValid:f,isDefaultValue:x}}return Object.keys(l.fieldMetaBase).length&&r&&c===Object.keys(l.fieldMetaBase).length?r:d}}),this.store=new hn({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:o,currDepVals:i,prevVal:a})=>{const r=a,s=o?.[0],l=i[0],c=i[1],d=Object.values(c).filter(Boolean),h=d.some(V=>V.isValidating),u=d.every(V=>V.isValid),p=d.some(V=>V.isTouched),m=d.some(V=>V.isBlurred),g=d.every(V=>V.isDefaultValue),v=p&&l.errorMap?.onMount,f=d.some(V=>V.isDirty),y=!f,x=!!(l.errorMap?.onMount||d.some(V=>V?.errorMap?.onMount)),w=!!h;let S=r?.errors??[];(!s||l.errorMap!==s.errorMap)&&(S=Object.values(l.errorMap).reduce((V,D)=>D===void 0?V:D&&bd(D)?(V.push(D.form),V):(V.push(D),V),[]));const k=S.length===0,O=u&&k,_=this.options.canSubmitWhenInvalid??!1,E=l.submissionAttempts===0&&!p&&!x||!w&&!l.isSubmitting&&O||_;let I=l.errorMap;if(v&&(S=S.filter(V=>V!==l.errorMap.onMount),I=Object.assign(I,{onMount:void 0})),r&&s&&r.errorMap===I&&r.fieldMeta===this.fieldMetaDerived.state&&r.errors===S&&r.isFieldsValidating===h&&r.isFieldsValid===u&&r.isFormValid===k&&r.isValid===O&&r.canSubmit===E&&r.isTouched===p&&r.isBlurred===m&&r.isPristine===y&&r.isDefaultValue===g&&r.isDirty===f&&Xo(s,l))return r;let $={...l,errorMap:I,fieldMeta:this.fieldMetaDerived.state,errors:S,isFieldsValidating:h,isFieldsValid:u,isFormValid:k,isValid:O,canSubmit:E,isTouched:p,isBlurred:m,isPristine:y,isDefaultValue:g,isDirty:f};const R=this.options.transform?.deps??[];if(R.length!==this.prevTransformArray.length||R.some((V,D)=>V!==this.prevTransformArray[D])){const V=Object.assign({},this,{state:$});this.options.transform?.fn(V),$=V.state,this.prevTransformArray=R}return $}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(t||{});const n=eN(o=>vt.emit("form-state",{id:this._formId,state:o}),{wait:300});this.store.subscribe(()=>{n(this.store.state)}),vt.on("request-form-state",o=>{o.payload.id===this._formId&&vt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),vt.on("request-form-reset",o=>{o.payload.id===this._formId&&this.reset()}),vt.on("request-form-force-submit",o=>{o.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)})}get state(){return this.store.state}get formId(){return this._formId}runValidator(t){return Py(t.validate)?ri[t.type](t.value,t.validate):t.validate(t.value)}async handleSubmit(t){this.baseStore.setState(i=>({...i,isSubmitted:!1,submissionAttempts:i.submissionAttempts+1,isSubmitSuccessful:!1})),At(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance&&(i.instance.state.meta.isTouched||i.instance.setMeta(a=>({...a,isTouched:!0})))})});const n=t??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n});return}this.baseStore.setState(i=>({...i,isSubmitting:!0}));const o=()=>{this.baseStore.setState(i=>({...i,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){o(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validateAllFields",errors:Object.values(this.state.fieldMeta).map(i=>i.errors).flat()});return}if(await this.validate("submit"),!this.state.isValid){o(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}At(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance?.options.listeners?.onSubmit?.({value:i.instance.state.value,fieldApi:i.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:n});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:n}),At(()=>{this.baseStore.setState(i=>({...i,isSubmitted:!0,isSubmitSuccessful:!0})),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),o()})}catch(i){throw this.baseStore.setState(a=>({...a,isSubmitSuccessful:!1})),vt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:i}),o(),i}}setErrorMap(t){At(()=>{Object.entries(t).forEach(([n,o])=>{const i=n;if(bd(o)){const{formError:a,fieldErrors:r}=cs(o);for(const s of Object.keys(this.fieldInfo))this.getFieldMeta(s)&&this.setFieldMeta(s,c=>({...c,errorMap:{...c.errorMap,[i]:r?.[s]},errorSourceMap:{...c.errorSourceMap,[i]:"form"}}));this.baseStore.setState(s=>({...s,errorMap:{...s.errorMap,[i]:a}}))}else this.baseStore.setState(a=>({...a,errorMap:{...a.errorMap,[i]:o}}))})})}}function cs(e){if(e){if(bd(e)){const t=cs(e.form).formError,n=e.fields;return{formError:t,fieldErrors:n}}return{formError:e}}return{formError:void 0}}function Xi(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}class hN{constructor(t){this.options={},this.mount=()=>{const n=this.store.mount();this.options.defaultValue!==void 0&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});const o=this.getInfo();o.instance=this,this.update(this.options);const{onMount:i}=this.options.validators||{};if(i){const a=this.runValidator({validate:i,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});a&&this.setMeta(r=>({...r,errorMap:{...r?.errorMap,onMount:a},errorSourceMap:{...r?.errorSourceMap,onMount:"field"}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),n},this.update=n=>{this.options=n;const o=this.name!==n.name;if(this.name=n.name,this.state.value===void 0){const i=aa(n.form.options.defaultValues,n.name),a=n.defaultValue??i;o?this.setValue(r=>r||a,{dontUpdateMeta:!0}):a!==void 0&&this.setValue(a,{dontUpdateMeta:!0})}this.form.getFieldMeta(this.name)===void 0&&this.setMeta(this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(n,o)=>{this.form.setFieldValue(this.name,n,Xe(o,{dontRunListeners:!0,dontValidate:!0})),o?.dontRunListeners||this.triggerOnChangeListener(),o?.dontValidate||this.validate("change")},this.getMeta=()=>this.store.state.meta,this.setMeta=n=>this.form.setFieldMeta(this.name,n),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(n,o)=>{this.form.pushFieldValue(this.name,n,Xe(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(n,o,i)=>{this.form.insertFieldValue(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(n,o,i)=>{this.form.replaceFieldValue(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(n,o)=>{this.form.removeFieldValue(this.name,n,Xe(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(n,o,i)=>{this.form.swapFieldValues(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(n,o,i)=>{this.form.moveFieldValues(this.name,n,o,Xe(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=n=>{this.form.clearFieldValues(this.name,Xe(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=n=>{const o=Object.values(this.form.fieldInfo),i=[];for(const a of o){if(!a.instance)continue;const{onChangeListenTo:r,onBlurListenTo:s}=a.instance.options.validators||{};n==="change"&&r?.includes(this.name)&&i.push(a.instance),n==="blur"&&s?.includes(this.name)&&i.push(a.instance)}return i},this.validateSync=(n,o)=>{const i=md(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||ei}),r=this.getLinkedFields(n).reduce((c,d)=>{const h=md(n,{...d.options,form:d.form,validationLogic:d.form.options.validationLogic||ei});return h.forEach(u=>{u.field=d}),c.concat(h)},[]);let s=!1;At(()=>{const c=(d,h)=>{const u=Dr(h.cause),p=h.validate?yf(d.runValidator({validate:h.validate,value:{value:d.store.state.value,validationSource:"field",fieldApi:d},type:"validate"})):void 0,m=o[u],{newErrorValue:g,newSource:v}=vf({formLevelError:m,fieldLevelError:p});d.state.meta.errorMap?.[u]!==g&&d.setMeta(f=>({...f,errorMap:{...f.errorMap,[u]:g},errorSourceMap:{...f.errorSourceMap,[u]:v}})),g&&(s=!0)};for(const d of i)c(this,d);for(const d of r)d.validate&&c(d.field,d)});const l=Dr("submit");return this.state.meta.errorMap?.[l]&&n!=="submit"&&!s&&this.setMeta(c=>({...c,errorMap:{...c.errorMap,[l]:void 0},errorSourceMap:{...c.errorSourceMap,[l]:void 0}})),{hasErrored:s}},this.validateAsync=async(n,o)=>{const i=vd(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||ei}),a=await o,r=this.getLinkedFields(n),s=r.reduce((u,p)=>{const m=vd(n,{...p.options,form:p.form,validationLogic:p.form.options.validationLogic||ei});return m.forEach(g=>{g.field=p}),u.concat(m)},[]);this.state.meta.isValidating||this.setMeta(u=>({...u,isValidating:!0}));for(const u of r)u.setMeta(p=>({...p,isValidating:!0}));const l=[],c=[],d=(u,p,m)=>{const g=Dr(p.cause);u.getInfo().validationMetaMap[g]?.lastAbortController.abort();const f=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:f},m.push(new Promise(async y=>{let x;try{x=await new Promise((_,E)=>{this.timeoutIds.validations[p.cause]&&clearTimeout(this.timeoutIds.validations[p.cause]),this.timeoutIds.validations[p.cause]=setTimeout(async()=>{if(f.signal.aborted)return _(void 0);try{_(await this.runValidator({validate:p.validate,value:{value:u.store.state.value,fieldApi:u,signal:f.signal,validationSource:"field"},type:"validateAsync"}))}catch(I){E(I)}},p.debounceMs)})}catch(_){x=_}if(f.signal.aborted)return y(void 0);const w=yf(x),S=a[this.name]?.[g],{newErrorValue:k,newSource:O}=vf({formLevelError:S,fieldLevelError:w});u.setMeta(_=>({..._,errorMap:{..._?.errorMap,[g]:k},errorSourceMap:{..._.errorSourceMap,[g]:O}})),y(k)}))};for(const u of i)u.validate&&d(this,u,l);for(const u of s)u.validate&&d(u.field,u,c);let h=[];(l.length||c.length)&&(h=await Promise.all(l),await Promise.all(c)),this.setMeta(u=>({...u,isValidating:!1}));for(const u of r)u.setMeta(p=>({...p,isValidating:!1}));return h.filter(Boolean)},this.validate=(n,o)=>{if(!this.state.meta.isTouched)return[];const{fieldsErrorMap:i}=o?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(n),{hasErrored:a}=this.validateSync(n,i[this.name]??{});if(a&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[Dr(n)]?.lastAbortController.abort(),this.state.meta.errors;const r=o?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(n);return this.validateAsync(n,r)},this.handleChange=n=>{this.setValue(n)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(o=>({...o,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(o=>({...o,isBlurred:!0})),this.validate("blur"),this.triggerOnBlurListener()},this.parseValueWithSchema=n=>ri.validate({value:this.state.value,validationSource:"field"},n),this.parseValueWithSchemaAsync=n=>ri.validateAsync({value:this.state.value,validationSource:"field"},n),this.form=t.form,this.name=t.name,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new hn({deps:[this.form.store],fn:()=>{const n=this.form.getFieldValue(this.name),o=this.form.getFieldMeta(this.name)??{...Ls,...t.defaultMeta};return{value:n,meta:o}}}),this.options=t}get state(){return this.store.state}runValidator(t){return Py(t.validate)?ri[t.type](t.value,t.validate):t.validate(t.value)}setErrorMap(t){this.setMeta(n=>({...n,errorMap:{...n.errorMap,...t}}))}triggerOnBlurListener(){const t=this.form.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},t)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onBlurDebounceMs;n&&n>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}triggerOnChangeListener(){const t=this.form.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},t)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onChangeDebounceMs;n&&n>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})}}function yf(e){if(e)return e}function Dr(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}function yd(e,t=n=>n){const n=ve(t(e.state));return Me(()=>e,(o,i,a)=>{const r=o.subscribe(()=>{const s=t(o.state);pN(Xy(n.value),s)||(n.value=s)});a(()=>{r()})},{immediate:!0}),Ky(n)}function pN(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,i]of e)if(!t.has(o)||!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}function Vy(e){const t=(()=>{const a=new hN({...e,form:e.form,name:e.name});return a.Field=Dy,a})(),n=yd(t.store,i=>i);let o;return Ns(()=>{o=t.mount()}),Cd(()=>{o()}),Me(()=>e,()=>{t.update({...e,form:e.form})}),{api:t,state:n}}const Dy=M((e,t)=>{const n=Vy({...e,...t.attrs});return()=>t.slots.default({field:n.api,state:n.state.value})},{name:"Field",inheritAttrs:!1});function gN(e){const t=(()=>{const n=new uN(e),o=n;return o.Field=M((i,a)=>()=>bt(Dy,{...i,...a.attrs,form:n},a.slots),{name:"APIField",inheritAttrs:!1}),o.useField=i=>Vy({...i,form:n}),o.useStore=i=>yd(n.store,i),o.Subscribe=M((i,a)=>{const s={...i,...a.attrs}.selector??(c=>c),l=yd(n.store,s);return()=>a.slots.default(l.value)},{name:"Subscribe",inheritAttrs:!1}),o})();return Ns(t.mount),t.update(e),t}const fN=M({__name:"DynamicFormWrapper",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=e,o=gN({defaultValues:Ou(n.configMap)}),i=_f("formRef");xd(Si,o);async function a(){const r=await i.value.validate();return n.currentStep?tA(r,[...n.currentStep.properties,"credential_guid_body","credential_property_id"]):r}return t({validate:a,form:o}),(r,s)=>{const l=ky;return C(),T(l,W({ref:"formRef"},n),null,16)}}}),mN=Object.assign(fN,{__name:"DynamicFormWrapper"}),vN={class:"min-h-screen bg-gray-50 py-8 flex flex-col"},bN={class:"w-[700px] mx-auto px-4 flex flex-col flex-1"},yN={class:"flex items-center justify-between mb-8"},xN={class:"flex items-center gap-4"},wN=["src"],CN={class:"mb-8 overflow-x-auto pb-3"},_N={class:"bg-white rounded-lg shadow-sm p-8 flex gap-8 grow"},SN={class:"flex-1 w-full"},kN={class:"flex justify-between py-3 border-t"},EN={key:2,class:"flex ml-auto gap-x-2"},ON={key:3,class:"flex ml-auto gap-x-2"},HN=M({__name:"index",async setup(e){let t,n;const{data:o}=([t,n]=zs(()=>xl("workflow",()=>$fetch("/workflows/v1/configmap/workflow"))),t=await t,n(),t),i=A(()=>o.value.data),a=ve(1),r=A(()=>i.value.config.steps||[]),s=A(()=>r.value?r.value[a.value-1]:{}),l=A(()=>r.value.map(v=>({...v,value:v.id}))),c=ve(!1),d=ve({}),h=ve(""),u=ve(!1),p=_f("formRef");async function m(){let v=eA(await p.value.validate(),x=>xy(x)||yy(x)?JSON.stringify(x):x);const f=v.credential_guid_body,y=v.credential_property_id;return v=wy(v,["credential_guid_body","credential_property_id",y]),d.value={...d.value,[s.value.id]:v},{...d.value,connection:{connection_name:"test-connection",connection_qualified_name:`default/${i.value.id}/${Math.round(new Date().getTime()/1e3)}`},...f?{credentials:JSON.parse(f)}:{}}}xd(by,m);async function g(){c.value=!0,h.value="";try{const v=await m();if(a.value===r.value.length){try{await $fetch("/workflows/v1/start",{method:"POST",body:v}),a.value=1,d.value={},p.value.form.reset(),ii.success("Workflow started successfully!",{placement:"top",duration:3e3})}catch{ii.failed("Failed to start workflow. Please try again.",{placement:"top",duration:3e3})}return}a.value=a.value+1}catch(v){ii.failed("Failed to validate form: "+v.message,{placement:"top"})}finally{c.value=!1}}return(v,f)=>{const y=mN;return C(),H("div",vN,[z("div",bN,[z("div",yN,[z("div",xN,[z("img",{src:b(i).logo,alt:"PostgreSQL Logo",class:"w-16 h-16"},null,8,wN),Z(b(AV),{as:"h1",size:"xl"},{default:P(()=>[Ne(oe(b(i).name)+" App ",1)]),_:1})])]),z("div",CN,[Z(b(RD),{items:b(l),"model-value":b(a),orientation:"horizontal",type:"default",onStepChange:f[0]||(f[0]=x=>a.value=x)},null,8,["items","model-value"])]),z("div",_N,[z("div",SN,[Z(y,{ref:"formRef","current-step":b(s),"config-map":b(i).config},null,8,["current-step","config-map"])])]),z("div",kN,[b(a)>0?(C(),T(b(Mn),{key:0,type:"subtle",label:"Back",onClick:f[1]||(f[1]=()=>{a.value=b(a)-1})})):Q("",!0),b(a)<b(r).length?(C(),T(b(Mn),{key:1,label:"Next",class:"ml-auto","is-loading":b(c),onClick:g},null,8,["is-loading"])):b(a)===b(r).length&&!b(u)?(C(),H("div",EN,[b(h)?(C(),T(b(Mn),{key:1,label:"Retry",type:"subtle","is-loading":b(c),onClick:g},null,8,["is-loading"])):(C(),T(b(Mn),{key:0,label:"Start Workflow","is-loading":b(c),onClick:g},null,8,["is-loading"]))])):b(u)?(C(),H("div",ON,[Z(b(Mn),{label:"Workflow Started!",type:"success",disabled:!0})])):Q("",!0)])])])}}});export{HN as default};
|