@atlanhq/app-playground 3.1.0 → 3.2.0
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/{BF5xASL3.js → C4Uf7gf2.js} +3 -3
- package/.output/public/_nuxt/{C6awKp-N.js → D2Qmo0ol.js} +1 -1
- package/.output/public/_nuxt/DCLW_Qy0.js +89 -0
- package/.output/public/_nuxt/{_JfYUFbB.js → DDms_zth.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/c9fff919-74b3-44f4-889a-61c81c84af15.json +1 -0
- package/.output/public/index.html +1 -1
- package/package.json +3 -3
- package/.output/public/_nuxt/B_9qlsYF.js +0 -89
- package/.output/public/_nuxt/builds/meta/f8b2f690-24e3-4b3c-8ad5-1ef145775749.json +0 -1
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import{F as zs,G as YC,H as m0,I as v0,k as I,J as zp,K as xt,L as Ye,r as fe,d as O,M as KC,N as Se,h as Pt,O as oe,P as E,Q as g,z as w,D as C,R as V,S as U,T as ft,U as yt,o as ta,e as b0,V as oo,s as jc,W as ze,X as Hp,Y as Ut,Z as _n,y as M,A as N,C as j,$ as Hs,a0 as L,a1 as Ie,B as se,E as Ne,a2 as XC,a3 as y0,a4 as At,a5 as x0,a6 as ZC,a7 as _h,a8 as ei,a9 as Ch,aa as kh,a as JC,ab as QC,ac as ek,ad as tk,ae as nk,af as ok,ag as ik,ah as rk,ai as na,aj as ci,ak as ui,al as w0,am as ak,an as _0,ao as Rg,ap as sk,_ as $u,aq as lk,ar as Dg,as as ck,at as C0,x as uk}from"./BF5xASL3.js";function Sh(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var dk=e=>typeof e=="object"&&e!==null;function jp(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var hk=e=>e==="base";function pk(e){return e.slice().filter(t=>!hk(t))}function Vg(e){return String.fromCharCode(e+(e>25?39:97))}function fk(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Vg(n%52)+t;return Vg(n%52)+t}function gk(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function mk(e){return fk(gk(5381,e)>>>0)}var k0=/\s*!(important)?/i;function vk(e){return typeof e=="string"?k0.test(e):!1}function bk(e){return typeof e=="string"?e.replace(k0,"").trim():e}function S0(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var js=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 Wp(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],r=n[o];Sh(i)&&Sh(r)?t[o]=Wp(i,r):t[o]=r}),t),{})}var yk=e=>e!=null;function $0(e,t,n={}){const{stop:o,getKey:i}=n;function r(a,s=[]){if(dk(a)){const l={};for(const[c,u]of Object.entries(a)){const d=i?.(c,u)??c,h=[...s,d];if(o!=null&&o(a,h))return t(a,s);const p=r(u,h);yk(p)&&(l[d]=p)}return l}return t(a,s)}return r(e)}function xk(e,t){return e.reduce((n,o,i)=>{const r=t[i];return o!=null&&(n[r]=o),n},{})}function E0(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:r,resolveShorthand:a}=o;return $0(e,s=>Array.isArray(s)?xk(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>r?a(s):s:void 0})}var wk={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},_k=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function Ck(e){const{utility:t,hash:n,conditions:o=wk}=e,i=a=>[t.prefix,a].filter(Boolean).join("-"),r=(a,s)=>{let l;if(n){const c=[...o.finalize(a),s];l=i(t.toHash(c,mk))}else l=[...o.finalize(a),i(s)].join(":");return l};return js(({base:a,...s}={})=>{const l=Object.assign(s,a),c=E0(l,e),u=new Set;return $0(c,(d,h)=>{if(d==null)return;const p=vk(d),[m,...f]=o.shift(h),b=pk(f),v=t.transform(m,bk(_k(d)));let y=r(b,v.className);p&&(y=`${y}!`),u.add(y)}),Array.from(u).join(" ")})}function kk(...e){return e.flat().filter(t=>Sh(t)&&Object.keys(jp(t)).length>0)}function Sk(e){function t(i){const r=kk(...i);return r.length===1?r:r.map(a=>E0(a,e))}function n(...i){return Wp(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:js(n),assignCss:o}}var $k=/([A-Z])/g,Ek=/^ms-/,Tk=js(e=>e.startsWith("--")?e:e.replace($k,"-$1").replace(Ek,"-ms-").toLowerCase()),Ok="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,%";`${Ok.split(",").join("|")}`;var Ik=(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?Pk(e.compoundVariants,o):[]}},n=(e.slots??[]).map(o=>[o,t(o)]);for(const[o,i]of Object.entries(e.variants??{}))for(const[r,a]of Object.entries(i))n.forEach(([s,l])=>{var c;(c=l.variants)[o]??(c[o]={}),l.variants[o][r]=a[s]??{}});return Object.fromEntries(n)},Pk=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function T0(e,...t){const n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),i=a=>{const s={};for(let l=0;l<a.length;l++){const c=a[l];n[c]&&(Object.defineProperty(s,c,n[c]),delete n[c])}return s},r=a=>i(Array.isArray(a)?a:o.filter(a));return t.map(r).concat(i(o))}var Ak=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const Rk="_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",O0=new Set(Rk.split(",")),Dk=/^@|&|&$/;function Mg(e){return O0.has(e)||Dk.test(e)}const Vk=/^_/,Mk=/&|@/;function Nk(e){return e.map(t=>O0.has(t)?t.replace(Vk,""):Mk.test(t)?`[${S0(t.trim())}]`:t)}function Lk(e){return e.sort((t,n)=>{const o=Mg(t),i=Mg(n);return o&&!i?1:!o&&i?-1:0})}const Fk="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",I0=new Map,P0=new Map;Fk.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");I0.set(t,o),i.length&&i.forEach(r=>{P0.set(r==="1"?o:r,t)})});const Ng=e=>P0.get(e)||e,A0={conditions:{shift:Lk,finalize:Nk,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Ng(e);return{className:`${I0.get(n)||Tk(n)}_${S0(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Ng}},Bk=Ck(A0),Ft=(...e)=>Bk(Oi(...e));Ft.raw=(...e)=>Oi(...e);const{mergeCss:Oi}=Sk(A0),Lg=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function Qi(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=Lg(e),r=h=>({...o,...jp(h)});function a(h={}){var p;const m=r(h);let f={...t};for(const[v,y]of Object.entries(m))(p=n[v])!=null&&p[y]&&(f=Oi(f,n[v][y]));const b=zk(i,m);return Oi(f,b)}function s(h){const p=Lg(h.config),m=Ak(h.variantKeys,Object.keys(n));return Qi({base:Oi(t,p.base),variants:Object.fromEntries(m.map(f=>[f,Oi(n[f],p.variants[f])])),defaultVariants:Wp(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(h){return Ft(a(h))}const c=Object.keys(n);function u(h){return T0(h,c)}const d=Object.fromEntries(Object.entries(n).map(([h,p])=>[h,Object.keys(p)]));return Object.assign(js(l),{__cva__:!0,variantMap:d,variantKeys:c,raw:a,config:e,merge:s,splitVariantProps:u,getVariantProps:r})}function zk(e,t){let n={};return e.forEach(o=>{Object.entries(o).every(([i,r])=>i==="css"?!0:(Array.isArray(r)?r:[r]).some(a=>t[i]===a))&&(n=Oi(n,o.css))}),n}function Hk(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const jk=(e,t)=>e+"__"+t;function ge(e){const t=Object.entries(Ik(e)).map(([u,d])=>[u,Qi(d)]),n=e.defaultVariants??{};function o(u){const d=t.map(([h,p])=>[h,Hk(p(u),e.className&&jk(e.className,h))]);return Object.fromEntries(d)}function i(u){const d=t.map(([h,p])=>[h,p.raw(u)]);return Object.fromEntries(d)}const r=e.variants??{},a=Object.keys(r);function s(u){return T0(u,a)}const l=u=>({...n||{},...jp(u)}),c=Object.fromEntries(Object.entries(r).map(([u,d])=>[u,Object.keys(d)]));return Object.assign(js(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:a,splitVariantProps:s,getVariantProps:l})}var be=(e,t=[])=>({parts:(...n)=>{if(Wk(t))return be(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>be(e,[...t,...n]),omit:(...n)=>be(e,t.filter(o=>!n.includes(o))),rename:n=>be(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,o)=>Object.assign(n,{[o]:{selector:[`&[data-scope="${lr(e)}"][data-part="${lr(o)}"]`,`& [data-scope="${lr(e)}"][data-part="${lr(o)}"]`].join(", "),attrs:{"data-scope":lr(e),"data-part":lr(o)}}}),{})}),lr=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Wk=e=>e.length===0,Uk=Object.defineProperty,Gk=(e,t,n)=>t in e?Uk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yd=(e,t,n)=>Gk(e,typeof t!="symbol"?t+"":t,n);function qk(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function Yk(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 Fg=e=>Math.max(0,Math.min(1,e)),Kk=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),xd=(...e)=>t=>e.reduce((n,o)=>o(n),t),Qa=()=>{},Eu=e=>typeof e=="object"&&e!==null,R0=2147483647,D=e=>e?"":void 0,Je=e=>e?"true":void 0,Xk=1,Zk=9,Jk=11,et=e=>Eu(e)&&e.nodeType===Xk&&typeof e.nodeName=="string",Tu=e=>Eu(e)&&e.nodeType===Zk,Qk=e=>Eu(e)&&e===e.window,D0=e=>et(e)?e.localName||"":"#document";function eS(e){return["html","body","#document"].includes(D0(e))}var tS=e=>Eu(e)&&e.nodeType!==void 0,Hr=e=>tS(e)&&e.nodeType===Jk&&"host"in e,nS=e=>et(e)&&e.localName==="input",wr=e=>!!(e!=null&&e.matches("a[href]")),oS=e=>et(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Wc(e){if(!e)return!1;const t=e.getRootNode();return us(t)===e}var iS=/(textarea|select)/;function Ou(e){if(e==null||!et(e))return!1;try{return nS(e)&&e.selectionStart!=null||iS.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Rt(e,t){var n;if(!e||!t||!et(e)||!et(t))return!1;const o=(n=t.getRootNode)==null?void 0:n.call(t);if(e===t||e.contains(t))return!0;if(o&&Hr(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function rn(e){return Tu(e)?e:Qk(e)?e.document:e?.ownerDocument??document}function rS(e){return rn(e).documentElement}function Ke(e){var t;return Hr(e)?Ke(e.host):Tu(e)?e.defaultView??window:et(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function us(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 aS(e){if(D0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hr(e)&&e.host||rS(e);return Hr(t)?t.host:t}function Up(e){let t;try{if(t=e.getRootNode({composed:!0}),Tu(t)||Hr(t))return t}catch{}return e.ownerDocument??document}var wd=new WeakMap;function jr(e){return wd.has(e)||wd.set(e,Ke(e).getComputedStyle(e)),wd.get(e)}var Gp=new Set(["menu","listbox","dialog","grid","tree","region"]),sS=e=>Gp.has(e),V0=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function M0(e,t){const n=new Set,o=Up(e),i=r=>{const a=r.querySelectorAll("[aria-controls]");for(const s of a){if(s.getAttribute("aria-expanded")!=="true")continue;const l=V0(s);for(const c of l){if(!c||n.has(c))continue;n.add(c);const u=o.getElementById(c);if(u){const d=u.getAttribute("role"),h=u.getAttribute("aria-modal")==="true";if(d&&sS(d)&&!h&&(u===t||u.contains(t)||i(u)))return!0}}}return!1};return i(e)}function N0(e,t){const n=Up(e),o=new Set,i=r=>{const a=r.querySelectorAll("[aria-controls]");for(const s of a){if(s.getAttribute("aria-expanded")!=="true")continue;const l=V0(s);for(const c of l){if(!c||o.has(c))continue;o.add(c);const u=n.getElementById(c);if(u){const d=u.getAttribute("role"),h=u.getAttribute("aria-modal")==="true";d&&Gp.has(d)&&!h&&(t(u),i(u))}}}};i(e)}function lS(e){const t=new Set;return N0(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function cS(e){const t=e.getAttribute("role");return!!(t&&Gp.has(t))}function uS(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function dS(e){var t;return uS(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function hS(e){if(!e.id)return!1;const t=Up(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&cS(e))}var Iu=()=>typeof document<"u";function pS(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function fS(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var qp=e=>Iu()&&e.test(pS()),L0=e=>Iu()&&e.test(fS()),gS=e=>Iu()&&e.test(navigator.vendor),Bg=()=>Iu()&&!!navigator.maxTouchPoints,mS=()=>qp(/^iPhone/i),vS=()=>qp(/^iPad/i)||Pu()&&navigator.maxTouchPoints>1,Yp=()=>mS()||vS(),bS=()=>Pu()||Yp(),Pu=()=>qp(/^Mac/i),Au=()=>bS()&&gS(/apple/i),yS=()=>L0(/Firefox/i),xS=()=>L0(/Android/i);function wS(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 je(e){const t=wS(e);return t?.[0]??e.target}function Ss(e){return F0(e).isComposing||e.keyCode===229}function _S(e){return e.pointerType===""&&e.isTrusted?!0:xS()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Ni=e=>e.button===0,CS=e=>e.button===2||Pu()&&e.ctrlKey&&e.button===0,Yn=e=>e.ctrlKey||e.altKey||e.metaKey,kS=e=>"touches"in e&&e.touches.length>0,SS={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},zg={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function $s(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=SS[i]??i,n==="rtl"&&o==="horizontal"&&i in zg&&(i=zg[i]),i}function F0(e){return e.nativeEvent??e}var $S=new Set(["PageUp","PageDown"]),ES=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function TS(e){return e.ctrlKey||e.metaKey?.1:$S.has(e.key)||e.shiftKey&&ES.has(e.key)?10:1}function Uc(e,t="client"){const n=kS(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ee=(e,t,n,o)=>{const i=typeof e=="function"?e():e;return i?.addEventListener(t,n,o),()=>{i?.removeEventListener(t,n,o)}};function B0(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=Ke(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function OS(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Rn(e,t,n="value"){var o;if(!e)return;const i=OS(e);i&&((o=B0(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function Kp(e,t){var n;e&&((n=B0(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function z0(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(Rn(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function H0(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(Kp(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function IS(e){return PS(e)?e.form:e.closest("form")}function PS(e){return e.matches("textarea, input, select, button")}function AS(e,t){if(!e)return;const n=IS(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function RS(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const o=Ke(n),i=new o.MutationObserver(()=>t(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function oa(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[AS(e,o),RS(e,n)];return()=>i.forEach(r=>r?.())}var j0=e=>et(e)&&e.tagName==="IFRAME",DS=/^(audio|video|details)$/;function W0(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var VS=e=>!Number.isNaN(W0(e)),MS=e=>W0(e)<0;function NS(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 U0(e,t,n){const o=[...e],i=[...e],r=new Set,a=new Map;e.forEach((l,c)=>a.set(l,c));let s=0;for(;s<i.length;){const l=i[s++];if(!l||r.has(l))continue;r.add(l);const c=NS(l,t);if(c){const u=Array.from(c.querySelectorAll(Ru)).filter(n),d=a.get(l);if(d!==void 0){const h=d+1;o.splice(h,0,...u),u.forEach((p,m)=>{a.set(p,h+m)});for(let p=h+u.length;p<o.length;p++)a.set(o[p],p)}else{const h=o.length;o.push(...u),u.forEach((p,m)=>{a.set(p,h+m)})}i.push(...u)}}return o}var Ru="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",G0=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Ru));(n==!0||n=="if-empty"&&i.length===0)&&et(e)&&To(e)&&i.unshift(e);const r=[];for(const a of i)if(To(a)){if(j0(a)&&a.contentDocument){const s=a.contentDocument.body;r.push(...G0(s,{getShadowRoot:o}));continue}r.push(a)}return o?U0(r,o,To):r};function To(e){return!et(e)||e.closest("[inert]")?!1:e.matches(Ru)&&oS(e)}function Ws(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Ru));n&&Ii(e)&&i.unshift(e);const r=[];for(const a of i)if(Ii(a)){if(j0(a)&&a.contentDocument){const s=a.contentDocument.body;r.push(...Ws(s,{getShadowRoot:o}));continue}r.push(a)}if(o){const a=U0(r,o,Ii);return!a.length&&n?i:a}return!r.length&&n?i:r}function Ii(e){return et(e)&&e.tabIndex>0?!0:To(e)&&!MS(e)}function LS(e,t={}){const n=Ws(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function ga(e){return e.tabIndex<0&&(DS.test(e.localName)||Ou(e))&&!VS(e)?0:e.tabIndex}function Xp(e){const{root:t,getInitialEl:n,filter:o,enabled:i=!0}=e;if(!i)return;let r=null;if(r||(r=typeof n=="function"?n():n),r||(r=t?.querySelector("[data-autofocus],[autofocus]")),!r){const a=Ws(t);r=o?a.filter(o)[0]:a[0]}return r||t||void 0}function FS(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=LS(t);return!(Wc(n)&&e.shiftKey||Wc(o)&&!e.shiftKey||!n&&!o)}var q0=class Y0{constructor(){yd(this,"id",null),yd(this,"fn_cleanup"),yd(this,"cleanup",()=>{this.cancel()})}static create(){return new Y0}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 de(e){const t=q0.create();return t.request(e),t.cleanup}function Du(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 BS(e,t,n){const o=de(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function zS(e,t){if(!e)return;const{attributes:n,callback:o}=t,i=e.ownerDocument.defaultView||window,r=new i.MutationObserver(a=>{for(const s of a)s.type==="attributes"&&s.attributeName&&n.includes(s.attributeName)&&o(s)});return r.observe(e,{attributes:!0,attributeFilter:n}),()=>r.disconnect()}function Us(e,t){const{defer:n}=t,o=n?de:r=>r(),i=[];return i.push(o(()=>{const r=typeof e=="function"?e():e;i.push(zS(r,t))})),()=>{i.forEach(r=>r?.())}}function HS(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 jS(e,t){const{defer:n}=t,o=n?de:r=>r(),i=[];return i.push(o(()=>{const r=typeof e=="function"?e():e;i.push(HS(r,t))})),()=>{i.forEach(r=>r?.())}}function K0(e){const t=()=>{const n=Ke(e);e.dispatchEvent(new n.MouseEvent("click"))};yS()?BS(e,"keyup",t):queueMicrotask(t)}function Gc(e){const t=aS(e);return eS(t)?rn(t).body:et(t)&&Zp(t)?t:Gc(t)}function X0(e,t=[]){const n=Gc(e),o=n===e.ownerDocument.body,i=Ke(n);return o?t.concat(i,i.visualViewport||[],Zp(n)?n:[]):t.concat(n,X0(n,[]))}var WS=/auto|scroll|overlay|hidden|clip/,US=new Set(["inline","contents"]);function Zp(e){const t=Ke(e),{overflow:n,overflowX:o,overflowY:i,display:r}=t.getComputedStyle(e);return WS.test(n+i+o)&&!US.has(r)}function GS(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Es(e,t){const{rootEl:n,...o}=t||{};!e||!n||!Zp(n)||!GS(n)||e.scrollIntoView(o)}function Z0(e,t){const{left:n,top:o,width:i,height:r}=t.getBoundingClientRect(),a={x:e.x-n,y:e.y-o},s={x:Fg(a.x/i),y:Fg(a.y/r)};function l(c={}){const{dir:u="ltr",orientation:d="horizontal",inverted:h}=c,p=typeof h=="object"?h.x:h,m=typeof h=="object"?h.y:h;return d==="horizontal"?u==="rtl"||p?1-s.x:s.x:m?1-s.y:s.y}return{offset:a,percent:s,getPercentValue:l}}function qS(e,t){const n=e.body,o="pointerLockElement"in e||"mozPointerLockElement"in e,i=()=>!!e.pointerLockElement;function r(){}function a(l){i(),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!o)return;try{n.requestPointerLock()}catch{}const s=[Ee(e,"pointerlockchange",r,!1),Ee(e,"pointerlockerror",a,!1)];return()=>{s.forEach(l=>l()),e.exitPointerLock()}}var Pr="default",$h="",hc=new WeakMap;function YS(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return Yp()?(Pr==="default"&&($h=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Pr="disabled"):t&&(hc.set(t,t.style.userSelect),t.style.userSelect="none"),()=>J0({target:t,doc:o})}function J0(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if(Yp()){if(Pr!=="disabled")return;Pr="restoring",setTimeout(()=>{Du(()=>{Pr==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=$h||""),$h="",Pr="default")})},300)}else if(t&&hc.has(t)){const i=hc.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),hc.delete(t)}}function Jp(e={}){const{defer:t,target:n,...o}=e,i=t?de:a=>a(),r=[];return r.push(i(()=>{const a=typeof n=="function"?n():n;r.push(YS({...o,target:a}))})),()=>{r.forEach(a=>a?.())}}function Q0(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=Uc(s),c=Math.sqrt(l.x**2+l.y**2),u=s.pointerType==="touch"?10:5;if(!(c<u)){if(s.pointerType==="mouse"&&s.button===0){r(s);return}n({point:l,event:s})}},r=s=>{const l=Uc(s);o({point:l,event:s})},a=[Ee(e,"pointermove",i,!1),Ee(e,"pointerup",r,!1),Ee(e,"pointercancel",r,!1),Ee(e,"contextmenu",r,!1),Jp({doc:e})];return()=>{a.forEach(s=>s())}}function ex(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:r,isValidKey:a=v=>v.key==="Enter"}=e;if(!t)return Qa;const s=Ke(t);let l=Qa,c=Qa,u=Qa;const d=v=>({point:Uc(v),event:v});function h(v){i?.(d(v))}function p(v){r?.(d(v))}const m=Ee(t,"pointerdown",v=>{c();const y=Ee(s,"pointerup",_=>{const k=je(_);Rt(t,k)?o?.(d(_)):r?.(d(_))},{passive:!o,once:!0}),x=Ee(s,"pointercancel",p,{passive:!r,once:!0});c=xd(y,x),Wc(n)&&v.pointerType==="mouse"&&v.preventDefault(),h(v)},{passive:!i}),f=Ee(n,"focus",b);l=xd(m,f);function b(){const v=k=>{if(!a(k))return;const $=S=>{if(!a(S))return;const R=new s.PointerEvent("pointerup"),F=d(R);o?.(F),r?.(F)};c(),c=Ee(n,"keyup",$);const A=new s.PointerEvent("pointerdown");h(A)},y=()=>{const k=new s.PointerEvent("pointercancel");p(k)},x=Ee(n,"keydown",v),_=Ee(n,"blur",y);u=xd(x,_)}return()=>{l(),c(),u()}}function oi(e,t){return Array.from(e?.querySelectorAll(t)??[])}function tx(e,t){return e?.querySelector(t)??null}var Qp=e=>e.id;function KS(e,t,n=Qp){return e.find(o=>n(o)===t)}function Vu(e,t,n=Qp){const o=KS(e,t,n);return o?e.indexOf(o):-1}function ef(e,t,n=!0){let o=Vu(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function tf(e,t,n=!0){let o=Vu(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 XS=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(),ZS=e=>{var t;return XS(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},JS=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function QS(e,t,n,o=Qp){const i=n?Vu(e,n,o):-1;let r=n?Kk(e,i):e;return t.length===1&&(r=r.filter(a=>o(a)!==n)),r.find(a=>JS(ZS(a),t))}function e$(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 nf(e,t){if(!e)return Qa;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 t$(e,t){const{state:n,activeId:o,key:i,timeout:r=350,itemToId:a}=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 u=QS(c,l,o,a);function d(){clearTimeout(n.timer),n.timer=-1}function h(p){n.keysSoFar=p,d(),p!==""&&(n.timer=+setTimeout(()=>{h(""),d()},r))}return h(s),u}var Po=Object.assign(t$,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:n$});function n$(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Mu={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 o$(e,t,n){const{signal:o}=t;return[new Promise((i,r)=>{const a=setTimeout(()=>{r(new Error(`Timeout of ${n}ms exceeded`))},n);o.addEventListener("abort",()=>{clearTimeout(a),r(new Error("Promise aborted"))}),e.then(s=>{o.aborted||(clearTimeout(a),i(s))}).catch(s=>{o.aborted||(clearTimeout(a),r(s))})}),()=>t.abort()]}function i$(e,t){const{timeout:n,rootNode:o}=t,i=Ke(o),r=rn(o),a=new i.AbortController;return o$(new Promise(s=>{const l=e();if(l){s(l);return}const c=new i.MutationObserver(()=>{const u=e();u&&u.isConnected&&(c.disconnect(),s(u))});c.observe(r.body,{childList:!0,subtree:!0})}),a,n)}var r$=Object.defineProperty,nx=e=>{throw TypeError(e)},a$=(e,t,n)=>t in e?r$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,No=(e,t,n)=>a$(e,typeof t!="symbol"?t+"":t,n),s$=(e,t,n)=>t.has(e)||nx("Cannot "+n),Hg=(e,t,n)=>(s$(e,t,"read from private field"),t.get(e)),l$=(e,t,n)=>t.has(e)?nx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function pc(e){return e==null?[]:Array.isArray(e)?e:[e]}var c$=e=>Array.from(Array(e).keys()),Nr=e=>e[0],Gs=e=>e[e.length-1],u$=(e,t)=>e.indexOf(t)!==-1,_o=(e,...t)=>e.concat(t),Li=(e,...t)=>e.filter(n=>!t.includes(n)),jg=(e,t)=>e.filter((n,o)=>o!==t),Dn=e=>Array.from(new Set(e)),_d=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},Hi=(e,t)=>u$(e,t)?Li(e,t):_o(e,t);function qc(e,t,n={}){const{step:o=1,loop:i=!0}=n,r=t+o,a=e.length,s=a-1;return t===-1?o>0?0:s:r<0?i?s:0:r>=a?i?0:t>a?a:t:r}function d$(e,t,n={}){return e[qc(e,t,n)]}function ox(e,t,n={}){const{step:o=1,loop:i=!0}=n;return qc(e,t,{step:-o,loop:i})}function h$(e,t,n={}){return e[ox(e,t,n)]}function Wg(e,t){return e.reduce((n,o,i)=>{var r;return i%t===0?n.push([o]):(r=Gs(n))==null||r.push(o),n},[])}function ix(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(ix(n)):t.concat(n),[])}function Ug(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Gg=e=>e?.constructor.name==="Array",p$=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!bt(e[n],t[n]))return!1;return!0},bt=(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(Gg(e)&&Gg(t))return p$(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 r=n[i];if(!bt(e[r],t[r]))return!1}return!0},Ar=e=>Array.isArray(e),f$=e=>e===!0||e===!1,rx=e=>e!=null&&typeof e=="object",Pi=e=>rx(e)&&!Ar(e),ds=e=>typeof e=="string",Yo=e=>typeof e=="function",g$=e=>e==null,Ko=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m$=e=>Object.prototype.toString.call(e),ax=Function.prototype.toString,v$=ax.call(Object),b$=e=>{if(!rx(e)||m$(e)!="[object Object]"||w$(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Ko(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ax.call(n)==v$},y$=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,x$=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,w$=e=>y$(e)||x$(e),fl=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,_$=()=>{},Ts=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},sx=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Bt(e,t,...n){var o;if(e in t){const r=t[e];return Yo(r)?r(...n):r}const i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(o=Error.captureStackTrace)==null||o.call(Error,i,Bt),i}var lx=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,lx)),t?.()}},{floor:cx,abs:qg,round:Nu,min:C$,max:k$,pow:S$,sign:$$}=Math,Eh=e=>Number.isNaN(e),di=e=>Eh(e)?0:e,ux=(e,t)=>(e%t+t)%t,E$=(e,t)=>(e%t+t)%t,T$=(e,t)=>di(e)>=t,O$=(e,t)=>di(e)<=t,hs=(e,t,n)=>{const o=di(e),i=t==null||o>=t,r=n==null||o<=n;return i&&r},I$=(e,t,n)=>Nu((di(e)-t)/n)*n+t,vt=(e,t,n)=>C$(k$(di(e),t),n),P$=(e,t,n)=>(di(e)-t)/(n-t),A$=(e,t,n,o)=>vt(I$(e*(n-t)+t,t,o),t,n),Yg=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),r=i>=0?o.length-i:0;if(r>0){let a=S$(10,r);n=Nu(n*a)/a}return n},ps=(e,t)=>typeof t=="number"?cx(e*t+.5)/t:Nu(e),Kg=(e,t,n,o)=>{const i=t!=null?Number(t):0,r=Number(n),a=(e-i)%o;let s=qg(a)*2>=o?e+$$(a)*(o-qg(a)):e-a;if(s=Yg(s,o),!Eh(i)&&s<i)s=i;else if(!Eh(r)&&s>r){const l=cx((r-i)/o),c=i+l*o;s=l<=0||c<i?r:c}return Yg(s,o)},Be=(e,t=0,n=10)=>{const o=Math.pow(n,t);return Nu(e*o)/o},Xg=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},dx=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(Xg(e),Xg(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},R$=(e,t)=>dx(di(e),"+",t),D$=(e,t)=>dx(di(e),"-",t),Lo=e=>typeof e=="number"?`${e}px`:e;function Lu(e){if(!b$(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]=Lu(i))}return n}function Go(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function V$(e,t=Object.is){let n={...e};const o=new Set,i=a=>(o.add(a),()=>o.delete(a)),r=()=>{o.forEach(a=>a())};return{subscribe:i,get:a=>n[a],set:(a,s)=>{t(n[a],s)||(n[a]=s,r())},update:a=>{let s=!1;for(const l in a){const c=a[l];c!==void 0&&!t(n[l],c)&&(n[l]=c,s=!0)}s&&r()},snapshot:()=>({...n})}}var gl=()=>performance.now(),fc,M$=class{constructor(t){this.onTick=t,No(this,"frameId",null),No(this,"pausedAtMs",null),No(this,"context"),No(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),No(this,"setStartMs",n=>{this.context.startMs=n}),No(this,"start",()=>{if(this.frameId!==null)return;const n=gl();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(Hg(this,fc))}),No(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=gl())}),No(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),l$(this,fc,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Hg(this,fc))}),this.context={now:0,startMs:gl(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:gl()-this.context.startMs}};fc=new WeakMap;function Cd(e,t){const n=new M$(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function Ao(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function N$(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function of(e,t){if(e==null)throw new Error(t())}function rf(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 L$=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),F$=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Zg=e=>{const t={};let n;for(;n=F$.exec(e);)t[n[1]]=n[2];return t},B$=(e,t)=>{if(ds(e)){if(ds(t))return`${e};${t}`;e=Zg(e)}else ds(t)&&(t=Zg(t));return Object.assign({},e??{},t??{})};function qs(...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]=Ts(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=L$(t[i],n[i]);continue}if(i==="style"){t[i]=B$(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 Th(e,t,n){let o=[],i;return r=>{const a=e(r);return(a.length!==o.length||a.some((s,l)=>!bt(o[l],s)))&&(o=a,i=t(a,r)),i}}function Ct(){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 Fu(){return{guards:Ct(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var _r=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(_r||{}),kd="__init__";function z$(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>rn(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>us(t()),isActiveElement:Wc,getById:o=>t().getElementById(o)}}function H$(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var ie=()=>e=>Array.from(new Set(e)),hx=be("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),ma=hx.build(),Yc=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},j$=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`accordion:${e.id}:item:${t}`},Jg=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemContent)==null?void 0:o.call(n,t))??`accordion:${e.id}:content:${t}`},Kc=(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(Yc(e)),Bu=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(Yc(e))}']:not([disabled])`;return oi(W$(e),t)},U$=e=>Nr(Bu(e)),G$=e=>Gs(Bu(e)),q$=(e,t)=>ef(Bu(e),Kc(e,t)),Y$=(e,t)=>tf(Bu(e),Kc(e,t));function K$(e,t){const{send:n,context:o,prop:i,scope:r,computed:a}=e,s=o.get("focusedValue"),l=o.get("value"),c=i("multiple");function u(h){let p=h;!c&&p.length>1&&(p=[p[0]]),n({type:"VALUE.SET",value:p})}function d(h){return{expanded:l.includes(h.value),focused:s===h.value,disabled:!!(h.disabled??i("disabled"))}}return{focusedValue:s,value:l,setValue:u,getItemState:d,getRootProps(){return t.element({...ma.root.attrs,dir:i("dir"),id:Yc(r),"data-orientation":i("orientation")})},getItemProps(h){const p=d(h);return t.element({...ma.item.attrs,dir:i("dir"),id:j$(r,h.value),"data-state":p.expanded?"open":"closed","data-focus":D(p.focused),"data-disabled":D(p.disabled),"data-orientation":i("orientation")})},getItemContentProps(h){const p=d(h);return t.element({...ma.itemContent.attrs,dir:i("dir"),role:"region",id:Jg(r,h.value),"aria-labelledby":Kc(r,h.value),hidden:!p.expanded,"data-state":p.expanded?"open":"closed","data-disabled":D(p.disabled),"data-focus":D(p.focused),"data-orientation":i("orientation")})},getItemIndicatorProps(h){const p=d(h);return t.element({...ma.itemIndicator.attrs,dir:i("dir"),"aria-hidden":!0,"data-state":p.expanded?"open":"closed","data-disabled":D(p.disabled),"data-focus":D(p.focused),"data-orientation":i("orientation")})},getItemTriggerProps(h){const{value:p}=h,m=d(h);return t.button({...ma.itemTrigger.attrs,type:"button",dir:i("dir"),id:Kc(r,p),"aria-controls":Jg(r,p),"aria-expanded":m.expanded,disabled:m.disabled,"data-orientation":i("orientation"),"aria-disabled":m.disabled,"data-state":m.expanded?"open":"closed","data-ownedby":Yc(r),onFocus(){m.disabled||n({type:"TRIGGER.FOCUS",value:p})},onBlur(){m.disabled||n({type:"TRIGGER.BLUR"})},onClick(f){m.disabled||(Au()&&f.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:p}))},onKeyDown(f){if(f.defaultPrevented||m.disabled)return;const b={ArrowDown(){a("isHorizontal")||n({type:"GOTO.NEXT",value:p})},ArrowUp(){a("isHorizontal")||n({type:"GOTO.PREV",value:p})},ArrowRight(){a("isHorizontal")&&n({type:"GOTO.NEXT",value:p})},ArrowLeft(){a("isHorizontal")&&n({type:"GOTO.PREV",value:p})},Home(){n({type:"GOTO.FIRST",value:p})},End(){n({type:"GOTO.LAST",value:p})}},v=$s(f,{dir:i("dir"),orientation:i("orientation")}),y=b[v];y&&(y(f),f.preventDefault())}})}}}var{and:X$,not:Z$}=Ct(),J$={props({props:e}){return{collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[],...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){var o;(o=e("onFocusChange"))==null||o({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var o;(o=e("onValueChange"))==null||o({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:X$("isExpanded","canToggle"),actions:["collapse"]},{guard:Z$("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){const o=t("multiple")?Li(e.get("value"),n.value):[];e.set("value",o)},expand({context:e,prop:t,event:n}){const o=t("multiple")?_o(e.get("value"),n.value):[n.value];e.set("value",o)},focusFirstTrigger({scope:e}){var t;(t=U$(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=G$(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=q$(t,n);o?.focus()},focusPrevTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=Y$(t,n);o?.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(Ao("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}};ie()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);ie()(["value","disabled"]);const Q$={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}},Ys=ge({slots:[...hx.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:Q$},defaultVariants:{variant:"default"}});function eE(e){const t=zs(),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[YC(m0(i))]=(...r)=>e(i,...r);return o}function tE(e){const t=zs(),n=Object.keys(t?.type.props??{}).reduce((i,r)=>{const a=(t?.type.props[r]).default;return a!==void 0&&(i[r]=a),i},{}),o=v0(e);return I(()=>{const i={},r=t?.vnode.props??{};return Object.keys(r).forEach(a=>{i[m0(a)]=r[a]}),Object.keys({...n,...i}).reduce((a,s)=>(o.value[s]!==void 0&&(a[s]=o.value[s]),a),{})})}function lt(e,t){const n=tE(e),o=t?eE(t):{};return I(()=>({...n.value,...o}))}const Re=e=>{const t=Symbol(e);return[n=>zp(t,n),n=>xt(t,n),t]},[ro,Ks]=Re("RenderStrategyProps");function nE(e){const t=Ye(e);return t?.$el??t}const oE=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function Y(){const e=zs(),t=fe(),n=I(()=>{var a,s;return["#text","#comment"].includes((a=t.value)==null?void 0:a.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:nE(t)}),o=Object.assign({},e.exposed),i={};for(const a in e.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(o).length>0)for(const a in o)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>o[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function r(a){t.value=a,!(oE(a)||!a)&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a.$el}),e.exposed=i)}return{forwardRef:r,currentRef:t,currentElement:n}}const iE=O({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=px(n.default()),[r,...a]=i;if(Object.keys(t).length>0){(o=r.props)==null||delete o.ref;const s=qs(t,r.props??{}),l=KC(r,s);for(const c in s)c.startsWith("on")&&(l.props||(l.props={}),l.props[c]=s[c]);return i.length===1?l:[l,...a]}return i}}});function px(e){return e?e.flatMap(t=>t.type===Se?px(t.children):[t]):[]}const rE="br, hr, img, input, area, textarea".split(", "),aE=e=>typeof e=="string"&&rE.includes(e),Sd=e=>O({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>Pt(iE,n,o):()=>{var i;return Pt(e,n,aE(e)||(i=o.default)==null?void 0:i.call(o))}}});function sE(){const e=new Map;return new Proxy(Sd,{apply(t,n,o){return Sd(o[0])},get(t,n){return e.has(n)||e.set(n,Sd(n)),e.get(n)}})}const X=sE(),[fx,Xs]=Re("CollapsibleContext"),lE=O({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=Xs();return Y(),(n,o)=>g(t).unmounted?oe("",!0):(w(),E(g(X).div,U({key:0},g(t).getContentProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),cE=O({__name:"collapsible-context",setup(e){const t=Xs();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),uE=O({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return fx(n),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var dE=be("collapsible").parts("root","trigger","content","indicator"),ml=dE.build(),hE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},Oh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},pE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},va=e=>e.getById(Oh(e));function fE(e,t){const{state:n,send:o,context:i,scope:r,prop:a}=e,s=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:u,height:d}=i.get("size"),h=!!a("disabled"),p=a("collapsedHeight"),m=a("collapsedWidth"),f=p!=null,b=m!=null,v=f||b,y=!i.get("initial")&&l;return{disabled:h,visible:s,open:l,measureSize(){o({type:"size.measure"})},setOpen(x){n.matches("open")!==x&&o({type:x?"open":"close"})},getRootProps(){return t.element({...ml.root.attrs,"data-state":l?"open":"closed",dir:a("dir"),id:hE(r)})},getContentProps(){return t.element({...ml.content.attrs,id:Oh(r),"data-collapsible":"","data-state":y?void 0:l?"open":"closed","data-disabled":D(h),"data-has-collapsed-size":D(v),hidden:!s&&!v,dir:a("dir"),style:{"--height":Lo(d),"--width":Lo(u),"--collapsed-height":Lo(p),"--collapsed-width":Lo(m),...c&&f&&{overflow:"hidden",minHeight:Lo(p),maxHeight:Lo(p)},...c&&b&&{overflow:"hidden",minWidth:Lo(m),maxWidth:Lo(m)}}})},getTriggerProps(){return t.element({...ml.trigger.attrs,id:pE(r),dir:a("dir"),type:"button","data-state":l?"open":"closed","data-disabled":D(h),"aria-controls":Oh(r),"aria-expanded":s||!1,onClick(x){x.defaultPrevented||h||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...ml.indicator.attrs,dir:a("dir"),"data-state":l?"open":"closed","data-disabled":D(h)})}}}var gE={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=de(()=>{const i=va(t);if(!i)return;const r=jr(i).animationName;if(!r||r==="none"){e({type:"animation.end"});return}const a=s=>{je(s)===i&&e({type:"animation.end"})};i.addEventListener("animationend",a),n=()=>{i.removeEventListener("animationend",a)}});return()=>{o(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n;const o=de(()=>{const i=va(t);if(!i)return;const r=jr(i).animationName;if(!r||r==="none"){e({type:"animation.end"});return}const a=l=>{je(l)===i&&e({type:"animation.end"})};i.addEventListener("animationend",a);const s=nf(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",a),Du(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=va(e);if(!n)return;const o=()=>{const a=Ws(n).map(s=>e$(s,"inert",""));return()=>{a.forEach(s=>s())}};let i=o();const r=jS(n,{callback(){i(),i=o()}});return()=>{i(),r()}}},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=va(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=de(()=>{const r=va(t);if(!r)return;const a=r.hidden;r.style.animationName="none",r.style.animationDuration="0s",r.hidden=!1;const s=r.getBoundingClientRect();n.set("size",{height:s.height,width:s.width}),n.get("initial")&&(r.style.animationName="",r.style.animationDuration=""),r.hidden=a});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"})}}}};ie()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]);function mE(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Qg={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},vE="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function bE(e){return e in Qg?Qg[e]:e.startsWith("on")?`on${mE(e.substr(2))}`:vE.includes(e)?e:e.toLowerCase()}var an=H$(e=>{const t={};for(const n in e){const o=e[n];n==="children"?typeof o=="string"&&(t.innerHTML=o):t[bE(n)]=e[n]}return t});function Xc(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=jc(t),i=I(()=>e().value!==void 0),r=jc(i.value?e().value:o.value);return{initial:t,ref:r,get(){return i.value?e().value:o.value},set(a){var s,l;const c=i.value?e().value:o.value,u=Yo(a)?a(c):a;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:u,prev:c}),i.value||(o.value=u),n(u,c)||(l=(s=e()).onChange)==null||l.call(s,u,c)},invoke(a,s){var l,c;(c=(l=e()).onChange)==null||c.call(l,a,s)},hash(a){var s,l;return((l=(s=e()).hash)==null?void 0:l.call(s,a))??String(a)}}}Xc.cleanup=e=>{Hp(()=>e())};Xc.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function yE(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var xE=(e,t)=>{ze(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let r=0;r<n.length;r++)if(!bt(o[r],Ye(n[r]))){i=!0;break}i&&t()})};function Gt(e,t={}){var n,o,i;const r=I(()=>{const{id:P,ids:G,getRootNode:ee}=Ye(t);return z$({id:P,ids:G,getRootNode:ee})}),a=(...P)=>{e.debug&&console.log(...P)},s=I(()=>{var P;return((P=e.props)==null?void 0:P.call(e,{props:Lu(Ye(t)),get scope(){return r.value}}))??Ye(t)}),l=wE(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:Xc,get scope(){return r.value},flush:em,getContext(){return u},getComputed(){return A},getRefs(){return v},getEvent(){return f()}}),u={get(P){var G;return(G=c[P])==null?void 0:G.get()},set(P,G){var ee;(ee=c[P])==null||ee.set(G)},initial(P){var G;return(G=c[P])==null?void 0:G.initial},hash(P){var G,ee;const z=(G=c[P])==null?void 0:G.get();return(ee=c[P])==null?void 0:ee.hash(z)}};let d=new Map,h=null,p={current:null},m={current:{type:""}};const f=()=>({...m.current,current(){return m.current},previous(){return p.current}}),b=()=>({...S,matches(...P){const G=S.get();return P.includes(G)},hasTag(P){var G,ee;const z=S.get();return!!((ee=(G=e.states[z])==null?void 0:G.tags)!=null&&ee.includes(P))}}),v=yE(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:u}))??{}),y=()=>({state:b(),context:u,event:f(),prop:l,send:F,action:x,guard:_,track:xE,refs:v,computed:A,flush:em,get scope(){return r.value},choose:$}),x=P=>{const G=Yo(P)?P(y()):P;if(!G)return;const ee=G.map(z=>{var W,q;const ne=(q=(W=e.implementations)==null?void 0:W.actions)==null?void 0:q[z];return ne||Ao(`[zag-js] No implementation found for action "${JSON.stringify(z)}"`),ne});for(const z of ee)z?.(y())},_=P=>{var G,ee;return Yo(P)?P(y()):(ee=(G=e.implementations)==null?void 0:G.guards)==null?void 0:ee[P](y())},k=P=>{const G=Yo(P)?P(y()):P;if(!G)return;const ee=G.map(W=>{var q,ne;const te=(ne=(q=e.implementations)==null?void 0:q.effects)==null?void 0:ne[W];return te||Ao(`[zag-js] No implementation found for effect "${JSON.stringify(W)}"`),te}),z=[];for(const W of ee){const q=W?.(y());q&&z.push(q)}return()=>z.forEach(W=>W?.())},$=P=>pc(P).find(G=>{let ee=!G.guard;return ds(G.guard)?ee=!!_(G.guard):Yo(G.guard)&&(ee=G.guard(y())),ee}),A=P=>{of(e.computed,()=>"[zag-js] No computed object found on machine");const G=e.computed[P];return G({context:u,event:f(),prop:l,refs:v,get scope(){return r.value},computed:A})},S=Xc(()=>({defaultValue:e.initialState({prop:l}),onChange(P,G){var ee,z,W;if(G){const ne=d.get(G);ne?.(),d.delete(G)}G&&x((ee=e.states[G])==null?void 0:ee.exit),x(h?.actions);const q=k((z=e.states[P])==null?void 0:z.effects);if(q&&d.set(P,q),G===kd){x(e.entry);const ne=k(e.effects);ne&&d.set(kd,ne)}x((W=e.states[P])==null?void 0:W.entry)}}));let R=_r.NotStarted;ta(()=>{const P=R===_r.Started;R=_r.Started,a(P?"rehydrating...":"initializing..."),S.invoke(S.initial,kd)}),b0(()=>{R=_r.Stopped,a("unmounting...");const P=d.values();for(const G of P)G?.();d=new Map,x(e.exit)});const F=P=>{var G,ee;if(R!==_r.Started)return;p.current=m.current,m.current=P;let z=S.get();const W=((G=e.states[z].on)==null?void 0:G[P.type])??((ee=e.on)==null?void 0:ee[P.type]),q=$(W);if(!q)return;h=q;const ne=q.target??z;a("transition",P.type,q.target||z,`(${q.actions})`);const te=ne!==z;te?S.set(ne):q.reenter&&!te?S.invoke(z,z):x(q.actions)};return(i=e.watch)==null||i.call(e,y()),{state:b(),send:F,context:u,prop:l,get scope(){return r.value},refs:v,computed:A,event:f(),getStatus:()=>R}}function wE(e){return function(t){return e.value[t]}}var em=e=>{oo().then(()=>{e()})};const[LU,sn]=Re("EnvironmentContext"),ln=I(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Cn=I(()=>({dir:"ltr",locale:"en-US"})),[FU,kn]=Re("LocaleContext"),Bn=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},_E=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=I(()=>{const c=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Bn(c),onExitComplete:()=>{var u;t?.("exitComplete"),(u=c.onExitComplete)==null||u.call(c)},onOpenChange:u=>{var d;t?.("openChange",u),t?.("update:open",u.open),(d=c.onOpenChange)==null||d.call(c,u)}}}),a=Gt(gE,r),s=I(()=>fE(a,an)),l=fe(!1);return ze(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),I(()=>{const c=Ye(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},CE=O({__name:"collapsible-root",props:_n({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=_E(e,t);return fx(n),Y(),(o,i)=>(w(),E(g(X).div,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),kE=O({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Xs();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),SE=O({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Xs();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getIndicatorProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),zu=Object.freeze(Object.defineProperty({__proto__:null,Content:lE,Context:cE,Indicator:SE,Root:CE,RootProvider:uE,Trigger:kE},Symbol.toStringTag,{value:"Module"})),[gx,Zs]=Re("AccordionContext"),[$E,EE]=Re("AccordionItemContext"),[TE,af]=Re("AccordionItemPropsContext"),mx=O({__name:"accordion-item",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=Zs(),n=e,o=I(()=>t.value.getItemState(n)),i=Ks(),r=I(()=>t.value.getItemContentProps(n));return $E(o),TE(n),Y(),(a,s)=>(w(),E(g(zu).Root,U(g(t).getItemProps(n),{open:o.value.expanded,"lazy-mount":g(i).lazyMount,"unmount-on-exit":g(i).unmountOnExit,ids:{content:r.value.id}}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["open","lazy-mount","unmount-on-exit","ids"]))}}),OE=O({__name:"AccordionItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>Ys());return(o,i)=>(w(),E(g(mx),U(g(t),{class:[n.value.item],"data-testid":"atlantis-accordion-item"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),vx=()=>(e,t)=>t.reduce((n,o)=>{const[i,r]=n,a=o;return r[a]!==void 0&&(i[a]=r[a]),delete r[a],[i,r]},[{},{...e}]),bx=O({__name:"accordion-item-content",props:{asChild:{type:Boolean}},setup(e){const t=vx(),n=Zs(),o=af(),i=I(()=>{const r=n.value.getItemContentProps(o),[,a]=t(r,["hidden","data-state"]);return a});return Y(),(r,a)=>(w(),E(g(zu).Content,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),IE=O({__name:"AccordionItemContent",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>Ys());return(o,i)=>(w(),E(g(bx),U(g(t),{class:[n.value.itemContent],"data-testid":"atlantis-accordion-item-content"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),PE={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function AE(e,t){return w(),M("svg",PE,[...t[0]||(t[0]=[N("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 yx={render:AE},xx=O({__name:"accordion-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Zs(),n=af();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getItemIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),RE=O({__name:"AccordionItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>Ys());return(o,i)=>(w(),E(g(xx),U(g(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-accordion-item-indicator"}),{default:C(()=>[V(o.$slots,"default",{},()=>[j(g(yx))])]),_:3},16,["class"]))}}),wx=O({__name:"accordion-item-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Zs(),n=af(),o=Xs(),i=I(()=>{const{"aria-controls":r,...a}=t.value.getItemTriggerProps(n);return{...a,...o.value.unmounted?{}:{"aria-controls":r}}});return Y(),(r,a)=>(w(),E(g(X).button,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),DE=O({__name:"AccordionItemTrigger",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=Hs(),o=I(()=>Ys());return(i,r)=>(w(),E(g(wx),U(g(t),{class:[o.value.itemTrigger],"data-testid":"atlantis-accordion-item-trigger"}),{default:C(()=>[g(n).prefix?(w(),M("div",{key:0,class:L(o.value.itemTriggerPrefix)},[V(i.$slots,"prefix")],2)):oe("",!0),N("div",{class:L([o.value.itemTriggerContent])},[V(i.$slots,"default")],2)]),_:3},16,["class"]))}}),VE=O({__name:"accordion-context",setup(e){const t=Zs();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),ME=O({__name:"accordion-item-context",setup(e){const t=EE();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),NE=O({__name:"accordion-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return gx(n),ro(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),LE=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,onFocusChange:l=>t?.("focusChange",l),value:s.modelValue,...Bn(s),onValueChange:l=>{var c;t?.("valueChange",l),t?.("update:modelValue",l.value),(c=s?.onValueChange)==null||c.call(s,l)}}}),a=Gt(J$,r);return I(()=>K$(a,an))},FE=O({__name:"accordion-root",props:_n({collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{collapsible:void 0,disabled:void 0,multiple:void 0}),emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,o=LE(n,t);return gx(o),ro(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,r)=>(w(),E(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),BE=Object.freeze(Object.defineProperty({__proto__:null,Context:VE,Item:mx,ItemContent:bx,ItemContext:ME,ItemIndicator:xx,ItemTrigger:wx,Root:FE,RootProvider:NE},Symbol.toStringTag,{value:"Module"})),zE=O({__name:"AccordionRoot",props:{collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean},variant:{default:"default"}},emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,o=lt(n,t),i=I(()=>Ys({variant:n.variant}));return(r,a)=>(w(),E(g(BE).Root,U(g(o),{class:[i.value.root],"data-testid":"atlantis-accordion-root"}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),HE=be("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");HE.build();const[BU,ao]=Re("FieldContext");function jE(e){if(!e)return;const t=jr(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 WE(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 UE(e){if(!e)return;const t=rn(e),n=Ke(e),o=WE(t),i=jE(e);i&&(o.style.cssText+=i);function r(){n.requestAnimationFrame(()=>{o.innerHTML=e.value;const a=n.getComputedStyle(o);e?.style.setProperty("width",a.width)})}return r(),e?.addEventListener("input",r),e?.addEventListener("change",r),()=>{t.body.removeChild(o),e?.removeEventListener("input",r),e?.removeEventListener("change",r)}}var _x=(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))(_x||{});const GE={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},qE=Qi({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:GE}}),Zc=O({__name:"KeyboardKey",props:{type:{default:"default"},keys:{default:()=>[]},macKeys:{default:()=>[]},windowsKeys:{default:()=>[]},forcePlatform:{default:"mac"}},setup(e){const t=e,n=a=>a==="Ctrl"?"Control":a==="Meta"?"Command":a,o=a=>{const s=n(a);return _x[s]||a},i=fe("windows");ze(()=>t.forcePlatform,a=>{a&&(i.value=a)}),ta(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const r=I(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(a,s)=>(w(),M("div",{class:L(g(Ft)({display:"flex",columnGap:"3"}))},[(w(!0),M(Se,null,Ie(r.value,l=>(w(),M("div",{key:l,class:L(g(qE)({type:e.type}))},se(o(l)),3))),128))],2))}}),YE=ge({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"}}),KE=["aria-label"],XE=["fill"],ZE=["fill"],Cx=O({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=I(()=>YE({variant:t.variant,size:t.size})),o=I(()=>t.variant==="default"?"var(--colors-icon-selected)":"var(--colors-icon-inverse)");return(i,r)=>(w(),M("div",{class:L(n.value.root),"aria-label":t.ariaLabel,role:"status","data-testid":"spinner"},[(w(),M("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L([n.value.spinner,n.value.background])},[N("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,XE)],2)),N("div",{class:L([n.value.rotationWrapper,"spinner-rotate"])},[(w(),M("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L(n.value.spinner)},[N("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,ZE)],2))],2)],10,KE))}}),JE=ge({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"}}}}}),QE=O({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=I(()=>JE({variant:t.variant}));return(o,i)=>(w(),M("span",{class:L(n.value.root)},[V(o.$slots,"default",{},()=>[Ne(se(t.text),1)])],2))}}),ht={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"}}},tm={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},eT=ge({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:ht.primary,spinner:{}},critical:{root:ht.critical},default:{root:ht.default},subtle:{root:ht.subtle},plainPrimary:{root:ht.plainPrimary},plainCritical:{root:ht.plainCritical},dashed:{root:ht.dashed},validation:{root:ht.validation},link:{root:ht.link}},size:{default:{root:{px:"12",py:"6",gap:"6"}},small:{root:{px:"8",py:"2",gap:"6"}}}}}),tT=["disabled","data-loading","data-selected","aria-busy"],Xn=O({__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=Hs(),n=e,o=I(()=>eT({type:n.type,size:n.size})),i=I(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),r=I(()=>t.prefix),a=I(()=>t.suffix);return(s,l)=>(w(),M("button",{disabled:n.isDisabled,"data-loading":n.isLoading||null,"data-selected":n.isSelected||null,"aria-busy":n.isLoading||void 0,class:L([o.value.root,g(Ft)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:L([o.value.content,n.isLoading?g(Ft)({position:"relative"}):""])},[r.value?(w(),M("div",{key:0,class:L([o.value.slots,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"prefix")],2)):oe("",!0),n.isLoading?(w(),E(Cx,{key:1,class:L([o.value.spinner,n.isLoading?g(Ft)({position:"absolute",transform:"translate(-50%, -50%)",top:"50%",left:"50%"}):""]),variant:i.value,"data-loading":n.isLoading||null},null,8,["class","variant","data-loading"])):oe("",!0),N("div",{class:L([r.value?g(Ft)({paddingRight:"2",display:"inline-flex"}):"",a.value?g(Ft)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"default",{},()=>[n.label?(w(),E(QE,{key:0,text:n.label,variant:n.type},null,8,["text","variant"])):oe("",!0)])],2),a.value?(w(),M("div",{key:2,class:L([o.value.slots,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"suffix")],2)):oe("",!0),n.shortcutKeys?(w(),M("div",{key:3,class:L([n.isLoading?g(Ft)({visibility:"hidden"}):""])},[j(Zc,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):oe("",!0)],2)],10,tT))}}),nT={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},oT={default:{},chat:{root:{borderBottomRadius:"none"}}};ge({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:oT,state:nT,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 iT=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},rT=ge({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:ht.primary},critical:{root:ht.critical},default:{root:ht.default},subtle:{root:ht.subtle},dashed:{root:ht.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:tm.default},small:{root:tm.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"}}}]}),aT=["disabled","data-selected"],cr=O({__name:"IconButton",props:{type:{},size:{},isDisabled:{type:Boolean},isSelected:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=a=>{n.isDisabled||o("click",a)},r=I(()=>rT({type:n.type,size:n.size}));return(a,s)=>(w(),M("button",{disabled:n.isDisabled,"data-selected":n.isSelected||null,"aria-label":"Icon button",onClick:i,class:L([r.value.root,g(Ft)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:L(r.value.content)},[V(a.$slots,"prefixIcon")],2)],10,aT))}});ge({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 sT=be("avatar").parts("root","image","fallback");sT.build();ie()(["dir","id","ids","onStatusChange","getRootNode"]);ge({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 lT=Object.defineProperty,cT=(e,t,n)=>t in e?lT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uo=(e,t,n)=>cT(e,typeof t!="symbol"?t+"":t,n),nm=class dt{constructor([t,n,o,i,r,a]=[0,0,0,0,0,0]){uo(this,"m00"),uo(this,"m01"),uo(this,"m02"),uo(this,"m10"),uo(this,"m11"),uo(this,"m12"),uo(this,"rotate",(...s)=>this.prepend(dt.rotate(...s))),uo(this,"scale",(...s)=>this.prepend(dt.scale(...s))),uo(this,"translate",(...s)=>this.prepend(dt.translate(...s))),this.m00=t,this.m01=n,this.m02=o,this.m10=i,this.m11=r,this.m12=a}applyTo(t){const{x:n,y:o}=t,{m00:i,m01:r,m02:a,m10:s,m11:l,m12:c}=this;return{x:i*n+r*o+a,y:s*n+l*o+c}}prepend(t){return new dt([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 dt([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 dt([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 dt([1,0,0,0,1,0])}static rotate(t,n){const o=new dt([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?dt.multiply(dt.translate(n.x,n.y),o,dt.translate(-n.x,-n.y)):o}static scale(t,n=t,o={x:0,y:0}){const i=new dt([t,0,0,0,n,0]);return o.x!==0||o.y!==0?dt.multiply(dt.translate(o.x,o.y),i,dt.translate(-o.x,-o.y)):i}static translate(t,n){return new dt([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((o,i)=>o.prepend(i),t):dt.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})`}},om=(e,t,n)=>Math.min(Math.max(e,t),n),vl=(e,t,n)=>{const o=om(e.x,n.x,n.x+n.width-t.width),i=om(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},uT={width:0,height:0},dT={width:1/0,height:1/0},bl=(e,t=uT,n=dT)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),Ai=(e,t)=>({x:e,y:t}),im=(e,t)=>t?Ai(e.x-t.x,e.y-t.y):e,hT=(e,t)=>Ai(e.x+t.x,e.y+t.y);function Js(e){const{x:t,y:n,width:o,height:i}=e,r=t+o/2,a=n+i/2;return{x:t,y:n,width:o,height:i,minX:t,minY:n,maxX:t+o,maxY:n+i,midX:r,midY:a,center:Ai(r,a)}}function pT(e){const t=Ai(e.minX,e.minY),n=Ai(e.maxX,e.minY),o=Ai(e.maxX,e.maxY),i=Ai(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var fT=(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)}},gT=(e,t)=>e.width===t?.width&&e.height===t?.height,mT=(e,t)=>e.x===t?.x&&e.y===t?.y,$d=new WeakMap;function vT(e){if(!$d.has(e)){const t=e.ownerDocument.defaultView||window;$d.set(e,t.getComputedStyle(e))}return $d.get(e)}function kx(e,t={}){return Js(bT(e,t))}function bT(e,t={}){const{excludeScrollbar:n=!1,excludeBorders:o=!1}=t,{x:i,y:r,width:a,height:s}=e.getBoundingClientRect(),l={x:i,y:r,width:a,height:s},c=vT(e),{borderLeftWidth:u,borderTopWidth:d,borderRightWidth:h,borderBottomWidth:p}=c,m=rm(u,h),f=rm(d,p);if(o&&(l.width-=m,l.height-=f,l.x+=Ih(u),l.y+=Ih(d)),n){const b=e.offsetWidth-e.clientWidth-m,v=e.offsetHeight-e.clientHeight-f;l.width-=b,l.height-=v}return l}var Ih=e=>parseFloat(e.replace("px","")),rm=(...e)=>e.reduce((t,n)=>t+(n?Ih(n):0),0);function yT(e,t={}){return Js(xT(e,t))}function xT(e,t){const{excludeScrollbar:n=!1}=t,{innerWidth:o,innerHeight:i,document:r,visualViewport:a}=e,s=a?.width||o,l=a?.height||i,c={x:0,y:0,width:s,height:l};if(n){const u=o-r.documentElement.clientWidth,d=i-r.documentElement.clientHeight;c.width-=u,c.height-=d}return c}function wT(e,t){const n=Js(e),{top:o,right:i,left:r,bottom:a}=pT(n),[s]=t.split("-");return{top:[r,o,i,a],right:[o,i,a,r],bottom:[o,r,a,i],left:[i,o,r,a]}[s]}function _T(e,t){const{x:n,y:o}=t;let i=!1;for(let r=0,a=e.length-1;r<e.length;a=r++){const s=e[r].x,l=e[r].y,c=e[a].x,u=e[a].y;l>o!=u>o&&n<(c-s)*(o-l)/(u-l)+s&&(i=!i)}return i}var am={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}},CT={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:yl,abs:Rr,min:sm}=Math;function lm(e,t){const{minX:n,minY:o,maxX:i,maxY:r,midX:a,midY:s}=e,l=t.includes("w")?n:t.includes("e")?i:a,c=t.includes("n")?o:t.includes("s")?r:s;return{x:l,y:c}}function kT(e){return CT[e]}function ST(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:r}=o,a=lm(e,n),s=kT(n),l=lm(e,s);i==="center"&&(t={x:t.x*2,y:t.y*2});const c={x:a.x+t.x,y:a.y+t.y},u={x:am[n].x*2-1,y:am[n].y*2-1},d={width:c.x-l.x,height:c.y-l.y},h=u.x*d.width/e.width,p=u.y*d.height/e.height,m=Rr(h)>Rr(p)?h:p,f=r?{x:m,y:m}:{x:a.x===l.x?1:h,y:a.y===l.y?1:p};switch(a.y===l.y?f.y=Rr(f.y):yl(f.y)!==yl(p)&&(f.y*=-1),a.x===l.x?f.x=Rr(f.x):yl(f.x)!==yl(h)&&(f.x*=-1),i){case"extent":return cm(e,nm.scale(f.x,f.y,l),!1);case"center":return cm(e,nm.scale(f.x,f.y,{x:e.midX,y:e.midY}),!1)}}function $T(e,t,n=!0){return n?{x:sm(t.x,e.x),y:sm(t.y,e.y),width:Rr(t.x-e.x),height:Rr(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function cm(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return $T(o,i,n)}var ET=be("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");ET.build();ie()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function TT(e,t){const{state:n,send:o,context:i}=e,r=n.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:r,setNode(a){a&&o({type:"NODE.SET",node:a})},unmount(){o({type:"UNMOUNT"})}}}var OT={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",jr(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 r=t.get("node");if(!i&&r?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});de(()=>{var a,s;const l=xl(t.get("styles"));e.set("unmountAnimationName",l),l==="none"||l===e.get("prevAnimationName")||((a=t.get("styles"))==null?void 0:a.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})=>{de(()=>{e.set("prevAnimationName",xl(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 r=l=>{var c,u;(((u=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:u[0])??l.target)===i&&e.set("prevAnimationName",xl(t.get("styles")))},a=l=>{const c=xl(t.get("styles"));je(l)===i&&c===e.get("unmountAnimationName")&&!o("present")&&n({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",r),i.addEventListener("animationcancel",a),i.addEventListener("animationend",a);const s=nf(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",r),i.removeEventListener("animationcancel",a),i.removeEventListener("animationend",a),Du(()=>s())}}}}};function xl(e){return e?.animationName||"none"}ie()(["onExitComplete","present","immediate"]);const sf=(e,t)=>{const n=fe(!1),o=fe(null),i=I(()=>({present:Ye(e).present,onExitComplete:()=>{}})),r=Gt(OT,i),a=I(()=>TT(r));return ze(()=>a.value.present,()=>{a.value.present&&(n.value=!0)}),ze(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&a.value.setNode(s)}}),I(()=>{var s;const l=Ye(e);return{present:a.value.present,unmounted:!a.value.present&&!n.value&&l.lazyMount||l?.unmountOnExit&&!((s=a.value)!=null&&s.present)&&n.value,presenceProps:{ref:o,hidden:!a.value.present,"data-state":a.value.skip&&l.skipAnimationOnMount?void 0:l!=null&&l.present?"open":"closed"}}})},[lf,cf]=Re("PresenceContext");var ur=new WeakMap,wl=new WeakMap,_l={},Ed=0,Sx=e=>e&&(e.host||Sx(e.parentNode)),IT=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Sx(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),PT=new Set(["script","output","status","next-route-announcer"]),AT=e=>PT.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),RT=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:r=!0}=t,a=IT(n,Array.isArray(e)?e:[e]);_l[o]||(_l[o]=new WeakMap);const s=_l[o],l=[],c=new Set,u=new Set(a),d=p=>{!p||c.has(p)||(c.add(p),d(p.parentNode))};a.forEach(p=>{d(p),r&&et(p)&&N0(p,m=>{d(m)})});const h=p=>{!p||u.has(p)||Array.prototype.forEach.call(p.children,m=>{if(c.has(m))h(m);else try{if(AT(m))return;const f=m.getAttribute(i)==="true",b=(ur.get(m)||0)+1,v=(s.get(m)||0)+1;ur.set(m,b),s.set(m,v),l.push(m),b===1&&f&&wl.set(m,!0),v===1&&m.setAttribute(o,""),f||m.setAttribute(i,"true")}catch(f){console.error("[zag-js > ariaHidden] cannot operate on ",m,f)}})};return h(n),c.clear(),Ed++,()=>{l.forEach(p=>{const m=ur.get(p)-1,f=s.get(p)-1;ur.set(p,m),s.set(p,f),m||(wl.has(p)||p.removeAttribute(i),wl.delete(p)),f||p.removeAttribute(o)}),Ed--,Ed||(ur=new WeakMap,ur=new WeakMap,wl=new WeakMap,_l={})}},DT=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,VT=(e,t=DT(e),n="data-aria-hidden",o=!0)=>{if(t)return RT(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},MT=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function NT(e,t={}){const{defer:n=!0}=t,o=n?MT:r=>r(),i=[];return i.push(o(()=>{const r=(typeof e=="function"?e():e).filter(Boolean);r.length!==0&&i.push(VT(r))})),()=>{i.forEach(r=>r?.())}}function LT(e){const t={each(n){var o;for(let i=0;i<((o=e.frames)==null?void 0:o.length);i+=1){const r=e.frames[i];r&&n(r)}},addEventListener(n,o,i){return t.each(r=>{try{r.document.addEventListener(n,o,i)}catch{}}),()=>{try{t.removeEventListener(n,o,i)}catch{}}},removeEventListener(n,o,i){t.each(r=>{try{r.document.removeEventListener(n,o,i)}catch{}})}};return t}function FT(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 um="pointerdown.outside",dm="focus.outside";function BT(e){for(const t of e)if(et(t)&&To(t))return!0;return!1}var $x=e=>"clientY"in e;function zT(e,t){if(!$x(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 HT(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function hm(e,t){if(!t||!$x(e))return!1;const n=t.scrollHeight>t.clientHeight,o=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,r=i&&e.clientY>t.offsetTop+t.clientHeight,a={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 HT(a,s)?o||r:!1}function jT(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:r,defer:a,followControlledElements:s=!0}=t;if(!e)return;const l=rn(e),c=Ke(e),u=LT(c),d=FT(c);function h(x,_){if(!et(_)||!_.isConnected||Rt(e,_)||zT(e,x)||s&&M0(e,_))return!1;const k=l.querySelector(`[aria-controls="${e.id}"]`);if(k){const A=Gc(k);if(hm(x,A))return!1}const $=Gc(e);return hm(x,$)?!1:!(n!=null&&n(_))}const p=new Set,m=Hr(e?.getRootNode());function f(x){function _(k){var $;const A=a&&!Bg()?de:F=>F(),S=k??x,R=(($=S?.composedPath)==null?void 0:$.call(S))??[S?.target];A(()=>{const F=m?R[0]:je(x);if(!(!e||!h(x,F))){if(i||r){const P=Ts(i,r);e.addEventListener(um,P,{once:!0})}pm(e,um,{bubbles:!1,cancelable:!0,detail:{originalEvent:S,contextmenu:CS(S),focusable:BT(R),target:F}})}})}x.pointerType==="touch"?(p.forEach(k=>k()),p.add(Ee(l,"click",_,{once:!0})),p.add(d.addEventListener("click",_,{once:!0})),p.add(u.addEventListener("click",_,{once:!0}))):_()}const b=new Set,v=setTimeout(()=>{b.add(Ee(l,"pointerdown",f,!0)),b.add(d.addEventListener("pointerdown",f,!0)),b.add(u.addEventListener("pointerdown",f,!0))},0);function y(x){(a?de:_=>_())(()=>{var _;const k=((_=x?.composedPath)==null?void 0:_.call(x))??[x?.target],$=m?k[0]:je(x);if(!(!e||!h(x,$))){if(o||r){const A=Ts(o,r);e.addEventListener(dm,A,{once:!0})}pm(e,dm,{bubbles:!1,cancelable:!0,detail:{originalEvent:x,contextmenu:!1,focusable:To($),target:$}})}})}return Bg()||(b.add(Ee(l,"focusin",y,!0)),b.add(d.addEventListener("focusin",y,!0)),b.add(u.addEventListener("focusin",y,!0))),()=>{clearTimeout(v),p.forEach(x=>x()),b.forEach(x=>x())}}function uf(e,t){const{defer:n}=t,o=n?de:r=>r(),i=[];return i.push(o(()=>{const r=typeof e=="function"?e():e;i.push(jT(r,t))})),()=>{i.forEach(r=>r?.())}}function pm(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function WT(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return Ee(rn(e),"keydown",n,{capture:!0})}var fm="layer:request-dismiss",Ht={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=>Rt(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Rt(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=>Ht.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];GT(e,fm,i=>{var r;(r=o.requestDismiss)==null||r.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),UT(e,fm,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function UT(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 GT(e,t,n){e.addEventListener(t,n,{once:!0})}var gm;function mm(){Ht.layers.forEach(({node:e})=>{e.style.pointerEvents=Ht.isBelowPointerBlockingLayer(e)?"none":"auto"})}function qT(e){e.style.pointerEvents=""}function YT(e,t){const n=rn(e),o=[];return Ht.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(gm=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[r,a]=i$(()=>{const s=i();return et(s)?s:null},{timeout:1e3});r.then(s=>o.push(nf(s,{pointerEvents:"auto"}))),o.push(a)}),()=>{Ht.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=gm,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function KT(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ao("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:o,onRequestDismiss:i,pointerBlocking:r,exclude:a,debug:s,type:l="dialog"}=t,c={dismiss:o,node:e,type:l,pointerBlocking:r,requestDismiss:i};Ht.add(c),mm();function u(f){var b,v;const y=je(f.detail.originalEvent);Ht.isBelowPointerBlockingLayer(e)||Ht.isInBranch(y)||((b=t.onPointerDownOutside)==null||b.call(t,f),(v=t.onInteractOutside)==null||v.call(t,f),!f.defaultPrevented&&(s&&console.log("onPointerDownOutside:",f.detail.originalEvent),o?.()))}function d(f){var b,v;const y=je(f.detail.originalEvent);Ht.isInBranch(y)||((b=t.onFocusOutside)==null||b.call(t,f),(v=t.onInteractOutside)==null||v.call(t,f),!f.defaultPrevented&&(s&&console.log("onFocusOutside:",f.detail.originalEvent),o?.()))}function h(f){var b;Ht.isTopMost(e)&&((b=t.onEscapeKeyDown)==null||b.call(t,f),!f.defaultPrevented&&o&&(f.preventDefault(),o()))}function p(f){var b;if(!e)return!1;const v=typeof a=="function"?a():a,y=Array.isArray(v)?v:[v],x=(b=t.persistentElements)==null?void 0:b.map(_=>_()).filter(et);return x&&y.push(...x),y.some(_=>Rt(_,f))||Ht.isInNestedLayer(e,f)}const m=[r?YT(e,t.persistentElements):void 0,WT(e,h),uf(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{Ht.remove(e),mm(),qT(e),m.forEach(f=>f?.())}}function ia(e,t){const{defer:n}=t,o=n?de:r=>r(),i=[];return i.push(o(()=>{const r=Yo(e)?e():e;i.push(KT(r,t))})),()=>{i.forEach(r=>r?.())}}function Ex(e,t={}){const{defer:n}=t,o=n?de:r=>r(),i=[];return i.push(o(()=>{const r=Yo(e)?e():e;if(!r){Ao("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ht.addBranch(r),i.push(()=>{Ht.removeBranch(r)})})),()=>{i.forEach(r=>r?.())}}var XT=Object.defineProperty,ZT=(e,t,n)=>t in e?XT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ue=(e,t,n)=>ZT(e,typeof t!="symbol"?t+"":t,n),vm={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()}},JT=[],QT=class{constructor(t,n){Ue(this,"trapStack"),Ue(this,"config"),Ue(this,"doc"),Ue(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ue(this,"portalContainers",new Set),Ue(this,"listenerCleanups",[]),Ue(this,"handleFocus",i=>{const r=je(i),a=this.findContainerIndex(r,i)>=0;if(a||Tu(r))a&&(this.state.mostRecentlyFocusedNode=r);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if(ga(this.state.mostRecentlyFocusedNode)>0){const c=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:u}=this.state.containerGroups[c];if(u.length>0){const d=u.findIndex(h=>h===this.state.mostRecentlyFocusedNode);d>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?d+1<u.length&&(s=u[d+1],l=!1):d-1>=0&&(s=u[d-1],l=!1))}}else this.state.containerGroups.some(c=>c.tabbableNodes.some(u=>ga(u)>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}),Ue(this,"handlePointerDown",i=>{const r=je(i);if(!(this.findContainerIndex(r,i)>=0)){if(ya(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ya(this.config.allowOutsideClick,i)||i.preventDefault()}}),Ue(this,"handleClick",i=>{const r=je(i);this.findContainerIndex(r,i)>=0||ya(this.config.clickOutsideDeactivates,i)||ya(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),Ue(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;const r=this.config.isKeyBackward(i),a=this.findNextNavNode({event:i,isBackward:r});if(!a)return;ba(i)&&i.preventDefault(),this.tryFocus(a)}}),Ue(this,"handleEscapeKey",i=>{eO(i)&&ya(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),Ue(this,"_mutationObserver"),Ue(this,"setupMutationObserver",()=>{const i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(r=>{r.some(a=>Array.from(a.removedNodes).some(s=>s===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),r.some(a=>a.type==="attributes"&&(a.attributeName==="aria-controls"||a.attributeName==="aria-expanded")?!0:a.type==="childList"&&a.addedNodes.length>0?Array.from(a.addedNodes).some(s=>{if(s.nodeType!==Node.ELEMENT_NODE)return!1;const l=s;return dS(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?hS(l):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ue(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(r=>{var a;(a=this._mutationObserver)==null||a.observe(r,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(r=>{this.observePortalContainer(r)}))}),Ue(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!To(i)){const r=us(this.doc);if(r&&this.findContainerIndex(r)>=0)i=r;else{const a=this.state.tabbableGroups[0];i=a&&a.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}),Ue(this,"tryFocus",i=>{if(i!==!1&&i!==us(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,tO(i)&&i.select()}}),Ue(this,"deactivate",i=>{if(!this.state.active)return this;const r={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(),vm.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(r,"onDeactivate"),s=this.getOption(r,"onPostDeactivate"),l=this.getOption(r,"checkCanReturnFocus"),c=this.getOption(r,"returnFocus","returnFocusOnDeactivate");a?.();const u=()=>{bm(()=>{if(c){const d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(d)}s?.()})};if(c&&l){const d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(d).then(u,u),this}return u(),this}),Ue(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;const r=this.getOption(i,"onPause"),a=this.getOption(i,"onPostPause");return this.state.paused=!0,r?.(),this.removeListeners(),this.updateObservedNodes(),a?.(),this}),Ue(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;const r=this.getOption(i,"onUnpause"),a=this.getOption(i,"onPostUnpause");return this.state.paused=!1,r?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a?.(),this}),Ue(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ue(this,"getReturnFocusNode",i=>{const r=this.getNodeForOption("setReturnFocus",{params:[i]});return r||(r===!1?!1:i)}),Ue(this,"getOption",(i,r,a)=>i&&i[r]!==void 0?i[r]:this.config[a||r]),Ue(this,"getNodeForOption",(i,{hasFallback:r=!1,params:a=[]}={})=>{let s=this.config[i];if(typeof s=="function"&&(s=s(...a)),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&&!r)throw new Error(`\`${i}\` as selector refers to no known node`)}return l}),Ue(this,"findNextNavNode",i=>{const{event:r,isBackward:a=!1}=i,s=i.target||je(r);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const c=this.findContainerIndex(s,r),u=c>=0?this.state.containerGroups[c]:void 0;if(c<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let d=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>s===h);if(d<0&&(u?.container===s||To(s)&&!Ii(s)&&!(u!=null&&u.nextTabbableNode(s,!1)))&&(d=c),d>=0){const h=d===0?this.state.tabbableGroups.length-1:d-1,p=this.state.tabbableGroups[h];l=ga(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else ba(r)||(l=u?.nextTabbableNode(s,!1))}else{let d=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>s===h);if(d<0&&(u?.container===s||To(s)&&!Ii(s)&&!(u!=null&&u.nextTabbableNode(s)))&&(d=c),d>=0){const h=d===this.state.tabbableGroups.length-1?0:d+1,p=this.state.tabbableGroups[h];l=ga(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else ba(r)||(l=u?.nextTabbableNode(s))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||JT;const o={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(i){return ba(i)&&!i.shiftKey},isKeyBackward(i){return ba(i)&&i.shiftKey},...n};this.doc=o.document||rn(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=>{lS(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:r})=>i.contains(t)||o?.includes(i)||r.find(a=>a===t)||this.isControlledElement(i,t))}isControlledElement(t,n){return this.config.followControlledElements?M0(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=Ws(t,{getShadowRoot:this.config.getShadowRoot}),o=G0(t,{getShadowRoot:this.config.getShadowRoot}),i=n[0],r=n[n.length-1],a=i,s=r;let l=!1;for(let u=0;u<n.length;u++)if(ga(n[u])>0){l=!0;break}function c(u,d=!0){const h=n.indexOf(u);if(h>=0)return n[h+(d?1:-1)];const p=o.indexOf(u);if(!(p<0)){if(d){for(let m=p+1;m<o.length;m++)if(Ii(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(Ii(o[m]))return o[m]}}return{container:t,tabbableNodes:n,focusableNodes:o,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:a,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 vm.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?bm(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ee(this.doc,"focusin",this.handleFocus,!0),Ee(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ee(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ee(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ee(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ee(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=us(this.doc),n?.();const r=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),o?.()};return i?(i(this.state.containers.concat()).then(r,r),this):(r(),this)}},ba=e=>e.key==="Tab",ya=(e,...t)=>typeof e=="function"?e(...t):e,eO=e=>!e.isComposing&&e.key==="Escape",bm=e=>setTimeout(e,0),tO=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function nO(e,t={}){let n;const o=de(()=>{const i=typeof e=="function"?e():e;if(i){n=new QT(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:rn(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var oO=be("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");oO.build();ie()(["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 iO=be("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");iO.build();ie()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]);ie()(["index","readOnly"]);ie()(["index","snapAlign"]);const[Tx,Qs]=Re("CheckboxContext"),rO=O({__name:"checkbox-context",setup(e){const t=Qs();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),aO=O({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=Qs();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}});function sO(e){return!(e.metaKey||!Pu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var lO=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function cO(e,t,n){const o=n?je(n):null,i=Ke(o);return e=e||o instanceof i.HTMLInputElement&&!lO.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(uO,n.key))}var hi=null,Ph=new Set,Jc=new Map,ji=!1,Ah=!1,uO={Tab:!0,Escape:!0};function Hu(e,t){for(let n of Ph)n(e,t)}function Qc(e){ji=!0,sO(e)&&(hi="keyboard",Hu("keyboard",e))}function vn(e){hi="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ji=!0,Hu("pointer",e))}function Ox(e){_S(e)&&(ji=!0,hi="virtual")}function Ix(e){const t=je(e);t===Ke(t)||t===rn(t)||(!ji&&!Ah&&(hi="virtual",Hu("virtual",e)),ji=!1,Ah=!1)}function Px(){ji=!1,Ah=!0}function dO(e){if(typeof window>"u"||Jc.get(Ke(e)))return;const t=Ke(e),n=rn(e);let o=t.HTMLElement.prototype.focus;function i(){hi="virtual",Hu("virtual",null),ji=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",Qc,!0),n.addEventListener("keyup",Qc,!0),n.addEventListener("click",Ox,!0),t.addEventListener("focus",Ix,!0),t.addEventListener("blur",Px,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",vn,!0),n.addEventListener("pointermove",vn,!0),n.addEventListener("pointerup",vn,!0)):(n.addEventListener("mousedown",vn,!0),n.addEventListener("mousemove",vn,!0),n.addEventListener("mouseup",vn,!0)),t.addEventListener("beforeunload",()=>{hO(e)},{once:!0}),Jc.set(t,{focus:o})}var hO=(e,t)=>{const n=Ke(e),o=rn(e),i=Jc.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",Qc,!0),o.removeEventListener("keyup",Qc,!0),o.removeEventListener("click",Ox,!0),n.removeEventListener("focus",Ix,!0),n.removeEventListener("blur",Px,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",vn,!0),o.removeEventListener("pointermove",vn,!0),o.removeEventListener("pointerup",vn,!0)):(o.removeEventListener("mousedown",vn,!0),o.removeEventListener("mousemove",vn,!0),o.removeEventListener("mouseup",vn,!0)),Jc.delete(n)}};function pO(){return hi}function Os(){return hi==="keyboard"}function ju(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;dO(i),o?.({isFocusVisible:n||Os(),modality:hi});const r=(a,s)=>{cO(!!t,a,s)&&o?.({isFocusVisible:Os(),modality:a})};return Ph.add(r),()=>{Ph.delete(r)}}var Ax=be("checkbox").parts("root","label","control","indicator"),Cl=Ax.build(),Rx=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},ym=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},fO=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Rh=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},gO=e=>e.getById(Rx(e)),es=e=>e.getById(Rh(e));function mO(e,t){const{send:n,context:o,prop:i,computed:r,scope:a}=e,s=!!i("disabled"),l=!!i("readOnly"),c=!!i("required"),u=!!i("invalid"),d=!s&&o.get("focused"),h=!s&&o.get("focusVisible"),p=r("checked"),m=r("indeterminate"),f=o.get("checked"),b={"data-active":D(o.get("active")),"data-focus":D(d),"data-focus-visible":D(h),"data-readonly":D(l),"data-hover":D(o.get("hovered")),"data-disabled":D(s),"data-state":m?"indeterminate":p?"checked":"unchecked","data-invalid":D(u),"data-required":D(c)};return{checked:p,disabled:s,indeterminate:m,focused:d,checkedState:f,setChecked(v){n({type:"CHECKED.SET",checked:v,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:p,isTrusted:!1})},getRootProps(){return t.label({...Cl.root.attrs,...b,dir:i("dir"),id:Rx(a),htmlFor:Rh(a),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(v){je(v)===es(a)&&v.stopPropagation()}})},getLabelProps(){return t.element({...Cl.label.attrs,...b,dir:i("dir"),id:ym(a)})},getControlProps(){return t.element({...Cl.control.attrs,...b,dir:i("dir"),id:fO(a),"aria-hidden":!0})},getIndicatorProps(){return t.element({...Cl.indicator.attrs,...b,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Rh(a),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":ym(a),"aria-invalid":u,name:i("name"),form:i("form"),value:i("value"),style:Mu,onFocus(){const v=Os();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:v}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(v){if(l){v.preventDefault();return}const y=v.currentTarget.checked;n({type:"CHECKED.SET",checked:y,isTrusted:!0})}})}}}var{not:xm}=Ct(),vO={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:xm("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:xm("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>gc(e.get("checked")),checked:({context:e})=>bO(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 ex({pointerNode:gO(n),keyboardNode:es(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 ju({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return oa(es(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=es(n);o&&(Kp(o,t("checked")),o.indeterminate=gc(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=gc(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=es(t);H0(n,{checked:e("checked")})})}}}};function gc(e){return e==="indeterminate"}function bO(e){return gc(e)?!1:!!e}ie()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const df=Ax.extendWith("group");function yO(e,t,n,o={}){var i,r,a;const{passive:s=!1,eventName:l,defaultValue:c}=o,u=zs(),d=n||u?.emit||((i=u?.$emit)==null?void 0:i.bind(u))||((a=(r=u?.proxy)==null?void 0:r.$emit)==null?void 0:a.bind(u?.proxy)),h=t,p=()=>e[h]??c,m=f=>{if(!l)d(l||`update:${h.toString()}`,f);else for(const b of l)d(b,f)};if(s){const f=p(),b=fe(f);let v=!1;return ze(()=>e[h],y=>{v||(v=!0,b.value=y,oo(()=>{v=!1}))}),ze(b,y=>{!v&&y!==e[h]&&m(y)}),b}return I({get(){return p()},set(f){m(f)}})}function xO(e,t){const n=I(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=XC(e),i=yO(e,"modelValue",t,{defaultValue:o?.value??[],passive:e.modelValue===void 0,eventName:["valueChange","update:modelValue"]}),r=d=>i.value.some(h=>String(h)===String(d)),a=d=>{r(d)?l(d):s(d)},s=d=>{n.value&&(r(d)||(i.value=i.value.concat(d)))},l=d=>{n.value&&(i.value=i.value.filter(h=>String(h)!==String(d)))},c=d=>({checked:d.value!=null?r(d.value):void 0,onCheckedChange(){d.value!=null&&a(d.value)},name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid}),u=d=>{i.value=d};return I(()=>({isChecked:r,value:i.value,name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid,addValue:s,setValue:u,toggleValue:a,getItemProps:c}))}const[Dx,wO]=Re("CheckboxGroupContext"),_O=O({__name:"checkbox-group",props:_n({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=xO(e,t);return Dx(n),Y(),(o,i)=>(w(),E(g(X).div,U({role:"group"},{...g(df).build().group.attrs},{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),CO=O({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Dx(n),Y(),(o,i)=>(w(),E(g(X).div,U({role:"group"},g(df).build().group.attrs,{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),kO=O({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Qs(),n=ao();return Y(),(o,i)=>{var r;return w(),E(g(X).input,U({"aria-describedby":(r=g(n))==null?void 0:r.ariaDescribedby},g(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),SO=O({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Qs(),o=I(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return Y(),(i,r)=>(w(),E(g(X).div,U(g(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),$O=O({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=Qs();return Y(),(n,o)=>(w(),E(g(X).span,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),EO=O({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Tx(n),Y(),(o,i)=>(w(),E(g(X).label,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),TO=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=ao(),a=wO(),s=I(()=>{const u=Ye(e);return qs(u,a?.value.getItemProps({value:u.value})??{})}),l=I(()=>{const u=Ye(s);return{id:n,ids:{label:r?.value.ids.label,hiddenInput:r?.value.ids.control},disabled:r?.value.disabled,readOnly:r?.value.readOnly,invalid:r?.value.invalid,required:r?.value.required,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Bn(u),onCheckedChange(d){var h;t?.("checkedChange",d),t?.("update:checked",d.checked),(h=u.onCheckedChange)==null||h.call(u,d)}}}),c=Gt(vO,l);return I(()=>mO(c,an))},OO=O({__name:"checkbox-root",props:_n({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=TO(e,t);return Tx(n),Y(),(o,i)=>(w(),E(g(X).label,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),dr=Object.freeze(Object.defineProperty({__proto__:null,Context:rO,Control:aO,Group:_O,GroupProvider:CO,HiddenInput:kO,Indicator:SO,Label:$O,Root:OO,RootProvider:EO},Symbol.toStringTag,{value:"Module"}));var IO=be("clipboard").parts("root","control","trigger","indicator","input","label");IO.build();ie()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);ie()(["copied"]);var PO=Object.defineProperty,AO=(e,t,n)=>t in e?PO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>AO(e,typeof t!="symbol"?t+"":t,n),mc={itemToValue(e){return typeof e=="string"?e:Pi(e)&&Ko(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:Pi(e)&&Ko(e,"label")?e.label:mc.itemToValue(e)},isItemDisabled(e){return Pi(e)&&Ko(e,"disabled")?!!e.disabled:!1}},er=class Vx{constructor(t){this.options=t,J(this,"items"),J(this,"indexMap",null),J(this,"copy",n=>new Vx({...this.options,items:n??[...this.items]})),J(this,"isEqual",n=>bt(this.items,n.items)),J(this,"setItems",n=>this.copy(n)),J(this,"getValues",(n=this.items)=>{const o=[];for(const i of n){const r=this.getItemValue(i);r!=null&&o.push(r)}return o}),J(this,"find",n=>{if(n==null)return null;const o=this.indexOf(n);return o!==-1?this.at(o):null}),J(this,"findMany",n=>{const o=[];for(const i of n){const r=this.find(i);r!=null&&o.push(r)}return o}),J(this,"at",n=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[n]??null;let o=0;const i=this.group();for(const[,r]of i)for(const a of r){if(o===n)return a;o++}return null}),J(this,"sortFn",(n,o)=>{const i=this.indexOf(n),r=this.indexOf(o);return(i??0)-(r??0)}),J(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),J(this,"getItemValue",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToValue)==null?void 0:i.call(o,n))??mc.itemToValue(n)}),J(this,"getItemDisabled",n=>{var o,i;return n==null?!1:((i=(o=this.options).isItemDisabled)==null?void 0:i.call(o,n))??mc.isItemDisabled(n)}),J(this,"stringifyItem",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToString)==null?void 0:i.call(o,n))??mc.itemToString(n)}),J(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),J(this,"stringifyItems",(n,o=", ")=>{const i=[];for(const r of n){const a=this.stringifyItem(r);a!=null&&i.push(a)}return i.join(o)}),J(this,"stringifyMany",(n,o)=>this.stringifyItems(this.findMany(n),o)),J(this,"has",n=>this.indexOf(n)!==-1),J(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),J(this,"group",()=>{const{groupBy:n,groupSort:o}=this.options;if(!n)return[["",[...this.items]]];const i=new Map;this.items.forEach((a,s)=>{const l=n(a,s);i.has(l)||i.set(l,[]),i.get(l).push(a)});let r=Array.from(i.entries());return o&&r.sort(([a],[s])=>{if(typeof o=="function")return o(a,s);if(Array.isArray(o)){const l=o.indexOf(a),c=o.indexOf(s);return l===-1?1:c===-1?-1:l-c}return o==="asc"?a.localeCompare(s):o==="desc"?s.localeCompare(a):0}),r}),J(this,"getNextValue",(n,o=1,i=!1)=>{let r=this.indexOf(n);if(r===-1)return null;for(r=i?Math.min(r+o,this.size-1):r+o;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),J(this,"getPreviousValue",(n,o=1,i=!1)=>{let r=this.indexOf(n);if(r===-1)return null;for(r=i?Math.max(r-o,0):r-o;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),J(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[,r]of i)for(const a of r){const s=this.getItemValue(a);s!=null&&this.indexMap.set(s,o),o++}}return this.indexMap.get(n)??-1}),J(this,"getByText",(n,o)=>{const i=o!=null?this.indexOf(o):-1,r=n.length===1;for(let a=0;a<this.items.length;a++){const s=this.items[(i+a+1)%this.items.length];if(!(r&&this.getItemValue(s)===o)&&!this.getItemDisabled(s)&&RO(this.stringifyItem(s),n))return s}}),J(this,"search",(n,o)=>{const{state:i,currentValue:r,timeout:a=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,r),u=this.getItemValue(c);function d(){clearTimeout(i.timer),i.timer=-1}function h(p){i.keysSoFar=p,d(),p!==""&&(i.timer=+setTimeout(()=>{h(""),d()},a))}return h(s),u}),J(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)])}),J(this,"upsert",(n,o,i="append")=>{let r=this.indexOf(n);return r===-1?(i==="append"?this.append:this.prepend)(o):this.copy([...this.items.slice(0,r),o,...this.items.slice(r+1)])}),J(this,"insert",(n,...o)=>this.copy(xa(this.items,n,...o))),J(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(xa(this.items,i,...o))}),J(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(xa(this.items,i+1,...o))}),J(this,"prepend",(...n)=>this.copy(xa(this.items,0,...n))),J(this,"append",(...n)=>this.copy(xa(this.items,this.items.length,...n))),J(this,"filter",n=>{const o=this.items.filter((i,r)=>n(this.stringifyItem(i),r,i));return this.copy(o)}),J(this,"remove",(...n)=>{const o=n.map(i=>typeof i=="string"?i:this.getItemValue(i));return this.copy(this.items.filter(i=>{const r=this.getItemValue(i);return r==null?!1:!o.includes(r)}))}),J(this,"move",(n,o)=>{const i=this.indexOf(n);return i===-1?this:this.copy(kl(this.items,[i],o))}),J(this,"moveBefore",(n,...o)=>{let i=this.items.findIndex(a=>this.getItemValue(a)===n);if(i===-1)return this;let r=o.map(a=>this.items.findIndex(s=>this.getItemValue(s)===a)).sort((a,s)=>a-s);return this.copy(kl(this.items,r,i))}),J(this,"moveAfter",(n,...o)=>{let i=this.items.findIndex(a=>this.getItemValue(a)===n);if(i===-1)return this;let r=o.map(a=>this.items.findIndex(s=>this.getItemValue(s)===a)).sort((a,s)=>a-s);return this.copy(kl(this.items,r,i+1))}),J(this,"reorder",(n,o)=>this.copy(kl(this.items,[n],o))),J(this,"compareValue",(n,o)=>{const i=this.indexOf(n),r=this.indexOf(o);return i<r?-1:i>r?1:0}),J(this,"range",(n,o)=>{let i=[],r=n;for(;r!=null;){if(this.find(r)&&i.push(r),r===o)return i;r=this.getNextValue(r)}return[]}),J(this,"getValueRange",(n,o)=>n&&o?this.compareValue(n,o)<=0?this.range(n,o):this.range(o,n):[]),J(this,"toString",()=>{let n="";for(const o of this.items){const i=this.getItemValue(o),r=this.stringifyItem(o),a=this.getItemDisabled(o),s=[i,r,a].filter(Boolean).join(":");n+=s+","}return n}),J(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}},RO=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function xa(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function kl(e,t,n){t=[...t].sort((i,r)=>i-r);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 DO=class vc extends Set{constructor(t=[]){super(t),J(this,"selectionMode","single"),J(this,"deselectable",!0),J(this,"copy",()=>{const n=new vc([...this]);return this.sync(n)}),J(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),J(this,"isEmpty",()=>this.size===0),J(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),J(this,"canSelect",(n,o)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(o))),J(this,"firstSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)<0)&&(o=i);return o}),J(this,"lastSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)>0)&&(o=i);return o}),J(this,"extendSelection",(n,o,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,i);const r=this.copy(),a=Array.from(this).pop();for(let s of n.getValueRange(o,a??i))r.delete(s);for(let s of n.getValueRange(i,o))this.canSelect(n,s)&&r.add(s);return r}),J(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}),J(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 vc([o]);return this.sync(i)}),J(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new vc;for(let i of n)if(i!=null&&(o.add(i),this.selectionMode==="single"))break;return this.sync(o)}),J(this,"clearSelection",()=>{const n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),J(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)),J(this,"deselect",n=>{const o=this.copy();return o.delete(n),o}),J(this,"isEqual",n=>bt(Array.from(this),Array.from(n)))}};function Mx(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function VO(e){const t=MO(e),n=[],o=new Set;for(const i of t){const r=i.join();o.has(r)||(o.add(r),n.push(i))}return n}function Nx(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 MO(e){return e.sort(Nx)}function NO(e,t){let n;return Kt(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function LO(e,t){const n=[];return Kt(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function wm(e,t){let n;return Kt(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function FO(e,t){let n=t.initialResult;return Kt(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function BO(e,t){return FO(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function zO(e,t){const{predicate:n,create:o,getChildren:i}=t,r=(a,s)=>{const l=i(a,s),c=[];l.forEach((p,m)=>{const f=[...s,m],b=r(p,f);b&&c.push(b)});const u=s.length===0,d=n(a,s),h=c.length>0;return u||d||h?o(a,c,s):null};return r(e,[])||o(e,[],[])}function HO(e,t){const n=[];let o=0;const i=new Map,r=new Map;return Kt(e,{getChildren:t.getChildren,onEnter:(a,s)=>{i.has(a)||i.set(a,o++);const l=t.getChildren(a,s);l.forEach(p=>{r.has(p)||r.set(p,a),i.has(p)||i.set(p,o++)});const c=l.length>0?l.map(p=>i.get(p)):void 0,u=r.get(a),d=u?i.get(u):void 0,h=i.get(a);n.push({...a,_children:c,_parent:d,_index:h})}}),n}function jO(e,t){return{type:"insert",index:e,nodes:t}}function WO(e){return{type:"remove",indexes:e}}function hf(){return{type:"replace"}}function Lx(e){return[e.slice(0,-1),e[e.length-1]]}function Fx(e,t,n=new Map){var o;const[i,r]=Lx(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,hf())}const a=n.get(i.join());switch(a?.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:a.indexes,insertIndex:r,insertNodes:t});break;default:n.set(i.join(),jO(r,t))}return n}function Bx(e){const t=new Map,n=new Map;for(const o of e){const i=o.slice(0,-1).join(),r=n.get(i)??[];r.push(o[o.length-1]),n.set(i,r.sort((a,s)=>a-s))}for(const o of e)for(let i=o.length-2;i>=0;i--){const r=o.slice(0,i).join();t.has(r)||t.set(r,hf())}for(const[o,i]of n)t.set(o,WO(i));return t}function UO(e,t){const n=new Map,[o,i]=Lx(e);for(let r=o.length-1;r>=0;r--){const a=o.slice(0,r).join();n.set(a,hf())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function Wu(e,t,n){return GO(e,{...n,getChildren:(o,i)=>{const r=i.join(),a=t.get(r);switch(a?.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(o,i);default:return[]}},transform:(o,i,r)=>{const a=r.join(),s=t.get(a);switch(s?.type){case"remove":return n.create(o,i.filter((u,d)=>!s.indexes.includes(d)),r);case"removeThenInsert":const l=i.filter((u,d)=>!s.removeIndexes.includes(d)),c=s.removeIndexes.reduce((u,d)=>d<u?u-1:u,s.insertIndex);return n.create(o,_m(l,c,0,...s.insertNodes),r);case"insert":return n.create(o,_m(i,s.index,0,...s.nodes),r);case"replace":return n.create(o,i,r);default:return o}}})}function _m(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function GO(e,t){const n={};return Kt(e,{...t,onLeave:(o,i)=>{const r=[0,...i],a=r.join(),s=t.transform(o,n[a]??[],i),l=r.slice(0,-1).join(),c=n[l]??[];c.push(s),n[l]=c}}),n[""][0]}function qO(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Fx(o,n);return Wu(e,i,t)}function YO(e,t){if(t.at.length===0)return t.node;const n=UO(t.at,t.node);return Wu(e,n,t)}function KO(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=Bx(t.indexPaths);return Wu(e,n,t)}function XO(e,t){if(t.indexPaths.length===0)return e;for(const r of t.indexPaths)if(r.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=VO(t.indexPaths),o=n.map(r=>Mx(e,r,t)),i=Fx(t.to,o,Bx(n));return Wu(e,i,t)}function Kt(e,t){const{onEnter:n,onLeave:o,getChildren:i}=t;let r=[],a=[{node:e}];const s=t.reuseIndexPath?()=>r:()=>r.slice();for(;a.length>0;){let l=a[a.length-1];if(l.state===void 0){const u=n?.(l.node,s());if(u==="stop")return;l.state=u==="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 u=l.state;r.push(u),a.push({node:c[u]}),l.state=u+1;continue}if(o?.(l.node,s())==="stop")return}r.pop(),a.pop()}}var pf=class zx{constructor(t){this.options=t,J(this,"rootNode"),J(this,"isEqual",n=>bt(this.rootNode,n.rootNode)),J(this,"getNodeChildren",n=>{var o,i;return((i=(o=this.options).nodeToChildren)==null?void 0:i.call(o,n))??Cr.nodeToChildren(n)??[]}),J(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),J(this,"resolveNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(o):void 0}),J(this,"getNodeChildrenCount",n=>{var o,i;return((i=(o=this.options).nodeToChildrenCount)==null?void 0:i.call(o,n))??Cr.nodeToChildrenCount(n)}),J(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??Cr.nodeToValue(n)}),J(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??Cr.isNodeDisabled(n)}),J(this,"stringify",n=>{const o=this.findNode(n);return o?this.stringifyNode(o):null}),J(this,"stringifyNode",n=>{var o,i;return((i=(o=this.options).nodeToString)==null?void 0:i.call(o,n))??Cr.nodeToString(n)}),J(this,"getFirstNode",(n=this.rootNode)=>{let o;return Kt(n,{getChildren:this.getNodeChildren,onEnter:(i,r)=>{if(!o&&r.length>0&&!this.getNodeDisabled(i))return o=i,"stop"}}),o}),J(this,"getLastNode",(n=this.rootNode,o={})=>{let i;return Kt(n,{getChildren:this.getNodeChildren,onEnter:(r,a)=>{var s;if(!this.isSameNode(r,n)){if((s=o.skip)!=null&&s.call(o,{value:this.getNodeValue(r),node:r,indexPath:a}))return"skip";a.length>0&&!this.getNodeDisabled(r)&&(i=r)}}}),i}),J(this,"at",n=>Mx(this.rootNode,n,{getChildren:this.getNodeChildren})),J(this,"findNode",(n,o=this.rootNode)=>NO(o,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),J(this,"findNodes",(n,o=this.rootNode)=>{const i=new Set(n.filter(r=>r!=null));return LO(o,{getChildren:this.getNodeChildren,predicate:r=>i.has(this.getNodeValue(r))})}),J(this,"sort",n=>n.reduce((o,i)=>{const r=this.getIndexPath(i);return r&&o.push({value:i,indexPath:r}),o},[]).sort((o,i)=>Nx(o.indexPath,i.indexPath)).map(({value:o})=>o)),J(this,"getIndexPath",n=>wm(this.rootNode,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===n})),J(this,"getValue",n=>{const o=this.at(n);return o?this.getNodeValue(o):void 0}),J(this,"getValuePath",n=>{if(!n)return[];const o=[];let i=[...n];for(;i.length>0;){const r=this.at(i);r&&o.unshift(this.getNodeValue(r)),i.pop()}return o}),J(this,"getDepth",n=>{const o=wm(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n});return o?.length??0}),J(this,"isSameNode",(n,o)=>this.getNodeValue(n)===this.getNodeValue(o)),J(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),J(this,"contains",(n,o)=>!n||!o?!1:o.slice(0,n.length).every((i,r)=>n[r]===o[r])),J(this,"getNextNode",(n,o={})=>{let i=!1,r;return Kt(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,s)=>{var l;if(this.isRootNode(a))return;const c=this.getNodeValue(a);if((l=o.skip)!=null&&l.call(o,{value:c,node:a,indexPath:s}))return c===n&&(i=!0),"skip";if(i&&!this.getNodeDisabled(a))return r=a,"stop";c===n&&(i=!0)}}),r}),J(this,"getPreviousNode",(n,o={})=>{let i,r=!1;return Kt(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,s)=>{var l;if(this.isRootNode(a))return;const c=this.getNodeValue(a);if((l=o.skip)!=null&&l.call(o,{value:c,node:a,indexPath:s}))return"skip";if(c===n)return r=!0,"stop";this.getNodeDisabled(a)||(i=a)}}),r?i:void 0}),J(this,"getParentNodes",n=>{var o;const i=(o=this.resolveIndexPath(n))==null?void 0:o.slice();if(!i)return[];const r=[];for(;i.length>0;){i.pop();const a=this.at(i);a&&!this.isRootNode(a)&&r.unshift(a)}return r}),J(this,"getDescendantNodes",(n,o)=>{const i=this.resolveNode(n);if(!i)return[];const r=[];return Kt(i,{getChildren:this.getNodeChildren,onEnter:(a,s)=>{s.length!==0&&(!(o!=null&&o.withBranch)&&this.isBranchNode(a)||r.push(a))}}),r}),J(this,"getDescendantValues",(n,o)=>this.getDescendantNodes(n,o).map(i=>this.getNodeValue(i))),J(this,"getParentIndexPath",n=>n.slice(0,-1)),J(this,"getParentNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(this.getParentIndexPath(o)):void 0}),J(this,"visit",n=>{const{skip:o,...i}=n;Kt(this.rootNode,{...i,getChildren:this.getNodeChildren,onEnter:(r,a)=>{var s;if(!this.isRootNode(r))return o!=null&&o({value:this.getNodeValue(r),node:r,indexPath:a})?"skip":(s=i.onEnter)==null?void 0:s.call(i,r,a)}})}),J(this,"getPreviousSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let r=n[n.length-1];for(;--r>=0;){const a=i[r];if(!this.getNodeDisabled(a))return a}}),J(this,"getNextSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let r=n[n.length-1];for(;++r<i.length;){const a=i[r];if(!this.getNodeDisabled(a))return a}}),J(this,"getSiblingNodes",n=>{const o=this.getParentNode(n);return o?this.getNodeChildren(o):[]}),J(this,"getValues",(n=this.rootNode)=>BO(n,{getChildren:this.getNodeChildren,transform:o=>[this.getNodeValue(o)]}).slice(1)),J(this,"isValidDepth",(n,o)=>o==null?!0:typeof o=="function"?o(n.length):n.length===o),J(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),J(this,"getBranchValues",(n=this.rootNode,o={})=>{let i=[];return Kt(n,{getChildren:this.getNodeChildren,onEnter:(r,a)=>{var s;if(a.length===0)return;const l=this.getNodeValue(r);if((s=o.skip)!=null&&s.call(o,{value:l,node:r,indexPath:a}))return"skip";this.isBranchNode(r)&&this.isValidDepth(a,o.depth)&&i.push(this.getNodeValue(r))}}),i}),J(this,"flatten",(n=this.rootNode)=>HO(n,{getChildren:this.getNodeChildren})),J(this,"_create",(n,o)=>this.getNodeChildren(n).length>0||o.length>0?{...n,children:o}:{...n}),J(this,"_insert",(n,o,i)=>this.copy(qO(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"copy",n=>new zx({...this.options,rootNode:n})),J(this,"_replace",(n,o,i)=>this.copy(YO(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"_move",(n,o,i)=>this.copy(XO(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"_remove",(n,o)=>this.copy(KO(n,{indexPaths:o,getChildren:this.getNodeChildren,create:this._create}))),J(this,"replace",(n,o)=>this._replace(this.rootNode,n,o)),J(this,"remove",n=>this._remove(this.rootNode,n)),J(this,"insertBefore",(n,o)=>this.getParentNode(n)?this._insert(this.rootNode,n,o):void 0),J(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)}),J(this,"move",(n,o)=>this._move(this.rootNode,n,o)),J(this,"filter",n=>{const o=zO(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(o)}),J(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},Cr={nodeToValue(e){return typeof e=="string"?e:Pi(e)&&Ko(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:Pi(e)&&Ko(e,"label")?e.label:Cr.nodeToValue(e)},isNodeDisabled(e){return Pi(e)&&Ko(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(Pi(e)&&Ko(e,"childrenCount"))return e.childrenCount}};const ZO=e=>new er(e),Cm=e=>new pf(e);var JO=Object.defineProperty,QO=(e,t,n)=>t in e?JO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ff=(e,t,n)=>QO(e,t+"",n),eI=(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},gf=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:r}=this.getChannelRange(t);return P$(o,i,r)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:r}=this.getChannelRange(t),a=A$(n,o,i,r);return Kg(a,o,i,r)}withChannelValue(t,n){const{minValue:o,maxValue:i}=this.getChannelRange(t);if(t in this){let r=this.clone();return r[t]=vt(n,o,i),r}throw new Error("Unsupported color channel: "+t)}getColorAxes(t){let{xChannel:n,yChannel:o}=t,i=n||this.getChannels().find(s=>s!==o),r=o||this.getChannels().find(s=>s!==i),a=this.getChannels().find(s=>s!==i&&s!==r);return{xChannel:i,yChannel:r,zChannel:a}}incrementChannel(t,n){const{minValue:o,maxValue:i,step:r}=this.getChannelRange(t),a=Kg(vt(this.getChannelValue(t)+n,o,i),o,i,r);return this.withChannelValue(t,a)}decrementChannel(t,n){return this.incrementChannel(t,-n)}isEqual(t){return eI(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},tI=/^#[\da-f]+$/i,nI=/^rgba?\((.*)\)$/,oI=/[^#]/gi,Hx=class bc extends gf{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(tI.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(oI,"$&$&"):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(nI);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,r)=>vt(i,0,r<3?255:1))),n.length<3?void 0:new bc(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),r=Math.max(t,n,o),a=r-i,s=r===0?0:a/r;let l=0;if(a!==0){switch(r){case t:l=(n-o)/a+(n<o?6:0);break;case n:l=(o-t)/a+2;break;case o:l=(t-n)/a+4;break}l/=6}return new bf(Be(l*360,2),Be(s*100,2),Be(r*100,2),Be(this.alpha,2))}toHSL(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=(r+i)/2,s=r-i;let l=-1,c=-1;if(s===0)l=c=0;else{switch(c=s/(a<.5?r+i:2-r-i),r){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 vf(Be(l*360,2),Be(c*100,2),Be(a*100,2),Be(this.alpha,2))}clone(){return new bc(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 bc.colorChannels}};ff(Hx,"colorChannels",["red","green","blue"]);var mf=Hx,iI=/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+)?)\)/,jx=class yc extends gf{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(iI)){const[o,i,r,a]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new yc(ux(o,360),vt(i,0,100),vt(r,0,100),vt(a??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}, ${Be(this.saturation,2)}%, ${Be(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${Be(this.saturation,2)}%, ${Be(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 bf(Be(this.hue,2),Be(t*100,2),Be(o*100,2),Be(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.lightness/100,i=n*Math.min(o,1-o),r=(a,s=(a+t/30)%12)=>o-i*Math.max(Math.min(s-3,9-s,1),-1);return new mf(Math.round(r(0)*255),Math.round(r(8)*255),Math.round(r(4)*255),Be(this.alpha,2))}clone(){return new yc(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 yc.colorChannels}};ff(jx,"colorChannels",["hue","saturation","lightness"]);var vf=jx,rI=/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+)?)\)/,Wx=class xc extends gf{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(rI)){const[o,i,r,a]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new xc(ux(o,360),vt(i,0,100),vt(r,0,100),vt(a??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}, ${Be(this.saturation,2)}%, ${Be(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${Be(this.saturation,2)}%, ${Be(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 vf(Be(this.hue,2),Be(t*100,2),Be(o*100,2),Be(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.brightness/100,i=(r,a=(r+t/60)%6)=>o-n*o*Math.max(Math.min(a,4-a,1),0);return new mf(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),Be(this.alpha,2))}clone(){return new xc(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 xc.colorChannels}};ff(Wx,"colorChannels",["hue","saturation","brightness"]);var bf=Wx,aI="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",sI=e=>{const t=new Map,n=e.split(",");for(let o=0;o<n.length;o++){const[i,r]=n[o].split(":");t.set(i,`#${r}`),i.includes("gray")&&t.set(i.replace("gray","grey"),`#${r}`)}return t},km=sI(aI),eu=e=>{var t;if(km.has(e))return eu(km.get(e));const n=mf.parse(e)||bf.parse(e)||vf.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,eu),o}return n};const lI=["top","right","bottom","left"],ii=Math.min,Zt=Math.max,tu=Math.round,Sl=Math.floor,to=e=>({x:e,y:e}),cI={left:"right",right:"left",bottom:"top",top:"bottom"},uI={start:"end",end:"start"};function Dh(e,t,n){return Zt(e,ii(t,n))}function Ro(e,t){return typeof e=="function"?e(t):e}function Do(e){return e.split("-")[0]}function ra(e){return e.split("-")[1]}function yf(e){return e==="x"?"y":"x"}function xf(e){return e==="y"?"height":"width"}const dI=new Set(["top","bottom"]);function Jn(e){return dI.has(Do(e))?"y":"x"}function wf(e){return yf(Jn(e))}function hI(e,t,n){n===void 0&&(n=!1);const o=ra(e),i=wf(e),r=xf(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=nu(a)),[a,nu(a)]}function pI(e){const t=nu(e);return[Vh(e),t,Vh(t)]}function Vh(e){return e.replace(/start|end/g,t=>uI[t])}const Sm=["left","right"],$m=["right","left"],fI=["top","bottom"],gI=["bottom","top"];function mI(e,t,n){switch(e){case"top":case"bottom":return n?t?$m:Sm:t?Sm:$m;case"left":case"right":return t?fI:gI;default:return[]}}function vI(e,t,n,o){const i=ra(e);let r=mI(Do(e),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),t&&(r=r.concat(r.map(Vh)))),r}function nu(e){return e.replace(/left|right|bottom|top/g,t=>cI[t])}function bI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ux(e){return typeof e!="number"?bI(e):{top:e,right:e,bottom:e,left:e}}function ou(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 Em(e,t,n){let{reference:o,floating:i}=e;const r=Jn(t),a=wf(t),s=xf(a),l=Do(t),c=r==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ra(t)){case"start":p[a]-=h*(n&&c?-1:1);break;case"end":p[a]+=h*(n&&c?-1:1);break}return p}const yI=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Em(c,o,l),h=o,p={},m=0;for(let f=0;f<s.length;f++){const{name:b,fn:v}=s[f],{x:y,y:x,data:_,reset:k}=await v({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,p={...p,[b]:{...p[b],..._}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(c=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:u,y:d}=Em(c,h,l)),f=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:p}};async function Is(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Ro(t,e),m=Ux(p),f=s[h?d==="floating"?"reference":"floating":d],b=ou(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(f)))==null||n?f:f.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),x=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},_=ou(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(b.top-_.top+m.top)/x.y,bottom:(_.bottom-b.bottom+m.bottom)/x.y,left:(b.left-_.left+m.left)/x.x,right:(_.right-b.right+m.right)/x.x}}const xI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ro(e,t)||{};if(c==null)return{};const d=Ux(u),h={x:n,y:o},p=wf(i),m=xf(p),f=await a.getDimensions(c),b=p==="y",v=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",_=r.reference[m]+r.reference[p]-h[p]-r.floating[m],k=h[p]-r.reference[p],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=$?$[x]:0;(!A||!await(a.isElement==null?void 0:a.isElement($)))&&(A=s.floating[x]||r.floating[m]);const S=_/2-k/2,R=A/2-f[m]/2-1,F=ii(d[v],R),P=ii(d[y],R),G=F,ee=A-f[m]-P,z=A/2-f[m]/2+S,W=Dh(G,z,ee),q=!l.arrow&&ra(i)!=null&&z!==W&&r.reference[m]/2-(z<G?F:P)-f[m]/2<0,ne=q?z<G?z-G:z-ee:0;return{[p]:h[p]+ne,data:{[p]:W,centerOffset:z-W-ne,...q&&{alignmentOffset:ne}},reset:q}}}),wI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...b}=Ro(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const v=Do(i),y=Jn(s),x=Do(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=h||(x||!f?[nu(s)]:pI(s)),$=m!=="none";!h&&$&&k.push(...vI(s,f,m,_));const A=[s,...k],S=await Is(t,b),R=[];let F=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&R.push(S[v]),d){const z=hI(i,a,_);R.push(S[z[0]],S[z[1]])}if(F=[...F,{placement:i,overflows:R}],!R.every(z=>z<=0)){var P,G;const z=(((P=r.flip)==null?void 0:P.index)||0)+1,W=A[z];if(W&&(!(d==="alignment"&&y!==Jn(W))||F.every(ne=>Jn(ne.placement)===y?ne.overflows[0]>0:!0)))return{data:{index:z,overflows:F},reset:{placement:W}};let q=(G=F.filter(ne=>ne.overflows[0]<=0).sort((ne,te)=>ne.overflows[1]-te.overflows[1])[0])==null?void 0:G.placement;if(!q)switch(p){case"bestFit":{var ee;const ne=(ee=F.filter(te=>{if($){const le=Jn(te.placement);return le===y||le==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(le=>le>0).reduce((le,he)=>le+he,0)]).sort((te,le)=>te[1]-le[1])[0])==null?void 0:ee[0];ne&&(q=ne);break}case"initialPlacement":q=s;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function Tm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Om(e){return lI.some(t=>e[t]>=0)}const _I=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=Ro(e,t);switch(o){case"referenceHidden":{const r=await Is(t,{...i,elementContext:"reference"}),a=Tm(r,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Om(a)}}}case"escaped":{const r=await Is(t,{...i,altBoundary:!0}),a=Tm(r,n.floating);return{data:{escapedOffsets:a,escaped:Om(a)}}}default:return{}}}}},Gx=new Set(["left","top"]);async function CI(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Do(n),s=ra(n),l=Jn(n)==="y",c=Gx.has(a)?-1:1,u=r&&l?-1:1,d=Ro(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const kI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:a,middlewareData:s}=t,l=await CI(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:a}}}}},SI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:v,y}=b;return{x:v,y}}},...l}=Ro(e,t),c={x:n,y:o},u=await Is(t,l),d=Jn(Do(i)),h=yf(d);let p=c[h],m=c[d];if(r){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=p+u[b],x=p-u[v];p=Dh(y,p,x)}if(a){const b=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[b],x=m-u[v];m=Dh(y,m,x)}const f=s.fn({...t,[h]:p,[d]:m});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[h]:r,[d]:a}}}}}},$I=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ro(e,t),u={x:n,y:o},d=Jn(i),h=yf(d);let p=u[h],m=u[d];const f=Ro(s,t),b=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const x=h==="y"?"height":"width",_=r.reference[h]-r.floating[x]+b.mainAxis,k=r.reference[h]+r.reference[x]-b.mainAxis;p<_?p=_:p>k&&(p=k)}if(c){var v,y;const x=h==="y"?"width":"height",_=Gx.has(Do(i)),k=r.reference[d]-r.floating[x]+(_&&((v=a.offset)==null?void 0:v[d])||0)+(_?0:b.crossAxis),$=r.reference[d]+r.reference[x]+(_?0:((y=a.offset)==null?void 0:y[d])||0)-(_?b.crossAxis:0);m<k?m=k:m>$&&(m=$)}return{[h]:p,[d]:m}}}},EI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Ro(e,t),u=await Is(t,c),d=Do(i),h=ra(i),p=Jn(i)==="y",{width:m,height:f}=r.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,b=h==="end"?"top":"bottom");const y=f-u.top-u.bottom,x=m-u.left-u.right,_=ii(f-u[b],y),k=ii(m-u[v],x),$=!t.middlewareData.shift;let A=_,S=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=y),$&&!h){const F=Zt(u.left,0),P=Zt(u.right,0),G=Zt(u.top,0),ee=Zt(u.bottom,0);p?S=m-2*(F!==0||P!==0?F+P:Zt(u.left,u.right)):A=f-2*(G!==0||ee!==0?G+ee:Zt(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:A});const R=await a.getDimensions(s.floating);return m!==R.width||f!==R.height?{reset:{rects:!0}}:{}}}};function Uu(){return typeof window<"u"}function aa(e){return qx(e)?(e.nodeName||"").toLowerCase():"#document"}function nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function so(e){var t;return(t=(qx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qx(e){return Uu()?e instanceof Node||e instanceof nn(e).Node:!1}function Ln(e){return Uu()?e instanceof Element||e instanceof nn(e).Element:!1}function io(e){return Uu()?e instanceof HTMLElement||e instanceof nn(e).HTMLElement:!1}function Im(e){return!Uu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nn(e).ShadowRoot}const TI=new Set(["inline","contents"]);function el(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!TI.has(i)}const OI=new Set(["table","td","th"]);function II(e){return OI.has(aa(e))}const PI=[":popover-open",":modal"];function Gu(e){return PI.some(t=>{try{return e.matches(t)}catch{return!1}})}const AI=["transform","translate","scale","rotate","perspective"],RI=["transform","translate","scale","rotate","perspective","filter"],DI=["paint","layout","strict","content"];function _f(e){const t=Cf(),n=Ln(e)?Fn(e):e;return AI.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)||RI.some(o=>(n.willChange||"").includes(o))||DI.some(o=>(n.contain||"").includes(o))}function VI(e){let t=ri(e);for(;io(t)&&!Wr(t);){if(_f(t))return t;if(Gu(t))return null;t=ri(t)}return null}function Cf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const MI=new Set(["html","body","#document"]);function Wr(e){return MI.has(aa(e))}function Fn(e){return nn(e).getComputedStyle(e)}function qu(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ri(e){if(aa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Im(e)&&e.host||so(e);return Im(t)?t.host:t}function Yx(e){const t=ri(e);return Wr(t)?e.ownerDocument?e.ownerDocument.body:e.body:io(t)&&el(t)?t:Yx(t)}function Ps(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Yx(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=nn(i);if(r){const s=Mh(a);return t.concat(a,a.visualViewport||[],el(i)?i:[],s&&n?Ps(s):[])}return t.concat(i,Ps(i,[],n))}function Mh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kx(e){const t=Fn(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=io(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,s=tu(n)!==r||tu(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function kf(e){return Ln(e)?e:e.contextElement}function Lr(e){const t=kf(e);if(!io(t))return to(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Kx(t);let a=(r?tu(n.width):n.width)/o,s=(r?tu(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const NI=to(0);function Xx(e){const t=nn(e);return!Cf()||!t.visualViewport?NI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nn(e)?!1:t}function Wi(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=kf(e);let a=to(1);t&&(o?Ln(o)&&(a=Lr(o)):a=Lr(e));const s=LI(r,n,o)?Xx(r):to(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(r){const h=nn(r),p=o&&Ln(o)?nn(o):o;let m=h,f=Mh(m);for(;f&&o&&p!==m;){const b=Lr(f),v=f.getBoundingClientRect(),y=Fn(f),x=v.left+(f.clientLeft+parseFloat(y.paddingLeft))*b.x,_=v.top+(f.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=x,c+=_,m=nn(f),f=Mh(m)}}return ou({width:u,height:d,x:l,y:c})}function Yu(e,t){const n=qu(e).scrollLeft;return t?t.left+n:Wi(so(e)).left+n}function Zx(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Yu(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function FI(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",a=so(o),s=t?Gu(t.floating):!1;if(o===a||s&&r)return n;let l={scrollLeft:0,scrollTop:0},c=to(1);const u=to(0),d=io(o);if((d||!d&&!r)&&((aa(o)!=="body"||el(a))&&(l=qu(o)),io(o))){const p=Wi(o);c=Lr(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const h=a&&!d&&!r?Zx(a,l):to(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function BI(e){return Array.from(e.getClientRects())}function zI(e){const t=so(e),n=qu(e),o=e.ownerDocument.body,i=Zt(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=Zt(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Yu(e);const s=-n.scrollTop;return Fn(o).direction==="rtl"&&(a+=Zt(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const Pm=25;function HI(e,t){const n=nn(e),o=so(e),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,l=0;if(i){r=i.width,a=i.height;const u=Cf();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=Yu(o);if(c<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-p);m<=Pm&&(r-=m)}else c<=Pm&&(r+=c);return{width:r,height:a,x:s,y:l}}const jI=new Set(["absolute","fixed"]);function WI(e,t){const n=Wi(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=io(e)?Lr(e):to(1),a=e.clientWidth*r.x,s=e.clientHeight*r.y,l=i*r.x,c=o*r.y;return{width:a,height:s,x:l,y:c}}function Am(e,t,n){let o;if(t==="viewport")o=HI(e,n);else if(t==="document")o=zI(so(e));else if(Ln(t))o=WI(t,n);else{const i=Xx(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ou(o)}function Jx(e,t){const n=ri(e);return n===t||!Ln(n)||Wr(n)?!1:Fn(n).position==="fixed"||Jx(n,t)}function UI(e,t){const n=t.get(e);if(n)return n;let o=Ps(e,[],!1).filter(s=>Ln(s)&&aa(s)!=="body"),i=null;const r=Fn(e).position==="fixed";let a=r?ri(e):e;for(;Ln(a)&&!Wr(a);){const s=Fn(a),l=_f(a);!l&&s.position==="fixed"&&(i=null),(r?!l&&!i:!l&&s.position==="static"&&i&&jI.has(i.position)||el(a)&&!l&&Jx(e,a))?o=o.filter(c=>c!==a):i=s,a=ri(a)}return t.set(e,o),o}function GI(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?Gu(t)?[]:UI(t,this._c):[].concat(n),o],a=r[0],s=r.reduce((l,c)=>{const u=Am(t,c,i);return l.top=Zt(u.top,l.top),l.right=ii(u.right,l.right),l.bottom=ii(u.bottom,l.bottom),l.left=Zt(u.left,l.left),l},Am(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function qI(e){const{width:t,height:n}=Kx(e);return{width:t,height:n}}function YI(e,t,n){const o=io(t),i=so(t),r=n==="fixed",a=Wi(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const l=to(0);function c(){l.x=Yu(i)}if(o||!o&&!r)if((aa(t)!=="body"||el(i))&&(s=qu(t)),o){const p=Wi(t,!0,r,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();r&&!o&&i&&c();const u=i&&!o&&!r?Zx(i,s):to(0),d=a.left+s.scrollLeft-l.x-u.x,h=a.top+s.scrollTop-l.y-u.y;return{x:d,y:h,width:a.width,height:a.height}}function Td(e){return Fn(e).position==="static"}function Rm(e,t){if(!io(e)||Fn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return so(e)===n&&(n=n.ownerDocument.body),n}function Qx(e,t){const n=nn(e);if(Gu(e))return n;if(!io(e)){let i=ri(e);for(;i&&!Wr(i);){if(Ln(i)&&!Td(i))return i;i=ri(i)}return n}let o=Rm(e,t);for(;o&&II(o)&&Td(o);)o=Rm(o,t);return o&&Wr(o)&&Td(o)&&!_f(o)?n:o||VI(e)||n}const KI=async function(e){const t=this.getOffsetParent||Qx,n=this.getDimensions,o=await n(e.floating);return{reference:YI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function XI(e){return Fn(e).direction==="rtl"}const ZI={convertOffsetParentRelativeRectToViewportRelativeRect:FI,getDocumentElement:so,getClippingRect:GI,getOffsetParent:Qx,getElementRects:KI,getClientRects:BI,getDimensions:qI,getScale:Lr,isElement:Ln,isRTL:XI};function ew(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function JI(e,t){let n=null,o;const i=so(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),r();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(s||t(),!h||!p)return;const m=Sl(d),f=Sl(i.clientWidth-(u+h)),b=Sl(i.clientHeight-(d+p)),v=Sl(u),y={rootMargin:-m+"px "+-f+"px "+-b+"px "+-v+"px",threshold:Zt(0,ii(1,l))||1};let x=!0;function _(k){const $=k[0].intersectionRatio;if($!==l){if(!x)return a();$?a(!1,$):o=setTimeout(()=>{a(!1,1e-7)},1e3)}$===1&&!ew(c,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(_,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return a(!0),r}function QI(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=kf(e),u=i||r?[...c?Ps(c):[],...Ps(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),r&&v.addEventListener("resize",n)});const d=c&&s?JI(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,f=l?Wi(e):null;l&&b();function b(){const v=Wi(e);f&&!ew(f,v)&&n(),f=v,m=requestAnimationFrame(b)}return n(),()=>{var v;u.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const eP=kI,tP=SI,nP=wI,oP=EI,iP=_I,rP=xI,aP=$I,sP=(e,t,n)=>{const o=new Map,i={platform:ZI,...n},r={...i.platform,_c:o};return yI(e,t,{...i,platform:r})};function Dm(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 lP(e){if(!e)return Dm();const{x:t,y:n,width:o,height:i}=e;return Dm(t,n,o,i)}function cP(e,t){return{contextElement:et(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?lP(o):n.getBoundingClientRect()}}}var wa=e=>({variable:e,reference:`var(${e})`}),vo={arrowSize:wa("--arrow-size"),arrowSizeHalf:wa("--arrow-size-half"),arrowBg:wa("--arrow-background"),transformOrigin:wa("--transform-origin"),arrowOffset:wa("--arrow-offset")},uP=e=>e==="top"||e==="bottom"?"y":"x";function dP(e,t){return{name:"transformOrigin",fn(n){var o,i,r,a;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,h=c.split("-")[0],p=uP(h),m=((o=l.arrow)==null?void 0:o.x)||0,f=((i=l.arrow)==null?void 0:i.y)||0,b=t?.clientWidth||0,v=t?.clientHeight||0,y=m+b/2,x=f+v/2,_=Math.abs(((r=l.shift)==null?void 0:r.y)||0),k=u.reference.height/2,$=v/2,A=((a=e.offset)==null?void 0:a.mainAxis)??e.gutter,S=typeof A=="number"?A+$:A??$,R=_>S,F={top:`${y}px calc(100% + ${S}px)`,bottom:`${y}px ${-S}px`,left:`calc(100% + ${S}px) ${x}px`,right:`${-S}px ${x}px`}[h],P=`${y}px ${u.reference.y+k-d}px`,G=!!e.overlap&&p==="y"&&R;return s.floating.style.setProperty(vo.transformOrigin.variable,G?P:F),{data:{transformOrigin:G?P:F}}}}}var hP={name:"rects",fn({rects:e}){return{data:e}}},pP=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:o,y:i}=n.arrow,r=t.split("-")[0];return Object.assign(e.style,{left:o!=null?`${o}px`:"",top:i!=null?`${i}px`:"",[r]:`calc(100% + ${vo.arrowOffset.reference})`}),{}}}};function fP(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function gP(e){return e.split("-")[0]}var mP={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Vm(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Sf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function vP(e,t,n){const o=e||t.createElement("div");return rP({element:o,padding:n.arrowPadding})}function bP(e,t){if(!g$(t.offset??t.gutter))return eP(({placement:n})=>{var o,i;const r=(e?.clientHeight||0)/2,a=((o=t.offset)==null?void 0:o.mainAxis)??t.gutter,s=typeof a=="number"?a+r:a??r,{hasAlign:l}=fP(n),c=l?void 0:t.shift,u=((i=t.offset)==null?void 0:i.crossAxis)??c;return Lu({crossAxis:u,mainAxis:s,alignmentAxis:t.shift})})}function yP(e){if(!e.flip)return;const t=Sf(e.boundary);return nP({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function xP(e){if(!e.slide&&!e.overlap)return;const t=Sf(e.boundary);return tP({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:aP()})}function wP(e){return oP({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:o,availableWidth:i}){const r=t.floating,a=Math.round(n.reference.width),s=Math.round(n.reference.height);i=Math.floor(i),o=Math.floor(o),r.style.setProperty("--reference-width",`${a}px`),r.style.setProperty("--reference-height",`${s}px`),r.style.setProperty("--available-width",`${i}px`),r.style.setProperty("--available-height",`${o}px`)}})}function _P(e){if(e.hideWhenDetached)return iP({strategy:"referenceHidden",boundary:Sf(e.boundary)??"clippingAncestors"})}function CP(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function kP(e,t,n={}){const o=cP(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},mP,n),r=t.querySelector("[data-part=arrow]"),a=[bP(r,i),yP(i),xP(i),vP(r,t.ownerDocument,i),pP(r),dP({gutter:i.gutter,offset:i.offset,overlap:i.overlap},r),wP(i),_P(i),hP],{placement:s,strategy:l,onComplete:c,onPositioned:u}=i,d=async()=>{var f;if(!o||!t)return;const b=await sP(o,t,{placement:s,middleware:a,strategy:l});c?.(b),u?.({placed:!0});const v=Ke(t),y=Vm(v,b.x),x=Vm(v,b.y);t.style.setProperty("--x",`${y}px`),t.style.setProperty("--y",`${x}px`),i.hideWhenDetached&&((f=b.middlewareData.hide)!=null&&f.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const _=t.firstElementChild;if(_){const k=jr(_);t.style.setProperty("--z-index",k.zIndex)}},h=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:d,floatingElement:t}),u?.({placed:!0})):await d()},p=CP(i.listeners),m=i.listeners?QI(o,t,h,p):_$;return h(),()=>{m?.(),u?.({placed:!1})}}function on(e,t,n={}){const{defer:o,...i}=n,r=o?de:s=>s(),a=[];return a.push(r(()=>{const s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;a.push(kP(s,l,i))})),()=>{a.forEach(s=>s?.())}}var SP={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function $f(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:vo.arrowSize.reference,height:vo.arrowSize.reference,[vo.arrowSizeHalf.variable]:`calc(${vo.arrowSize.reference} / 2)`,[vo.arrowOffset.variable]:`calc(${vo.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?SP[t.split("-")[0]]:void 0,background:vo.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 tw=be("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"]);tw.build();var $P=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},EP=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},TP=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},OP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},IP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},PP=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},AP=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},RP=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},DP=(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}`},VP=(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}`},wc=e=>e.getById(OP(e)),MP=e=>e.getById(RP(e)),NP=(e,t)=>e.getById(VP(e,t)),LP=e=>e.getById(PP(e)),Mm=e=>e.getById($P(e)),FP=e=>e.getById(AP(e)),BP=(e,t,n)=>{const o=FP(e);if(!o)return;const{getPercentValue:i}=Z0(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},zP=e=>e.getById(EP(e)),Od=e=>e.getById(TP(e)),HP=e=>e.getById(IP(e)),jP=(e,t)=>e.getById(DP(e,t)),WP=(e,t,n,o)=>{const i=jP(e,n);if(!i)return;const{getPercentValue:r}=Z0(t,i);return{x:r({dir:o,orientation:"horizontal"}),y:r({orientation:"vertical"})}},UP=e=>[...oi(wc(e),"input[data-channel]"),...oi(zP(e),"input[data-channel]")];function GP(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 Nm=e=>eu(e),qP=/^[0-9a-fA-F]{3,8}$/;function YP(e){return qP.test(e)}function KP(e){return e.startsWith("#")?e:YP(e)?`#${e}`:e}var{and:XP}=Ct();XP("isOpenControlled","closeOnSelect");function Lm(e,t,n){const o=UP(e);de(()=>{o.forEach(i=>{const r=i.dataset.channel;Rn(i,GP(n||t,r))})})}function ZP(e,t){const n=LP(e);n&&de(()=>Rn(n,t))}ie()(["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"]);ie()(["xChannel","yChannel"]);ie()(["channel","orientation"]);ie()(["value","disabled"]);ie()(["value","respectAlpha"]);ie()(["size"]);tw.extendWith("view");var nw=be("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");nw.build();var ow=e=>new er(e);ow.empty=()=>new er({items:[]});var JP=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},QP=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},eA=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},tA=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},nA=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},oA=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},Wo=e=>e.getById(eA(e)),kr=e=>e.getById(QP(e)),Fm=e=>e.getById(tA(e)),Bm=e=>e.getById(JP(e)),ts=e=>e.getById(nA(e)),zm=e=>e.getById(oA(e)),_a=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return tx(Wo(e),n)},Hm=e=>{const t=kr(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},iA=e=>{const t=ts(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:rA,createMachine:aA,choose:sA}=Fu(),{and:ut,not:qt}=rA;aA({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}){K0(t)},collection:ow.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:bt,hash(i){return i.join(",")},onChange(i){var r;const a=n(),s=a.get("selectedItems"),l=e("collection"),c=i.map(u=>s.find(d=>l.getItemValue(d)===u)||l.find(u));a.set("selectedItems",c),(r=e("onValueChange"))==null||r({value:i,items:c})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(i){var r;const a=e("collection").find(i);(r=e("onHighlightChange"))==null||r({highlightedValue:i,highlightedItem:a})}})),inputValue:t(()=>{let i=e("inputValue")||e("defaultInputValue");const r=e("value")||e("defaultValue");if(!i.trim()&&!e("multiple")){const a=e("collection").stringifyMany(r);i=Bt(e("selectionBehavior"),{preserve:i||a,replace:a,clear:""})}return{defaultValue:i,value:e("inputValue"),onChange(a){var s;const l=o(),c=(l.previousEvent||l).src;(s=e("onInputValueChange"))==null||s({inputValue:a,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:sA([{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:ut("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:ut("isCustomValue",qt("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:ut("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:ut("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:ut("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:ut("isOpenControlled","isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:ut("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:ut("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:ut("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:ut("isOpenControlled","isCustomValue",qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("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:ut("isOpenControlled","isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:ut("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:ut("isOpenControlled","isCustomValue",qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("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:ut("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 f$(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:ia(()=>Wo(n),{type:"listbox",defer:!0,exclude:()=>[kr(n),ts(n),zm(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 NT([kr(e),Wo(e),ts(e),zm(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Bm(n)||ts(n),i=()=>Fm(n);return e.set("currentPlacement",t("positioning").placement),on(o,i,{...t("positioning"),defer:!0,onComplete(r){e.set("currentPlacement",r.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=kr(n);let r=[];const a=c=>{const u=o.current().type.includes("POINTER"),d=e.get("highlightedValue");if(u||!d)return;const h=Wo(n),p=t("scrollToIndexFn");if(p){const b=t("collection").indexOf(d);p({index:b,immediate:c,getElement:()=>_a(n,d)});return}const m=_a(n,d),f=de(()=>{Es(m,{rootEl:h,block:"nearest"})});r.push(f)},s=de(()=>a(!0));r.push(s);const l=Us(i,{attributes:["aria-activedescendant"],callback:()=>a(!1)});return r.push(l),()=>{r.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:o}){on(()=>Bm(n),()=>Fm(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"),r=n.get("highlightedValue");if(!r||!i.has(r))return;const a=o("multiple")?Hi(n.get("value"),r):[r];(t=o("onSelect"))==null||t({value:a,itemValue:r}),n.set("value",a);const s=Bt(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(a),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){Du(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=_a(n,o),r=Wo(n),a=t("scrollToIndexFn");if(a){const s=t("collection").indexOf(o);a({index:s,immediate:!0,getElement:()=>_a(n,o)});return}Es(i,{rootEl:r,block:"nearest"})})},selectItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{var r;const a=i("multiple")?Hi(t.get("value"),n.value):[n.value];(r=i("onSelect"))==null||r({value:a,itemValue:n.value}),t.set("value",a);const s=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",s)})},clearItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{const r=Li(t.get("value"),n.value);t.set("value",r);const a=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(r),clear:""});t.set("inputValue",a)})},setInitialFocus({scope:e}){de(()=>{Hm(e)})},setFinalFocus({scope:e}){de(()=>{const t=ts(e);t?.dataset.focusable==null?Hm(e):iA(e)})},syncInputValue({context:e,scope:t,event:n}){const o=kr(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&Yk(o)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const o=t("selectionBehavior"),i=Bt(o,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",i)},setValue(e){const{context:t,flush:n,event:o,prop:i}=e;n(()=>{t.set("value",o.value);const r=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(o.value),clear:""});t.set("inputValue",r)})},clearSelectedItems(e){const{context:t,flush:n,prop:o}=e;n(()=>{t.set("value",[]);const i=Bt(o("selectionBehavior"),{preserve:t.get("inputValue"),replace:o("collection").stringifyMany([]),clear:""});t.set("inputValue",i)})},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const o=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>_a(t,o)})}else{const o=Wo(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=jm(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=jm(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(Wo(n)?queueMicrotask:de)(()=>{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}){(Wo(n)?queueMicrotask:de)(()=>{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}){de(()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){de(()=>{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}){de(()=>{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 r=kr(i),a=n("collection");if(!t("autoComplete")||!r||!o.keypress)return;const s=a.stringify(e.get("highlightedValue"));de(()=>{r.value=s||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{const{context:t,prop:n}=e,o=n("collection"),i=t.get("value"),r=i.map(s=>t.get("selectedItems").find(l=>o.getItemValue(l)===s)||o.find(s));t.set("selectedItems",r);const a=Bt(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:o.stringifyMany(i),clear:""});t.set("inputValue",a)})},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 jm(e){return(e.previousEvent||e).src}ie()(["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"]);ie()(["htmlFor"]);ie()(["id"]);ie()(["item","persistFocus"]);nw.extendWith("empty");function Id(e,t){return e-t*Math.floor(e/t)}const iw=1721426;function $l(e,t,n,o){t=Ef(e,t);let i=t-1,r=-2;return n<=2?r=0:_c(t)&&(r=-1),iw-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+r+o)}function _c(e){return e%4===0&&(e%100!==0||e%400===0)}function Ef(e,t){return e==="BC"?1-t:t}function lA(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const cA={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 Ur=class{fromJulianDay(t){let n=t,o=n-iw,i=Math.floor(o/146097),r=Id(o,146097),a=Math.floor(r/36524),s=Id(r,36524),l=Math.floor(s/1461),c=Id(s,1461),u=Math.floor(c/365),d=i*400+a*100+l*4+u+(a!==4&&u!==4?1:0),[h,p]=lA(d),m=n-$l(h,p,1,1),f=2;n<$l(h,p,3,1)?f=0:_c(p)&&(f=1);let b=Math.floor(((m+f)*12+373)/367),v=n-$l(h,p,b,1)+1;return new ru(h,p,b,v)}toJulianDay(t){return $l(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return cA[_c(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return _c(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 uA={"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 tr(e,t){return t=Qt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function dA(e,t){return t=Qt(t,e.calendar),e=Co(e),t=Co(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function hA(e,t){return t=Qt(t,e.calendar),e=As(e),t=As(t),e.era===t.era&&e.year===t.year}function pA(e,t){return Ku(e.calendar,t.calendar)&&tr(e,t)}function fA(e,t){return Ku(e.calendar,t.calendar)&&dA(e,t)}function gA(e,t){return Ku(e.calendar,t.calendar)&&hA(e,t)}function Ku(e,t){var n,o,i,r;return(r=(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&&r!==void 0?r:e.identifier===t.identifier}function mA(e,t){return tr(e,Xu(t))}const vA={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function rw(e,t,n){let o=e.calendar.toJulianDay(e),i=n?vA[n]:xA(t),r=Math.ceil(o+1-i)%7;return r<0&&(r+=7),r}function aw(e){return ko(Date.now(),e)}function Xu(e){return Fi(aw(e))}function sw(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function bA(e,t){return Wm(e)-Wm(t)}function Wm(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Pd=null;function Tf(){return Pd==null&&(Pd=new Intl.DateTimeFormat().resolvedOptions().timeZone),Pd}function Co(e){return e.subtract({days:e.day-1})}function Nh(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function As(e){return Co(e.subtract({months:e.month-1}))}function yA(e){return Nh(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function Rs(e,t,n){let o=rw(e,t,n);return e.subtract({days:o})}function Um(e,t,n){return Rs(e,t,n).add({days:6})}const Gm=new Map,Ad=new Map;function lw(e){if(Intl.Locale){let n=Gm.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Gm.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function xA(e){let t=Ad.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Ad.set(e,t),t.firstDay}let n=lw(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&&uA[n]||0};Ad.set(e,t)}return t.firstDay}function wA(e,t,n){let o=e.calendar.getDaysInMonth(e);return Math.ceil((rw(Co(e),t,n)+o)/7)}function cw(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function uw(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}const _A={AF:[4,5],AE:[5,6],BH:[5,6],DZ:[5,6],EG:[5,6],IL:[5,6],IQ:[5,6],IR:[5,5],JO:[5,6],KW:[5,6],LY:[5,6],OM:[5,6],QA:[5,6],SA:[5,6],SD:[5,6],SY:[5,6],YE:[5,6]};function CA(e,t){let n=e.calendar.toJulianDay(e),o=Math.ceil(n+1)%7;o<0&&(o+=7);let i=lw(t),[r,a]=_A[i]||[6,0];return o===r||o===a}function Gr(e){e=Qt(e,new Ur);let t=Ef(e.era,e.year);return dw(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function dw(e,t,n,o,i,r,a){let s=new Date;return s.setUTCHours(o,i,r,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function Lh(e,t){if(t==="UTC")return 0;if(e>0&&t===Tf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:r,minute:a,second:s}=hw(e,t);return dw(n,o,i,r,a,s,0)-Math.floor(e/1e3)*1e3}const qm=new Map;function hw(e,t){let n=qm.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"}),qm.set(t,n));let o=n.formatToParts(new Date(e)),i={};for(let r of o)r.type!=="literal"&&(i[r.type]=r.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 Ym=864e5;function kA(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>SA(e,t,i))}function SA(e,t,n){let o=hw(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 xo(e,t,n="compatible"){let o=Ui(e);if(t==="UTC")return Gr(o);if(t===Tf()&&n==="compatible"){o=Qt(o,new Ur);let l=new Date,c=Ef(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=Gr(o),r=Lh(i-Ym,t),a=Lh(i+Ym,t),s=kA(o,t,i-r,i-a);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-r,i-a);case"compatible":case"later":return Math.max(i-r,i-a);case"reject":throw new RangeError("No such absolute time found")}}function pw(e,t,n="compatible"){return new Date(xo(e,t,n))}function ko(e,t){let n=Lh(e,t),o=new Date(e+n),i=o.getUTCFullYear(),r=o.getUTCMonth()+1,a=o.getUTCDate(),s=o.getUTCHours(),l=o.getUTCMinutes(),c=o.getUTCSeconds(),u=o.getUTCMilliseconds();return new ww(i<1?"BC":"AD",i<1?-i+1:i,r,a,t,n,s,l,c,u)}function Fi(e){return new ru(e.calendar,e.era,e.year,e.month,e.day)}function Ui(e,t){let n=0,o=0,i=0,r=0;if("timeZone"in e)({hour:n,minute:o,second:i,millisecond:r}=e);else if("hour"in e)return e;return new HA(e.calendar,e.era,e.year,e.month,e.day,n,o,i,r)}function Qt(e,t){if(Ku(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,Gi(o),o}function $A(e,t,n){if(e instanceof ww)return e.timeZone===t?e:TA(e,t);let o=xo(e,t,n);return ko(o,t)}function EA(e){let t=Gr(e)-e.offset;return new Date(t)}function TA(e,t){let n=Gr(e)-e.offset;return Qt(ko(n,t),e.calendar)}const Ca=36e5;function Zu(e,t){let n=e.copy(),o="hour"in n?AA(n,t):0;Fh(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Bh(n),fw(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,OA(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 r,a;let l=(r=(a=n.calendar).isInverseEra)===null||r===void 0?void 0:r.call(a,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 Fh(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Bh(e){for(;e.month<1;)Fh(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Fh(e,1)}function OA(e){for(;e.day<1;)e.month--,Bh(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Bh(e)}function fw(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 Gi(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),fw(e)}function gw(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function mw(e,t){return Zu(e,gw(t))}function Of(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),Gi(n),n}function iu(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),PA(n),n}function IA(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=El(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=El(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=El(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=El(e.hour,24),t}function PA(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 El(e,t){let n=e%t;return n<0&&(n+=t),n}function AA(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,IA(e)}function If(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=So(l,n,0,s.length-1,o?.round),i.era=s[l],Gi(i);break}case"year":var r,a;!((r=(a=i.calendar).isInverseEra)===null||r===void 0)&&r.call(a,i)&&(n=-n),i.year=So(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=So(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=So(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),Gi(i),i}function vw(e,t,n,o){let i=e.copy();switch(t){case"hour":{let r=e.hour,a=0,s=23;if(o?.hourCycle===12){let l=r>=12;a=l?12:0,s=l?23:11}i.hour=So(r,n,a,s,o?.round);break}case"minute":i.minute=So(e.minute,n,0,59,o?.round);break;case"second":i.second=So(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=So(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function So(e,t,n,o,i=!1){if(i){e+=Math.sign(t),e<n&&(e=o);let r=Math.abs(t);t>0?e=Math.ceil(e/r)*r:e=Math.floor(e/r)*r,e>o&&(e=n)}else e+=t,e<n?e=o-(n-e-1):e>o&&(e=n+(e-o-1));return e}function bw(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=Zu(Ui(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=xo(i,e.timeZone)}else n=Gr(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=ko(n,e.timeZone);return Qt(o,e.calendar)}function RA(e,t){return bw(e,gw(t))}function DA(e,t,n,o){switch(t){case"hour":{let i=0,r=23;if(o?.hourCycle===12){let m=e.hour>=12;i=m?12:0,r=m?23:11}let a=Ui(e),s=Qt(iu(a,{hour:i}),new Ur),l=[xo(s,e.timeZone,"earlier"),xo(s,e.timeZone,"later")].filter(m=>ko(m,e.timeZone).day===s.day)[0],c=Qt(iu(a,{hour:r}),new Ur),u=[xo(c,e.timeZone,"earlier"),xo(c,e.timeZone,"later")].filter(m=>ko(m,e.timeZone).day===c.day).pop(),d=Gr(e)-e.offset,h=Math.floor(d/Ca),p=d%Ca;return d=So(h,n,Math.floor(l/Ca),Math.floor(u/Ca),o?.round)*Ca+p,Qt(ko(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return vw(e,t,n,o);case"era":case"year":case"month":case"day":{let i=If(Ui(e),t,n,o),r=xo(i,e.timeZone);return Qt(ko(r,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function VA(e,t,n){let o=Ui(e),i=iu(Of(o,t),t);if(i.compare(o)===0)return e;let r=xo(i,e.timeZone,n);return Qt(ko(r,e.timeZone),e.calendar)}function MA(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 yw(e){let t=Qt(e,new Ur),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 xw(e){return`${yw(e)}T${MA(e)}`}function NA(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),r=`${t}${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return i!==0&&(r+=`:${String(i).padStart(2,"0")}`),r}function LA(e){return`${xw(e)}${NA(e.offset)}[${e.timeZone}]`}function FA(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pf(e,t,n){FA(e,t),t.set(e,n)}function Af(e){let t=typeof e[0]=="object"?e.shift():new Ur,n;if(typeof e[0]=="string")n=e.shift();else{let a=t.getEras();n=a[a.length-1]}let o=e.shift(),i=e.shift(),r=e.shift();return[t,n,o,i,r]}var BA=new WeakMap;let ru=class zh{copy(){return this.era?new zh(this.calendar,this.era,this.year,this.month,this.day):new zh(this.calendar,this.year,this.month,this.day)}add(t){return Zu(this,t)}subtract(t){return mw(this,t)}set(t){return Of(this,t)}cycle(t,n,o){return If(this,t,n,o)}toDate(t){return pw(this,t)}toString(){return yw(this)}compare(t){return sw(this,t)}constructor(...t){Pf(this,BA,{writable:!0,value:void 0});let[n,o,i,r,a]=Af(t);this.calendar=n,this.era=o,this.year=i,this.month=r,this.day=a,Gi(this)}};var zA=new WeakMap;let HA=class Hh{copy(){return this.era?new Hh(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Hh(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Zu(this,t)}subtract(t){return mw(this,t)}set(t){return Of(iu(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return If(this,t,n,o);default:return vw(this,t,n,o)}}toDate(t,n){return pw(this,t,n)}toString(){return xw(this)}compare(t){let n=sw(this,t);return n===0?bA(this,Ui(t)):n}constructor(...t){Pf(this,zA,{writable:!0,value:void 0});let[n,o,i,r,a]=Af(t);this.calendar=n,this.era=o,this.year=i,this.month=r,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Gi(this)}};var jA=new WeakMap;let ww=class jh{copy(){return this.era?new jh(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new jh(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return bw(this,t)}subtract(t){return RA(this,t)}set(t,n){return VA(this,t,n)}cycle(t,n,o){return DA(this,t,n,o)}toDate(){return EA(this)}toString(){return LA(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-$A(t,this.timeZone).toDate().getTime()}constructor(...t){Pf(this,jA,{writable:!0,value:void 0});let[n,o,i,r,a]=Af(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=o,this.year=i,this.month=r,this.day=a,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,Gi(this)}},Rd=new Map,no=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(r=>({...r,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(r=>({...r,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return GA()&&(this.resolvedHourCycle||(this.resolvedHourCycle=qA(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=_w(t,n),this.options=n}};const WA={true:{ja:"h11"},false:{}};function _w(e,t={}){if(typeof t.hour12=="boolean"&&UA()){t={...t};let i=WA[String(t.hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=i??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,r)=>i[0]<r[0]?-1:1).join():"");if(Rd.has(n))return Rd.get(n);let o=new Intl.DateTimeFormat(e,t);return Rd.set(n,o),o}let Dd=null;function UA(){return Dd==null&&(Dd=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Dd}let Vd=null;function GA(){return Vd==null&&(Vd=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Vd}function qA(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=_w(e,{...t,timeZone:void 0}),o=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(r=>r.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(r=>r.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 YA(e,t,n,o,i){const r={};for(let s in t){const l=s,c=t[l];c!=null&&(r[l]=Math.floor(c/2),r[l]>0&&c%2===0&&r[l]--)}const a=nr(e,t,n).subtract(r);return tl(e,a,t,n,o,i)}function nr(e,t,n,o,i){let r=e;return t.years?r=As(e):t.months?r=Co(e):t.weeks&&(r=Rs(e,n)),tl(e,r,t,n,o,i)}function Rf(e,t,n,o,i){let r={...t};r.days?r.days--:r.weeks?r.weeks--:r.months?r.months--:r.years&&r.years--;let a=nr(e,t,n).subtract(r);return tl(e,a,t,n,o,i)}function tl(e,t,n,o,i,r){return i&&e.compare(i)>=0&&(t=uw(t,nr(Fi(i),n,o))),r&&e.compare(r)<=0&&(t=cw(t,Rf(Fi(r),n,o))),t}function An(e,t,n){let o=Fi(e);return t&&(o=uw(o,Fi(t))),n&&(o=cw(o,Fi(n))),o}function Km(e,t,n,o,i,r){switch(t){case"start":return nr(e,n,o,i,r);case"end":return Rf(e,n,o,i,r);case"center":default:return YA(e,n,o,i,r)}}function Jt(e,t){return t!=null&&tr(e,t)}function Xm(e,t,n,o,i){return e?t!=null&&t(e,n)?!0:Zn(e,o,i):!1}function Zn(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function KA(e,t,n){const o=e.subtract({days:1});return tr(o,e)||Zn(o,t,n)}function XA(e,t,n){const o=e.add({days:1});return tr(o,e)||Zn(o,t,n)}function Df(e){let t={...e};for(let n in t)t[n]=1;return t}function Cw(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function kw(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function Sw(e,t){const n=Ui(Xu(t));return new no(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:kw(n),timeZone:t})}function Zm(e,t){const n=Xu(t);return new no(e,{month:"long",year:"numeric",era:kw(n),calendar:n?.calendar.identifier,timeZone:t})}function ZA(e,t,n,o,i){let r=n.formatRangeToParts(e.toDate(i),t.toDate(i)),a=-1;for(let c=0;c<r.length;c++){let u=r[c];if(u.source==="shared"&&u.type==="literal")a=c;else if(u.source==="endRange")break}let s="",l="";for(let c=0;c<r.length;c++)c<a?s+=r[c].value:c>a&&(l+=r[c].value);return o(s,l)}function JA(e,t,n,o){let i=e,r=e,a=Sw(n,o);return tr(i,r)?a.format(i.toDate(o)):ZA(i,r,a,(s,l)=>`${s} – ${l}`,o)}var QA=["sun","mon","tue","wed","thu","fri","sat"];function $w(e){return e!=null?QA[e]:void 0}function Ew(e,t,n){const o=$w(n);return Rs(e,t,o)}function Tw(e,t,n,o){const i=t.add({weeks:e}),r=[];let a=Ew(i,n,o);for(;r.length<7;){r.push(a);let s=a.add({days:1});if(tr(a,s))break;a=s}return r}function eR(e,t,n,o){const i=$w(o),r=n??wA(e,t,i);return[...new Array(r).keys()].map(a=>Tw(a,e,t,o))}function tR(e,t){const n=new no(e,{weekday:"long",timeZone:t}),o=new no(e,{weekday:"short",timeZone:t}),i=new no(e,{weekday:"narrow",timeZone:t});return r=>{const a=r instanceof Date?r:r.toDate(t);return{value:r,short:o.format(a),long:n.format(a),narrow:i.format(a)}}}function nR(e,t,n,o){const i=Ew(e,o,t),r=[...new Array(7).keys()],a=tR(o,n);return r.map(s=>a(i.add({days:s})))}function oR(e,t="long"){const n=new Date(2021,0,1),o=[];for(let i=0;i<12;i++)o.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return o}function iR(e){const t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}var rR=10;function aR(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+rR?(i-100).toString():i.toString()}return e}}function fs(e,t){const n=t!=null&&t.strict?10:12,o=e-e%10,i=[];for(let r=0;r<n;r+=1){const a=o+r;i.push(a)}return i}function Dr(e){return Xu(e??Tf())}function nl(e,t,n,o){return function(i){const{startDate:r,focusedDate:a}=i,s=Cw(r,e);return Zn(a,n,o)?{startDate:r,focusedDate:An(a,n,o),endDate:s}:a.compare(r)<0?{startDate:Rf(a,e,t,n,o),focusedDate:An(a,n,o),endDate:s}:a.compare(s)>0?{startDate:nr(a,e,t,n,o),endDate:s,focusedDate:An(a,n,o)}:{startDate:r,endDate:s,focusedDate:An(a,n,o)}}}function Ow(e,t,n,o,i,r){const a=nl(n,o,i,r),s=t.add(n);return a({focusedDate:e.add(n),startDate:nr(tl(e,s,n,o,i,r),n,o)})}function Iw(e,t,n,o,i,r){const a=nl(n,o,i,r);let s=t.subtract(n);return a({focusedDate:e.subtract(n),startDate:nr(tl(e,s,n,o,i,r),n,o)})}function sR(e,t,n,o,i,r,a){const s=nl(o,i,r,a);if(!n&&!o.days)return s({focusedDate:e.add(Df(o)),startDate:t});if(o.days)return Ow(e,t,o,i,r,a);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 lR(e,t,n,o,i,r,a){const s=nl(o,i,r,a);if(!n&&!o.days)return s({focusedDate:e.subtract(Df(o)),startDate:t});if(o.days)return Iw(e,t,o,i,r,a);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 Jm=e=>e!=null&&e.length===4,cR=e=>e!=null&&parseFloat(e)<=12,uR=e=>e!=null&&parseFloat(e)<=31;function dR(e,t,n){const o=hR(t,n);let{year:i,month:r,day:a}=pR(o,e)??{};if(i!=null||r!=null||a!=null){const l=new Date;i||(i=l.getFullYear().toString()),r||(r=(l.getMonth()+1).toString()),a||(a=l.getDate().toString())}if(Jm(i)||(i=aR(i)),Jm(i)&&cR(r)&&uR(a))return new ru(+i,+r,+a);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new ru(l.getFullYear(),l.getMonth()+1,l.getDate())}}function hR(e,t){return new no(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 pR(e,t){var n;const o=t.match(e);return(n=e.toString().match(/<(.+?)>/g))==null?void 0:n.map(i=>{var r;const a=i.match(/<(.+)>/);return!a||a.length<=0?null:(r=i.match(/<(.+)>/))==null?void 0:r[1]}).reduce((i,r,a)=>(r&&(o&&o.length>a?i[r]=o[a+1]:i[r]=null),i),{})}function Qm(e,t,n){const o=Fi(aw(n));switch(e){case"thisWeek":return[Rs(o,t),Um(o,t)];case"thisMonth":return[Co(o),o];case"thisQuarter":return[Co(o).add({months:-((o.month-1)%3)}),o];case"thisYear":return[As(o),o];case"last3Days":return[o.add({days:-2}),o];case"last7Days":return[o.add({days:-6}),o];case"last14Days":return[o.add({days:-13}),o];case"last30Days":return[o.add({days:-29}),o];case"last90Days":return[o.add({days:-89}),o];case"lastMonth":return[Co(o.add({months:-1})),Nh(o.add({months:-1}))];case"lastQuarter":return[Co(o.add({months:-((o.month-1)%3)-3})),Nh(o.add({months:-((o.month-1)%3)-1}))];case"lastWeek":return[Rs(o,t).add({weeks:-1}),Um(o,t).add({weeks:-1})];case"lastYear":return[As(o.add({years:-1})),yA(o.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}var Tl="__live-region__";function Pw(e={}){const{level:t="polite",document:n=document,root:o,delay:i=0}=e,r=n.defaultView??window,a=o??n.body;function s(c,u){const d=n.getElementById(Tl);d?.remove(),u=u??i;const h=n.createElement("span");h.id=Tl,h.dataset.liveAnnouncer="true";const p=t!=="assertive"?"status":"alert";h.setAttribute("aria-live",t),h.setAttribute("role",p),Object.assign(h.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"}),a.appendChild(h),r.setTimeout(()=>{h.textContent=c},u)}function l(){const c=n.getElementById(Tl);c?.remove()}return{announce:s,destroy:l,toJSON(){return Tl}}}var Aw=be("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"),Me=Aw.build(),fR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.label)==null?void 0:o.call(n,t))??`datepicker:${e.id}:label:${t}`},gR=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`datepicker:${e.id}`},mR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.table)==null?void 0:o.call(n,t))??`datepicker:${e.id}:table:${t}`},Wh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},Md=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.cellTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:cell-trigger:${t}`},vR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.prevTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:prev:${t}`},bR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.nextTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:next:${t}`},yR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.viewTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:view:${t}`},Rw=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},Dw=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},ev=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.input)==null?void 0:o.call(n,t))??`datepicker:${e.id}:input:${t}`},Vw=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},Mw=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},Nw=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},Lw=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},tv=(e,t)=>tx(Cc(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),nv=e=>e.getById(Vw(e)),Cc=e=>e.getById(Wh(e)),ka=e=>oi(Fw(e),"[data-part=input]"),xR=e=>e.getById(Lw(e)),wR=e=>e.getById(Nw(e)),_R=e=>e.getById(Rw(e)),CR=e=>e.getById(Mw(e)),Fw=e=>e.getById(Dw(e));function Uh(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function hr(e,t){const[n,o]=t;return!n||!o?!1:n.compare(e)<=0&&o.compare(e)>=0}function Ol(e){return e.slice().sort((t,n)=>t.compare(n))}function kR(e){return Bt(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}var SR={day:"dd",month:"mm",year:"yyyy"};function $R(e){return new no(e).formatToParts(new Date).map(t=>SR[t.type]??t.value).join("")}var Bw=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,ov=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),ER=(e,t)=>e.split("").filter(n=>Bw(n,t)).join("");function TR(e){const t=new Intl.DateTimeFormat(e).formatToParts(new Date).find(n=>n.type==="literal");return t?t.value:"/"}var OR={dayCell(e){return e.unavailable?`Not available. ${e.formattedDate}`:e.selected?`Selected date. ${e.formattedDate}`:`Choose ${e.formattedDate}`},trigger(e){return e?"Close calendar":"Open calendar"},viewTrigger(e){return Bt(e,{year:"Switch to month view",month:"Switch to day view",day:"Switch to year view"})},presetTrigger(e){const[t="",n=""]=e;return`select ${t} to ${n}`},prevTrigger(e){return Bt(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Bt(e,{year:"Switch to next decade",month:"Switch to next year",day:"Switch to next month"})},placeholder(){return{day:"dd",month:"mm",year:"yyyy"}},content:"calendar",monthSelect:"Select month",yearSelect:"Select year",clearTrigger:"Clear selected dates"};function Oo(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function Vf(e){return e===0?"day":e===1?"month":"year"}function Mf(e,t,n){return Vf(vt(Oo(e,0),Oo(t,0),Oo(n,2)))}function IR(e,t){return Oo(e,0)>Oo(t,0)}function PR(e,t){return Oo(e,0)<Oo(t,0)}function AR(e,t,n){const o=Oo(e,0)+1;return Mf(Vf(o),t,n)}function RR(e,t,n){const o=Oo(e,0)-1;return Mf(Vf(o),t,n)}var DR=["day","month","year"];function VR(e){DR.forEach(t=>e(t))}function MR(e,t){const{state:n,context:o,prop:i,send:r,computed:a,scope:s}=e,l=o.get("startValue"),c=a("endValue"),u=o.get("value"),d=o.get("focusedValue"),h=o.get("hoveredValue"),p=h?Uh([u[0],h]):[],m=i("disabled"),f=i("readOnly"),b=a("isInteractive"),v=i("min"),y=i("max"),x=i("locale"),_=i("timeZone"),k=i("startOfWeek"),$=n.matches("focused"),A=n.matches("open"),S=i("selectionMode")==="range",R=i("isDateUnavailable"),F=o.get("currentPlacement"),P=$f({...i("positioning"),placement:F}),G=TR(x),ee={...OR,...i("translations")};function z(B=l){const H=i("fixedWeeks")?6:void 0;return eR(B,x,H,k)}function W(B={}){const{format:H}=B;return oR(x,H).map((K,re)=>{const ye=re+1,ke=d.set({month:ye}),Oe=Zn(ke,v,y);return{label:K,value:ye,disabled:Oe}})}function q(){return iR({from:v?.year??1900,to:y?.year??2100}).map(B=>({label:B.toString(),value:B,disabled:!hs(B,v?.year,y?.year)}))}function ne(B){return fs(l.year).map(H=>({label:H.toString(),value:H,disabled:!hs(H,v?.year,y?.year)}))}function te(B){return Xm(B,R,x,v,y)}function le(B){const H=l??Dr(_);r({type:"FOCUS.SET",value:H.set({month:B})})}function he(B){const H=l??Dr(_);r({type:"FOCUS.SET",value:H.set({year:B})})}function ue(B){const{value:H,disabled:K}=B,re=d.set({year:H}),ye=!fs(l.year,{strict:!0}).includes(H),ke=hs(H,v?.year,y?.year),Oe={focused:d.year===B.value,selectable:ye||ke,outsideRange:ye,selected:!!u.find(it=>it&&it.year===H),valueText:H.toString(),inRange:S&&(hr(re,u)||hr(re,p)),value:re,get disabled(){return K||!Oe.selectable}};return Oe}function _e(B){const{value:H,disabled:K}=B,re=d.set({month:H}),ye=Zm(x,_),ke={focused:d.month===B.value,selectable:!Zn(re,v,y),selected:!!u.find(Oe=>Oe&&Oe.month===H&&Oe.year===d.year),valueText:ye.format(re.toDate(_)),inRange:S&&(hr(re,u)||hr(re,p)),value:re,get disabled(){return K||!ke.selectable}};return ke}function me(B){const{value:H,disabled:K,visibleRange:re=a("visibleRange")}=B,ye=Sw(x,_),ke=Df(a("visibleDuration")),Oe=i("outsideDaySelectable"),it=re.start.add(ke).subtract({days:1}),Z=Zn(H,re.start,it),ce=S&&hr(H,u),ae=S&&Jt(H,u[0]),xe=S&&Jt(H,u[1]),Xe=S&&p.length>0,wt=Xe&&hr(H,p),Et=Xe&&Jt(H,p[0]),Tn=Xe&&Jt(H,p[1]),Mo={invalid:Zn(H,v,y),disabled:K||!Oe&&Z||Zn(H,v,y),selected:u.some(dl=>Jt(H,dl)),unavailable:Xm(H,R,x,v,y)&&!K,outsideRange:Z,today:mA(H,_),weekend:CA(H,x),formattedDate:ye.format(H.toDate(_)),get focused(){return Jt(H,d)&&(!Mo.outsideRange||Oe)},get ariaLabel(){return ee.dayCell(Mo)},get selectable(){return!Mo.disabled&&!Mo.unavailable},inRange:ce||wt,firstInRange:ae,lastInRange:xe,inHoveredRange:wt,firstInHoveredRange:Et,lastInHoveredRange:Tn};return Mo}function Te(B){const{view:H="day",id:K}=B;return[H,K].filter(Boolean).join(" ")}return{focused:$,open:A,inline:!!i("inline"),view:o.get("view"),getRangePresetValue(B){return Qm(B,x,_)},getDaysInWeek(B,H=l){return Tw(B,H,x,k)},getOffset(B){const H=l.add(B),K=c.add(B),re=Zm(x,_);return{visibleRange:{start:H,end:K},weeks:z(H),visibleRangeText:{start:re.format(H.toDate(_)),end:re.format(K.toDate(_))}}},getMonthWeeks:z,isUnavailable:te,weeks:z(),weekDays:nR(Dr(_),k,_,x),visibleRangeText:a("visibleRangeText"),value:u,valueAsDate:u.filter(B=>B!=null).map(B=>B.toDate(_)),valueAsString:a("valueAsString"),focusedValue:d,focusedValueAsDate:d?.toDate(_),focusedValueAsString:i("format")(d,{locale:x,timeZone:_}),visibleRange:a("visibleRange"),selectToday(){const B=An(Dr(_),v,y);r({type:"VALUE.SET",value:B})},setValue(B){const H=B.map(K=>An(K,v,y));r({type:"VALUE.SET",value:H})},clearValue(){r({type:"VALUE.CLEAR"})},setFocusedValue(B){r({type:"FOCUS.SET",value:B})},setOpen(B){i("inline")||n.matches("open")===B||r({type:B?"OPEN":"CLOSE"})},focusMonth:le,focusYear:he,getYears:q,getMonths:W,getYearsGrid(B={}){const{columns:H=1}=B;return Wg(ne(),H)},getDecade(){const B=fs(d.year);return{start:B.at(0),end:B.at(-1)}},getMonthsGrid(B={}){const{columns:H=1,format:K}=B;return Wg(W({format:K}),H)},format(B,H={month:"long",year:"numeric"}){return new no(x,H).format(B.toDate(_))},setView(B){r({type:"VIEW.SET",view:B})},goToNext(){r({type:"GOTO.NEXT",view:o.get("view")})},goToPrev(){r({type:"GOTO.PREV",view:o.get("view")})},getRootProps(){return t.element({...Me.root.attrs,dir:i("dir"),id:gR(s),"data-state":A?"open":"closed","data-disabled":D(m),"data-readonly":D(f)})},getLabelProps(B={}){const{index:H=0}=B;return t.label({...Me.label.attrs,id:fR(s,H),dir:i("dir"),htmlFor:ev(s,H),"data-state":A?"open":"closed","data-index":H,"data-disabled":D(m),"data-readonly":D(f)})},getControlProps(){return t.element({...Me.control.attrs,dir:i("dir"),id:Dw(s),"data-disabled":D(m)})},getRangeTextProps(){return t.element({...Me.rangeText.attrs,dir:i("dir")})},getContentProps(){return t.element({...Me.content.attrs,hidden:!A,dir:i("dir"),"data-state":A?"open":"closed","data-placement":F,"data-inline":D(i("inline")),id:Wh(s),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":ee.content})},getTableProps(B={}){const{view:H="day",columns:K=H==="day"?7:4}=B,re=Te(B);return t.element({...Me.table.attrs,role:"grid","data-columns":K,"aria-roledescription":kR(H),id:mR(s,re),"aria-readonly":Je(f),"aria-disabled":Je(m),"aria-multiselectable":Je(i("selectionMode")!=="single"),"data-view":H,dir:i("dir"),tabIndex:-1,onKeyDown(ye){if(ye.defaultPrevented)return;const ke={Enter(){H==="day"&&te(d)||H==="month"&&!_e({value:d.month}).selectable||H==="year"&&!ue({value:d.year}).selectable||r({type:"TABLE.ENTER",view:H,columns:K,focus:!0})},ArrowLeft(){r({type:"TABLE.ARROW_LEFT",view:H,columns:K,focus:!0})},ArrowRight(){r({type:"TABLE.ARROW_RIGHT",view:H,columns:K,focus:!0})},ArrowUp(){r({type:"TABLE.ARROW_UP",view:H,columns:K,focus:!0})},ArrowDown(){r({type:"TABLE.ARROW_DOWN",view:H,columns:K,focus:!0})},PageUp(Oe){r({type:"TABLE.PAGE_UP",larger:Oe.shiftKey,view:H,columns:K,focus:!0})},PageDown(Oe){r({type:"TABLE.PAGE_DOWN",larger:Oe.shiftKey,view:H,columns:K,focus:!0})},Home(){r({type:"TABLE.HOME",view:H,columns:K,focus:!0})},End(){r({type:"TABLE.END",view:H,columns:K,focus:!0})}}[$s(ye,{dir:i("dir")})];ke&&(ke(ye),ye.preventDefault(),ye.stopPropagation())},onPointerLeave(){r({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){r({type:"TABLE.POINTER_DOWN",view:H})},onPointerUp(){r({type:"TABLE.POINTER_UP",view:H})}})},getTableHeadProps(B={}){const{view:H="day"}=B;return t.element({...Me.tableHead.attrs,"aria-hidden":!0,dir:i("dir"),"data-view":H,"data-disabled":D(m)})},getTableHeaderProps(B={}){const{view:H="day"}=B;return t.element({...Me.tableHeader.attrs,dir:i("dir"),"data-view":H,"data-disabled":D(m)})},getTableBodyProps(B={}){const{view:H="day"}=B;return t.element({...Me.tableBody.attrs,"data-view":H,"data-disabled":D(m)})},getTableRowProps(B={}){const{view:H="day"}=B;return t.element({...Me.tableRow.attrs,"aria-disabled":Je(m),"data-disabled":D(m),"data-view":H})},getDayTableCellState:me,getDayTableCellProps(B){const{value:H}=B,K=me(B);return t.element({...Me.tableCell.attrs,role:"gridcell","aria-disabled":Je(!K.selectable),"aria-selected":K.selected||K.inRange,"aria-invalid":Je(K.invalid),"aria-current":K.today?"date":void 0,"data-value":H.toString()})},getDayTableCellTriggerProps(B){const{value:H}=B,K=me(B);return t.element({...Me.tableCellTrigger.attrs,id:Md(s,H.toString()),role:"button",dir:i("dir"),tabIndex:K.focused?0:-1,"aria-label":K.ariaLabel,"aria-disabled":Je(!K.selectable),"aria-invalid":Je(K.invalid),"data-disabled":D(!K.selectable),"data-selected":D(K.selected),"data-value":H.toString(),"data-view":"day","data-today":D(K.today),"data-focus":D(K.focused),"data-unavailable":D(K.unavailable),"data-range-start":D(K.firstInRange),"data-range-end":D(K.lastInRange),"data-in-range":D(K.inRange),"data-outside-range":D(K.outsideRange),"data-weekend":D(K.weekend),"data-in-hover-range":D(K.inHoveredRange),"data-hover-range-start":D(K.firstInHoveredRange),"data-hover-range-end":D(K.lastInHoveredRange),onClick(re){re.defaultPrevented||K.selectable&&r({type:"CELL.CLICK",cell:"day",value:H})},onPointerMove:S?re=>{if(re.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(re.currentTarget);h&&pA(H,h)||r({type:"CELL.POINTER_MOVE",cell:"day",value:H,focus:ye})}:void 0})},getMonthTableCellState:_e,getMonthTableCellProps(B){const{value:H,columns:K}=B,re=_e(B);return t.element({...Me.tableCell.attrs,dir:i("dir"),colSpan:K,role:"gridcell","aria-selected":Je(re.selected||re.inRange),"data-selected":D(re.selected),"aria-disabled":Je(!re.selectable),"data-value":H})},getMonthTableCellTriggerProps(B){const{value:H}=B,K=_e(B);return t.element({...Me.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Md(s,H.toString()),"data-selected":D(K.selected),"aria-disabled":Je(!K.selectable),"data-disabled":D(!K.selectable),"data-focus":D(K.focused),"data-in-range":D(K.inRange),"data-outside-range":D(K.outsideRange),"aria-label":K.valueText,"data-view":"month","data-value":H,tabIndex:K.focused?0:-1,onClick(re){re.defaultPrevented||K.selectable&&r({type:"CELL.CLICK",cell:"month",value:H})},onPointerMove:S?re=>{if(re.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(re.currentTarget);h&&K.value&&fA(K.value,h)||r({type:"CELL.POINTER_MOVE",cell:"month",value:K.value,focus:ye})}:void 0})},getYearTableCellState:ue,getYearTableCellProps(B){const{value:H,columns:K}=B,re=ue(B);return t.element({...Me.tableCell.attrs,dir:i("dir"),colSpan:K,role:"gridcell","aria-selected":Je(re.selected),"data-selected":D(re.selected),"aria-disabled":Je(!re.selectable),"data-value":H})},getYearTableCellTriggerProps(B){const{value:H}=B,K=ue(B);return t.element({...Me.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Md(s,H.toString()),"data-selected":D(K.selected),"data-focus":D(K.focused),"data-in-range":D(K.inRange),"aria-disabled":Je(!K.selectable),"data-disabled":D(!K.selectable),"aria-label":K.valueText,"data-outside-range":D(K.outsideRange),"data-value":H,"data-view":"year",tabIndex:K.focused?0:-1,onClick(re){re.defaultPrevented||K.selectable&&r({type:"CELL.CLICK",cell:"year",value:H})},onPointerMove:S?re=>{if(re.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(re.currentTarget);h&&K.value&&gA(K.value,h)||r({type:"CELL.POINTER_MOVE",cell:"year",value:K.value,focus:ye})}:void 0})},getNextTriggerProps(B={}){const{view:H="day"}=B,K=m||!a("isNextVisibleRangeValid");return t.button({...Me.nextTrigger.attrs,dir:i("dir"),id:bR(s,H),type:"button","aria-label":ee.nextTrigger(H),disabled:K,"data-disabled":D(K),onClick(re){re.defaultPrevented||r({type:"GOTO.NEXT",view:H})}})},getPrevTriggerProps(B={}){const{view:H="day"}=B,K=m||!a("isPrevVisibleRangeValid");return t.button({...Me.prevTrigger.attrs,dir:i("dir"),id:vR(s,H),type:"button","aria-label":ee.prevTrigger(H),disabled:K,"data-disabled":D(K),onClick(re){re.defaultPrevented||r({type:"GOTO.PREV",view:H})}})},getClearTriggerProps(){return t.button({...Me.clearTrigger.attrs,id:Rw(s),dir:i("dir"),type:"button","aria-label":ee.clearTrigger,hidden:!u.length,onClick(B){B.defaultPrevented||r({type:"VALUE.CLEAR"})}})},getTriggerProps(){return t.button({...Me.trigger.attrs,id:Vw(s),dir:i("dir"),type:"button","data-placement":F,"aria-label":ee.trigger(A),"aria-controls":Wh(s),"data-state":A?"open":"closed","aria-haspopup":"grid",disabled:m,onClick(B){B.defaultPrevented||b&&r({type:"TRIGGER.CLICK"})}})},getViewProps(B={}){const{view:H="day"}=B;return t.element({...Me.view.attrs,"data-view":H,hidden:o.get("view")!==H})},getViewTriggerProps(B={}){const{view:H="day"}=B;return t.button({...Me.viewTrigger.attrs,"data-view":H,dir:i("dir"),id:yR(s,H),type:"button",disabled:m,"aria-label":ee.viewTrigger(H),onClick(K){K.defaultPrevented||b&&r({type:"VIEW.TOGGLE",src:"viewTrigger"})}})},getViewControlProps(B={}){const{view:H="day"}=B;return t.element({...Me.viewControl.attrs,"data-view":H,dir:i("dir")})},getInputProps(B={}){const{index:H=0,fixOnBlur:K=!0}=B;return t.input({...Me.input.attrs,id:ev(s,H),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:i("dir"),name:i("name"),"data-index":H,"data-state":A?"open":"closed",readOnly:f,disabled:m,placeholder:i("placeholder")||$R(x),defaultValue:a("valueAsString")[H],onBeforeInput(re){const{data:ye}=F0(re);Bw(ye,G)||re.preventDefault()},onFocus(){r({type:"INPUT.FOCUS",index:H})},onBlur(re){const ye=re.currentTarget.value.trim();r({type:"INPUT.BLUR",value:ye,index:H,fixOnBlur:K})},onKeyDown(re){if(re.defaultPrevented||!b)return;const ye={Enter(ke){Ss(ke)||te(d)||ke.currentTarget.value.trim()!==""&&r({type:"INPUT.ENTER",value:ke.currentTarget.value,index:H})}}[re.key];ye&&(ye(re),re.preventDefault())},onInput(re){const ye=re.currentTarget.value;r({type:"INPUT.CHANGE",value:ER(ye,G),index:H})}})},getMonthSelectProps(){return t.select({...Me.monthSelect.attrs,id:Nw(s),"aria-label":ee.monthSelect,disabled:m,dir:i("dir"),defaultValue:l.month,onChange(B){le(Number(B.currentTarget.value))}})},getYearSelectProps(){return t.select({...Me.yearSelect.attrs,id:Lw(s),disabled:m,"aria-label":ee.yearSelect,dir:i("dir"),defaultValue:l.year,onChange(B){he(Number(B.currentTarget.value))}})},getPositionerProps(){return t.element({id:Mw(s),...Me.positioner.attrs,dir:i("dir"),style:P.floating})},getPresetTriggerProps(B){const H=Array.isArray(B.value)?B.value:Qm(B.value,x,_),K=H.filter(re=>re!=null).map(re=>re.toDate(_).toDateString());return t.button({...Me.presetTrigger.attrs,"aria-label":ee.presetTrigger(K),type:"button",onClick(re){re.defaultPrevented||r({type:"PRESET.CLICK",value:H})}})}}}var{and:dn}=Ct();function NR(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(!Jt(e[o],t[o]))return!1;return!0}function Il(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}var LR={props({props:e}){const t=e.locale||"en-US",n=e.timeZone||"UTC",o=e.selectionMode||"single",i=e.numOfMonths||1,r=e.defaultValue?Ol(e.defaultValue).map(d=>An(d,e.min,e.max)):void 0,a=e.value?Ol(e.value).map(d=>An(d,e.min,e.max)):void 0;let s=e.focusedValue||e.defaultFocusedValue||a?.[0]||r?.[0]||Dr(n);s=An(s,e.min,e.max);const l="day",c="year",u=Mf(e.view||l,l,c);return{locale:t,numOfMonths:i,timeZone:n,selectionMode:o,defaultView:u,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(d,{locale:h,timeZone:p}){return new no(h,{timeZone:p,day:"2-digit",month:"2-digit",year:"numeric"}).format(d.toDate(p))},parse(d,{locale:h,timeZone:p}){return dR(d,h,p)},...e,focusedValue:typeof e.focusedValue>"u"?void 0:s,defaultFocusedValue:s,value:a,defaultValue:r??[],positioning:{placement:"bottom",...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e("defaultFocusedValue"),value:e("focusedValue"),isEqual:Jt,hash:o=>o.toString(),sync:!0,onChange(o){var i;const r=n(),a=r.get("view"),s=r.get("value"),l=Il(s,e);(i=e("onFocusChange"))==null||i({value:s,valueAsString:l,view:a,focusedValue:o})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:NR,hash:o=>o.map(i=>i.toString()).join(","),onChange(o){var i;const r=n(),a=Il(o,e);(i=e("onValueChange"))==null||i({value:o,valueAsString:a,view:r.get("view")})}})),inputValue:t(()=>({defaultValue:""})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:(o,i)=>i!==null&&o!==null&&Jt(o,i)})),view:t(()=>({defaultValue:e("defaultView"),value:e("view"),onChange(o){var i;(i=e("onViewChange"))==null||i({view:o})}})),startValue:t(()=>{const o=e("focusedValue")||e("defaultFocusedValue");return{defaultValue:Km(o,"start",{months:e("numOfMonths")},e("locale")),isEqual:Jt,hash:i=>i.toString()}}),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e("disabled")&&!e("readOnly"),visibleDuration:({prop:e})=>({months:e("numOfMonths")}),endValue:({context:e,computed:t})=>Cw(e.get("startValue"),t("visibleDuration")),visibleRange:({context:e,computed:t})=>({start:e.get("startValue"),end:t("endValue")}),visibleRangeText({context:e,prop:t,computed:n}){const o=t("timeZone"),i=new no(t("locale"),{month:"long",year:"numeric",timeZone:o}),r=i.format(e.get("startValue").toDate(o)),a=i.format(n("endValue").toDate(o)),s=t("selectionMode")==="range"?`${r} - ${a}`:r;return{start:r,end:a,formatted:s}},isPrevVisibleRangeValid:({context:e,prop:t})=>!KA(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!XA(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>Il(e.get("value"),t)},effects:["setupLiveRegion"],watch({track:e,prop:t,context:n,action:o,computed:i}){e([()=>t("locale")],()=>{o(["setStartValue"])}),e([()=>n.hash("focusedValue")],()=>{o(["setStartValue","focusActiveCellIfNeeded","setHoveredValueIfKeyboard"])}),e([()=>n.hash("startValue")],()=>{o(["syncMonthSelectElement","syncYearSelectElement"])}),e([()=>n.get("inputValue")],()=>{o(["syncInputValue"])}),e([()=>n.hash("value")],()=>{o(["syncInputElement"])}),e([()=>i("valueAsString").toString()],()=>{o(["announceValueText"])}),e([()=>n.get("view")],()=>{o(["focusActiveCell"])}),e([()=>t("open")],()=>{o(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setDateValue","setFocusedDate"]},"VIEW.SET":{actions:["setView"]},"FOCUS.SET":{actions:["setFocusedDate"]},"VALUE.CLEAR":{actions:["clearDateValue","clearFocusedDate","focusFirstInputElement"]},"INPUT.CHANGE":[{guard:"isInputValueEmpty",actions:["setInputValue","clearDateValue","clearFocusedDate"]},{actions:["setInputValue","focusParsedDate"]}],"INPUT.ENTER":{actions:["focusParsedDate","selectFocusedDate"]},"INPUT.FOCUS":{actions:["setActiveIndex"]},"INPUT.BLUR":[{guard:"shouldFixOnBlur",actions:["setActiveIndexToStart","selectParsedDate"]},{actions:["setActiveIndexToStart"]}],"PRESET.CLICK":[{guard:"isOpenControlled",actions:["setDateValue","setFocusedDate","invokeOnClose"]},{target:"focused",actions:["setDateValue","setFocusedDate","focusInputElement"]}],"GOTO.NEXT":[{guard:"isYearView",actions:["focusNextDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusNextYear","announceVisibleRange"]},{actions:["focusNextPage"]}],"GOTO.PREV":[{guard:"isYearView",actions:["focusPreviousDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusPreviousYear","announceVisibleRange"]},{actions:["focusPreviousPage"]}]},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],exit:["clearHoveredDate","resetView"],on:{"CONTROLLED.CLOSE":[{guard:dn("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:dn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:dn("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setHoveredDate","setFocusedDate"]},"TABLE.POINTER_LEAVE":{guard:"isRangePicker",actions:["clearHoveredDate"]},"TABLE.POINTER_DOWN":{actions:["disableTextSelection"]},"TABLE.POINTER_UP":{actions:["enableTextSelection"]},"TABLE.ESCAPE":[{guard:"isOpenControlled",actions:["focusFirstSelectedDate","invokeOnClose"]},{target:"focused",actions:["focusFirstSelectedDate","invokeOnClose","focusTriggerElement"]}],"TABLE.ENTER":[{guard:"isAboveMinView",actions:["setPreviousView"]},{guard:dn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:dn("closeOnSelect","isOpenControlled"),actions:["selectFocusedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectFocusedDate","invokeOnClose","focusInputElement"]},{actions:["selectFocusedDate"]}],"TABLE.ARROW_RIGHT":[{guard:"isMonthView",actions:["focusNextMonth"]},{guard:"isYearView",actions:["focusNextYear"]},{actions:["focusNextDay","setHoveredDate"]}],"TABLE.ARROW_LEFT":[{guard:"isMonthView",actions:["focusPreviousMonth"]},{guard:"isYearView",actions:["focusPreviousYear"]},{actions:["focusPreviousDay"]}],"TABLE.ARROW_UP":[{guard:"isMonthView",actions:["focusPreviousMonthColumn"]},{guard:"isYearView",actions:["focusPreviousYearColumn"]},{actions:["focusPreviousWeek"]}],"TABLE.ARROW_DOWN":[{guard:"isMonthView",actions:["focusNextMonthColumn"]},{guard:"isYearView",actions:["focusNextYearColumn"]},{actions:["focusNextWeek"]}],"TABLE.PAGE_UP":{actions:["focusPreviousSection"]},"TABLE.PAGE_DOWN":{actions:["focusNextSection"]},"TABLE.HOME":[{guard:"isMonthView",actions:["focusFirstMonth"]},{guard:"isYearView",actions:["focusFirstYear"]},{actions:["focusSectionStart"]}],"TABLE.END":[{guard:"isMonthView",actions:["focusLastMonth"]},{guard:"isYearView",actions:["focusLastYear"]},{actions:["focusSectionEnd"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"VIEW.TOGGLE":{actions:["setNextView"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["setActiveIndexToStart","invokeOnClose","focusTriggerElement"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>IR(e.get("view"),t("minView")),isDayView:({context:e,event:t})=>(t.view||e.get("view"))==="day",isMonthView:({context:e,event:t})=>(t.view||e.get("view"))==="month",isYearView:({context:e,event:t})=>(t.view||e.get("view"))==="year",isRangePicker:({prop:e})=>e("selectionMode")==="range",hasSelectedRange:({context:e})=>e.get("value").length===2,isMultiPicker:({prop:e})=>e("selectionMode")==="multiple",shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus"),isSelectingEndDate:({context:e})=>e.get("activeIndex")===1,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),isInteractOutsideEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INTERACT_OUTSIDE"},isInputValueEmpty:({event:e})=>e.value.trim()==="",shouldFixOnBlur:({event:e})=>!!e.fixOnBlur},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);const o=Fw(n);return on(o,()=>CR(n),{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},setupLiveRegion({scope:e,refs:t}){const n=e.getDoc();return t.set("announcer",Pw({level:"assertive",document:n})),()=>{var o,i;return(i=(o=t.get("announcer"))==null?void 0:o.destroy)==null?void 0:i.call(o)}},trackDismissableElement({scope:e,send:t,context:n,prop:o}){return o("inline")?void 0:ia(()=>Cc(e),{type:"popover",defer:!0,exclude:[...ka(e),nv(e),_R(e)],onInteractOutside(i){n.set("restoreFocus",!i.detail.focusable)},onDismiss(){t({type:"INTERACT_OUTSIDE"})},onEscapeKeyDown(i){i.preventDefault(),t({type:"TABLE.ESCAPE",src:"dismissable"})}})}},actions:{setNextView({context:e,prop:t}){const n=AR(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){const n=RR(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setView({context:e,event:t}){e.set("view",t.view)},setRestoreFocus({context:e}){e.set("restoreFocus",!0)},announceValueText({context:e,prop:t,refs:n}){var o;const i=e.get("value").map(r=>JA(r,null,t("locale"),t("timeZone")));(o=n.get("announcer"))==null||o.announce(i.join(","),3e3)},announceVisibleRange({computed:e,refs:t}){var n;const{formatted:o}=e("visibleRangeText");(n=t.get("announcer"))==null||n.announce(o)},disableTextSelection({scope:e}){Jp({target:Cc(e),doc:e.getDoc()})},enableTextSelection({scope:e}){J0({doc:e.getDoc(),target:Cc(e)})},focusFirstSelectedDate(e){const{context:t}=e;t.get("value").length&&He(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){de(()=>{ka(e).forEach((n,o)=>{Rn(n,t("valueAsString")[o]||"")})})},setFocusedDate(e){const{event:t}=e,n=Array.isArray(t.value)?t.value[0]:t.value;He(e,n)},setFocusedValueForView(e){const{context:t,event:n}=e;He(e,t.get("focusedValue").set({[t.get("view")]:n.value}))},focusNextMonth(e){const{context:t}=e;He(e,t.get("focusedValue").add({months:1}))},focusPreviousMonth(e){const{context:t}=e;He(e,t.get("focusedValue").subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;const o=t.value.map(i=>An(i,n("min"),n("max")));e.set("value",o)},clearDateValue({context:e}){e.set("value",[])},setSelectedDate(e){const{context:t,event:n}=e,o=Array.from(t.get("value"));o[t.get("activeIndex")]=kc(e,n.value??t.get("focusedValue")),t.set("value",Uh(o))},resetSelection(e){const{context:t,event:n}=e,o=kc(e,n.value??t.get("focusedValue"));t.set("value",[o])},toggleSelectedDate(e){const{context:t,event:n}=e,o=kc(e,n.value??t.get("focusedValue")),i=t.get("value").findIndex(r=>Jt(r,o));if(i===-1){const r=[...t.get("value"),o];t.set("value",Ol(r))}else{const r=Array.from(t.get("value"));r.splice(i,1),t.set("value",Ol(r))}},setHoveredDate({context:e,event:t}){e.set("hoveredValue",t.value)},clearHoveredDate({context:e}){e.set("hoveredValue",null)},selectFocusedDate({context:e,computed:t}){const n=Array.from(e.get("value")),o=e.get("activeIndex");n[o]=e.get("focusedValue").copy(),e.set("value",Uh(n));const i=t("valueAsString");e.set("inputValue",i[o])},focusPreviousDay(e){const{context:t}=e,n=t.get("focusedValue").subtract({days:1});He(e,n)},focusNextDay(e){const{context:t}=e,n=t.get("focusedValue").add({days:1});He(e,n)},focusPreviousWeek(e){const{context:t}=e,n=t.get("focusedValue").subtract({weeks:1});He(e,n)},focusNextWeek(e){const{context:t}=e,n=t.get("focusedValue").add({weeks:1});He(e,n)},focusNextPage(e){const{context:t,computed:n,prop:o}=e,i=Ow(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Pl(e,i)},focusPreviousPage(e){const{context:t,computed:n,prop:o}=e,i=Iw(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Pl(e,i)},focusSectionStart(e){const{context:t}=e;He(e,t.get("startValue").copy())},focusSectionEnd(e){const{computed:t}=e;He(e,t("endValue").copy())},focusNextSection(e){const{context:t,event:n,computed:o,prop:i}=e,r=sR(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));r&&Pl(e,r)},focusPreviousSection(e){const{context:t,event:n,computed:o,prop:i}=e,r=lR(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));r&&Pl(e,r)},focusNextYear(e){const{context:t}=e,n=t.get("focusedValue").add({years:1});He(e,n)},focusPreviousYear(e){const{context:t}=e,n=t.get("focusedValue").subtract({years:1});He(e,n)},focusNextDecade(e){const{context:t}=e,n=t.get("focusedValue").add({years:10});He(e,n)},focusPreviousDecade(e){const{context:t}=e,n=t.get("focusedValue").subtract({years:10});He(e,n)},clearFocusedDate(e){const{prop:t}=e;He(e,Dr(t("timeZone")))},focusPreviousMonthColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").subtract({months:n.columns});He(e,o)},focusNextMonthColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").add({months:n.columns});He(e,o)},focusPreviousYearColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").subtract({years:n.columns});He(e,o)},focusNextYearColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").add({years:n.columns});He(e,o)},focusFirstMonth(e){const{context:t}=e,n=t.get("focusedValue").set({month:1});He(e,n)},focusLastMonth(e){const{context:t}=e,n=t.get("focusedValue").set({month:12});He(e,n)},focusFirstYear(e){const{context:t}=e,n=fs(t.get("focusedValue").year),o=t.get("focusedValue").set({year:n[0]});He(e,o)},focusLastYear(e){const{context:t}=e,n=fs(t.get("focusedValue").year),o=t.get("focusedValue").set({year:n[n.length-1]});He(e,o)},setActiveIndex({context:e,event:t}){e.set("activeIndex",t.index)},setActiveIndexToEnd({context:e}){e.set("activeIndex",1)},setActiveIndexToStart({context:e}){e.set("activeIndex",0)},focusActiveCell({scope:e,context:t}){de(()=>{var n;const o=t.get("view");(n=tv(e,o))==null||n.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&de(()=>{var o;const i=t.get("view");(o=tv(e,i))==null||o.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith("TABLE.ARROW")||n("selectionMode")!=="range"||e.get("activeIndex")===0||e.set("hoveredValue",e.get("focusedValue").copy())},focusTriggerElement({scope:e}){de(()=>{var t;(t=nv(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){de(()=>{const[t]=ka(e);t?.focus({preventScroll:!0})})},focusInputElement({scope:e}){de(()=>{const t=ka(e),n=t.findLastIndex(r=>r.value!==""),o=Math.max(n,0),i=t[o];i?.focus({preventScroll:!0}),i?.setSelectionRange(i.value.length,i.value.length)})},syncMonthSelectElement({scope:e,context:t}){const n=wR(e);Rn(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){const n=xR(e);Rn(n,t.get("startValue").year.toString())},setInputValue({context:e,event:t}){e.get("activeIndex")===t.index&&e.set("inputValue",t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{const o=ka(e),i=n.index??t.get("activeIndex");Rn(o[i],t.get("inputValue"))})},focusParsedDate(e){const{event:t,prop:n}=e;if(t.index==null)return;const o=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});!o||!ov(o)||He(e,o)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let o=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});if((!o||!ov(o))&&t.value&&(o=e.get("focusedValue").copy()),!o)return;o=An(o,n("min"),n("max"));const i=Array.from(e.get("value"));i[t.index]=o,e.set("value",i);const r=Il(i,n);e.set("inputValue",r[t.index])},resetView({context:e}){e.set("view",e.initial("view"))},setStartValue({context:e,computed:t,prop:n}){const o=e.get("focusedValue");if(!Zn(o,e.get("startValue"),t("endValue")))return;const i=Km(o,"start",{months:n("numOfMonths")},n("locale"));e.set("startValue",i)},invokeOnOpen({prop:e}){var t;e("inline")||(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;e("inline")||(t=e("onOpenChange"))==null||t({open:!1})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}},kc=(e,t)=>{const{context:n,prop:o}=e,i=n.get("view");let r=typeof t=="number"?n.get("focusedValue").set({[i]:t}):t;return VR(a=>{PR(a,o("minView"))&&(r=r.set({[a]:a==="day"?1:0}))}),r};function He(e,t){const{context:n,prop:o,computed:i}=e;if(!t)return;const r=kc(e,t);if(Jt(n.get("focusedValue"),r))return;const a=nl(i("visibleDuration"),o("locale"),o("min"),o("max"))({focusedDate:r,startDate:n.get("startValue")});n.set("startValue",a.startDate),n.set("focusedValue",a.focusedDate)}function Pl(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");Jt(o,t.focusedDate)||n.set("focusedValue",t.focusedDate)}ie()(["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"]);ie()(["index","fixOnBlur"]);ie()(["value"]);ie()(["columns","id","view"]);ie()(["disabled","value","columns"]);ie()(["view"]);const[zw,qe]=Re("DatePickerContext"),FR=O({__name:"date-picker-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),BR=O({__name:"date-picker-content",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=cf(),o=I(()=>qs(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,r)=>g(n).unmounted?oe("",!0):(w(),E(g(X).div,U({key:0},o.value,{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),zR=O({__name:"date-picker-context",setup(e){const t=qe();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),HR=O({__name:"date-picker-control",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),jR=O({__name:"date-picker-input",props:{index:{},fixOnBlur:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return Y(),(o,i)=>(w(),E(g(X).input,U(g(n).getInputProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),WR=O({__name:"date-picker-label",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),E(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),UR=["value"],GR=O({__name:"date-picker-month-select",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),E(g(X).select,U(g(t).getMonthSelectProps(),{"as-child":e.asChild}),{default:C(()=>[(w(!0),M(Se,null,Ie(g(t).getMonths(),i=>(w(),M("option",{key:i.value,value:i.value},se(i.label),9,UR))),128))]),_:1},16,["as-child"]))}}),[qR,or]=Re("DatePickerViewPropsContext"),YR=O({__name:"date-picker-next-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=or();return Y(),(o,i)=>(w(),E(g(X).button,U(g(t).getNextTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),KR=O({__name:"date-picker-positioner",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ks(),o=sf(I(()=>({...n.value,present:t.value.open})));return lf(o),Y(),(i,r)=>g(o).unmounted?oe("",!0):(w(),E(g(X).div,U({key:0},g(t).getPositionerProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),XR=O({__name:"date-picker-preset-trigger",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return Y(),(o,i)=>(w(),E(g(X).button,U(g(n).getPresetTriggerProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),ZR=O({__name:"date-picker-prev-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=or();return Y(),(o,i)=>(w(),E(g(X).button,U(g(t).getPrevTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),JR=O({__name:"date-picker-range-text",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=I(()=>{const{start:o,end:i}=t.value.visibleRangeText;return Dn([o,i]).filter(Boolean).join(" - ")});return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getRangeTextProps(),{"as-child":e.asChild}),{default:C(()=>[Ne(se(n.value),1)]),_:1},16,["as-child"]))}}),QR=O({__name:"date-picker-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return zw(n),ro(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),eD=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,locale:i.value.locale,value:s.modelValue,getRootNode:o?.value.getRootNode,...Bn(s),onFocusChange:l=>{var c;t?.("focusChange",l),t?.("update:focusedValue",l.focusedValue),(c=s.onFocusChange)==null||c.call(s,l)},onViewChange:l=>{var c;t?.("viewChange",l),t?.("update:view",l.view),(c=s.onViewChange)==null||c.call(s,l)},onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)},onValueChange:l=>{var c;t?.("valueChange",l),t?.("update:modelValue",l.value),(c=s.onValueChange)==null||c.call(s,l)}}}),a=Gt(LR,r);return I(()=>MR(a,an))},tD=O({__name:"date-picker-root",props:_n({closeOnSelect:{type:Boolean},defaultFocusedValue:{},defaultOpen:{type:Boolean},defaultValue:{},defaultView:{},disabled:{type:Boolean},fixedWeeks:{type:Boolean},focusedValue:{},format:{type:Function},id:{},ids:{},isDateUnavailable:{type:Function},locale:{},max:{},maxView:{},min:{},minView:{},modelValue:{},name:{},numOfMonths:{},open:{type:Boolean},outsideDaySelectable:{type:Boolean},parse:{type:Function},placeholder:{},positioning:{},readOnly:{type:Boolean},selectionMode:{},startOfWeek:{},timeZone:{},translations:{},view:{},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,defaultOpen:void 0,disabled:void 0,fixedWeeks:void 0,open:void 0,readOnly:void 0,outsideDaySelectable:void 0,inline:void 0}),emits:["focusChange","openChange","valueChange","viewChange","update:modelValue","update:open","update:view","update:focusedValue"],setup(e,{emit:t}){const n=e,o=eD(n,t);return zw(o),ro(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,r)=>(w(),E(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),[nD,Ju]=Re("DatePickerTablePropsContext"),oD=O({__name:"date-picker-table-body",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ju();return Y(),(o,i)=>(w(),E(g(X).tbody,U(g(t).getTableBodyProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[iD,rD]=Re("DatePickerTableCellPropsContext"),aD=O({__name:"date-picker-table-cell-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=rD(),o=or(),i=I(()=>{const r={day:t.value.getDayTableCellTriggerProps,month:t.value.getMonthTableCellTriggerProps,year:t.value.getYearTableCellTriggerProps}[o.view];return r(n)});return Y(),(r,a)=>(w(),E(g(X).div,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),sD=O({__name:"date-picker-table-cell",props:{value:{},disabled:{type:Boolean},columns:{},visibleRange:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe(),o=or();iD(t);const i=I(()=>({day:n.value.getDayTableCellProps,month:n.value.getMonthTableCellProps,year:n.value.getYearTableCellProps})[o.view??"day"](t));return Y(),(r,a)=>(w(),E(g(X).td,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),lD=O({__name:"date-picker-table-head",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ju();return Y(),(o,i)=>(w(),E(g(X).thead,U(g(t).getTableHeadProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),cD=O({__name:"date-picker-table-header",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ju();return Y(),(o,i)=>(w(),E(g(X).th,U(g(t).getTableHeaderProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),uD=O({__name:"date-picker-table-row",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ju();return Y(),(o,i)=>(w(),E(g(X).tr,U(g(t).getTableRowProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),dD=O({__name:"date-picker-table",props:{view:{},columns:{},id:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe(),o=or(),i=Ut(),r=t.id??i;return nD({...t,id:r,...o}),Y(),(a,s)=>(w(),E(g(X).table,U(g(n).getTableProps(t),{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),hD=O({__name:"date-picker-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),pD=O({__name:"date-picker-view-control",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=or();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getViewControlProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),fD=O({__name:"date-picker-view-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=or();return Y(),(o,i)=>(w(),E(g(X).button,U(g(t).getViewTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),Hw=Aw.extendWith("view"),gD=O({__name:"date-picker-view",props:{view:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return qR(t),Y(),(o,i)=>(w(),E(g(X).div,U(g(Hw).build().view.attrs,{hidden:g(n).view!==e.view,"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),mD=["value"],vD=O({__name:"date-picker-year-select",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),E(g(X).select,U(g(t).getYearSelectProps(),{"as-child":e.asChild}),{default:C(()=>[(w(!0),M(Se,null,Ie(g(t).getYears(),i=>(w(),M("option",{key:i.value,value:i.value},se(i.label),9,mD))),128))]),_:1},16,["as-child"]))}}),we=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:FR,Content:BR,Context:zR,Control:HR,Input:jR,Label:WR,MonthSelect:GR,NextTrigger:YR,Positioner:KR,PresetTrigger:XR,PrevTrigger:ZR,RangeText:JR,Root:tD,RootProvider:QR,Table:dD,TableBody:oD,TableCell:sD,TableCellTrigger:aD,TableHead:lD,TableHeader:cD,TableRow:uD,Trigger:hD,View:gD,ViewControl:pD,ViewTrigger:fD,YearSelect:vD},Symbol.toStringTag,{value:"Module"}));var jw=be("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger");jw.build();ie()(["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 bD=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,Ww=e=>e.isDirectory,Gh=e=>e.isFile,qh=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),yD=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=bD(n);if(!o)return null;if(Ww(o)&&t)return Uw(o.createReader(),`${o.name}`);if(Gh(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?qh(i,""):null)}if(Gh(o))return new Promise(i=>{o.file(r=>{i(qh(r,""))})})}).filter(n=>n)),Uw=(e,t="")=>new Promise(n=>{const o=[],i=()=>{e.readEntries(r=>{if(r.length===0){n(Promise.all(o).then(s=>s.flat()));return}const a=r.map(s=>{if(!s)return null;if(Ww(s))return Uw(s.createReader(),`${t}${s.name}`);if(Gh(s))return new Promise(l=>{s.file(c=>{l(qh(c,t))})})}).filter(s=>s);o.push(Promise.all(a)),i()})};i()});function xD(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function wD(e){return/^.*\.[\w]+$/.test(e)}var iv=e=>xD(e)||wD(e);function _D(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(iv).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(iv).join(",")}var Al=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,Sa=e=>e!=null;function CD(e,t,n){if(Sa(e.size))if(Sa(t)&&Sa(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(Sa(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(Sa(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var kD="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",SD=new Map(kD.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function $D(e){const t=e.split(".").pop();return t&&SD.get(t)||null}function ED(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||$D(o)||"").toLowerCase(),r=i.replace(/\/.*$/,"");return n.some(a=>{const s=a.trim().toLowerCase();return s.charAt(0)==="."?o.toLowerCase().endsWith(s):s.endsWith("/*")?r===s.replace(/\/.*$/,""):i===s})}return!0}function TD(e,t){const n=e.type==="application/x-moz-file"||ED(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var OD=be("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");OD.build();ie()(["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 ID=be("fieldset").parts("root","errorText","helperText","legend");ID.build();const[Gw,cn]=Re("FileUploadContext"),PD=O({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),AD=O({__name:"file-upload-context",setup(e){const t=cn();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),RD=O({__name:"file-upload-dropzone",props:_n({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=cn();return Y(),(o,i)=>(w(),E(g(X).div,U(g(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),DD=O({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=ao();return Y(),(o,i)=>{var r;return w(),E(g(X).input,U({"aria-describedby":(r=g(n))==null?void 0:r.ariaDescribedby},g(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[VD,ol]=Re("FileUploadItemPropsContext"),MD=O({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=ol();return Y(),(o,i)=>(w(),E(g(X).button,U(g(t).getItemDeleteTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[ND,LD]=Re("FileUploadItemGroupPropsContext"),FD=O({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=I(()=>Go(t,["type"])),o=cn();return ND(n),Y(),(i,r)=>(w(),E(g(X).ul,U(g(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),BD=O({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=ol(),o=Hs();return Y(),(i,r)=>(w(),E(g(X).div,U(g(t).getItemNameProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default",{},()=>{var a;return[Ne(se(((a=o.default)==null?void 0:a.call(o))||g(n).file.name),1)]})]),_:3},16,["as-child"]))}}),zD=O({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=ol(),o=fe("");return y0(i=>{const r=t.value.createFileUrl(n.value.file,a=>o.value=a);i(r)}),Y(),(i,r)=>o.value?(w(),E(g(X).img,ft(U({key:0},g(t).getItemPreviewImageProps({...g(n),url:o.value}))),null,16)):oe("",!0)}}),HD=O({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=cn(),n=ol();return Y(),(o,i)=>g(n).file.type.match(e.type??".*")?(w(),E(g(X).div,U({key:0},g(t).getItemPreviewProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"])):oe("",!0)}}),jD=O({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=ol(),o=Hs();return Y(),(i,r)=>(w(),E(g(X).div,U(g(t).getItemSizeTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default",{},()=>{var a;return[Ne(se(((a=o.default)==null?void 0:a.call(o))||g(t).getFileSize(g(n).file)),1)]})]),_:3},16,["as-child"]))}}),WD=O({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=cn(),o=LD(),i=I(()=>({...t,type:o.value.type}));return VD(i),Y(),(r,a)=>(w(),E(g(X).li,U(g(n).getItemProps(i.value),{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),UD=O({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),E(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),GD=O({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Gw(n),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});function qD(e){const t=new Map;return function(n,o){const i=n+(o?Object.entries(o).sort((a,s)=>a[0]<s[0]?-1:1).join():"");if(t.has(i))return t.get(i);let r=new e(n,o);return t.set(i,r),r}}var YD=qD(Intl.NumberFormat);function KD(e,t,n={}){return YD(t,n).format(e)}var XD=["","kilo","mega","giga","tera"],ZD=["","kilo","mega","giga","tera","peta"],JD=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(e===0)return"0 B";const{unitSystem:o="decimal",precision:i=3,unit:r="byte",unitDisplay:a="short"}=n,s=o==="binary"?1024:1e3,l=r==="bit"?XD:ZD,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const h=parseFloat(u.toPrecision(i)),p=c?-h:h;return KD(p,t,{style:"unit",unit:l[d]+r,unitDisplay:a})},qw=be("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),hn=qw.build(),Yw=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},Kw=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},Yh=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},QD=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},e2=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},t2=(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}`},n2=(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}`},o2=(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}`},i2=(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}`},r2=e=>e.getById(Yw(e)),rv=e=>e.getById(Yh(e)),a2=e=>e.getById(Kw(e));function av(e){const t=je(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function s2(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 sv(e,t,n=[],o=[]){const{prop:i,computed:r}=e,a=[],s=[],l={acceptedFiles:n,rejectedFiles:o};return t.forEach(c=>{var u;const[d,h]=TD(c,r("acceptAttr")),[p,m]=CD(c,i("minFileSize"),i("maxFileSize")),f=(u=i("validate"))==null?void 0:u(c,l),b=f?f.length===0:!0;if(d&&p&&b)a.push(c);else{const v=[h,m];b||v.push(...f??[]),s.push({file:c,errors:v.filter(Boolean)})}}),s2(e,a.length,n)||(a.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),a.splice(0)),{acceptedFiles:a,rejectedFiles:s}}function l2(e,t){const n=Ke(e);try{if("DataTransfer"in n){const o=new n.DataTransfer;t.forEach(i=>{o.items.add(i)}),e.files=o.files}}catch{}}var Fo="accepted";function c2(e,t){const{state:n,send:o,prop:i,computed:r,scope:a,context:s}=e,l=!!i("disabled"),c=!!i("required"),u=i("allowDrop"),d=i("translations"),h=n.matches("dragging"),p=n.matches("focused")&&!l;return{dragging:h,focused:p,disabled:!!l,transforming:s.get("transforming"),openFilePicker(){l||o({type:"OPEN"})},deleteFile(m,f=Fo){o({type:"FILE.DELETE",file:m,itemType:f})},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 JD(m.size,i("locale"))},createFileUrl(m,f){const b=a.getWin(),v=b.URL.createObjectURL(m);return f(v),()=>b.URL.revokeObjectURL(v)},setClipboardFiles(m){if(l)return!1;const f=Array.from(m?.items??[]).reduce((b,v)=>{if(v.kind!=="file")return b;const y=v.getAsFile();return y?[...b,y]:b},[]);return f.length?(o({type:"FILES.SET",files:f}),!0):!1},getRootProps(){return t.element({...hn.root.attrs,dir:i("dir"),id:Yw(a),"data-disabled":D(l),"data-dragging":D(h)})},getDropzoneProps(m={}){return t.element({...hn.dropzone.attrs,dir:i("dir"),id:Kw(a),tabIndex:l||m.disableClick?void 0:0,role:m.disableClick?"application":"button","aria-label":d.dropzone,"aria-disabled":l,"data-invalid":D(i("invalid")),"data-disabled":D(l),"data-dragging":D(h),onKeyDown(f){l||f.defaultPrevented||f.currentTarget===je(f)&&(m.disableClick||f.key!=="Enter"&&f.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(f){l||f.defaultPrevented||m.disableClick||f.currentTarget===je(f)&&(f.currentTarget.localName==="label"&&f.preventDefault(),o({type:"DROPZONE.CLICK"}))},onDragOver(f){if(l||!u)return;f.preventDefault(),f.stopPropagation();try{f.dataTransfer.dropEffect="copy"}catch{}if(!av(f))return;const b=f.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:b})},onDragLeave(f){l||u&&(Rt(f.currentTarget,f.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(f){if(l)return;u&&(f.preventDefault(),f.stopPropagation());const b=av(f);l||!b||yD(f.dataTransfer.items,i("directory")).then(v=>{o({type:"DROPZONE.DROP",files:ix(v)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...hn.trigger.attrs,dir:i("dir"),id:QD(a),disabled:l,"data-disabled":D(l),"data-invalid":D(i("invalid")),type:"button",onClick(m){l||(Rt(a2(a),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:Yh(a),tabIndex:-1,disabled:l,type:"file",required:i("required"),capture:i("capture"),name:i("name"),accept:r("acceptAttr"),webkitdirectory:i("directory")?"":void 0,multiple:r("multiple")||i("maxFiles")>1,onClick(m){m.stopPropagation(),m.currentTarget.value=""},onInput(m){if(l)return;const{files:f}=m.currentTarget;o({type:"FILE.SELECT",files:f?Array.from(f):[]})},style:Mu})},getItemGroupProps(m={}){const{type:f=Fo}=m;return t.element({...hn.itemGroup.attrs,dir:i("dir"),"data-disabled":D(l),"data-type":f})},getItemProps(m){const{file:f,type:b=Fo}=m;return t.element({...hn.item.attrs,dir:i("dir"),id:t2(a,f.name),"data-disabled":D(l),"data-type":b})},getItemNameProps(m){const{file:f,type:b=Fo}=m;return t.element({...hn.itemName.attrs,dir:i("dir"),id:n2(a,f.name),"data-disabled":D(l),"data-type":b})},getItemSizeTextProps(m){const{file:f,type:b=Fo}=m;return t.element({...hn.itemSizeText.attrs,dir:i("dir"),id:o2(a,f.name),"data-disabled":D(l),"data-type":b})},getItemPreviewProps(m){const{file:f,type:b=Fo}=m;return t.element({...hn.itemPreview.attrs,dir:i("dir"),id:i2(a,f.name),"data-disabled":D(l),"data-type":b})},getItemPreviewImageProps(m){var f;const{file:b,url:v,type:y=Fo}=m;if(!b.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...hn.itemPreviewImage.attrs,alt:(f=d.itemPreview)==null?void 0:f.call(d,b),src:v,"data-disabled":D(l),"data-type":y})},getItemDeleteTriggerProps(m){var f;const{file:b,type:v=Fo}=m;return t.button({...hn.itemDeleteTrigger.attrs,dir:i("dir"),type:"button",disabled:l,"data-disabled":D(l),"data-type":v,"aria-label":(f=d.deleteFile)==null?void 0:f.call(d,b),onClick(){l||o({type:"FILE.DELETE",file:b,itemType:v})}})},getLabelProps(){return t.label({...hn.label.attrs,dir:i("dir"),id:e2(a),htmlFor:Yh(a),"data-disabled":D(l),"data-required":D(c)})},getClearTriggerProps(){return t.button({...hn.clearTrigger.attrs,dir:i("dir"),type:"button",disabled:l,hidden:s.get("acceptedFiles").length===0,"data-disabled":D(l),onClick(m){m.defaultPrevented||l||o({type:"FILES.CLEAR"})}})}}}var u2={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((r,a)=>Al(r,i[a])),hash(o){return o.map(i=>`${i.name}-${i.size}`).join(",")},onChange(o){var i,r;const a=n();(i=e("onFileAccept"))==null||i({files:o}),(r=e("onFileChange"))==null||r({acceptedFiles:o,rejectedFiles:a.get("rejectedFiles")})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(o,i)=>o.length===i?.length&&o.every((r,a)=>Al(r.file,i[a].file)),onChange(o){var i,r;const a=n();(i=e("onFileReject"))==null||i({files:o}),(r=e("onFileChange"))==null||r({acceptedFiles:a.get("acceptedFiles"),rejectedFiles:o})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>_D(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=r=>{r?.preventDefault()},i=r=>{Rt(r2(t),je(r))||r.preventDefault()};return Ts(Ee(n,"dragover",o,!1),Ee(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=rv(e);if(!n)return;l2(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){de(()=>{var t;(t=rv(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:r}=sv(e,o.files);n.set("acceptedFiles",t("multiple")?i:i.length>0?[i[0]]:[]),n.set("rejectedFiles",r)},setEventFiles(e){const{computed:t,context:n,event:o,prop:i}=e,r=n.get("acceptedFiles"),a=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=sv(e,o.files,r,a),c=d=>{if(t("multiple")){n.set("acceptedFiles",h=>[...h,...d]),n.set("rejectedFiles",l);return}if(d.length){n.set("acceptedFiles",[d[0]]),n.set("rejectedFiles",l);return}l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))},u=i("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch(d=>{Ao(`[zag-js/file-upload] error transforming files
|
|
2
|
-
${d}`)}).finally(()=>{n.set("transforming",!1)})):c(s)},removeFile({context:e,event:t}){if(t.itemType==="rejected"){const n=e.get("rejectedFiles").filter(o=>!Al(o.file,t.file));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter(o=>!Al(o,t.file));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}};ie()(["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"]);ie()(["file","type"]);const d2=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=ao(),a=I(()=>{const l=Ye(e);return{id:n,ids:{label:r?.value.ids.label,hiddenInput:r?.value.ids.control},dir:i.value.dir,disabled:r?.value.disabled,invalid:r?.value.invalid,locale:i.value.locale,required:r?.value.required,getRootNode:o?.value.getRootNode,...Bn(l),onFileChange:c=>{var u;t?.("update:acceptedFiles",c.acceptedFiles),t?.("fileChange",c),(u=l.onFileChange)==null||u.call(l,c)},onFileAccept:c=>{var u;t?.("fileAccept",c),(u=l.onFileAccept)==null||u.call(l,c)},onFileReject:c=>{var u;t?.("fileReject",c),(u=l.onFileReject)==null||u.call(l,c)}}}),s=Gt(u2,a);return I(()=>c2(s,an))},h2=O({__name:"file-upload-root",props:_n({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=d2(e,t);return Gw(n),Y(),(o,i)=>(w(),E(g(X).div,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),p2=O({__name:"file-upload-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),pn=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:PD,Context:AD,Dropzone:RD,HiddenInput:DD,Item:WD,ItemDeleteTrigger:MD,ItemGroup:FD,ItemName:BD,ItemPreview:HD,ItemPreviewImage:zD,ItemSizeText:jD,Label:UD,Root:h2,RootProvider:GD,Trigger:p2},Symbol.toStringTag,{value:"Module"})),f2=Symbol(),lv=Object.getPrototypeOf,Kh=new WeakMap,g2=e=>e&&(Kh.has(e)?Kh.get(e):lv(e)===Object.prototype||lv(e)===Array.prototype),m2=e=>g2(e)&&e[f2]||null,cv=(e,t=!0)=>{Kh.set(e,t)};function v2(){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 Xw(e,t){const n=v2();return n?(n[e]||(n[e]=t()),n[e]):t()}var Sc=Xw("__zag__refSet",()=>new WeakSet),b2=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,y2=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,x2=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",w2=e=>b2(e)||y2(e)||x2(e),Xh=e=>e!==null&&typeof e=="object",uv=e=>Xh(e)&&!Sc.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!w2(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),Ti=Xw("__zag__proxyStateMap",()=>new WeakMap),_2=(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 u=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s));return cv(u,!0),n.set(s,[l,u]),Reflect.ownKeys(s).forEach(d=>{const h=Reflect.get(s,d);Sc.has(h)?(cv(h,!1),u[d]=h):Ti.has(h)?u[d]=S2(h):u[d]=h}),Object.freeze(u)},i=new WeakMap,r=[1,1],a=s=>{if(!Xh(s))throw new Error("object required");const l=i.get(s);if(l)return l;let c=r[0];const u=new Set,d=($,A=++r[0])=>{c!==A&&(c=A,u.forEach(S=>S($,A)))};let h=r[1];const p=($=++r[1])=>(h!==$&&!u.size&&(h=$,f.forEach(([A])=>{const S=A[1]($);S>c&&(c=S)})),c),m=$=>(A,S)=>{const R=[...A];R[1]=[$,...R[1]],d(R,S)},f=new Map,b=($,A)=>{if(u.size){const S=A[3](m($));f.set($,[A,S])}else f.set($,[A])},v=$=>{var A;const S=f.get($);S&&(f.delete($),(A=S[1])==null||A.call(S))},y=$=>(u.add($),u.size===1&&f.forEach(([A,S],R)=>{const F=A[3](m(R));f.set(R,[A,F])}),()=>{u.delete($),u.size===0&&f.forEach(([A,S],R)=>{S&&(S(),f.set(R,[A]))})}),x=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),_=t(x,{deleteProperty($,A){const S=Reflect.get($,A);v(A);const R=Reflect.deleteProperty($,A);return R&&d(["delete",[A],S]),R},set($,A,S,R){var F;const P=Reflect.has($,A),G=Reflect.get($,A,R);if(P&&(e(G,S)||i.has(S)&&e(G,i.get(S))))return!0;v(A),Xh(S)&&(S=m2(S)||S);let ee=S;if(!((F=Object.getOwnPropertyDescriptor($,A))!=null&&F.set)){!Ti.has(S)&&uv(S)&&(ee=Zw(S));const z=!Sc.has(ee)&&Ti.get(ee);z&&b(A,z)}return Reflect.set($,A,ee,R),d(["set",[A],S,G]),!0}});i.set(s,_);const k=[x,p,o,y];return Ti.set(_,k),Reflect.ownKeys(s).forEach($=>{const A=Object.getOwnPropertyDescriptor(s,$);A.get||A.set?Object.defineProperty(x,$,A):_[$]=s[$]}),_})=>[a,Ti,Sc,e,t,uv,n,o,i,r],[C2]=_2();function Zw(e={}){return C2(e)}function k2(e,t,n){const o=Ti.get(e);let i;const r=[],a=o[3];let s=!1;const l=a(c=>{r.push(c),i||(i=Promise.resolve().then(()=>{i=void 0,s&&t(r.splice(0))}))});return s=!0,()=>{s=!1,l()}}function S2(e){const t=Ti.get(e),[n,o,i]=t;return i(n,o())}var $2=be("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control");$2.build();var E2=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`float:${e.id}:trigger`},T2=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`float:${e.id}:positioner`},O2=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`float:${e.id}:content`},I2=e=>{var t;return((t=e.ids)==null?void 0:t.header)??`float:${e.id}:header`},dv=e=>e.getById(E2(e)),hv=e=>e.getById(T2(e)),pv=e=>e.getById(O2(e)),P2=e=>e.getById(I2(e)),Bo=(e,t,n)=>{let o;return et(t)?o=kx(t):o=yT(e.getWin()),n&&(o=Js({x:-o.width,y:o.minY,width:o.width*3,height:o.height*2})),Go(o,["x","y","width","height"])},$a=Zw({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:fv,and:A2}=Ct(),R2={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"};fv("isMaximized"),fv("isMinimized"),A2("isOpenControlled","closeOnEsc");ie()(["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"]);ie()(["axis"]);var D2=be("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");D2.build();var V2=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`hover-card:${e.id}:trigger`},M2=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`hover-card:${e.id}:content`},N2=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`hover-card:${e.id}:popper`},Nd=e=>e.getById(V2(e)),L2=e=>e.getById(M2(e)),gv=e=>e.getById(N2(e)),{not:Rl,and:mv}=Ct();mv("isOpenControlled",Rl("isPointer")),Rl("isPointer"),mv("isOpenControlled",Rl("isPointer")),Rl("isPointer");ie()(["closeDelay","dir","getRootNode","id","ids","disabled","onOpenChange","defaultOpen","open","openDelay","positioning","onInteractOutside","onPointerDownOutside","onFocusOutside"]);var F2={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(F2).map(([e,t])=>[t,e]));const[Jw,kt]=Re("TreeViewContext"),[B2,Sn]=Re("TreeViewNodePropsContext"),z2=O({__name:"tree-view-branch-content",props:{asChild:{type:Boolean}},setup(e){const t=vx(),n=kt(),o=Sn(),i=I(()=>{const r=n.value.getBranchContentProps(o),[,a]=t(r,["hidden","data-state"]);return a});return Y(),(r,a)=>(w(),E(g(zu).Content,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),H2=O({__name:"tree-view-branch-control",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getBranchControlProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),j2=O({__name:"tree-view-branch-indent-guide",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getBranchIndentGuideProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),W2=O({__name:"tree-view-branch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getBranchIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),U2=O({__name:"tree-view-branch-text",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).span,U(g(t).getBranchTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),G2=O({__name:"tree-view-branch-trigger",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getBranchTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[q2,Nf]=Re("TreeViewNodeContext"),Y2=O({__name:"tree-view-branch",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn(),o=Nf(),i=Ks(),r=I(()=>t.value.getBranchContentProps(n));return Y(),(a,s)=>(w(),E(g(zu).Root,U({open:g(o).expanded,ids:{content:r.value.id}},g(t).getBranchProps(g(n)),{"lazy-mount":g(i).lazyMount,"unmount-on-exit":g(i).unmountOnExit,"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["open","ids","lazy-mount","unmount-on-exit","as-child"]))}}),K2=O({__name:"tree-view-context",setup(e){const t=kt();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),X2=O({__name:"tree-view-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getItemIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),Z2=O({__name:"tree-view-item-text",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).span,U(g(t).getItemTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),J2=O({__name:"tree-view-item",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getItemProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),Q2=O({__name:"tree-view-label",props:{asChild:{type:Boolean}},setup(e){const t=kt();return Y(),(n,o)=>(w(),E(g(X).h3,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),eV=O({__name:"tree-view-node-checkbox",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).span,U(g(t).getNodeCheckboxProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),tV=O({__name:"tree-view-node-checkbox-indicator",props:{indeterminate:{},fallback:{}},setup(e){const t=Nf();return(n,o)=>g(t).checked==="indeterminate"?V(n.$slots,"indeterminate",{key:0}):g(t).checked===!0?V(n.$slots,"default",{key:1}):V(n.$slots,"fallback",{key:2})}}),nV=O({__name:"tree-view-node-rename-input",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),E(g(X).input,U(g(t).getNodeRenameInputProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),oV=O({__name:"tree-view-node-context",setup(e){const t=Nf();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),Qw=O({__name:"tree-view-node-provider",props:{node:{},indexPath:{}},setup(e){const t=e,n=kt(),o=I(()=>n.value.getNodeState(t));return q2(o),B2(t),Y(),(i,r)=>V(i.$slots,"default")}}),iV=O({__name:"tree-view-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Jw(n),ro(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var e1=be("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),Tt=e1.build(),t1=e=>new pf(e);t1.empty=()=>new pf({rootNode:{children:[]}});var rV=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tree:${e.id}:root`},vv=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`tree:${e.id}:label`},n1=(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}`},Ld=e=>{var t;return((t=e.ids)==null?void 0:t.tree)??`tree:${e.id}:tree`},Pn=(e,t)=>{var n;t!=null&&((n=e.getById(n1(e,t)))==null||n.focus())},o1=(e,t)=>`tree:${e.id}:rename-input:${t}`,bv=(e,t)=>e.getById(o1(e,t));function i1(e,t,n){const o=e.getNodeValue(t);if(!e.isBranchNode(t))return n.includes(o);const i=e.getDescendantValues(o),r=i.every(s=>n.includes(s)),a=i.some(s=>n.includes(s));return r?!0:a?"indeterminate":!1}function aV(e,t,n){const o=e.getDescendantValues(t),i=o.every(r=>n.includes(r));return Dn(i?Li(n,...o):_o(n,...o))}function sV(e,t){const n=new Map;return e.visit({onEnter:o=>{const i=e.getNodeValue(o),r=e.isBranchNode(o),a=i1(e,o,t);n.set(i,{type:r?"branch":"leaf",checked:a})}}),n}function lV(e,t){const{context:n,scope:o,computed:i,prop:r,send:a}=e,s=r("collection"),l=Array.from(n.get("expandedValue")),c=Array.from(n.get("selectedValue")),u=Array.from(n.get("checkedValue")),d=i("isTypingAhead"),h=n.get("focusedValue"),p=n.get("loadingStatus"),m=n.get("renamingValue");function f(b){const{node:v,indexPath:y}=b,x=s.getNodeValue(v),_=s.getFirstNode(),k=_?s.getNodeValue(_):null;return{id:n1(o,x),value:x,indexPath:y,valuePath:s.getValuePath(y),disabled:!!v.disabled,focused:h==null?k==x:h===x,selected:c.includes(x),expanded:l.includes(x),loading:p[x]==="loading",depth:y.length,isBranch:s.isBranchNode(v),renaming:m===x,get checked(){return i1(s,v,u)}}}return{collection:s,expandedValue:l,selectedValue:c,checkedValue:u,toggleChecked(b,v){a({type:"CHECKED.TOGGLE",value:b,isBranch:v})},setChecked(b){a({type:"CHECKED.SET",value:b})},clearChecked(){a({type:"CHECKED.CLEAR"})},getCheckedMap(){return sV(s,u)},expand(b){a({type:b?"BRANCH.EXPAND":"EXPANDED.ALL",value:b})},collapse(b){a({type:b?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:b})},deselect(b){a({type:b?"NODE.DESELECT":"SELECTED.CLEAR",value:b})},select(b){a({type:b?"NODE.SELECT":"SELECTED.ALL",value:b,isTrusted:!1})},getVisibleNodes(){return i("visibleNodes").map(({node:b})=>b)},focus(b){Pn(o,b)},selectParent(b){const v=s.getParentNode(b);if(!v)return;const y=_o(c,s.getNodeValue(v));a({type:"SELECTED.SET",value:y,src:"select.parent"})},expandParent(b){const v=s.getParentNode(b);if(!v)return;const y=_o(l,s.getNodeValue(v));a({type:"EXPANDED.SET",value:y,src:"expand.parent"})},setExpandedValue(b){const v=Dn(b);a({type:"EXPANDED.SET",value:v})},setSelectedValue(b){const v=Dn(b);a({type:"SELECTED.SET",value:v})},startRenaming(b){a({type:"NODE.RENAME",value:b})},submitRenaming(b,v){a({type:"RENAME.SUBMIT",value:b,label:v})},cancelRenaming(){a({type:"RENAME.CANCEL"})},getRootProps(){return t.element({...Tt.root.attrs,id:rV(o),dir:r("dir")})},getLabelProps(){return t.element({...Tt.label.attrs,id:vv(o),dir:r("dir")})},getTreeProps(){return t.element({...Tt.tree.attrs,id:Ld(o),dir:r("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":vv(o),"aria-multiselectable":r("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(b){if(b.defaultPrevented||Ss(b))return;const v=je(b);if(Ou(v))return;const y=v?.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 _=y.matches("[data-part=branch-control]"),k={ArrowDown(S){Yn(S)||(S.preventDefault(),a({type:"NODE.ARROW_DOWN",id:x,shiftKey:S.shiftKey}))},ArrowUp(S){Yn(S)||(S.preventDefault(),a({type:"NODE.ARROW_UP",id:x,shiftKey:S.shiftKey}))},ArrowLeft(S){Yn(S)||y.dataset.disabled||(S.preventDefault(),a({type:_?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:x}))},ArrowRight(S){!_||y.dataset.disabled||(S.preventDefault(),a({type:"BRANCH_NODE.ARROW_RIGHT",id:x}))},Home(S){Yn(S)||(S.preventDefault(),a({type:"NODE.HOME",id:x,shiftKey:S.shiftKey}))},End(S){Yn(S)||(S.preventDefault(),a({type:"NODE.END",id:x,shiftKey:S.shiftKey}))},Space(S){var R;y.dataset.disabled||(d?a({type:"TREE.TYPEAHEAD",key:S.key}):(R=k.Enter)==null||R.call(k,S))},Enter(S){y.dataset.disabled||wr(v)&&Yn(S)||(a({type:_?"BRANCH_NODE.CLICK":"NODE.CLICK",id:x,src:"keyboard"}),wr(v)||S.preventDefault())},"*"(S){y.dataset.disabled||(S.preventDefault(),a({type:"SIBLINGS.EXPAND",id:x}))},a(S){!S.metaKey||y.dataset.disabled||(S.preventDefault(),a({type:"SELECTED.ALL",moveFocus:!0}))},F2(S){if(y.dataset.disabled)return;const R=r("canRename");if(!R)return;const F=s.getIndexPath(x);if(F){const P=s.at(F);if(P&&!R(P,F))return}S.preventDefault(),a({type:"NODE.RENAME",value:x})}},$=$s(b,{dir:r("dir")}),A=k[$];if(A){A(b);return}Po.isValidEvent(b)&&(a({type:"TREE.TYPEAHEAD",key:b.key,id:x}),b.preventDefault())}})},getNodeState:f,getItemProps(b){const v=f(b);return t.element({...Tt.item.attrs,id:v.id,dir:r("dir"),"data-ownedby":Ld(o),"data-path":b.indexPath.join("/"),"data-value":v.value,tabIndex:v.focused?0:-1,"data-focus":D(v.focused),role:"treeitem","aria-current":v.selected?"true":void 0,"aria-selected":v.disabled?void 0:v.selected,"data-selected":D(v.selected),"aria-disabled":Je(v.disabled),"data-disabled":D(v.disabled),"data-renaming":D(v.renaming),"aria-level":v.depth,"data-depth":v.depth,style:{"--depth":v.depth},onFocus(y){y.stopPropagation(),a({type:"NODE.FOCUS",id:v.value})},onClick(y){if(v.disabled||!Ni(y)||wr(y.currentTarget)&&Yn(y))return;const x=y.metaKey||y.ctrlKey;a({type:"NODE.CLICK",id:v.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation(),wr(y.currentTarget)||y.preventDefault()}})},getItemTextProps(b){const v=f(b);return t.element({...Tt.itemText.attrs,"data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused)})},getItemIndicatorProps(b){const v=f(b);return t.element({...Tt.itemIndicator.attrs,"aria-hidden":!0,"data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused),hidden:!v.selected})},getBranchProps(b){const v=f(b);return t.element({...Tt.branch.attrs,"data-depth":v.depth,dir:r("dir"),"data-branch":v.value,role:"treeitem","data-ownedby":Ld(o),"data-value":v.value,"aria-level":v.depth,"aria-selected":v.disabled?void 0:v.selected,"data-path":b.indexPath.join("/"),"data-selected":D(v.selected),"aria-expanded":v.expanded,"data-state":v.expanded?"open":"closed","aria-disabled":Je(v.disabled),"data-disabled":D(v.disabled),"data-loading":D(v.loading),"aria-busy":Je(v.loading),style:{"--depth":v.depth}})},getBranchIndicatorProps(b){const v=f(b);return t.element({...Tt.branchIndicator.attrs,"aria-hidden":!0,"data-state":v.expanded?"open":"closed","data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused),"data-loading":D(v.loading)})},getBranchTriggerProps(b){const v=f(b);return t.element({...Tt.branchTrigger.attrs,role:"button",dir:r("dir"),"data-disabled":D(v.disabled),"data-state":v.expanded?"open":"closed","data-value":v.value,"data-loading":D(v.loading),disabled:v.loading,onClick(y){v.disabled||v.loading||(a({type:"BRANCH_TOGGLE.CLICK",id:v.value}),y.stopPropagation())}})},getBranchControlProps(b){const v=f(b);return t.element({...Tt.branchControl.attrs,role:"button",id:v.id,dir:r("dir"),tabIndex:v.focused?0:-1,"data-path":b.indexPath.join("/"),"data-state":v.expanded?"open":"closed","data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused),"data-renaming":D(v.renaming),"data-value":v.value,"data-depth":v.depth,"data-loading":D(v.loading),"aria-busy":Je(v.loading),onFocus(y){a({type:"NODE.FOCUS",id:v.value}),y.stopPropagation()},onClick(y){if(v.disabled||v.loading||!Ni(y)||wr(y.currentTarget)&&Yn(y))return;const x=y.metaKey||y.ctrlKey;a({type:"BRANCH_NODE.CLICK",id:v.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation()}})},getBranchTextProps(b){const v=f(b);return t.element({...Tt.branchText.attrs,dir:r("dir"),"data-disabled":D(v.disabled),"data-state":v.expanded?"open":"closed","data-loading":D(v.loading)})},getBranchContentProps(b){const v=f(b);return t.element({...Tt.branchContent.attrs,role:"group",dir:r("dir"),"data-state":v.expanded?"open":"closed","data-depth":v.depth,"data-path":b.indexPath.join("/"),"data-value":v.value,hidden:!v.expanded})},getBranchIndentGuideProps(b){const v=f(b);return t.element({...Tt.branchIndentGuide.attrs,"data-depth":v.depth})},getNodeCheckboxProps(b){const v=f(b),y=v.checked;return t.element({...Tt.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":D(v.disabled),onClick(x){if(x.defaultPrevented||v.disabled||!Ni(x))return;a({type:"CHECKED.TOGGLE",value:v.value,isBranch:v.isBranch}),x.stopPropagation();const _=x.currentTarget.closest("[role=treeitem]");_?.focus({preventScroll:!0})}})},getNodeRenameInputProps(b){const v=f(b);return t.input({...Tt.nodeRenameInput.attrs,id:o1(o,v.value),type:"text","aria-label":"Rename tree item",hidden:!v.renaming,onKeyDown(y){Ss(y)||(y.key==="Escape"&&(a({type:"RENAME.CANCEL"}),y.preventDefault()),y.key==="Enter"&&(a({type:"RENAME.SUBMIT",label:y.currentTarget.value}),y.preventDefault()),y.stopPropagation())},onBlur(y){a({type:"RENAME.SUBMIT",label:y.currentTarget.value})}})}}}function Dl(e,t){const{context:n,prop:o,refs:i}=e;if(!o("loadChildren")){n.set("expandedValue",f=>Dn(_o(f,...t)));return}const r=n.get("loadingStatus"),[a,s]=Ug(t,f=>r[f]==="loaded");if(a.length>0&&n.set("expandedValue",f=>Dn(_o(f,...a))),s.length===0)return;const l=o("collection"),[c,u]=Ug(s,f=>{const b=l.findNode(f);return l.getNodeChildren(b).length>0});if(c.length>0&&n.set("expandedValue",f=>Dn(_o(f,...c))),u.length===0)return;n.set("loadingStatus",f=>({...f,...u.reduce((b,v)=>({...b,[v]:"loading"}),{})}));const d=u.map(f=>{const b=l.getIndexPath(f),v=l.getValuePath(b),y=l.findNode(f);return{id:f,indexPath:b,valuePath:v,node:y}}),h=i.get("pendingAborts"),p=o("loadChildren");of(p,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");const m=d.map(({id:f,indexPath:b,valuePath:v,node:y})=>{const x=h.get(f);x&&(x.abort(),h.delete(f));const _=new AbortController;return h.set(f,_),p({valuePath:v,indexPath:b,node:y,signal:_.signal})});Promise.allSettled(m).then(f=>{var b,v;const y=[],x=[],_=n.get("loadingStatus");let k=o("collection");f.forEach(($,A)=>{const{id:S,indexPath:R,node:F,valuePath:P}=d[A];$.status==="fulfilled"?(_[S]="loaded",y.push(S),k=k.replace(R,{...F,children:$.value})):(h.delete(S),Reflect.deleteProperty(_,S),x.push({node:F,error:$.reason,indexPath:R,valuePath:P}))}),n.set("loadingStatus",_),y.length&&(n.set("expandedValue",$=>Dn(_o($,...y))),(b=o("onLoadChildrenComplete"))==null||b({collection:k})),x.length&&((v=o("onLoadChildrenError"))==null||v({nodes:x}))})}function zo(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:jn}=Ct(),cV={props({props:e}){return{selectionMode:"single",collection:t1.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:bt,onChange(o){var i;const r=n().get("focusedValue");(i=e("onExpandedChange"))==null||i({expandedValue:o,focusedValue:r,get expandedNodes(){return e("collection").findNodes(o)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:bt,onChange(o){var i;const r=n().get("focusedValue");(i=e("onSelectionChange"))==null||i({selectedValue:o,focusedValue:r,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:bt,onChange(o){var i;(i=e("onCheckedChange"))==null||i({checkedValue:o})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:{...Po.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:zo({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:jn("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:jn("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:jn("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:jn("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:jn("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:jn("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:jn("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:jn("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:jn("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:jn("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&&Ar(n)?o.concat(...n):[Ar(n)?Gs(n):n].filter(Boolean))},deselectNode({context:e,event:t}){const n=pc(t.id||t.value);e.set("selectedValue",o=>Li(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;Dl(e,[t.id])},expandBranches(e){const{context:t,event:n}=e,o=pc(n.value);Dl(e,_d(o,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>Li(n,t.id))},collapseBranches(e){const{context:t,event:n}=e,o=pc(n.value);t.set("expandedValue",i=>Li(i,...o))},setExpanded({context:e,event:t}){Ar(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){Ar(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);Pn(t,i)},focusTreeLastNode(e){const{prop:t,scope:n}=e,o=t("collection"),i=o.getLastNode(void 0,{skip:zo(e)}),r=o.getNodeValue(i);Pn(n,r)},focusBranchFirstNode({event:e,prop:t,scope:n}){const o=t("collection"),i=o.findNode(e.id),r=o.getFirstNode(i),a=o.getNodeValue(r);Pn(n,a)},focusTreeNextNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),r=i.getNextNode(t.id,{skip:zo(e)});if(!r)return;const a=i.getNodeValue(r);Pn(o,a)},focusTreePrevNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),r=i.getPreviousNode(t.id,{skip:zo(e)});if(!r)return;const a=i.getNodeValue(r);Pn(o,a)},focusBranchNode({event:e,prop:t,scope:n}){const o=t("collection"),i=o.getParentNode(e.id),r=i?o.getNodeValue(i):void 0;Pn(n,r)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){const{context:t,prop:n,refs:o,event:i,scope:r,computed:a}=e,s=a("visibleNodes").map(({node:c})=>({textContent:n("collection").stringifyNode(c),id:n("collection").getNodeValue(c)})),l=Po(s,{state:o.get("typeaheadState"),activeId:t.get("focusedValue"),key:i.key});Pn(r,l?.id)},toggleNodeSelection({context:e,event:t}){const n=Hi(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){const{context:t,prop:n}=e,o=n("collection").getBranchValues(),i=_d(o,t.get("expandedValue"));Dl(e,i)},expandSiblingBranches(e){const{context:t,event:n,prop:o}=e,i=o("collection"),r=i.getIndexPath(n.id);if(!r)return;const a=i.getSiblingNodes(r).map(l=>i.getNodeValue(l)),s=_d(a,t.get("expandedValue"));Dl(e,s)},extendSelectionToNode(e){const{context:t,event:n,prop:o,computed:i}=e,r=o("collection"),a=Nr(t.get("selectedValue"))||r.getNodeValue(r.getFirstNode()),s=n.id;let l=[a,s],c=0;i("visibleNodes").forEach(({node:u})=>{const d=r.getNodeValue(u);c===1&&l.push(d),(d===a||d===s)&&c++}),t.set("selectedValue",Dn(l))},extendSelectionToNextNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),r=i.getNextNode(n.id,{skip:zo(e)});if(!r)return;const a=new Set(t.get("selectedValue")),s=i.getNodeValue(r);s!=null&&(a.has(n.id)&&a.has(s)?a.delete(n.id):a.has(s)||a.add(s),t.set("selectedValue",Array.from(a)))},extendSelectionToPrevNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),r=i.getPreviousNode(n.id,{skip:zo(e)});if(!r)return;const a=new Set(t.get("selectedValue")),s=i.getNodeValue(r);s!=null&&(a.has(n.id)&&a.has(s)?a.delete(n.id):a.has(s)||a.add(s),t.set("selectedValue",Array.from(a)))},extendSelectionToFirstNode(e){const{context:t,prop:n}=e,o=n("collection"),i=Nr(t.get("selectedValue")),r=[];o.visit({skip:zo(e),onEnter:a=>{const s=o.getNodeValue(a);if(r.push(s),s===i)return"stop"}}),t.set("selectedValue",r)},extendSelectionToLastNode(e){const{context:t,prop:n}=e,o=n("collection"),i=Nr(t.get("selectedValue")),r=[];let a=!1;o.visit({skip:zo(e),onEnter:s=>{const l=o.getNodeValue(s);l===i&&(a=!0),a&&r.push(l)}}),t.set("selectedValue",r)},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?aV(o,t.value,i):Hi(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"),r=i.getIndexPath(t.value);if(r){const a=i.at(r);a&&o({value:t.value,node:a,indexPath:r})}}},submitRenaming({context:e,event:t,prop:n,scope:o}){var i;const r=e.get("renamingValue");if(!r)return;const a=n("collection").getIndexPath(r);if(!a)return;const s=t.label.trim(),l=n("onBeforeRename");if(l&&!l({value:r,label:s,indexPath:a})){e.set("renamingValue",null),Pn(o,r);return}(i=n("onRenameComplete"))==null||i({value:r,label:s,indexPath:a}),e.set("renamingValue",null),Pn(o,r)},cancelRenaming({context:e,scope:t}){const n=e.get("renamingValue");e.set("renamingValue",null),n&&Pn(t,n)},syncRenameInput({context:e,scope:t,prop:n}){const o=e.get("renamingValue");if(!o)return;const i=n("collection"),r=i.findNode(o);if(!r)return;const a=i.stringifyNode(r),s=bv(t,o);Rn(s,a)},focusRenameInput({context:e,scope:t}){const n=e.get("renamingValue");if(!n)return;const o=bv(t,n);o&&(o.focus(),o.select())}}}};ie()(["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"]);ie()(["node","indexPath"]);const r1=(e,t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Bn(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)}}}),a=Gt(cV,r);return I(()=>lV(a,an))},a1=O({__name:"tree-view-root",props:_n({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=r1(n,t);return Jw(o),ro(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,r)=>(w(),E(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),s1=O({__name:"tree-view-tree",props:{asChild:{type:Boolean}},setup(e){const t=kt();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getTreeProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),Vo=Object.freeze(Object.defineProperty({__proto__:null,Branch:Y2,BranchContent:z2,BranchControl:H2,BranchIndentGuide:j2,BranchIndicator:W2,BranchText:U2,BranchTrigger:G2,Context:K2,Item:J2,ItemIndicator:X2,ItemText:Z2,Label:Q2,NodeCheckbox:eV,NodeCheckboxIndicator:tV,NodeContext:oV,NodeProvider:Qw,NodeRenameInput:nV,Root:a1,RootProvider:iV,Tree:s1},Symbol.toStringTag,{value:"Module"}));var l1=be("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText");l1.build();var c1=e=>new er(e);c1.empty=()=>new er({items:[]});var uV=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},dV=(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}`},yv=e=>e.getById(uV(e)),xv=(e,t)=>e.getById(dV(e,t)),{guards:hV,createMachine:pV}=Fu(),{or:fV}=hV;pV({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:c1.empty(),orientation:"vertical",selectionMode:"single",...e}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:bt,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:{...Po.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 DO(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:fV("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 ju({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 r=e.get("highlightedValue");if(r==null||pO()!=="keyboard")return;const a=yv(n),s=t("scrollToIndexFn");if(s){const c=t("collection").indexOf(r);s?.({index:c,immediate:i,getElement(){return xv(n,r)}});return}const l=xv(n,r);Es(l,{rootEl:a,block:"nearest"})};return de(()=>o(!0)),Us(()=>yv(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"),r=t("collection");if(i==null||!r.has(i))return;const a=o("selection");if(n.shiftKey&&o("multiple")&&n.anchorValue){const s=a.extendSelection(r,n.anchorValue,i);Ea(a,s,t("onSelect")),e.set("value",Array.from(s))}else{const s=a.select(r,i,n.metaKey);Ea(a,s,t("onSelect")),e.set("value",Array.from(s))}},selectWithKeyboard({context:e,prop:t,event:n,computed:o}){const i=o("selection"),r=t("collection");if(n.shiftKey&&o("multiple")&&n.anchorValue){const a=i.extendSelection(r,n.anchorValue,n.value);Ea(i,a,t("onSelect")),e.set("value",Array.from(a));return}if(t("selectOnHighlight")){const a=i.replaceSelection(r,n.value);Ea(i,a,t("onSelect")),e.set("value",Array.from(a))}},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"),r=o("selection"),a=r.select(i,n.value);Ea(r,a,t("onSelect")),e.set("value",Array.from(a))},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(r=>o.find(a=>n.getItemValue(a)===r)||n.find(r));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 gV=(e,t)=>{const n=new Set(e);for(const o of t)n.delete(o);return n};function Ea(e,t,n){const o=gV(t,e);for(const i of o)n?.({value:i})}ie()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]);ie()(["item","highlightOnHover"]);ie()(["id"]);ie()(["htmlFor"]);l1.extendWith("empty");var mV=be("marquee").parts("root","viewport","content","edge","item");mV.build();ie()(["autoFill","defaultPaused","delay","dir","getRootNode","id","ids","loopCount","onComplete","onLoopComplete","onPauseChange","paused","pauseOnInteraction","reverse","side","spacing","speed","translations"]);var u1=be("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem");u1.build();var d1=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`menu:${e.id}:trigger`},vV=e=>{var t;return((t=e.ids)==null?void 0:t.contextTrigger)??`menu:${e.id}:ctx-trigger`},h1=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`menu:${e.id}:content`},bV=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`menu:${e.id}:popper`},Zh=(e,t)=>`${e.id}/${t}`,bi=e=>e?.dataset.value??null,Uo=e=>e.getById(h1(e)),wv=e=>e.getById(bV(e)),Vl=e=>e.getById(d1(e)),yV=(e,t)=>t?e.getById(Zh(e,t)):null,Fd=e=>e.getById(vV(e)),il=e=>{const t=`[role^="menuitem"][data-ownedby=${CSS.escape(h1(e))}]:not([data-disabled])`;return oi(Uo(e),t)},xV=e=>Nr(il(e)),wV=e=>Gs(il(e)),Lf=(e,t)=>t?e.id===t||e.dataset.value===t:!1,_V=(e,t)=>{const n=il(e),o=n.findIndex(i=>Lf(i,t.value));return d$(n,o,{loop:t.loop??t.loopFocus})},CV=(e,t)=>{const n=il(e),o=n.findIndex(i=>Lf(i,t.value));return h$(n,o,{loop:t.loop??t.loopFocus})},kV=(e,t)=>{const n=il(e),o=n.find(i=>Lf(i,t.value));return Po(n,{state:t.typeaheadState,key:t.key,activeId:o?.id??null})},SV=e=>{var t;return!!((t=e?.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("aria-controls"))},$V="menu:select";function EV(e,t){if(!e)return;const n=Ke(e),o=new n.CustomEvent($V,{detail:{value:t}});e.dispatchEvent(o)}var{not:fn,and:pr,or:TV}=Ct();fn("isSubmenu"),TV("isOpenAutoFocusEvent","isArrowDownEvent"),pr(fn("isTriggerItem"),"isOpenControlled"),fn("isTriggerItem"),pr("isSubmenu","isOpenControlled"),fn("isPointerSuspended"),pr(fn("isPointerSuspended"),fn("isTriggerItem")),pr(fn("isTriggerItemHighlighted"),fn("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),pr(fn("isTriggerItemHighlighted"),fn("isHighlightedItemEditable"),"closeOnSelect"),pr(fn("isTriggerItemHighlighted"),fn("isHighlightedItemEditable"));function _v(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function OV(e,t){return e?_T(e,t):!1}function IV(e,t,n){const o=Object.keys(e).length>0;if(!t)return null;if(!o)return Zh(n,t);for(const i in e){const r=e[i],a=d1(r.scope);if(a===t)return a}return Zh(n,t)}ie()(["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"]);ie()(["closeOnSelect","disabled","value","valueText"]);ie()(["htmlFor"]);ie()(["id"]);ie()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]);const[p1,pi]=Re("NumberInputContext"),PV=O({__name:"number-input-context",setup(e){const t=pi();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),AV=O({__name:"number-input-control",props:{asChild:{type:Boolean}},setup(e){const t=pi();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),RV=O({__name:"number-input-decrement-trigger",props:{asChild:{type:Boolean}},setup(e){const t=pi();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getDecrementTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),DV=O({__name:"number-input-increment-trigger",props:{asChild:{type:Boolean}},setup(e){const t=pi();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getIncrementTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),VV=O({__name:"number-input-input",props:{asChild:{type:Boolean}},setup(e){const t=pi(),n=ao();return Y(),(o,i)=>{var r;return w(),E(g(X).input,U({"aria-describedby":(r=g(n))==null?void 0:r.ariaDescribedby},g(t).getInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),MV=O({__name:"number-input-label",props:{asChild:{type:Boolean}},setup(e){const t=pi();return Y(),(n,o)=>(w(),E(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),NV=O({__name:"number-input-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return p1(n),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});let Bd=new Map,Jh=!1;try{Jh=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let au=!1;try{au=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const f1={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let LV=class{format(t){let n="";if(!Jh&&this.options.signDisplay!=null?n=BV(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!au){var o;let{unit:i,unitDisplay:r="short",locale:a}=this.resolvedOptions();if(!i)return n;let s=(o=f1[i])===null||o===void 0?void 0:o[r];n+=s[a]||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(r=>({...r,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(r=>({...r,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Jh&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!au&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=FV(t,n),this.options=n}};function FV(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!au){var o;let{unit:a,unitDisplay:s="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((o=f1[a])===null||o===void 0)&&o[s]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${s}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((a,s)=>a[0]<s[0]?-1:1).join():"");if(Bd.has(i))return Bd.get(i);let r=new Intl.NumberFormat(e,t);return Bd.set(i,r),r}function BV(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),r=e.format(n),a=i.replace(r,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(r,"!!!").replace(a,"+").replace("!!!",r)}else return e.format(n)}}const zV=new RegExp("^.*\\(.*\\).*$"),HV=["latn","arab","hanidec","deva","beng","fullwide"];let g1=class{parse(t){return zd(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,o){return zd(this.locale,this.options,t).isValidPartialNumber(t,n,o)}getNumberingSystem(t){return zd(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}};const Cv=new Map;function zd(e,t,n){let o=kv(e,t);if(!e.includes("-nu-")&&!o.isValidPartialNumber(n)){for(let i of HV)if(i!==o.options.numberingSystem){let r=kv(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(r.isValidPartialNumber(n))return r}}return o}function kv(e,t){let n=e+(t?Object.entries(t).sort((i,r)=>i[0]<r[0]?-1:1).join():""),o=Cv.get(n);return o||(o=new jV(e,t),Cv.set(n,o)),o}let jV=class{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=fr(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 a=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)}`,a>-1&&(n=`-${n}`)}let o=n?+n:NaN;if(isNaN(o))return NaN;if(this.options.style==="percent"){var i,r;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)+2,20)};return new g1(this.locale,a).parse(new LV(this.locale,a).format(o))}return this.options.currencySign==="accounting"&&zV.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=fr(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=fr(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=fr(t," ",this.symbols.group),t=fr(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=fr(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=UV(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 Sv=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),WV=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function UV(e,t,n,o){var i,r,a,s;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=l.formatToParts(-10000.111),u=l.formatToParts(10000.111),d=WV.map(S=>l.formatToParts(S));var h;let p=(h=(i=c.find(S=>S.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&h!==void 0?h:"-",m=(r=u.find(S=>S.type==="plusSign"))===null||r===void 0?void 0:r.value;!m&&(o?.signDisplay==="exceptZero"||o?.signDisplay==="always")&&(m="+");let f=(a=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(S=>S.type==="decimal"))===null||a===void 0?void 0:a.value,b=(s=c.find(S=>S.type==="group"))===null||s===void 0?void 0:s.value,v=c.filter(S=>!Sv.has(S.type)).map(S=>$v(S.value)),y=d.flatMap(S=>S.filter(R=>!Sv.has(R.type)).map(R=>$v(R.value))),x=[...new Set([...v,...y])].sort((S,R)=>R.length-S.length),_=x.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${x.join("|")}|[\\p{White_Space}]`,"gu"),k=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),$=new Map(k.map((S,R)=>[S,R])),A=new RegExp(`[${k.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:f,group:b,literals:_,numeral:A,index:S=>String($.get(S))}}function fr(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function $v(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var m1=be("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),Ho=m1.build(),GV=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`number-input:${e.id}`},ns=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`number-input:${e.id}:input`},v1=e=>{var t;return((t=e.ids)==null?void 0:t.incrementTrigger)??`number-input:${e.id}:inc`},b1=e=>{var t;return((t=e.ids)==null?void 0:t.decrementTrigger)??`number-input:${e.id}:dec`},qV=e=>{var t;return((t=e.ids)==null?void 0:t.scrubber)??`number-input:${e.id}:scrubber`},y1=e=>`number-input:${e.id}:cursor`,YV=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`number-input:${e.id}:label`},os=e=>e.getById(ns(e)),KV=e=>e.getById(v1(e)),XV=e=>e.getById(b1(e)),x1=e=>e.getDoc().getElementById(y1(e)),ZV=(e,t)=>{let n=null;return t==="increment"&&(n=KV(e)),t==="decrement"&&(n=XV(e)),n},JV=(e,t)=>{if(!Au())return tM(e,t),()=>{var n;(n=x1(e))==null||n.remove()}},QV=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")}},eM=(e,t)=>{const{point:n,isRtl:o,event:i}=t,r=e.getWin(),a=ps(i.movementX,r.devicePixelRatio),s=ps(i.movementY,r.devicePixelRatio);let l=a>0?"increment":a<0?"decrement":null;o&&l==="increment"&&(l="decrement"),o&&l==="decrement"&&(l="increment");const c={x:n.x+a,y:n.y+s},u=r.innerWidth,d=ps(7.5,r.devicePixelRatio);return c.x=E$(c.x+d,u)-d,{hint:l,point:c}},tM=(e,t)=>{const n=e.getDoc(),o=n.createElement("div");o.className="scrubber--cursor",o.id=y1(e),Object.assign(o.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:R0,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),o.innerHTML=`
|
|
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
|
-
<g transform="translate(2 3)">
|
|
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
|
-
<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
|
-
</g>
|
|
8
|
-
</svg>`,n.body.appendChild(o)};function nM(e,t){if(!(!e||!t.isActiveElement(e)))try{const{selectionStart:n,selectionEnd:o,value:i}=e;return n==null||o==null?void 0:{start:n,end:o,value:i}}catch{return}}function oM(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:r,value:a}=t;if(o===a){e.setSelectionRange(i,r);return}const s=Ev(a,o,i),l=i===r?s:Ev(a,o,r),c=Math.max(0,Math.min(s,o.length)),u=Math.max(c,Math.min(l,o.length));e.setSelectionRange(c,u)}catch{const o=e.value.length;e.setSelectionRange(o,o)}}}function Ev(e,t,n){const o=e.slice(0,n),i=e.slice(n);let r=0;const a=Math.min(o.length,t.length);for(let c=0;c<a&&o[c]===t[c];c++)r=c+1;let s=0;const l=Math.min(i.length,t.length-r);for(let c=0;c<l;c++){const u=i.length-1-c,d=t.length-1-c;if(i[u]===t[d])s=c+1;else break}if(r>=o.length)return r;if(s>=i.length)return t.length-s;if(r>0)return r;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}function iM(e,t){const{state:n,send:o,prop:i,scope:r,computed:a}=e,s=n.hasTag("focus"),l=a("isDisabled"),c=!!i("readOnly"),u=!!i("required"),d=n.matches("scrubbing"),h=a("isValueEmpty"),p=a("isOutOfRange")||!!i("invalid"),m=l||!a("canIncrement")||c,f=l||!a("canDecrement")||c,b=i("translations");return{focused:s,invalid:p,empty:h,value:a("formattedValue"),valueAsNumber:a("valueAsNumber"),setValue(v){o({type:"VALUE.SET",value:v})},clearValue(){o({type:"VALUE.CLEAR"})},increment(){o({type:"VALUE.INCREMENT"})},decrement(){o({type:"VALUE.DECREMENT"})},setToMax(){o({type:"VALUE.SET",value:i("max")})},setToMin(){o({type:"VALUE.SET",value:i("min")})},focus(){var v;(v=os(r))==null||v.focus()},getRootProps(){return t.element({id:GV(r),...Ho.root.attrs,dir:i("dir"),"data-disabled":D(l),"data-focus":D(s),"data-invalid":D(p),"data-scrubbing":D(d)})},getLabelProps(){return t.label({...Ho.label.attrs,dir:i("dir"),"data-disabled":D(l),"data-focus":D(s),"data-invalid":D(p),"data-required":D(u),"data-scrubbing":D(d),id:YV(r),htmlFor:ns(r)})},getControlProps(){return t.element({...Ho.control.attrs,dir:i("dir"),role:"group","aria-disabled":l,"data-focus":D(s),"data-disabled":D(l),"data-invalid":D(p),"data-scrubbing":D(d),"aria-invalid":Je(p)})},getValueTextProps(){return t.element({...Ho.valueText.attrs,dir:i("dir"),"data-disabled":D(l),"data-invalid":D(p),"data-focus":D(s),"data-scrubbing":D(d)})},getInputProps(){return t.input({...Ho.input.attrs,dir:i("dir"),name:i("name"),form:i("form"),id:ns(r),role:"spinbutton",defaultValue:a("formattedValue"),pattern:i("formatOptions")?void 0:i("pattern"),inputMode:i("inputMode"),"aria-invalid":Je(p),"data-invalid":D(p),disabled:l,"data-disabled":D(l),readOnly:c,required:i("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":i("min"),"aria-valuemax":i("max"),"aria-valuenow":Number.isNaN(a("valueAsNumber"))?void 0:a("valueAsNumber"),"aria-valuetext":a("valueText"),"data-scrubbing":D(d),onFocus(){o({type:"INPUT.FOCUS"})},onBlur(){o({type:"INPUT.BLUR"})},onInput(v){const y=nM(v.currentTarget,r);o({type:"INPUT.CHANGE",target:v.currentTarget,hint:"set",selection:y})},onBeforeInput(v){try{const{selectionStart:y,selectionEnd:x,value:_}=v.currentTarget,k=_.slice(0,y)+(v.data??"")+_.slice(x);a("parser").isValidPartialNumber(k)||v.preventDefault()}catch{}},onKeyDown(v){if(v.defaultPrevented||c||Ss(v))return;const y=TS(v)*i("step"),x={ArrowUp(){o({type:"INPUT.ARROW_UP",step:y}),v.preventDefault()},ArrowDown(){o({type:"INPUT.ARROW_DOWN",step:y}),v.preventDefault()},Home(){Yn(v)||(o({type:"INPUT.HOME"}),v.preventDefault())},End(){Yn(v)||(o({type:"INPUT.END"}),v.preventDefault())},Enter(){o({type:"INPUT.ENTER"})}}[v.key];x?.(v)}})},getDecrementTriggerProps(){return t.button({...Ho.decrementTrigger.attrs,dir:i("dir"),id:b1(r),disabled:f,"data-disabled":D(f),"aria-label":b.decrementLabel,type:"button",tabIndex:-1,"aria-controls":ns(r),"data-scrubbing":D(d),onPointerDown(v){var y;f||Ni(v)&&(o({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:v.pointerType}),v.pointerType==="mouse"&&v.preventDefault(),v.pointerType==="touch"&&((y=v.currentTarget)==null||y.focus({preventScroll:!0})))},onPointerUp(v){o({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:v.pointerType})},onPointerLeave(){f||o({type:"TRIGGER.PRESS_UP",hint:"decrement"})}})},getIncrementTriggerProps(){return t.button({...Ho.incrementTrigger.attrs,dir:i("dir"),id:v1(r),disabled:m,"data-disabled":D(m),"aria-label":b.incrementLabel,type:"button",tabIndex:-1,"aria-controls":ns(r),"data-scrubbing":D(d),onPointerDown(v){var y;m||!Ni(v)||(o({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:v.pointerType}),v.pointerType==="mouse"&&v.preventDefault(),v.pointerType==="touch"&&((y=v.currentTarget)==null||y.focus({preventScroll:!0})))},onPointerUp(v){o({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:v.pointerType})},onPointerLeave(v){o({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:v.pointerType})}})},getScrubberProps(){return t.element({...Ho.scrubber.attrs,dir:i("dir"),"data-disabled":D(l),id:qV(r),role:"presentation","data-scrubbing":D(d),onMouseDown(v){if(l||!Ni(v))return;const y=Uc(v),x=Ke(v.currentTarget).devicePixelRatio;y.x=y.x-ps(7.5,x),y.y=y.y-ps(7.5,x),o({type:"SCRUBBER.PRESS_DOWN",point:y}),v.preventDefault()},style:{cursor:l?void 0:"ew-resize"}})}}}var rM=(e,t={})=>new Intl.NumberFormat(e,t),aM=(e,t={})=>new g1(e,t),Hd=(e,t)=>{const{prop:n,computed:o}=t;return n("formatOptions")?e===""?Number.NaN:o("parser").parse(e):parseFloat(e)},yi=(e,t)=>{const{prop:n,computed:o}=t;return Number.isNaN(e)?"":n("formatOptions")?o("formatter").format(e):e.toString()},sM=(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:lM,guards:cM,createMachine:uM}=Fu(),{not:Tv,and:Ov}=cM,dM=uM({props({props:e}){const t=sM(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 r=n(),a=Hd(o,{computed:r,prop:e});(i=e("onValueChange"))==null||i({value:o,valueAsNumber:a})}})),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})=>Hd(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>yi(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>O$(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>T$(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!hs(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:Th(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>rM(e,t)),parser:Th(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>aM(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:Ov("clampValueOnBlur",Tv("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur"]},{guard:Tv("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:lM([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:Ov("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=os(t);return oa(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 JV(t,n)},preventTextSelection({scope:e}){return QV(e)},trackButtonDisabled({context:e,scope:t,send:n}){const o=e.get("hint"),i=ZV(t,o);return Us(i,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){const o=os(e);if(!o||!e.isActiveElement(o)||!n("allowMouseWheel"))return;function i(r){r.preventDefault();const a=Math.sign(r.deltaY)*-1;a===1?t({type:"VALUE.INCREMENT"}):a===-1&&t({type:"VALUE.DECREMENT"})}return Ee(o,"wheel",i,{passive:!1})},activatePointerLock({scope:e}){if(!Au())return qS(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:o}){const i=e.getDoc();function r(s){const l=n.get("scrubberCursorPoint"),c=o("isRtl"),u=eM(e,{point:l,isRtl:c,event:s});u.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:u.hint,point:u.point})}function a(){t({type:"SCRUBBER.POINTER_UP"})}return Ts(Ee(i,"mousemove",r,!1),Ee(i,"mouseup",a,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;const n=os(e);e.isActiveElement(n)||de(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:o}){let i=R$(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=vt(i,n("min"),n("max"))),e.set("value",yi(i,{computed:o,prop:n}))},decrement({context:e,event:t,prop:n,computed:o}){let i=D$(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=vt(i,n("min"),n("max"))),e.set("value",yi(i,{computed:o,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){const o=vt(n("valueAsNumber"),t("min"),t("max"));e.set("value",yi(o,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:o}){let i=Hd(t.value,{computed:o,prop:n});n("allowOverflow")||(i=vt(i,n("min"),n("max"))),e.set("value",yi(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=yi(t("max"),{computed:n,prop:t});e.set("value",o)},decrementToMin({context:e,prop:t,computed:n}){const o=yi(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"),r=os(o),a=t.selection;de(()=>{Rn(r,i),oM(r,a,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=x1(t),o=e.get("scrubberCursorPoint");!n||!o||(n.style.transform=`translate3d(${o.x}px, ${o.y}px, 0px)`)}}}});ie()(["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"]);const hM=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=ao(),a=I(()=>{const l=Ye(e);return{id:n,ids:{label:r?.value.ids.label,input:r?.value.ids.control},disabled:r?.value.disabled,readOnly:r?.value.readOnly,required:r?.value.required,invalid:r?.value.invalid,dir:i.value.dir,locale:i.value.locale,value:l.modelValue,getRootNode:o?.value.getRootNode,...Bn(l),onValueChange:c=>{var u;t?.("valueChange",c),t?.("update:modelValue",c.value),(u=l.onValueChange)==null||u.call(l,c)},onFocusChange:c=>{var u;t?.("focusChange",c),(u=l.onFocusChange)==null||u.call(l,c)},onValueInvalid:c=>{var u;t?.("valueInvalid",c),(u=l.onValueInvalid)==null||u.call(l,c)}}}),s=Gt(dM,a);return I(()=>iM(s,an))},pM=O({__name:"number-input-root",props:_n({allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean}},{allowMouseWheel:void 0,allowOverflow:void 0,clampValueOnBlur:void 0,disabled:void 0,focusInputOnChange:void 0,invalid:void 0,readOnly:void 0,required:void 0,spinOnPress:void 0}),emits:["focusChange","valueChange","valueInvalid","update:modelValue"],setup(e,{emit:t}){const n=hM(e,t);return p1(n),Y(),(o,i)=>(w(),E(g(X).div,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),fM=O({__name:"number-input-scrubber",props:{asChild:{type:Boolean}},setup(e){const t=pi();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getScrubberProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),gM=O({__name:"number-input-value-text",props:{asChild:{type:Boolean}},setup(e){const t=pi();return Y(),(n,o)=>(w(),E(g(X).span,U(g(t).getValueTextProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),xi=Object.freeze(Object.defineProperty({__proto__:null,Context:PV,Control:AV,DecrementTrigger:RV,IncrementTrigger:DV,Input:VV,Label:MV,Root:pM,RootProvider:NV,Scrubber:fM,ValueText:gM},Symbol.toStringTag,{value:"Module"}));var mM=be("pagination").parts("root","item","ellipsis","prevTrigger","nextTrigger");mM.build();ie()(["count","dir","getRootNode","id","ids","onPageChange","onPageSizeChange","page","defaultPage","pageSize","defaultPageSize","siblingCount","translations","type","getPageUrl"]);ie()(["value","type"]);ie()(["index"]);var vM=be("password-input").parts("root","input","label","control","indicator","visibilityTrigger");vM.build();ie()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]);var bM=be("pinInput").parts("root","label","input","control");bM.build();ie()(["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 w1=be("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger");w1.build();ie()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);var yM=be("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange");yM.build();ie()(["dir","getRootNode","id","ids","max","min","orientation","translations","value","onValueChange","defaultValue","formatOptions","locale"]);var xM=be("qr-code").parts("root","frame","pattern","overlay","downloadTrigger");xM.build();ie()(["ids","defaultValue","value","id","encoding","dir","getRootNode","onValueChange","pixelSize"]);var Ff=be("radio-group").parts("root","label","item","itemText","itemControl","indicator");Ff.build();ie()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);ie()(["value","disabled","invalid"]);var wM=be("rating-group").parts("root","label","item","control");wM.build();ie()(["allowHalf","autoFocus","count","dir","disabled","form","getRootNode","id","ids","name","onHoverChange","onValueChange","required","readOnly","translations","value","defaultValue"]);ie()(["index"]);var _M=be("scroll-area").parts("root","viewport","content","scrollbar","thumb","corner");_M.build();ie()(["dir","getRootNode","ids","id"]);const CM=Ff.rename("segment-group");CM.build();const[_1,St]=Re("SelectContext"),kM=O({__name:"select-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),SM=O({__name:"select-content",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=cf(),o=I(()=>qs(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,r)=>g(n).unmounted?oe("",!0):(w(),E(g(X).div,U({key:0},o.value,{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),$M=O({__name:"select-context",setup(e){const t=St();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),EM=O({__name:"select-control",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),TM={key:0,value:""},OM=["value","disabled"],IM=O({__name:"select-hidden-select",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=ao();return Y(),(o,i)=>{var r;return w(),E(g(X).select,U({"aria-describedby":(r=g(n))==null?void 0:r.ariaDescribedby},g(t).getHiddenSelectProps()),{default:C(()=>[g(t).value.length===0?(w(),M("option",TM)):oe("",!0),(w(!0),M(Se,null,Ie(g(t).collection.items,a=>(w(),M("option",{key:a.value,value:g(t).collection.getItemValue(a),disabled:g(t).collection.getItemDisabled(a)},se(g(t).collection.stringifyItem(a))+" > ",9,OM))),128))]),_:1},16,["aria-describedby"])}}}),PM=O({__name:"select-indicator",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getIndicatorProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),[AM,RM]=Re("SelectItemContext"),DM=O({__name:"select-item-context",setup(e){const t=RM();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),[VM,MM]=Re("SelectItemGroupPropsContext"),NM=O({__name:"select-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=MM();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getItemGroupLabelProps({htmlFor:g(n).id}),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),LM=O({__name:"select-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=St(),o=Ut(),i=t.id??o;return VM({id:i}),Y(),(r,a)=>(w(),E(g(X).div,U(g(n).getItemGroupProps({id:g(i)}),{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),[FM,C1]=Re("SelectItemPropsContext"),BM=O({__name:"select-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=C1();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getItemIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),zM=O({__name:"select-item-text",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=C1();return Y(),(o,i)=>(w(),E(g(X).span,U(g(t).getItemTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),HM=O({__name:"select-item",props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=St();return FM(t),AM(I(()=>n.value.getItemState(t))),Y(),(o,i)=>(w(),E(g(X).div,U(g(n).getItemProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),jM=O({__name:"select-label",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(w(),E(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),WM=O({__name:"select-list",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getListProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),UM=O({__name:"select-positioner",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=Ks(),o=sf(I(()=>({...n.value,present:t.value.open})));return lf(o),Y(),(i,r)=>g(o).unmounted?oe("",!0):(w(),E(g(X).div,U({key:0},g(t).getPositionerProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),GM=O({__name:"select-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return _1(n),ro(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var k1=be("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),Ot=k1.build(),S1=e=>new er(e);S1.empty=()=>new er({items:[]});var qM=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`select:${e.id}`},Qh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},ep=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`select:${e.id}:trigger`},$1=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`select:${e.id}:clear-trigger`},Ml=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`select:${e.id}:label`},YM=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`select:${e.id}:control`},tp=(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}`},np=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenSelect)??`select:${e.id}:select`},E1=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`select:${e.id}:positioner`},KM=(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}`},Iv=(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}`},jd=e=>e.getById(np(e)),Ta=e=>e.getById(Qh(e)),Ri=e=>e.getById(ep(e)),XM=e=>e.getById($1(e)),Pv=e=>e.getById(E1(e)),Wd=(e,t)=>t==null?null:e.getById(tp(e,t));function ZM(e,t){const{context:n,prop:o,scope:i,state:r,computed:a,send:s}=e,l=o("disabled")||n.get("fieldsetDisabled"),c=!!o("invalid"),u=!!o("required"),d=!!o("readOnly"),h=o("composite"),p=o("collection"),m=r.hasTag("open"),f=r.matches("focused"),b=n.get("highlightedValue"),v=n.get("highlightedItem"),y=n.get("selectedItems"),x=n.get("currentPlacement"),_=a("isTypingAhead"),k=a("isInteractive"),$=b?tp(i,b):void 0;function A(R){const F=p.getItemDisabled(R.item),P=p.getItemValue(R.item);return of(P,()=>`[zag-js] No value found for item ${JSON.stringify(R.item)}`),{value:P,disabled:!!(l||F),highlighted:b===P,selected:n.get("value").includes(P)}}const S=$f({...o("positioning"),placement:x});return{open:m,focused:f,empty:n.get("value").length===0,highlightedItem:v,highlightedValue:b,selectedItems:y,hasSelectedItems:a("hasSelectedItems"),value:n.get("value"),valueAsString:a("valueAsString"),collection:p,multiple:!!o("multiple"),disabled:!!l,reposition(R={}){s({type:"POSITIONING.SET",options:R})},focus(){var R;(R=Ri(i))==null||R.focus({preventScroll:!0})},setOpen(R){r.hasTag("open")!==R&&s({type:R?"OPEN":"CLOSE"})},selectValue(R){s({type:"ITEM.SELECT",value:R})},setValue(R){s({type:"VALUE.SET",value:R})},selectAll(){s({type:"VALUE.SET",value:p.getValues()})},setHighlightValue(R){s({type:"HIGHLIGHTED_VALUE.SET",value:R})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(R){s(R?{type:"ITEM.CLEAR",value:R}:{type:"VALUE.CLEAR"})},getItemState:A,getRootProps(){return t.element({...Ot.root.attrs,dir:o("dir"),id:qM(i),"data-invalid":D(c),"data-readonly":D(d)})},getLabelProps(){return t.label({dir:o("dir"),id:Ml(i),...Ot.label.attrs,"data-disabled":D(l),"data-invalid":D(c),"data-readonly":D(d),"data-required":D(u),htmlFor:np(i),onClick(R){var F;R.defaultPrevented||l||(F=Ri(i))==null||F.focus({preventScroll:!0})}})},getControlProps(){return t.element({...Ot.control.attrs,dir:o("dir"),id:YM(i),"data-state":m?"open":"closed","data-focus":D(f),"data-disabled":D(l),"data-invalid":D(c)})},getValueTextProps(){return t.element({...Ot.valueText.attrs,dir:o("dir"),"data-disabled":D(l),"data-invalid":D(c),"data-focus":D(f)})},getTriggerProps(){return t.button({id:ep(i),disabled:l,dir:o("dir"),type:"button",role:"combobox","aria-controls":Qh(i),"aria-expanded":m,"aria-haspopup":"listbox","data-state":m?"open":"closed","aria-invalid":c,"aria-required":u,"aria-labelledby":Ml(i),...Ot.trigger.attrs,"data-disabled":D(l),"data-invalid":D(c),"data-readonly":D(d),"data-placement":x,"data-placeholder-shown":D(!a("hasSelectedItems")),onClick(R){k&&(R.defaultPrevented||s({type:"TRIGGER.CLICK"}))},onFocus(){s({type:"TRIGGER.FOCUS"})},onBlur(){s({type:"TRIGGER.BLUR"})},onKeyDown(R){if(R.defaultPrevented||!k)return;const F={ArrowUp(){s({type:"TRIGGER.ARROW_UP"})},ArrowDown(P){s({type:P.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(P){s(_?{type:"TRIGGER.TYPEAHEAD",key:P.key}:{type:"TRIGGER.ENTER"})}}[$s(R,{dir:o("dir"),orientation:"vertical"})];if(F){F(R),R.preventDefault();return}Po.isValidEvent(R)&&(s({type:"TRIGGER.TYPEAHEAD",key:R.key}),R.preventDefault())}})},getIndicatorProps(){return t.element({...Ot.indicator.attrs,dir:o("dir"),"aria-hidden":!0,"data-state":m?"open":"closed","data-disabled":D(l),"data-invalid":D(c),"data-readonly":D(d)})},getItemProps(R){const F=A(R);return t.element({id:tp(i,F.value),role:"option",...Ot.item.attrs,dir:o("dir"),"data-value":F.value,"aria-selected":F.selected,"data-state":F.selected?"checked":"unchecked","data-highlighted":D(F.highlighted),"data-disabled":D(F.disabled),"aria-disabled":Je(F.disabled),onPointerMove(P){F.disabled||P.pointerType!=="mouse"||F.value!==b&&s({type:"ITEM.POINTER_MOVE",value:F.value})},onClick(P){P.defaultPrevented||F.disabled||s({type:"ITEM.CLICK",src:"pointerup",value:F.value})},onPointerLeave(P){var G;F.disabled||R.persistFocus||P.pointerType!=="mouse"||!((G=e.event.previous())!=null&&G.type.includes("POINTER"))||s({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(R){const F=A(R);return t.element({...Ot.itemText.attrs,"data-state":F.selected?"checked":"unchecked","data-disabled":D(F.disabled),"data-highlighted":D(F.highlighted)})},getItemIndicatorProps(R){const F=A(R);return t.element({"aria-hidden":!0,...Ot.itemIndicator.attrs,"data-state":F.selected?"checked":"unchecked",hidden:!F.selected})},getItemGroupLabelProps(R){const{htmlFor:F}=R;return t.element({...Ot.itemGroupLabel.attrs,id:Iv(i,F),dir:o("dir"),role:"presentation"})},getItemGroupProps(R){const{id:F}=R;return t.element({...Ot.itemGroup.attrs,"data-disabled":D(l),id:KM(i,F),"aria-labelledby":Iv(i,F),role:"group",dir:o("dir")})},getClearTriggerProps(){return t.button({...Ot.clearTrigger.attrs,id:$1(i),type:"button","aria-label":"Clear value","data-invalid":D(c),disabled:l,hidden:!a("hasSelectedItems"),dir:o("dir"),onClick(R){R.defaultPrevented||s({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const R=n.get("value"),F=o("multiple")?R:R?.[0];return t.select({name:o("name"),form:o("form"),disabled:l,multiple:o("multiple"),required:o("required"),"aria-hidden":!0,id:np(i),defaultValue:F,style:Mu,tabIndex:-1,onFocus(){var P;(P=Ri(i))==null||P.focus({preventScroll:!0})},"aria-labelledby":Ml(i)})},getPositionerProps(){return t.element({...Ot.positioner.attrs,dir:o("dir"),id:E1(i),style:S.floating})},getContentProps(){return t.element({hidden:!m,dir:o("dir"),id:Qh(i),role:h?"listbox":"dialog",...Ot.content.attrs,"data-state":m?"open":"closed","data-placement":x,"data-activedescendant":$,"aria-activedescendant":h?$:void 0,"aria-multiselectable":o("multiple")&&h?!0:void 0,"aria-labelledby":Ml(i),tabIndex:0,onKeyDown(R){if(!k||!Rt(R.currentTarget,je(R)))return;if(R.key==="Tab"&&!FS(R)){R.preventDefault();return}const F={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(ee){var z;_?s({type:"CONTENT.TYPEAHEAD",key:ee.key}):(z=F.Enter)==null||z.call(F,ee)}},P=F[$s(R)];if(P){P(R),R.preventDefault();return}const G=je(R);Ou(G)||Po.isValidEvent(R)&&(s({type:"CONTENT.TYPEAHEAD",key:R.key}),R.preventDefault())}})},getListProps(){return t.element({...Ot.list.attrs,tabIndex:0,role:h?void 0:"listbox","aria-labelledby":ep(i),"aria-activedescendant":h?void 0:$,"aria-multiselectable":!h&&o("multiple")?!0:void 0})}}}var{and:Oa,not:wi,or:JM}=Ct(),QM={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??S1.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:bt,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:{...Po.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:JM("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:Oa(wi("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:wi("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Oa(wi("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:wi("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:wi("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:wi("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:wi("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:Oa("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:Oa("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Oa("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})=>Av(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 oa(jd(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=()=>Ta(e);let i=!0;return ia(o,{type:"listbox",defer:!0,exclude:[Ri(e),XM(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(r){var a;(a=n("onInteractOutside"))==null||a(r),i=!(r.detail.focusable||r.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),on(()=>Ri(n),()=>Pv(n),{defer:!0,...o,onComplete(i){e.set("currentPlacement",i.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=r=>{const a=e.get("highlightedValue");if(a==null||o.current().type.includes("POINTER"))return;const s=Ta(n),l=t("scrollToIndexFn");if(l){const u=t("collection").indexOf(a);l?.({index:u,immediate:r,getElement:()=>Wd(n,a)});return}const c=Wd(n,a);Es(c,{rootEl:s,block:"nearest"})};return de(()=>i(!0)),Us(()=>Ta(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:o}){const i=()=>Pv(n);on(Ri(n),i,{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(r){e.set("currentPlacement",r.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}){de(()=>{const t=Xp({root:Ta(e)});t?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Av(e)&&de(()=>{const n=Ri(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",r=>i==null?[]:t("multiple")?Hi(r,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",r=>i==null?[]:t("multiple")?Hi(r,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:()=>Wd(t,i)})}else(o=Ta(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=jd(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(r=>o.find(a=>n.getItemValue(a)===r)||n.find(r));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=jd(e);if(!t)return;const n=e.getWin(),o=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(o)})}}}};function Av(e){var t;const n=e.restoreFocus??((t=e.previousEvent)==null?void 0:t.restoreFocus);return n==null||!!n}ie()(["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"]);ie()(["item","persistFocus"]);ie()(["id"]);ie()(["htmlFor"]);const eN=(e,t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=ao(),a=I(()=>{const l=Ye(e);return{id:n,ids:{label:r?.value.ids.label,hiddenSelect:r?.value.ids.control},disabled:r?.value.disabled,readOnly:r?.value.readOnly,invalid:r?.value.invalid,required:r?.value.required,dir:i.value.dir,value:l.modelValue,getRootNode:o?.value.getRootNode,...Bn(l),onValueChange:c=>{var u;t?.("valueChange",c),t?.("update:modelValue",c.value),(u=l.onValueChange)==null||u.call(l,c)},onHighlightChange:c=>{var u;t?.("highlightChange",c),t?.("update:highlightedValue",c.highlightedValue),(u=l.onHighlightChange)==null||u.call(l,c)},onOpenChange:c=>{var u;t?.("openChange",c),t?.("update:open",c.open),(u=l.onOpenChange)==null||u.call(l,c)},onFocusOutside:c=>{var u;t?.("focusOutside",c),(u=l.onFocusOutside)==null||u.call(l,c)},onInteractOutside:c=>{var u;t?.("interactOutside",c),(u=l.onInteractOutside)==null||u.call(l,c)},onPointerDownOutside:c=>{var u;t?.("pointerDownOutside",c),(u=l.onPointerDownOutside)==null||u.call(l,c)},onSelect(c){var u;t?.("select",c),(u=l.onSelect)==null||u.call(l,c)}}}),s=Gt(QM,a);return I(()=>ZM(s,an))},tN=O({__name:"select-root",props:_n({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=eN(n,t);return _1(o),ro(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,r)=>(w(),E(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),nN=O({__name:"select-trigger",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),oN=O({__name:"select-value-text",props:{placeholder:{},asChild:{type:Boolean}},setup(e){const t=e,n=St(),o=Hs();return Y(),(i,r)=>(w(),E(g(X).span,U(g(n).getValueTextProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default",{},()=>{var a;return[Ne(se(((a=o.default)==null?void 0:a.call(o))||g(n).valueAsString||t.placeholder),1)]})]),_:3},16,["as-child"]))}}),Yt=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:kM,Content:SM,Context:$M,Control:EM,HiddenSelect:IM,Indicator:PM,Item:HM,ItemContext:DM,ItemGroup:LM,ItemGroupLabel:NM,ItemIndicator:BM,ItemText:zM,Label:jM,List:WM,Positioner:UM,Root:tN,RootProvider:GM,Trigger:nN,ValueText:oN},Symbol.toStringTag,{value:"Module"}));var iN=be("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label");iN.build();ie()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]);var rN=be("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator");rN.build();ie()(["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"]);ie()(["index","name"]);ie()(["value"]);var T1=be("splitter").parts("root","panel","resizeTrigger");T1.build();ie()(["dir","getRootNode","id","ids","onResize","onResizeStart","onResizeEnd","onCollapse","onExpand","orientation","size","defaultSize","panels","keyboardResizeBy","nonce"]);ie()(["id"]);ie()(["disabled","id"]);const[aN,Qu]=Re("StepsContext"),[sN,O1]=Re("StepsItemPropsContext"),lN=O({__name:"steps-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Qu(),n=O1();return Y(),(o,i)=>(w(),E(g(X).div,U(g(t).getIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[cN]=Re("StepsItemContext"),uN=O({__name:"steps-item",props:{index:{},asChild:{type:Boolean}},setup(e){const t=e,n=Qu(),o=I(()=>n.value.getItemState(t));return sN(t),cN(o),Y(),(i,r)=>(w(),E(g(X).div,U(g(n).getItemProps(t),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),dN=O({__name:"steps-list",props:{asChild:{type:Boolean}},setup(e){const t=Qu();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getListProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),hN=O({__name:"steps-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return aN(n),Y(),(o,i)=>(w(),E(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var pN=be("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Wn=pN.build(),fN=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},gN=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Rv=(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}`},mN=(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 vN(e,t){const{context:n,send:o,computed:i,prop:r,scope:a}=e,s=n.get("step"),l=r("count"),c=i("percent"),u=i("hasNextStep"),d=i("hasPrevStep"),h=v=>({triggerId:Rv(a,v.index),contentId:mN(a,v.index),current:v.index===s,completed:v.index<s,incomplete:v.index>s,index:v.index,first:v.index===0,last:v.index===l-1}),p=()=>{o({type:"STEP.NEXT",src:"next.trigger.click"})},m=()=>{o({type:"STEP.PREV",src:"prev.trigger.click"})},f=()=>{o({type:"STEP.RESET",src:"reset.trigger.click"})},b=v=>{o({type:"STEP.SET",value:v,src:"api.setValue"})};return{value:s,count:l,percent:c,hasNextStep:u,hasPrevStep:d,isCompleted:i("completed"),goToNextStep:p,goToPrevStep:m,resetStep:f,getItemState:h,setStep:b,getRootProps(){return t.element({...Wn.root.attrs,id:fN(a),dir:r("dir"),"data-orientation":r("orientation"),style:{"--percent":`${c}%`}})},getListProps(){const v=c$(l).map((y,x)=>Rv(a,x));return t.element({...Wn.list.attrs,dir:r("dir"),id:gN(a),role:"tablist","aria-owns":v.join(" "),"aria-orientation":r("orientation"),"data-orientation":r("orientation")})},getItemProps(v){const y=h(v);return t.element({...Wn.item.attrs,dir:r("dir"),"aria-current":y.current?"step":void 0,"data-orientation":r("orientation")})},getTriggerProps(v){const y=h(v);return t.button({...Wn.trigger.attrs,id:y.triggerId,role:"tab",dir:r("dir"),tabIndex:!r("linear")||y.current?0:-1,"aria-selected":y.current,"aria-controls":y.contentId,"data-state":y.current?"open":"closed","data-orientation":r("orientation"),"data-complete":D(y.completed),"data-current":D(y.current),"data-incomplete":D(y.incomplete),onClick(x){x.defaultPrevented||r("linear")||o({type:"STEP.SET",value:v.index,src:"trigger.click"})}})},getContentProps(v){const y=h(v);return t.element({...Wn.content.attrs,dir:r("dir"),id:y.contentId,role:"tabpanel",tabIndex:0,hidden:!y.current,"data-state":y.current?"open":"closed","data-orientation":r("orientation"),"aria-labelledby":y.triggerId})},getIndicatorProps(v){const y=h(v);return t.element({...Wn.indicator.attrs,dir:r("dir"),"aria-hidden":!0,"data-complete":D(y.completed),"data-current":D(y.current),"data-incomplete":D(y.incomplete)})},getSeparatorProps(v){const y=h(v);return t.element({...Wn.separator.attrs,dir:r("dir"),"data-orientation":r("orientation"),"data-complete":D(y.completed),"data-current":D(y.current),"data-incomplete":D(y.incomplete)})},getNextTriggerProps(){return t.button({...Wn.nextTrigger.attrs,dir:r("dir"),type:"button",disabled:!u,onClick(v){v.defaultPrevented||p()}})},getPrevTriggerProps(){return t.button({dir:r("dir"),...Wn.prevTrigger.attrs,type:"button",disabled:!d,onClick(v){v.defaultPrevented||m()}})},getProgressProps(){return t.element({dir:r("dir"),...Wn.progress.attrs,role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${c}% complete`,"data-complete":D(c===100)})}}}var bN={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:Th(({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}){yN(t("count"),e.get("step"))}}}},yN=(e,t)=>{if(!hs(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};ie()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);function xN(e={},t){const n=sn(ln),o=kn(Cn),i=Ut(),r=I(()=>{var s;const l=Ye(e);return{id:i,dir:o.value.dir,getRootNode:(s=n?.value)==null?void 0:s.getRootNode,...Bn(l),onStepChange:c=>{var u;(u=l.onStepChange)==null||u.call(l,c)},onStepComplete:()=>{var c;(c=l.onStepComplete)==null||c.call(l)}}}),a=Gt(bN,r);return I(()=>vN(a,an))}const wN=O({__name:"steps-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Qu(),n=O1();return Y(),(o,i)=>(w(),E(g(X).button,U(g(t).getTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[I1,rl]=Re("SwitchContext"),_N=O({__name:"switch-context",setup(e){const t=rl();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),CN=O({__name:"switch-control",props:{asChild:{type:Boolean}},setup(e){const t=rl();return Y(),(n,o)=>(w(),E(g(X).span,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),kN=O({__name:"switch-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=rl(),n=ao();return Y(),(o,i)=>{var r;return w(),E(g(X).input,U({"aria-describedby":(r=g(n))==null?void 0:r.ariaDescribedby},g(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),SN=O({__name:"switch-label",props:{asChild:{type:Boolean}},setup(e){const t=rl();return Y(),(n,o)=>(w(),E(g(X).span,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),$N=O({__name:"switch-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return I1(n),Y(),(o,i)=>(w(),E(g(X).label,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var P1=be("switch").parts("root","label","control","thumb"),Nl=P1.build(),A1=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`switch:${e.id}`},Dv=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`switch:${e.id}:label`},EN=e=>{var t;return((t=e.ids)==null?void 0:t.thumb)??`switch:${e.id}:thumb`},TN=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`switch:${e.id}:control`},op=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`switch:${e.id}:input`},ON=e=>e.getById(A1(e)),Vr=e=>e.getById(op(e));function IN(e,t){const{context:n,send:o,prop:i,scope:r}=e,a=!!i("disabled"),s=!!i("readOnly"),l=!!i("required"),c=!!n.get("checked"),u=!a&&n.get("focused"),d=!a&&n.get("focusVisible"),h=!a&&n.get("active"),p={"data-active":D(h),"data-focus":D(u),"data-focus-visible":D(d),"data-readonly":D(s),"data-hover":D(n.get("hovered")),"data-disabled":D(a),"data-state":c?"checked":"unchecked","data-invalid":D(i("invalid")),"data-required":D(l)};return{checked:c,disabled:a,focused:u,setChecked(m){o({type:"CHECKED.SET",checked:m,isTrusted:!1})},toggleChecked(){o({type:"CHECKED.TOGGLE",checked:c,isTrusted:!1})},getRootProps(){return t.label({...Nl.root.attrs,...p,dir:i("dir"),id:A1(r),htmlFor:op(r),onPointerMove(){a||o({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||o({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(m){var f;a||(je(m)===Vr(r)&&m.stopPropagation(),Au()&&((f=Vr(r))==null||f.focus()))}})},getLabelProps(){return t.element({...Nl.label.attrs,...p,dir:i("dir"),id:Dv(r)})},getThumbProps(){return t.element({...Nl.thumb.attrs,...p,dir:i("dir"),id:EN(r),"aria-hidden":!0})},getControlProps(){return t.element({...Nl.control.attrs,...p,dir:i("dir"),id:TN(r),"aria-hidden":!0})},getHiddenInputProps(){return t.input({id:op(r),type:"checkbox",required:i("required"),defaultChecked:c,disabled:a,"aria-labelledby":Dv(r),"aria-invalid":i("invalid"),name:i("name"),form:i("form"),value:i("value"),style:Mu,onFocus(){const m=Os();o({type:"CONTEXT.SET",context:{focused:!0,focusVisible:m}})},onBlur(){o({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(m){if(s){m.preventDefault();return}const f=m.currentTarget.checked;o({type:"CHECKED.SET",checked:f,isTrusted:!0})}})}}}var{not:Vv}=Ct(),PN={props({props:e}){return{defaultChecked:!1,label:"switch",value:"on",...e}},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}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:n,action:o}){e([()=>t("disabled")],()=>{o(["removeFocusIfNeeded"])}),e([()=>n.get("checked")],()=>{o(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:Vv("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Vv("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e("isDisabled"))return ex({pointerNode:ON(t),keyboardNode:Vr(t),isValidKey:o=>o.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return ju({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return oa(Vr(n),{onFieldsetDisabledChange(o){e.set("fieldsetDisabled",o)},onFormReset(){const o=e.initial("checked");t({type:"CHECKED.SET",checked:!!o,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(const n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){const n=Vr(t);n&&Kp(n,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){const n=Vr(t);H0(n,{checked:e.get("checked")})}}}};ie()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);const AN=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=ao(),a=I(()=>{const l=Ye(e);return{id:n,ids:{label:r?.value.ids.label,hiddenInput:r?.value.ids.control},disabled:r?.value.disabled,readOnly:r?.value.readOnly,invalid:r?.value.invalid,required:r?.value.required,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Bn(l),onCheckedChange(c){var u;t?.("checkedChange",c),t?.("update:checked",c.checked),(u=l.onCheckedChange)==null||u.call(l,c)}}}),s=Gt(PN,a);return I(()=>IN(s,an))},RN=O({__name:"switch-root",props:_n({checked:{type:Boolean},defaultChecked:{type:Boolean},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},label:{},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=AN(e,t);return I1(n),Y(),(o,i)=>(w(),E(g(X).label,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),DN=O({__name:"switch-thumb",props:{asChild:{type:Boolean}},setup(e){const t=rl();return Y(),(n,o)=>(w(),E(g(X).span,U(g(t).getThumbProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),Ia=Object.freeze(Object.defineProperty({__proto__:null,Context:_N,Control:CN,HiddenInput:kN,Label:SN,Root:RN,RootProvider:$N,Thumb:DN},Symbol.toStringTag,{value:"Module"}));var R1=be("tabs").parts("root","list","trigger","content","indicator");R1.build();ie()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]);ie()(["disabled","value"]);ie()(["value"]);var VN=be("tagsInput").parts("root","label","control","input","clearTrigger","item","itemPreview","itemInput","itemText","itemDeleteTrigger");VN.build();var MN=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tags-input:${e.id}`},NN=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`tags-input:${e.id}:input`},LN=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`tags-input:${e.id}:hidden-input`},ip=(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}`},FN=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemInput)==null?void 0:o.call(n,t))??`${ip(e,t)}:input`},BN=e=>`${e}:input`,Mv=(e,t)=>e.getById(BN(t)),zN=e=>oi(D1(e),"[data-part=item]"),HN=(e,t)=>e.getById(FN(e,t)),D1=e=>e.getById(MN(e)),Pa=e=>e.getById(NN(e)),V1=e=>e.getById(LN(e)),qi=e=>oi(D1(e),"[data-part=item-preview]:not([data-disabled])"),jN=e=>qi(e)[0],WN=e=>qi(e)[qi(e).length-1],UN=(e,t)=>tf(qi(e),t,!1),GN=(e,t)=>ef(qi(e),t,!1),qN=(e,t)=>qi(e)[t],Aa=(e,t)=>Vu(qi(e),t),YN=(e,t)=>{const n=V1(e);n&&z0(n,{value:t})},{and:Ra,not:_i,or:KN}=Ct();Ra(KN(_i("isAtMax"),"allowOverflow"),_i("isInputValueEmpty")),_i("hasHighlightedTag"),Ra("hasTags","isCaretAtStart"),Ra("hasTags","isCaretAtStart"),Ra("hasTags","isCaretAtStart",_i("isLastTagHighlighted")),_i("isCaretAtStart"),Ra("isTagEditable","hasHighlightedTag"),_i("isCaretAtStart"),_i("isCaretAtStart");ie()(["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"]);ie()(["index","disabled","value"]);var XN=be("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator");XN.build();ie()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]);var M1=be("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),Sr=M1.build(),ZN=e=>`toast-group:${e}`,Nv=(e,t)=>e.getById(`toast-group:${t}`),N1=e=>`toast:${e.id}`,Lv=e=>e.getById(N1(e)),Fv=e=>`toast:${e.id}:title`,Bv=e=>`toast:${e.id}:description`,JN=e=>`toast${e.id}:close`,zv={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function Ud(e,t){return e??zv[t]??zv.DEFAULT}var QN=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;function eL(e,t){var n;const{prop:o,computed:i,context:r}=e,{offsets:a,gap:s}=o("store").attrs,l=r.get("heights"),c=QN(a),u=o("dir")==="rtl",d=t.replace("-start",u?"-right":"-left").replace("-end",u?"-left":"-right"),h=d.includes("right"),p=d.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:R0};let f="center";if(h&&(f="flex-end"),p&&(f="flex-start"),m.alignItems=f,d.includes("top")){const b=c.top;m.top=`max(env(safe-area-inset-top, 0px), ${b})`}if(d.includes("bottom")){const b=c.bottom;m.bottom=`max(env(safe-area-inset-bottom, 0px), ${b})`}if(!d.includes("left")){const b=c.right;m.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${b})`}if(!d.includes("right")){const b=c.left;m.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${b})`}return m}function tL(e,t){const{prop:n,context:o,computed:i}=e,r=n("parent"),a=r.computed("placement"),{gap:s}=r.prop("store").attrs,[l]=a.split("-"),c=o.get("mounted"),u=o.get("remainingTime"),d=i("height"),h=i("frontmost"),p=!h,m=!n("stacked"),f=n("stacked"),b=n("type")==="loading"?Number.MAX_SAFE_INTEGER:u,v=i("heightIndex")*s+i("heightBefore"),y={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${b}ms`,"--initial-height":`${d}px`,"--offset":`${v}px`,"--index":n("index"),"--z-index":i("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},x=_=>Object.assign(y,_);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"}),f&&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&&f&&!t&&x({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),h&&!t&&x({"--y":"calc(var(--lift) * -100%)"}),y}function nL(e,t){const{computed:n}=e,o={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},i=r=>Object.assign(o,r);return n("frontmost")&&!t&&i({height:"calc(var(--initial-height) + 80%)"}),o}function oL(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function iL(e,t){const{context:n,prop:o,send:i,refs:r,computed:a}=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,u=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),d=a("placement"),[h,p="center"]=d.split("-");return t.element({...Sr.group.attrs,dir:o("dir"),tabIndex:-1,"aria-label":`${d} ${l} ${u}`,id:ZN(d),"data-placement":d,"data-side":h,"data-align":p,"aria-live":"polite",role:"region",style:eL(e,d),onMouseEnter(){r.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:d})},onMouseMove(){r.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:d})},onMouseLeave(){r.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_LEAVE",placement:d})},onFocus(m){i({type:"REGION.FOCUS",target:m.relatedTarget})},onBlur(m){r.get("isFocusWithin")&&!Rt(m.currentTarget,m.relatedTarget)&&queueMicrotask(()=>i({type:"REGION.BLUR"}))}})},subscribe(s){return o("store").subscribe(()=>s(n.get("toasts")))}}}var{guards:rL,createMachine:aL}=Fu(),{and:sL}=rL,lL=aL({props({props:e}){return{dir:"ltr",id:sx(),...e,store:e.store}},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:q0.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:sL("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(r=>r.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 Ee(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 Ee(i,"visibilitychange",()=>{const r=i.visibilityState==="hidden";t({type:r?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:o}){var i;const r=t.get("toasts"),a=n("placement"),s=r.length>0;if(!s){(i=e.get("dismissableCleanup"))==null||i();return}if(s&&e.get("dismissableCleanup"))return;const l=Ex(()=>Nv(o,a),{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=Nv(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 cL(e,t){const{state:n,send:o,prop:i,scope:r,context:a,computed:s}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),u=a.get("mounted"),d=s("frontmost"),h=i("parent").computed("placement"),p=i("type"),m=i("stacked"),f=i("title"),b=i("description"),v=i("action"),[y,x="center"]=h.split("-");return{type:p,title:f,description:b,placement:h,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({...Sr.root.attrs,dir:i("dir"),id:N1(r),"data-state":l?"open":"closed","data-type":p,"data-placement":h,"data-align":x,"data-side":y,"data-mounted":D(u),"data-paused":D(c),"data-first":D(d),"data-sibling":D(!d),"data-stack":D(m),"data-overlap":D(!m),role:"status","aria-atomic":"true","aria-describedby":b?Bv(r):void 0,"aria-labelledby":f?Fv(r):void 0,tabIndex:0,style:tL(e,l),onKeyDown(_){_.defaultPrevented||_.key=="Escape"&&(o({type:"DISMISS",src:"keyboard"}),_.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:nL(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:oL()})},getTitleProps(){return t.element({...Sr.title.attrs,id:Fv(r)})},getDescriptionProps(){return t.element({...Sr.description.attrs,id:Bv(r)})},getActionTriggerProps(){return t.button({...Sr.actionTrigger.attrs,type:"button",onClick(_){var k;_.defaultPrevented||((k=v?.onClick)==null||k.call(v),o({type:"DISMISS",src:"user"}))}})},getCloseTriggerProps(){return t.button({id:JN(r),...Sr.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(_){_.defaultPrevented||o({type:"DISMISS",src:"user"})}})}}}var{not:uL}=Ct(),dL={props({props:e}){return rf(e,["id","type","parent","removeDelay"],"toast"),{closable:!0,...e,duration:Ud(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:Ud(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,r)=>r>=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:uL("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 Cd(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return Cd(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return Cd(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return de(()=>{const o=Lv(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};Hv(t("parent"),c)},r=e.getWin(),a=new r.MutationObserver(i);a.observe(o,{childList:!0,subtree:!0,characterData:!0}),n=()=>a.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){de(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{const o=Lv(e);if(!o)return;const i=o.style.height;o.style.height="auto";const r=o.getBoundingClientRect().height;o.style.height=i,n.set("initialHeight",r);const a={id:t("id"),height:r};Hv(t("parent"),a)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",Ud(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 Hv(e,t){const{id:n,height:o}=t;e.context.set("heights",i=>i.find(r=>r.id===n)?i.map(r=>r.id===n?{...r,height:o}:r):[{id:n,height:o},...i])}var hL=(e,t)=>({...t,...Lu(e)});function pL(e={}){const t=hL(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0});let n=[],o=[],i=new Set,r=[];const a=h=>(n.push(h),()=>{const p=n.indexOf(h);n.splice(p,1)}),s=h=>(n.forEach(p=>p(h)),h),l=h=>{if(o.length>=t.max){r.push(h);return}s(h),o.unshift(h)},c=()=>{for(;r.length>0&&o.length<t.max;){const h=r.shift();h&&(s(h),o.unshift(h))}},u=h=>{const p=h.id??`toast:${sx()}`,m=o.find(f=>f.id===p);return i.has(p)&&i.delete(p),m?o=o.map(f=>f.id===p?s({...f,...h,id:p}):f):l({id:p,duration:t.duration,removeDelay:t.removeDelay,type:"info",...h,stacked:!t.overlap,gap:t.gap}),p},d=h=>(i.add(h),h?(n.forEach(p=>p({id:h,dismiss:!0})),o=o.filter(p=>p.id!==h),c()):(o.forEach(p=>{n.forEach(m=>m({id:p.id,dismiss:!0}))}),o=[],r=[]),h);return{attrs:t,subscribe:a,create:u,update:(h,p)=>u({id:h,...p}),remove:d,dismiss:h=>{h!=null?o=o.map(p=>p.id===h?s({...p,message:"DISMISS"}):p):o=o.map(p=>s({...p,message:"DISMISS"}))},error:h=>u({...h,type:"error"}),success:h=>u({...h,type:"success"}),info:h=>u({...h,type:"info"}),warning:h=>u({...h,type:"warning"}),loading:h=>u({...h,type:"loading"}),getVisibleToasts:()=>o.filter(h=>!i.has(h.id)),getCount:()=>o.length,promise:(h,p,m={})=>{if(!p||!p.loading){Ao("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}const f=u({...m,...p.loading,promise:h,type:"loading"});let b=!0,v;const y=fl(h).then(async x=>{if(v=["resolve",x],fL(x)&&!x.ok){b=!1;const _=fl(p.error,`HTTP Error! status: ${x.status}`);u({...m,..._,id:f,type:"error"})}else if(p.success!==void 0){b=!1;const _=fl(p.success,x);u({...m,..._,id:f,type:"success"})}}).catch(async x=>{if(v=["reject",x],p.error!==void 0){b=!1;const _=fl(p.error,x);u({...m,..._,id:f,type:"error"})}}).finally(()=>{var x;b&&d(f),(x=p.finally)==null||x.call(p)});return{id:f,unwrap:()=>new Promise((x,_)=>y.then(()=>v[0]==="reject"?_(v[1]):x(v[1])).catch(_))}},pause:h=>{h!=null?o=o.map(p=>p.id===h?s({...p,message:"PAUSE"}):p):o=o.map(p=>s({...p,message:"PAUSE"}))},resume:h=>{h!=null?o=o.map(p=>p.id===h?s({...p,message:"RESUME"}):p):o=o.map(p=>s({...p,message:"RESUME"}))},isVisible:h=>!i.has(h)&&!!o.find(p=>p.id===h),isDismissed:h=>i.has(h),expand:()=>{o=o.map(h=>s({...h,stacked:!0}))},collapse:()=>{o=o.map(h=>s({...h,stacked:!1}))}}}var fL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",jv={connect:iL,machine:lL};const gL=e=>pL(e),[mL,L1]=Re("ToastContext"),vL=O({__name:"toast-root",props:{asChild:{type:Boolean}},setup(e){const t=L1();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[N("div",ft(yt(g(t).getGhostBeforeProps())),null,16),V(n.$slots,"default"),N("div",ft(yt(g(t).getGhostAfterProps())),null,16)]),_:3},16,["as-child"]))}}),bL=O({__name:"toast-title",props:{asChild:{type:Boolean}},setup(e){const t=L1();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getTitleProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),yL=O({__name:"toaster-item",props:{value:{},index:{},parent:{}},setup(e){const t=e,n=sn(ln),o=I(()=>({...t.value,index:t.index,parent:t.parent,getRootNode:n?.value.getRootNode})),i=Gt(dL,o),r=I(()=>cL(i,an));return mL(r),Y(),(a,s)=>V(a.$slots,"default",ft(yt(t.value)))}}),xL=O({__name:"toaster",props:{toaster:{},asChild:{type:Boolean}},setup(e){const t=e,n=kn(Cn),o=sn(ln),i=Gt(jv.machine,{store:t.toaster,id:Ut(),dir:n?.value.dir,getRootNode:o?.value.getRootNode}),r=I(()=>jv.connect(i,an));return Y(),(a,s)=>(w(),E(g(X).div,ft(yt(r.value.getGroupProps())),{default:C(()=>[(w(!0),M(Se,null,Ie(r.value.getToasts(),(l,c)=>(w(),E(yL,{key:l.id,value:l,parent:g(i),index:c},{default:C(u=>[V(a.$slots,"default",U({ref_for:!0},u))]),_:3},8,["value","parent","index"]))),128))]),_:3},16))}});var wL=be("toggle",["root","indicator"]);wL.build();ie()(["defaultPressed","pressed","onPressedChange","disabled"]);const _L=be("toggle",["root","indicator"]);_L.build();var CL=be("toggle-group").parts("root","item");CL.build();var F1=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`toggle-group:${e.id}`},B1=e=>e.getById(F1(e)),ed=e=>{const t=`[data-ownedby='${CSS.escape(F1(e))}']:not([data-disabled])`;return oi(B1(e),t)},Wv=e=>Nr(ed(e)),kL=e=>Gs(ed(e)),SL=(e,t,n)=>ef(ed(e),t,n),$L=(e,t,n)=>tf(ed(e),t,n),{not:Uv,and:EL}=Ct();Uv(EL("isClickFocus","isTabbingBackward")),Uv("isFirstToggleFocused");ie()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]);ie()(["value","disabled"]);const[z1,sa]=Re("TooltipContext"),TL=O({__name:"tooltip-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=sa();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getArrowTipProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),OL=O({__name:"tooltip-arrow",props:{asChild:{type:Boolean}},setup(e){const t=sa();return Y(),(n,o)=>(w(),E(g(X).div,U(g(t).getArrowProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),IL=O({__name:"tooltip-content",props:{asChild:{type:Boolean}},setup(e){const t=sa(),n=cf(),o=I(()=>qs(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,r)=>g(n).unmounted?oe("",!0):(w(),E(g(X).div,U({key:0},o.value,{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),PL=O({__name:"tooltip-context",setup(e){const t=sa();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),AL=O({__name:"tooltip-positioner",props:{asChild:{type:Boolean}},setup(e){const t=sa(),n=Ks(),o=sf(I(()=>({...n.value,present:t.value.open})));return lf(o),Y(),(i,r)=>g(o).unmounted?oe("",!0):(w(),E(g(X).div,U({key:0},g(t).getPositionerProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),RL=O({__name:"tooltip-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return z1(n),ro(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>V(o.$slots,"default")}});var H1=be("tooltip").parts("trigger","arrow","arrowTip","positioner","content"),Da=H1.build(),j1=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`tooltip:${e.id}:trigger`},DL=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tooltip:${e.id}:content`},VL=e=>{var t;return((t=e.ids)==null?void 0:t.arrow)??`tooltip:${e.id}:arrow`},W1=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tooltip:${e.id}:popper`},Gd=e=>e.getById(j1(e)),Gv=e=>e.getById(W1(e)),bo=V$({id:null});function ML(e,t){const{state:n,context:o,send:i,scope:r,prop:a,event:s}=e,l=a("id"),c=!!a("aria-label"),u=n.matches("open","closing"),d=j1(r),h=DL(r),p=a("disabled"),m=$f({...a("positioning"),placement:o.get("currentPlacement")});return{open:u,setOpen(f){n.matches("open","closing")!==f&&i({type:f?"open":"close"})},reposition(f={}){i({type:"positioning.set",options:f})},getTriggerProps(){return t.button({...Da.trigger.attrs,id:d,dir:a("dir"),"data-expanded":D(u),"data-state":u?"open":"closed","aria-describedby":u?h:void 0,onClick(f){f.defaultPrevented||p||a("closeOnClick")&&i({type:"close",src:"trigger.click"})},onFocus(f){queueMicrotask(()=>{f.defaultPrevented||p||s.src!=="trigger.pointerdown"&&Os()&&i({type:"open",src:"trigger.focus"})})},onBlur(f){f.defaultPrevented||p||l===bo.get("id")&&i({type:"close",src:"trigger.blur"})},onPointerDown(f){f.defaultPrevented||p||Ni(f)&&a("closeOnPointerDown")&&l===bo.get("id")&&i({type:"close",src:"trigger.pointerdown"})},onPointerMove(f){f.defaultPrevented||p||f.pointerType!=="touch"&&i({type:"pointer.move"})},onPointerLeave(){p||i({type:"pointer.leave"})},onPointerCancel(){p||i({type:"pointer.leave"})}})},getArrowProps(){return t.element({id:VL(r),...Da.arrow.attrs,dir:a("dir"),style:m.arrow})},getArrowTipProps(){return t.element({...Da.arrowTip.attrs,dir:a("dir"),style:m.arrowTip})},getPositionerProps(){return t.element({id:W1(r),...Da.positioner.attrs,dir:a("dir"),style:m.floating})},getContentProps(){return t.element({...Da.content.attrs,dir:a("dir"),hidden:!u,"data-state":u?"open":"closed",role:c?void 0:"tooltip",id:c?void 0:h,"data-placement":o.get("currentPlacement"),onPointerEnter(){i({type:"content.pointer.move"})},onPointerLeave(){i({type:"content.pointer.leave"})},style:{pointerEvents:a("interactive")?"auto":"none"}})}}}var{and:NL,not:qv}=Ct(),LL={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:NL("noVisibleTooltip",qv("hasPointerMoveOpened")),target:"opening"},{guard:qv("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:()=>bo.get("id")===null,isVisible:({prop:e})=>e("id")===bo.get("id"),isInteractive:({prop:e})=>!!e("interactive"),hasPointerMoveOpened:({context:e})=>e.get("hasPointerMoveOpened"),isOpenControlled:({prop:e})=>e("open")!==void 0},actions:{setGlobalId:({prop:e})=>{bo.set("id",e("id"))},clearGlobalId:({prop:e})=>{e("id")===bo.get("id")&&bo.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=()=>Gv(o);return on(Gd(o),i,{...n("positioning"),...t.options,defer:!0,listeners:!1,onComplete(r){e.set("currentPlacement",r.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 ju({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=()=>Gv(n);return on(Gd(n),o,{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},trackPointerlockChange:({send:e,scope:t})=>{const n=t.getDoc();return Ee(n,"pointerlockchange",()=>e({type:"close",src:"pointerlock:change"}),!1)},trackScroll:({send:e,prop:t,scope:n})=>{if(!t("closeOnScroll"))return;const o=Gd(n);if(!o)return;const i=X0(o).map(r=>Ee(r,"scroll",()=>{e({type:"close",src:"scroll"})},{passive:!0,capture:!0}));return()=>{i.forEach(r=>r?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=bo.subscribe(()=>{bo.get("id")!==e("id")&&t({type:"close",src:"id.change"})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t("closeOnEscape")?Ee(document,"keydown",n=>{Ss(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)}}}};ie()(["aria-label","closeDelay","closeOnEscape","closeOnPointerDown","closeOnScroll","closeOnClick","dir","disabled","getRootNode","id","ids","interactive","onOpenChange","defaultOpen","open","openDelay","positioning"]);const FL=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),r=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Bn(s),onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)}}}),a=Gt(LL,r);return I(()=>ML(a,an))},BL=O({__name:"tooltip-root",props:_n({"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=FL(n,t);return z1(o),ro(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,r)=>V(i.$slots,"default")}}),zL=O({__name:"tooltip-trigger",props:{asChild:{type:Boolean}},setup(e){const t=sa();return Y(),(n,o)=>(w(),E(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),gr=Object.freeze(Object.defineProperty({__proto__:null,Arrow:OL,ArrowTip:TL,Content:IL,Context:PL,Positioner:AL,Root:BL,RootProvider:RL,Trigger:zL},Symbol.toStringTag,{value:"Module"}));var U1=be("tour").parts("content","actionTrigger","closeTrigger","progressText","title","description","positioner","arrow","arrowTip","backdrop","spotlight");U1.build();var HL=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tour-positioner-${e.id}`},jL=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tour-content-${e.id}`},WL=e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`tour-backdrop-${e.id}`},$c=e=>e.getById(jL(e)),G1=e=>e.getById(HL(e)),UL=e=>e.getById(WL(e));function GL(e){return de(()=>{const t=$c(e);if(!t)return;const n=jr(t),o=G1(e),i=UL(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 qL=e=>e?.type==="tooltip",YL=e=>e?.type==="dialog",KL=e=>e?.type==="wait",q1=e=>e.filter(t=>t.type!=="wait"),XL=(e,t)=>{const n=q1(e).length;return(t+1)/n},ZL=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,JL=(e,t)=>{const n=t!=null?e.find(o=>o.id===t):null;return n?ZL(n):null},su=(e,t)=>t!=null?e.findIndex(n=>n.id===t):-1;function Yv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var QL=e=>{let t=e.clientX,n=e.clientY,o=e.view||window,i=Yv(o);for(;i;){const r=i.getBoundingClientRect(),a=getComputedStyle(i),s=r.left+(i.clientLeft+parseFloat(a.paddingLeft)),l=r.top+(i.clientTop+parseFloat(a.paddingTop));t+=s,n+=l,o=Ke(i),i=Yv(o)}return{clientX:t,clientY:n}};function eF(e,t){const{clientX:n,clientY:o}=QL(t);return e.y<=o&&o<=e.y+e.height&&e.x<=n&&n<=e.x+e.width}function tF(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:qd}=Ct();qd("isValidStep","hasResolvedTarget"),qd("isValidStep","hasTarget"),qd("isValidStep","isWaitingStep");var jo=class{constructor(t){this.params=t}transitionToStep(t){const n=this.params.context.get("steps"),o=ds(t)?su(n,t):t;this.transitionTo(o)}next(t){const n=this.params.context.get("steps"),o=qc(n,t);this.transitionTo(o)}prev(t){const n=this.params.context.get("steps"),o=ox(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,r=o.get("_prevTarget");if(t!==r&&((n=o.get("_targetCleanup"))==null||n(),o.set("_targetCleanup",void 0)),!t){o.set("_prevTarget",null);return}t!==r&&(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(bt(n.get("stepId"),i.id)){o.set("_runningEffect",!1);return}this.cleanup();const r=this.createUtilities(i,t);i.effect?this.executeEffect(i,r):r.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:r}=this.params,a=o.get("steps");return{show:()=>{o.set("stepId",t.id)},update:s=>{o.set("steps",l=>l.map((c,u)=>u===n?{...c,...s}:c))},next:()=>{const s=qc(a,i("stepIndex"));this.transitionTo(s)},goto:s=>{const l=su(a,s);if(l===-1){Ao(`[zag-js/tour] Step with id "${s}" not found`);return}this.transitionTo(l)},dismiss:()=>{var s;o.set("stepId",null),(s=r("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(r){o.set("_runningEffect",!1),console.error(r);return}o.set("_effectCleanup",i),KL(t)&&n.show(),queueMicrotask(()=>{queueMicrotask(()=>{o.set("_runningEffect",!1)})})}};ie()(["closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","keyboardNavigation","onFocusOutside","onInteractOutside","onPointerDownOutside","onStatusChange","onStepChange","onStepsChange","preventInteraction","spotlightOffset","spotlightRadius","stepId","steps","translations"]);U1.extendWith("control");ge({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 nF={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"}},oF=Qi({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:nF}}),iF=O({__name:"Badge",props:{variant:{default:"neutral"},type:{default:"decorative"}},setup(e){const t=e,n=I(()=>oF({variant:t.variant,type:t.type}));return(o,i)=>(w(),M("div",{class:L(n.value)},[V(o.$slots,"default")],2))}}),rF={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"};function aF(e,t){return w(),M("svg",rF,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_2115_3244)"},[N("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),N("defs",null,[N("clipPath",{id:"clip0_2115_3244"},[N("rect",{width:"12",height:"12",fill:"currentColor"})])],-1)])])}const sF={render:aF};ge({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"}});ge({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 lF={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)"}}},cF={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"}}};ge({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:lF,size:cF,isAnimationDisabled:{true:{root:{animation:"none",boxShadow:"none"}}}},defaultVariants:{variant:"default",size:"small",isAnimationDisabled:!1}});const uF={xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",viewBox:"0 0 6 8",fill:"none"};function dF(e,t){return w(),M("svg",uF,[...t[0]||(t[0]=[N("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 hF={render:dF};ge({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:{}});ge({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:{...ht.default,height:"xxl",boxShadow:"none"},prefix:{width:"16",height:"16",fontSize:"base"}},small:{root:{...ht.default,height:"xl",fontSize:"sm",boxShadow:"none"},prefix:{width:"14",height:"14"}}}}});ge({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:{...ht.primary,boxShadow:"none"}},default:{root:{...ht.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 pF={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"};function fF(e,t){return w(),M("svg",pF,[...t[0]||(t[0]=[N("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 Y1={render:fF},gF={width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mF(e,t){return w(),M("svg",gF,[...t[0]||(t[0]=[N("path",{id:"Vector",d:"M0 1.0361L8 0.963898",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const vF={render:mF},bF={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yF(e,t){return w(),M("svg",bF,[...t[0]||(t[0]=[N("g",{id:"icon-information","clip-path":"url(#clip0_2674_19124)"},[N("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),N("defs",null,[N("clipPath",{id:"clip0_2674_19124"},[N("rect",{width:"14",height:"14",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const Yi={render:yF},xF=ge({className:"tooltip",slots:H1.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"}}}}),wF={key:0,class:"tooltip-content"},Xo=O({__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=I(()=>xF());return(o,i)=>(w(),E(g(gr).Root,{positioning:{placement:t.placement}},{default:C(()=>[j(g(gr).Trigger,{class:L(n.value.trigger)},{default:C(()=>[V(o.$slots,"default")]),_:3},8,["class"]),j(g(gr).Positioner,{class:L(n.value.positioner)},{default:C(()=>[j(g(gr).Content,{class:L(n.value.content)},{default:C(()=>[j(g(gr).Arrow,{class:L(n.value.arrow)},{default:C(()=>[j(g(gr).ArrowTip,{class:L(n.value.arrowTip)},null,8,["class"])]),_:1},8,["class"]),t.title?(w(),M("div",wF,se(t.title),1)):V(o.$slots,"content",{key:1})]),_:3},8,["class"])]),_:3},8,["class"])]),_:3},8,["positioning"]))}}),_F=ge({className:"checkbox",slots:df.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"}}),CF={class:"checkbox-root"},kF={key:0,class:"checkbox-label-content"},SF={key:0,class:"checkbox-label-description"},$F=O({__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=_F();return(r,a)=>(w(),M("div",CF,[j(g(dr).Root,{class:L(g(i).root),checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],onCheckedChange:a[0]||(a[0]=s=>o("checkedChange",s))},{default:C(()=>[j(g(dr).Control,{class:L(g(i).control)},{default:C(()=>[j(g(dr).Indicator,{class:L(g(i).indicator)},{default:C(()=>[j(g(Y1))]),_:1},8,["class"]),j(g(dr).Indicator,{indeterminate:"",class:L([g(i).indicator,"indeterminate-icon"])},{default:C(()=>[j(g(vF))]),_:1},8,["class"])]),_:1},8,["class"]),n.hasLabel||e.iconTooltip?(w(),M("div",kF,[j(g(dr).Label,{class:L(g(i).label)},{default:C(()=>[V(r.$slots,"default",{},void 0,!0)]),_:3},8,["class"]),e.iconTooltip?(w(),E(Xo,{key:0,title:e.iconTooltip},{default:C(()=>[(w(),E(At(e.suffixIcon&&g(Yi)),{class:"suffix-icon"}))]),_:1},8,["title"])):(w(),E(At(e.suffixIcon&&g(Yi)),{key:1,class:"suffix-icon"}))])):oe("",!0),j(g(dr).HiddenInput)]),_:3},8,["class","checked","disabled","aria-labelledby"]),e.description?(w(),M("p",SF,se(e.description),1)):oe("",!0)]))}}),K1=iT($F,[["__scopeId","data-v-8f1bced0"]]);ge({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}});ge({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"}}});ge({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:{}}});ge({className:"radioGroup",slots:[...Ff.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:{}});const EF=ge({className:"switch",slots:[...P1.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"}}}),TF={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function OF(e,t){return w(),M("svg",TF,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.93933 9.24999L4.46966 8.71966L7.29288 5.89644C7.68341 5.50592 8.31657 5.50592 8.7071 5.89644L11.5303 8.71966L12.0607 9.24999L11 10.3107L10.4697 9.78032L7.99999 7.31065L5.53032 9.78032L4.99999 10.3107L3.93933 9.24999Z",fill:"#60646C",style:{fill:"color(display-p3 0.3760 0.3920 0.4240)","fill-opacity":"1"}},null,-1)])])}const mr={render:OF},IF=ge({slots:[...Hw.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"}}}}}),PF=O({__name:"DatePicker",props:{isDisabled:{type:Boolean},placeholder:{default:"Select a date"},isClearable:{type:Boolean},closeOnSelect:{type:Boolean},defaultFocusedValue:{},defaultOpen:{type:Boolean,default:!1},defaultValue:{},defaultView:{},disabled:{type:Boolean},fixedWeeks:{type:Boolean},focusedValue:{},format:{},id:{},ids:{},isDateUnavailable:{},locale:{},max:{},maxView:{},min:{},minView:{},modelValue:{},name:{},numOfMonths:{},open:{type:Boolean},outsideDaySelectable:{type:Boolean},parse:{},positioning:{},readOnly:{type:Boolean},selectionMode:{},startOfWeek:{},timeZone:{},translations:{},view:{},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},emits:["focusChange","openChange","valueChange","viewChange","update:modelValue","update:open","update:view","update:focusedValue"],setup(e,{emit:t}){const n=e,o=lt(n,t),i=I(()=>IF({}));return(r,a)=>(w(),E(g(we).Root,U(g(o),{class:i.value.root,disabled:n.isDisabled,defaultOpen:n.defaultOpen,positioning:{placement:"bottom-start"}}),{default:C(()=>[j(g(we).Control,{class:L(i.value.control)},{default:C(()=>[j(g(we).Trigger,{asChild:""},{default:C(()=>[V(r.$slots,"trigger",{},()=>[j(Xn,{type:"primary",size:"small",disabled:n.isDisabled,"data-testid":"date-picker-trigger"},{default:C(()=>[Ne(se(n.placeholder),1)]),_:1},8,["disabled"])])]),_:3}),n.isClearable?(w(),E(g(we).ClearTrigger,{key:0,class:L(i.value.clearTrigger)},{default:C(()=>[...a[0]||(a[0]=[Ne(" Clear ",-1)])]),_:1},8,["class"])):oe("",!0)]),_:3},8,["class"]),j(g(we).Positioner,{class:L(i.value.positioner)},{default:C(()=>[j(g(we).Content,{class:L(i.value.content)},{default:C(()=>[j(g(we).View,{view:"day"},{default:C(()=>[j(g(we).Context,null,{default:C(s=>[j(g(we).ViewControl,{class:L(i.value.viewControl)},{default:C(()=>[j(g(we).ViewTrigger,{class:L(i.value.viewTrigger),asChild:""},{default:C(()=>[N("span",null,se(s.visibleRangeText.start),1)]),_:2},1032,["class"]),j(g(we).PrevTrigger,{asChild:"",class:L(i.value.prevTrigger)},{default:C(()=>[j(cr,{type:"subtle",size:"small"},{prefixIcon:C(()=>[j(g(mr))]),_:1})]),_:1},8,["class"]),j(g(we).NextTrigger,{asChild:"",class:L(i.value.nextTrigger)},{default:C(()=>[j(cr,{type:"subtle",size:"small"},{prefixIcon:C(()=>[j(g(mr))]),_:1})]),_:1},8,["class"])]),_:2},1032,["class"]),j(g(we).Table,{class:L(i.value.table)},{default:C(()=>[j(g(we).TableHead,null,{default:C(()=>[j(g(we).TableRow,null,{default:C(()=>[(w(!0),M(Se,null,Ie(s.weekDays,(l,c)=>(w(),E(g(we).TableHeader,{key:c,class:L(i.value.tableHeader)},{default:C(()=>[Ne(se(l.short.slice(0,2)),1)]),_:2},1032,["class"]))),128))]),_:2},1024)]),_:2},1024),j(g(we).TableBody,null,{default:C(()=>[(w(!0),M(Se,null,Ie(s.weeks,(l,c)=>(w(),E(g(we).TableRow,{key:c},{default:C(()=>[(w(!0),M(Se,null,Ie(l,(u,d)=>(w(),E(g(we).TableCell,{key:d,value:u,class:L(i.value.tableCell)},{default:C(()=>[j(g(we).TableCellTrigger,{class:L(i.value.tableCellTrigger)},{default:C(()=>[Ne(se(u.day),1)]),_:2},1032,["class"])]),_:2},1032,["value","class"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["class"])]),_:1})]),_:1}),j(g(we).View,{view:"month"},{default:C(()=>[j(g(we).Context,null,{default:C(s=>[j(g(we).ViewControl,{class:L(i.value.viewControl)},{default:C(()=>[j(g(we).PrevTrigger,{asChild:"",class:L(i.value.prevTrigger)},{default:C(()=>[j(cr,{type:"subtle",size:"small"},{prefixIcon:C(()=>[j(g(mr))]),_:1})]),_:1},8,["class"]),j(g(we).ViewTrigger,{class:L(i.value.viewTrigger)},{default:C(()=>[j(g(we).RangeText)]),_:1},8,["class"]),j(g(we).NextTrigger,{asChild:"",class:L(i.value.nextTrigger)},{default:C(()=>[j(cr,{type:"subtle",size:"small"},{prefixIcon:C(()=>[j(g(mr))]),_:1})]),_:1},8,["class"])]),_:1},8,["class"]),j(g(we).Table,null,{default:C(()=>[j(g(we).TableBody,null,{default:C(()=>[(w(!0),M(Se,null,Ie(s.getMonthsGrid({columns:4,format:"short"}),(l,c)=>(w(),E(g(we).TableRow,{key:c},{default:C(()=>[(w(!0),M(Se,null,Ie(l,(u,d)=>(w(),E(g(we).TableCell,{key:d,value:u.value},{default:C(()=>[j(g(we).TableCellTrigger,{class:L(i.value.tableCellTrigger)},{default:C(()=>[Ne(se(u.label),1)]),_:2},1032,["class"])]),_:2},1032,["value"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1})]),_:1}),j(g(we).View,{view:"year"},{default:C(()=>[j(g(we).Context,null,{default:C(s=>[j(g(we).ViewControl,{class:L(i.value.viewControl)},{default:C(()=>[j(g(we).PrevTrigger,{asChild:"",class:L(i.value.prevTrigger)},{default:C(()=>[j(cr,{type:"subtle",size:"small"},{prefixIcon:C(()=>[j(g(mr))]),_:1})]),_:1},8,["class"]),j(g(we).ViewTrigger,{class:L(i.value.viewTrigger)},{default:C(()=>[j(g(we).RangeText)]),_:1},8,["class"]),j(g(we).NextTrigger,{asChild:"",class:L(i.value.nextTrigger)},{default:C(()=>[j(cr,{type:"subtle",size:"small"},{prefixIcon:C(()=>[j(g(mr))]),_:1})]),_:1},8,["class"])]),_:1},8,["class"]),j(g(we).Table,null,{default:C(()=>[j(g(we).TableBody,null,{default:C(()=>[(w(!0),M(Se,null,Ie(s.getYearsGrid({columns:4}),(l,c)=>(w(),E(g(we).TableRow,{key:c},{default:C(()=>[(w(!0),M(Se,null,Ie(l,(u,d)=>(w(),E(g(we).TableCell,{key:d,value:u.value},{default:C(()=>[j(g(we).TableCellTrigger,{class:L(i.value.tableCellTrigger)},{default:C(()=>[Ne(se(u.label),1)]),_:2},1032,["class"])]),_:2},1032,["value"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1})]),_:1})]),_:1},8,["class"])]),_:1},8,["class"])]),_:3},16,["class","disabled","defaultOpen"]))}});ge({className:"drawer",slots:[...jw.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 Ll={default:"text.muted",error:"text.error-hover",warning:"text.warning-hover",success:"text.success-hover"};ge({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:Ll.default}},error:{message:{color:Ll.error}},warning:{message:{color:Ll.warning}},success:{message:{color:Ll.success}}}},defaultVariants:{type:"default"}});ge({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 AF={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function RF(e,t){return w(),M("svg",AF,[...t[0]||(t[0]=[N("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 DF={render:RF},VF=ge({slots:[...qw.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}}),MF=O({__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=lt(n,t),i=I(()=>VF({variant:n.variant,disabled:n.isDisabled})),r=a=>{if(a===0)return"0 Bytes";const s=1024,l=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,c)).toFixed(1))+" "+l[c]};return(a,s)=>(w(),E(g(pn).Root,U(g(o),{class:i.value.root,disabled:n.isDisabled,"data-testid":"atlantis-file-upload"}),{default:C(()=>[n.label?(w(),E(g(pn).Label,{key:0,class:L(i.value.label),"data-testid":"atlantis-file-upload-label"},{default:C(()=>[Ne(se(n.label),1)]),_:1},8,["class"])):oe("",!0),n.showDropzone?(w(),E(g(pn).Dropzone,{key:1,class:L(i.value.dropzone),"data-testid":"atlantis-file-upload-dropzone"},{default:C(()=>[V(a.$slots,"dropzone",{},()=>[N("div",{class:L(i.value.dropzoneContent)},[N("span",{class:L(i.value.dropzoneText)},se(n.placeholder),3),j(g(pn).Trigger,{class:L(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:C(()=>[Ne(se(n.triggerLabel),1)]),_:1},8,["class"])],2)])]),_:3},8,["class"])):oe("",!0),n.showDropzone?oe("",!0):(w(),E(g(pn).Trigger,{key:2,class:L(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:C(()=>[V(a.$slots,"trigger",{},()=>[N("span",null,se(n.triggerLabel),1)])]),_:3},8,["class"])),j(g(pn).ItemGroup,{class:L(i.value.itemGroup)},{default:C(()=>[j(g(pn).Context,null,{default:C(({acceptedFiles:l})=>[(w(!0),M(Se,null,Ie(l,c=>(w(),E(g(pn).Item,{key:c.name,file:c,class:L(i.value.item),"data-testid":"atlantis-file-upload-item"},{default:C(()=>[N("div",{class:L(i.value.itemInfo)},[j(g(pn).ItemName,{class:L(i.value.itemName)},null,8,["class"]),j(g(pn).ItemSizeText,{class:L(i.value.itemSizeText)},{default:C(()=>[Ne(se(r(c.size)),1)]),_:2},1032,["class"])],2),j(g(pn).ItemDeleteTrigger,{class:L(i.value.itemDeleteTrigger),"data-testid":"atlantis-file-upload-delete"},{default:C(()=>[j(g(DF),{class:L(i.value.deleteIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["file","class"]))),128))]),_:1})]),_:1},8,["class"]),j(g(pn).HiddenInput,{"data-testid":"atlantis-file-upload-input"})]),_:3},16,["class","disabled"]))}});ge({slots:["root","checkboxItem","radioItemGroup","radioItem","itemDescription","section",...u1.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"}});ge({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 NF=Qi({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"}}}}),LF=O({__name:"Heading",props:{as:{default:"h2"}},setup(e){const t=e,n=I(()=>NF(t));return(o,i)=>(w(),E(At(e.as),{class:L(n.value)},{default:C(()=>[V(o.$slots,"default")]),_:3},8,["class"]))}}),FF={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function BF(e,t){return w(),M("svg",FF,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_9565_3071)"},[N("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),N("defs",null,[N("clipPath",{id:"clip0_9565_3071"},[N("rect",{width:"12",height:"12",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const zF={render:BF},vr={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},iconDimensions:{fontSize:"1.1em",width:"1.1em",height:"1.1em"}},HF={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"}}}},jF={gray:{prePostInput:{background:"background.hover"}},white:{prePostInput:{background:"background.default"}}},ho=ge({slots:["root","input","prefix","suffix","prePostInput","preInput","postInput","shortcut","clearIconContainer"],base:{root:{...vr.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)":vr.iconDimensions},input:{height:"xxl",borderRadius:"md",flex:"1",border:"none",outline:"none",padding:"0",minWidth:"0",background:"transparent","&::placeholder":{color:"text.placeholder"}},prefix:{...vr.flexCenter,flexShrink:"0"},suffix:{...vr.flexCenter,flexShrink:"0"},clearIconContainer:{...vr.flexCenter,width:"12",height:"12",cursor:"pointer",color:"icon.disabled",_hover:{color:"icon.muted"}},prePostInput:{...vr.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:HF,theme:jF,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"}}),WF=["placeholder","disabled","list","autofocus"],UF={key:1,id:"input-datalist"},GF=["value"],al=O({__name:"Input",props:{variant:{default:"default"},state:{default:"idle"},placeholder:{default:""},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,{expose:t,emit:n}){const o=e,i=fe(null),r=fe(o.modelValue??""),a=I(()=>o.state==="disabled"||o.disabled),s=I(()=>[ho({variant:o.variant,state:a.value?"disabled":"idle",isBordered:o.isBordered,hasPreInput:o.preInput!=="",hasPostInput:o.postInput!=="",hasBackground:o.hasBackground}).root]),l=I(()=>ho({state:a.value?"disabled":"idle"}).input),c=I(()=>[ho({variant:o.variant}).prePostInput,ho({theme:o.prePostInputTheme}).prePostInput]),u=I(()=>[...c.value,ho({variant:o.variant}).preInput]),d=I(()=>[...c.value,ho({variant:o.variant}).postInput]),h=I(()=>ho().prefix),p=I(()=>ho().suffix),m=I(()=>ho().clearIconContainer),f=()=>r.value="",b=()=>{var y;(y=i.value)==null||y.focus()};t({focus:b});const v=n;return ze(r,y=>{v("update:modelValue",y)}),ze(()=>o.modelValue,y=>{y!==r.value&&(r.value=y??"")}),(y,x)=>(w(),M("div",{class:L(s.value),onClick:ei(b,["stop"]),onKeydown:_h(b,["enter"])},[o.preInput?(w(),M("div",{key:0,class:L(u.value)},[N("span",null,se(o.preInput),1)],2)):oe("",!0),V(y.$slots,"prefixIcon",{},()=>[e.prefixText?(w(),M("span",{key:0,class:L(h.value)},se(e.prefixText),3)):oe("",!0)]),x0(N("input",U({ref_key:"inputRef",ref:i,role:"textbox"},y.$attrs,{placeholder:e.placeholder,disabled:a.value,list:e.isAutocompleteEnable?"input-datalist":void 0,class:l.value,"onUpdate:modelValue":x[0]||(x[0]=_=>r.value=_),autofocus:e.autofocus}),null,16,WF),[[ZC,r.value]]),e.isAutocompleteEnable?(w(),M("datalist",UF,[(w(!0),M(Se,null,Ie(e.options,_=>(w(),M("option",{key:_,value:_},null,8,GF))),128))])):oe("",!0),V(y.$slots,"suffixIcon",{},()=>[e.suffixText?(w(),M("span",{key:0,class:L(p.value)},se(e.suffixText),3)):oe("",!0)]),j(Zc,{keys:e.shortcutKeys,type:"default"},null,8,["keys"]),e.canClear&&r.value?(w(),M("span",{key:2,class:L(m.value),onClick:ei(f,["stop"]),onKeydown:_h(f,["enter"]),"data-testid":"clear"},[j(g(zF))],34)):oe("",!0),o.postInput?(w(),M("div",{key:3,class:L(d.value)},[N("span",null,se(o.postInput),1)],2)):oe("",!0)],34))}}),qF=ge({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"}}}),YF=["for"],Bf=O({__name:"Label",props:{for:{},mandatory:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},iconTooltip:{},badgeVariant:{default:"neutral"},badgeLabel:{},description:{}},setup(e){const t=e,n=qF();return(o,i)=>(w(),M("label",{class:L(g(n).root),for:t.for},[N("span",{class:L(g(n).text)},[V(o.$slots,"default"),t.mandatory?(w(),M("span",{key:0,class:L(g(n).mandatoryIndicator)},"*",2)):oe("",!0),e.iconTooltip?(w(),E(Xo,{key:1,title:e.iconTooltip},{default:C(()=>[(w(),E(At(e.suffixIcon&&g(Yi)),{class:L(g(n).suffixIcon)},null,8,["class"]))]),_:1},8,["title"])):(w(),E(At(e.suffixIcon&&g(Yi)),{key:2,class:L(g(n).suffixIcon)},null,8,["class"])),e.badgeVariant&&e.badgeLabel?(w(),E(iF,{key:3,variant:e.badgeVariant},{default:C(()=>[Ne(se(t.badgeLabel),1)]),_:1},8,["variant"])):oe("",!0)],2),t.description?(w(),M("span",{key:0,class:L(g(n).description)},se(t.description),3)):oe("",!0)],10,YF))}});ge({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"}}}}});ge({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}});ge({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"}});ge({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"}}}}}});ge({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"}}}}});ge({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"}});const KF=ge({className:"numberInput",slots:[...m1.keys(),"triggerGroup"],base:{root:{display:"flex",flexDirection:"column",gap:"4",width:"100%"},label:{color:"text.default",fontSize:"base",fontFamily:"sans",fontWeight:"medium",lineHeight:"lg"},control:{display:"flex",alignItems:"center",width:"100%",height:"xxl",px:"6",py:"6",columnGap:"6",borderRadius:"md",boxSizing:"border-box",boxShadow:"stroke-bordered-interactive",backgroundColor:"background.gray-subtlest-default",cursor:"text",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",_hover:{backgroundColor:"background.gray-subtlest-hover"},_focusWithin:{boxShadow:"state-focus-primary"},_invalid:{boxShadow:"state-error",_focusWithin:{boxShadow:"state-focus-critical"}},_disabled:{cursor:"not-allowed",backgroundColor:"background.disabled",boxShadow:"none",_hover:{backgroundColor:"background.disabled"},_focusWithin:{boxShadow:"none"}}},input:{flex:"1",height:"xxl",border:"none",outline:"none",padding:"0",minWidth:"0",background:"transparent",fontSize:"base",fontFamily:"sans",color:"text.default","&::placeholder":{color:"text.placeholder"},_disabled:{cursor:"not-allowed",color:"text.subtle","&::placeholder":{color:"text.placeholder"}}},triggerGroup:{display:"flex",flexDirection:"column",flexShrink:"0",height:"100%"},incrementTrigger:{display:"flex",alignItems:"center",justifyContent:"center",flex:"1",cursor:"pointer",color:"icon.muted",border:"none",background:"transparent",padding:"0",_hover:{color:"icon.default"},_disabled:{cursor:"not-allowed",color:"icon.disabled"},"& svg":{width:"12",height:"12"}},decrementTrigger:{display:"flex",alignItems:"center",justifyContent:"center",flex:"1",cursor:"pointer",color:"icon.muted",border:"none",background:"transparent",padding:"0",_hover:{color:"icon.default"},_disabled:{cursor:"not-allowed",color:"icon.disabled"},"& svg":{width:"12",height:"12"}},scrubber:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"ew-resize",color:"icon.muted",flexShrink:"0","& svg":{width:"12",height:"12"}}}});const Kv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),ZF=e=>{const t=XF(e);return t.charAt(0).toUpperCase()+t.slice(1)},JF=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),Xv=e=>e==="";var Va={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 QF=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":r,size:a=Va.width,color:s=Va.stroke,...l},{slots:c})=>Pt("svg",{...Va,...l,width:a,height:a,stroke:s,"stroke-width":Xv(n)||Xv(o)||n===!0||o===!0?Number(i||r||Va["stroke-width"])*24/Number(a):i||r||Va["stroke-width"],class:JF("lucide",l.class,...e?[`lucide-${Kv(ZF(e))}-icon`,`lucide-${Kv(e)}`]:["lucide-icon"])},[...t.map(u=>Pt(...u)),...c.default?[c.default()]:[]]);const X1=(e,t)=>(n,{slots:o,attrs:i})=>Pt(QF,{...i,...n,iconNode:t,name:e},o);const e3=X1("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const t3=X1("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),n3=O({__name:"NumberInput",props:{allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean},label:{}},emits:["focusChange","valueChange","valueInvalid","update:modelValue"],setup(e,{emit:t}){const n=lt(e,t),o=I(()=>KF());return(i,r)=>(w(),E(g(xi).Root,U(g(n),{class:o.value.root}),{default:C(()=>[e.label?(w(),E(g(xi).Label,{key:0,class:L(o.value.label)},{default:C(()=>[Ne(se(e.label),1)]),_:1},8,["class"])):oe("",!0),j(g(xi).Control,{class:L(o.value.control)},{default:C(()=>[i.$slots.scrubber?(w(),E(g(xi).Scrubber,{key:0,class:L(o.value.scrubber)},{default:C(()=>[V(i.$slots,"scrubber")]),_:3},8,["class"])):oe("",!0),j(g(xi).Input,{class:L(o.value.input)},null,8,["class"]),N("div",{class:L(o.value.triggerGroup)},[j(g(xi).IncrementTrigger,{class:L(o.value.incrementTrigger)},{default:C(()=>[j(g(e3))]),_:1},8,["class"]),j(g(xi).DecrementTrigger,{class:L(o.value.decrementTrigger)},{default:C(()=>[j(g(t3))]),_:1},8,["class"])],2)]),_:3},8,["class"])]),_:3},16,["class"]))}});ge({slots:[...w1.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 Zv=ge({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}}),o3=["id","aria-label"],i3=["id","aria-selected","aria-disabled","tabindex","onClick","onKeydown","data-state"],Z1=O({__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=fe(n.modelValue);y0(()=>{i.value=n.modelValue});const r=I(()=>Zv({size:n.size,isDisabled:n.isDisabled})),a=u=>{n.isDisabled||u.isDisabled||(i.value=u.value,o("update:modelValue",u.value),o("change",u.value))},s=(u,d,h)=>{var p,m;if(n.isDisabled)return;const f=n.options.filter(v=>!v.isDisabled),b=f.findIndex(v=>v.value===d.value);switch(u.preventDefault(),u.key){case"ArrowRight":case"ArrowDown":if(b<f.length-1){const v=f[b+1];a(v),(p=document.getElementById(`segmented-item-${v.value}`))==null||p.focus()}break;case"ArrowLeft":case"ArrowUp":if(b>0){const v=f[b-1];a(v),(m=document.getElementById(`segmented-item-${v.value}`))==null||m.focus()}break;case"Enter":case" ":a(d);break}},l=u=>n.isDisabled||u.isDisabled?"disabled":u.value===i.value?"active":"idle",c=u=>{var d,h;const p=l(u);return Zv({state:p,hasIcon:!!u.icon,hasShortcut:!!((d=u.shortcutKeys)!=null&&d.length)||!!((h=u.counterKey)!=null&&h.length),hasDependentField:!!u.hasDependentField,size:n.size,isDisabled:n.isDisabled||u.isDisabled})};return(u,d)=>(w(),M("div",{class:L(r.value.root),id:e.id,role:"tablist","aria-label":e.ariaLabel,"data-testid":"segmented-control"},[N("div",{class:L(r.value.container)},[(w(!0),M(Se,null,Ie(e.options,(h,p)=>{var m,f;return w(),M("button",{key:h.value,type:"button",id:`segmented-item-${h.value}`,class:L(c(h).item),role:"tab","aria-selected":h.value===i.value,"aria-disabled":n.isDisabled||h.isDisabled,tabindex:h.value===i.value?0:-1,onClick:b=>a(h),onKeydown:b=>s(b,h),"data-testid":"segmented-item","data-state":h.value===i.value?"active":"idle"},[h.icon?(w(),E(At(h.icon),{key:0,class:L(c(h).icon)},null,8,["class"])):oe("",!0),N("span",null,se(h.label),1),(m=h?.shortcutKeys)!=null&&m.length?(w(),E(Zc,{key:1,keys:h.shortcutKeys,type:"default"},null,8,["keys"])):oe("",!0),(f=h?.counterKey)!=null&&f.length?(w(),E(Zc,{key:2,keys:h.counterKey,type:"default"},null,8,["keys"])):oe("",!0),h.hasDependentField?(w(),M("span",{key:3,class:L(c(h).dependentField)},[V(u.$slots,`dependent-field-${h.value}`)],2)):oe("",!0)],42,i3)}),128))],2)],10,o3))}}),r3={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function a3(e,t){return w(),M("svg",r3,[...t[0]||(t[0]=[N("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 s3={render:a3},$n=ge({slots:[...e1.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"}}}),l3=O({__name:"TreeViewBranch",props:{"aria-level":{},"aria-posinset":{},"aria-setsize":{},asChild:{type:Boolean}},setup(e){const t=e,n=lt(t),o=I(()=>$n());return(i,r)=>(w(),E(g(Vo).Branch,U(g(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:C(()=>[V(i.$slots,"default")]),_:3},16,["aria-level","aria-posinset","aria-setsize","class"]))}}),c3=O({__name:"TreeViewBranchContent",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>$n());return(o,i)=>(w(),E(g(Vo).BranchContent,U(g(t),{class:[n.value.branchContent],"data-testid":"atlantis-tree-view-branch-content"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),u3=O({__name:"TreeViewBranchControl",props:{depth:{default:0},"aria-labelledby":{},asChild:{type:Boolean}},setup(e){const t=e,n=lt(t),o=I(()=>$n());return(i,r)=>(w(),E(g(Vo).BranchControl,U(g(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:C(()=>[V(i.$slots,"default")]),_:3},16,["aria-labelledby","class","style"]))}}),d3=O({__name:"TreeViewBranchIndentGuide",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>$n());return(o,i)=>(w(),E(g(Vo).BranchIndentGuide,U(g(t),{class:[n.value.branchIndentGuide],"data-testid":"atlantis-tree-view-branch-indent-guide"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),h3=O({__name:"TreeViewBranchIndicator",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>$n());return(o,i)=>(w(),E(g(Vo).BranchIndicator,U(g(t),{class:[n.value.branchIndicator],"data-testid":"atlantis-tree-view-branch-indicator"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),p3=O({__name:"TreeViewBranchText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=lt(t),o=I(()=>$n());return(i,r)=>(w(),E(g(Vo).BranchText,U(g(n),{id:t.id,class:[o.value.branchText],"data-testid":"atlantis-tree-view-branch-text"}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["id","class"]))}}),f3=O({__name:"TreeViewItem",props:{depth:{default:0},asChild:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=lt(n),r=I(()=>$n());return(a,s)=>(w(),E(g(Vo).Item,U(g(i),{class:[r.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:C(()=>[V(a.$slots,"default")]),_:3},16,["class","style"]))}}),g3=O({__name:"TreeViewItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>$n());return(o,i)=>(w(),E(g(Vo).ItemIndicator,U(g(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-tree-view-item-indicator"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),m3=O({__name:"TreeViewItemText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=lt(t),o=I(()=>$n());return(i,r)=>(w(),E(g(Vo).ItemText,U(g(n),{id:t.id,class:[o.value.itemText],"data-testid":"atlantis-tree-view-item-text"}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["id","class"]))}}),Jv=O({__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=lt(n),r=I(()=>$n());return(a,s)=>(w(),M("span",{class:L([r.value.checkbox])},[j(K1,U(g(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]=ei(()=>{},["stop"]))}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["checked","disabled","aria-labelledby"])],2))}}),v3=O({__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=I(()=>$n());return(o,i)=>(w(),M("span",null,[j(Xo,{title:t.title,placement:t.placement},{default:C(()=>[V(o.$slots,"default",{},()=>[j(g(Yi),{class:L(n.value.info)},null,8,["class"])])]),_:3},8,["title","placement"])]))}}),J1=O({__name:"TreeNode",props:{node:{},indexPath:{},treeView:{},selectionMode:{},selectedValue:{}},emits:["node-select"],setup(e,{emit:t}){const n=e,o=t,i=I(()=>$n()),r=I(()=>`tree-node-text-${n.node.id}`),a=I(()=>Math.max(1,n.indexPath.length+1)),s=I(()=>{if(n.indexPath.length===0)return 1;const h=n.indexPath[n.indexPath.length-1];return Math.max(1,h+1)}),l=I(()=>{var h,p,m,f,b,v,y,x;if(n.indexPath.length===0){const A=((f=(m=(p=(h=n.treeView)==null?void 0:h.collection)==null?void 0:p.rootNode)==null?void 0:m.children)==null?void 0:f.length)||0;return Math.max(1,A)}const _=(v=(b=n.treeView)==null?void 0:b.collection)==null?void 0:v.rootNode;if(!_)return 1;let k=_;for(let A=0;A<n.indexPath.length-1;A++){const S=n.indexPath[A];if((y=k?.children)!=null&&y[S])k=k.children[S];else return 1}const $=((x=k?.children)==null?void 0:x.length)||0;return Math.max(1,$)}),c=()=>{(!n.node.children||n.node.children.length===0)&&o("node-select",n.node.id,!0)},u=h=>{const p=[];if(h.children)for(const m of h.children)p.push(m.id),m.children&&p.push(...u(m));return p},d=I(()=>{if(n.selectionMode!=="multiple")return n.selectedValue.includes(n.node.id);const h=n.selectedValue.includes(n.node.id);if(!n.node.children||n.node.children.length===0)return h;const p=u(n.node),m=p.filter(f=>n.selectedValue.includes(f)).length;return m===0?!!h:m===p.length?!0:"indeterminate"});return(h,p)=>(w(),E(g(Qw),{node:n.node,indexPath:n.indexPath},{default:C(()=>[n.node.children&&n.node.children.length>0?(w(),E(g(l3),{key:0,"aria-level":a.value,"aria-posinset":s.value,"aria-setsize":l.value},{default:C(()=>[j(g(d3),null,{default:C(()=>[N("div",{class:L([i.value.branchControl])},[j(g(u3),{disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,depth:n.indexPath.length,"aria-labelledby":r.value,class:L(i.value.branchControlButton)},{default:C(()=>[j(g(h3),null,{default:C(()=>[j(g(hF))]),_:1}),n.selectionMode==="multiple"?(w(),E(g(Jv),{key:0,checked:d.value,disabled:n.node.isDisabled,"aria-labelledby":r.value,onCheckedChange:p[0]||(p[0]=()=>o("node-select",n.node.id,!1))},null,8,["checked","disabled","aria-labelledby"])):oe("",!0),n.node.icon?(w(),E(At(n.node.icon),{key:1,class:L([i.value.treeNodeIcon])},null,8,["class"])):oe("",!0),j(g(p3),{id:r.value},{default:C(()=>[Ne(se(n.node.name),1)]),_:1},8,["id"])]),_:1},8,["disabled","aria-disabled","depth","aria-labelledby","class"])],2)]),_:1}),j(g(c3),null,{default:C(()=>[(w(!0),M(Se,null,Ie(n.node.children,(m,f)=>(w(),E(J1,{key:m.id,node:m,indexPath:[...n.indexPath,f],treeView:n.treeView,selectedValue:n.selectedValue,selectionMode:n.selectionMode,onNodeSelect:p[1]||(p[1]=(b,v)=>o("node-select",b,v))},{default:C(()=>[V(h.$slots,"default")]),_:3},8,["node","indexPath","treeView","selectedValue","selectionMode"]))),128))]),_:3})]),_:3},8,["aria-level","aria-posinset","aria-setsize"])):(w(),E(g(f3),{key:1,depth:n.indexPath.length,disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,"aria-level":a.value,"aria-posinset":s.value,"aria-setsize":l.value,class:L([i.value.item]),onClick:c},{default:C(()=>{var m,f,b,v,y;return[n.selectionMode==="multiple"?(w(),E(g(Jv),{key:0,checked:d.value,disabled:n.node.isDisabled,"aria-labelledby":r.value,onCheckedChange:p[2]||(p[2]=()=>o("node-select",n.node.id,!0))},null,8,["checked","disabled","aria-labelledby"])):oe("",!0),(m=n.node)!=null&&m.icon?(w(),E(g(g3),{key:1},{default:C(()=>[n.node.icon?(w(),E(At(n.node.icon),{key:0,class:L([i.value.treeNodeIcon])},null,8,["class"])):oe("",!0)]),_:1})):oe("",!0),j(g(m3),{id:r.value},{default:C(()=>[Ne(se(n.node.name),1)]),_:1},8,["id"]),(b=(f=n.node)==null?void 0:f.info)!=null&&b.isVisible?(w(),E(g(v3),{key:2,title:(y=(v=n.node)==null?void 0:v.info)==null?void 0:y.title},null,8,["title"])):oe("",!0)]}),_:1},8,["depth","disabled","aria-disabled","aria-level","aria-posinset","aria-setsize","class"]))]),_:3},8,["node","indexPath"]))}}),Qv={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},noSurrounding:{boxShadow:"none",border:"none",outline:"none"}},b3={default:{trigger:{boxShadow:"stroke-bordered-interactive",_focusVisible:{boxShadow:"state-focus-primary"}}},error:{trigger:{boxShadow:"state-error",_focusVisible:{boxShadow:"state-focus-critical"}}}},at=ge({slots:[...k1.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:{...Qv.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:{...Qv.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:b3,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"}}),y3=["aria-label","onClick","onKeydown"],x3={key:1},w3=["aria-label"],fi=O({__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=lt(n,o),r=_=>{const k=[],$=A=>{for(const S of A)k.push(S),S.children&&$(S.children)};return $(_),k},a=I(()=>n.modelValue?n.isTree?r(n.options).filter(_=>n.modelValue.includes(_.value)):n.options.filter(_=>n.modelValue.includes(_.value)):[]),s=I(()=>ZO({items:n.options})),l=_=>({id:_.value,name:_.label,isDisabled:_.disabled,children:_.children?_.children.map(l):void 0}),c=I(()=>{if(!n.isTree)return null;const _=n.options.map(l);return Cm({nodeToValue:k=>k.id,nodeToString:k=>k.name,rootNode:{id:"ROOT",name:"",children:_}})}),u=Cm({nodeToValue:_=>_.id,nodeToString:_=>_.name,rootNode:{id:"ROOT",name:"",children:[]}}),d=r1({collection:c.value||u}),h=I(()=>({root:at({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).root,trigger:at({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).trigger,content:at().content,item:at().item,itemGroup:at().itemGroup,indicator:at().indicator,positioner:at().positioner,selectedIndicator:at().itemIndicator,label:at().label,control:at({variant:n.variant,state:n.isDisabled?"disabled":"idle",isMultiple:n.multiple}).control,pillWrapper:at().pillWrapper,pill:at().pill,iconButton:at().iconButton,crossIcon:at().crossIcon,checkIcon:at().checkIcon,loadingContainer:at().loadingContainer,errorMessage:at().errorMessage,errorContainer:at().errorContainer,errorIcon:at().errorIcon})),p=_=>{const k=(n.modelValue||[]).filter($=>$!==_.value);o("update:modelValue",k)},m=(_,k)=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),p(k))},f=_=>{const k=[];if(_.children)for(const $ of _.children)k.push($.id),k.push(...f($));return k},b=(_,k)=>{for(const $ of _){if($.id===k)return $;if($.children){const A=b($.children,k);if(A)return A}}return null},v=(_,k)=>{const $=f(_);return $.length===0?!1:$.every(A=>k.includes(A))},y=(_,k)=>{const $=f(_);if($.length===0)return!1;const A=$.filter(S=>k.includes(S)).length;return A>0&&A<$.length},x=(_,k)=>{if(!n.multiple||!n.isTree||!c.value){if(n.multiple){const P=[...n.modelValue||[]],G=P.indexOf(_);G>-1?P.splice(G,1):P.push(_),o("update:modelValue",P)}else o("update:modelValue",[_]);return}const $=c.value.rootNode.children||[],A=b($,_);if(!A)return;const S=[...n.modelValue||[]];if(S.includes(_)){const P=S.indexOf(_);P>-1&&S.splice(P,1);const G=f(A);for(const ee of G){const z=S.indexOf(ee);z>-1&&S.splice(z,1)}}else{S.includes(_)||S.push(_);const P=f(A);for(const G of P)S.includes(G)||S.push(G)}const R=[...S],F=P=>{for(const G of P)if(G.children&&G.children.length>0){F(G.children);const ee=v(G,R),z=y(G,R);if(ee)R.includes(G.id)||R.push(G.id);else if(!z){const W=R.indexOf(G.id);W>-1&&R.splice(W,1)}}};F($),o("update:modelValue",R)};return(_,k)=>(w(),E(g(Yt).Root,U(g(i),{collection:s.value,class:h.value.root,disabled:n.isDisabled,defaultOpen:n.defaultOpen,loopFocus:n.loopFocus,composite:n.composite,typeahead:n.typeahead}),{default:C(()=>[n.label?(w(),E(g(Yt).Label,{key:0,class:L(h.value.label),"data-testid":"select-label",id:"select-label"},{default:C(()=>[Ne(se(n.label),1)]),_:1},8,["class"])):oe("",!0),j(g(Yt).Control,{class:L(h.value.control)},{default:C(()=>[j(g(Yt).Trigger,{class:L(h.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:C(()=>[n.multiple&&a.value.length?(w(),M("div",{key:0,class:L(h.value.pillWrapper)},[(w(!0),M(Se,null,Ie(a.value,$=>(w(),M("div",{key:$.value,class:L(h.value.pill)},[N("span",null,se($.label),1),N("button",{type:"button",class:L(h.value.iconButton),"aria-label":"Remove "+$.label,onClick:ei(A=>p($),["stop"]),onKeydown:A=>m(A,$)},[j(g(s3),{class:L(h.value.crossIcon)},null,8,["class"])],42,y3)],2))),128))],2)):n.isTree&&!n.multiple&&a.value.length?(w(),M("span",x3,se(a.value[0].label),1)):(w(),E(g(Yt).ValueText,{key:2,placeholder:e.placeholder},null,8,["placeholder"])),j(g(Yt).Indicator,{class:L(h.value.indicator)},{default:C(()=>[j(g(yx),{"data-chevron":""})]),_:1},8,["class"])]),_:1},8,["class","aria-labelledby","aria-expanded","aria-haspopup","aria-invalid","aria-errormessage"])]),_:1},8,["class"]),j(g(Yt).Positioner,{class:L(h.value.positioner)},{default:C(()=>[j(g(Yt).Content,{class:L(h.value.content),role:n.isTree?void 0:"listbox"},{default:C(()=>[n.isLoading?(w(),M("div",{key:0,class:L(h.value.loadingContainer)},[V(_.$slots,"loading",{},()=>[j(Cx,{size:"sm"}),k[0]||(k[0]=N("span",null,"Loading...",-1))])],2)):n.variant==="error"&&n.errorMessage?(w(),M("div",{key:1,class:L(h.value.errorContainer),id:"select-error",role:"alert"},[V(_.$slots,"error-content",{},()=>[j(g(sF),{class:L(h.value.errorIcon)},null,8,["class"]),N("span",null,se(n.errorMessage),1)])],2)):n.isTree&&c.value?(w(),M("div",{key:2,class:L(h.value.itemGroup),role:"group","aria-label":n.label?`${n.label} tree options`:"Select options"},[j(g(a1),{collection:c.value},{default:C(()=>[j(g(s1),{"aria-label":n.label?`${n.label} tree`:"Options tree","aria-multiselectable":n.multiple},{default:C(()=>[(w(!0),M(Se,null,Ie(c.value.rootNode.children,($,A)=>(w(),E(J1,{key:$.id,node:$,indexPath:[A],treeView:g(d),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,w3)):(w(),E(g(Yt).ItemGroup,{key:3,class:L(h.value.itemGroup)},{default:C(()=>[(w(!0),M(Se,null,Ie(n.options,$=>(w(),E(g(Yt).Item,{key:$.value,item:$,class:L(h.value.item),disabled:$.disabled,"data-testid":"select-option-"+$.value,role:"option","aria-selected":(n.modelValue||[]).includes($.value),"aria-disabled":$.disabled},{default:C(()=>[j(g(Yt).ItemText,null,{default:C(()=>[Ne(se($.label),1)]),_:2},1024),j(g(Yt).ItemIndicator,{class:L(h.value.selectedIndicator),"aria-hidden":"true"},{default:C(()=>[j(g(Y1),{class:L(h.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"]),j(g(Yt).HiddenSelect)]),_:3},16,["collection","class","disabled","defaultOpen","loopFocus","composite","typeahead"]))}});ge({slots:T1.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"}});ge({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"}});ge({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 $r={Default:"default",Alt:"alt"},Er={Horizontal:"horizontal",Vertical:"vertical"},_3={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C3(e,t){return w(),M("svg",_3,[...t[0]||(t[0]=[N("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),N("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 k3={render:C3},S3={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $3(e,t){return w(),M("svg",S3,[...t[0]||(t[0]=[N("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),N("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 E3={render:$3},T3={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O3(e,t){return w(),M("svg",T3,[...t[0]||(t[0]=[N("g",{id:"State=Upcoming, Size=Small"},[N("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 I3={render:O3},P3={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A3(e,t){return w(),M("svg",P3,[...t[0]||(t[0]=[N("g",{id:"State=Ongoing, Size=Small"},[N("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"}),N("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 R3={render:A3},Q1=ge({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"}}}}}}),D3=["data-orientation"],V3=["data-orientation"],M3=["data-orientation"],N3=["data-orientation"],L3=["data-orientation"],F3=["data-orientation"],B3=["data-orientation"],z3=["data-orientation"],H3=O({__name:"StepperItem",props:{item:{},index:{},orientation:{default:Er.Horizontal},type:{default:$r.Default},modelValue:{default:1},items:{},steps:{}},setup(e){const t=e,n=I(()=>Q1({type:t.type})),o=I(()=>t.steps.value),i=I(()=>({"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(r,a)=>(w(),E(g(wN),{class:L(n.value.trigger)},{default:C(()=>[t.type===g($r).Default&&t.orientation===g(Er).Horizontal?(w(),M("div",{key:0,class:L(n.value.itemLineContainer),"data-orientation":t.orientation},[N("div",U({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,V3)],10,D3)):oe("",!0),N("div",{class:L(n.value.triggerContainer),"data-orientation":t.orientation},[j(g(lN),{class:L(n.value.indicator),"data-orientation":t.orientation},{default:C(()=>[t.type===g($r).Default?(w(),M(Se,{key:0},[o.value===e.index?(w(),E(g(R3),{key:0})):o.value>e.index?(w(),E(g(E3),{key:1})):o.value<e.index?(w(),E(g(I3),{key:2})):oe("",!0)],64)):(w(),M(Se,{key:1},[o.value>e.index?(w(),E(g(k3),{key:0})):(w(),M("div",U({key:1,class:n.value.altIndicator},i.value),[N("span",{class:L(n.value.altIndicatorText)},se(e.index+1),3)],16))],64)),t.orientation===g(Er).Vertical&&e.index!==t.items.length-1?(w(),M("div",U({key:2,class:n.value.itemLineContainer},i.value,{"data-orientation":t.orientation}),[N("div",U({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,L3)],16,N3)):oe("",!0)]),_:1},8,["class","data-orientation"]),N("div",{class:L(n.value.triggerContent),"data-orientation":t.orientation},[N("span",{class:L(n.value.itemTitle)},se(e.item.title),3),t.type!==g($r).Alt||t.orientation!==g(Er).Horizontal?(w(),M("span",{key:0,class:L(n.value.itemDescription)},se(e.item.description),3)):oe("",!0)],10,F3),t.type===g($r).Alt&&t.orientation===g(Er).Horizontal&&e.index!==t.items.length-1?(w(),M("div",{key:0,class:L(n.value.itemLineContainer),"data-orientation":t.orientation},[N("div",U({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,z3)],10,B3)):oe("",!0)],10,M3)]),_:1},8,["class"]))}}),j3=O({__name:"Stepper",props:{orientation:{default:Er.Horizontal},type:{default:$r.Default},modelValue:{default:1},items:{}},emits:["stepChange"],setup(e,{emit:t}){const n=e,o=t,i=I(()=>Q1({type:n.type})),r=s=>s<1?0:s>n.items.length?n.items.length-1:s-1,a=xN({count:n.items.length,modelValue:r(n.modelValue)});return ze(()=>n.modelValue,s=>{a.value.setStep(r(s))}),ze(()=>a.value.value,s=>{o("stepChange",s+1)}),(s,l)=>(w(),E(g(hN),{value:g(a)},{default:C(()=>[j(g(dN),{class:L(i.value.list),"data-orientation":n.orientation},{default:C(()=>[(w(!0),M(Se,null,Ie(n.items,(c,u)=>(w(),E(g(uN),{key:c.value,index:u,class:L(i.value.item),"data-testid":"stepper-item"},{default:C(()=>[j(H3,U({item:c,index:u},{ref_for:!0},n,{steps:g(a)}),null,16,["item","index","steps"])]),_:2},1032,["index","class"]))),128))]),_:1},8,["class","data-orientation"])]),_:1},8,["value"]))}}),W3=O({__name:"Switch",props:{disabled:{type:Boolean},checked:{},loading:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},readOnly:{type:Boolean},defaultChecked:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},label:{},name:{},required:{type:Boolean},value:{},asChild:{type:Boolean}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=EF();return(r,a)=>(w(),M("div",null,[j(g(Ia).Root,{class:L(g(i).root),checked:n.checked,readOnly:n.readOnly,disabled:n.disabled||n.loading,"data-loading":n.loading,onCheckedChange:a[0]||(a[0]=s=>o("checkedChange",s)),"data-testid":"atlantis-switch"},{default:C(()=>[j(g(Ia).Control,{"data-loading":n.loading,class:L(g(i).control)},{default:C(()=>[j(g(Ia).Thumb,{"data-loading":n.loading,class:L(g(i).thumb)},null,8,["data-loading","class"])]),_:1},8,["data-loading","class"]),N("div",{class:L(g(i).labelContent)},[j(g(Ia).Label,{class:L(g(i).label)},{default:C(()=>[V(r.$slots,"default")]),_:3},8,["class"]),e.iconTooltip?(w(),E(Xo,{key:0,title:e.iconTooltip,placement:"bottom"},{default:C(()=>[(w(),E(At(e.suffixIcon&&g(Yi)),{class:L(g(i).suffixIcon),"data-testid":"atlantis-suffix-icon"},null,8,["class"]))]),_:1},8,["title"])):(w(),E(At(e.suffixIcon&&g(Yi)),{key:1,class:L(g(i).suffixIcon),"data-testid":"atlantis-suffix-icon"},null,8,["class"]))],2),j(g(Ia).HiddenInput,{"data-testid":"atlantis-hidden-input"})]),_:3},8,["class","checked","readOnly","disabled","data-loading"]),e.description?(w(),M("p",{key:0,class:L(g(i).labelDescription),"data-testid":"atlantis-switch-description"},se(e.description),3)):oe("",!0)]))}});ge({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"}}});ge({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"}});ge({className:"tabs",slots:R1.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"}}}}});ge({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"}});Qi({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"}}});Ft({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 sl(e){return e+.5|0}const Zo=(e,t,n)=>Math.max(Math.min(e,n),t);function is(e){return Zo(sl(e*2.55),0,255)}function ti(e){return Zo(sl(e*255),0,255)}function yo(e){return Zo(sl(e/2.55)/100,0,1)}function eb(e){return Zo(sl(e*100),0,100)}const gn={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},rp=[..."0123456789ABCDEF"],U3=e=>rp[e&15],G3=e=>rp[(e&240)>>4]+rp[e&15],Fl=e=>(e&240)>>4===(e&15),q3=e=>Fl(e.r)&&Fl(e.g)&&Fl(e.b)&&Fl(e.a);function Y3(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&gn[e[1]]*17,g:255&gn[e[2]]*17,b:255&gn[e[3]]*17,a:t===5?gn[e[4]]*17:255}:(t===7||t===9)&&(n={r:gn[e[1]]<<4|gn[e[2]],g:gn[e[3]]<<4|gn[e[4]],b:gn[e[5]]<<4|gn[e[6]],a:t===9?gn[e[7]]<<4|gn[e[8]]:255})),n}const K3=(e,t)=>e<255?t(e):"";function X3(e){var t=q3(e)?U3:G3;return e?"#"+t(e.r)+t(e.g)+t(e.b)+K3(e.a,t):void 0}const Z3=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function e_(e,t,n){const o=t*Math.min(n,1-n),i=(r,a=(r+e/30)%12)=>n-o*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function J3(e,t,n){const o=(i,r=(i+e/60)%6)=>n-n*t*Math.max(Math.min(r,4-r,1),0);return[o(5),o(3),o(1)]}function Q3(e,t,n){const o=e_(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 eB(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 zf(e){const t=e.r/255,n=e.g/255,o=e.b/255,i=Math.max(t,n,o),r=Math.min(t,n,o),a=(i+r)/2;let s,l,c;return i!==r&&(c=i-r,l=a>.5?c/(2-i-r):c/(i+r),s=eB(t,n,o,c,i),s=s*60+.5),[s|0,l||0,a]}function Hf(e,t,n,o){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,o)).map(ti)}function jf(e,t,n){return Hf(e_,e,t,n)}function tB(e,t,n){return Hf(Q3,e,t,n)}function nB(e,t,n){return Hf(J3,e,t,n)}function t_(e){return(e%360+360)%360}function oB(e){const t=Z3.exec(e);let n=255,o;if(!t)return;t[5]!==o&&(n=t[6]?is(+t[5]):ti(+t[5]));const i=t_(+t[2]),r=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?o=tB(i,r,a):t[1]==="hsv"?o=nB(i,r,a):o=jf(i,r,a),{r:o[0],g:o[1],b:o[2],a:n}}function iB(e,t){var n=zf(e);n[0]=t_(n[0]+t),n=jf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function rB(e){if(!e)return;const t=zf(e),n=t[0],o=eb(t[1]),i=eb(t[2]);return e.a<255?`hsla(${n}, ${o}%, ${i}%, ${yo(e.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const tb={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"},nb={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 aB(){const e={},t=Object.keys(nb),n=Object.keys(tb);let o,i,r,a,s;for(o=0;o<t.length;o++){for(a=s=t[o],i=0;i<n.length;i++)r=n[i],s=s.replace(r,tb[r]);r=parseInt(nb[a],16),e[s]=[r>>16&255,r>>8&255,r&255]}return e}let Bl;function sB(e){Bl||(Bl=aB(),Bl.transparent=[0,0,0,0]);const t=Bl[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const lB=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function cB(e){const t=lB.exec(e);let n=255,o,i,r;if(t){if(t[7]!==o){const a=+t[7];n=t[8]?is(a):Zo(a*255,0,255)}return o=+t[1],i=+t[3],r=+t[5],o=255&(t[2]?is(o):Zo(o,0,255)),i=255&(t[4]?is(i):Zo(i,0,255)),r=255&(t[6]?is(r):Zo(r,0,255)),{r:o,g:i,b:r,a:n}}}function uB(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${yo(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Yd=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,br=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function dB(e,t,n){const o=br(yo(e.r)),i=br(yo(e.g)),r=br(yo(e.b));return{r:ti(Yd(o+n*(br(yo(t.r))-o))),g:ti(Yd(i+n*(br(yo(t.g))-i))),b:ti(Yd(r+n*(br(yo(t.b))-r))),a:e.a+n*(t.a-e.a)}}function zl(e,t,n){if(e){let o=zf(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=jf(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function n_(e,t){return e&&Object.assign(t||{},e)}function ob(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=ti(e[3]))):(t=n_(e,{r:0,g:0,b:0,a:1}),t.a=ti(t.a)),t}function hB(e){return e.charAt(0)==="r"?cB(e):oB(e)}let o_=class ap{constructor(t){if(t instanceof ap)return t;const n=typeof t;let o;n==="object"?o=ob(t):n==="string"&&(o=Y3(t)||sB(t)||hB(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=n_(this._rgb);return t&&(t.a=yo(t.a)),t}set rgb(t){this._rgb=ob(t)}rgbString(){return this._valid?uB(this._rgb):void 0}hexString(){return this._valid?X3(this._rgb):void 0}hslString(){return this._valid?rB(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,i=t.rgb;let r;const a=n===r?.5:n,s=2*a-1,l=o.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;r=1-c,o.r=255&c*o.r+r*i.r+.5,o.g=255&c*o.g+r*i.g+.5,o.b=255&c*o.b+r*i.b+.5,o.a=a*o.a+(1-a)*i.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=dB(this._rgb,t._rgb,n)),this}clone(){return new ap(this.rgb)}alpha(t){return this._rgb.a=ti(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=sl(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 zl(this._rgb,2,t),this}darken(t){return zl(this._rgb,2,-t),this}saturate(t){return zl(this._rgb,1,t),this}desaturate(t){return zl(this._rgb,1,-t),this}rotate(t){return iB(this._rgb,t),this}};function po(){}const pB=(()=>{let e=0;return()=>e++})();function Fe(e){return e==null}function pt(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 Ae(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function xn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Un(e,t){return xn(e)?e:t}function Ge(e,t){return typeof e>"u"?t:e}const fB=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Qe(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function De(e,t,n,o){let i,r,a;if(pt(e))for(r=e.length,i=0;i<r;i++)t.call(n,e[i],i);else if(Ae(e))for(a=Object.keys(e),r=a.length,i=0;i<r;i++)t.call(n,e[a[i]],a[i])}function lu(e,t){let n,o,i,r;if(!e||!t||e.length!==t.length)return!1;for(n=0,o=e.length;n<o;++n)if(i=e[n],r=t[n],i.datasetIndex!==r.datasetIndex||i.index!==r.index)return!1;return!0}function cu(e){if(pt(e))return e.map(cu);if(Ae(e)){const t=Object.create(null),n=Object.keys(e),o=n.length;let i=0;for(;i<o;++i)t[n[i]]=cu(e[n[i]]);return t}return e}function i_(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function gB(e,t,n,o){if(!i_(e))return;const i=t[e],r=n[e];Ae(i)&&Ae(r)?Ds(i,r,o):t[e]=cu(r)}function Ds(e,t,n){const o=pt(t)?t:[t],i=o.length;if(!Ae(e))return e;n=n||{};const r=n.merger||gB;let a;for(let s=0;s<i;++s){if(a=o[s],!Ae(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)r(l[c],e,a,n)}return e}function gs(e,t){return Ds(e,t,{merger:mB})}function mB(e,t,n){if(!i_(e))return;const o=t[e],i=n[e];Ae(o)&&Ae(i)?gs(o,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=cu(i))}const ib={"":e=>e,x:e=>e.x,y:e=>e.y};function vB(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 bB(e){const t=vB(e);return n=>{for(const o of t){if(o==="")break;n=n&&n[o]}return n}}function qr(e,t){return(ib[t]||(ib[t]=bB(t)))(e)}function Wf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Vs=e=>typeof e<"u",ai=e=>typeof e=="function",rb=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function yB(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Wt=Math.PI,Bi=2*Wt,uu=Number.POSITIVE_INFINITY,xB=Wt/180,Vn=Wt/2,Ci=Wt/4,ab=Wt*2/3,r_=Math.log10,ni=Math.sign;function Ec(e,t,n){return Math.abs(e-t)<n}function sb(e){const t=Math.round(e);e=Ec(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(r_(e))),o=e/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function wB(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,r)=>i-r).pop(),t}function _B(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function du(e){return!_B(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function CB(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function kB(e,t,n){let o,i,r;for(o=0,i=e.length;o<i;o++)r=e[o][n],isNaN(r)||(t.min=Math.min(t.min,r),t.max=Math.max(t.max,r))}function Di(e){return e*(Wt/180)}function SB(e){return e*(180/Wt)}function lb(e){if(!xn(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function $B(e,t){const n=t.x-e.x,o=t.y-e.y,i=Math.sqrt(n*n+o*o);let r=Math.atan2(o,n);return r<-.5*Wt&&(r+=Bi),{angle:r,distance:i}}function EB(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ki(e){return(e%Bi+Bi)%Bi}function TB(e,t,n,o){const i=ki(e),r=ki(t),a=ki(n),s=ki(r-i),l=ki(a-i),c=ki(i-r),u=ki(i-a);return i===r||i===a||o||s>l&&c<u}function Mn(e,t,n){return Math.max(t,Math.min(n,e))}function OB(e){return Mn(e,-32768,32767)}function cb(e,t,n,o=1e-6){return e>=Math.min(t,n)-o&&e<=Math.max(t,n)+o}function Uf(e,t,n){n=n||(a=>e[a]<t);let o=e.length-1,i=0,r;for(;o-i>1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const sp=(e,t,n,o)=>Uf(e,n,o?i=>{const r=e[i][t];return r<n||r===n&&e[i+1][t]===n}:i=>e[i][t]<n),IB=(e,t,n)=>Uf(e,n,o=>e[o][t]>=n);function PB(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 a_=["push","pop","shift","splice","unshift"];function AB(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),a_.forEach(n=>{const o="_onData"+Wf(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...r){const a=i.apply(this,r);return e._chartjs.listeners.forEach(s=>{typeof s[o]=="function"&&s[o](...r)}),a}})})}function ub(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)&&(a_.forEach(r=>{delete e[r]}),delete e._chartjs)}function s_(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const l_=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function c_(e,t){let n=[],o=!1;return function(...i){n=i,o||(o=!0,l_.call(window,()=>{o=!1,e.apply(t,n)}))}}function RB(e,t){let n;return function(...o){return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}const DB=e=>e==="start"?"left":e==="end"?"right":"center",db=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Hl=e=>e===0||e===1,hb=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Bi/n)),pb=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Bi/n)+1,ms={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*Vn)+1,easeOutSine:e=>Math.sin(e*Vn),easeInOutSine:e=>-.5*(Math.cos(Wt*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=>Hl(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=>Hl(e)?e:hb(e,.075,.3),easeOutElastic:e=>Hl(e)?e:pb(e,.075,.3),easeInOutElastic(e){return Hl(e)?e:e<.5?.5*hb(e*2,.1125,.45):.5+.5*pb(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-ms.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?ms.easeInBounce(e*2)*.5:ms.easeOutBounce(e*2-1)*.5+.5};function u_(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function fb(e){return u_(e)?e:new o_(e)}function Kd(e){return u_(e)?e:new o_(e).saturate(.5).darken(.1).hexString()}const VB=["x","y","borderWidth","radius","tension"],MB=["color","borderColor","backgroundColor"];function NB(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:MB},numbers:{type:"number",properties:VB}}),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 LB(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const gb=new Map;function FB(e,t){t=t||{};const n=e+JSON.stringify(t);let o=gb.get(n);return o||(o=new Intl.NumberFormat(e,t),gb.set(n,o)),o}function d_(e,t,n){return FB(t,n).format(e)}const BB={values(e){return pt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const o=this.chart.options.locale;let i,r=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"),r=zB(e,n)}const a=r_(Math.abs(r)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),d_(e,o,l)}};function zB(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 h_={formatters:BB};function HB(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:h_.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 Ki=Object.create(null),lp=Object.create(null);function vs(e,t){if(!t)return e;const n=t.split(".");for(let o=0,i=n.length;o<i;++o){const r=n[o];e=e[r]||(e[r]=Object.create(null))}return e}function Xd(e,t,n){return typeof t=="string"?Ds(vs(e,t),n):Ds(vs(e,""),t)}let jB=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)=>Kd(i.backgroundColor),this.hoverBorderColor=(o,i)=>Kd(i.borderColor),this.hoverColor=(o,i)=>Kd(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 Xd(this,t,n)}get(t){return vs(this,t)}describe(t,n){return Xd(lp,t,n)}override(t,n){return Xd(Ki,t,n)}route(t,n,o,i){const r=vs(this,t),a=vs(this,o),s="_"+n;Object.defineProperties(r,{[s]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return Ae(l)?Object.assign({},c,l):Ge(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}};var nt=new jB({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[NB,LB,HB]);function WB(e){return!e||Fe(e.size)||Fe(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function mb(e,t,n,o,i){let r=t[i];return r||(r=t[i]=e.measureText(i).width,n.push(i)),r>o&&(o=r),o}function Si(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 vb(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function bb(e,t,n,o){UB(e,t,n,o)}function UB(e,t,n,o,i){let r,a,s,l,c,u,d,h;const p=t.pointStyle,m=t.rotation,f=t.radius;let b=(m||0)*xB;if(p&&typeof p=="object"&&(r=p.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){e.save(),e.translate(n,o),e.rotate(b),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(f)||f<=0)){switch(e.beginPath(),p){default:e.arc(n,o,f,0,Bi),e.closePath();break;case"triangle":u=f,e.moveTo(n+Math.sin(b)*u,o-Math.cos(b)*f),b+=ab,e.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*f),b+=ab,e.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*f),e.closePath();break;case"rectRounded":c=f*.516,l=f-c,a=Math.cos(b+Ci)*l,d=Math.cos(b+Ci)*l,s=Math.sin(b+Ci)*l,h=Math.sin(b+Ci)*l,e.arc(n-d,o-s,c,b-Wt,b-Vn),e.arc(n+h,o-a,c,b-Vn,b),e.arc(n+d,o+s,c,b,b+Vn),e.arc(n-h,o+a,c,b+Vn,b+Wt),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*f,u=l,e.rect(n-u,o-l,2*u,2*l);break}b+=Ci;case"rectRot":d=Math.cos(b)*f,a=Math.cos(b)*f,s=Math.sin(b)*f,h=Math.sin(b)*f,e.moveTo(n-d,o-s),e.lineTo(n+h,o-a),e.lineTo(n+d,o+s),e.lineTo(n-h,o+a),e.closePath();break;case"crossRot":b+=Ci;case"cross":d=Math.cos(b)*f,a=Math.cos(b)*f,s=Math.sin(b)*f,h=Math.sin(b)*f,e.moveTo(n-d,o-s),e.lineTo(n+d,o+s),e.moveTo(n+h,o-a),e.lineTo(n-h,o+a);break;case"star":d=Math.cos(b)*f,a=Math.cos(b)*f,s=Math.sin(b)*f,h=Math.sin(b)*f,e.moveTo(n-d,o-s),e.lineTo(n+d,o+s),e.moveTo(n+h,o-a),e.lineTo(n-h,o+a),b+=Ci,d=Math.cos(b)*f,a=Math.cos(b)*f,s=Math.sin(b)*f,h=Math.sin(b)*f,e.moveTo(n-d,o-s),e.lineTo(n+d,o+s),e.moveTo(n+h,o-a),e.lineTo(n-h,o+a);break;case"line":a=Math.cos(b)*f,s=Math.sin(b)*f,e.moveTo(n-a,o-s),e.lineTo(n+a,o+s);break;case"dash":e.moveTo(n,o),e.lineTo(n+Math.cos(b)*f,o+Math.sin(b)*f);break;case!1:e.closePath();break}e.fill(),e.stroke()}}function p_(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 f_(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function g_(e){e.restore()}function GB(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Fe(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 qB(e,t,n,o,i){if(i.strikethrough||i.underline){const r=e.measureText(o),a=t-r.actualBoundingBoxLeft,s=t+r.actualBoundingBoxRight,l=n-r.actualBoundingBoxAscent,c=n+r.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function YB(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function yb(e,t,n,o,i,r={}){const a=pt(t)?t:[t],s=r.strokeWidth>0&&r.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,GB(e,r),l=0;l<a.length;++l)c=a[l],r.backdrop&&YB(e,r.backdrop),s&&(r.strokeColor&&(e.strokeStyle=r.strokeColor),Fe(r.strokeWidth)||(e.lineWidth=r.strokeWidth),e.strokeText(c,n,o,r.maxWidth)),e.fillText(c,n,o,r.maxWidth),qB(e,n,o,c,r),o+=Number(i.lineHeight);e.restore()}function cp(e,t){const{x:n,y:o,w:i,h:r,radius:a}=t;e.arc(n+a.topLeft,o+a.topLeft,a.topLeft,1.5*Wt,Wt,!0),e.lineTo(n,o+r-a.bottomLeft),e.arc(n+a.bottomLeft,o+r-a.bottomLeft,a.bottomLeft,Wt,Vn,!0),e.lineTo(n+i-a.bottomRight,o+r),e.arc(n+i-a.bottomRight,o+r-a.bottomRight,a.bottomRight,Vn,0,!0),e.lineTo(n+i,o+a.topRight),e.arc(n+i-a.topRight,o+a.topRight,a.topRight,0,-Vn,!0),e.lineTo(n+a.topLeft,o)}const KB=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,XB=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ZB(e,t){const n=(""+e).match(KB);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 JB=e=>+e||0;function m_(e,t){const n={},o=Ae(t),i=o?Object.keys(t):t,r=Ae(e)?o?a=>Ge(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=JB(r(a));return n}function v_(e){return m_(e,{top:"y",right:"x",bottom:"y",left:"x"})}function bs(e){return m_(e,["topLeft","topRight","bottomLeft","bottomRight"])}function si(e){const t=v_(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Qn(e,t){e=e||{},t=t||nt.font;let n=Ge(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let o=Ge(e.style,t.style);o&&!(""+o).match(XB)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Ge(e.family,t.family),lineHeight:ZB(Ge(e.lineHeight,t.lineHeight),n),size:n,style:o,weight:Ge(e.weight,t.weight),string:""};return i.string=WB(i),i}function jl(e,t,n,o){let i,r,a;for(i=0,r=e.length;i<r;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function QB(e,t,n){const{min:o,max:i}=e,r=fB(t,(i-o)/2),a=(s,l)=>n&&s===0?0:s+l;return{min:a(o,-Math.abs(r)),max:a(i,r)}}function la(e,t){return Object.assign(Object.create(e),t)}function Gf(e,t=[""],n,o,i=()=>e[0]){const r=n||e;typeof o>"u"&&(o=w_("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:r,_fallback:o,_getTarget:i,override:s=>Gf([s,...e],t,r,o)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return y_(s,l,()=>s6(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return wb(s).includes(l)},ownKeys(s){return wb(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Yr(e,t,n,o){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:b_(e,o),setContext:r=>Yr(e,r,n,o),override:r=>Yr(e.override(r),t,n,o)};return new Proxy(i,{deleteProperty(r,a){return delete r[a],delete e[a],!0},get(r,a,s){return y_(r,a,()=>t6(r,a,s))},getOwnPropertyDescriptor(r,a){return r._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(r,a,s){return e[a]=s,delete r[a],!0}})}function b_(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:ai(n)?n:()=>n,isIndexable:ai(o)?o:()=>o}}const e6=(e,t)=>e?e+Wf(t):t,qf=(e,t)=>Ae(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function y_(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const o=n();return e[t]=o,o}function t6(e,t,n){const{_proxy:o,_context:i,_subProxy:r,_descriptors:a}=e;let s=o[t];return ai(s)&&a.isScriptable(t)&&(s=n6(t,s,e,n)),pt(s)&&s.length&&(s=o6(t,s,e,a.isIndexable)),qf(t,s)&&(s=Yr(s,i,r&&r[t],a)),s}function n6(e,t,n,o){const{_proxy:i,_context:r,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(r,a||o);return s.delete(e),qf(e,l)&&(l=Yf(i._scopes,i,e,l)),l}function o6(e,t,n,o){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=n;if(typeof r.index<"u"&&o(e))return t[r.index%t.length];if(Ae(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Yf(c,i,e,u);t.push(Yr(d,r,a&&a[e],s))}}return t}function x_(e,t,n){return ai(e)?e(t,n):e}const i6=(e,t)=>e===!0?t:typeof e=="string"?qr(t,e):void 0;function r6(e,t,n,o,i){for(const r of t){const a=i6(n,r);if(a){e.add(a);const s=x_(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==o)return s}else if(a===!1&&typeof o<"u"&&n!==o)return null}return!1}function Yf(e,t,n,o){const i=t._rootScopes,r=x_(t._fallback,n,o),a=[...e,...i],s=new Set;s.add(o);let l=xb(s,a,n,r||n,o);return l===null||typeof r<"u"&&r!==n&&(l=xb(s,a,r,l,o),l===null)?!1:Gf(Array.from(s),[""],i,r,()=>a6(t,n,o))}function xb(e,t,n,o,i){for(;n;)n=r6(e,t,n,o,i);return n}function a6(e,t,n){const o=e._getTarget();t in o||(o[t]={});const i=o[t];return pt(i)&&Ae(n)?n:i||{}}function s6(e,t,n,o){let i;for(const r of t)if(i=w_(e6(r,e),n),typeof i<"u")return qf(e,i)?Yf(n,o,e,i):i}function w_(e,t){for(const n of t){if(!n)continue;const o=n[e];if(typeof o<"u")return o}}function wb(e){let t=e._keys;return t||(t=e._keys=l6(e._scopes)),t}function l6(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 Kf(){return typeof window<"u"&&typeof document<"u"}function Xf(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function hu(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 td=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function c6(e,t){return td(e).getPropertyValue(t)}const u6=["top","right","bottom","left"];function zi(e,t,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const r=u6[i];o[r]=parseFloat(e[t+"-"+r+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const d6=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function h6(e,t){const n=e.touches,o=n&&n.length?n[0]:e,{offsetX:i,offsetY:r}=o;let a=!1,s,l;if(d6(i,r,e.target))s=i,l=r;else{const c=t.getBoundingClientRect();s=o.clientX-c.left,l=o.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function Ei(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:o}=t,i=td(n),r=i.boxSizing==="border-box",a=zi(i,"padding"),s=zi(i,"border","width"),{x:l,y:c,box:u}=h6(e,n),d=a.left+(u&&s.left),h=a.top+(u&&s.top);let{width:p,height:m}=t;return r&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((l-d)/p*n.width/o),y:Math.round((c-h)/m*n.height/o)}}function p6(e,t,n){let o,i;if(t===void 0||n===void 0){const r=e&&Xf(e);if(!r)t=e.clientWidth,n=e.clientHeight;else{const a=r.getBoundingClientRect(),s=td(r),l=zi(s,"border","width"),c=zi(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,o=hu(s.maxWidth,r,"clientWidth"),i=hu(s.maxHeight,r,"clientHeight")}}return{width:t,height:n,maxWidth:o||uu,maxHeight:i||uu}}const Jo=e=>Math.round(e*10)/10;function f6(e,t,n,o){const i=td(e),r=zi(i,"margin"),a=hu(i.maxWidth,e,"clientWidth")||uu,s=hu(i.maxHeight,e,"clientHeight")||uu,l=p6(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=zi(i,"border","width"),h=zi(i,"padding");c-=h.width+d.width,u-=h.height+d.height}return c=Math.max(0,c-r.width),u=Math.max(0,o?c/o:u-r.height),c=Jo(Math.min(c,a,l.maxWidth)),u=Jo(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Jo(c/2)),(t!==void 0||n!==void 0)&&o&&l.height&&u>l.height&&(u=l.height,c=Jo(Math.floor(u*o))),{width:c,height:u}}function _b(e,t,n){const o=t||1,i=Jo(e.height*o),r=Jo(e.width*o);e.height=Jo(e.height),e.width=Jo(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==o||a.height!==i||a.width!==r?(e.currentDevicePixelRatio=o,a.height=i,a.width=r,e.ctx.setTransform(o,0,0,o,0,0),!0):!1}const g6=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Kf()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Cb(e,t){const n=c6(e,t),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}const m6=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}}},v6=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Zd(e,t,n){return e?m6(t,n):v6()}function b6(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 y6(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Wl(e,t,n){return e.options.clip?e[n]:t[n]}function x6(e,t){const{xScale:n,yScale:o}=e;return n&&o?{left:Wl(n,t,"left"),right:Wl(n,t,"right"),top:Wl(o,t,"top"),bottom:Wl(o,t,"bottom")}:t}function w6(e,t){const n=t._clip;if(n.disabled)return!1;const o=x6(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 _6=Object.defineProperty,C6=(e,t,n)=>t in e?_6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pe=(e,t,n)=>C6(e,typeof t!="symbol"?t+"":t,n);class k6{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,i){const r=n.listeners[i],a=n.duration;r.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=l_.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 r=o.items;let a=r.length-1,s=!1,l;for(;a>=0;--a)l=r[a],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(t),s=!0):(r[a]=r[r.length-1],r.pop());s&&(i.draw(),this._notify(i,o,t,"progress")),r.length||(o.running=!1,this._notify(i,o,t,"complete"),o.initial=!1),n+=r.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 go=new k6;const kb="transparent",S6={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=fb(e||kb),i=o.valid&&fb(t||kb);return i&&i.valid?i.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class $6{constructor(t,n,o,i){const r=n[o];i=jl([t.to,i,r,t.from]);const a=jl([t.from,r,i]);this._active=!0,this._fn=t.fn||S6[t.type||typeof a],this._easing=ms[t.easing]||ms.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=a,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],r=o-this._start,a=this._duration-r;this._start=o,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=jl([t.to,n,i,t.from]),this._from=jl([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,r=this._from,a=this._loop,s=this._to;let l;if(this._active=r!==s&&(a||n<o),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=r;return}l=n/o%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(r,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 __{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ae(t))return;const n=Object.keys(nt.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const r=t[i];if(!Ae(r))return;const a={};for(const s of n)a[s]=r[s];(pt(r.properties)&&r.properties||[i]).forEach(s=>{(s===i||!o.has(s))&&o.set(s,a)})})}_animateOptions(t,n){const o=n.options,i=T6(t,o);if(!i)return[];const r=this._createAnimations(i,o);return o.$shared&&E6(t.options.$animations,o).then(()=>{t.options=o},()=>{}),r}_createAnimations(t,n){const o=this._properties,i=[],r=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=r[c];const h=o.get(c);if(d)if(h&&d.active()){d.update(h,u,s);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}r[c]=d=new $6(h,t,c,u),i.push(d)}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 go.add(this._chart,o),!0}}function E6(e,t){const n=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const r=e[o[i]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}function T6(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 Sb(e,t){const n=e&&e.options||{},o=n.reverse,i=n.min===void 0?t:0,r=n.max===void 0?t:0;return{start:o?r:i,end:o?i:r}}function O6(e,t,n){if(n===!1)return!1;const o=Sb(e,n),i=Sb(t,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function I6(e){let t,n,o,i;return Ae(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 C_(e,t){const n=[],o=e._getSortedDatasetMetas(t);let i,r;for(i=0,r=o.length;i<r;++i)n.push(o[i].index);return n}function $b(e,t,n,o={}){const i=e.keys,r=o.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,o.all)continue;break}c=e.values[l],xn(c)&&(r||t===0||ni(t)===ni(c))&&(t+=c)}return!u&&!o.all?0:t}function P6(e,t){const{iScale:n,vScale:o}=t,i=n.axis==="x"?"x":"y",r=o.axis==="x"?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[i]:u,[r]:e[u]};return s}function Jd(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function A6(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function R6(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 D6(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function Eb(e,t,n,o){for(const i of t.getMatchingVisibleMetas(o).reverse()){const r=e[i.index];if(n&&r>0||!n&&r<0)return i.index}return null}function Tb(e,t){const{chart:n,_cachedMeta:o}=e,i=n._stacks||(n._stacks={}),{iScale:r,vScale:a,index:s}=o,l=r.axis,c=a.axis,u=A6(r,a,o),d=t.length;let h;for(let p=0;p<d;++p){const m=t[p],{[l]:f,[c]:b}=m,v=m._stacks||(m._stacks={});h=v[c]=D6(i,u,f),h[s]=b,h._top=Eb(h,a,!0,o.type),h._bottom=Eb(h,a,!1,o.type);const y=h._visualValues||(h._visualValues={});y[s]=b}}function Qd(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function V6(e,t){return la(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function M6(e,t,n){return la(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Ma(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 r=i._stacks;if(!r||r[o]===void 0||r[o][n]===void 0)return;delete r[o][n],r[o]._visualValues!==void 0&&r[o]._visualValues[n]!==void 0&&delete r[o]._visualValues[n]}}}const eh=e=>e==="reset"||e==="none",Ob=(e,t)=>t?e:Object.assign({},e),N6=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:C_(n,!0),values:null};class ys{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=Jd(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&&Ma(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(d,h,p,m)=>d==="x"?h:d==="r"?m:p,r=n.xAxisID=Ge(o.xAxisID,Qd(t,"x")),a=n.yAxisID=Ge(o.yAxisID,Qd(t,"y")),s=n.rAxisID=Ge(o.rAxisID,Qd(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,r,a,s),u=n.vAxisID=i(l,a,r,s);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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&&ub(this._data,this),t._stacked&&Ma(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(Ae(n)){const i=this._cachedMeta;this._data=P6(n,i)}else if(o!==n){if(o){ub(o,this);const i=this._cachedMeta;Ma(i),i._parsed=[]}n&&Object.isExtensible(n)&&AB(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 r=n._stacked;n._stacked=Jd(n.vScale,n),n.stack!==o.stack&&(i=!0,Ma(n),n.stack=o.stack),this._resyncElements(t),(i||r!==n._stacked)&&(Tb(this,n._parsed),n._stacked=Jd(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:r,_stacked:a}=o,s=r.axis;let l=t===0&&n===i.length?!0:o._sorted,c=t>0&&o._parsed[t-1],u,d,h;if(this._parsing===!1)o._parsed=i,o._sorted=!0,h=i;else{pt(i[t])?h=this.parseArrayData(o,i,t,n):Ae(i[t])?h=this.parseObjectData(o,i,t,n):h=this.parsePrimitiveData(o,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)o._parsed[u+t]=d=h[u],l&&(p()&&(l=!1),c=d);o._sorted=l}a&&Tb(this,h)}parsePrimitiveData(t,n,o,i){const{iScale:r,vScale:a}=t,s=r.axis,l=a.axis,c=r.getLabels(),u=r===a,d=new Array(i);let h,p,m;for(h=0,p=i;h<p;++h)m=h+o,d[h]={[s]:u||r.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,o,i){const{xScale:r,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+o,d=n[u],s[l]={x:r.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,o,i){const{xScale:r,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,h,p;for(u=0,d=i;u<d;++u)h=u+o,p=n[h],c[u]={x:r.parse(qr(p,s),h),y:a.parse(qr(p,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const i=this.chart,r=this._cachedMeta,a=n[t.axis],s={keys:C_(i,!0),values:n._stacks[t.axis]._visualValues};return $b(s,a,r.index,{mode:o})}updateRangeFromParsed(t,n,o,i){const r=o[n.axis];let a=r===null?NaN:r;const s=i&&o._stacks[n.axis];i&&s&&(i.values=s,a=$b(i,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const o=this._cachedMeta,i=o._parsed,r=o._sorted&&t===o.iScale,a=i.length,s=this._getOtherScale(t),l=N6(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=R6(s);let h,p;function m(){p=i[h];const f=p[s.axis];return!xn(p[t.axis])||u>f||d<f}for(h=0;h<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),r));++h);if(r){for(h=a-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let i,r,a;for(i=0,r=n.length;i<r;++i)a=n[i][t.axis],xn(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,i=n.vScale,r=this.getParsed(t);return{label:o?""+o.getLabelForValue(r[o.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=I6(Ge(this.options.clip,O6(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],r=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(t,r,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,r))}for(u=0;u<a.length;++u)a[u].draw(t,r)}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 r;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];r=a.$context||(a.$context=M6(this.getContext(),t,a)),r.parsed=this.getParsed(t),r.raw=i.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=V6(this.chart.getContext(),this.index)),r.dataset=i,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=o,r}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",r=this._cachedDataOpts,a=t+"-"+n,s=r[a],l=this.enableOptionSharing&&Vs(o);if(s)return Ob(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),p=Object.keys(nt.elements[t]),m=()=>this.getContext(o,i,n),f=c.resolveNamedOptions(h,p,m,d);return f.$shared&&(f.$shared=l,r[a]=Object.freeze(Ob(f,l))),f}_resolveAnimations(t,n,o){const i=this.chart,r=this._cachedDataOpts,a=`animation-${n}`,s=r[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,o,n))}const c=new __(i,l&&l.animations);return l&&l._cacheable&&(r[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||eh(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),i=this._sharedOptions,r=this.getSharedOptions(o),a=this.includeOptions(n,r)||r!==i;return this.updateSharedOptions(r,n,o),{sharedOptions:r,includeOptions:a}}updateElement(t,n,o,i){eh(i)?Object.assign(t,o):this._resolveAnimations(n,i).update(t,o)}updateSharedOptions(t,n,o){t&&!eh(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,i){t.active=i;const r=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}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,r=n.length,a=Math.min(r,i);a&&this.parse(0,a),r>i?this._insertElements(i,r-i,t):r<i&&this._removeElements(r,i-r)}_insertElements(t,n,o=!0){const i=this._cachedMeta,r=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(r),s=t;s<a;++s)r[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),o&&this.updateElements(r,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&&Ma(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])}}Pe(ys,"defaults",{}),Pe(ys,"datasetElementType",null),Pe(ys,"dataElementType",null);function L6(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let i=0,r=n.length;i<r;i++)o=o.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=s_(o.sort((i,r)=>i-r))}return e._cache.$bar}function F6(e){const t=e.iScale,n=L6(t,e.type);let o=t._length,i,r,a,s;const l=()=>{a===32767||a===-32768||(Vs(s)&&(o=Math.min(o,Math.abs(a-s)||o)),s=a)};for(i=0,r=n.length;i<r;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,r=t.ticks.length;i<r;++i)a=t.getPixelForTick(i),l();return o}function B6(e,t,n,o){const i=n.barThickness;let r,a;return Fe(i)?(r=t.min*n.categoryPercentage,a=n.barPercentage):(r=i*o,a=1),{chunk:r/o,ratio:a,start:t.pixels[e]-r/2}}function z6(e,t,n,o){const i=t.pixels,r=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=r-(s===null?t.end-t.start:s-r)),s===null&&(s=r+r-a);const c=r-(r-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/o,ratio:n.barPercentage,start:c}}function H6(e,t,n,o){const i=n.parse(e[0],o),r=n.parse(e[1],o),a=Math.min(i,r),s=Math.max(i,r);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:r,min:a,max:s}}function k_(e,t,n,o){return pt(e)?H6(e,t,n,o):t[n.axis]=n.parse(e,o),t}function Ib(e,t,n,o){const i=e.iScale,r=e.vScale,a=i.getLabels(),s=i===r,l=[];let c,u,d,h;for(c=n,u=n+o;c<u;++c)h=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(k_(h,d,r,c));return l}function th(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function j6(e,t,n){return e!==0?ni(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function W6(e){let t,n,o,i,r;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(i="end",r="start"):(i="start",r="end"),{start:n,end:o,reverse:t,top:i,bottom:r}}function U6(e,t,n,o){let i=t.borderSkipped;const r={};if(!i){e.borderSkipped=r;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=W6(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(r[Pb(u,a,s,l)]=!0,i=c)),r[Pb(i,a,s,l)]=!0,e.borderSkipped=r}function Pb(e,t,n,o){return o?(e=G6(e,t,n),e=Ab(e,n,t)):e=Ab(e,t,n),e}function G6(e,t,n){return e===t?n:e===n?t:e}function Ab(e,t,n){return e==="start"?t:e==="end"?n:e}function q6(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Tc extends ys{parsePrimitiveData(t,n,o,i){return Ib(t,n,o,i)}parseArrayData(t,n,o,i){return Ib(t,n,o,i)}parseObjectData(t,n,o,i){const{iScale:r,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=r.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let h,p,m,f;for(h=o,p=o+i;h<p;++h)f=n[h],m={},m[r.axis]=r.parse(qr(f,c),h),d.push(k_(qr(f,u),m,a,h));return d}updateRangeFromParsed(t,n,o,i){super.updateRangeFromParsed(t,n,o,i);const r=o._custom;r&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:i}=n,r=this.getParsed(t),a=r._custom,s=th(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+o.getLabelForValue(r[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 r=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),f=r||Fe(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),b=this._calculateBarIndexPixels(p,u),v=(m._stacks||{})[s.axis],y={horizontal:c,base:f.base,enableBorderRadius:!v||th(m._custom)||a===v._top||a===v._bottom,x:c?f.head:b.center,y:c?b.center:f.head,height:c?b.size:Math.abs(f.size),width:c?Math.abs(f.size):b.size};h&&(y.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const x=y.options||t[p].options;U6(y,x,v,a),q6(y,x,u.ratio),this.updateElement(t[p],p,y,i)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),r=o.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[o.axis],c=u=>{const d=u._parsed.find(p=>p[o.axis]===l),h=d&&d[u.vScale.axis];if(Fe(h)||isNaN(h))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((r===!1||a.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_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[Ge(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),r=n!==void 0?i.indexOf(n):-1;return r===-1?i.length-1:r}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,i=[];let r,a;for(r=0,a=n.data.length;r<a;++r)i.push(o.getPixelForValue(this.getParsed(r)[o.axis],r));const s=t.barThickness;return{min:s||F6(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:r,minBarLength:a}}=this,s=r||0,l=this.getParsed(t),c=l._custom,u=th(c);let d=l[n.axis],h=0,p=o?this.applyStack(n,l,o):d,m,f;p!==d&&(h=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&ni(d)!==ni(c.barEnd)&&(h=0),h+=d);const b=!Fe(r)&&!u?r:h;let v=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(h+p):m=v,f=m-v,Math.abs(f)<a){f=j6(f,n,s)*a,d===s&&(v-=f/2);const y=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),_=Math.min(y,x),k=Math.max(y,x);v=Math.max(Math.min(v,k),_),m=v+f,o&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(v))}if(v===n.getPixelForValue(s)){const y=ni(f)*n.getLineWidthForValue(s)/2;v+=y,f-=y}return{size:f,base:v,head:m,center:m+f/2}}_calculateBarIndexPixels(t,n){const o=n.scale,i=this.options,r=i.skipNull,a=Ge(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=r?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?z6(t,n,i,u*c):B6(t,n,i,u*c),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Ge(h,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=o.getPixelForValue(this.getParsed(t)[o.axis],t),l=Math.min(a,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 r=0;for(;r<i;++r)this.getParsed(r)[n.axis]!==null&&!o[r].hidden&&o[r].draw(this._ctx)}}Pe(Tc,"id","bar"),Pe(Tc,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Pe(Tc,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function $i(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Zf{constructor(t){Pe(this,"options"),this.options=t||{}}static override(t){Object.assign(Zf.prototype,t)}init(){}formats(){return $i()}parse(){return $i()}format(){return $i()}add(){return $i()}diff(){return $i()}startOf(){return $i()}endOf(){return $i()}}var S_={_date:Zf};function Y6(e,t,n,o){const{controller:i,data:r,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&r.length){const c=s._reversePixels?IB:sp;if(o){if(i._sharedOptions){const u=r[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const h=c(r,t,n-d),p=c(r,t,n+d);return{lo:h.lo,hi:p.hi}}}}else{const u=c(r,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:h}=e,p=h.slice(0,u.lo+1).reverse().findIndex(f=>!Fe(f[d.axis]));u.lo-=Math.max(0,p);const m=h.slice(u.hi).findIndex(f=>!Fe(f[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:r.length-1}}function nd(e,t,n,o,i){const r=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=r.length;s<l;++s){const{index:c,data:u}=r[s],{lo:d,hi:h}=Y6(r[s],t,a,i);for(let p=d;p<=h;++p){const m=u[p];m.skip||o(m,c,p)}}}function K6(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(o,i){const r=t?Math.abs(o.x-i.x):0,a=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function nh(e,t,n,o,i){const r=[];return!i&&!e.isPointInArea(t)||nd(e,n,t,function(a,s,l){!i&&!p_(a,e.chartArea,0)||a.inRange(t.x,t.y,o)&&r.push({element:a,datasetIndex:s,index:l})},!0),r}function X6(e,t,n,o){let i=[];function r(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],o),{angle:d}=$B(a,{x:t.x,y:t.y});TB(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return nd(e,n,t,r),i}function Z6(e,t,n,o,i,r){let a=[];const s=K6(n);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const p=u.inRange(t.x,t.y,i);if(o&&!p)return;const m=u.getCenterPoint(i);if(!(r||e.isPointInArea(m))&&!p)return;const f=s(t,m);f<l?(a=[{element:u,datasetIndex:d,index:h}],l=f):f===l&&a.push({element:u,datasetIndex:d,index:h})}return nd(e,n,t,c),a}function oh(e,t,n,o,i,r){return!r&&!e.isPointInArea(t)?[]:n==="r"&&!o?X6(e,t,n,i):Z6(e,t,n,o,i,r)}function Rb(e,t,n,o,i){const r=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return nd(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(r.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),o&&!s?[]:r}var J6={modes:{index(e,t,n,o){const i=Ei(t,e),r=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?nh(e,i,r,o,a):oh(e,i,r,!1,o,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,o){const i=Ei(t,e),r=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?nh(e,i,r,o,a):oh(e,i,r,!1,o,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,n,o){const i=Ei(t,e),r=n.axis||"xy",a=n.includeInvisible||!1;return nh(e,i,r,o,a)},nearest(e,t,n,o){const i=Ei(t,e),r=n.axis||"xy",a=n.includeInvisible||!1;return oh(e,i,r,n.intersect,o,a)},x(e,t,n,o){const i=Ei(t,e);return Rb(e,i,"x",n.intersect,o)},y(e,t,n,o){const i=Ei(t,e);return Rb(e,i,"y",n.intersect,o)}}};const $_=["left","top","right","bottom"];function Na(e,t){return e.filter(n=>n.pos===t)}function Db(e,t){return e.filter(n=>$_.indexOf(n.pos)===-1&&n.box.axis===t)}function La(e,t){return e.sort((n,o)=>{const i=t?o:n,r=t?n:o;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function Q6(e){const t=[];let n,o,i,r,a,s;for(n=0,o=(e||[]).length;n<o;++n)i=e[n],{position:r,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:r,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&r+a,stackWeight:s});return t}function e5(e){const t={};for(const n of e){const{stack:o,pos:i,stackWeight:r}=n;if(!o||!$_.includes(i))continue;const a=t[o]||(t[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return t}function t5(e,t){const n=e5(e),{vBoxMaxWidth:o,hBoxMaxHeight:i}=t;let r,a,s;for(r=0,a=e.length;r<a;++r){s=e[r];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*o:l&&t.availableWidth,s.height=i):(s.width=o,s.height=u?u*i:l&&t.availableHeight)}return n}function n5(e){const t=Q6(e),n=La(t.filter(c=>c.box.fullSize),!0),o=La(Na(t,"left"),!0),i=La(Na(t,"right")),r=La(Na(t,"top"),!0),a=La(Na(t,"bottom")),s=Db(t,"x"),l=Db(t,"y");return{fullSize:n,leftAndTop:o.concat(r),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Na(t,"chartArea"),vertical:o.concat(i).concat(l),horizontal:r.concat(a).concat(s)}}function Vb(e,t,n,o){return Math.max(e[n],t[n])+Math.max(e[o],t[o])}function E_(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 o5(e,t,n,o){const{pos:i,box:r}=n,a=e.maxPadding;if(!Ae(i)){n.size&&(e[i]-=n.size);const d=o[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?r.height:r.width),n.size=d.size/d.count,e[i]+=n.size}r.getPadding&&E_(a,r.getPadding());const s=Math.max(0,t.outerWidth-Vb(a,e,"left","right")),l=Math.max(0,t.outerHeight-Vb(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function i5(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 r5(e,t){const n=t.maxPadding;function o(i){const r={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{r[a]=Math.max(t[a],n[a])}),r}return o(e?["left","right"]:["top","bottom"])}function rs(e,t,n,o){const i=[];let r,a,s,l,c,u;for(r=0,a=e.length,c=0;r<a;++r){s=e[r],l=s.box,l.update(s.width||t.w,s.height||t.h,r5(s.horizontal,t));const{same:d,other:h}=o5(t,n,s,o);c|=d&&i.length,u=u||h,l.fullSize||i.push(s)}return c&&rs(i,t,n,o)||u}function Ul(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 Mb(e,t,n,o){const i=n.padding;let{x:r,y:a}=t;for(const s of e){const l=s.box,c=o[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,h=c.size||l.height;Vs(c.start)&&(a=c.start),l.fullSize?Ul(l,i.left,a,n.outerWidth-i.right-i.left,h):Ul(l,t.left+c.placed,a,d,h),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,h=c.size||l.width;Vs(c.start)&&(r=c.start),l.fullSize?Ul(l,r,i.top,h,n.outerHeight-i.bottom-i.top):Ul(l,r,t.top+c.placed,h,d),c.start=r,c.placed+=d,r=l.right}}t.x=r,t.y=a}var Gl={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=si(e.options.layout.padding),r=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=n5(e.boxes),l=s.vertical,c=s.horizontal;De(e.boxes,f=>{typeof f.beforeLayout=="function"&&f.beforeLayout()});const u=l.reduce((f,b)=>b.box.options&&b.box.options.display===!1?f:f+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/u,hBoxMaxHeight:a/2}),h=Object.assign({},i);E_(h,si(o));const p=Object.assign({maxPadding:h,w:r,h:a,x:i.left,y:i.top},i),m=t5(l.concat(c),d);rs(s.fullSize,p,d,m),rs(l,p,d,m),rs(c,p,d,m)&&rs(l,p,d,m),i5(p),Mb(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,Mb(s.rightAndBottom,p,d,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},De(s.chartArea,f=>{const b=f.box;Object.assign(b,e.chartArea),b.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class T_{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 a5 extends T_{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Oc="$chartjs",s5={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Nb=e=>e===null||e==="";function l5(e,t){const n=e.style,o=e.getAttribute("height"),i=e.getAttribute("width");if(e[Oc]={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",Nb(i)){const r=Cb(e,"width");r!==void 0&&(e.width=r)}if(Nb(o))if(e.style.height==="")e.height=e.width/(t||2);else{const r=Cb(e,"height");r!==void 0&&(e.height=r)}return e}const O_=g6?{passive:!0}:!1;function c5(e,t,n){e&&e.addEventListener(t,n,O_)}function u5(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,O_)}function d5(e,t){const n=s5[e.type]||e.type,{x:o,y:i}=Ei(e,t);return{type:n,chart:t,native:e,x:o!==void 0?o:null,y:i!==void 0?i:null}}function pu(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function h5(e,t,n){const o=e.canvas,i=new MutationObserver(r=>{let a=!1;for(const s of r)a=a||pu(s.addedNodes,o),a=a&&!pu(s.removedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function p5(e,t,n){const o=e.canvas,i=new MutationObserver(r=>{let a=!1;for(const s of r)a=a||pu(s.removedNodes,o),a=a&&!pu(s.addedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ms=new Map;let Lb=0;function I_(){const e=window.devicePixelRatio;e!==Lb&&(Lb=e,Ms.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function f5(e,t){Ms.size||window.addEventListener("resize",I_),Ms.set(e,t)}function g5(e){Ms.delete(e),Ms.size||window.removeEventListener("resize",I_)}function m5(e,t,n){const o=e.canvas,i=o&&Xf(o);if(!i)return;const r=c_((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return a.observe(i),f5(e,r),a}function ih(e,t,n){n&&n.disconnect(),t==="resize"&&g5(e)}function v5(e,t,n){const o=e.canvas,i=c_(r=>{e.ctx!==null&&n(d5(r,e))},e);return c5(o,t,i),i}class b5 extends T_{acquireContext(t,n){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(l5(t,n),o):null}releaseContext(t){const n=t.canvas;if(!n[Oc])return!1;const o=n[Oc].initial;["height","width"].forEach(r=>{const a=o[r];Fe(a)?n.removeAttribute(r):n.setAttribute(r,a)});const i=o.style||{};return Object.keys(i).forEach(r=>{n.style[r]=i[r]}),n.width=n.width,delete n[Oc],!0}addEventListener(t,n,o){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),r={attach:h5,detach:p5,resize:m5}[n]||v5;i[n]=r(t,n,o)}removeEventListener(t,n){const o=t.$proxies||(t.$proxies={}),i=o[n];i&&(({attach:ih,detach:ih,resize:ih}[n]||u5)(t,n,i),o[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,o,i){return f6(t,n,o,i)}isAttached(t){const n=t&&Xf(t);return!!(n&&n.isConnected)}}function y5(e){return!Kf()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?a5:b5}class Kr{constructor(){Pe(this,"x"),Pe(this,"y"),Pe(this,"active",!1),Pe(this,"options"),Pe(this,"$animations")}tooltipPosition(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}hasValue(){return du(this.x)&&du(this.y)}getProps(t,n){const o=this.$animations;if(!n||!o)return this;const i={};return t.forEach(r=>{i[r]=o[r]&&o[r].active()?o[r]._to:this[r]}),i}}Pe(Kr,"defaults",{}),Pe(Kr,"defaultRoutes");function x5(e,t){const n=e.options.ticks,o=w5(e),i=Math.min(n.maxTicksLimit||o,o),r=n.major.enabled?C5(t):[],a=r.length,s=r[0],l=r[a-1],c=[];if(a>i)return k5(t,c,r,a/i),c;const u=_5(r,t,i);if(a>0){let d,h;const p=a>1?Math.round((l-s)/(a-1)):null;for(ql(t,c,u,Fe(p)?0:s-p,s),d=0,h=a-1;d<h;d++)ql(t,c,u,r[d],r[d+1]);return ql(t,c,u,l,Fe(p)?t.length:l+p),c}return ql(t,c,u),c}function w5(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 _5(e,t,n){const o=S5(e),i=t.length/n;if(!o)return Math.max(i,1);const r=wB(o);for(let a=0,s=r.length-1;a<s;a++){const l=r[a];if(l>i)return l}return Math.max(i,1)}function C5(e){const t=[];let n,o;for(n=0,o=e.length;n<o;n++)e[n].major&&t.push(n);return t}function k5(e,t,n,o){let i=0,r=n[0],a;for(o=Math.ceil(o),a=0;a<e.length;a++)a===r&&(t.push(e[a]),i++,r=n[i*o])}function ql(e,t,n,o,i){const r=Ge(o,0),a=Math.min(Ge(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-o,n=l/Math.floor(l/n)),u=r;u<0;)s++,u=Math.round(r+s*n);for(c=Math.max(r,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(r+s*n))}function S5(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 $5=e=>e==="left"?"right":e==="right"?"left":e,Fb=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Bb=(e,t)=>Math.min(t||e,e);function zb(e,t){const n=[],o=e.length/t,i=e.length;let r=0;for(;r<i;r+=o)n.push(e[Math.floor(r)]);return n}function E5(e,t,n){const o=e.ticks.length,i=Math.min(t,o-1),r=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(l-r,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<r-s||l>a+s)))return l}function T5(e,t){De(e,n=>{const o=n.gc,i=o.length/2;let r;if(i>t){for(r=0;r<i;++r)delete n.data[o[r]];o.splice(0,i)}})}function Fa(e){return e.drawTicks?e.tickLength:0}function Hb(e,t){if(!e.display)return 0;const n=Qn(e.font,t),o=si(e.padding);return(pt(e.text)?e.text.length:1)*n.lineHeight+o.height}function O5(e,t){return la(e,{scale:t,type:"scale"})}function I5(e,t,n){return la(e,{tick:n,index:t,type:"tick"})}function P5(e,t,n){let o=DB(e);return(n&&t!=="right"||!n&&t==="right")&&(o=$5(o)),o}function A5(e,t,n,o){const{top:i,left:r,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,h,p,m;const f=a-i,b=s-r;if(e.isHorizontal()){if(p=db(o,r,s),Ae(n)){const v=Object.keys(n)[0],y=n[v];m=u[v].getPixelForValue(y)+f-t}else n==="center"?m=(c.bottom+c.top)/2+f-t:m=Fb(e,n,t);h=s-r}else{if(Ae(n)){const v=Object.keys(n)[0],y=n[v];p=u[v].getPixelForValue(y)-b+t}else n==="center"?p=(c.left+c.right)/2-b+t:p=Fb(e,n,t);m=db(o,a,i),d=n==="left"?-Vn:Vn}return{titleX:p,titleY:m,maxWidth:h,rotation:d}}class ca extends Kr{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=Un(t,Number.POSITIVE_INFINITY),n=Un(n,Number.NEGATIVE_INFINITY),o=Un(o,Number.POSITIVE_INFINITY),i=Un(i,Number.NEGATIVE_INFINITY),{min:Un(t,o),max:Un(n,i),minDefined:xn(t),maxDefined:xn(n)}}getMinMax(t){let{min:n,max:o,minDefined:i,maxDefined:r}=this.getUserBounds(),a;if(i&&r)return{min:n,max:o};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),r||(o=Math.max(o,a.max));return n=r&&n>o?o:n,o=i&&n>o?n:o,{min:Un(n,Un(o,n)),max:Un(o,Un(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(){Qe(this.options.beforeUpdate,[this])}update(t,n,o){const{beginAtZero:i,grace:r,ticks:a}=this.options,s=a.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=QB(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?zb(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=x5(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(){Qe(this.options.afterUpdate,[this])}beforeSetDimensions(){Qe(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(){Qe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Qe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let o,i,r;for(o=0,i=t.length;o<i;o++)r=t[o],r.label=Qe(n.callback,[r.value,o,t],this)}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,o=Bb(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,r=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=r||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,p=Mn(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/o:p/(o-1),d+6>s&&(s=p/(o-(t.offset?.5:1)),l=this.maxHeight-Fa(t.grid)-n.padding-Hb(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),a=SB(Math.min(Math.asin(Mn((u.highest.height+6)/s,-1,1)),Math.asin(Mn(l/c,-1,1))-Math.asin(Mn(h/c,-1,1)))),a=Math.max(i,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:r}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Hb(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Fa(r)+l):(t.height=this.maxHeight,t.width=Fa(r)+l),o.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),p=o.padding*2,m=Di(this.labelRotation),f=Math.cos(m),b=Math.sin(m);if(s){const v=o.mirror?0:b*d.width+f*h.height;t.height=Math.min(this.maxHeight,t.height+v+p)}else{const v=o.mirror?0:f*d.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+v+p)}this._calculatePadding(c,u,b,f)}}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:r,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;l?c?(h=i*t.width,p=o*n.height):(h=o*t.height,p=i*n.width):r==="start"?p=n.width:r==="end"?h=t.width:r!=="inner"&&(h=t.width/2,p=n.width/2),this.paddingLeft=Math.max((h-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;r==="start"?(u=0,d=t.height):r==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_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(){Qe(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++)Fe(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=zb(o,n)),this._labelSizes=t=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,o){const{ctx:i,_longestTextCache:r}=this,a=[],s=[],l=Math.floor(n/Bb(n,o));let c=0,u=0,d,h,p,m,f,b,v,y,x,_,k;for(d=0;d<n;d+=l){if(m=t[d].label,f=this._resolveTickFontOptions(d),i.font=b=f.string,v=r[b]=r[b]||{data:{},gc:[]},y=f.lineHeight,x=_=0,!Fe(m)&&!pt(m))x=mb(i,v.data,v.gc,x,m),_=y;else if(pt(m))for(h=0,p=m.length;h<p;++h)k=m[h],!Fe(k)&&!pt(k)&&(x=mb(i,v.data,v.gc,x,k),_+=y);a.push(x),s.push(_),c=Math.max(x,c),u=Math.max(_,u)}T5(r,n);const $=a.indexOf(c),A=s.indexOf(u),S=R=>({width:a[R]||0,height:s[R]||0});return{first:S(0),last:S(n-1),widest:S($),highest:S(A),widths:a,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 OB(this._alignToPixels?Si(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=I5(this.getContext(),t,o))}return this.$context||(this.$context=O5(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Di(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,s=r?r.widest.width+a:0,l=r?r.highest.height+a: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:r,position:a,border:s}=i,l=r.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),d=Fa(r),h=[],p=s.setContext(this.getContext()),m=p.display?p.width:0,f=m/2,b=function(W){return Si(o,W,m)};let v,y,x,_,k,$,A,S,R,F,P,G;if(a==="top")v=b(this.bottom),$=this.bottom-d,S=v-f,F=b(t.top)+f,G=t.bottom;else if(a==="bottom")v=b(this.top),F=t.top,G=b(t.bottom)-f,$=v+f,S=this.top+d;else if(a==="left")v=b(this.right),k=this.right-d,A=v-f,R=b(t.left)+f,P=t.right;else if(a==="right")v=b(this.left),R=t.left,P=b(t.right)-f,k=v+f,A=this.left+d;else if(n==="x"){if(a==="center")v=b((t.top+t.bottom)/2+.5);else if(Ae(a)){const W=Object.keys(a)[0],q=a[W];v=b(this.chart.scales[W].getPixelForValue(q))}F=t.top,G=t.bottom,$=v+f,S=$+d}else if(n==="y"){if(a==="center")v=b((t.left+t.right)/2);else if(Ae(a)){const W=Object.keys(a)[0],q=a[W];v=b(this.chart.scales[W].getPixelForValue(q))}k=v-f,A=k-d,R=t.left,P=t.right}const ee=Ge(i.ticks.maxTicksLimit,u),z=Math.max(1,Math.ceil(u/ee));for(y=0;y<u;y+=z){const W=this.getContext(y),q=r.setContext(W),ne=s.setContext(W),te=q.lineWidth,le=q.color,he=ne.dash||[],ue=ne.dashOffset,_e=q.tickWidth,me=q.tickColor,Te=q.tickBorderDash||[],B=q.tickBorderDashOffset;x=E5(this,y,l),x!==void 0&&(_=Si(o,x,te),c?k=A=R=P=_:$=S=F=G=_,h.push({tx1:k,ty1:$,tx2:A,ty2:S,x1:R,y1:F,x2:P,y2:G,width:te,color:le,borderDash:he,borderDashOffset:ue,tickWidth:_e,tickColor:me,tickBorderDash:Te,tickBorderDashOffset:B}))}return this._ticksLength=u,this._borderValue=v,h}_computeLabelItems(t){const n=this.axis,o=this.options,{position:i,ticks:r}=o,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=r,h=Fa(o.grid),p=h+u,m=d?-u:p,f=-Di(this.labelRotation),b=[];let v,y,x,_,k,$,A,S,R,F,P,G,ee="middle";if(i==="top")$=this.bottom-m,A=this._getXAxisLabelAlignment();else if(i==="bottom")$=this.top+m,A=this._getXAxisLabelAlignment();else if(i==="left"){const W=this._getYAxisLabelAlignment(h);A=W.textAlign,k=W.x}else if(i==="right"){const W=this._getYAxisLabelAlignment(h);A=W.textAlign,k=W.x}else if(n==="x"){if(i==="center")$=(t.top+t.bottom)/2+p;else if(Ae(i)){const W=Object.keys(i)[0],q=i[W];$=this.chart.scales[W].getPixelForValue(q)+p}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")k=(t.left+t.right)/2-p;else if(Ae(i)){const W=Object.keys(i)[0],q=i[W];k=this.chart.scales[W].getPixelForValue(q)}A=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?ee="top":l==="end"&&(ee="bottom"));const z=this._getLabelSizes();for(v=0,y=s.length;v<y;++v){x=s[v],_=x.label;const W=r.setContext(this.getContext(v));S=this.getPixelForTick(v)+r.labelOffset,R=this._resolveTickFontOptions(v),F=R.lineHeight,P=pt(_)?_.length:1;const q=P/2,ne=W.color,te=W.textStrokeColor,le=W.textStrokeWidth;let he=A;a?(k=S,A==="inner"&&(v===y-1?he=this.options.reverse?"left":"right":v===0?he=this.options.reverse?"right":"left":he="center"),i==="top"?c==="near"||f!==0?G=-P*F+F/2:c==="center"?G=-z.highest.height/2-q*F+F:G=-z.highest.height+F/2:c==="near"||f!==0?G=F/2:c==="center"?G=z.highest.height/2-q*F:G=z.highest.height-P*F,d&&(G*=-1),f!==0&&!W.showLabelBackdrop&&(k+=F/2*Math.sin(f))):($=S,G=(1-P)*F/2);let ue;if(W.showLabelBackdrop){const _e=si(W.backdropPadding),me=z.heights[v],Te=z.widths[v];let B=G-_e.top,H=0-_e.left;switch(ee){case"middle":B-=me/2;break;case"bottom":B-=me;break}switch(A){case"center":H-=Te/2;break;case"right":H-=Te;break;case"inner":v===y-1?H-=Te:v>0&&(H-=Te/2);break}ue={left:H,top:B,width:Te+_e.width,height:me+_e.height,color:W.backdropColor}}b.push({label:_,font:R,textOffset:G,options:{rotation:f,color:ne,strokeColor:te,strokeWidth:le,textAlign:he,textBaseline:ee,translation:[k,$],backdrop:ue}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Di(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:r}}=this.options,a=this._getLabelSizes(),s=t+r,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+r,o==="near"?c="left":o==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,o==="near"?c="right":o==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+r,o==="near"?c="right":o==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,o==="near"?c="left":o==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_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:r,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(o,i,r,a),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 r,a;const s=(l,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(l.x,l.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(r=0,a=i.length;r<a;++r){const l=i[r];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,r=o.setContext(this.getContext()),a=o.display?r.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,h;this.isHorizontal()?(c=Si(t,this.left,a)-a/2,u=Si(t,this.right,s)+s/2,d=h=l):(d=Si(t,this.top,a)-a/2,h=Si(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,o=this._computeLabelArea();o&&f_(n,o);const i=this.getLabelItems(t);for(const r of i){const a=r.options,s=r.font,l=r.label,c=r.textOffset;yb(n,l,0,c,s,a)}o&&g_(n)}drawTitle(){const{ctx:t,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const r=Qn(o.font),a=si(o.padding),s=o.align;let l=r.lineHeight/2;n==="bottom"||n==="center"||Ae(n)?(l+=a.bottom,pt(o.text)&&(l+=r.lineHeight*(o.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=A5(this,l,n,s);yb(t,o.text,0,0,r,{color:o.color,maxWidth:d,rotation:h,textAlign:P5(s,n,i),textBaseline:"middle",translation:[c,u]})}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=Ge(t.grid&&t.grid.z,-1),i=Ge(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ca.prototype.draw?[{z:n,draw:r=>{this.draw(r)}}]:[{z:o,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let r,a;for(r=0,a=n.length;r<a;++r){const s=n[r];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 Qn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Yl{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;V5(n)&&(o=this.register(n));const i=this.items,r=t.id,a=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in i||(i[r]=t,R5(t,a,o),this.override&&nt.override(t.id,t.overrides)),a}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 nt[i]&&(delete nt[i][o],this.override&&delete Ki[o])}}function R5(e,t,n){const o=Ds(Object.create(null),[n?nt.get(n):{},nt.get(t),e.defaults]);nt.set(t,o),e.defaultRoutes&&D5(t,e.defaultRoutes),e.descriptors&&nt.describe(t,e.descriptors)}function D5(e,t){Object.keys(t).forEach(n=>{const o=n.split("."),i=o.pop(),r=[e].concat(o).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");nt.route(r,i,l,s)})}function V5(e){return"id"in e&&"defaults"in e}class M5{constructor(){this.controllers=new Yl(ys,"datasets",!0),this.elements=new Yl(Kr,"elements"),this.plugins=new Yl(Object,"plugins"),this.scales=new Yl(ca,"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 r=o||this._getRegistryForType(i);o||r.isForType(i)||r===this.plugins&&i.id?this._exec(t,r,i):De(i,a=>{const s=o||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,o){const i=Wf(t);Qe(o["before"+i],[],o),n[t](o),Qe(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 Kn=new M5;class N5{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 r=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(r,t,n,o);return n==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,n,o,i){i=i||{};for(const r of t){const a=r.plugin,s=a[o],l=[n,i,r.options];if(Qe(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Fe(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=Ge(o.options&&o.options.plugins,{}),r=L5(o);return i===!1&&!n?[]:B5(t,r,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],o=this._cache,i=(r,a)=>r.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,o),t,"stop"),this._notify(i(o,n),t,"start")}}function L5(e){const t={},n=[],o=Object.keys(Kn.plugins.items);for(let r=0;r<o.length;r++)n.push(Kn.getPlugin(o[r]));const i=e.plugins||[];for(let r=0;r<i.length;r++){const a=i[r];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function F5(e,t){return!t&&e===!1?null:e===!0?{}:e}function B5(e,{plugins:t,localIds:n},o,i){const r=[],a=e.getContext();for(const s of t){const l=s.id,c=F5(o[l],i);c!==null&&r.push({plugin:s,options:z5(e.config,{plugin:s,local:n[l]},c,a)})}return r}function z5(e,{plugin:t,local:n},o,i){const r=e.pluginScopeKeys(t),a=e.getOptionScopes(o,r);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function up(e,t){const n=nt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function H5(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function j5(e,t){return e===t?"_index_":"_value_"}function jb(e){if(e==="x"||e==="y"||e==="r")return e}function W5(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function dp(e,...t){if(jb(e))return e;for(const n of t){const o=n.axis||W5(n.position)||e.length>1&&jb(e[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Wb(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function U5(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 Wb(e,"x",n[0])||Wb(e,"y",n[0])}return{}}function G5(e,t){const n=Ki[e.type]||{scales:{}},o=t.scales||{},i=up(e.type,t),r=Object.create(null);return Object.keys(o).forEach(a=>{const s=o[a];if(!Ae(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=dp(a,s,U5(a,e),nt.scales[s.type]),c=j5(l,i),u=n.scales||{};r[a]=gs(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||up(s,t),c=(Ki[s]||{}).scales||{};Object.keys(c).forEach(u=>{const d=H5(u,l),h=a[d+"AxisID"]||d;r[h]=r[h]||Object.create(null),gs(r[h],[{axis:d},o[h],c[u]])})}),Object.keys(r).forEach(a=>{const s=r[a];gs(s,[nt.scales[s.type],nt.scale])}),r}function P_(e){const t=e.options||(e.options={});t.plugins=Ge(t.plugins,{}),t.scales=G5(e,t)}function A_(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function q5(e){return e=e||{},e.data=A_(e.data),P_(e),e}const Ub=new Map,R_=new Set;function Kl(e,t){let n=Ub.get(e);return n||(n=t(),Ub.set(e,n),R_.add(n)),n}const Ba=(e,t,n)=>{const o=qr(t,n);o!==void 0&&e.add(o)};class Y5{constructor(t){this._config=q5(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=A_(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(),P_(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Kl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Kl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Kl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,o=this.type;return Kl(`${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:r}=this,a=this._cachedScopes(t,o),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Ba(l,t,d))),u.forEach(d=>Ba(l,i,d)),u.forEach(d=>Ba(l,Ki[r]||{},d)),u.forEach(d=>Ba(l,nt,d)),u.forEach(d=>Ba(l,lp,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),R_.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ki[n]||{},nt.datasets[n]||{},{type:n},nt,lp]}resolveNamedOptions(t,n,o,i=[""]){const r={$shared:!0},{resolver:a,subPrefixes:s}=Gb(this._resolverCache,t,i);let l=a;if(X5(a,n)){r.$shared=!1,o=ai(o)?o():o;const c=this.createResolver(t,o,s);l=Yr(a,o,c)}for(const c of n)r[c]=l[c];return r}createResolver(t,n,o=[""],i){const{resolver:r}=Gb(this._resolverCache,t,o);return Ae(n)?Yr(r,n,void 0,i):r}}function Gb(e,t,n){let o=e.get(t);o||(o=new Map,e.set(t,o));const i=n.join();let r=o.get(i);return r||(r={resolver:Gf(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(i,r)),r}const K5=e=>Ae(e)&&Object.getOwnPropertyNames(e).some(t=>ai(e[t]));function X5(e,t){const{isScriptable:n,isIndexable:o}=b_(e);for(const i of t){const r=n(i),a=o(i),s=(a||r)&&e[i];if(r&&(ai(s)||K5(s))||a&&pt(s))return!0}return!1}var Z5="4.5.1";const J5=["top","bottom","left","right","chartArea"];function qb(e,t){return e==="top"||e==="bottom"||J5.indexOf(e)===-1&&t==="x"}function Yb(e,t){return function(n,o){return n[e]===o[e]?n[t]-o[t]:n[e]-o[e]}}function Kb(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[e],t)}function Q5(e){const t=e.chart,n=t.options.animation;Qe(n&&n.onProgress,[e],t)}function D_(e){return Kf()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const fu={},V_=e=>{const t=D_(e);return Object.values(fu).filter(n=>n.canvas===t).pop()};function e4(e,t,n){const o=Object.keys(e);for(const i of o){const r=+i;if(r>=t){const a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function t4(e,t,n,o){return!n||e.type==="mouseout"?null:o?t:e}class qo{static register(...t){Kn.add(...t),Xb()}static unregister(...t){Kn.remove(...t),Xb()}constructor(t,n){const o=this.config=new Y5(n),i=D_(t),r=V_(i);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||y5(i)),this.platform.updateConfig(o);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=pB(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,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 N5,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=RB(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],fu[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}go.listen(this,"complete",Kb),go.listen(this,"progress",Q5),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:o,height:i,_aspectRatio:r}=this;return Fe(t)?n&&r?r: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 Kn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():_b(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return vb(this.canvas,this.ctx),this}stop(){return go.stop(this),this}resize(t,n){go.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const o=this.options,i=this.canvas,r=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,r),s=o.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,_b(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),Qe(o.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};De(t,(n,o)=>{n.id=o})}buildOrUpdateScales(){const t=this.options,n=t.scales,o=this.scales,i=Object.keys(o).reduce((a,s)=>(a[s]=!1,a),{});let r=[];n&&(r=r.concat(Object.keys(n).map(a=>{const s=n[a],l=dp(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),De(r,a=>{const s=a.options,l=s.id,c=dp(l,s),u=Ge(s.type,a.dtype);(s.position===void 0||qb(s.position,c)!==qb(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in o&&o[l].type===u)d=o[l];else{const h=Kn.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),o[d.id]=d}d.init(s,t)}),De(i,(a,s)=>{a||delete o[s]}),De(o,a=>{Gl.configure(this,a,a.options),Gl.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,o=t.length;if(t.sort((i,r)=>i.index-r.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);t.splice(n,o-n)}this._sortedMetasets=t.slice(0).sort(Yb("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((o,i)=>{n.filter(r=>r===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 r=n[o];let a=this.getDatasetMeta(o);const s=r.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=s,a.indexAxis=r.indexAxis||up(s,this.options),a.order=r.order||0,a.index=o,a.label=""+r.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const l=Kn.getController(s),{datasetElementType:c,dataElementType:u}=nt.datasets[s];Object.assign(l,{dataElementType:Kn.getElement(u),datasetElementType:c&&Kn.getElement(c)}),a.controller=new l(this,o),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){De(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 r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!i&&r.indexOf(d)===-1;d.buildOrUpdateElements(h),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),i||De(r,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Yb("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){De(this.scales,t=>{Gl.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(t.events);(!rb(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:r}of n){const a=o==="_removeElements"?-r:r;e4(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=r=>new Set(t.filter(a=>a[0]===r).map((a,s)=>s+","+a.splice(1).join(","))),i=o(0);for(let r=1;r<n;r++)if(!rb(i,o(r)))return;return Array.from(i).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Gl.update(this,this.width,this.height,t);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],De(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,r)=>{i._idx=r}),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,ai(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&&(go.has(this)?this.attached&&!go.running(this)&&go.start(this):(this.draw(),Kb({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,r;for(i=0,r=n.length;i<r;++i){const a=n[i];(!t||a.visible)&&o.push(a)}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=w6(this,t);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&f_(n,i),t.controller.draw(),i&&g_(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return p_(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,o,i){const r=J6.modes[n];return typeof r=="function"?r(this,t,o,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],o=this._metasets;let i=o.filter(r=>r&&r._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=la(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",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,i);Vs(n)?(r.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(t,o),a.update(r,{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(),go.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(),vb(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete fu[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=(r,a)=>{n.addEventListener(this,r,a),t[r]=a},i=(r,a,s)=>{r.offsetX=a,r.offsetY=s,this._eventHandler(r)};De(this.options.events,r=>o(r,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])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),o("resize",r),o("detach",a)};a=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),o("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){De(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},De(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,o){const i=o?"set":"remove";let r,a,s,l;for(n==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],o=t.map(({datasetIndex:i,index:r})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[r],index:r}});!lu(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,r=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=r(n,t),s=o?t:r(t,n);a.length&&this.updateHoverStyle(a,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=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const r=this._handleEvent(t,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(r||o.changed)&&this.render(),this}_handleEvent(t,n,o){const{_active:i=[],options:r}=this,a=n,s=this._getActiveElements(t,i,o,a),l=yB(t),c=t4(t,this._lastEvent,o,l);o&&(this._lastEvent=null,Qe(r.onHover,[t,s,this],this),l&&Qe(r.onClick,[t,s,this],this));const u=!lu(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,o,i){if(t.type==="mouseout")return[];if(!o)return n;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}Pe(qo,"defaults",nt),Pe(qo,"instances",fu),Pe(qo,"overrides",Ki),Pe(qo,"registry",Kn),Pe(qo,"version",Z5),Pe(qo,"getChart",V_);function Xb(){return De(qo.instances,e=>e._plugins.invalidate())}function M_(e,t){const{x:n,y:o,base:i,width:r,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,i),l=Math.max(n,i),c=o-d,u=o+d):(d=r/2,s=n-d,l=n+d,c=Math.min(o,i),u=Math.max(o,i)),{left:s,top:c,right:l,bottom:u}}function Qo(e,t,n,o){return e?0:Mn(t,n,o)}function n4(e,t,n){const o=e.options.borderWidth,i=e.borderSkipped,r=v_(o);return{t:Qo(i.top,r.top,0,n),r:Qo(i.right,r.right,0,t),b:Qo(i.bottom,r.bottom,0,n),l:Qo(i.left,r.left,0,t)}}function o4(e,t,n){const{enableBorderRadius:o}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,r=bs(i),a=Math.min(t,n),s=e.borderSkipped,l=o||Ae(i);return{topLeft:Qo(!l||s.top||s.left,r.topLeft,0,a),topRight:Qo(!l||s.top||s.right,r.topRight,0,a),bottomLeft:Qo(!l||s.bottom||s.left,r.bottomLeft,0,a),bottomRight:Qo(!l||s.bottom||s.right,r.bottomRight,0,a)}}function i4(e){const t=M_(e),n=t.right-t.left,o=t.bottom-t.top,i=n4(e,n/2,o/2),r=o4(e,n/2,o/2);return{outer:{x:t.left,y:t.top,w:n,h:o,radius:r},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,r.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,r.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(i.b,i.r))}}}}function rh(e,t,n,o){const i=t===null,r=n===null,a=e&&!(i&&r)&&M_(e,o);return a&&(i||cb(t,a.left,a.right))&&(r||cb(n,a.top,a.bottom))}function r4(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function a4(e,t){e.rect(t.x,t.y,t.w,t.h)}function ah(e,t,n={}){const o=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,r=(e.x+e.w!==n.x+n.w?t:0)-o,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+o,y:e.y+i,w:e.w+r,h:e.h+a,radius:e.radius}}class Ic extends Kr{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:r,outer:a}=i4(this),s=r4(a.radius)?cp:a4;t.save(),(a.w!==r.w||a.h!==r.h)&&(t.beginPath(),s(t,ah(a,n,r)),t.clip(),s(t,ah(r,-n,a)),t.fillStyle=o,t.fill("evenodd")),t.beginPath(),s(t,ah(r,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,o){return rh(this,t,n,o)}inXRange(t,n){return rh(this,t,null,n)}inYRange(t,n){return rh(this,null,t,n)}getCenterPoint(t){const{x:n,y:o,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(n+i)/2:n,y:r?o:(o+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Pe(Ic,"id","bar"),Pe(Ic,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Pe(Ic,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const xs={average(e){if(!e.length)return!1;let t,n,o=new Set,i=0,r=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const s=a.tooltipPosition();o.add(s.x),i+=s.y,++r}}return r===0||o.size===0?!1:{x:[...o].reduce((a,s)=>a+s)/o.size,y:i/r}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,i=Number.POSITIVE_INFINITY,r,a,s;for(r=0,a=e.length;r<a;++r){const l=e[r].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=EB(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,o=l.y}return{x:n,y:o}}};function Gn(e,t){return t&&(pt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function mo(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
9
|
-
`)>-1?e.split(`
|
|
10
|
-
`):e}function s4(e,t){const{element:n,datasetIndex:o,index:i}=t,r=e.getDatasetMeta(o).controller,{label:a,value:s}=r.getLabelAndValue(i);return{chart:e,label:a,parsed:r.getParsed(i),raw:e.data.datasets[o].data[i],formattedValue:s,dataset:r.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Zb(e,t){const n=e.chart.ctx,{body:o,footer:i,title:r}=e,{boxWidth:a,boxHeight:s}=t,l=Qn(t.bodyFont),c=Qn(t.titleFont),u=Qn(t.footerFont),d=r.length,h=i.length,p=o.length,m=si(t.padding);let f=m.height,b=0,v=o.reduce((_,k)=>_+k.before.length+k.lines.length+k.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(f+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const _=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;f+=p*_+(v-p)*l.lineHeight+(v-1)*t.bodySpacing}h&&(f+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const x=function(_){b=Math.max(b,n.measureText(_).width+y)};return n.save(),n.font=c.string,De(e.title,x),n.font=l.string,De(e.beforeBody.concat(e.afterBody),x),y=t.displayColors?a+2+t.boxPadding:0,De(o,_=>{De(_.before,x),De(_.lines,x),De(_.after,x)}),y=0,n.font=u.string,De(e.footer,x),n.restore(),b+=m.width,{width:b,height:f}}function l4(e,t){const{y:n,height:o}=t;return n<o/2?"top":n>e.height-o/2?"bottom":"center"}function c4(e,t,n,o){const{x:i,width:r}=o,a=n.caretSize+n.caretPadding;if(e==="left"&&i+r+a>t.width||e==="right"&&i-r-a<0)return!0}function u4(e,t,n,o){const{x:i,width:r}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return o==="center"?c=i<=(s+l)/2?"left":"right":i<=r/2?c="left":i>=a-r/2&&(c="right"),c4(c,e,t,n)&&(c="center"),c}function Jb(e,t,n){const o=n.yAlign||t.yAlign||l4(e,n);return{xAlign:n.xAlign||t.xAlign||u4(e,t,n,o),yAlign:o}}function d4(e,t){let{x:n,width:o}=e;return t==="right"?n-=o:t==="center"&&(n-=o/2),n}function h4(e,t,n){let{y:o,height:i}=e;return t==="top"?o+=n:t==="bottom"?o-=i+n:o-=i/2,o}function Qb(e,t,n,o){const{caretSize:i,caretPadding:r,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=bs(a);let m=d4(t,s);const f=h4(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,h)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:Mn(m,0,o.width-t.width),y:Mn(f,0,o.height-t.height)}}function Xl(e,t,n){const o=si(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-o.right:e.x+o.left}function ey(e){return Gn([],mo(e))}function p4(e,t,n){return la(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function ty(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const N_={beforeTitle:po,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:po,beforeBody:po,beforeLabel:po,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 Fe(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:po,afterBody:po,beforeFooter:po,footer:po,afterFooter:po};function Nt(e,t,n,o){const i=e[t].call(n,o);return typeof i>"u"?N_[t].call(n,o):i}class hp extends Kr{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,r=new __(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=p4(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:o}=n,i=Nt(o,"beforeTitle",this,t),r=Nt(o,"title",this,t),a=Nt(o,"afterTitle",this,t);let s=[];return s=Gn(s,mo(i)),s=Gn(s,mo(r)),s=Gn(s,mo(a)),s}getBeforeBody(t,n){return ey(Nt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:o}=n,i=[];return De(t,r=>{const a={before:[],lines:[],after:[]},s=ty(o,r);Gn(a.before,mo(Nt(s,"beforeLabel",this,r))),Gn(a.lines,Nt(s,"label",this,r)),Gn(a.after,mo(Nt(s,"afterLabel",this,r))),i.push(a)}),i}getAfterBody(t,n){return ey(Nt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:o}=n,i=Nt(o,"beforeFooter",this,t),r=Nt(o,"footer",this,t),a=Nt(o,"afterFooter",this,t);let s=[];return s=Gn(s,mo(i)),s=Gn(s,mo(r)),s=Gn(s,mo(a)),s}_createItems(t){const n=this._active,o=this.chart.data,i=[],r=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(s4(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,h)=>t.filter(u,d,h,o))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,o))),De(s,u=>{const d=ty(t.callbacks,u);i.push(Nt(d,"labelColor",this,u)),r.push(Nt(d,"labelPointStyle",this,u)),a.push(Nt(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const o=this.options.setContext(this.getContext()),i=this._active;let r,a=[];if(!i.length)this.opacity!==0&&(r={opacity:0});else{const s=xs[o.position].call(this,i,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const l=this._size=Zb(this,o),c=Object.assign({},s,l),u=Jb(this.chart,o,c),d=Qb(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,o,i){const r=this.getCaretPosition(t,o,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(t,n,o){const{xAlign:i,yAlign:r}=this,{caretSize:a,cornerRadius:s}=o,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=bs(s),{x:h,y:p}=t,{width:m,height:f}=n;let b,v,y,x,_,k;return r==="center"?(_=p+f/2,i==="left"?(b=h,v=b-a,x=_+a,k=_-a):(b=h+m,v=b+a,x=_-a,k=_+a),y=b):(i==="left"?v=h+Math.max(l,u)+a:i==="right"?v=h+m-Math.max(c,d)-a:v=this.caretX,r==="top"?(x=p,_=x-a,b=v-a,y=v+a):(x=p+f,_=x+a,b=v+a,y=v-a),k=x),{x1:b,x2:v,x3:y,y1:x,y2:_,y3:k}}drawTitle(t,n,o){const i=this.title,r=i.length;let a,s,l;if(r){const c=Zd(o.rtl,this.x,this.width);for(t.x=Xl(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",a=Qn(o.titleFont),s=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,l=0;l<r;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===r&&(t.y+=o.titleMarginBottom-s)}}_drawColorBox(t,n,o,i,r){const a=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:c}=r,u=Qn(r.bodyFont),d=Xl(this,"left",r),h=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(r.usePointStyle){const f={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation},b=i.leftForLtr(h,c)+c/2,v=m+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,bb(t,f,b,v),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,bb(t,f,b,v)}else{t.lineWidth=Ae(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const f=i.leftForLtr(h,c),b=i.leftForLtr(i.xPlus(h,1),c-2),v=bs(a.borderRadius);Object.values(v).some(y=>y!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,cp(t,{x:f,y:m,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),cp(t,{x:b,y:m+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(f,m,c,l),t.strokeRect(f,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(b,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[o]}drawBody(t,n,o){const{body:i}=this,{bodySpacing:r,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=o,d=Qn(o.bodyFont);let h=d.lineHeight,p=0;const m=Zd(o.rtl,this.x,this.width),f=function(S){n.fillText(S,m.x(t.x+p),t.y+h/2),t.y+=h+r},b=m.textAlign(a);let v,y,x,_,k,$,A;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=Xl(this,b,o),n.fillStyle=o.bodyColor,De(this.beforeBody,f),p=s&&b!=="right"?a==="center"?c/2+u:c+2+u:0,_=0,$=i.length;_<$;++_){for(v=i[_],y=this.labelTextColors[_],n.fillStyle=y,De(v.before,f),x=v.lines,s&&x.length&&(this._drawColorBox(n,t,_,m,o),h=Math.max(d.lineHeight,l)),k=0,A=x.length;k<A;++k)f(x[k]),h=d.lineHeight;De(v.after,f)}p=0,h=d.lineHeight,De(this.afterBody,f),t.y-=r}drawFooter(t,n,o){const i=this.footer,r=i.length;let a,s;if(r){const l=Zd(o.rtl,this.x,this.width);for(t.x=Xl(this,o.footerAlign,o),t.y+=o.footerMarginTop,n.textAlign=l.textAlign(o.footerAlign),n.textBaseline="middle",a=Qn(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,s=0;s<r;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o.footerSpacing}}drawBackground(t,n,o,i){const{xAlign:r,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=o,{topLeft:d,topRight:h,bottomLeft:p,bottomRight:m}=bs(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,o,i),n.lineTo(s+c-h,l),n.quadraticCurveTo(s+c,l,s+c,l+h),a==="center"&&r==="right"&&this.drawCaret(t,n,o,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,o,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&r==="left"&&this.drawCaret(t,n,o,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,o=this.$animations,i=o&&o.x,r=o&&o.y;if(i||r){const a=xs[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=Zb(this,t),l=Object.assign({},a,this._size),c=Jb(n,t,l),u=Qb(t,l,c,n);(i._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_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},r={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=si(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(r,t,i,n),b6(t,n.textDirection),r.y+=a.top,this.drawTitle(r,t,n),this.drawBody(r,t,n),this.drawFooter(r,t,n),y6(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}}),r=!lu(o,i),a=this._positionChanged(i,n);(r||a)&&(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,r=this._active||[],a=this._getActiveElements(t,r,n,o),s=this._positionChanged(a,t),l=n||!lu(a,r)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,o,i){const r=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 a=this.chart.getElementsAtEventForMode(t,r.mode,r,o);return r.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:o,caretY:i,options:r}=this,a=xs[r.position].call(this,t,n);return a!==!1&&(o!==a.x||i!==a.y)}}Pe(hp,"positioners",xs);var f4={id:"tooltip",_element:hp,positioners:xs,afterInit(e,t,n){n&&(e.tooltip=new hp({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:N_},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 g4=(e,t,n,o)=>(typeof t=="string"?(n=e.push(t)-1,o.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function m4(e,t,n,o){const i=e.indexOf(t);if(i===-1)return g4(e,t,n,o);const r=e.lastIndexOf(t);return i!==r?n:i}const v4=(e,t)=>e===null?null:Mn(Math.round(e),0,t);function L_(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class pp extends ca{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:r}of n)o[i]===r&&o.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Fe(t))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===t?n:m4(o,t,Ge(n,t),this._addedLabels),v4(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 r=this.getLabels();r=t===0&&n===r.length-1?r:r.slice(t,n+1),this._valueRange=Math.max(r.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return L_.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}}Pe(pp,"id","category"),Pe(pp,"defaults",{ticks:{callback:L_}});function b4(e,t){const n=[],{bounds:o,step:i,min:r,max:a,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=e,h=i||1,p=c-1,{min:m,max:f}=t,b=!Fe(r),v=!Fe(a),y=!Fe(l),x=(f-m)/(u+1);let _=sb((f-m)/p/h)*h,k,$,A,S;if(_<1e-14&&!b&&!v)return[{value:m},{value:f}];S=Math.ceil(f/_)-Math.floor(m/_),S>p&&(_=sb(S*_/p/h)*h),Fe(s)||(k=Math.pow(10,s),_=Math.ceil(_*k)/k),o==="ticks"?($=Math.floor(m/_)*_,A=Math.ceil(f/_)*_):($=m,A=f),b&&v&&i&&CB((a-r)/i,_/1e3)?(S=Math.round(Math.min((a-r)/_,c)),_=(a-r)/S,$=r,A=a):y?($=b?r:$,A=v?a:A,S=l-1,_=(A-$)/S):(S=(A-$)/_,Ec(S,Math.round(S),_/1e3)?S=Math.round(S):S=Math.ceil(S));const R=Math.max(lb(_),lb($));k=Math.pow(10,Fe(s)?R:s),$=Math.round($*k)/k,A=Math.round(A*k)/k;let F=0;for(b&&(d&&$!==r?(n.push({value:r}),$<r&&F++,Ec(Math.round(($+F*_)*k)/k,r,ny(r,x,e))&&F++):$<r&&F++);F<S;++F){const P=Math.round(($+F*_)*k)/k;if(v&&P>a)break;n.push({value:P})}return v&&d&&A!==a?n.length&&Ec(n[n.length-1].value,a,ny(a,x,e))?n[n.length-1].value=a:n.push({value:a}):(!v||A===a)&&n.push({value:A}),n}function ny(e,t,{horizontal:n,minRotation:o}){const i=Di(o),r=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/r,a)}class y4 extends ca{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 Fe(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:r}=this;const a=l=>i=n?i:l,s=l=>r=o?r:l;if(t){const l=ni(i),c=ni(r);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===r){let l=r===0?1:Math.abs(r*.05);s(r+l),t||a(i-l)}this.min=i,this.max=r}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},r=this._range||this,a=b4(i,r);return t.bounds==="ticks"&&kB(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}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 d_(t,this.chart.options.locale,this.options.ticks.format)}}class fp extends y4{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=xn(t)?t:0,this.max=xn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,o=Di(this.options.ticks.minRotation),i=(t?Math.sin(o):Math.cos(o))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.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}}Pe(fp,"id","linear"),Pe(fp,"defaults",{ticks:{callback:h_.formatters.numeric}});const od={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}},jt=Object.keys(od);function oy(e,t){return e-t}function iy(e,t){if(Fe(t))return null;const n=e._adapter,{parser:o,round:i,isoWeekday:r}=e._parseOpts;let a=t;return typeof o=="function"&&(a=o(a)),xn(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(du(r)||r===!0)?n.startOf(a,"isoWeek",r):n.startOf(a,i)),+a)}function ry(e,t,n,o){const i=jt.length;for(let r=jt.indexOf(e);r<i-1;++r){const a=od[jt[r]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=o)return jt[r]}return jt[i-1]}function x4(e,t,n,o,i){for(let r=jt.length-1;r>=jt.indexOf(n);r--){const a=jt[r];if(od[a].common&&e._adapter.diff(i,o,a)>=t-1)return a}return jt[n?jt.indexOf(n):0]}function w4(e){for(let t=jt.indexOf(e)+1,n=jt.length;t<n;++t)if(od[jt[t]].common)return jt[t]}function ay(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:o,hi:i}=Uf(n,t),r=n[o]>=t?n[o]:n[i];e[r]=!0}}function _4(e,t,n,o){const i=e._adapter,r=+i.startOf(t[0].value,o),a=t[t.length-1].value;let s,l;for(s=r;s<=a;s=+i.add(s,1,o))l=n[s],l>=0&&(t[l].major=!0);return t}function sy(e,t,n){const o=[],i={},r=t.length;let a,s;for(a=0;a<r;++a)s=t[a],i[s]=a,o.push({value:s,major:!1});return r===0||!n?o:_4(e,o,i,n)}class Ns extends ca{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 S_._date(t.adapters.date);i.init(n),gs(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:iy(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:r,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=xn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),r=xn(r)&&!isNaN(r)?r:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_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 r=this.min,a=this.max,s=PB(i,r,a);return this._unit=n.unit||(o.autoSkip?ry(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):x4(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:w4(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),sy(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,o=0,i,r;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?o=r:o=(r-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Mn(n,0,a),o=Mn(o,0,a),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,r=i.time,a=r.unit||ry(r.minUnit,n,o,this._getLabelCapacity(n)),s=Ge(i.ticks.stepSize,1),l=a==="week"?r.isoWeekday:!1,c=du(l)||l===!0,u={};let d=n,h,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(o,n,a)>1e5*s)throw new Error(n+" and "+o+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=d,p=0;h<o;h=+t.add(h,s,a),p++)ay(u,h,m);return(h===o||i.bounds==="ticks"||p===1)&&ay(u,h,m),Object.keys(u).sort(oy).map(f=>+f)}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,r=n||o[i];return this._adapter.format(t,r)}_tickFormatFunction(t,n,o,i){const r=this.options,a=r.ticks.callback;if(a)return Qe(a,[t,n,o],this);const s=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],h=o[n],p=c&&d&&h&&h.major;return this._adapter.format(t,i||(p?d:u))}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=Di(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:o*r+s*a,h:o*a+s*r}}_getLabelCapacity(t){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,r=this._tickFormatFunction(t,0,sy(this,[t],this._majorUnit),i),a=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.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(iy(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return s_(t.sort(oy))}}Pe(Ns,"id","time"),Pe(Ns,"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 Zl(e,t,n){let o=0,i=e.length-1,r,a,s,l;n?(t>=e[o].pos&&t<=e[i].pos&&({lo:o,hi:i}=sp(e,"pos",t)),{pos:r,time:s}=e[o],{pos:a,time:l}=e[i]):(t>=e[o].time&&t<=e[i].time&&({lo:o,hi:i}=sp(e,"time",t)),{time:r,pos:s}=e[o],{time:a,pos:l}=e[i]);const c=a-r;return c?s+(l-s)*(t-r)/c:s}class ly extends Ns{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=Zl(n,this.min),this._tableRange=Zl(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:o}=this,i=[],r=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&r.push({time:c,pos:a/(s-1)});return r}_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,r)=>i-r)}_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(Zl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return Zl(this._table,o*this._tableRange+this._minPos,!0)}}Pe(ly,"id","timeseries"),Pe(ly,"defaults",Ns.defaults);function ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pc={exports:{}},C4=Pc.exports,cy;function k4(){return cy||(cy=1,function(e,t){(function(n,o){e.exports=o()})(C4,function(){var n=1e3,o=6e4,i=36e5,r="millisecond",a="second",s="minute",l="hour",c="day",u="week",d="month",h="quarter",p="year",m="date",f="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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(z){var W=["th","st","nd","rd"],q=z%100;return"["+z+(W[(q-20)%10]||W[q]||W[0])+"]"}},x=function(z,W,q){var ne=String(z);return!ne||ne.length>=W?z:""+Array(W+1-ne.length).join(q)+z},_={s:x,z:function(z){var W=-z.utcOffset(),q=Math.abs(W),ne=Math.floor(q/60),te=q%60;return(W<=0?"+":"-")+x(ne,2,"0")+":"+x(te,2,"0")},m:function z(W,q){if(W.date()<q.date())return-z(q,W);var ne=12*(q.year()-W.year())+(q.month()-W.month()),te=W.clone().add(ne,d),le=q-te<0,he=W.clone().add(ne+(le?-1:1),d);return+(-(ne+(q-te)/(le?te-he:he-te))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:d,y:p,w:u,d:c,D:m,h:l,m:s,s:a,ms:r,Q:h}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},k="en",$={};$[k]=y;var A="$isDayjsObject",S=function(z){return z instanceof G||!(!z||!z[A])},R=function z(W,q,ne){var te;if(!W)return k;if(typeof W=="string"){var le=W.toLowerCase();$[le]&&(te=le),q&&($[le]=q,te=le);var he=W.split("-");if(!te&&he.length>1)return z(he[0])}else{var ue=W.name;$[ue]=W,te=ue}return!ne&&te&&(k=te),te||!ne&&k},F=function(z,W){if(S(z))return z.clone();var q=typeof W=="object"?W:{};return q.date=z,q.args=arguments,new G(q)},P=_;P.l=R,P.i=S,P.w=function(z,W){return F(z,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var G=function(){function z(q){this.$L=R(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[A]=!0}var W=z.prototype;return W.parse=function(q){this.$d=function(ne){var te=ne.date,le=ne.utc;if(te===null)return new Date(NaN);if(P.u(te))return new Date;if(te instanceof Date)return new Date(te);if(typeof te=="string"&&!/Z$/i.test(te)){var he=te.match(b);if(he){var ue=he[2]-1||0,_e=(he[7]||"0").substring(0,3);return le?new Date(Date.UTC(he[1],ue,he[3]||1,he[4]||0,he[5]||0,he[6]||0,_e)):new Date(he[1],ue,he[3]||1,he[4]||0,he[5]||0,he[6]||0,_e)}}return new Date(te)}(q),this.init()},W.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},W.$utils=function(){return P},W.isValid=function(){return this.$d.toString()!==f},W.isSame=function(q,ne){var te=F(q);return this.startOf(ne)<=te&&te<=this.endOf(ne)},W.isAfter=function(q,ne){return F(q)<this.startOf(ne)},W.isBefore=function(q,ne){return this.endOf(ne)<F(q)},W.$g=function(q,ne,te){return P.u(q)?this[ne]:this.set(te,q)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(q,ne){var te=this,le=!!P.u(ne)||ne,he=P.p(q),ue=function(ye,ke){var Oe=P.w(te.$u?Date.UTC(te.$y,ke,ye):new Date(te.$y,ke,ye),te);return le?Oe:Oe.endOf(c)},_e=function(ye,ke){return P.w(te.toDate()[ye].apply(te.toDate("s"),(le?[0,0,0,0]:[23,59,59,999]).slice(ke)),te)},me=this.$W,Te=this.$M,B=this.$D,H="set"+(this.$u?"UTC":"");switch(he){case p:return le?ue(1,0):ue(31,11);case d:return le?ue(1,Te):ue(0,Te+1);case u:var K=this.$locale().weekStart||0,re=(me<K?me+7:me)-K;return ue(le?B-re:B+(6-re),Te);case c:case m:return _e(H+"Hours",0);case l:return _e(H+"Minutes",1);case s:return _e(H+"Seconds",2);case a:return _e(H+"Milliseconds",3);default:return this.clone()}},W.endOf=function(q){return this.startOf(q,!1)},W.$set=function(q,ne){var te,le=P.p(q),he="set"+(this.$u?"UTC":""),ue=(te={},te[c]=he+"Date",te[m]=he+"Date",te[d]=he+"Month",te[p]=he+"FullYear",te[l]=he+"Hours",te[s]=he+"Minutes",te[a]=he+"Seconds",te[r]=he+"Milliseconds",te)[le],_e=le===c?this.$D+(ne-this.$W):ne;if(le===d||le===p){var me=this.clone().set(m,1);me.$d[ue](_e),me.init(),this.$d=me.set(m,Math.min(this.$D,me.daysInMonth())).$d}else ue&&this.$d[ue](_e);return this.init(),this},W.set=function(q,ne){return this.clone().$set(q,ne)},W.get=function(q){return this[P.p(q)]()},W.add=function(q,ne){var te,le=this;q=Number(q);var he=P.p(ne),ue=function(Te){var B=F(le);return P.w(B.date(B.date()+Math.round(Te*q)),le)};if(he===d)return this.set(d,this.$M+q);if(he===p)return this.set(p,this.$y+q);if(he===c)return ue(1);if(he===u)return ue(7);var _e=(te={},te[s]=o,te[l]=i,te[a]=n,te)[he]||1,me=this.$d.getTime()+q*_e;return P.w(me,this)},W.subtract=function(q,ne){return this.add(-1*q,ne)},W.format=function(q){var ne=this,te=this.$locale();if(!this.isValid())return te.invalidDate||f;var le=q||"YYYY-MM-DDTHH:mm:ssZ",he=P.z(this),ue=this.$H,_e=this.$m,me=this.$M,Te=te.weekdays,B=te.months,H=te.meridiem,K=function(ke,Oe,it,Z){return ke&&(ke[Oe]||ke(ne,le))||it[Oe].slice(0,Z)},re=function(ke){return P.s(ue%12||12,ke,"0")},ye=H||function(ke,Oe,it){var Z=ke<12?"AM":"PM";return it?Z.toLowerCase():Z};return le.replace(v,function(ke,Oe){return Oe||function(it){switch(it){case"YY":return String(ne.$y).slice(-2);case"YYYY":return P.s(ne.$y,4,"0");case"M":return me+1;case"MM":return P.s(me+1,2,"0");case"MMM":return K(te.monthsShort,me,B,3);case"MMMM":return K(B,me);case"D":return ne.$D;case"DD":return P.s(ne.$D,2,"0");case"d":return String(ne.$W);case"dd":return K(te.weekdaysMin,ne.$W,Te,2);case"ddd":return K(te.weekdaysShort,ne.$W,Te,3);case"dddd":return Te[ne.$W];case"H":return String(ue);case"HH":return P.s(ue,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return ye(ue,_e,!0);case"A":return ye(ue,_e,!1);case"m":return String(_e);case"mm":return P.s(_e,2,"0");case"s":return String(ne.$s);case"ss":return P.s(ne.$s,2,"0");case"SSS":return P.s(ne.$ms,3,"0");case"Z":return he}return null}(ke)||he.replace(":","")})},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(q,ne,te){var le,he=this,ue=P.p(ne),_e=F(q),me=(_e.utcOffset()-this.utcOffset())*o,Te=this-_e,B=function(){return P.m(he,_e)};switch(ue){case p:le=B()/12;break;case d:le=B();break;case h:le=B()/3;break;case u:le=(Te-me)/6048e5;break;case c:le=(Te-me)/864e5;break;case l:le=Te/i;break;case s:le=Te/o;break;case a:le=Te/n;break;default:le=Te}return te?le:P.a(le)},W.daysInMonth=function(){return this.endOf(d).$D},W.$locale=function(){return $[this.$L]},W.locale=function(q,ne){if(!q)return this.$L;var te=this.clone(),le=R(q,ne,!0);return le&&(te.$L=le),te},W.clone=function(){return P.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},z}(),ee=G.prototype;return F.prototype=ee,[["$ms",r],["$s",a],["$m",s],["$H",l],["$W",c],["$M",d],["$y",p],["$D",m]].forEach(function(z){ee[z[1]]=function(W){return this.$g(W,z[0],z[1])}}),F.extend=function(z,W){return z.$i||(z(W,G,F),z.$i=!0),F},F.locale=R,F.isDayjs=S,F.unix=function(z){return F(1e3*z)},F.en=$[k],F.Ls=$,F.p={},F})}(Pc)),Pc.exports}var S4=k4();const mt=ua(S4);var Ac={exports:{}},$4=Ac.exports,uy;function E4(){return uy||(uy=1,function(e,t){(function(n,o){e.exports=o()})($4,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/,r=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},u=function(b){return function(v){this[b]=+v}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var y=v.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x}(b)}],h=function(b){var v=l[b];return v&&(v.indexOf?v:v.s.concat(v.f))},p=function(b,v){var y,x=l.meridiem;if(x){for(var _=1;_<=24;_+=1)if(b.indexOf(x(_,0,v))>-1){y=_>12;break}}else y=b===(v?"pm":"PM");return y},m={A:[s,function(b){this.afternoon=p(b,!1)}],a:[s,function(b){this.afternoon=p(b,!0)}],Q:[i,function(b){this.month=3*(b-1)+1}],S:[i,function(b){this.milliseconds=100*+b}],SS:[r,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[a,u("seconds")],ss:[a,u("seconds")],m:[a,u("minutes")],mm:[a,u("minutes")],H:[a,u("hours")],h:[a,u("hours")],HH:[a,u("hours")],hh:[a,u("hours")],D:[a,u("day")],DD:[r,u("day")],Do:[s,function(b){var v=l.ordinal,y=b.match(/\d+/);if(this.day=y[0],v)for(var x=1;x<=31;x+=1)v(x).replace(/\[|\]/g,"")===b&&(this.day=x)}],w:[a,u("week")],ww:[r,u("week")],M:[a,u("month")],MM:[r,u("month")],MMM:[s,function(b){var v=h("months"),y=(h("monthsShort")||v.map(function(x){return x.slice(0,3)})).indexOf(b)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[s,function(b){var v=h("months").indexOf(b)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(b){this.year=c(b)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function f(b){var v,y;v=b,y=l&&l.formats;for(var x=(b=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,P,G){var ee=G&&G.toUpperCase();return P||y[G]||n[G]||y[ee].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(z,W,q){return W||q.slice(1)})})).match(o),_=x.length,k=0;k<_;k+=1){var $=x[k],A=m[$],S=A&&A[0],R=A&&A[1];x[k]=R?{regex:S,parser:R}:$.replace(/^\[|\]$/g,"")}return function(F){for(var P={},G=0,ee=0;G<_;G+=1){var z=x[G];if(typeof z=="string")ee+=z.length;else{var W=z.regex,q=z.parser,ne=F.slice(ee),te=W.exec(ne)[0];q.call(P,te),F=F.replace(te,"")}}return function(le){var he=le.afternoon;if(he!==void 0){var ue=le.hours;he?ue<12&&(le.hours+=12):ue===12&&(le.hours=0),delete le.afternoon}}(P),P}}return function(b,v,y){y.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var x=v.prototype,_=x.parse;x.parse=function(k){var $=k.date,A=k.utc,S=k.args;this.$u=A;var R=S[1];if(typeof R=="string"){var F=S[2]===!0,P=S[3]===!0,G=F||P,ee=S[2];P&&(ee=S[2]),l=this.$locale(),!F&&ee&&(l=y.Ls[ee]),this.$d=function(ne,te,le,he){try{if(["x","X"].indexOf(te)>-1)return new Date((te==="X"?1e3:1)*ne);var ue=f(te)(ne),_e=ue.year,me=ue.month,Te=ue.day,B=ue.hours,H=ue.minutes,K=ue.seconds,re=ue.milliseconds,ye=ue.zone,ke=ue.week,Oe=new Date,it=Te||(_e||me?1:Oe.getDate()),Z=_e||Oe.getFullYear(),ce=0;_e&&!me||(ce=me>0?me-1:Oe.getMonth());var ae,xe=B||0,Xe=H||0,wt=K||0,Et=re||0;return ye?new Date(Date.UTC(Z,ce,it,xe,Xe,wt,Et+60*ye.offset*1e3)):le?new Date(Date.UTC(Z,ce,it,xe,Xe,wt,Et)):(ae=new Date(Z,ce,it,xe,Xe,wt,Et),ke&&(ae=he(ae).week(ke).toDate()),ae)}catch{return new Date("")}}($,R,A,y),this.init(),ee&&ee!==!0&&(this.$L=this.locale(ee).$L),G&&$!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var z=R.length,W=1;W<=z;W+=1){S[1]=R[W-1];var q=y.apply(this,S);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}W===z&&(this.$d=new Date(""))}else _.call(this,k)}}})}(Ac)),Ac.exports}var T4=E4();const O4=ua(T4);var Rc={exports:{}},I4=Rc.exports,dy;function P4(){return dy||(dy=1,function(e,t){(function(n,o){e.exports=o()})(I4,function(){return function(n,o){var i=o.prototype,r=i.format;i.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return r.bind(this)(a);var c=this.$utils(),u=(a||"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(d){switch(d){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(),d==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),d==="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 d}});return r.bind(this)(u)}}})}(Rc)),Rc.exports}var A4=P4();const R4=ua(A4);var Dc={exports:{}},D4=Dc.exports,hy;function V4(){return hy||(hy=1,function(e,t){(function(n,o){e.exports=o()})(D4,function(){var n="month",o="quarter";return function(i,r){var a=r.prototype;a.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var s=a.add;a.add=function(c,u){return c=Number(c),this.$utils().p(u)===o?this.add(3*c,n):s.bind(this)(c,u)};var l=a.startOf;a.startOf=function(c,u){var d=this.$utils(),h=!!d.u(u)||u;if(d.p(c)===o){var p=this.quarter()-1;return h?this.month(3*p).startOf(n).startOf("day"):this.month(3*p+2).endOf(n).endOf("day")}return l.bind(this)(c,u)}}})}(Dc)),Dc.exports}var M4=V4();const N4=ua(M4);var Vc={exports:{}},L4=Vc.exports,py;function F4(){return py||(py=1,function(e,t){(function(n,o){e.exports=o()})(L4,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,r){var a=i.prototype,s=a.format;r.en.formats=n,a.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,u=function(d,h){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,m,f){var b=f&&f.toUpperCase();return m||h[f]||n[f]||h[b].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,y,x){return y||x.slice(1)})})}(l,c===void 0?{}:c);return s.call(this,u)}}})}(Vc)),Vc.exports}var B4=F4();const z4=ua(B4);var Mc={exports:{}},H4=Mc.exports,fy;function j4(){return fy||(fy=1,function(e,t){(function(n,o){e.exports=o()})(H4,function(){var n="day";return function(o,i,r){var a=function(c){return c.add(4-c.isoWeekday(),n)},s=i.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),n);var u,d,h,p,m=a(this),f=(u=this.isoWeekYear(),d=this.$u,h=(d?r.utc:r)().year(u).startOf("year"),p=4-h.isoWeekday(),h.isoWeekday()>4&&(p+=7),h.add(p,n));return m.diff(f,"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,u){var d=this.$utils(),h=!!d.u(u)||u;return d.p(c)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(c,u)}}})}(Mc)),Mc.exports}var W4=j4();const U4=ua(W4);mt.extend(R4);mt.extend(N4);mt.extend(z4);mt.extend(O4);mt.extend(U4);var G4={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"};S_._date.override({formats:function(){return G4},parse:function(e,t){var n=typeof e;return e===null||n==="undefined"?null:n==="string"&&typeof t=="string"?mt(e,t).isValid()?mt(e,t).valueOf():null:e instanceof mt?null:mt(e).isValid()?mt(e).valueOf():null},format:function(e,t){return mt(e).format(t)},add:function(e,t,n){return mt(e).add(t,n).valueOf()},diff:function(e,t,n){return mt(e).diff(mt(t),n)},startOf:function(e,t,n){if(t==="isoWeek"){var o=typeof n=="number"&&n>0&&n<7?n:1;return mt(e).isoWeekday(o).startOf("day").valueOf()}return mt(e).startOf(t).valueOf()},endOf:function(e,t){return mt(e).endOf(t).valueOf()}});const q4=ge({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"}}}]}),gy=O({__name:"TimelineTooltip",props:{data:{},placement:{default:"top"},targetPosition:{}},setup(e){const t=e,n=I(()=>q4({placement:t.placement})),o=I(()=>({backgroundColor:t.data.barColor||void 0})),i=I(()=>{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`}}),r=I(()=>t.data.startTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"})),a=I(()=>t.data.endTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"}));return(s,l)=>(w(),M("div",{class:L(n.value.container),"data-testid":"timeline-tooltip"},[N("div",{class:L(n.value.arrow)},null,2),N("div",{class:L(n.value.indicator),style:Ch(o.value)},null,6),N("div",{class:L(n.value.content)},[N("div",{class:L(n.value.title)},se(e.data.title),3),N("div",{class:L(n.value.row)},[N("span",{class:L(n.value.label)},se(e.data.isRunning?"Running for":"Run Duration"),3),N("span",{class:L(n.value.value)},se(i.value),3)],2),N("div",{class:L(n.value.row)},[N("span",{class:L(n.value.label)},"Start Time",2),N("span",{class:L(n.value.value)},se(r.value),3)],2),e.data.isRunning?oe("",!0):(w(),M("div",{key:0,class:L(n.value.row)},[N("span",{class:L(n.value.label)},"End Time",2),N("span",{class:L(n.value.value)},se(a.value),3)],2)),e.data.extraData?(w(!0),M(Se,{key:1},Ie(Object.entries(e.data.extraData),([c,u])=>(w(),M("div",{key:c,class:L(n.value.row)},[N("span",{class:L(n.value.label)},se(c),3),N("span",{class:L(n.value.value)},se(u),3)],2))),128)):oe("",!0)],2)],2))}});var Y4=Object.defineProperty,K4=(e,t,n)=>t in e?Y4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,za=(e,t,n)=>K4(e,typeof t!="symbol"?t+"":t,n);class X4{constructor(){za(this,"app",null),za(this,"container",null),za(this,"tooltipId","timeline-tooltip"),za(this,"VIEWPORT_PADDING",8),za(this,"ARROW_SIZE",8)}calculateOptimalPosition(t,n){const o={width:window.innerWidth,height:window.innerHeight,scrollX:window.pageXOffset,scrollY:window.pageYOffset},{left:i,top:r}=t,{height:a}=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:r-a-this.ARROW_SIZE},n,o),placement:"top"}}getPositionForPlacement(t,n,o){const{left:i,top:r}=n,{width:a,height:s}=o;switch(t){case"top":return{left:i-a/2,top:r-s-this.ARROW_SIZE};case"bottom":return{left:i-a/2,top:r+this.ARROW_SIZE};case"top-start":return{left:i-a*.25,top:r-s-this.ARROW_SIZE};case"top-end":return{left:i-a*.75,top:r-s-this.ARROW_SIZE};case"bottom-start":return{left:i-a*.25,top:r+this.ARROW_SIZE};case"bottom-end":return{left:i-a*.75,top:r+this.ARROW_SIZE};case"left":return{left:i-a-this.ARROW_SIZE,top:r-s/2};case"right":return{left:i+this.ARROW_SIZE,top:r-s/2};default:return{left:i-a/2,top:r-s-this.ARROW_SIZE}}}isPositionInViewport(t,n,o){const{left:i,top:r}=t,{width:a,height:s}=n;return i>=o.scrollX+this.VIEWPORT_PADDING&&r>=o.scrollY+this.VIEWPORT_PADDING&&i+a<=o.scrollX+o.width-this.VIEWPORT_PADDING&&r+s<=o.scrollY+o.height-this.VIEWPORT_PADDING}constrainToViewport(t,n,o){const{width:i,height:r}=n;let{left:a,top:s}=t;const l=o.scrollX+this.VIEWPORT_PADDING,c=o.scrollX+o.width-i-this.VIEWPORT_PADDING;a=Math.max(l,Math.min(a,c));const u=o.scrollY+this.VIEWPORT_PADDING,d=o.scrollY+o.height-r-this.VIEWPORT_PADDING;return s=Math.max(u,Math.min(s,d)),{left:a,top:s}}show(t,n){this.hide();const o=document.createElement("div");o.style.cssText=`
|
|
11
|
-
position: absolute;
|
|
12
|
-
left: -9999px;
|
|
13
|
-
top: -9999px;
|
|
14
|
-
visibility: hidden;
|
|
15
|
-
pointer-events: none;
|
|
16
|
-
`;const i=kh(gy,{data:t});i.mount(o),document.body.appendChild(o);const r={width:o.offsetWidth,height:o.offsetHeight};i.unmount(),document.body.removeChild(o);const a=this.calculateOptimalPosition(n,r);this.container=document.createElement("div"),this.container.id=this.tooltipId,this.container.style.cssText=`
|
|
17
|
-
position: absolute;
|
|
18
|
-
left: ${a.left}px;
|
|
19
|
-
top: ${a.top}px;
|
|
20
|
-
z-index: 1000;
|
|
21
|
-
pointer-events: none;
|
|
22
|
-
`,this.app=kh(gy,{data:t,placement:a.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 X4;let my=!1;my||(qo.register(pp,fp,Ic,Tc,f4,Ns),my=!0);ge({slots:["ganttChart"],base:{ganttChart:{backgroundColor:"background.default",borderRadius:"lg",border:"1px solid",borderColor:"border.muted",height:"fit-content"}}});ge({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 Z4={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function J4(e,t){return w(),M("svg",Z4,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_12427_264)"},[N("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),N("defs",null,[N("clipPath",{id:"clip0_12427_264"},[N("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const Q4={render:J4},e8={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function t8(e,t){return w(),M("svg",e8,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_12427_230)"},[N("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),N("defs",null,[N("clipPath",{id:"clip0_12427_230"},[N("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const n8={render:t8},o8=ge({className:"toast",slots:[...M1.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"}}),sh=(e,t,n)=>{const o=o8({variant:t}),i=gL({...n||{},placement:n?.placement||"bottom-end",overlap:n?.overlap||!0,gap:n?.gap||24,duration:n?.duration||3e3});i.create({title:e});const r=s=>({success:Pt(Q4,{class:o.icon}),failed:Pt(n8,{class:o.icon}),default:Pt("",null)})[s],a=document.createElement("div");document.body.appendChild(a),kh({render:()=>Pt(xL,{toaster:i},{default:()=>Pt(vL,{class:o.root,"data-testid":`toast-${t}`},[r(t),Pt(bL,null,e)])})}).mount(a)},Fr={success:(e,t)=>sh(e,"success",t),failed:(e,t)=>sh(e,"failed",t),default:(e,t)=>sh(e,"default",t)};Qi({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 i8=O({name:"InputWidget",__name:"Input",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=I(()=>e.property.ui);return(n,o)=>(w(),E(g(al),U({"model-value":e.field.state.value},g(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"]))}}),lh=Object.assign(i8,{__name:"Input"}),r8=O({name:"BooleanWidget",__name:"Boolean",props:{property:{},field:{}},setup(e){const t=i=>typeof i=="boolean"?String(i):void 0,n=fe(t(e.field.state.value));ze(()=>e.field.state.value,i=>{n.value=t(i)});const o=i=>{n.value=i,e.field.handleChange(i==="true")};return(i,r)=>(w(),M("div",null,[j(g(Z1),{modelValue:g(n),options:[{value:"true",label:"Yes"},{value:"false",label:"No"}],"onUpdate:modelValue":o},null,8,["modelValue"])]))}}),a8=Object.assign(r8,{__name:"Boolean"}),s8=O({name:"RadioWidget",__name:"Radio",props:{property:{},field:{}},setup(e){const t=I(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((n,o)=>({value:n,label:e.property.enumNames?.[o]||n})):[]);return(n,o)=>(w(),M("div",null,[j(g(Z1),{"model-value":e.field.state.value,options:g(t),"onUpdate:modelValue":e.field.handleChange},null,8,["model-value","options","onUpdate:modelValue"])]))}}),l8=Object.assign(s8,{__name:"Radio"}),Vt=Symbol("form"),F_=Symbol("getPayloadFn"),gp=(e,t,n,o)=>{const i={},r=e[`${t}.auth-type`],a=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}.${r}.extra.`)&&(i[p.replace(`${t}.${r}.extra.`,"")]=e[p])});const c=e[`${t}.host`]?.endsWith("/")?e[`${t}.host`].substr(0,e[`${t}.host`].length-1):e[`${t}.host`],u=e[`${t}.host`]?.startsWith("http")?e[`${t}.host`].startsWith("https")?443:80:e[`${t}.port`],d=typeof c=="string"&&c.length>0,h=typeof l=="string"&&l.length>0;return{name:o,...h&&{credentialType:l},...d&&{host:c},...d&&u&&{port:e[`${t}.port`]?parseInt(e[`${t}.port`]):u},authType:r,connectorType:s,...a?{connector:a}:{},connectBy:e[`${t}.connectBy`],connectorConfigName:n,credentialSource:"direct",username:e[`${t}.${r}.username`],password:e[`${t}.${r}.password`],extra:i}},gu=Array.isArray,mu=e=>!!e&&e.constructor===Object,c8=e=>e==null||typeof e!="object"&&typeof e!="function",ch=e=>typeof e=="string"||e instanceof String,Jf=(e,t)=>{if(Object.is(e,t))return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(n.length!==o.length)return!1;for(let i=0;i<n.length;i++)if(!Reflect.has(t,n[i])||!Jf(e[n[i]],t[n[i]]))return!1;return!0},u8=(e,t,n=o=>o)=>e.reduce((o,i)=>(o[t(i)]=n(i),o),{}),d8=(e,t)=>{const n=e.reduce((o,i)=>{const r=i;return o[r]||(o[r]=i),o},{});return Object.values(n)},uh=e=>e?.filter(t=>!!t)??[],h8=(e,t)=>Object.keys(e).reduce((o,i)=>(o[i]=t(e[i],i),o),{}),p8=e=>{if(c8(e))return e;if(typeof e=="function")return e.bind({});const t=new e.constructor;return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=e[n]}),t},Qf=(e,t)=>e?t.reduce((n,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]),n),{}):{},B_=(e,t)=>e?!t||t.length===0?e:t.reduce((n,o)=>(delete n[o],n),{...e}):{},f8=(e,t,n)=>{const o=t.split(/[\.\[\]]/g);let i=e;for(const r of o){if(i===null||i===void 0)return n;const a=r.replace(/['"]/g,"");a.trim()!==""&&(i=i[a])}return i===void 0?n:i},g8=(e,t,n)=>{if(!e)return{};if(!t||n===void 0)return e;const o=t.split(/[\.\[\]]/g).filter(a=>!!a.trim()),i=a=>{if(o.length>1){const s=o.shift(),l=/^\d+$/.test(o[0]);a[s]=a[s]===void 0?l?[]:{}:a[s],i(a[s])}else a[o[0]]=n},r=p8(e);return i(r),r},m8=e=>{if(!e)return[];const t=(n,o)=>mu(n)?Object.entries(n).flatMap(([i,r])=>t(r,[...o,i])):gu(n)?n.flatMap((i,r)=>t(i,[...o,`${r}`])):[o.join(".")];return t(e,[])},li=e=>e?u8(m8(e),t=>t,t=>f8(e,t)):{},v8=e=>e?Object.keys(e).reduce((t,n)=>g8(t,n,e[n]),{}):{},z_=(e,t=" ")=>{if(!e)return"";const n=t.replace(/[\W]{1}/g,"\\$&"),o=new RegExp(`^[${n}]+|[${n}]+$`,"g");return e.replace(o,"")},b8={trailing:!0};function y8(e,t=25,n={}){if(n={...b8,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let o,i,r=[],a,s;const l=(d,h)=>(a=x8(e,d,h),a.finally(()=>{if(a=null,n.trailing&&s&&!i){const p=l(d,s);return s=null,p}}),a),c=function(...d){return n.trailing&&(s=d),a||new Promise(h=>{const p=!i&&n.leading;clearTimeout(i),i=setTimeout(()=>{i=null;const m=n.leading?o:l(this,d);s=null;for(const f of r)f(m);r=[]},t),p?(o=l(this,d),h(o)):r.push(h)})},u=d=>{d&&(clearTimeout(d),i=null)};return c.isPending=()=>!!i,c.cancel=()=>{u(i),r=[],s=null},c.flush=()=>{if(u(i),!s||a)return;const d=s;return s=null,l(this,d)},c}async function x8(e,t,n){return await e.apply(t,n)}function Xi(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;w8(e[0],e[1])&&e.unshift(t);let[n,o,i={}]=e,r=!1;const a=I(()=>Ye(n));if(typeof a.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=JC();i.server??=!0,i.default??=C8,i.getCachedData??=j_,i.lazy??=!1,i.immediate??=!0,i.deep??=QC.deep,i.dedupe??="cancel",i._functionName,s._asyncData[a.value];function l(){const m={cause:"initial",dedupe:i.dedupe};return s._asyncData[a.value]?._init||(m.cachedData=i.getCachedData(a.value,s,{cause:"initial"}),s._asyncData[a.value]=vy(s,a.value,o,i,m.cachedData)),()=>s._asyncData[a.value].execute(m)}const c=l(),u=s._asyncData[a.value];u._deps++;const d=i.server!==!1&&s.payload.serverRendered;{let m=function(_){const k=s._asyncData[_];k?._deps&&(k._deps--,k._deps===0&&k?._off())};const f=zs();if(f&&d&&i.immediate&&!f.sp&&(f.sp=[]),f&&!f._nuxtOnBeforeMountCbs){f._nuxtOnBeforeMountCbs=[];const _=f._nuxtOnBeforeMountCbs;ek(()=>{_.forEach(k=>{k()}),_.splice(0,_.length)}),Hp(()=>_.splice(0,_.length))}const b=f&&(f._nuxtClientOnly||xt(tk,!1));d&&s.isHydrating&&(u.error.value||u.data.value!==void 0)?u.status.value=u.error.value?"error":"success":f&&(!b&&s.payload.serverRendered&&s.isHydrating||i.lazy)&&i.immediate?f._nuxtOnBeforeMountCbs.push(c):i.immediate&&u.status.value!=="success"&&c();const v=ok(),y=ze(a,(_,k)=>{if((_||k)&&_!==k){r=!0;const $=s._asyncData[k]?.data.value!==void 0,A=s._asyncDataPromises[k]!==void 0,S={cause:"initial",dedupe:i.dedupe};if(!s._asyncData[_]?._init){let R;k&&$?R=s._asyncData[k].data.value:(R=i.getCachedData(_,s,{cause:"initial"}),S.cachedData=R),s._asyncData[_]=vy(s,_,o,i,R)}s._asyncData[_]._deps++,k&&m(k),(i.immediate||$||A)&&s._asyncData[_].execute(S),rk(()=>{r=!1})}},{flush:"sync"}),x=i.watch?ze(i.watch,()=>{r||u._execute({cause:"watch",dedupe:i.dedupe})}):()=>{};v&&nk(()=>{y(),x(),m(a.value)})}const h={data:Jl(()=>s._asyncData[a.value]?.data),pending:Jl(()=>s._asyncData[a.value]?.pending),status:Jl(()=>s._asyncData[a.value]?.status),error:Jl(()=>s._asyncData[a.value]?.error),refresh:(...m)=>s._asyncData[a.value]?._init?s._asyncData[a.value].execute(...m):l()(),execute:(...m)=>h.refresh(...m),clear:()=>{const m=s._asyncData[a.value];if(m?._abortController)try{m._abortController.abort(new DOMException("AsyncData aborted by user.","AbortError"))}finally{m._abortController=void 0}H_(s,a.value)}},p=Promise.resolve(s._asyncDataPromises[a.value]).then(()=>h);return Object.assign(p,h),p}function Jl(e){return I({get(){return e()?.value},set(t){const n=e();n&&(n.value=t)}})}function w8(e,t){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof t=="function")}function H_(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=g(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 _8(e,t){const n={};for(const o of t)n[o]=e[o];return n}function vy(e,t,n,o,i){e.payload._errors[t]??=void 0;const r=o.getCachedData!==j_,a=n,s=o.deep?fe:jc,l=i!==void 0,c=e.hook("app:data:refresh",async d=>{(!d||d.includes(t))&&await u.execute({cause:"refresh:hook"})}),u={data:s(l?i:o.default()),pending:I(()=>u.status.value==="pending"),error:v0(e.payload._errors,t),status:jc("idle"),execute:(...d)=>{const[h,p=void 0]=d,m=h&&p===void 0&&typeof h=="object"?h:{};if(e._asyncDataPromises[t]&&(m.dedupe??o.dedupe)==="defer")return e._asyncDataPromises[t];{const b="cachedData"in m?m.cachedData:o.getCachedData(t,e,{cause:m.cause??"refresh:manual"});if(b!==void 0)return e.payload.data[t]=u.data.value=b,u.error.value=void 0,u.status.value="success",Promise.resolve(b)}u._abortController&&u._abortController.abort(new DOMException("AsyncData request cancelled by deduplication","AbortError")),u._abortController=new AbortController,u.status.value="pending";const f=new Promise((b,v)=>{try{const y=m.timeout??o.timeout,x=k8([u._abortController?.signal,m?.signal],y);if(x.aborted){const _=x.reason;v(_ instanceof Error?_:new DOMException(String(_??"Aborted"),"AbortError"));return}return x.addEventListener("abort",()=>{const _=x.reason;v(_ instanceof Error?_:new DOMException(String(_??"Aborted"),"AbortError"))},{once:!0}),Promise.resolve(a(e,{signal:x})).then(b,v)}catch(y){v(y)}}).then(async b=>{let v=b;o.transform&&(v=await o.transform(b)),o.pick&&(v=_8(v,o.pick)),e.payload.data[t]=v,u.data.value=v,u.error.value=void 0,u.status.value="success"}).catch(b=>{if(!(e._asyncDataPromises[t]&&e._asyncDataPromises[t]!==f)&&!u._abortController?.signal.aborted){if(typeof DOMException<"u"&&b instanceof DOMException&&b.name==="AbortError"){u.status.value="idle";return}u.error.value=ik(b),u.data.value=g(o.default()),u.status.value="error"}}).finally(()=>{delete e._asyncDataPromises[t]});return e._asyncDataPromises[t]=f,e._asyncDataPromises[t]},_execute:y8((...d)=>u.execute(...d),0,{leading:!0}),_default:o.default,_deps:0,_init:!0,_hash:void 0,_off:()=>{c(),e._asyncData[t]?._init&&(e._asyncData[t]._init=!1),r||oo(()=>{e._asyncData[t]?._init||(H_(e,t),u.execute=()=>Promise.resolve())})}};return u}const C8=()=>{},j_=(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 k8(e,t){const n=e.filter(r=>!!r);if(typeof t=="number"&&t>=0){const r=AbortSignal.timeout?.(t);r&&n.push(r)}if(AbortSignal.any)return AbortSignal.any(n);const o=new AbortController;for(const r of n)if(r.aborted){const a=r.reason??new DOMException("Aborted","AbortError");try{o.abort(a)}catch{o.abort()}return o.signal}const i=()=>{const a=n.find(s=>s.aborted)?.reason??new DOMException("Aborted","AbortError");try{o.abort(a)}catch{o.abort()}};for(const r of n)r.addEventListener?.("abort",i,{once:!0});return o.signal}async function W_(e){const{data:t}=await Xi(()=>`credential_${Ye(e)}`,()=>$fetch(`/workflows/v1/configmap/${Ye(e)}`),"$vlaIZ4700T");return{credentialConfig:I(()=>{const o=t.value?.data;return o&&"kind"in o?JSON.parse(o.data.config):o?.config??null}),data:t}}function id(e){const t={};return Object.entries(e.properties).forEach(([n,o])=>{o.default!==void 0?o?.ui?.widget==="Repeater"?t[n]=JSON.parse(o.default):t[n]=o.default:o.properties&&(t[n]=id(o))}),t}const S8={key:0,class:"flex mt-3"},$8={key:1,class:"p-3 mt-4 border rounded-md border-green-400 bg-green-100"},E8={key:0,class:"mt-1"},T8={class:"text-sm text-green-600"},O8={key:2,class:"p-3 mt-4 border rounded-md border-new-red-400 bg-new-red-100"},I8={class:"mt-1"},P8={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},A8=O({__name:"CredentialWidget",props:{property:{},modelValue:{}},async setup(e){let t,n;const o=ci(()=>ui(()=>Promise.resolve().then(()=>mi),void 0,import.meta.url)),i=xt(Vt),{credentialConfig:r}=([t,n]=na(()=>W_(()=>e.property.ui.credentialType)),t=await t,n(),t),a=i.useStore(u=>B_(u.values,["credential_guid_body","credential_property_id"]));ze(()=>e.property,u=>{u&&i.setFieldValue("credential_property_id",u.id)},{immediate:!0}),ze(a,u=>{u&&i.setFieldValue("credential_guid_body",gp(li(u),e.property.id,e.property.ui?.credentialType,void 0))},{immediate:!0}),ze(r,u=>{u&&Object.entries(id(u)).forEach(([d,h])=>{i.state.values[`${e.property.id}.${d}`]||i.setFieldValue(`${e.property.id}.${d}`,h)})},{immediate:!0});const s=fe(!1),l=fe(null);async function c(){s.value=!0,l.value=null;try{const u=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(gp(li(i.state.values),e.property.id,e.property.ui?.credentialType,void 0))});l.value=u}catch(u){l.value={success:!1,message:u?.data?.message||u?.message||"Authentication failed"}}finally{s.value=!1}}return(u,d)=>(w(),M("div",{class:L(e.property.ui.class)},[g(r)?(w(),M(Se,{key:0},[j(g(o),{"config-map":g(r),"base-key":e.property.id},null,8,["config-map","base-key"]),e.property.ui?.isTestAuthenticationDisabled?oe("",!0):(w(),M("div",S8,[j(g(Xn),{loading:g(s),label:g(s)?"Testing Authentication":"Test Authentication",onClick:c},null,8,["loading","label"])]))],64)):oe("",!0),!e.property.ui?.isTestAuthenticationDisabled&&g(l)?.success?(w(),M("div",$8,[d[0]||(d[0]=N("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),g(l).message?(w(),M("div",E8,[N("span",T8,se(g(l).message),1)])):oe("",!0)])):oe("",!0),!e.property.ui?.isTestAuthenticationDisabled&&g(l)&&!g(l).success?(w(),M("div",O8,[d[1]||(d[1]=N("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),N("div",I8,[N("span",P8,se(g(l).message),1)])])):oe("",!0)],2))}}),R8=Object.assign(A8,{__name:"CredentialWidget"}),D8=O({__name:"Nested",props:{property:{}},setup(e){const t=ci(()=>ui(()=>Promise.resolve().then(()=>mi),void 0,import.meta.url));return(n,o)=>(w(),E(g(t),{"config-map":e.property,"base-key":e.property.id},null,8,["config-map","base-key"]))}}),V8=Object.assign(D8,{__name:"Nested"}),M8=O({__name:"Password",props:{field:{},property:{},disabled:{type:Boolean}},setup(e){const t=fe(e.field.state.value??""),n=o=>{t.value=o,e.field.handleChange(o)};return(o,i)=>(w(),E(g(al),{id:e.property.id,type:"password","model-value":g(t),placeholder:e.property.ui?.placeholder,disabled:e.disabled,"data-test-id":e.property.id,"onUpdate:modelValue":n,onBlur:e.field.handleBlur},null,8,["id","model-value","placeholder","disabled","data-test-id","onBlur"]))}}),N8=Object.assign(M8,{__name:"Password"}),L8=O({name:"SelectWidget",__name:"Select",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=I(()=>e.property.ui?.mode==="multiple"),n=I(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((r,a)=>({value:r,label:e.property.enumNames?.[a]||r})):[]),o=fe((()=>{if(t.value)return e.field.state.value;const r=e.field.state.value;return r?[r]:[]})());function i(r){e.field.handleChange(t.value?r:r[0]),o.value=r}return(r,a)=>(w(),E(g(fi),{id:e.property.id,"model-value":g(o),options:g(n),placeholder:e.property.placeholder,"is-disabled":e.disabled,multiple:g(t),variant:"default","onUpdate:modelValue":i,onBlur:e.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","multiple","onBlur"]))}}),F8=Object.assign(L8,{__name:"Select"}),B8=O({__name:"SQLTree",props:{field:{}},async setup(e){let t,n;const o=xt(Vt),{data:i}=([t,n]=na(()=>Xi("metadata",()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),t=await t,n(),t),r=I(()=>i.value?d8(i.value.data.map(p=>p.TABLE_CATALOG)).map(p=>({value:p,label:p,children:i.value.data.filter(m=>m.TABLE_CATALOG===p).map(m=>({value:`${p}:${m.TABLE_SCHEMA}`,label:m.TABLE_SCHEMA}))})):[]),a=h=>{let p=h;return p.startsWith("^")&&(p=p.slice(1)),p.endsWith("$")&&(p=p.slice(0,-1)),p},l=fe((h=>{const p=[];if(h){if(typeof h=="object")Object.keys(h)?.forEach(m=>{h[m]?.length>0?h[m]?.forEach(f=>{p.push(`${a(m)}:${a(f)}`)}):p.push(a(m))});else if(typeof h=="string")try{const m=JSON.parse(h);Object.keys(m)?.forEach(f=>{m[f].length>0?m[f]?.forEach(b=>{p.push(`${a(f)}:${a(b)}`)}):p.push(a(f))})}catch{p.push(a(h))}}return p})(e.field.state.value)),c=h=>{const p=new Set(r.value.map(f=>f.value)),m=new Set(h.filter(f=>p.has(f)));return m.size?h.filter(f=>m.has(f)?!0:![...m].some(b=>f.startsWith(`${b}:`))):h},u=h=>{const p={};return h.forEach(m=>{if(m.includes(":")){const f=m.split(":")[0];p[`^${f}$`]=[]}else p[`^${m}$`]=[]}),h.forEach(m=>{if(m.includes(":")){const[f,b]=m.split(":"),v=`^${f}$`;b&&p[v]&&p[v].push(`^${b}$`)}}),p},d=h=>{const p=c(h),m=u(p);e.field.handleChange(m),l.value=p};return(h,p)=>(w(),E(g(fi),{isTree:"",multiple:"",options:g(r),modelValue:g(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),z8=Object.assign(B8,{__name:"SQLTree"}),H8=O({__name:"APITree",props:{field:{},property:{}},async setup(e){let t,n;const o=xt(Vt),{data:i}=([t,n]=na(()=>Xi(`${e.property.id}_metadata`,()=>{const d=o.getFieldValue("credential_guid_body"),h=e.property.ui?.metadataTemplateKey;return $fetch("/workflows/v1/metadata",{method:"POST",body:{...d&&d,...h&&{type:h},...h&&{database:h}}})})),t=await t,n(),t);function r(d,h=null){return d.map(p=>{const m=h?`${h}:${p.value}`:p.value;return{value:m,label:p.title,children:p.children?r(p.children,m):void 0}})}const a=I(()=>i.value?r(i.value.data):[]),l=fe((d=>{const h=[],p=(m,f=[])=>{Array.isArray(m)?f.length>0&&h.push(f.join(":")):typeof m=="object"&&m!==null&&Object.keys(m).forEach(b=>{p(m[b],[...f,b])})};if(d)if(typeof d=="string")try{p(JSON.parse(d))}catch{h.push(d)}else p(d);return h})(e.field.state.value)),c=d=>{const h={};return d.forEach(p=>{const m=p.split(":");let f=h;m.forEach((b,v)=>{f[b]||(f[b]={}),v!==m.length-1&&(f=f[b])})}),h},u=d=>{const h=c(d);e.field.handleChange(h),l.value=d};return(d,h)=>(w(),E(g(fi),{isTree:"",multiple:"",options:g(a),modelValue:g(l),"onUpdate:modelValue":u},null,8,["options","modelValue"]))}}),j8=Object.assign(H8,{__name:"APITree"}),W8={class:"border border-gray-200 rounded-lg p-6 bg-white"},U8={class:"flex items-center justify-between mb-4"},G8={key:0,class:"mt-4 space-y-3"},q8={class:"flex items-start gap-3"},Y8={class:"flex-1"},K8={class:"flex items-center gap-2"},X8={class:"font-medium text-gray-900 capitalize"},Z8={key:0,class:"text-sm text-gray-600 mt-1"},J8={key:1,class:"text-sm text-red-600 mt-1"},Q8={key:1,class:"mt-4 text-center text-gray-500 text-sm"},ez=O({name:"SageWidget",__name:"Sage",props:{property:{},field:{}},setup(e){const t=xt(F_),n=fe(!1),o=fe(null);async function i(){n.value=!0,o.value=null;try{const{credentialBody:s,startPayload:l}=await t(),c=await $fetch("/workflows/v1/check",{method:"POST",body:{...l||{},...s?{credentials:s}:{}}});o.value=c.data,c.success?Fr.success("Pre-flight checks completed!",{placement:"top",duration:3e3}):Fr.failed("Some pre-flight checks failed",{placement:"top",duration:3e3})}catch(s){Fr.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 r=s=>s?"✓":"✗",a=s=>s?"text-green-600":"text-red-600";return(s,l)=>(w(),M("div",W8,[N("div",U8,[l[0]||(l[0]=N("div",null,[N("h3",{class:"text-lg font-semibold text-gray-900"}," Pre-flight Checks "),N("p",{class:"text-sm text-gray-500 mt-1"}," Verify your configuration before starting the workflow ")],-1)),j(g(Xn),{label:"Check","is-loading":g(n),onClick:i},null,8,["is-loading"])]),g(o)?(w(),M("div",G8,[(w(!0),M(Se,null,Ie(g(o),(c,u)=>(w(),M("div",{key:u,class:"border border-gray-200 rounded-md p-4"},[N("div",q8,[N("span",{class:L(["text-xl font-bold",a(c.success)])},se(r(c.success)),3),N("div",Y8,[N("div",K8,[N("h4",X8,se(u.replace(/([A-Z])/g," $1").trim()),1),N("span",{class:L(["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"])},se(c.success?"Passed":"Failed"),3)]),c.success&&c.successMessage?(w(),M("p",Z8,se(c.successMessage),1)):oe("",!0),!c.success&&c.failureMessage?(w(),M("p",J8,se(c.failureMessage),1)):oe("",!0)])])]))),128))])):g(n)?oe("",!0):(w(),M("div",Q8,' Click "Check" to run pre-flight checks '))]))}}),tz=Object.assign(ez,{__name:"Sage"}),nz=O({__name:"Connection",props:{property:{},modelValue:{}},setup(e){const t=ci(()=>ui(()=>Promise.resolve().then(()=>mi),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)=>(w(),E(g(t),{"config-map":n,"base-key":e.property.id},null,8,["base-key"]))}}),oz=Object.assign(nz,{__name:"Connection"}),iz={key:0,class:"text-sm text-gray-500 mt-2"},rz={key:1,class:"text-sm text-red-500 mt-2"},az=O({name:"FileUploadWidget",__name:"FileUpload",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=fe(!1),n=fe(null),o=async a=>{const s=new FormData;return s.append("file",a),await $fetch("/workflows/v1/file",{method:"POST",body:s})},i=async a=>{const{files:s}=a;if(!s||s.length===0)return;const l=s[0];if(l){t.value=!0,n.value=null;try{const c=await o(l);e.property.ui?.fileMetadata?e.field.handleChange(JSON.stringify({...c,fileKey:c.key,fileId:c.id})):e.field.handleChange(c.id)}catch(c){n.value=c instanceof Error?c.message:"Failed to upload file"}finally{t.value=!1}}},r=I(()=>({placeholder:e.property.ui?.placeholder||"Drag and drop files here",accept:e.property.ui?.accept,isDisabled:e.disabled||t.value}));return(a,s)=>(w(),M("div",null,[j(g(MF),U(g(r),{onFileAccept:i,onBlur:e.field.handleBlur}),null,16,["onBlur"]),g(t)?(w(),M("div",iz," Uploading... ")):oe("",!0),g(n)?(w(),M("div",rz,se(g(n)),1)):oe("",!0)]))}}),sz=Object.assign(az,{__name:"FileUpload"});const by=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),cz=e=>{const t=lz(e);return t.charAt(0).toUpperCase()+t.slice(1)},uz=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),yy=e=>e==="";var Ha={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 dz=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":r,size:a=Ha.width,color:s=Ha.stroke,...l},{slots:c})=>Pt("svg",{...Ha,...l,width:a,height:a,stroke:s,"stroke-width":yy(n)||yy(o)||n===!0||o===!0?Number(i||r||Ha["stroke-width"])*24/Number(a):i||r||Ha["stroke-width"],class:uz("lucide",l.class,...e?[`lucide-${by(cz(e))}-icon`,`lucide-${by(e)}`]:["lucide-icon"])},[...t.map(u=>Pt(...u)),...c.default?[c.default()]:[]]);const En=(e,t)=>(n,{slots:o,attrs:i})=>Pt(dz,{...i,...n,iconNode:t,name:e},o);const hz=En("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const pz=En("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const U_=En("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const fz=En("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const gz=En("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const mp=En("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const mz=En("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);const vz=En("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const bz=En("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const yz=En("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"}]]);const xz=En("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const ws=En("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wz={key:0,class:"text-red-500"},_z={key:0,class:"absolute right-3 top-3 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},Cz={class:"flex justify-center"},kz=O({__name:"Repeater",props:{property:{}},setup(e){const t=ci(()=>ui(()=>Promise.resolve().then(()=>mi),void 0,import.meta.url)),n=xt(Vt),o=a=>{a.pushValue()},i=(a,s)=>{const l=e.property.ui.minItems??1;a.state.value.length>l&&a.removeValue(s)},r=a=>e.property.ui.maxItems!==void 0&&a.state.value.length>=e.property.ui.maxItems;return(a,s)=>(w(),E(g(n).Field,{name:e.property.id,mode:"array"},{default:C(({field:l})=>[N("div",null,[N("div",null,[j(g(Bf),null,{default:C(()=>[Ne(se(e.property.ui?.label)+" ",1),e.property?.required?(w(),M("span",wz," * ")):oe("",!0)]),_:1})]),(w(!0),M(Se,null,Ie(l.state.value,(c,u)=>(w(),M("div",{key:u,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)?(w(),M("div",_z,[j(g(yz),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>{i(l,u)}},null,8,["onClick"])])):oe("",!0),j(g(t),{configMap:e.property,baseKey:`${e.property.id}[${u}]`},null,8,["configMap","baseKey"])]))),128)),N("div",Cz,[j(g(Xn),{type:"default",label:`Add to ${e.property.ui.label}`,disabled:r(l),onClick:()=>{o(l)}},null,8,["label","disabled","onClick"])])])]),_:1},8,["name"]))}}),Sz=Object.assign(kz,{__name:"Repeater"}),$z=O({name:"ConnectionSelector",__name:"ConnectionSelector",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=I(()=>e.property.ui?.mode==="multiple"),n=I(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((l,c)=>({attributes:{qualifiedName:l,name:e.property.enumNames?.[c],connectorName:l.split("/")[1]}})):[{attributes:{qualifiedName:"default/snowflake/1234567890",name:"Production Database",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321",name:"Staging Database",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/postgres/8938390",name:"Development Database",connectorName:"postgres"}},{attributes:{qualifiedName:"default/bigquery/1234567890",name:"Analytics Warehouse",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/s3/1234567890",name:"Backup Storage",connectorName:"s3"}}]),o=I(()=>n.value.map(l=>({label:l.attributes.name??l.attributes.qualifiedName,value:l.attributes.qualifiedName}))),i=l=>n.value.find(c=>c.attributes.qualifiedName===l),a=fe((()=>{const l=e.field.state.value;if(!l)return[];if(gu(l))return l.every(u=>ch(u))?l:uh(l.map(u=>u?.attributes?.qualifiedName));if(mu(l)){const u=l?.attributes?.qualifiedName;return u?[u]:[]}if(!ch(l))return[];let c;try{c=JSON.parse(l)}catch{return[l]}if(gu(c))return c.every(ch)?c:uh(c.map(u=>u?.attributes?.qualifiedName));if(c&&mu(c)){const u=c?.attributes?.qualifiedName;return u?[u]:[l]}return[l]})());function s(l){if(a.value=l,e.property.shouldIncludeConnectionInfo)if(t.value){const c=uh(l.map(u=>i(u)));e.field.handleChange(c)}else{const c=l[0]?i(l[0]):void 0;e.field.handleChange(c||void 0)}else e.field.handleChange(t.value?l:l[0])}return(l,c)=>(w(),E(g(fi),{id:e.property.id,modelValue:g(a),options:g(o),placeholder:e.property.placeholder,"is-disabled":e.disabled,multiple:g(t),variant:"default","onUpdate:modelValue":s,onBlur:e.field.handleBlur},null,8,["id","modelValue","options","placeholder","is-disabled","multiple","onBlur"]))}}),Ez=Object.assign($z,{__name:"ConnectionSelector"}),Tz=O({name:"SwitcherWidget",__name:"Switcher",props:{property:{},field:{}},setup(e){const t=({checked:n})=>{e.field.handleChange(n)};return(n,o)=>(w(),M("div",null,[j(g(W3),{checked:e.field.state.value,onCheckedChange:t},{default:C(()=>[Ne(se(e.property.ui?.title),1)]),_:1},8,["checked"])]))}}),Oz=Object.assign(Tz,{__name:"Switcher"}),xy=e=>{if(typeof e=="object"&&e!==null){if(typeof Object.getPrototypeOf=="function"){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}return Object.prototype.toString.call(e)==="[object Object]"}return!1},en=(...e)=>e.reduce((t,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(o=>{["__proto__","constructor","prototype"].includes(o)||(Array.isArray(t[o])&&Array.isArray(n[o])?t[o]=en.options.mergeArrays?en.options.uniqueArrayItems?Array.from(new Set(t[o].concat(n[o]))):[...t[o],...n[o]]:n[o]:xy(t[o])&&xy(n[o])?t[o]=en(t[o],n[o]):t[o]=n[o]===void 0?en.options.allowUndefinedOverrides?n[o]:t[o]:n[o])}),t},{}),vp={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};en.options=vp;en.withOptions=(e,...t)=>{en.options=Object.assign(Object.assign({},vp),e);const n=en(...t);return en.options=vp,n};const Iz={properties:{divider:{ui:{widget:"divider",class:"mt-0"}},header:{ui:{widget:"header",label:"Secure Agent Configuration",class:"mb-4 text-base text-new-gray-500"}},"agent-name":{type:"string",required:!0,ui:{widget:"agentSelector",label:"Agent",grid:4,rules:[{required:!0,message:"Please select an agent"}]}},"secret-manager":{type:"string",required:!0,enum:["awssecretmanager","azurekeyvault","gcpsecretmanager","secretinjectionenvironment","kubernetes","custom"],enumNames:["AWS Secret Manager","Azure Key Vault","GCP Secret Manager","Environment Variable based Injection","Kubernetes Secret","Custom"],ui:{widget:"select",label:"Secret Store",placeholder:"Secret Store",rules:[{required:!0,message:"Please select the secret store"}]}},"secret-path":{type:"string",required:!0,ui:{label:"Secret Path/Name in Secret Manager",placeholder:"Enter Secret Path/Name",help:"The secret path or name of the stored secret in the secret manager",hidden:!1,grid:4,rules:[{required:!0,message:"Please enter the secret path"}]}},"aws-region":{type:"string",enum:["us-east-1","us-east-2","us-west-1","us-west-2","af-south-1","ap-east-1","ap-south-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-west-1","eu-west-2","eu-west-3","eu-north-1","eu-south-1","me-south-1","sa-east-1"],required:!0,enumNames:["US East (N. Virginia)","US East (Ohio)","US West (N. California)","US West (Oregon)","Africa (Cape Town)","Asia Pacific (Hong Kong)","Asia Pacific (Mumbai)","Asia Pacific (Tokyo)","Asia Pacific (Seoul)","Asia Pacific (Osaka)","Asia Pacific (Singapore)","Asia Pacific (Sydney)","Canada (Central)","Europe (Frankfurt)","Europe (Ireland)","Europe (London)","Europe (Paris)","Europe (Stockholm)","Europe (Milan)","Middle East (Bahrain)","South America (São Paulo)"],ui:{widget:"select",label:"AWS Region",placeholder:"Select AWS Region",grid:4,rules:[{required:!0,message:"Please select a region"}]}},"aws-auth-method":{type:"string",required:!0,enum:["iam","iam-assume-role","access-key"],default:"iam",enumNames:["IAM","IAM Assume Role","Access Key and Secret Key"],ui:{widget:"select",label:"AWS Authentication Method",placeholder:"Select AWS Authentication Method",help:"In case of IAM assume role or access key and secret key authentication, the keys should be set as environment variables or added in kubernetes secrets",grid:4,rules:[{required:!0,message:"Please select an AWS authentication method"}]}},"aws-assume-role-arn":{type:"string",required:!0,ui:{label:"AWS Assume Role ARN",placeholder:"Enter AWS Role ARN to assume",help:"The AWS role ARN to assume for accessing AWS Secret Manager",hidden:!1,grid:4}},"azure-auth-method":{type:"string",enum:["managed_identity","service_principal"],default:"managed_identity",enumNames:["Managed Identity","Service Principal"],ui:{widget:"select",label:"Azure Authentication Method",placeholder:"Select Azure Authentication Method",help:"In case of Service Principal authentication, the client id, client secret and tenant id should be set as environment variables or added in kubernetes secrets",grid:4,rules:[{required:!0,message:"Please select an Azure authentication method"}]}},"azure-vault-name":{type:"string",required:!0,ui:{label:"Azure Key Vault Name",placeholder:"Enter Azure Key Vault Name",help:"The name of the Azure Key Vault",hidden:!1,grid:8}},"agent-custom-config":{type:"string",ui:{label:"Agent Custom configuration",placeholder:"{}",help:"Use this if you wish to use any custom configuration for the agent. Do not enter any sensitive information here.",hidden:!1,grid:8}},"aws-secret-manager-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the AWS Secret, add the path for the fields with the placeholder Store Credential Path. Example: username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"azure-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the Azure Key Vault, add the name of key vault secret for the fields with the placeholder Store Credential Path. Example: atlan-crawler-db-username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"secret-injection-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"Add the expected environment variable values for the fields with the placeholder Store Credential Path. Example: vault:secret/data/accounts/test#PASSWORD",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"kubernetes-secret-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the K8S Secret, add the corresponding key name in the secret for the fields with the placeholder Store Credential Path. Example: username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"gcp-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the Google Secret Manager, add the secret path for the fields with the placeholder Store Credential Path. Example: projects/{project_id}/secrets/{secret_id}/versions/{version_id}",link:{label:"View docs",url:"https://ask.atlan.com/"}}}},anyOf:[{properties:{"secret-manager":{const:"awssecretmanager"}},required:["aws-auth-method","aws-region","secret-path","aws-secret-manager-help-text"]},{properties:{"aws-auth-method":{const:"iam-assume-role"},"secret-manager":{const:"awssecretmanager"}},required:["aws-assume-role-arn"]},{properties:{"secret-manager":{const:"azurekeyvault"}},required:["azure-auth-method","azure-vault-name","azure-help-text"]},{properties:{"secret-manager":{const:"secretinjectionenvironment"}},required:["secret-injection-help-text"]},{properties:{"secret-manager":{const:"kubernetes"}},required:["secret-path","kubernetes-secret-help-text"]},{properties:{"secret-manager":{const:"gcpsecretmanager"}},required:["gcp-help-text"]},{properties:{"secret-manager":{const:"custom"}},required:["agent-custom-config"]}]},Pz={config:Iz},Az=e=>{try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}return!0};function Rz(e){if(!e)return{message:null,link:null};if(!Az(e))return{message:e,link:null};const t=JSON.parse(e);return{message:t.error_message??t.debug_message??e,link:t.doc_link?t.doc_link:null}}const Dz={key:0,class:"flex items-center justify-center",style:{height:"100px"}},Vz={key:1,class:"flex items-center justify-center"},Mz={class:"text-red-500 text-sm"},Nz={class:"mt-2"},Lz={key:0,class:"flex flex-col mt-2 gap-y-2"},Fz={class:"flex"},Bz={key:0,class:"p-3 border rounded-md border-green-400 bg-green-100"},zz={key:0,class:"mt-1"},Hz={class:"text-sm text-green-600"},jz={key:1,class:"p-3 border rounded-md border-new-red-400 bg-new-red-100"},Wz={class:"mt-1"},Uz={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},Gz=["href"],qz="atlan-connectors-agent",Yz=O({__name:"Agent",props:{property:{}},setup(e){const t=ci(()=>ui(()=>Promise.resolve().then(()=>mi),void 0,import.meta.url)),n=xt(Vt),o=I(()=>e.property.ui?.agentConfigs??[]),i=I(()=>e.property.ui?.agentType),r=I(()=>{const b=i.value?[{name:i.value,options:{}}]:[],v=o.value.map(([y,x={}])=>({name:y,options:x}));return[...b,...v].filter(y=>y.name)});async function a(b){if(b===qz)return{data:Pz};const y=(await $fetch(`/workflows/v1/configmap/${b}`))?.data;return y&&"kind"in y?{data:{config:JSON.parse(y.data.config)}}:{data:{config:y?.config??{}}}}const s=fe(null),l=fe(!0),c=fe(null);ze(r,async b=>{l.value=!0,c.value=null;try{s.value=await Promise.all(b.map(({name:v})=>a(v)))}catch(v){c.value=v}finally{l.value=!1}},{immediate:!0});const u=I(()=>{if(!s.value)return null;let b={};for(let v=0;v<r.value.length;v++){const y=r.value[v];if(!y)continue;const x=s.value[v]?.data?.config;if(x)if(Object.keys(y.options).length>0){const _=en(b,x,y.options);b=en.withOptions({mergeArrays:!1},_,y.options)}else b=en(b,x)}return Object.keys(b).length>0?b:null}),d=n.useStore(b=>li(b.values));ze(u,b=>{b?.properties&&Object.entries(id(b)).forEach(([v,y])=>{const x=`${e.property.id}.${v}`;d.value[x]||n.setFieldValue(x,y)})},{immediate:!0});const h=I(()=>{const b=o.value[0];return Array.isArray(b)?b[0]:i.value??""}),p=fe(!1),m=fe(null);ze(d,()=>{m.value=null});async function f(){p.value=!0,m.value=null;try{const b=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(gp(d.value,e.property.id,h.value,void 0))});m.value={success:!0,message:b.message||"Authentication successful"}}catch(b){const v=b,{message:y,link:x}=Rz(v?.data?.message||v?.message);m.value={success:!1,message:y||"Authentication failed",link:x}}finally{p.value=!1}}return(b,v)=>g(l)?(w(),M("div",Dz,[...v[0]||(v[0]=[N("span",{class:"text-sm text-gray-500"},"Loading credential configuration...",-1)])])):g(c)?(w(),M("div",Vz,[N("span",Mz,se(g(c)),1)])):g(u)?(w(),M("div",{key:2,class:L([e.property.ui?.class,"flex flex-col gap-y-2"])},[N("div",Nz,[j(g(t),{"config-map":g(u),"base-key":e.property.id},null,8,["config-map","base-key"])]),e.property.ui?.showTestAuthentication?(w(),M("div",Lz,[N("div",Fz,[j(g(Xn),{loading:g(p),label:g(p)?"Testing Authentication":"Test Authentication",onClick:f},null,8,["loading","label"])]),g(m)?.success?(w(),M("div",Bz,[v[1]||(v[1]=N("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),g(m).message?(w(),M("div",zz,[N("span",Hz,se(g(m).message),1)])):oe("",!0)])):oe("",!0),g(m)&&!g(m).success?(w(),M("div",jz,[v[2]||(v[2]=N("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),N("div",Wz,[N("span",Uz,se(g(m).message),1),g(m).link?(w(),M("a",{key:0,href:g(m).link,target:"_blank",class:"ml-1 text-sm text-blue-600 underline"}," Troubleshoot ",8,Gz)):oe("",!0)])])):oe("",!0)])):oe("",!0)],2)):oe("",!0)}}),Kz=Object.assign(Yz,{__name:"Agent"}),Xz=O({name:"AgentSelector",__name:"AgentSelector",props:{property:{},disabled:{type:Boolean},field:{},baseKey:{}},setup(e){const t=xt(Vt),n=[{id:"atlas-agent-1",label:"Atlas Agent 1",agentType:"atlas"},{id:"miner-agent-2",label:"Miner Agent 2",agentType:"miner"},{id:"lineage-agent-3",label:"Lineage Agent 3",agentType:"lineage"},{id:"catalog-agent-4",label:"Catalog Agent 4",agentType:"catalog"}],o=n.map(({id:a,label:s})=>({value:a,label:s})),i=fe(e.field.state.value?[e.field.state.value]:[]);function r(a){i.value=a,e.field.handleChange(a[0]);const s=n.find(l=>l.id===a[0]);if(s){const l=e.baseKey?`${e.baseKey}.agent-type`:"agent-type";t.setFieldValue(l,s.agentType)}}return(a,s)=>(w(),E(g(fi),{id:e.property.id,"model-value":g(i),options:g(o),placeholder:e.property.placeholder,"is-disabled":e.disabled,variant:"default","onUpdate:modelValue":r,onBlur:e.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","onBlur"]))}}),Zz=Object.assign(Xz,{__name:"AgentSelector"});var wy;const Jz=typeof window<"u";Jz&&((wy=window?.navigator)!=null&&wy.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Qz(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const G_=e=>e();function eH(e=G_){const t=fe(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:w0(t),pause:n,resume:o,eventFilter:i}}function tH(e){return e}var _y=Object.getOwnPropertySymbols,nH=Object.prototype.hasOwnProperty,oH=Object.prototype.propertyIsEnumerable,iH=(e,t)=>{var n={};for(var o in e)nH.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&_y)for(var o of _y(e))t.indexOf(o)<0&&oH.call(e,o)&&(n[o]=e[o]);return n};function rH(e,t,n={}){const o=n,{eventFilter:i=G_}=o,r=iH(o,["eventFilter"]);return ze(e,Qz(i,t),r)}var aH=Object.defineProperty,sH=Object.defineProperties,lH=Object.getOwnPropertyDescriptors,vu=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,Y_=Object.prototype.propertyIsEnumerable,Cy=(e,t,n)=>t in e?aH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cH=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&Cy(e,n,t[n]);if(vu)for(var n of vu(t))Y_.call(t,n)&&Cy(e,n,t[n]);return e},uH=(e,t)=>sH(e,lH(t)),dH=(e,t)=>{var n={};for(var o in e)q_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&vu)for(var o of vu(e))t.indexOf(o)<0&&Y_.call(e,o)&&(n[o]=e[o]);return n};function bu(e,t,n={}){const o=n,{eventFilter:i}=o,r=dH(o,["eventFilter"]),{eventFilter:a,pause:s,resume:l,isActive:c}=eH(i);return{stop:rH(e,t,uH(cH({},r),{eventFilter:a})),pause:s,resume:l,isActive:c}}function hH(e,t,n){return ze(e,(o,i,r)=>{o&&t(o,i,r)},n)}const ky=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Sy="__vueuse_ssr_handlers__";ky[Sy]=ky[Sy]||{};var $y;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})($y||($y={}));function pH(){const e=fe([]);return e.value.set=t=>{t&&e.value.push(t)},ak(()=>{e.value.length=0}),e}var fH=Object.defineProperty,Ey=Object.getOwnPropertySymbols,gH=Object.prototype.hasOwnProperty,mH=Object.prototype.propertyIsEnumerable,Ty=(e,t,n)=>t in e?fH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vH=(e,t)=>{for(var n in t||(t={}))gH.call(t,n)&&Ty(e,n,t[n]);if(Ey)for(var n of Ey(t))mH.call(t,n)&&Ty(e,n,t[n]);return e};const bH={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};vH({linear:tH},bH);var dh={},ja={},Wa={},Oy;function eg(){if(Oy)return Wa;Oy=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.HostType=void 0;var e;return function(t){t.domain="domain",t.socket="socket",t.IPv4="IPv4",t.IPv6="IPv6"}(e||(Wa.HostType=e={})),Wa}var fo={},Iy;function yH(){if(Iy)return fo;Iy=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.fullHostName=t,fo.encode=n,fo.decode=o,fo.hasText=i,fo.validateUrl=r,fo.parseHost=a;const e=eg();function t(s,l){let c="";return s.name&&(c=s.type===e.HostType.IPv4||s.type===e.HostType.IPv6?s.name:n(s.name,l??{})),s.port&&(c+=`:${s.port}`),c}function n(s,l){return s=encodeURIComponent(s),l.plusForSpace&&(s=s.replace(/%20/g,"+")),l.encodeDollar?s:s.replace(/%24/g,"$")}function o(s){return decodeURIComponent(s.replace(/\+/g,"%20"))}function i(s){return typeof s=="string"&&/\S/.test(s)}function r(s){const l=s.search(/[^a-z0-9-._:\/?[\]@!$&'()*+,;=%~]/i);if(l>=0){const c=JSON.stringify(s[l]).replace(/^"|"$/g,"'");throw new Error(`Invalid URL character ${c} at position ${l}`)}}function a(s,l){if(l){if(typeof s!="string")throw new TypeError(`Invalid "host" parameter: ${JSON.stringify(s)}`);s=s.trim()}let c,u;if(s[0]==="["?(c=s.match(/((\[[0-9a-z:%_]{2,45}])(?::(-?[0-9a-z]+))?)/i),u=!0):l?c=s.match(/(([a-z0-9.$/\- _]*)(?::(-?[0-9a-z]+))?)/i):c=s.match(/(([a-z0-9.+$%\-_]*)(?::(-?[0-9a-z]+))?)/i),c){const d={};if(c[2]&&(u?(d.name=c[2],d.type=e.HostType.IPv6):c[2].match(/([0-9]{1,3}\.){3}[0-9]{1,3}/)?(d.name=c[2],d.type=e.HostType.IPv4):(d.name=l?c[2]:o(c[2]),d.type=d.name.match(/\/|.*\.sock$/i)?e.HostType.socket:e.HostType.domain)),c[3]){const h=c[3],p=parseInt(h);if(p>0&&p<65536&&p.toString()===h)d.port=p;else throw new Error(`Invalid port: ${JSON.stringify(h)}. Valid port range is: [1...65535]`)}if(d.name||d.port)return Object.defineProperty(d,"toString",{value:h=>t(d,h),enumerable:!1}),d}return null}return fo}var Py;function xH(){if(Py)return ja;Py=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.ConnectionString=void 0;const e=eg(),t=yH(),n='Invalid "defaults" parameter: ';class o{get host(){return this.hosts?.[0].toString()}get hostname(){return this.hosts?.[0].name}get port(){return this.hosts?.[0].port}get type(){return this.hosts?.[0].type}constructor(r,a){if(r=r??"",typeof r!="string")throw new TypeError(`Invalid connection string: ${JSON.stringify(r)}`);if(typeof(a??{})!="object")throw new TypeError(n+JSON.stringify(a));r=r.trim(),(0,t.validateUrl)(r);let s=r.match(/^(.*)?:\/\//);if(s){const c=s[1];if(c){const u=c.match(/^([a-z]+[a-z0-9+-.:]*)/i);if(c&&(!u||u[1]!==c))throw new Error(`Invalid protocol name: ${c}`);this.protocol=c}r=r.substring(s[0].length)}if(s=r.match(/^([\w-_.+!*'()$%]*):?([\w-_.+!*'()$%~]*)@/),s&&(s[1]&&(this.user=(0,t.decode)(s[1])),s[2]&&(this.password=(0,t.decode)(s[2])),r=r.substring(s[0].length)),r[0]!=="/"){const c=r.search(/[\/?]/);(c===-1?r:r.substring(0,c)).split(",").forEach(d=>{const h=(0,t.parseHost)(d);h&&(this.hosts||(this.hosts=[]),this.hosts.push(h))}),c>=0&&(r=r.substring(c))}s=r.match(/\/([\w-_.+!*'()$%]+)/g),s&&(this.path=s.map(c=>(0,t.decode)(c.substring(1))));const l=r.indexOf("?");if(l!==-1&&(r=r.substring(l+1),s=r.match(/([\w-_.+!*'()$%]+)=([\w-_.+!*'()$%,]+)/g),s)){const c={};s.forEach(u=>{const d=u.split("="),h=(0,t.decode)(d[0]),p=d[1].split(",").map(t.decode);h in c?Array.isArray(c[h])?c[h].push(...p):c[h]=[c[h],...p]:c[h]=p.length>1?p:p[0]}),this.params=c}a&&this.setDefaults(a)}static parseHost(r){return(0,t.parseHost)(r,!0)}toString(r){let a=this.protocol?`${this.protocol}://`:"";const s=r||{};if(this.user||this.password){if(this.user&&(a+=(0,t.encode)(this.user,s)),this.password){a+=":";const l=s.passwordHash;if(l){const c=typeof l=="string"&&l[0]||"#";a+=c.repeat(this.password.length)}else a+=(0,t.encode)(this.password,s)}a+="@"}if(Array.isArray(this.hosts)&&(a+=this.hosts.map(l=>(0,t.fullHostName)(l,r)).join()),Array.isArray(this.path)&&this.path.forEach(l=>{a+=`/${(0,t.encode)(l,s)}`}),this.params&&typeof this.params=="object"){const l=[];for(const c in this.params){let u=this.params[c];u=Array.isArray(u)?u:[u],u=u.map(d=>(0,t.encode)(typeof d=="string"?d:JSON.stringify(d),s)).join(),s.plusForSpace&&(u=u.replace(/%20/g,"+")),l.push(`${(0,t.encode)(c,s)}=${u}`)}l.length&&(a+=`?${l.join("&")}`)}return a}setDefaults(r){if(!r||typeof r!="object")throw new TypeError(n+JSON.stringify(r));if(!("protocol"in this)&&(0,t.hasText)(r.protocol)&&(this.protocol=r.protocol&&r.protocol.trim()),Array.isArray(r.hosts)){const a=Array.isArray(this.hosts)?this.hosts:[];r.hosts.filter(l=>l&&typeof l=="object").forEach(l=>{const u={name:(0,t.hasText)(l.name)?l.name.trim():void 0,port:l.port,type:l.type};let d=!1;for(let h=0;h<a.length;h++){const p=(0,t.fullHostName)(a[h]),m=(0,t.fullHostName)(u);if(p.toLowerCase()===m.toLowerCase()){d=!0;break}}if(!d){const h={};if(u.name)if(u.type&&u.type in e.HostType)h.name=u.name,h.type=u.type;else{const m=(0,t.parseHost)(u.name,!0);m&&(h.name=m.name,h.type=m.type)}const p=u.port;typeof p=="number"&&p>0&&p<65536&&(h.port=p),(h.name||h.port)&&(Object.defineProperty(h,"toString",{value:m=>(0,t.fullHostName)(h,m)}),a.push(h))}}),a.length&&(this.hosts=a)}if(!("user"in this)&&(0,t.hasText)(r.user)&&(this.user=r.user.trim()),!("password"in this)&&(0,t.hasText)(r.password)&&(this.password=r.password.trim()),!("path"in this)&&Array.isArray(r.path)){const a=r.path.filter(t.hasText);a.length&&(this.path=a)}if(r.params&&typeof r.params=="object"&&Object.keys(r.params).length)if(this.params&&typeof this.params=="object")for(const s in r.params)s in this.params||(this.params[s]=r.params[s]);else{this.params={};for(const s in r.params)this.params[s]=r.params[s]}return this}}return ja.ConnectionString=o,function(){["setDefaults","toString"].forEach(i=>{const r=Object.getOwnPropertyDescriptor(o.prototype,i);r.enumerable=!1,Object.defineProperty(o.prototype,i,r)})}(),ja}var Ay;function wH(){return Ay||(Ay=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HostType=e.ConnectionString=void 0;var t=xH();Object.defineProperty(e,"ConnectionString",{enumerable:!0,get:function(){return t.ConnectionString}});var n=eg();Object.defineProperty(e,"HostType",{enumerable:!0,get:function(){return n.HostType}})}(dh)),dh}var Ql=wH();const Ry=0,Dy=1,_H=O({__name:"AdvancedJDBCUrlGroup",props:{property:{}},setup(e){const t=ci(()=>ui(()=>Promise.resolve().then(()=>mi),void 0,import.meta.url)),n=e,o=xt(Vt),i=o.useStore(d=>li(d.values));function r(d){try{return new Ql.ConnectionString(d),!0}catch{return!1}}const a=I(()=>i.value[n.property.ui.urlPropertyId]),s=I(()=>Qf(i.value,Object.values(li(n.property.ui.urlPartPropertyIdMapping)).filter(d=>d!==n.property.ui.urlPropertyId))),l=[],c=bu(a,async d=>{const h=n.property.ui.isDelimitedBySemicolons?d?.replace(";","?").replaceAll(";","&"):d;if(h&&r(h)){const p=new Ql.ConnectionString(h);l[Dy]?.pause(),Object.entries(n.property.ui.urlPartPropertyIdMapping).forEach(([m,f])=>{m==="searchParams"?Object.entries(f).forEach(([b,v])=>{p.params?.[b]&&Object.keys(i.value).includes(v)&&o.setFieldValue(v,p.params[b])}):m==="pathname"?Object.keys(i.value).includes(f)&&o.setFieldValue(f,p.path?.[0]):m==="username"?Object.keys(i.value).includes(f)&&o.setFieldValue(f,p.user):p[m]&&Object.keys(i.value).includes(f)&&o.setFieldValue(f,p[m])}),await oo(),l[Dy]?.resume()}});l.push(c);const u=bu([s,()=>n.property.ui],async([d,h],[p,m])=>{l[Ry]?.pause();let f={protocol:z_(h.protocol,":")};if(a.value){const y=h.isDelimitedBySemicolons?a.value.replace(";","?").replaceAll(";","&"):a.value;if(r(y)&&Jf(m,h)){const x=new Ql.ConnectionString(y);for(const _ of["protocol","user","password","hosts","port","path","params"])f={...f,[_]:x[_]}}}const b={};Object.entries(h.urlPartPropertyIdMapping).forEach(([y,x])=>{y==="searchParams"?Object.entries(x).forEach(([_,k])=>{Object.keys(d).includes(k)?f={...f,params:{...f.params,[_]:d[k]}}:f={...f,params:{...f.params,[_]:k}}}):y==="hostname"?d[x]&&(b.name=d[x],f={...f,hosts:[b]}):y==="port"?d[x]&&(b.port=d[x],f={...f,hosts:[b]}):y==="username"?d[x]&&(f={...f,user:d[x]}):y==="pathname"?d[x]&&(f={...f,path:[d[x]]}):d[x]&&(f={...f,[y]:d[x]})});const v=new Ql.ConnectionString(null,f);o.setFieldValue(h.urlPropertyId,h.isDelimitedBySemicolons?v.toString().replace("?",";").replaceAll("&",";"):v.toString()),await oo(),l[Ry]?.resume()});return l.push(u),(d,h)=>(w(),E(g(t),{class:"border border-gray-200 rounded-lg p-3 mb-4","config-map":n.property,"base-key":n.property.id.split(".")[0]},null,8,["config-map","base-key"]))}}),CH=Object.assign(_H,{__name:"AdvancedJDBCUrlGroup"}),Vy=0,My=1,kH=O({__name:"JDBCUrlGroup",props:{property:{}},setup(e){const t=ci(()=>ui(()=>Promise.resolve().then(()=>mi),void 0,import.meta.url)),n=e,o=xt(Vt),i=o.useStore(u=>li(u.values)),r=I(()=>i.value[n.property.ui.urlPropertyId]),a=I(()=>Qf(i.value,Object.values(li(n.property.ui.urlPartPropertyIdMapping)).filter(u=>u!==n.property.ui.urlPropertyId))),s=[],l=bu(r,async u=>{const d=n.property.ui.isDelimitedBySemicolons?u?.replace(";","?").replaceAll(";","&"):u;if(d&&URL.canParse(d)){const h=new URL(d);s[My]?.pause(),Object.entries(n.property.ui.urlPartPropertyIdMapping).forEach(([p,m])=>{if(p==="searchParams")Object.entries(m).forEach(([f,b])=>{h.searchParams.get(f)&&Object.keys(i.value).includes(b)&&o.setFieldValue(b,h.searchParams.get(f))});else{const f=h[p];f&&Object.keys(i.value).includes(m)&&o.setFieldValue(m,p==="pathname"?z_(f,"/"):f)}}),await oo(),s[My]?.resume()}});s.push(l);const c=bu([a,()=>n.property.ui],async([u,d],[h,p])=>{s[Vy]?.pause();let m=new URL(`${d.protocol}//`);if(r.value){const f=d.isDelimitedBySemicolons?r.value.replace(";","?").replaceAll(";","&"):r.value;URL.canParse(f)&&Jf(p,d)&&(m=new URL(f))}Object.entries(d.urlPartPropertyIdMapping).forEach(([f,b])=>{f==="searchParams"?Object.entries(b).forEach(([v,y])=>{Object.keys(u).includes(y)?m.searchParams.set(v,u[y]):m.searchParams.set(v,y)}):u[b]&&(m[f]=u[b])}),o.setFieldValue(d.urlPropertyId,d.isDelimitedBySemicolons?m.toString().replace("?",";").replaceAll("&",";"):m.toString()),await oo(),s[Vy]?.resume()});return s.push(c),(u,d)=>(w(),E(g(t),{class:"border border-gray-200 rounded-lg p-3 mb-4","config-map":n.property,"base-key":n.property.id.split(".")[0]},null,8,["config-map","base-key"]))}}),SH=Object.assign(kH,{__name:"JDBCUrlGroup"}),$H=O({__name:"NestedCollapse",props:{property:{}},setup(e){const t=ci(()=>ui(()=>Promise.resolve().then(()=>mi),void 0,import.meta.url)),n=fe([]);return(o,i)=>(w(),E(g(zE),{modelValue:g(n),"onUpdate:modelValue":i[0]||(i[0]=r=>_0(n)?n.value=r:null),collapsible:""},{default:C(()=>[(w(!0),M(Se,null,Ie(e.property.panels,r=>(w(),E(g(OE),{key:r.id,value:r.id},{default:C(()=>[j(g(DE),null,{default:C(()=>[Ne(se(r.header)+" ",1),j(g(RE),null,{default:C(()=>[j(g(U_),{class:"w-4 h-4 transition-transform"})]),_:1})]),_:2},1024),j(g(IE),null,{default:C(()=>[j(g(t),{"config-map":r.configMap,"base-key":e.property.id},null,8,["config-map","base-key"])]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]))}}),EH=Object.assign($H,{__name:"NestedCollapse"}),TH=O({__name:"ApiSelect",props:{field:{},property:{}},async setup(e){let t,n;const o=xt(Vt),i=I(()=>!!e.property.ui?.isMultiple),{data:r}=([t,n]=na(()=>Xi(`${e.property.id}_metadata`,()=>{const h=o.getFieldValue("credential_guid_body"),{metadataTemplateKey:p,metadataTransformerTemplateKey:m}=e.property.ui??{};return $fetch("/workflows/v1/metadata",{method:"POST",body:{...h&&h,...p&&{type:p},...p&&{database:p},...m&&{metadataTransformerTemplateKey:m}}})})),t=await t,n(),t);function a(h,p=null){return h.map(m=>{const f=p?`${p}:${m.value}`:m.value;return{value:f,label:m.title,children:m.children?a(m.children,f):void 0}})}const s=I(()=>r.value?a(r.value.data):[]),c=fe((h=>{const p=[],m=(f,b=[])=>{Array.isArray(f)?b.length>0&&p.push(b.join(":")):typeof f=="object"&&f!==null&&Object.keys(f).forEach(v=>{m(f[v],[...b,v])})};if(h)if(typeof h=="string")try{m(JSON.parse(h))}catch{p.push(h)}else m(h);return p})(e.field.state.value)),u=h=>{const p={};return h.forEach(m=>{const f=m.split(":");let b=p;f.forEach((v,y)=>{b[v]||(b[v]={}),y!==f.length-1&&(b=b[v])})}),p},d=h=>{const p=Array.isArray(h)?h:[h].filter(Boolean);e.field.handleChange(u(p)),c.value=p};return(h,p)=>(w(),E(g(fi),{isTree:"",multiple:g(i),options:g(s),modelValue:g(c),"onUpdate:modelValue":d},null,8,["multiple","options","modelValue"]))}}),OH=Object.assign(TH,{__name:"ApiSelect"}),IH={class:"flex flex-col gap-y-1"},PH={class:"text-gray-600"},AH=["href"],RH=O({__name:"Checkbox",props:{field:{},property:{}},setup(e){const t=I(()=>e.property?.ui),n=o=>{e.field.handleChange(o.checked),e.field.handleBlur()};return(o,i)=>(w(),M("div",IH,[j(g(K1),{checked:e.field.state.value,"data-test-id":e.property?.id,onCheckedChange:n},{default:C(()=>[N("span",PH,se(g(t)?.title),1),g(t)?.link?(w(),M("a",{key:0,href:g(t).link.url,target:"_blank",class:"hover:underline"},se(g(t).link.text),9,AH)):oe("",!0)]),_:1},8,["checked","data-test-id"])]))}}),DH=Object.assign(RH,{__name:"Checkbox"});function hh(e,t){return e-t*Math.floor(e/t)}const K_=1721426;function ec(e,t,n,o){t=tg(e,t);let i=t-1,r=-2;return n<=2?r=0:Nc(t)&&(r=-1),K_-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+r+o)}function Nc(e){return e%4===0&&(e%100!==0||e%400===0)}function tg(e,t){return e==="BC"?1-t:t}function VH(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const MH={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]};class Xr{fromJulianDay(t){let n=t,o=n-K_,i=Math.floor(o/146097),r=hh(o,146097),a=Math.floor(r/36524),s=hh(r,36524),l=Math.floor(s/1461),c=hh(s,1461),u=Math.floor(c/365),d=i*400+a*100+l*4+u+(a!==4&&u!==4?1:0),[h,p]=VH(d),m=n-ec(h,p,1,1),f=2;n<ec(h,p,3,1)?f=0:Nc(p)&&(f=1);let b=Math.floor(((m+f)*12+373)/367),v=n-ec(h,p,b,1)+1;return new Qr(h,p,b,v)}toJulianDay(t){return ec(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return MH[Nc(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Nc(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}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"}}function NH(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function LH(e){return $o(Date.now(),e)}function FH(e){return WH(LH(e))}function X_(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function BH(e,t){return Ny(e)-Ny(t)}function Ny(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let ph=null,zH=!1;function ng(){return ph==null&&(ph=new Intl.DateTimeFormat().resolvedOptions().timeZone),ph}function Z_(){return zH}function Zr(e){e=eo(e,new Xr);let t=tg(e.era,e.year);return J_(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function J_(e,t,n,o,i,r,a){let s=new Date;return s.setUTCHours(o,i,r,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function bp(e,t){if(t==="UTC")return 0;if(e>0&&t===ng()&&!Z_())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:r,minute:a,second:s}=Q_(e,t);return J_(n,o,i,r,a,s,0)-Math.floor(e/1e3)*1e3}const Ly=new Map;function Q_(e,t){let n=Ly.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"}),Ly.set(t,n));let o=n.formatToParts(new Date(e)),i={};for(let r of o)r.type!=="literal"&&(i[r.type]=r.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 Fy=864e5;function HH(e,t,n,o){return(n===o?[n]:[n,o]).filter(r=>jH(e,t,r))}function jH(e,t,n){let o=Q_(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 wo(e,t,n="compatible"){let o=Jr(e);if(t==="UTC")return Zr(o);if(t===ng()&&n==="compatible"&&!Z_()){o=eo(o,new Xr);let l=new Date,c=tg(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=Zr(o),r=bp(i-Fy,t),a=bp(i+Fy,t),s=HH(o,t,i-r,i-a);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-r,i-a);case"compatible":case"later":return Math.max(i-r,i-a);case"reject":throw new RangeError("No such absolute time found")}}function eC(e,t,n="compatible"){return new Date(wo(e,t,n))}function $o(e,t){let n=bp(e,t),o=new Date(e+n),i=o.getUTCFullYear(),r=o.getUTCMonth()+1,a=o.getUTCDate(),s=o.getUTCHours(),l=o.getUTCMinutes(),c=o.getUTCSeconds(),u=o.getUTCMilliseconds();return new Ls(i<1?"BC":"AD",i<1?-i+1:i,r,a,t,n,s,l,c,u)}function WH(e){return new Qr(e.calendar,e.era,e.year,e.month,e.day)}function Jr(e,t){let n=0,o=0,i=0,r=0;if("timeZone"in e)({hour:n,minute:o,second:i,millisecond:r}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:o,second:i,millisecond:r}=t),new xu(e.calendar,e.era,e.year,e.month,e.day,n,o,i,r)}function eo(e,t){if(NH(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,Zi(o),o}function UH(e,t,n){if(e instanceof Ls)return e.timeZone===t?e:qH(e,t);let o=wo(e,t,n);return $o(o,t)}function GH(e){let t=Zr(e)-e.offset;return new Date(t)}function qH(e,t){let n=Zr(e)-e.offset;return eo($o(n,t),e.calendar)}const Ua=36e5;function rd(e,t){let n=e.copy(),o="hour"in n?ZH(n,t):0;yp(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,xp(n),tC(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,YH(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){let a=n.calendar.isInverseEra?.(n);n.year=i,n.month=a?1:n.calendar.getMonthsInYear(n),n.day=a?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let r=n.calendar.getMonthsInYear(n);return n.month>r&&(n.month=r,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function yp(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function xp(e){for(;e.month<1;)yp(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,yp(e,1)}function YH(e){for(;e.day<1;)e.month--,xp(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,xp(e)}function tC(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 Zi(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),tC(e)}function nC(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function oC(e,t){return rd(e,nC(t))}function og(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),Zi(n),n}function yu(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),XH(n),n}function KH(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=tc(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=tc(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=tc(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=tc(e.hour,24),t}function XH(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 tc(e,t){let n=e%t;return n<0&&(n+=t),n}function ZH(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,KH(e)}function ig(e,t,n,o){let i=e.copy();switch(t){case"era":{let r=e.calendar.getEras(),a=r.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=Eo(a,n,0,r.length-1,o?.round),i.era=r[a],Zi(i);break}case"year":i.calendar.isInverseEra?.(i)&&(n=-n),i.year=Eo(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=Eo(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=Eo(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),Zi(i),i}function iC(e,t,n,o){let i=e.copy();switch(t){case"hour":{let r=e.hour,a=0,s=23;if(o?.hourCycle===12){let l=r>=12;a=l?12:0,s=l?23:11}i.hour=Eo(r,n,a,s,o?.round);break}case"minute":i.minute=Eo(e.minute,n,0,59,o?.round);break;case"second":i.second=Eo(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=Eo(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function Eo(e,t,n,o,i=!1){if(i){e+=Math.sign(t),e<n&&(e=o);let r=Math.abs(t);t>0?e=Math.ceil(e/r)*r:e=Math.floor(e/r)*r,e>o&&(e=n)}else e+=t,e<n?e=o-(n-e-1):e>o&&(e=n+(e-o-1));return e}function rC(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=rd(Jr(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=wo(i,e.timeZone)}else n=Zr(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=$o(n,e.timeZone);return eo(o,e.calendar)}function JH(e,t){return rC(e,nC(t))}function QH(e,t,n,o){switch(t){case"hour":{let i=0,r=23;if(o?.hourCycle===12){let m=e.hour>=12;i=m?12:0,r=m?23:11}let a=Jr(e),s=eo(yu(a,{hour:i}),new Xr),l=[wo(s,e.timeZone,"earlier"),wo(s,e.timeZone,"later")].filter(m=>$o(m,e.timeZone).day===s.day)[0],c=eo(yu(a,{hour:r}),new Xr),u=[wo(c,e.timeZone,"earlier"),wo(c,e.timeZone,"later")].filter(m=>$o(m,e.timeZone).day===c.day).pop(),d=Zr(e)-e.offset,h=Math.floor(d/Ua),p=d%Ua;return d=Eo(h,n,Math.floor(l/Ua),Math.floor(u/Ua),o?.round)*Ua+p,eo($o(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return iC(e,t,n,o);case"era":case"year":case"month":case"day":{let i=ig(Jr(e),t,n,o),r=wo(i,e.timeZone);return eo($o(r,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function e7(e,t,n){let o=Jr(e),i=yu(og(o,t),t);if(i.compare(o)===0)return e;let r=wo(i,e.timeZone,n);return eo($o(r,e.timeZone),e.calendar)}function t7(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 aC(e){let t=eo(e,new Xr),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 sC(e){return`${aC(e)}T${t7(e)}`}function n7(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),r=`${t}${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return i!==0&&(r+=`:${String(i).padStart(2,"0")}`),r}function o7(e){return`${sC(e)}${n7(e.offset)}[${e.timeZone}]`}function rg(e){let t=typeof e[0]=="object"?e.shift():new Xr,n;if(typeof e[0]=="string")n=e.shift();else{let a=t.getEras();n=a[a.length-1]}let o=e.shift(),i=e.shift(),r=e.shift();return[t,n,o,i,r]}class Qr{#n;constructor(...t){let[n,o,i,r,a]=rg(t);this.calendar=n,this.era=o,this.year=i,this.month=r,this.day=a,Zi(this)}copy(){return this.era?new Qr(this.calendar,this.era,this.year,this.month,this.day):new Qr(this.calendar,this.year,this.month,this.day)}add(t){return rd(this,t)}subtract(t){return oC(this,t)}set(t){return og(this,t)}cycle(t,n,o){return ig(this,t,n,o)}toDate(t){return eC(this,t)}toString(){return aC(this)}compare(t){return X_(this,t)}}class xu{#n;constructor(...t){let[n,o,i,r,a]=rg(t);this.calendar=n,this.era=o,this.year=i,this.month=r,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Zi(this)}copy(){return this.era?new xu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new xu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return rd(this,t)}subtract(t){return oC(this,t)}set(t){return og(yu(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return ig(this,t,n,o);default:return iC(this,t,n,o)}}toDate(t,n){return eC(this,t,n)}toString(){return sC(this)}compare(t){let n=X_(this,t);return n===0?BH(this,Jr(t)):n}}class Ls{#n;constructor(...t){let[n,o,i,r,a]=rg(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=o,this.year=i,this.month=r,this.day=a,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,Zi(this)}copy(){return this.era?new Ls(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ls(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return rC(this,t)}subtract(t){return JH(this,t)}set(t,n){return e7(this,t,n)}cycle(t,n,o){return QH(this,t,n,o)}toDate(){return GH(this)}toString(){return o7(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-UH(t,this.timeZone).toDate().getTime()}}const i7=O({__name:"Date",props:{field:{},property:{}},setup(e){const t=ng(),n=I(()=>e.property?.ui),o=I(()=>FH(t)),i=I(()=>o.value.add({days:n.value?.min??0})),r=I(()=>o.value.add({days:n.value?.max??0})),a=I(()=>o.value.add({days:n.value?.default??0})),s=h=>{const p=h;return p.compare(i.value)<0||p.compare(r.value)>0},l=h=>{const p=parseInt(h,10);if(!p)return null;const m=new Date(p*1e3);return new Qr(m.getUTCFullYear(),m.getUTCMonth()+1,m.getUTCDate())},c=h=>Math.floor(h.toDate("UTC").getTime()/1e3).toString(),u=I(()=>{const h=e.field.state.value;if(!h||parseInt(h,10)===0)return[];const p=l(h);return p?[p]:[]}),d=h=>{const[p]=h.value;p&&(e.field.handleChange(c(p)),e.field.handleBlur())};return ta(()=>{const h=e.field.state.value;(!h||parseInt(h,10)===0)&&(e.field.handleChange(c(a.value)),e.field.handleBlur())}),(h,p)=>(w(),E(g(PF),{"model-value":g(u),"is-date-unavailable":s,"data-test-id":e.property?.id,onValueChange:d},null,8,["model-value","data-test-id"]))}}),r7=Object.assign(i7,{__name:"Date"}),a7=O({__name:"InputNumber",props:{field:{},property:{}},setup(e){const t=e.field.state.value,n=fe((()=>{if(t==null||t==="")return"";const i=typeof t=="string"?parseFloat(t):t;return isNaN(i)?"":String(i)})()),o=i=>{n.value=i;const r=parseFloat(i);e.field.handleChange(isNaN(r)?void 0:r),e.field.handleBlur()};return(i,r)=>(w(),E(g(n3),{"model-value":g(n),min:e.property?.ui?.min,max:e.property?.ui?.max,step:e.property?.ui?.step,disabled:e.property?.ui?.disabled,"data-test-id":e.property?.id,class:"w-full","onUpdate:modelValue":o},null,8,["model-value","min","max","step","disabled","data-test-id"]))}}),s7=Object.assign(a7,{__name:"InputNumber"}),l7={key:0,class:"text-red-500"},c7={class:"max-h-[300px] overflow-y-auto overflow-x-hidden pr-1"},u7=["data-test-id"],d7={class:"flex-grow max-w-[calc(100%-30px)]"},h7={key:0,class:"absolute right-0 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer p-1"},p7=O({__name:"InputRepeater",props:{property:{}},setup(e){const t=xt(Vt),n=pH(),o=u=>{const d=new Set;return u.filter(h=>h.trim()===""?!0:d.has(h.trim())?!1:(d.add(h.trim()),!0))},i=fe(!1),r=u=>{const d=e.property.ui.maxItems;d!==void 0&&u.state.value.length>=d||(u.pushValue(""),i.value||oo(()=>{const h=n.value[u.state.value.length-1];h&&h.focus()}))},a=(u,d)=>{const h=e.property.ui.minItems??1;u.state.value.length>h&&u.removeValue(d)},s=(u,d)=>{d===u.state.value.length-1&&(i.value=!0,r(u),i.value=!1)},l=(u,d,h)=>{h.preventDefault();const m=(h.clipboardData?.getData("text")??"").split(/\r?\n|\r|,/).map(v=>v.trim()).filter(v=>v.length>0);if(m.length===0)return;const f=[...u.state.value];f.splice(d,1,...m);const b=o(f);t.setFieldValue(e.property.id,b)},c=(u,d,h)=>{const p=[...u.state.value];p[d]=h,t.setFieldValue(e.property.id,p)};return ta(()=>{const u=t.getFieldValue(e.property.id),d=e.property.ui.maxItems;if(!u||u.length===0){t.setFieldValue(e.property.id,[""]);return}u[u.length-1]!==""&&(d===void 0||u.length<d)&&t.setFieldValue(e.property.id,[...u,""])}),(u,d)=>(w(),E(g(t).Field,{name:e.property.id,mode:"array"},{default:C(({field:h})=>[N("div",null,[N("div",null,[j(g(Bf),null,{default:C(()=>[Ne(se(e.property.ui?.label)+" ",1),e.property?.required?(w(),M("span",l7," * ")):oe("",!0)]),_:1})]),N("div",c7,[(w(!0),M(Se,null,Ie(h.state.value,(p,m)=>(w(),M("div",{key:m,"data-test-id":e.property.id,class:"relative flex items-center justify-between group mb-4"},[N("div",d7,[j(g(al),{ref_for:!0,ref:g(n).set,"model-value":h.state.value[m],placeholder:e.property.ui?.placeholder,"onUpdate:modelValue":f=>c(h,m,f),onFocus:()=>s(h,m),onPaste:f=>l(h,m,f),onKeydown:_h(ei(()=>r(h),["prevent"]),["enter"])},null,8,["model-value","placeholder","onUpdate:modelValue","onFocus","onPaste","onKeydown"])]),h.state.value.length>(e.property.ui.minItems??1)?(w(),M("div",h7,[j(g(ws),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>a(h,m)},null,8,["onClick"])])):oe("",!0)],8,u7))),128))])])]),_:1},8,["name"]))}}),f7=Object.assign(p7,{__name:"InputRepeater"}),g7=O({__name:"Evaluate",props:{property:{}},setup(e){const t=xt(Vt),n=I(()=>e.property.ui?.value);return hH(n,()=>{t?.setFieldValue(e.property.id,n.value)},{immediate:!0}),(o,i)=>(w(),E(At(null)))}}),m7=Object.assign(g7,{__name:"Evaluate"}),v7=O({name:"ConnectionTree",__name:"ConnectionTree",props:Rg({isAdmin:{type:Boolean,default:!1},connections:{},databases:{default:()=>[]},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:Rg(["change"],["update:modelValue"]),setup(e,{emit:t}){const n=sk(e,"modelValue"),o=t,i=l=>!0,r=I(()=>{let l=e.connections.filter(c=>e.isAdmin?i():!0).map(c=>{const u=e.databases.filter(d=>d.attributes.connectionQualifiedName===c.attributes.qualifiedName).map(d=>({label:d.attributes.displayName||d.attributes.name||"",value:d.attributes.qualifiedName,disabled:!1}));return{label:c.attributes.displayName||c.attributes.name||"",value:c.attributes.qualifiedName,connector:c.attributes.connectorName,children:u}});return l=l.filter(c=>c.children&&c.children.length>0),l.sort((c,u)=>(c.connector||"").localeCompare(u.connector||"")),l}),a=I(()=>n.value?[n.value]:[]);function s(l){const c=Array.isArray(l)?l[0]:l;n.value=c,o("change",c)}return(l,c)=>(w(),E(g(fi),{isTree:"","model-value":g(a),options:g(r),placeholder:e.placeholder??"Select a connection",variant:"default","onUpdate:modelValue":s},null,8,["model-value","options","placeholder"]))}}),b7=Object.assign(v7,{__name:"ConnectionTree"}),y7={key:0,class:"dsn-tree-map-shell flex flex-col gap-4 p-4 rounded-md"},x7={class:"flex flex-col gap-2"},w7={key:0,class:"font-semibold text-gray-800"},_7={key:1,class:"text-sm text-new-gray-600"},C7={class:"flex gap-4"},k7={class:"flex items-center w-1/2 gap-2 text-sm text-gray-700"},S7={class:"flex items-center w-1/2 gap-2 text-sm text-gray-700"},$7={class:"flex items-center gap-3"},E7={class:"flex-1"},T7={class:"flex-1"},O7=["disabled","onClick"],I7={key:0,class:"mt-1 text-xs text-red-500"},P7={key:1,class:"my-1 border-t border-new-gray-200"},A7=["disabled"],R7=O({name:"DsnTreeMapWidget",__name:"DsnTreeMap",props:{property:{},field:{}},setup(e){const t=I(()=>e.property.ui?.config),n=xt(Vt,null),o=[{attributes:{qualifiedName:"default/snowflake/1234567890",displayName:"Production Snowflake",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321",displayName:"Staging Snowflake",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/bigquery/1234567890",displayName:"Analytics BigQuery",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/postgres/8938390",displayName:"Dev Postgres",connectorName:"postgres"}}],i=[{attributes:{qualifiedName:"default/snowflake/1234567890/ANALYTICS_PROD",displayName:"ANALYTICS_PROD",connectionQualifiedName:"default/snowflake/1234567890",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/1234567890/RAW",displayName:"RAW",connectionQualifiedName:"default/snowflake/1234567890",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321/ANALYTICS_STAGING",displayName:"ANALYTICS_STAGING",connectionQualifiedName:"default/snowflake/0987654321",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/bigquery/1234567890/analytics-prod",displayName:"analytics-prod",connectionQualifiedName:"default/bigquery/1234567890",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/bigquery/1234567890/marketing",displayName:"marketing",connectionQualifiedName:"default/bigquery/1234567890",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/postgres/8938390/app_db",displayName:"app_db",connectionQualifiedName:"default/postgres/8938390",connectorName:"postgres"}}],r=I(()=>e.property.ui?.connections??o),a=I(()=>e.property.ui?.databases??i),s=I(()=>{if(!n)return[];const x=n.getFieldValue("sql-connection-qualified-names");if(!x)return[];if(Array.isArray(x))return x;try{const _=JSON.parse(x);return Array.isArray(_)?_:[x]}catch{return[x]}}),l=I(()=>s.value.length?r.value.filter(x=>s.value.includes(x.attributes.qualifiedName)):r.value),u=fe((()=>{const x=e.field?.state?.value;if(!x)return[{id:1,dsn:"",connection:void 0}];let _={};try{_=typeof x=="string"?JSON.parse(x):x}catch{return[{id:1,dsn:"",connection:void 0}]}const k=Object.keys(_||{});return k.length?k.map(($,A)=>({id:A+1,dsn:$,connection:_[$]})):[{id:1,dsn:"",connection:void 0}]})()),d=fe(u.value.length+1),h=I(()=>{const x={};return u.value.forEach(_=>{const k=_.dsn.trim();k&&(x[k]=(x[k]||0)+1)}),Object.keys(x).filter(_=>x[_]>1)}),p=I(()=>u.value.every(x=>x.dsn.trim()&&x.connection)&&h.value.length===0);function m(){const x={};u.value.forEach(_=>{const k=_.dsn.trim();k&&_.connection&&(x[k]=_.connection)}),e.field.handleChange(JSON.stringify(x))}function f(x,_){const k=u.value.find($=>$.id===x);k&&(k.dsn=_,m())}function b(x,_){const k=u.value.find($=>$.id===x);k&&(k.connection=_,m())}function v(){u.value.push({id:d.value++,dsn:"",connection:void 0})}function y(x){u.value=u.value.filter(_=>_.id!==x),u.value.length===0&&u.value.push({id:d.value++,dsn:"",connection:void 0}),m()}return(x,_)=>{const k=b7;return g(t)?(w(),M("div",y7,[N("div",x7,[g(t).heading?(w(),M("h2",w7,se(g(t).heading),1)):oe("",!0),g(t).content?(w(),M("p",_7,se(g(t).content),1)):oe("",!0)]),N("div",C7,[N("div",k7,[N("span",null,se(g(t).inputLabel??"DSN"),1),g(t).inputHelpText?(w(),E(g(Xo),{key:0,title:g(t).inputHelpText},{default:C(()=>[j(g(mp),{class:"h-3.5 w-3.5 text-gray-400 cursor-pointer"})]),_:1},8,["title"])):oe("",!0)]),N("div",S7,[N("span",null,se(g(t).connectionLabel??"Connection"),1),g(t).connectionHelpText?(w(),E(g(Xo),{key:0,title:g(t).connectionHelpText},{default:C(()=>[j(g(mp),{class:"h-3.5 w-3.5 text-gray-400 cursor-pointer"})]),_:1},8,["title"])):oe("",!0)])]),(w(!0),M(Se,null,Ie(g(u),($,A)=>(w(),M("div",{key:$.id,class:"flex flex-col gap-1"},[N("div",$7,[N("div",E7,[j(g(al),{"model-value":$.dsn,placeholder:g(t).inputPlaceholder??"Enter DSN",variant:"default",state:"idle",class:L({"dsn-duplicate":g(h).includes($.dsn.trim())}),"onUpdate:modelValue":S=>f($.id,S)},null,8,["model-value","placeholder","class","onUpdate:modelValue"])]),N("div",T7,[j(k,{isAdmin:"","model-value":$.connection,connections:g(l),databases:g(a),placeholder:g(t).connectionPlaceholder??"Select connection",onChange:S=>b($.id,S)},null,8,["model-value","connections","databases","placeholder","onChange"])]),j(g(Xo),{title:"Remove Mapping"},{default:C(()=>[N("button",{type:"button",disabled:g(u).length===1,class:"p-1 text-gray-500 rounded hover:bg-new-gray-100 disabled:opacity-40 disabled:cursor-not-allowed",onClick:S=>y($.id)},[j(g(ws),{class:"h-4 w-4"})],8,O7)]),_:2},1024)]),g(h).includes($.dsn.trim())?(w(),M("div",I7," This DSN is duplicated. Please provide a unique name. ")):oe("",!0),A<g(u).length-1?(w(),M("div",P7)):oe("",!0)]))),128)),N("div",null,[j(g(Xo),{title:"Add Another Mapping"},{default:C(()=>[N("button",{type:"button",disabled:!g(p),class:"p-1 rounded border border-solid border-new-gray-300 text-gray-600 hover:bg-new-gray-100 disabled:opacity-40 disabled:cursor-not-allowed","aria-label":"Add Another Mapping",onClick:v},[j(g(vz),{class:"h-4 w-4"})],8,A7)]),_:1})])])):oe("",!0)}}}),D7=Object.assign($u(R7,[["__scopeId","data-v-08522bfa"]]),{__name:"DsnTreeMap"});function ag(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ir=ag();function lC(e){ir=e}const cC=/[&<>"']/,V7=new RegExp(cC.source,"g"),uC=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,M7=new RegExp(uC.source,"g"),N7={"&":"&","<":"<",">":">",'"':""","'":"'"},By=e=>N7[e];function Xt(e,t){if(t){if(cC.test(e))return e.replace(V7,By)}else if(uC.test(e))return e.replace(M7,By);return e}const L7=/(^|[^\[])\^/g;function Le(e,t){let n=typeof e=="string"?e:e.source;t=t||"";const o={replace:(i,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(L7,"$1"),n=n.replace(i,a),o},getRegex:()=>new RegExp(n,t)};return o}function zy(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const _s={exec:()=>null};function Hy(e,t){const n=e.replace(/\|/g,(r,a,s)=>{let l=!1,c=a;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),o=n.split(/ \|/);let i=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;i<o.length;i++)o[i]=o[i].trim().replace(/\\\|/g,"|");return o}function Ga(e,t,n){const o=e.length;if(o===0)return"";let i=0;for(;i<o&&e.charAt(o-i-1)===t;)i++;return e.slice(0,o-i)}function F7(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let o=0;o<e.length;o++)if(e[o]==="\\")o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&(n--,n<0))return o;return-1}function jy(e,t,n,o){const i=t.href,r=t.title?Xt(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){o.state.inLink=!0;const s={type:"link",raw:n,href:i,title:r,text:a,tokens:o.inlineTokens(a)};return o.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:r,text:Xt(a)}}function B7(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const o=n[1];return t.split(`
|
|
23
|
-
`).map(i=>{const r=i.match(/^\s+/);if(r===null)return i;const[a]=r;return a.length>=o.length?i.slice(o.length):i}).join(`
|
|
24
|
-
`)}class wu{options;rules;lexer;constructor(t){this.options=t||ir}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const o=n[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Ga(o,`
|
|
25
|
-
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const o=n[0],i=B7(o,n[3]||"");return{type:"code",raw:o,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let o=n[2].trim();if(/#$/.test(o)){const i=Ga(o,"#");(this.options.pedantic||!i||/ $/.test(i))&&(o=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:Ga(n[0],`
|
|
26
|
-
`)}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let o=Ga(n[0],`
|
|
27
|
-
`).split(`
|
|
28
|
-
`),i="",r="";const a=[];for(;o.length>0;){let s=!1;const l=[];let c;for(c=0;c<o.length;c++)if(/^ {0,3}>/.test(o[c]))l.push(o[c]),s=!0;else if(!s)l.push(o[c]);else break;o=o.slice(c);const u=l.join(`
|
|
29
|
-
`),d=u.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
30
|
-
$1`).replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}
|
|
31
|
-
${u}`:u,r=r?`${r}
|
|
32
|
-
${d}`:d;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=h,o.length===0)break;const p=a[a.length-1];if(p?.type==="code")break;if(p?.type==="blockquote"){const m=p,f=m.raw+`
|
|
33
|
-
`+o.join(`
|
|
34
|
-
`),b=this.blockquote(f);a[a.length-1]=b,i=i.substring(0,i.length-m.raw.length)+b.raw,r=r.substring(0,r.length-m.text.length)+b.text;break}else if(p?.type==="list"){const m=p,f=m.raw+`
|
|
35
|
-
`+o.join(`
|
|
36
|
-
`),b=this.list(f);a[a.length-1]=b,i=i.substring(0,i.length-p.raw.length)+b.raw,r=r.substring(0,r.length-m.raw.length)+b.raw,o=f.substring(a[a.length-1].raw.length).split(`
|
|
37
|
-
`);continue}}return{type:"blockquote",raw:i,tokens:a,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let o=n[1].trim();const i=o.length>1,r={type:"list",raw:"",ordered:i,start:i?+o.slice(0,-1):"",loose:!1,items:[]};o=i?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=i?o:"[*+-]");const a=new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`);let s=!1;for(;t;){let l=!1,c="",u="";if(!(n=a.exec(t))||this.rules.block.hr.test(t))break;c=n[0],t=t.substring(c.length);let d=n[2].split(`
|
|
38
|
-
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),h=t.split(`
|
|
39
|
-
`,1)[0],p=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):p?m=n[1].length+1:(m=n[2].search(/[^ ]/),m=m>4?1:m,u=d.slice(m),m+=n[1].length),p&&/^[ \t]*$/.test(h)&&(c+=h+`
|
|
40
|
-
`,t=t.substring(h.length+1),l=!0),!l){const v=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,m-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:\`\`\`|~~~)`),_=new RegExp(`^ {0,${Math.min(3,m-1)}}#`),k=new RegExp(`^ {0,${Math.min(3,m-1)}}<(?:[a-z].*>|!--)`,"i");for(;t;){const $=t.split(`
|
|
41
|
-
`,1)[0];let A;if(h=$,this.options.pedantic?(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),A=h):A=h.replace(/\t/g," "),x.test(h)||_.test(h)||k.test(h)||v.test(h)||y.test(h))break;if(A.search(/[^ ]/)>=m||!h.trim())u+=`
|
|
42
|
-
`+A.slice(m);else{if(p||d.replace(/\t/g," ").search(/[^ ]/)>=4||x.test(d)||_.test(d)||y.test(d))break;u+=`
|
|
43
|
-
`+h}!p&&!h.trim()&&(p=!0),c+=$+`
|
|
44
|
-
`,t=t.substring($.length+1),d=A.slice(m)}}r.loose||(s?r.loose=!0:/\n[ \t]*\n[ \t]*$/.test(c)&&(s=!0));let f=null,b;this.options.gfm&&(f=/^\[[ xX]\] /.exec(u),f&&(b=f[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:c,task:!!f,checked:b,loose:!1,text:u,tokens:[]}),r.raw+=c}r.items[r.items.length-1].raw=r.items[r.items.length-1].raw.trimEnd(),r.items[r.items.length-1].text=r.items[r.items.length-1].text.trimEnd(),r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){const c=r.items[l].tokens.filter(d=>d.type==="space"),u=c.length>0&&c.some(d=>/\n.*\n/.test(d.raw));r.loose=u}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const o=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:o,raw:n[0],href:i,title:r}}}table(t){const n=this.rules.block.table.exec(t);if(!n||!/[:|]/.test(n[2]))return;const o=Hy(n[1]),i=n[2].replace(/^\||\| *$/g,"").split("|"),r=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
45
|
-
`):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(o.length===i.length){for(const s of i)/^ *-+: *$/.test(s)?a.align.push("right"):/^ *:-+: *$/.test(s)?a.align.push("center"):/^ *:-+ *$/.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<o.length;s++)a.header.push({text:o[s],tokens:this.lexer.inline(o[s]),header:!0,align:a.align[s]});for(const s of r)a.rows.push(Hy(s,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const o=n[1].charAt(n[1].length-1)===`
|
|
46
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:o,tokens:this.lexer.inline(o)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:Xt(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const o=n[2].trim();if(!this.options.pedantic&&/^</.test(o)){if(!/>$/.test(o))return;const a=Ga(o.slice(0,-1),"\\");if((o.length-a.length)%2===0)return}else{const a=F7(n[2],"()");if(a>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],r="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],r=a[3])}else r=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(o)?i=i.slice(1):i=i.slice(1,-1)),jy(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(t,n){let o;if((o=this.rules.inline.reflink.exec(t))||(o=this.rules.inline.nolink.exec(t))){const i=(o[2]||o[1]).replace(/\s+/g," "),r=n[i.toLowerCase()];if(!r){const a=o[0].charAt(0);return{type:"text",raw:a,text:a}}return jy(o,r,o[0],this.lexer)}}emStrong(t,n,o=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&o.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!o||this.rules.inline.punctuation.exec(o)){const a=[...i[0]].length-1;let s,l,c=a,u=0;const d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+a);(i=d.exec(n))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(l=[...s].length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&a%3&&!((a+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const h=[...i[0]][0].length,p=t.slice(0,a+i.index+h+l);if(Math.min(a,l)%2){const f=p.slice(1,-1);return{type:"em",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}const m=p.slice(2,-2);return{type:"strong",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let o=n[2].replace(/\n/g," ");const i=/[^ ]/.test(o),r=/^ /.test(o)&&/ $/.test(o);return i&&r&&(o=o.substring(1,o.length-1)),o=Xt(o,!0),{type:"codespan",raw:n[0],text:o}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let o,i;return n[2]==="@"?(o=Xt(n[1]),i="mailto:"+o):(o=Xt(n[1]),i=o),{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let o,i;if(n[2]==="@")o=Xt(n[0]),i="mailto:"+o;else{let r;do r=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(r!==n[0]);o=Xt(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let o;return this.lexer.state.inRawBlock?o=n[0]:o=Xt(n[0]),{type:"text",raw:n[0],text:o}}}}const z7=/^(?:[ \t]*(?:\n|$))+/,H7=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,j7=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ll=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,W7=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,dC=/(?:[*+-]|\d{1,9}[.)])/,hC=Le(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,dC).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),sg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,U7=/^[^\n]+/,lg=/(?!\s*\])(?:\\.|[^\[\]\\])+/,G7=Le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",lg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),q7=Le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,dC).getRegex(),ad="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",cg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Y7=Le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",cg).replace("tag",ad).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pC=Le(sg).replace("hr",ll).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ad).getRegex(),K7=Le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pC).getRegex(),ug={blockquote:K7,code:H7,def:G7,fences:j7,heading:W7,hr:ll,html:Y7,lheading:hC,list:q7,newline:z7,paragraph:pC,table:_s,text:U7},Wy=Le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ll).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ad).getRegex(),X7={...ug,table:Wy,paragraph:Le(sg).replace("hr",ll).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wy).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ad).getRegex()},Z7={...ug,html:Le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",cg).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Le(sg).replace("hr",ll).replace("heading",` *#{1,6} *[^
|
|
47
|
-
]`).replace("lheading",hC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},fC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,J7=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gC=/^( {2,}|\\)\n(?!\s*$)/,Q7=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,cl="\\p{P}\\p{S}",e9=Le(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,cl).getRegex(),t9=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,n9=Le(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,cl).getRegex(),o9=Le("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,cl).getRegex(),i9=Le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,cl).getRegex(),r9=Le(/\\([punct])/,"gu").replace(/punct/g,cl).getRegex(),a9=Le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),s9=Le(cg).replace("(?:-->|$)","-->").getRegex(),l9=Le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",s9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_u=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,c9=Le(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",_u).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mC=Le(/^!?\[(label)\]\[(ref)\]/).replace("label",_u).replace("ref",lg).getRegex(),vC=Le(/^!?\[(ref)\](?:\[\])?/).replace("ref",lg).getRegex(),u9=Le("reflink|nolink(?!\\()","g").replace("reflink",mC).replace("nolink",vC).getRegex(),dg={_backpedal:_s,anyPunctuation:r9,autolink:a9,blockSkip:t9,br:gC,code:J7,del:_s,emStrongLDelim:n9,emStrongRDelimAst:o9,emStrongRDelimUnd:i9,escape:fC,link:c9,nolink:vC,punctuation:e9,reflink:mC,reflinkSearch:u9,tag:l9,text:Q7,url:_s},d9={...dg,link:Le(/^!?\[(label)\]\((.*?)\)/).replace("label",_u).getRegex(),reflink:Le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_u).getRegex()},wp={...dg,escape:Le(fC).replace("])","~|])").getRegex(),url:Le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},h9={...wp,br:Le(gC).replace("{2,}","*").getRegex(),text:Le(wp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},nc={normal:ug,gfm:X7,pedantic:Z7},qa={normal:dg,gfm:wp,breaks:h9,pedantic:d9};class bn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ir,this.options.tokenizer=this.options.tokenizer||new wu,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:nc.normal,inline:qa.normal};this.options.pedantic?(n.block=nc.pedantic,n.inline=qa.pedantic):this.options.gfm&&(n.block=nc.gfm,this.options.breaks?n.inline=qa.breaks:n.inline=qa.gfm),this.tokenizer.rules=n}static get rules(){return{block:nc,inline:qa}}static lex(t,n){return new bn(n).lex(t)}static lexInline(t,n){return new bn(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
48
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const o=this.inlineQueue[n];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],o=!1){this.options.pedantic&&(t=t.replace(/\t/g," ").replace(/^ +$/gm,""));let i,r,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length),i.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
49
|
-
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
50
|
-
`+i.raw,r.text+=`
|
|
51
|
-
`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
52
|
-
`+i.raw,r.text+=`
|
|
53
|
-
`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},l),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){r=n[n.length-1],o&&r?.type==="paragraph"?(r.raw+=`
|
|
54
|
-
`+i.raw,r.text+=`
|
|
55
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i),o=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&r.type==="text"?(r.raw+=`
|
|
56
|
-
`+i.raw,r.text+=`
|
|
57
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let o,i,r,a=t,s,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(o=u.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))){if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),i=n[n.length-1],i&&o.type==="text"&&i.type==="text"?(i.raw+=o.raw,i.text+=o.text):n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length),i=n[n.length-1],i&&o.type==="text"&&i.type==="text"?(i.raw+=o.raw,i.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,a,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let h;this.options.extensions.startInline.forEach(p=>{h=p.call({lexer:this},d),typeof h=="number"&&h>=0&&(u=Math.min(u,h))}),u<1/0&&u>=0&&(r=t.substring(0,u+1))}if(o=this.tokenizer.inlineText(r)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(c=o.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=o.raw,i.text+=o.text):n.push(o);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}}class Fs{options;parser;constructor(t){this.options=t||ir}space(t){return""}code({text:t,lang:n,escaped:o}){const i=(n||"").match(/^\S*/)?.[0],r=t.replace(/\n$/,"")+`
|
|
58
|
-
`;return i?'<pre><code class="language-'+Xt(i)+'">'+(o?r:Xt(r,!0))+`</code></pre>
|
|
59
|
-
`:"<pre><code>"+(o?r:Xt(r,!0))+`</code></pre>
|
|
60
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
61
|
-
${this.parser.parse(t)}</blockquote>
|
|
62
|
-
`}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
63
|
-
`}hr(t){return`<hr>
|
|
64
|
-
`}list(t){const n=t.ordered,o=t.start;let i="";for(let s=0;s<t.items.length;s++){const l=t.items[s];i+=this.listitem(l)}const r=n?"ol":"ul",a=n&&o!==1?' start="'+o+'"':"";return"<"+r+a+`>
|
|
65
|
-
`+i+"</"+r+`>
|
|
66
|
-
`}listitem(t){let n="";if(t.task){const o=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type==="paragraph"?(t.tokens[0].text=o+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=o+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" "}):n+=o+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
|
67
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
68
|
-
`}table(t){let n="",o="";for(let r=0;r<t.header.length;r++)o+=this.tablecell(t.header[r]);n+=this.tablerow({text:o});let i="";for(let r=0;r<t.rows.length;r++){const a=t.rows[r];o="";for(let s=0;s<a.length;s++)o+=this.tablecell(a[s]);i+=this.tablerow({text:o})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
69
|
-
<thead>
|
|
70
|
-
`+n+`</thead>
|
|
71
|
-
`+i+`</table>
|
|
72
|
-
`}tablerow({text:t}){return`<tr>
|
|
73
|
-
${t}</tr>
|
|
74
|
-
`}tablecell(t){const n=this.parser.parseInline(t.tokens),o=t.header?"th":"td";return(t.align?`<${o} align="${t.align}">`:`<${o}>`)+n+`</${o}>
|
|
75
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:o}){const i=this.parser.parseInline(o),r=zy(t);if(r===null)return i;t=r;let a='<a href="'+t+'"';return n&&(a+=' title="'+n+'"'),a+=">"+i+"</a>",a}image({href:t,title:n,text:o}){const i=zy(t);if(i===null)return o;t=i;let r=`<img src="${t}" alt="${o}"`;return n&&(r+=` title="${n}"`),r+=">",r}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class hg{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}}class yn{options;renderer;textRenderer;constructor(t){this.options=t||ir,this.options.renderer=this.options.renderer||new Fs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hg}static parse(t,n){return new yn(n).parse(t)}static parseInline(t,n){return new yn(n).parseInline(t)}parse(t,n=!0){let o="";for(let i=0;i<t.length;i++){const r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const s=r,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){o+=l||"";continue}}const a=r;switch(a.type){case"space":{o+=this.renderer.space(a);continue}case"hr":{o+=this.renderer.hr(a);continue}case"heading":{o+=this.renderer.heading(a);continue}case"code":{o+=this.renderer.code(a);continue}case"table":{o+=this.renderer.table(a);continue}case"blockquote":{o+=this.renderer.blockquote(a);continue}case"list":{o+=this.renderer.list(a);continue}case"html":{o+=this.renderer.html(a);continue}case"paragraph":{o+=this.renderer.paragraph(a);continue}case"text":{let s=a,l=this.renderer.text(s);for(;i+1<t.length&&t[i+1].type==="text";)s=t[++i],l+=`
|
|
76
|
-
`+this.renderer.text(s);n?o+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):o+=l;continue}default:{const s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return o}parseInline(t,n){n=n||this.renderer;let o="";for(let i=0;i<t.length;i++){const r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){o+=s||"";continue}}const a=r;switch(a.type){case"escape":{o+=n.text(a);break}case"html":{o+=n.html(a);break}case"link":{o+=n.link(a);break}case"image":{o+=n.image(a);break}case"strong":{o+=n.strong(a);break}case"em":{o+=n.em(a);break}case"codespan":{o+=n.codespan(a);break}case"br":{o+=n.br(a);break}case"del":{o+=n.del(a);break}case"text":{o+=n.text(a);break}default:{const s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return o}}class Lc{options;block;constructor(t){this.options=t||ir}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?bn.lex:bn.lexInline}provideParser(){return this.block?yn.parse:yn.parseInline}}class p9{defaults=ag();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=yn;Renderer=Fs;TextRenderer=hg;Lexer=bn;Tokenizer=wu;Hooks=Lc;constructor(...t){this.use(...t)}walkTokens(t,n){let o=[];for(const i of t)switch(o=o.concat(n.call(this,i)),i.type){case"table":{const r=i;for(const a of r.header)o=o.concat(this.walkTokens(a.tokens,n));for(const a of r.rows)for(const s of a)o=o.concat(this.walkTokens(s.tokens,n));break}case"list":{const r=i;o=o.concat(this.walkTokens(r.items,n));break}default:{const r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(a=>{const s=r[a].flat(1/0);o=o.concat(this.walkTokens(s,n))}):r.tokens&&(o=o.concat(this.walkTokens(r.tokens,n)))}}return o}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(o=>{const i={...o};if(i.async=this.defaults.async||i.async||!1,o.extensions&&(o.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const a=n.renderers[r.name];a?n.renderers[r.name]=function(...s){let l=r.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:n.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=n[r.level];a?a.unshift(r.tokenizer):n[r.level]=[r.tokenizer],r.start&&(r.level==="block"?n.startBlock?n.startBlock.push(r.start):n.startBlock=[r.start]:r.level==="inline"&&(n.startInline?n.startInline.push(r.start):n.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(n.childTokens[r.name]=r.childTokens)}),i.extensions=n),o.renderer){const r=this.defaults.renderer||new Fs(this.defaults);for(const a in o.renderer){if(!(a in r))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const s=a,l=o.renderer[s],c=r[s];r[s]=(...u)=>{let d=l.apply(r,u);return d===!1&&(d=c.apply(r,u)),d||""}}i.renderer=r}if(o.tokenizer){const r=this.defaults.tokenizer||new wu(this.defaults);for(const a in o.tokenizer){if(!(a in r))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const s=a,l=o.tokenizer[s],c=r[s];r[s]=(...u)=>{let d=l.apply(r,u);return d===!1&&(d=c.apply(r,u)),d}}i.tokenizer=r}if(o.hooks){const r=this.defaults.hooks||new Lc;for(const a in o.hooks){if(!(a in r))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const s=a,l=o.hooks[s],c=r[s];Lc.passThroughHooks.has(a)?r[s]=u=>{if(this.defaults.async)return Promise.resolve(l.call(r,u)).then(h=>c.call(r,h));const d=l.call(r,u);return c.call(r,d)}:r[s]=(...u)=>{let d=l.apply(r,u);return d===!1&&(d=c.apply(r,u)),d}}i.hooks=r}if(o.walkTokens){const r=this.defaults.walkTokens,a=o.walkTokens;i.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),r&&(l=l.concat(r.call(this,s))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return bn.lex(t,n??this.defaults)}parser(t,n){return yn.parse(t,n??this.defaults)}parseMarkdown(t){return(o,i)=>{const r={...i},a={...this.defaults,...r},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);const l=a.hooks?a.hooks.provideLexer():t?bn.lex:bn.lexInline,c=a.hooks?a.hooks.provideParser():t?yn.parse:yn.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(o):o).then(u=>l(u,a)).then(u=>a.hooks?a.hooks.processAllTokens(u):u).then(u=>a.walkTokens?Promise.all(this.walkTokens(u,a.walkTokens)).then(()=>u):u).then(u=>c(u,a)).then(u=>a.hooks?a.hooks.postprocess(u):u).catch(s);try{a.hooks&&(o=a.hooks.preprocess(o));let u=l(o,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let d=c(u,a);return a.hooks&&(d=a.hooks.postprocess(d)),d}catch(u){return s(u)}}}onError(t,n){return o=>{if(o.message+=`
|
|
77
|
-
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+Xt(o.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(o);throw o}}}const Ji=new p9;function Ve(e,t){return Ji.parse(e,t)}Ve.options=Ve.setOptions=function(e){return Ji.setOptions(e),Ve.defaults=Ji.defaults,lC(Ve.defaults),Ve};Ve.getDefaults=ag;Ve.defaults=ir;Ve.use=function(...e){return Ji.use(...e),Ve.defaults=Ji.defaults,lC(Ve.defaults),Ve};Ve.walkTokens=function(e,t){return Ji.walkTokens(e,t)};Ve.parseInline=Ji.parseInline;Ve.Parser=yn;Ve.parser=yn.parse;Ve.Renderer=Fs;Ve.TextRenderer=hg;Ve.Lexer=bn;Ve.lexer=bn.lex;Ve.Tokenizer=wu;Ve.Hooks=Lc;Ve.parse=Ve;Ve.options;Ve.setOptions;Ve.use;Ve.walkTokens;Ve.parseInline;yn.parse;bn.lex;const{entries:bC,setPrototypeOf:Uy,isFrozen:f9,getPrototypeOf:g9,getOwnPropertyDescriptor:m9}=Object;let{freeze:Dt,seal:wn,create:Tr}=Object,{apply:_p,construct:Cp}=typeof Reflect<"u"&&Reflect;Dt||(Dt=function(t){return t});wn||(wn=function(t){return t});_p||(_p=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];return t.apply(n,i)});Cp||(Cp=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});const Ya=ot(Array.prototype.forEach),v9=ot(Array.prototype.lastIndexOf),Gy=ot(Array.prototype.pop),Ka=ot(Array.prototype.push),b9=ot(Array.prototype.splice),It=Array.isArray,as=ot(String.prototype.toLowerCase),fh=ot(String.prototype.toString),qy=ot(String.prototype.match),yr=ot(String.prototype.replace),Yy=ot(String.prototype.indexOf),y9=ot(String.prototype.trim),x9=ot(Number.prototype.toString),w9=ot(Boolean.prototype.toString),Ky=typeof BigInt>"u"?null:ot(BigInt.prototype.toString),Xy=typeof Symbol>"u"?null:ot(Symbol.prototype.toString),Ze=ot(Object.prototype.hasOwnProperty),Xa=ot(Object.prototype.toString),gt=ot(RegExp.prototype.test),oc=_9(TypeError);function ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return _p(e,t,o)}}function _9(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Cp(e,n)}}function Ce(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:as;if(Uy&&Uy(e,null),!It(t))return e;let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){const r=n(i);r!==i&&(f9(t)||(t[o]=r),i=r)}e[i]=!0}return e}function C9(e){for(let t=0;t<e.length;t++)Ze(e,t)||(e[t]=null);return e}function Lt(e){const t=Tr(null);for(const[n,o]of bC(e))Ze(e,n)&&(It(o)?t[n]=C9(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Lt(o):t[n]=o);return t}function k9(e){switch(typeof e){case"string":return e;case"number":return x9(e);case"boolean":return w9(e);case"bigint":return Ky?Ky(e):"0";case"symbol":return Xy?Xy(e):"Symbol()";case"undefined":return Xa(e);case"function":case"object":{if(e===null)return Xa(e);const t=e,n=Or(t,"toString");if(typeof n=="function"){const o=n(t);return typeof o=="string"?o:Xa(o)}return Xa(e)}default:return Xa(e)}}function Or(e,t){for(;e!==null;){const o=m9(e,t);if(o){if(o.get)return ot(o.get);if(typeof o.value=="function")return ot(o.value)}e=g9(e)}function n(){return null}return n}function S9(e){try{return gt(e,""),!0}catch{return!1}}const Zy=Dt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),gh=Dt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mh=Dt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$9=Dt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vh=Dt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),E9=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Jy=Dt(["#text"]),Qy=Dt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),bh=Dt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),e0=Dt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ic=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),T9=wn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),O9=wn(/<%[\w\W]*|[\w\W]*%>/gm),I9=wn(/\$\{[\w\W]*/gm),P9=wn(/^data-[\-\w.\u00B7-\uFFFF]+$/),A9=wn(/^aria-[\-\w]+$/),yC=wn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),R9=wn(/^(?:\w+script|data):/i),D9=wn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xC=wn(/^html$/i),V9=wn(/^[a-z][.\w]*(-[.\w]+)+$/i);var t0=Object.freeze({__proto__:null,ARIA_ATTR:A9,ATTR_WHITESPACE:D9,CUSTOM_ELEMENT:V9,DATA_ATTR:P9,DOCTYPE_NAME:xC,ERB_EXPR:O9,IS_ALLOWED_URI:yC,IS_SCRIPT_OR_DATA:R9,MUSTACHE_EXPR:T9,TMPLIT_EXPR:I9});const Za={element:1,text:3,progressingInstruction:7,comment:8,document:9},M9=function(){return typeof window>"u"?null:window},N9=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));const r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},n0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wC(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:M9();const t=ve=>wC(ve);if(t.version="3.4.1",t.removed=[],!e||!e.document||e.document.nodeType!==Za.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const o=n,i=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:p}=e,m=l.prototype,f=Or(m,"cloneNode"),b=Or(m,"remove"),v=Or(m,"nextSibling"),y=Or(m,"childNodes"),x=Or(m,"parentNode");if(typeof a=="function"){const ve=n.createElement("template");ve.content&&ve.content.ownerDocument&&(n=ve.content.ownerDocument)}let _,k="";const{implementation:$,createNodeIterator:A,createDocumentFragment:S,getElementsByTagName:R}=n,{importNode:F}=o;let P=n0();t.isSupported=typeof bC=="function"&&typeof x=="function"&&$&&$.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:G,ERB_EXPR:ee,TMPLIT_EXPR:z,DATA_ATTR:W,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:ne,ATTR_WHITESPACE:te,CUSTOM_ELEMENT:le}=t0;let{IS_ALLOWED_URI:he}=t0,ue=null;const _e=Ce({},[...Zy,...gh,...mh,...vh,...Jy]);let me=null;const Te=Ce({},[...Qy,...bh,...e0,...ic]);let B=Object.seal(Tr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,K=null;const re=Object.seal(Tr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ye=!0,ke=!0,Oe=!1,it=!0,Z=!1,ce=!0,ae=!1,xe=!1,Xe=!1,wt=!1,Et=!1,Tn=!1,Mo=!0,dl=!1;const vg="user-content-";let ld=!0,pa=!1,rr={},zn=null;const cd=Ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let bg=null;const yg=Ce({},["audio","video","img","source","image","track"]);let ud=null;const xg=Ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hl="http://www.w3.org/1998/Math/MathML",pl="http://www.w3.org/2000/svg",Hn="http://www.w3.org/1999/xhtml";let ar=Hn,dd=!1,hd=null;const zC=Ce({},[hl,pl,Hn],fh);let pd=Ce({},["mi","mo","mn","ms","mtext"]),fd=Ce({},["annotation-xml"]);const HC=Ce({},["title","style","font","a","script"]);let fa=null;const jC=["application/xhtml+xml","text/html"],WC="text/html";let rt=null,sr=null;const UC=n.createElement("form"),wg=function(T){return T instanceof RegExp||T instanceof Function},gd=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(sr&&sr===T)return;(!T||typeof T!="object")&&(T={}),T=Lt(T),fa=jC.indexOf(T.PARSER_MEDIA_TYPE)===-1?WC:T.PARSER_MEDIA_TYPE,rt=fa==="application/xhtml+xml"?fh:as,ue=Ze(T,"ALLOWED_TAGS")&&It(T.ALLOWED_TAGS)?Ce({},T.ALLOWED_TAGS,rt):_e,me=Ze(T,"ALLOWED_ATTR")&&It(T.ALLOWED_ATTR)?Ce({},T.ALLOWED_ATTR,rt):Te,hd=Ze(T,"ALLOWED_NAMESPACES")&&It(T.ALLOWED_NAMESPACES)?Ce({},T.ALLOWED_NAMESPACES,fh):zC,ud=Ze(T,"ADD_URI_SAFE_ATTR")&&It(T.ADD_URI_SAFE_ATTR)?Ce(Lt(xg),T.ADD_URI_SAFE_ATTR,rt):xg,bg=Ze(T,"ADD_DATA_URI_TAGS")&&It(T.ADD_DATA_URI_TAGS)?Ce(Lt(yg),T.ADD_DATA_URI_TAGS,rt):yg,zn=Ze(T,"FORBID_CONTENTS")&&It(T.FORBID_CONTENTS)?Ce({},T.FORBID_CONTENTS,rt):cd,H=Ze(T,"FORBID_TAGS")&&It(T.FORBID_TAGS)?Ce({},T.FORBID_TAGS,rt):Lt({}),K=Ze(T,"FORBID_ATTR")&&It(T.FORBID_ATTR)?Ce({},T.FORBID_ATTR,rt):Lt({}),rr=Ze(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Lt(T.USE_PROFILES):T.USE_PROFILES:!1,ye=T.ALLOW_ARIA_ATTR!==!1,ke=T.ALLOW_DATA_ATTR!==!1,Oe=T.ALLOW_UNKNOWN_PROTOCOLS||!1,it=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Z=T.SAFE_FOR_TEMPLATES||!1,ce=T.SAFE_FOR_XML!==!1,ae=T.WHOLE_DOCUMENT||!1,wt=T.RETURN_DOM||!1,Et=T.RETURN_DOM_FRAGMENT||!1,Tn=T.RETURN_TRUSTED_TYPE||!1,Xe=T.FORCE_BODY||!1,Mo=T.SANITIZE_DOM!==!1,dl=T.SANITIZE_NAMED_PROPS||!1,ld=T.KEEP_CONTENT!==!1,pa=T.IN_PLACE||!1,he=S9(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:yC,ar=typeof T.NAMESPACE=="string"?T.NAMESPACE:Hn,pd=Ze(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Lt(T.MATHML_TEXT_INTEGRATION_POINTS):Ce({},["mi","mo","mn","ms","mtext"]),fd=Ze(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Lt(T.HTML_INTEGRATION_POINTS):Ce({},["annotation-xml"]);const Q=Ze(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Lt(T.CUSTOM_ELEMENT_HANDLING):Tr(null);if(B=Tr(null),Ze(Q,"tagNameCheck")&&wg(Q.tagNameCheck)&&(B.tagNameCheck=Q.tagNameCheck),Ze(Q,"attributeNameCheck")&&wg(Q.attributeNameCheck)&&(B.attributeNameCheck=Q.attributeNameCheck),Ze(Q,"allowCustomizedBuiltInElements")&&typeof Q.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=Q.allowCustomizedBuiltInElements),Z&&(ke=!1),Et&&(wt=!0),rr&&(ue=Ce({},Jy),me=Tr(null),rr.html===!0&&(Ce(ue,Zy),Ce(me,Qy)),rr.svg===!0&&(Ce(ue,gh),Ce(me,bh),Ce(me,ic)),rr.svgFilters===!0&&(Ce(ue,mh),Ce(me,bh),Ce(me,ic)),rr.mathMl===!0&&(Ce(ue,vh),Ce(me,e0),Ce(me,ic))),re.tagCheck=null,re.attributeCheck=null,Ze(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?re.tagCheck=T.ADD_TAGS:It(T.ADD_TAGS)&&(ue===_e&&(ue=Lt(ue)),Ce(ue,T.ADD_TAGS,rt))),Ze(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?re.attributeCheck=T.ADD_ATTR:It(T.ADD_ATTR)&&(me===Te&&(me=Lt(me)),Ce(me,T.ADD_ATTR,rt))),Ze(T,"ADD_URI_SAFE_ATTR")&&It(T.ADD_URI_SAFE_ATTR)&&Ce(ud,T.ADD_URI_SAFE_ATTR,rt),Ze(T,"FORBID_CONTENTS")&&It(T.FORBID_CONTENTS)&&(zn===cd&&(zn=Lt(zn)),Ce(zn,T.FORBID_CONTENTS,rt)),Ze(T,"ADD_FORBID_CONTENTS")&&It(T.ADD_FORBID_CONTENTS)&&(zn===cd&&(zn=Lt(zn)),Ce(zn,T.ADD_FORBID_CONTENTS,rt)),ld&&(ue["#text"]=!0),ae&&Ce(ue,["html","head","body"]),ue.table&&(Ce(ue,["tbody"]),delete H.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw oc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=T.TRUSTED_TYPES_POLICY,k=_.createHTML("")}else _===void 0&&(_=N9(p,i)),_!==null&&typeof k=="string"&&(k=_.createHTML(""));Dt&&Dt(T),sr=T},_g=Ce({},[...gh,...mh,...$9]),Cg=Ce({},[...vh,...E9]),GC=function(T){let Q=x(T);(!Q||!Q.tagName)&&(Q={namespaceURI:ar,tagName:"template"});const pe=as(T.tagName),We=as(Q.tagName);return hd[T.namespaceURI]?T.namespaceURI===pl?Q.namespaceURI===Hn?pe==="svg":Q.namespaceURI===hl?pe==="svg"&&(We==="annotation-xml"||pd[We]):!!_g[pe]:T.namespaceURI===hl?Q.namespaceURI===Hn?pe==="math":Q.namespaceURI===pl?pe==="math"&&fd[We]:!!Cg[pe]:T.namespaceURI===Hn?Q.namespaceURI===pl&&!fd[We]||Q.namespaceURI===hl&&!pd[We]?!1:!Cg[pe]&&(HC[pe]||!_g[pe]):!!(fa==="application/xhtml+xml"&&hd[T.namespaceURI]):!1},On=function(T){Ka(t.removed,{element:T});try{x(T).removeChild(T)}catch{b(T)}},vi=function(T,Q){try{Ka(t.removed,{attribute:Q.getAttributeNode(T),from:Q})}catch{Ka(t.removed,{attribute:null,from:Q})}if(Q.removeAttribute(T),T==="is")if(wt||Et)try{On(Q)}catch{}else try{Q.setAttribute(T,"")}catch{}},kg=function(T){let Q=null,pe=null;if(Xe)T="<remove></remove>"+T;else{const tt=qy(T,/^[\r\n\t ]+/);pe=tt&&tt[0]}fa==="application/xhtml+xml"&&ar===Hn&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const We=_?_.createHTML(T):T;if(ar===Hn)try{Q=new h().parseFromString(We,fa)}catch{}if(!Q||!Q.documentElement){Q=$.createDocument(ar,"template",null);try{Q.documentElement.innerHTML=dd?k:We}catch{}}const _t=Q.body||Q.documentElement;return T&&pe&&_t.insertBefore(n.createTextNode(pe),_t.childNodes[0]||null),ar===Hn?R.call(Q,ae?"html":"body")[0]:ae?Q.documentElement:_t},Sg=function(T){return A.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},md=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},vd=function(T){return typeof s=="function"&&T instanceof s};function co(ve,T,Q){Ya(ve,pe=>{pe.call(t,T,Q,sr)})}const $g=function(T){let Q=null;if(co(P.beforeSanitizeElements,T,null),md(T))return On(T),!0;const pe=rt(T.nodeName);if(co(P.uponSanitizeElement,T,{tagName:pe,allowedTags:ue}),ce&&T.hasChildNodes()&&!vd(T.firstElementChild)&>(/<[/\w!]/g,T.innerHTML)&>(/<[/\w!]/g,T.textContent)||ce&&T.namespaceURI===Hn&&pe==="style"&&vd(T.firstElementChild)||T.nodeType===Za.progressingInstruction||ce&&T.nodeType===Za.comment&>(/<[/\w]/g,T.data))return On(T),!0;if(H[pe]||!(re.tagCheck instanceof Function&&re.tagCheck(pe))&&!ue[pe]){if(!H[pe]&&Tg(pe)&&(B.tagNameCheck instanceof RegExp&>(B.tagNameCheck,pe)||B.tagNameCheck instanceof Function&&B.tagNameCheck(pe)))return!1;if(ld&&!zn[pe]){const We=x(T)||T.parentNode,_t=y(T)||T.childNodes;if(_t&&We){const tt=_t.length;for(let Mt=tt-1;Mt>=0;--Mt){const un=f(_t[Mt],!0);We.insertBefore(un,v(T))}}}return On(T),!0}return T instanceof l&&!GC(T)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&>(/<\/no(script|embed|frames)/i,T.innerHTML)?(On(T),!0):(Z&&T.nodeType===Za.text&&(Q=T.textContent,Ya([G,ee,z],We=>{Q=yr(Q,We," ")}),T.textContent!==Q&&(Ka(t.removed,{element:T.cloneNode()}),T.textContent=Q)),co(P.afterSanitizeElements,T,null),!1)},Eg=function(T,Q,pe){if(K[Q]||Mo&&(Q==="id"||Q==="name")&&(pe in n||pe in UC))return!1;if(!(ke&&!K[Q]&>(W,Q))){if(!(ye&>(q,Q))){if(!(re.attributeCheck instanceof Function&&re.attributeCheck(Q,T))){if(!me[Q]||K[Q]){if(!(Tg(T)&&(B.tagNameCheck instanceof RegExp&>(B.tagNameCheck,T)||B.tagNameCheck instanceof Function&&B.tagNameCheck(T))&&(B.attributeNameCheck instanceof RegExp&>(B.attributeNameCheck,Q)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(Q,T))||Q==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&>(B.tagNameCheck,pe)||B.tagNameCheck instanceof Function&&B.tagNameCheck(pe))))return!1}else if(!ud[Q]){if(!gt(he,yr(pe,te,""))){if(!((Q==="src"||Q==="xlink:href"||Q==="href")&&T!=="script"&&Yy(pe,"data:")===0&&bg[T])){if(!(Oe&&!gt(ne,yr(pe,te,"")))){if(pe)return!1}}}}}}}return!0},qC=Ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Tg=function(T){return!qC[as(T)]&>(le,T)},Og=function(T){co(P.beforeSanitizeAttributes,T,null);const{attributes:Q}=T;if(!Q||md(T))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me,forceKeepAttr:void 0};let We=Q.length;for(;We--;){const _t=Q[We],{name:tt,namespaceURI:Mt,value:un}=_t,In=rt(tt),bd=un;let ct=tt==="value"?bd:y9(bd);if(pe.attrName=In,pe.attrValue=ct,pe.keepAttr=!0,pe.forceKeepAttr=void 0,co(P.uponSanitizeAttribute,T,pe),ct=pe.attrValue,dl&&(In==="id"||In==="name")&&Yy(ct,vg)!==0&&(vi(tt,T),ct=vg+ct),ce&>(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ct)){vi(tt,T);continue}if(In==="attributename"&&qy(ct,"href")){vi(tt,T);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){vi(tt,T);continue}if(!it&>(/\/>/i,ct)){vi(tt,T);continue}Z&&Ya([G,ee,z],Ag=>{ct=yr(ct,Ag," ")});const Pg=rt(T.nodeName);if(!Eg(Pg,In,ct)){vi(tt,T);continue}if(_&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Mt)switch(p.getAttributeType(Pg,In)){case"TrustedHTML":{ct=_.createHTML(ct);break}case"TrustedScriptURL":{ct=_.createScriptURL(ct);break}}if(ct!==bd)try{Mt?T.setAttributeNS(Mt,tt,ct):T.setAttribute(tt,ct),md(T)?On(T):Gy(t.removed)}catch{vi(tt,T)}}co(P.afterSanitizeAttributes,T,null)},Ig=function(T){let Q=null;const pe=Sg(T);for(co(P.beforeSanitizeShadowDOM,T,null);Q=pe.nextNode();)co(P.uponSanitizeShadowNode,Q,null),$g(Q),Og(Q),Q.content instanceof r&&Ig(Q.content);co(P.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ve){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=null,pe=null,We=null,_t=null;if(dd=!ve,dd&&(ve="<!-->"),typeof ve!="string"&&!vd(ve)&&(ve=k9(ve),typeof ve!="string"))throw oc("dirty is not a string, aborting");if(!t.isSupported)return ve;if(xe||gd(T),t.removed=[],typeof ve=="string"&&(pa=!1),pa){const un=ve.nodeName;if(typeof un=="string"){const In=rt(un);if(!ue[In]||H[In])throw oc("root node is forbidden and cannot be sanitized in-place")}}else if(ve instanceof s)Q=kg("<!---->"),pe=Q.ownerDocument.importNode(ve,!0),pe.nodeType===Za.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?Q=pe:Q.appendChild(pe);else{if(!wt&&!Z&&!ae&&ve.indexOf("<")===-1)return _&&Tn?_.createHTML(ve):ve;if(Q=kg(ve),!Q)return wt?null:Tn?k:""}Q&&Xe&&On(Q.firstChild);const tt=Sg(pa?ve:Q);for(;We=tt.nextNode();)$g(We),Og(We),We.content instanceof r&&Ig(We.content);if(pa)return ve;if(wt){if(Z){Q.normalize();let un=Q.innerHTML;Ya([G,ee,z],In=>{un=yr(un,In," ")}),Q.innerHTML=un}if(Et)for(_t=S.call(Q.ownerDocument);Q.firstChild;)_t.appendChild(Q.firstChild);else _t=Q;return(me.shadowroot||me.shadowrootmode)&&(_t=F.call(o,_t,!0)),_t}let Mt=ae?Q.outerHTML:Q.innerHTML;return ae&&ue["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&>(xC,Q.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+Q.ownerDocument.doctype.name+`>
|
|
78
|
-
`+Mt),Z&&Ya([G,ee,z],un=>{Mt=yr(Mt,un," ")}),_&&Tn?_.createHTML(Mt):Mt},t.setConfig=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gd(ve),xe=!0},t.clearConfig=function(){sr=null,xe=!1},t.isValidAttribute=function(ve,T,Q){sr||gd({});const pe=rt(ve),We=rt(T);return Eg(pe,We,Q)},t.addHook=function(ve,T){typeof T=="function"&&Ka(P[ve],T)},t.removeHook=function(ve,T){if(T!==void 0){const Q=v9(P[ve],T);return Q===-1?void 0:b9(P[ve],Q,1)[0]}return Gy(P[ve])},t.removeHooks=function(ve){P[ve]=[]},t.removeAllHooks=function(){P=n0()},t}var L9=wC();const F9={class:"flex items-start gap-2"},B9=["innerHTML"],z9=["href"],H9=O({name:"InfoBannerWidget",__name:"InfoBanner",props:{property:{}},setup(e){const t=I(()=>e.property?.ui);function n(u){return u.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}const o=["http:","https:","mailto:"];function i(u){if(!u)return null;if(u.startsWith("/")||u.startsWith("./")||u.startsWith("../")||u.startsWith("#"))return u;try{const d=new URL(u,"http://localhost");return o.includes(d.protocol)?u:null}catch{return null}}class r extends Fs{link({tokens:d,href:h,title:p}){const m=this.parser.parseInline(d),f=i(h);if(!f)return m;const b=typeof location<"u"&&f.startsWith(`${location.protocol}//${location.hostname}`),v=n(f),y=p?` title="${n(p)}"`:"";return`<a href="${v}"${y}${b?"":' target="_blank" rel="noreferrer noopener nofollow"'}>${m}</a>`}}const a=new r,s=I(()=>L9.sanitize(Ve(t.value?.content??"",{renderer:a}))),l=I(()=>t.value?.type??"info"),c=I(()=>{switch(l.value){case"warning":return xz;case"error":return fz;case"prerequisites":return mz;default:return mp}});return(u,d)=>(w(),M("div",{class:L(["px-4 py-3 rounded-lg info-banner-shell",{"info-banner--info":g(l)==="info","info-banner--warning":g(l)==="warning","info-banner--error":g(l)==="error","info-banner--prerequisites":g(l)==="prerequisites","info-banner--side-note bg-new-gray-100":g(l)==="side-note"}])},[N("div",F9,[g(t)?.hideIcon?oe("",!0):(w(),E(At(g(c)),{key:0,class:"mt-0.5 h-4 w-4 shrink-0"})),N("div",{class:"info-banner__content flex-1 text-sm text-new-gray-800",innerHTML:g(s)},null,8,B9),g(t)?.link?(w(),M("a",{key:1,href:g(t).link.url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1 text-sm font-medium text-new-blue-600 hover:underline whitespace-nowrap"},[Ne(se(g(t).link.label)+" ",1),g(t).link.icon==="External"?(w(),E(g(gz),{key:0,class:"h-3 w-3"})):oe("",!0)],8,z9)):oe("",!0)])],2))}}),j9=Object.assign($u(H9,[["__scopeId","data-v-13721035"]]),{__name:"InfoBanner"}),W9={class:"flex flex-wrap gap-1 flex-1 min-w-0"},U9={class:"truncate"},G9={key:0,class:"text-xs text-gray-500 self-center"},q9={key:1,class:"text-sm text-gray-500 truncate self-center"},Y9={class:"flex items-center gap-1 shrink-0"},K9={class:"flex items-center gap-2 px-3 py-2"},X9=["placeholder"],Z9={key:0,class:"flex flex-wrap items-center gap-2 border-t border-b border-solid border-new-gray-200 px-3 py-2"},J9=["onClick"],Q9={key:1,class:"border-b border-solid border-new-gray-200 px-3 py-2 text-sm"},ej={class:"inline-flex items-center gap-2 cursor-pointer select-none"},tj=["checked","disabled"],nj={class:"max-h-64 overflow-y-auto p-1"},oj={class:"flex items-center gap-1 px-2 py-1 rounded hover:bg-new-gray-50"},ij=["onClick"],rj={key:1,class:"inline-block w-4"},aj=["checked",".indeterminate","onChange"],sj=["checked","onChange"],lj={class:"text-sm text-new-gray-800"},cj={key:0,class:"ml-6"},uj=["checked","onChange"],dj={class:"text-sm text-new-gray-700"},hj={key:1,class:"px-3 py-4 text-center text-sm text-new-gray-500"},pj={class:"flex flex-col gap-2"},fj={class:"text-xs font-medium text-new-gray-600"},gj=O({name:"ApiTreeSelectWidget",__name:"ApiTreeSelect",props:{field:{},property:{}},async setup(e){let t,n;const o=xt(Vt),{data:i}=([t,n]=na(()=>Xi(`${e.property.id}_metadata`,()=>{const Z=o.getFieldValue("credential_guid_body");return $fetch("/workflows/v1/metadata",{method:"POST",body:{...Z&&Z,...e.property.ui?.connectorConfigName&&{connectorConfigName:e.property.ui.connectorConfigName},...e.property.ui?.metadataTemplateKey&&{type:e.property.ui.metadataTemplateKey},...e.property.ui?.metadataTransformerTemplateKey&&{transformerType:e.property.ui.metadataTransformerTemplateKey}}})})),t=await t,n(),t);function r(Z){return{label:Z.title??Z.value,value:Z.value,children:Z.children?.length?Z.children.map(r):void 0}}const a=I(()=>{const Z=i.value?.data?.results;return Array.isArray(Z)?Z.map(r):[]});function s(Z,ce=""){if(typeof Z!="object"||Z===null)return[];const ae=Object.keys(Z);if(!ae.length)return ce?[ce]:[];const xe=[];return ae.forEach(Xe=>{s(Z[Xe],Xe).forEach(Et=>xe.push(ce?`${ce}:${Et}`:Et))}),xe}function l(Z){if(!Z)return{};const ce=Z.split(":");return ce.length===1?{[Z]:{}}:{[ce[0]]:l(ce.slice(1).join(":"))}}function c(){const Z=e.field?.state?.value;if(!Z)return[];if(typeof Z=="string")try{return s(JSON.parse(Z))}catch{return[]}return s(Z)}const u=fe(c()),d=fe(""),h=fe(!1),p=fe(!1),m=fe({contains:"",startsWith:"",endsWith:"",regex:""}),f=fe(new Set),b=fe(null),v=fe(null),y=fe(null),x=fe(null),_=fe(null),k=fe({}),$=fe({});function A(){if(!v.value)return;const Z=v.value.getBoundingClientRect(),ce=Math.max(Z.width,360);k.value={position:"fixed",top:`${Z.bottom+4}px`,left:`${Z.left}px`,width:`${ce}px`,zIndex:"1000"}}function S(){if(!x.value)return;const Z=x.value.getBoundingClientRect(),ce=288,ae=window.innerWidth;let xe=Z.right-ce;xe<8&&(xe=Math.min(Z.left,ae-ce-8)),$.value={position:"fixed",top:`${Z.bottom+6}px`,left:`${xe}px`,width:`${ce}px`,zIndex:"1001"}}function R(){p.value=!p.value}function F(Z){const ce=Z.target;ce&&(b.value?.contains(ce)||y.value?.contains(ce)||_.value?.contains(ce))||(h.value=!1,p.value=!1)}function P(){h.value&&A(),p.value&&S()}ze(p,async Z=>{Z&&(await oo(),S())}),ze(h,async Z=>{Z?(await oo(),A(),document.addEventListener("mousedown",F),window.addEventListener("scroll",P,!0),window.addEventListener("resize",P)):(document.removeEventListener("mousedown",F),window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P))}),b0(()=>{document.removeEventListener("mousedown",F),window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P)});const G=I(()=>Object.values(m.value).filter(Z=>Z!=="").length);function ee(Z,ce){return Z.map(ae=>{const xe=ae.children?ee(ae.children,ce):[];return ce(ae)||xe.length?{...ae,children:xe}:null}).filter(ae=>ae!==null)}const z=I(()=>{const{contains:Z,startsWith:ce,endsWith:ae,regex:xe}=m.value;if(!(Z||ce||ae||xe))return a.value;const wt=Et=>{const Tn=(Et.label||"").toLowerCase();if(Z&&!Tn.includes(Z.toLowerCase())||ce&&!Tn.startsWith(ce.toLowerCase())||ae&&!Tn.endsWith(ae.toLowerCase()))return!1;if(xe)try{if(!new RegExp(xe,"i").test(Tn))return!1}catch{return!1}return!0};return ee(a.value,wt)}),W=I(()=>{if(!d.value)return z.value;const Z=ce=>(ce.label||"").toLowerCase().includes(d.value.toLowerCase());return ee(z.value,Z)});function q(Z,ce){const ae=ce?`${ce}:${Z.value}`:Z.value;return Z.children?.length?Z.children.flatMap(xe=>q(xe,ae)):[ae]}const ne=I(()=>W.value.flatMap(Z=>q(Z))),te=I(()=>!!ne.value.length&&ne.value.every(Z=>u.value.includes(Z)));function le(Z){u.value=Z;const ce=Z.length?en({},...Z.map(ae=>l(ae))):{};e.field.handleChange(JSON.stringify(ce))}function he(Z,ce){ce?u.value.includes(Z)||le([...u.value,Z]):le(u.value.filter(ae=>ae!==Z))}function ue(Z,ce){const ae=q(Z),xe=new Set(u.value);ce?ae.forEach(Xe=>xe.add(Xe)):ae.forEach(Xe=>xe.delete(Xe)),le(Array.from(xe))}function _e(Z){const ce=q(Z),ae=ce.filter(xe=>u.value.includes(xe));return ae.length?ae.length===ce.length?"all":"some":"none"}function me(Z){const ce=new Set(ne.value);le(Z?Array.from(new Set([...u.value,...ce])):u.value.filter(ae=>!ce.has(ae)))}function Te(Z){f.value.has(Z)?f.value.delete(Z):f.value.add(Z),f.value=new Set(f.value)}function B(Z){return d.value||G.value>0?!0:f.value.has(Z)}function H(){m.value={contains:"",startsWith:"",endsWith:"",regex:""}}function K(Z){m.value[Z]=""}const re={contains:"Contains",startsWith:"Starts with",endsWith:"Ends with",regex:"Regex"},ye=I(()=>Object.keys(m.value).filter(Z=>m.value[Z]).map(Z=>({key:Z,label:re[Z],value:m.value[Z]}))),ke=I(()=>u.value.slice(0,3).map(Z=>{const ce=Z.split(":");return{path:Z,label:ce[ce.length-1]}}));function Oe(Z){const ce=ke.value[Z]?.path;ce&&le(u.value.filter(ae=>ae!==ce))}function it(){le([])}return(Z,ce)=>(w(),M("div",{ref_key:"rootRef",ref:b,class:"relative"},[N("button",{ref_key:"triggerRef",ref:v,type:"button",class:L(["api-tree-trigger flex w-full items-center justify-between gap-2 rounded-md bg-white px-3 py-2 text-left text-sm transition-colors focus:outline-none",{"api-tree-trigger--open":g(h)}]),onClick:ce[0]||(ce[0]=ae=>h.value=!g(h))},[N("div",W9,[g(u).length?(w(),M(Se,{key:0},[(w(!0),M(Se,null,Ie(g(ke),(ae,xe)=>(w(),M("span",{key:ae.path,class:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-blue-50 text-blue-700 border border-solid border-blue-200 truncate max-w-[10rem]"},[N("span",U9,se(ae.label),1),j(g(ws),{class:"h-3 w-3 shrink-0 cursor-pointer hover:opacity-70",onClick:ei(Xe=>Oe(xe),["stop"])},null,8,["onClick"])]))),128)),g(u).length>3?(w(),M("span",G9," +"+se(g(u).length-3)+" more ",1)):oe("",!0)],64)):(w(),M("span",q9,se(e.property.ui?.placeholder??"Select workspaces"),1))]),N("div",Y9,[g(u).length?(w(),E(g(ws),{key:0,class:"h-3.5 w-3.5 text-new-gray-500 hover:text-new-gray-700",onClick:ei(it,["stop"])})):oe("",!0),j(g(pz),{class:L(["h-4 w-4 text-new-gray-500 transition-transform",{"rotate-180":g(h)}])},null,8,["class"])])],2),(w(),E(Dg,{to:"body"},[g(h)?(w(),M("div",{key:0,ref_key:"popoverRef",ref:y,style:Ch(g(k)),class:"api-tree-popover rounded-md bg-white",role:"listbox"},[N("div",K9,[j(g(bz),{class:"h-4 w-4 text-new-gray-500 shrink-0"}),x0(N("input",{"onUpdate:modelValue":ce[1]||(ce[1]=ae=>_0(d)?d.value=ae:null),type:"text",placeholder:`Search from ${g(a).length} items`,class:"flex-1 min-w-0 text-sm text-new-gray-700 placeholder:text-new-gray-500 bg-transparent border-0 outline-none"},null,8,X9),[[lk,g(d)]]),N("button",{ref_key:"advancedTriggerRef",ref:x,type:"button",class:"shrink-0 text-sm font-bold text-blue-600 bg-transparent border-0 p-0 cursor-pointer hover:text-blue-700",onClick:ei(R,["stop"])}," Advanced Search ",512)]),g(ye).length?(w(),M("div",Z9,[(w(!0),M(Se,null,Ie(g(ye),ae=>(w(),M("span",{key:ae.key,class:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-full bg-blue-50 border border-solid border-blue-200 text-blue-700"},[Ne(se(ae.label)+": "+se(ae.value)+" ",1),N("button",{type:"button",class:"bg-transparent border-0 p-0 cursor-pointer hover:opacity-70",onClick:xe=>K(ae.key)},[j(g(ws),{class:"h-3 w-3"})],8,J9)]))),128)),N("span",{class:"ml-auto text-xs font-bold text-red-500 cursor-pointer hover:underline",onClick:H}," Clear Filter ("+se(g(G))+") ",1)])):oe("",!0),g(d)||g(G)?(w(),M("div",Q9,[N("label",ej,[N("input",{type:"checkbox",checked:g(te),disabled:!g(ne).length,onChange:ce[2]||(ce[2]=ae=>me(ae.target.checked))},null,40,tj),ce[3]||(ce[3]=N("span",{class:"font-normal text-new-gray-700"}," Select all ",-1))])])):oe("",!0),N("div",nj,[g(W).length?(w(!0),M(Se,{key:0},Ie(g(W),ae=>(w(),M("div",{key:ae.value},[N("div",oj,[ae.children?.length?(w(),M("button",{key:0,type:"button",class:"p-0.5 text-new-gray-500",onClick:xe=>Te(ae.value)},[j(g(U_),{class:L(["h-3 w-3 transition-transform",{"rotate-90":B(ae.value)}])},null,8,["class"])],8,ij)):(w(),M("span",rj)),ae.children?.length?(w(),M("input",{key:2,type:"checkbox",checked:_e(ae)==="all",".indeterminate":_e(ae)==="some",onChange:xe=>ue(ae,xe.target.checked)},null,40,aj)):(w(),M("input",{key:3,type:"checkbox",checked:g(u).includes(ae.value),onChange:xe=>he(ae.value,xe.target.checked)},null,40,sj)),N("span",lj,se(ae.label),1)]),ae.children?.length&&B(ae.value)?(w(),M("div",cj,[(w(!0),M(Se,null,Ie(ae.children,xe=>(w(),M("div",{key:xe.value,class:"flex items-center gap-2 px-2 py-1 rounded hover:bg-new-gray-50"},[N("input",{type:"checkbox",checked:g(u).includes(`${ae.value}:${xe.value}`),onChange:Xe=>he(`${ae.value}:${xe.value}`,Xe.target.checked)},null,40,uj),N("span",dj,se(xe.label),1)]))),128))])):oe("",!0)]))),128)):(w(),M("div",hj," No matches "))])],4)):oe("",!0)])),(w(),E(Dg,{to:"body"},[g(p)?(w(),M("div",{key:0,ref_key:"advancedPopoverRef",ref:_,style:Ch(g($)),class:"api-tree-popover rounded-md bg-white p-2"},[N("div",pj,[(w(),M(Se,null,Ie([{key:"contains",label:"Contains"},{key:"startsWith",label:"Starts with"},{key:"endsWith",label:"Ends with"},{key:"regex",label:"Regex pattern"}],ae=>N("div",{key:ae.key,class:"flex flex-col gap-1"},[N("label",fj,se(ae.label),1),j(g(al),{"model-value":g(m)[ae.key],placeholder:ae.label,variant:"default",state:"idle","onUpdate:modelValue":xe=>g(m)[ae.key]=xe},null,8,["model-value","placeholder","onUpdate:modelValue"])])),64))])],4)):oe("",!0)]))],512))}}),mj=Object.assign($u(gj,[["__scopeId","data-v-c4e14c6c"]]),{__name:"ApiTreeSelect"}),vj=O({name:"GlossarySelectorWidget",__name:"GlossarySelector",props:{field:{},property:{}},setup(e){const t=I(()=>e.property.ui?.mode==="multiple"),n=I(()=>e.property.ui?.showIcon??!0),o=I(()=>e.property.ui?.showCount??!1),i=[{guid:"glossary-1",name:"Sales Glossary",qualifiedName:"default/glossary/1711027234",termsCount:42},{guid:"glossary-2",name:"Marketing Glossary",qualifiedName:"default/glossary/1711027235",termsCount:18},{guid:"glossary-3",name:"Finance Glossary",qualifiedName:"default/glossary/1711027236",termsCount:76},{guid:"glossary-4",name:"Data Engineering Glossary",qualifiedName:"default/glossary/1711027237",termsCount:9}],r=I(()=>e.property.ui?.glossaries??i),a=I(()=>[...r.value].sort((d,h)=>d.name.localeCompare(h.name)).map(d=>({label:o.value&&d.termsCount!==void 0?`${d.name} (${d.termsCount})`:d.name,value:d.qualifiedName})));function s(d){const h=r.value.find(p=>p.qualifiedName===d);return h?{qualifiedName:h.qualifiedName,guid:h.guid,name:h.name}:null}function l(){const d=e.field?.state?.value;if(!d)return[];try{const h=typeof d=="string"?JSON.parse(d):d;if(Array.isArray(h))return h.map(p=>p?.qualifiedName).filter(p=>!!p);if(h?.qualifiedName)return[h.qualifiedName]}catch{}return[]}const c=fe(l());function u(d){c.value=d;const h=d.map(s).filter(p=>!!p);t.value?e.field.handleChange(JSON.stringify(h)):e.field.handleChange(h[0]?JSON.stringify(h[0]):"")}return(d,h)=>(w(),M("div",{class:L(["glossary-select-wrap relative",{"with-icon":g(n)}])},[g(n)?(w(),E(g(hz),{key:0,class:"glossary-select-icon h-4 w-4 text-gray-500 pointer-events-none"})):oe("",!0),j(g(fi),{multiple:g(t),"model-value":g(c),options:g(a),placeholder:e.property.ui?.placeholder??(g(t)?"Select glossaries":"Select a glossary"),variant:"default","onUpdate:modelValue":u,onBlur:e.field.handleBlur},null,8,["multiple","model-value","options","placeholder","onBlur"])],2))}}),bj=Object.assign($u(vj,[["__scopeId","data-v-f019e86a"]]),{__name:"GlossarySelector"});function Vi(){return Vi=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},Vi.apply(this,arguments)}function yj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Bs(e,t)}function kp(e){return kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kp(e)}function Bs(e,t){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Bs(e,t)}function xj(){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 Fc(e,t,n){return xj()?Fc=Reflect.construct.bind():Fc=function(i,r,a){var s=[null];s.push.apply(s,r);var l=Function.bind.apply(i,s),c=new l;return a&&Bs(c,a.prototype),c},Fc.apply(null,arguments)}function wj(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Sp(e){var t=typeof Map=="function"?new Map:void 0;return Sp=function(o){if(o===null||!wj(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 Fc(o,arguments,kp(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Bs(i,o)},Sp(e)}var _j=/%[sdj%]/g,Cj=function(){};function $p(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 tn(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,r=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(_j,function(s){if(s==="%%")return"%";if(i>=r)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 a}return e}function kj(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function st(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||kj(t)&&typeof e=="string"&&!e)}function Sj(e,t,n){var o=[],i=0,r=e.length;function a(s){o.push.apply(o,s||[]),i++,i===r&&n(o)}e.forEach(function(s){t(s,a)})}function o0(e,t,n){var o=0,i=e.length;function r(a){if(a&&a.length){n(a);return}var s=o;o=o+1,s<i?t(e[s],r):n([])}r([])}function $j(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var i0=function(e){yj(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}(Sp(Error));function Ej(e,t,n,o,i){if(t.first){var r=new Promise(function(h,p){var m=function(v){return o(v),v.length?p(new i0(v,$p(v))):h(i)},f=$j(e);o0(f,n,m)});return r.catch(function(h){return h}),r}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise(function(h,p){var m=function(b){if(u.push.apply(u,b),c++,c===l)return o(u),u.length?p(new i0(u,$p(u))):h(i)};s.length||(o(u),h(i)),s.forEach(function(f){var b=e[f];a.indexOf(f)!==-1?o0(b,n,m):Sj(b,n,m)})});return d.catch(function(h){return h}),d}function Tj(e){return!!(e&&e.message!==void 0)}function Oj(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function r0(e,t){return function(n){var o;return e.fullFields?o=Oj(t,e.fullFields):o=t[n.field||e.fullField],Tj(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 a0(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]=Vi({},e[n],o):e[n]=o}}return e}var _C=function(t,n,o,i,r,a){t.required&&(!o.hasOwnProperty(t.field)||st(n,a||t.type))&&i.push(tn(r.messages.required,t.fullField))},Ij=function(t,n,o,i,r){(/^\s+$/.test(n)||n==="")&&i.push(tn(r.messages.whitespace,t.fullField))},rc,Pj=function(){if(rc)return rc;var e="[a-fA-F\\d:]",t=function(_){return _&&_.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=(`
|
|
79
|
-
(?:
|
|
80
|
-
(?:`+o+":){7}(?:"+o+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
81
|
-
(?:`+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
|
|
82
|
-
(?:`+o+":){5}(?::"+n+"|(?::"+o+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
83
|
-
(?:`+o+":){4}(?:(?::"+o+"){0,1}:"+n+"|(?::"+o+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
84
|
-
(?:`+o+":){3}(?:(?::"+o+"){0,2}:"+n+"|(?::"+o+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
85
|
-
(?:`+o+":){2}(?:(?::"+o+"){0,3}:"+n+"|(?::"+o+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
86
|
-
(?:`+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
|
|
87
|
-
(?::(?:(?::`+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
|
|
88
|
-
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
89
|
-
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),r=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),a=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(_){return _&&_.exact?r:new RegExp("(?:"+t(_)+n+t(_)+")|(?:"+t(_)+i+t(_)+")","g")};l.v4=function(x){return x&&x.exact?a: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]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,h=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]+)*",f="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",v='(?:[/?#][^\\s"]*)?',y="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+h+"|"+p+m+f+")"+b+v;return rc=new RegExp("(?:^"+y+"$)","i"),rc},s0={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},ss={integer:function(t){return ss.number(t)&&parseInt(t,10)===t},float:function(t){return ss.number(t)&&!ss.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"&&!ss.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(s0.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(Pj())},hex:function(t){return typeof t=="string"&&!!t.match(s0.hex)}},Aj=function(t,n,o,i,r){if(t.required&&n===void 0){_C(t,n,o,i,r);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;a.indexOf(s)>-1?ss[s](n)||i.push(tn(r.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&i.push(tn(r.messages.types[s],t.fullField,t.type))},Rj=function(t,n,o,i,r){var a=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,h=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(h?d="number":p?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),p&&(u=n.replace(c,"_").length),a?u!==t.len&&i.push(tn(r.messages[d].len,t.fullField,t.len)):s&&!l&&u<t.min?i.push(tn(r.messages[d].min,t.fullField,t.min)):l&&!s&&u>t.max?i.push(tn(r.messages[d].max,t.fullField,t.max)):s&&l&&(u<t.min||u>t.max)&&i.push(tn(r.messages[d].range,t.fullField,t.min,t.max))},xr="enum",Dj=function(t,n,o,i,r){t[xr]=Array.isArray(t[xr])?t[xr]:[],t[xr].indexOf(n)===-1&&i.push(tn(r.messages[xr],t.fullField,t[xr].join(", ")))},Vj=function(t,n,o,i,r){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(tn(r.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||i.push(tn(r.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},$e={required:_C,whitespace:Ij,type:Aj,range:Rj,enum:Dj,pattern:Vj},Mj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n,"string")&&!t.required)return o();$e.required(t,n,i,a,r,"string"),st(n,"string")||($e.type(t,n,i,a,r),$e.range(t,n,i,a,r),$e.pattern(t,n,i,a,r),t.whitespace===!0&&$e.whitespace(t,n,i,a,r))}o(a)},Nj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r),n!==void 0&&$e.type(t,n,i,a,r)}o(a)},Lj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),st(n)&&!t.required)return o();$e.required(t,n,i,a,r),n!==void 0&&($e.type(t,n,i,a,r),$e.range(t,n,i,a,r))}o(a)},Fj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r),n!==void 0&&$e.type(t,n,i,a,r)}o(a)},Bj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r),st(n)||$e.type(t,n,i,a,r)}o(a)},zj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r),n!==void 0&&($e.type(t,n,i,a,r),$e.range(t,n,i,a,r))}o(a)},Hj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r),n!==void 0&&($e.type(t,n,i,a,r),$e.range(t,n,i,a,r))}o(a)},jj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return o();$e.required(t,n,i,a,r,"array"),n!=null&&($e.type(t,n,i,a,r),$e.range(t,n,i,a,r))}o(a)},Wj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r),n!==void 0&&$e.type(t,n,i,a,r)}o(a)},Uj="enum",Gj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r),n!==void 0&&$e[Uj](t,n,i,a,r)}o(a)},qj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n,"string")&&!t.required)return o();$e.required(t,n,i,a,r),st(n,"string")||$e.pattern(t,n,i,a,r)}o(a)},Yj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n,"date")&&!t.required)return o();if($e.required(t,n,i,a,r),!st(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),$e.type(t,l,i,a,r),l&&$e.range(t,l.getTime(),i,a,r)}}o(a)},Kj=function(t,n,o,i,r){var a=[],s=Array.isArray(n)?"array":typeof n;$e.required(t,n,i,a,r,s),o(a)},yh=function(t,n,o,i,r){var a=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(st(n,a)&&!t.required)return o();$e.required(t,n,i,s,r,a),st(n,a)||$e.type(t,n,i,s,r)}o(s)},Xj=function(t,n,o,i,r){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(st(n)&&!t.required)return o();$e.required(t,n,i,a,r)}o(a)},Cs={string:Mj,method:Nj,number:Lj,boolean:Fj,regexp:Bj,integer:zj,float:Hj,array:jj,object:Wj,enum:Gj,pattern:qj,date:Yj,url:yh,hex:yh,email:yh,required:Kj,any:Xj};function Ep(){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 Tp=Ep(),ul=function(){function e(n){this.rules=null,this._messages=Tp,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(r){var a=o[r];i.rules[r]=Array.isArray(a)?a:[a]})},t.messages=function(o){return o&&(this._messages=a0(Ep(),o)),this._messages},t.validate=function(o,i,r){var a=this;i===void 0&&(i={}),r===void 0&&(r=function(){});var s=o,l=i,c=r;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function u(f){var b=[],v={};function y(_){if(Array.isArray(_)){var k;b=(k=b).concat.apply(k,_)}else b.push(_)}for(var x=0;x<f.length;x++)y(f[x]);b.length?(v=$p(b),c(b,v)):c(null,s)}if(l.messages){var d=this.messages();d===Tp&&(d=Ep()),a0(d,l.messages),l.messages=d}else l.messages=this.messages();var h={},p=l.keys||Object.keys(this.rules);p.forEach(function(f){var b=a.rules[f],v=s[f];b.forEach(function(y){var x=y;typeof x.transform=="function"&&(s===o&&(s=Vi({},s)),v=s[f]=x.transform(v)),typeof x=="function"?x={validator:x}:x=Vi({},x),x.validator=a.getValidationMethod(x),x.validator&&(x.field=f,x.fullField=x.fullField||f,x.type=a.getType(x),h[f]=h[f]||[],h[f].push({rule:x,value:v,source:s,field:f}))})});var m={};return Ej(h,l,function(f,b){var v=f.rule,y=(v.type==="object"||v.type==="array")&&(typeof v.fields=="object"||typeof v.defaultField=="object");y=y&&(v.required||!v.required&&f.value),v.field=f.field;function x($,A){return Vi({},A,{fullField:v.fullField+"."+$,fullFields:v.fullFields?[].concat(v.fullFields,[$]):[$]})}function _($){$===void 0&&($=[]);var A=Array.isArray($)?$:[$];!l.suppressWarning&&A.length&&e.warning("async-validator:",A),A.length&&v.message!==void 0&&(A=[].concat(v.message));var S=A.map(r0(v,s));if(l.first&&S.length)return m[v.field]=1,b(S);if(!y)b(S);else{if(v.required&&!f.value)return v.message!==void 0?S=[].concat(v.message).map(r0(v,s)):l.error&&(S=[l.error(v,tn(l.messages.required,v.field))]),b(S);var R={};v.defaultField&&Object.keys(f.value).map(function(G){R[G]=v.defaultField}),R=Vi({},R,f.rule.fields);var F={};Object.keys(R).forEach(function(G){var ee=R[G],z=Array.isArray(ee)?ee:[ee];F[G]=z.map(x.bind(null,G))});var P=new e(F);P.messages(l.messages),f.rule.options&&(f.rule.options.messages=l.messages,f.rule.options.error=l.error),P.validate(f.value,f.rule.options||l,function(G){var ee=[];S&&S.length&&ee.push.apply(ee,S),G&&G.length&&ee.push.apply(ee,G),b(ee.length?ee:null)})}}var k;if(v.asyncValidator)k=v.asyncValidator(v,f.value,_,f.source,l);else if(v.validator){try{k=v.validator(v,f.value,_,f.source,l)}catch($){console.error?.($),l.suppressValidatorError||setTimeout(function(){throw $},0),_($.message)}k===!0?_():k===!1?_(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||(v.fullField||v.field)+" fails"):k instanceof Array?_(k):k instanceof Error&&_(k.message)}k&&k.then&&k.then(function(){return _()},function($){return _($)})},function(f){u(f)},s)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!Cs.hasOwnProperty(o.type))throw new Error(tn("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),r=i.indexOf("message");return r!==-1&&i.splice(r,1),i.length===1&&i[0]==="required"?Cs.required:Cs[this.getType(o)]||void 0},e}();ul.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Cs[t]=n};ul.warning=Cj;ul.messages=Tp;ul.validators=Cs;function Zj(e){const t=new ul({[e.id]:e.ui?.rules??[]});return{onBlurAsync:async({value:n})=>{try{await t.validate({[e.id]:n})}catch({errors:o}){return o[0].message}}}}var Jj={},Op=function(e,t){return Op=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},Op(e,t)};function $t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Op(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var pg=function(e){var t="[object "+e+"]";return function(n){return Qj(n)===t}},Qj=function(e){return Object.prototype.toString.call(e)},ea=function(e){return e instanceof Date?e.getTime():da(e)?e.map(ea):e&&typeof e.toJSON=="function"?e.toJSON():e},eW=function(e){return e??null},da=pg("Array"),tW=pg("Object"),CC=pg("Function"),nW=function(e,t){return e.hasOwnProperty(t)&&!CC(e[t])},oW=function(e){return e&&(e.constructor===Object||e.constructor===Array||e.constructor.toString()==="function Object() { [native code] }"||e.constructor.toString()==="function Array() { [native code] }")&&!e.toJSON},Ip=function(e,t){if(e==null&&e==t||e===t)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(t))return!1;if(da(e)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(!Ip(e[n],t[n]))return!1;return!0}else if(tW(e)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!Ip(e[i],t[i]))return!1;return!0}return!1},Pp=function(e,t,n,o,i,r){var a=t[o];if(da(e)&&isNaN(Number(a))&&!nW(e,a)){for(var s=0,l=e.length;s<l;s++)if(!Pp(e[s],t,n,o,s,e))return!1}return o===t.length||e==null?n(e,i,r,o===0,o===t.length):Pp(e[a],t,n,o+1,a,e)},lo=function(){function e(t,n,o,i){this.params=t,this.owneryQuery=n,this.options=o,this.name=i,this.init()}return e.prototype.init=function(){},e.prototype.reset=function(){this.done=!1,this.keep=!1},e}(),fg=function(e){$t(t,e);function t(n,o,i,r){var a=e.call(this,n,o,i)||this;return a.children=r,a}return t.prototype.reset=function(){this.keep=!1,this.done=!1;for(var n=0,o=this.children.length;n<o;n++)this.children[n].reset()},t.prototype.childrenNext=function(n,o,i,r,a){for(var s=!0,l=!0,c=0,u=this.children.length;c<u;c++){var d=this.children[c];if(d.done||d.next(n,o,i,r,a),d.keep||(l=!1),d.done){if(!d.keep)break}else s=!1}this.done=s,this.keep=l},t}(lo),kC=function(e){$t(t,e);function t(n,o,i,r,a){var s=e.call(this,n,o,i,r)||this;return s.name=a,s}return t}(fg),iW=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.next=function(n,o,i,r){this.childrenNext(n,o,i,r)},t}(fg),Ap=function(e){$t(t,e);function t(n,o,i,r,a){var s=e.call(this,o,i,r,a)||this;return s.keyPath=n,s.propop=!0,s._nextNestedValue=function(l,c,u,d,h){return s.childrenNext(l,c,u,d,h),!s.done},s}return t.prototype.next=function(n,o,i){Pp(n,this.keyPath,this._nextNestedValue,0,o,i)},t}(fg),gg=function(e,t){if(e instanceof Function)return e;if(e instanceof RegExp)return function(o){var i=typeof o=="string"&&e.test(o);return e.lastIndex=0,i};var n=ea(e);return function(o){return t(n,ea(o))}},gi=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){this._test=gg(this.params,this.options.compare)},t.prototype.next=function(n,o,i){(!Array.isArray(i)||i.hasOwnProperty(o))&&this._test(n,o,i)&&(this.done=!0,this.keep=!0)},t}(lo),rW=function(e){return function(t,n,o,i){return e(t,n,o,i)}},sd=function(e){return rW(function(t,n,o,i){var r=typeof ea(t),a=e(t);return new gi(function(s){var l=eW(s);return typeof ea(l)===r&&a(l)},n,o,i)})},aW=function(e,t,n,o){var i=o.operations[e];return i||SC(e),i(t,n,o,e)},SC=function(e){throw new Error("Unsupported operation: ".concat(e))},$C=function(e,t){for(var n in e)if(t.operations.hasOwnProperty(n)||n.charAt(0)==="$")return!0;return!1},sW=function(e,t,n,o,i){if($C(t,i)){var r=EC(t,n,i),a=r[0],s=r[1];if(s.length)throw new Error("Property queries must contain only operations, or exact objects.");return new Ap(e,t,o,i,a)}return new Ap(e,t,o,i,[new gi(t,o,i)])},ha=function(e,t,n){t===void 0&&(t=null);var o=n===void 0?{}:n,i=o.compare,r=o.operations,a={compare:i||Ip,operations:Object.assign({},r||{})},s=EC(e,null,a),l=s[0],c=s[1],u=[];return l.length&&u.push(new Ap([],e,t,a,l)),u.push.apply(u,c),u.length===1?u[0]:new iW(e,t,a,u)},EC=function(e,t,n){var o=[],i=[];if(!oW(e))return o.push(new gi(e,e,n)),[o,i];for(var r in e)if(n.operations.hasOwnProperty(r)){var a=aW(r,e[r],e,n);if(a&&!a.propop&&t&&!n.operations[t])throw new Error("Malformed query. ".concat(r," cannot be matched against property."));a!=null&&o.push(a)}else r.charAt(0)==="$"?SC(r):i.push(sW(r.split("."),e[r],r,e,n));return[o,i]},lW=function(e){return function(t,n,o){return e.reset(),e.next(t,n,o),e.keep}},cW=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){this._test=gg(this.params,this.options.compare)},t.prototype.reset=function(){e.prototype.reset.call(this),this.keep=!0},t.prototype.next=function(n){this._test(n)&&(this.done=!0,this.keep=!1)},t}(lo),uW=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){if(!this.params||typeof this.params!="object")throw new Error("Malformed query. $elemMatch must by an object.");this._queryOperation=ha(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(n){if(da(n)){for(var o=0,i=n.length;o<i;o++){this._queryOperation.reset();var r=n[o];this._queryOperation.next(r,o,n,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},t}(lo),dW=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){this._queryOperation=ha(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(n,o,i,r){this._queryOperation.next(n,o,i,r),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},t}(lo),TC=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){},t.prototype.next=function(n){da(n)&&n.length===this.params&&(this.done=!0,this.keep=!0)},t}(lo),OC=function(e){if(e.length===0)throw new Error("$and/$or/$nor must be a nonempty array")},IC=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!1,n}return t.prototype.init=function(){var n=this;OC(this.params),this._ops=this.params.map(function(o){return ha(o,null,n.options)})},t.prototype.reset=function(){this.done=!1,this.keep=!1;for(var n=0,o=this._ops.length;n<o;n++)this._ops[n].reset()},t.prototype.next=function(n,o,i){for(var r=!1,a=!1,s=0,l=this._ops.length;s<l;s++){var c=this._ops[s];if(c.next(n,o,i),c.keep){r=!0,a=c.keep;break}}this.keep=a,this.done=r},t}(lo),hW=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!1,n}return t.prototype.next=function(n,o,i){e.prototype.next.call(this,n,o,i),this.keep=!this.keep},t}(IC),PC=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){var n=this,o=Array.isArray(this.params)?this.params:[this.params];this._testers=o.map(function(i){if($C(i,n.options))throw new Error("cannot nest $ under ".concat(n.name.toLowerCase()));return gg(i,n.options.compare)})},t.prototype.next=function(n,o,i){for(var r=!1,a=!1,s=0,l=this._testers.length;s<l;s++){var c=this._testers[s];if(c(n)){r=!0,a=!0;break}}this.keep=a,this.done=r},t}(lo),pW=function(e){$t(t,e);function t(n,o,i,r){var a=e.call(this,n,o,i,r)||this;return a.propop=!0,a._in=new PC(n,o,i,r),a}return t.prototype.next=function(n,o,i,r){this._in.next(n,o,i),da(i)&&!r?this._in.keep?(this.keep=!1,this.done=!0):o==i.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},t.prototype.reset=function(){e.prototype.reset.call(this),this._in.reset()},t}(lo),fW=function(e){$t(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.next=function(n,o,i,r,a){a?i.hasOwnProperty(o)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},t}(lo),gW=function(e){$t(t,e);function t(n,o,i,r){var a=e.call(this,n,o,i,n.map(function(s){return ha(s,o,i)}),r)||this;return a.propop=!1,OC(n),a}return t.prototype.next=function(n,o,i,r){this.childrenNext(n,o,i,r)},t}(kC),mW=function(e){$t(t,e);function t(n,o,i,r){var a=e.call(this,n,o,i,n.map(function(s){return ha(s,o,i)}),r)||this;return a.propop=!0,a}return t.prototype.next=function(n,o,i,r){this.childrenNext(n,o,i,r)},t}(kC),vW=function(e,t,n){return new gi(e,t,n)},bW=function(e,t,n,o){return new cW(e,t,n,o)},yW=function(e,t,n,o){return new IC(e,t,n,o)},xW=function(e,t,n,o){return new hW(e,t,n,o)},wW=function(e,t,n,o){return new uW(e,t,n,o)},_W=function(e,t,n,o){return new pW(e,t,n,o)},CW=function(e,t,n,o){return new PC(e,t,n,o)},kW=sd(function(e){return function(t){return t!=null&&t<e}}),SW=sd(function(e){return function(t){return t===e||t<=e}}),$W=sd(function(e){return function(t){return t!=null&&t>e}}),EW=sd(function(e){return function(t){return t===e||t>=e}}),TW=function(e,t,n){var o=e[0],i=e[1];return new gi(function(r){return ea(r)%o===i},t,n)},OW=function(e,t,n,o){return new fW(e,t,n,o)},IW=function(e,t,n){return new gi(new RegExp(e,t.$options),t,n)},PW=function(e,t,n,o){return new dW(e,t,n,o)},l0={number:function(e){return typeof e=="number"},string:function(e){return typeof e=="string"},bool:function(e){return typeof e=="boolean"},array:function(e){return Array.isArray(e)},null:function(e){return e===null},timestamp:function(e){return e instanceof Date}},AW=function(e,t,n){return new gi(function(o){if(typeof e=="string"){if(!l0[e])throw new Error("Type alias does not exist");return l0[e](o)}return o!=null?o instanceof e||o.constructor===e:!1},t,n)},RW=function(e,t,n,o){return new gW(e,t,n,o)},DW=function(e,t,n,o){return new mW(e,t,n,o)},VW=function(e,t,n){return new TC(e,t,n,"$size")},MW=function(){return null},NW=function(e,t,n){var o;if(CC(e))o=e;else if(!Jj.CSP_ENABLED)o=new Function("obj","return "+e);else throw new Error('In CSP mode, sift does not support strings in "$where" condition');return new gi(function(i){return o.bind(i)(i)},t,n)},LW=Object.freeze({__proto__:null,$Size:TC,$all:DW,$and:RW,$elemMatch:wW,$eq:vW,$exists:OW,$gt:$W,$gte:EW,$in:CW,$lt:kW,$lte:SW,$mod:TW,$ne:bW,$nin:_W,$nor:xW,$not:PW,$options:MW,$or:yW,$regex:IW,$size:VW,$type:AW,$where:NW}),FW=function(e,t,n){var o=n===void 0?{}:n,i=o.compare,r=o.operations;return ha(e,t,{compare:i,operations:Object.assign({},LW,r||{})})},BW=function(e,t){t===void 0&&(t={});var n=FW(e,null,t);return lW(n)};function zW(e,{formState:t}){return e.find(n=>{if(n.filter){const o={},i=Object.keys(t);return Object.entries(t).forEach(([r,a])=>{(r.includes(".")||i.every(s=>s===r?!0:!s.startsWith(r)))&&(o[r]=a)}),[v8(o)].filter(BW(n.filter)).length>0}return n.regex?new RegExp(n.regex).test(t[n.property]):t[n.property]===n.value})}const HW={class:"grid grid-cols-8 gap-x-4 gap-y-4"},jW={key:0,class:"text-red-500"},WW={key:1,class:"text-red-500 text-xs"},UW=O({__name:"DynamicForm",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=xt(Vt),o=n.useStore(p=>li(p.values)),i=(p=8,m,f)=>{let b=`col-span-${p}`;return m&&(b+=` col-start-${m}`),f&&(b+=` col-start-${m}`),b},r=p=>e.baseKey?`${e.baseKey}.${p}`:p,a=I(()=>{const p=JSON.parse(JSON.stringify(e.configMap));if(p.anyOf){p.anyOf.forEach(f=>{f.required.forEach(b=>{p.properties&&p.properties[b]&&(p.properties[b].ui.hidden=!0)})});const m=[];p.anyOf.forEach(f=>{Object.keys(f.properties).every(v=>{if(o.value[r(v)]?.toString()===f.properties[v]?.const?.toString())return!0})&&m.push(f)}),m.length>0&&m.forEach(f=>{f.required.forEach(b=>{p.properties&&p.properties[b]&&(p.properties[b].ui.hidden=!1)})})}return p}),s=p=>{const m=a.value?.properties[p];let f={id:r(p),name:r(p)};if(m.type==="conditional"){const{conditions:b,...v}=m,y=b?zW(b,{formState:o.value}):null;f={...f,...v,...y}}else f={...f,...m};return f},l=I(()=>{{const p=[];return a.value?.properties&&(e.currentStep?.properties?e.currentStep.properties.forEach(m=>{Object.keys(a?.value?.properties).find(b=>b===m)&&(a.value?.properties[m].ui?.hidden||p.push(s(m)))}):Object.keys(a?.value?.properties).forEach(m=>{a.value?.properties[m].ui?.hidden||p.push(s(m))})),p}}),c=["credential","nested","connection","sage","Repeater","agent","advancedJdbcUrlGroup","jdbcurlgroup","nestedcollapse","inputrepeater"],u=["evaluate","infoBanner"],d=p=>{if(p.ui?.widget)switch(p.ui?.widget?.toLowerCase()){case"divider":return"hr";case"header":return"h5";case"radio":return l8;case"credential":return R8;case"nested":return V8;case"input":return lh;case"password":return N8;case"select":return F8;case"sqltree":return z8;case"apitree":return j8;case"sage":case"sagev2":return tz;case"connection":return oz;case"fileupload":return sz;case"repeater":return Sz;case"connectionselector":return Ez;case"switcher":return Oz;case"agent":return Kz;case"agentselector":return Zz;case"advancedjdbcurlgroup":return CH;case"jdbcurlgroup":return SH;case"nestedcollapse":return EH;case"apiselect":return OH;case"checkbox":return DH;case"date":return r7;case"inputnumber":return s7;case"inputrepeater":return f7;case"evaluate":return m7;case"dsntreemap":return D7;case"infobanner":return j9;case"apitreeselect":return mj;case"glossaryselector":return bj;default:return p.ui.widget}else switch(p.type){case"string":case"number":return lh;case"boolean":return a8;case"array":return"Select";case"object":return"Form";case"code":return"CodeBlock";case"banner":return"Banner";default:return lh}};async function h(){if(await n.handleSubmit(),!n.state.isValid)throw new Error("Form is invalid");return n.state.values}return t({validate:h}),(p,m)=>(w(),M("div",HW,[(w(!0),M(Se,null,Ie(g(l),f=>(w(),M(Se,{key:`${f.id}`},[f.ui?.hidden?oe("",!0):(w(),M("div",{key:0,class:L(i(f.ui?.grid,f.ui?.start,f.ui?.end))},[c.includes(f?.ui?.widget)?(w(),E(At(d(f)),{key:0,property:f},null,8,["property"])):u.includes(f?.ui?.widget)?(w(),E(At(d(f)),{key:1,property:f},null,8,["property"])):(w(),E(g(n).Field,{key:2,name:f.id,validators:g(Zj)(f)},{default:C(({field:b})=>[f.ui?.label?(w(),E(g(Bf),{key:0},{default:C(()=>[Ne(se(f.ui?.label)+" ",1),f?.required?(w(),M("span",jW," * ")):oe("",!0)]),_:2},1024)):oe("",!0),(w(),E(At(d(f)),{field:b,"base-key":e.baseKey,property:f},null,8,["field","base-key","property"])),b.state.meta.isTouched&&!b.state.meta.isValid?(w(),M("span",WW,se(b.state.meta.errors.join(", ")),1)):oe("",!0)]),_:2},1032,["name","validators"]))],2))],64))),128))]))}}),AC=Object.assign(UW,{__name:"DynamicForm"}),mi=Object.freeze(Object.defineProperty({__proto__:null,default:AC},Symbol.toStringTag,{value:"Module"})),Br=new WeakMap,Bc=new WeakMap,Cu={current:[]};let xh=!1,ks=0;const ls=new Set,ac=new Map;function RC(e){const t=Array.from(e).sort((n,o)=>n instanceof Io&&n.options.deps.includes(o)?1:o instanceof Io&&o.options.deps.includes(n)?-1:0);for(const n of t){if(Cu.current.includes(n))continue;Cu.current.push(n),n.recompute();const o=Bc.get(n);if(o)for(const i of o){const r=Br.get(i);r&&RC(r)}}}function GW(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function qW(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function DC(e){if(ks>0&&!ac.has(e)&&ac.set(e,e.prevState),ls.add(e),!(ks>0)&&!xh)try{for(xh=!0;ls.size>0;){const t=Array.from(ls);ls.clear();for(const n of t){const o=ac.get(n)??n.prevState;n.prevState=o,GW(n)}for(const n of t){const o=Br.get(n);o&&(Cu.current.push(n),RC(o))}for(const n of t){const o=Br.get(n);if(o)for(const i of o)qW(i)}}}finally{xh=!1,Cu.current=[],ac.clear()}}function qn(e){ks++;try{e()}finally{if(ks--,ks===0){const t=ls.values().next().value;t&&DC(t)}}}function YW(e){return typeof e=="function"}class ku{constructor(t,n){this.listeners=new Set,this.subscribe=o=>{var i,r;this.listeners.add(o);const a=(r=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:r.call(i,o,this);return()=>{this.listeners.delete(o),a?.()}},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):YW(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),DC(this)}}class Io{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 r=0;r<n;r++){const a=this.options.deps[r];o[r]=a.prevState,i[r]=a.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 r of this.options.deps)r instanceof Io&&r.checkIfRecalculationNeededDeeply();let n=!1;const o=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let r=0;r<i.length;r++)if(i[r]!==o[r]){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 r=(i=(o=this.options).onSubscribe)==null?void 0:i.call(o,n,this);return()=>{this.listeners.delete(n),r?.()}},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 Io)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof ku){let o=Br.get(n);o||(o=new Set,Br.set(n,o)),o.add(this);let i=Bc.get(this);i||(i=new Set,Bc.set(this,i)),i.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof Io)this.unregisterFromGraph(n.options.deps);else if(n instanceof ku){const o=Br.get(n);o&&o.delete(this);const i=Bc.get(this);i&&i.delete(n)}}}function KW(e){return typeof e=="function"}function c0(e,...t){return KW(e)?e(...t):e}function XW(e){return e||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"")}class VC{#n=!0;#e;#t;#r;#o;#i;#a;#s;#c=0;#d=5;#u=()=>{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.#u)};#l=()=>{if(this.#t().addEventListener("tanstack-connect-success",this.#u),this.#c<this.#d){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.#r=n,this.debugLog(" Initializing event subscription for plugin",this.#e),this.#o=[],this.#i=!1,this.#a=null,this.#s=i}startConnectLoop(){this.#a!==null||this.#i||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#a=setInterval(this.#l,this.#s))}stopConnectLoop(){this.#a!==null&&(clearInterval(this.#a),this.#a=null,this.debugLog("Stopped connect loop"))}debugLog(...t){this.#r&&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=r=>{this.debugLog("Received event from bus",r.detail),n(r.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 ZW extends VC{constructor(t){super({pluginId:"pacer",debug:t?.debug})}}const JW=(e,t)=>{MC.emit(e,t)},MC=new ZW;function u0(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}const QW={enabled:!0,leading:!0,trailing:!0,wait:0};class eU{constructor(t,n){this.fn=t,this.store=new ku(u0()),this.setOptions=o=>{this.options={...this.options,...o},this.#t()||this.cancel()},this.#e=o=>{this.store.setState(i=>{const r={...i,...o},{isPending:a}=r;return{...r,status:this.#t()?a?"pending":"idle":"disabled"}}),JW("Throttler",this)},this.#t=()=>!!c0(this.options.enabled,this),this.#r=()=>c0(this.options.wait,this),this.maybeExecute=(...o)=>{this.#e({maybeExecuteCount:this.store.state.maybeExecuteCount+1});const i=Date.now(),r=i-this.store.state.lastExecutionTime,a=this.#r();if(this.options.leading&&r>=a)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=a-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(),r=i+this.#r();this.#i(),this.#e({executionCount:this.store.state.executionCount+1,lastExecutionTime:i,nextExecutionTime:r,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(o,this),setTimeout(()=>{this.store.state.isPending||this.#e({nextExecutionTime:void 0})},this.#r())},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(u0())},this.key=XW(n.key),this.options={...QW,...n},this.#e(this.options.initialState??{}),MC.on("d-Throttler",o=>{o.payload.key===this.key&&(this.#e(o.payload.store.state),this.setOptions(o.payload.options))})}#n;#e;#t;#r;#o;#i}function tU(e,t){return new eU(e,t).maybeExecute}function NC(e,t){return typeof e=="function"?e(t):e}function cs(e,t){return mg(t).reduce((o,i)=>{if(o===null)return null;if(typeof o<"u")return o[i]},e)}function sc(e,t,n){const o=mg(t);function i(r){if(!o.length)return NC(n,r);const a=o.shift();if(typeof a=="string"||typeof a=="number"&&!Array.isArray(r))return typeof r=="object"?(r===null&&(r={}),{...r,[a]:i(r[a])}):{[a]:i()};if(Array.isArray(r)&&typeof a=="number"){const s=r.slice(0,a);return[...s.length?s:new Array(a),i(r[a]),...r.slice(a+1)]}return[...new Array(a),i()]}return i(e)}function nU(e,t){const n=mg(t);function o(i){if(!i)return;if(n.length===1){const a=n[0];if(Array.isArray(i)&&typeof a=="number")return i.filter((c,u)=>u!==a);const{[a]:s,...l}=i;return l}const r=n.shift();if(typeof r=="string"&&typeof i=="object")return{...i,[r]:o(i[r])};if(typeof r=="number"&&Array.isArray(i)){if(r>=i.length)return i;const a=i.slice(0,r);return[...a.length?a:new Array(r),o(i[r]),...i.slice(r+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return o(e)}const oU=/^(\d+)$/gm,iU=/\.(\d+)(?=\.)/gm,rU=/^(\d+)\./gm,aU=/\.(\d+$)/gm,sU=/\.{2,}/gm,Rp="__int__",lc=`${Rp}$1`;function mg(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(oU,lc).replace(iU,`.${lc}.`).replace(rU,`${lc}.`).replace(aU,`.${lc}`).replace(sU,".").split(".").map(t=>{if(t.startsWith(Rp)){const n=t.substring(Rp.length),o=parseInt(n,10);return String(o)===n?o:n}return t})}function lU(e){return!(Array.isArray(e)&&e.length===0)}function Dp(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 Vp(e,t){const{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:o,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:r}=t.validators||{},a=n??0,s=l=>l.validators.filter(Boolean).map(c=>{const u=c?.cause||e;let d=a;switch(u){case"change":d=i??a;break;case"blur":d=o??a;break;case"dynamic":d=r??a;break;case"submit":d=0;break}return e==="submit"&&(d=0),{cause:u,validate:c.fn,debounceMs:d}});return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!0},runValidation:s})}const Mp=e=>!!e&&typeof e=="object"&&"fields"in e;function Ir(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,r]of e)if(!t.has(i)||!Object.is(r,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)||!Ir(e[i],t[i]))return!1;return!0}const d0=({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},h0=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:"field"}:e?{newErrorValue:e,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function zt(e,t){return e==null?t:{...e,...t}}let Mi=256;const zc=[];let cc;for(;Mi--;)zc[Mi]=(Mi+256).toString(16).substring(1);function cU(){let e=0,t,n="";if(!cc||Mi+16>256){for(cc=new Array(256),e=256;e--;)cc[e]=256*Math.random()|0;e=0,Mi=0}for(;e<16;e++)t=cc[Mi+e],e===6?n+=zc[t&15|64]:e===8?n+=zc[t&63|128]:n+=zc[t],e&1&&e>1&&e<11&&(n+="-");return Mi++,n}const Mr=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"},r={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:"submit"},a=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,r,a],form:e.form});case"server":return e.runValidation({validators:[],form:e.form});case"blur":return e.runValidation({validators:[i,a],form:e.form});case"change":return e.runValidation({validators:[o,a],form:e.form});default:throw new Error(`Unknown validation event type: ${e.event.type}`)}};function uU(e,t){const n=new Map;for(const o of e){const i=o.path??[];let r=t,a="";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,u=Number(c);Array.isArray(r)&&!Number.isNaN(u)?a+=`[${u}]`:a+=(s>0?".":"")+String(c),typeof r=="object"&&r!==null?r=r[c]:r=void 0}n.set(a,(n.get(a)??[]).concat(o))}return Object.fromEntries(n)}const p0=(e,t)=>{const n=uU(e,t);return{form:n,fields:n}},zr={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:p0(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:p0(o.issues,e)}},LC=e=>!!e&&"~standard"in e,Su={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function uc(e){function t(d,h,p,m){const f=o(d,h,p,m);({insert:()=>s(f,d,h),remove:()=>l(f),swap:()=>m!==void 0&&u(f,d,h,m),move:()=>m!==void 0&&c(f,d,h,m)})[p]()}function n(d,h){return`${d}[${h}]`}function o(d,h,p,m){const f=[n(d,h)];if(p==="swap")f.push(n(d,m));else if(p==="move"){const[b,v]=[Math.min(h,m),Math.max(h,m)];for(let y=b;y<=v;y++)f.push(n(d,y))}else{const b=e.getFieldValue(d),v=Array.isArray(b)?b.length:0;for(let y=h+1;y<v;y++)f.push(n(d,y))}return Object.keys(e.fieldInfo).filter(b=>f.some(v=>b.startsWith(v)))}function i(d,h){return d.replace(/\[(\d+)\]/,(p,m)=>{const f=parseInt(m,10);return`[${h==="up"?f+1:Math.max(0,f-1)}]`})}function r(d,h){(h==="up"?d:[...d].reverse()).forEach(m=>{const f=i(m.toString(),h),b=e.getFieldMeta(f);b?e.setFieldMeta(m,b):e.setFieldMeta(m,a())})}const a=()=>Su,s=(d,h,p)=>{r(d,"down"),d.forEach(m=>{m.toString().startsWith(n(h,p))&&e.setFieldMeta(m,a())})},l=d=>{r(d,"up")},c=(d,h,p,m)=>{const f=new Map(Object.keys(e.fieldInfo).filter(b=>b.startsWith(n(h,p))).map(b=>[b,e.getFieldMeta(b)]));r(d,p<m?"up":"down"),Object.keys(e.fieldInfo).filter(b=>b.startsWith(n(h,m))).forEach(b=>{const v=b.replace(n(h,m),n(h,p)),y=f.get(v);y&&e.setFieldMeta(b,y)})},u=(d,h,p,m)=>{d.forEach(f=>{if(!f.toString().startsWith(n(h,p)))return;const b=f.toString().replace(n(h,p),n(h,m)),[v,y]=[e.getFieldMeta(f),e.getFieldMeta(b)];v&&e.setFieldMeta(b,v),y&&e.setFieldMeta(f,y)})};return{handleArrayFieldMetaShift:t}}class dU extends VC{constructor(){super({pluginId:"form-devtools"})}}const mn=new dU;function wh(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 hU{constructor(t){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const o=this.fieldMetaDerived.mount(),i=this.store.mount(),r=()=>{o(),i(),mn.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:a}=this.options.validators||{};return mn.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync("mount"),r},this.update=o=>{if(!o)return;const i=this.options;this.options=o;const r=!!o.transform?.deps?.some((l,c)=>l!==this.prevTransformArray[c]),a=o.defaultValues&&!Ir(o.defaultValues,i.defaultValues)&&!this.state.isTouched,s=!Ir(o.defaultState,i.defaultState)&&!this.state.isTouched;!a&&!s&&!r||(qn(()=>{this.baseStore.setState(()=>wh(Object.assign({},this.state,s?o.defaultState:{},a?{values:o.defaultValues}:{},r?{_force_re_eval:!this.state._force_re_eval}:{})))}),mn.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(o,i)=>{const{fieldMeta:r}=this.state,a=this.resetFieldMeta(r);o&&!i?.keepDefaultValues&&(this.options={...this.options,defaultValues:o}),this.baseStore.setState(()=>wh({...this.options.defaultState,values:o??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:a}))},this.validateAllFields=async o=>{const i=[];return qn(()=>{Object.values(this.fieldInfo).forEach(a=>{if(!a.instance)return;const s=a.instance;i.push(Promise.resolve().then(()=>s.validate(o,{skipFormValidation:!0}))),a.instance.state.meta.isTouched||a.instance.setMeta(l=>({...l,isTouched:!0}))})}),(await Promise.all(i)).flat()},this.validateArrayFieldsStartingFrom=async(o,i,r)=>{const a=this.getFieldValue(o),s=Array.isArray(a)?Math.max(a.length-1,0):null,l=[`${o}[${i}]`];for(let h=i+1;h<=(s??0);h++)l.push(`${o}[${h}]`);const c=Object.keys(this.fieldInfo).filter(h=>l.some(p=>h.startsWith(p))),u=[];return qn(()=>{c.forEach(h=>{u.push(Promise.resolve().then(()=>this.validateField(h,r)))})}),(await Promise.all(u)).flat()},this.validateField=(o,i)=>{const r=this.fieldInfo[o]?.instance;return r?(r.state.meta.isTouched||r.setMeta(a=>({...a,isTouched:!0})),r.validate(i)):[]},this.validateSync=o=>{const i=Dp(o,{...this.options,form:this,validationLogic:this.options.validationLogic||Mr});let r=!1;const a={};return qn(()=>{for(const c of i){if(!c.validate)continue;const u=this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:d,fieldErrors:h}=Hc(u),p=Ja(c.cause);for(const m of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[m]===void 0)continue;const f=this.getFieldMeta(m);if(!f)continue;const{errorMap:b,errorSourceMap:v}=f,y=h?.[m],{newErrorValue:x,newSource:_}=d0({newFormValidatorError:y,isPreviousErrorFromFormValidator:v?.[p]==="form",previousErrorValue:b?.[p]});_==="form"&&(a[m]={...a[m],[p]:y}),b?.[p]!==x&&this.setFieldMeta(m,k=>({...k,errorMap:{...k.errorMap,[p]:x},errorSourceMap:{...k.errorSourceMap,[p]:_}}))}this.state.errorMap?.[p]!==d&&this.baseStore.setState(m=>({...m,errorMap:{...m.errorMap,[p]:d}})),(d||h)&&(r=!0)}const s=Ja("submit");this.state.errorMap?.[s]&&o!=="submit"&&!r&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[s]:void 0}}));const l=Ja("server");this.state.errorMap?.[l]&&o!=="server"&&!r&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[l]:void 0}}))}),{hasErrored:r,fieldsErrorMap:a}},this.validateAsync=async o=>{const i=Vp(o,{...this.options,form:this,validationLogic:this.options.validationLogic||Mr});this.state.isFormValidating||this.baseStore.setState(c=>({...c,isFormValidating:!0}));const r=[];let a;for(const c of i){if(!c.validate)continue;const u=Ja(c.cause);this.state.validationMetaMap[u]?.lastAbortController.abort();const h=new AbortController;this.state.validationMetaMap[u]={lastAbortController:h},r.push(new Promise(async p=>{let m;try{m=await new Promise((y,x)=>{setTimeout(async()=>{if(h.signal.aborted)return y(void 0);try{y(await this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:h.signal},type:"validateAsync"}))}catch(_){x(_)}},c.debounceMs)})}catch(y){m=y}const{formError:f,fieldErrors:b}=Hc(m);b&&(a=a?{...a,...b}:b);const v=Ja(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:_,errorSourceMap:k}=x,$=a?.[y],{newErrorValue:A,newSource:S}=d0({newFormValidatorError:$,isPreviousErrorFromFormValidator:k?.[v]==="form",previousErrorValue:_?.[v]});_?.[v]!==A&&this.setFieldMeta(y,R=>({...R,errorMap:{...R.errorMap,[v]:A},errorSourceMap:{...R.errorSourceMap,[v]:S}}))}this.baseStore.setState(y=>({...y,errorMap:{...y.errorMap,[v]:f}})),p(a?{fieldErrors:a,errorMapKey:v}:void 0)}))}let s=[];const l={};if(r.length){s=await Promise.all(r);for(const c of s)if(c?.fieldErrors){const{errorMapKey:u}=c;for(const[d,h]of Object.entries(c.fieldErrors)){const m={...l[d]||{},[u]:h};l[d]=m}}}return this.baseStore.setState(c=>({...c,isFormValidating:!1})),l},this.validate=o=>{const{hasErrored:i,fieldsErrorMap:r}=this.validateSync(o);return i&&!this.options.asyncAlways?r:this.validateAsync(o)},this.getFieldValue=o=>cs(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(r=>({...r,fieldMetaBase:{...r.fieldMetaBase,[o]:NC(i,r.fieldMetaBase[o])}}))},this.resetFieldMeta=o=>Object.keys(o).reduce((i,r)=>{const a=r;return i[a]=Su,i},{}),this.setFieldValue=(o,i,r)=>{const a=r?.dontUpdateMeta??!1,s=r?.dontRunListeners??!1,l=r?.dontValidate??!1;qn(()=>{a||this.setFieldMeta(o,c=>({...c,isTouched:!0,isDirty:!0,errorMap:{...c?.errorMap,onMount:void 0}})),this.baseStore.setState(c=>({...c,values:sc(c.values,o,i)}))}),s||this.getFieldInfo(o).instance?.triggerOnChangeListener(),l||this.validateField(o,"change")},this.deleteField=o=>{const r=[...Object.keys(this.fieldInfo).filter(a=>{const s=o.toString();return a!==s&&a.startsWith(s)}),o];this.baseStore.setState(a=>{const s={...a};return r.forEach(l=>{s.values=nU(s.values,l),delete this.fieldInfo[l],delete s.fieldMetaBase[l]}),s})},this.pushFieldValue=(o,i,r)=>{this.setFieldValue(o,a=>[...Array.isArray(a)?a:[],i],r)},this.insertFieldValue=async(o,i,r,a)=>{this.setFieldValue(o,l=>[...l.slice(0,i),r,...l.slice(i)],zt(a,{dontValidate:!0}));const s=a?.dontValidate??!1;s||await this.validateField(o,"change"),uc(this).handleArrayFieldMetaShift(o,i,"insert"),s||await this.validateArrayFieldsStartingFrom(o,i,"change")},this.replaceFieldValue=async(o,i,r,a)=>{this.setFieldValue(o,l=>l.map((c,u)=>u===i?r:c),zt(a,{dontValidate:!0})),(a?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.removeFieldValue=async(o,i,r)=>{const a=this.getFieldValue(o),s=Array.isArray(a)?Math.max(a.length-1,0):null;if(this.setFieldValue(o,c=>c.filter((u,d)=>d!==i),zt(r,{dontValidate:!0})),uc(this).handleArrayFieldMetaShift(o,i,"remove"),s!==null){const c=`${o}[${s}]`;this.deleteField(c)}(r?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.swapFieldValues=(o,i,r,a)=>{this.setFieldValue(o,l=>{const c=l[i],u=l[r];return sc(sc(l,`${i}`,u),`${r}`,c)},zt(a,{dontValidate:!0})),uc(this).handleArrayFieldMetaShift(o,i,"swap",r),(a?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${r}]`,"change"))},this.moveFieldValues=(o,i,r,a)=>{this.setFieldValue(o,l=>{const c=[...l];return c.splice(r,0,c.splice(i,1)[0]),c},zt(a,{dontValidate:!0})),uc(this).handleArrayFieldMetaShift(o,i,"move",r),(a?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${r}]`,"change"))},this.clearFieldValues=(o,i)=>{const r=this.getFieldValue(o),a=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(o,[],zt(i,{dontValidate:!0})),a!==null)for(let l=0;l<=a;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]:Su},values:this.options.defaultValues?sc(i.values,o,cs(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,r])=>(Object.keys(r).length&&r.errors.length&&(o[i]={errors:r.errors,errorMap:r.errorMap}),o),{})}),this.parseValuesWithSchema=o=>zr.validate({value:this.state.values,validationSource:"form"},o),this.parseValuesWithSchemaAsync=o=>zr.validateAsync({value:this.state.values,validationSource:"form"},o),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=t?.formId??cU(),this._devtoolsSubmissionOverride=!1,this.baseStore=new ku(wh({...t?.defaultState,values:t?.defaultValues??t?.defaultState?.values})),this.fieldMetaDerived=new Io({deps:[this.baseStore],fn:({prevDepVals:o,currDepVals:i,prevVal:r})=>{const a=r,s=o?.[0],l=i[0];let c=0;const u={};for(const d of Object.keys(l.fieldMetaBase)){const h=l.fieldMetaBase[d],p=s?.fieldMetaBase[d],m=a?.[d],f=cs(l.values,d);let b=m?.errors;if(!p||h.errorMap!==p.errorMap){b=Object.values(h.errorMap??{}).filter(k=>k!==void 0);const _=this.getFieldInfo(d)?.instance;_&&!_.options.disableErrorFlat&&(b=b?.flat(1))}const v=!lU(b??[]),y=!h.isDirty,x=Ir(f,cs(this.options.defaultValues,d))||Ir(f,this.getFieldInfo(d)?.instance?.options.defaultValue);if(m&&m.isPristine===y&&m.isValid===v&&m.isDefaultValue===x&&m.errors===b&&h===p){u[d]=m,c++;continue}u[d]={...h,errors:b,isPristine:y,isValid:v,isDefaultValue:x}}return Object.keys(l.fieldMetaBase).length&&a&&c===Object.keys(l.fieldMetaBase).length?a:u}}),this.store=new Io({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:o,currDepVals:i,prevVal:r})=>{const a=r,s=o?.[0],l=i[0],c=i[1],u=Object.values(c).filter(Boolean),d=u.some(z=>z.isValidating),h=u.every(z=>z.isValid),p=u.some(z=>z.isTouched),m=u.some(z=>z.isBlurred),f=u.every(z=>z.isDefaultValue),b=p&&l.errorMap?.onMount,v=u.some(z=>z.isDirty),y=!v,x=!!(l.errorMap?.onMount||u.some(z=>z?.errorMap?.onMount)),_=!!d;let k=a?.errors??[];(!s||l.errorMap!==s.errorMap)&&(k=Object.values(l.errorMap).reduce((z,W)=>W===void 0?z:W&&Mp(W)?(z.push(W.form),z):(z.push(W),z),[]));const $=k.length===0,A=h&&$,S=this.options.canSubmitWhenInvalid??!1,R=l.submissionAttempts===0&&!p&&!x||!_&&!l.isSubmitting&&A||S;let F=l.errorMap;if(b&&(k=k.filter(z=>z!==l.errorMap.onMount),F=Object.assign(F,{onMount:void 0})),a&&s&&a.errorMap===F&&a.fieldMeta===this.fieldMetaDerived.state&&a.errors===k&&a.isFieldsValidating===d&&a.isFieldsValid===h&&a.isFormValid===$&&a.isValid===A&&a.canSubmit===R&&a.isTouched===p&&a.isBlurred===m&&a.isPristine===y&&a.isDefaultValue===f&&a.isDirty===v&&Ir(s,l))return a;let P={...l,errorMap:F,fieldMeta:this.fieldMetaDerived.state,errors:k,isFieldsValidating:d,isFieldsValid:h,isFormValid:$,isValid:A,canSubmit:R,isTouched:p,isBlurred:m,isPristine:y,isDefaultValue:f,isDirty:v};const G=this.options.transform?.deps??[];if(G.length!==this.prevTransformArray.length||G.some((z,W)=>z!==this.prevTransformArray[W])){const z=Object.assign({},this,{state:P});this.options.transform?.fn(z),P=z.state,this.prevTransformArray=G}return P}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(t||{});const n=tU(o=>mn.emit("form-state",{id:this._formId,state:o}),{wait:300});this.store.subscribe(()=>{n(this.store.state)}),mn.on("request-form-state",o=>{o.payload.id===this._formId&&mn.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),mn.on("request-form-reset",o=>{o.payload.id===this._formId&&this.reset()}),mn.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 LC(t.validate)?zr[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})),qn(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance&&(i.instance.state.meta.isTouched||i.instance.setMeta(r=>({...r,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}),mn.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}),mn.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}qn(()=>{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}),qn(()=>{this.baseStore.setState(i=>({...i,isSubmitted:!0,isSubmitSuccessful:!0})),mn.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),o()})}catch(i){throw this.baseStore.setState(r=>({...r,isSubmitSuccessful:!1})),mn.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:i}),o(),i}}setErrorMap(t){qn(()=>{Object.entries(t).forEach(([n,o])=>{const i=n;if(Mp(o)){const{formError:r,fieldErrors:a}=Hc(o);for(const s of Object.keys(this.fieldInfo))this.getFieldMeta(s)&&this.setFieldMeta(s,c=>({...c,errorMap:{...c.errorMap,[i]:a?.[s]},errorSourceMap:{...c.errorSourceMap,[i]:"form"}}));this.baseStore.setState(s=>({...s,errorMap:{...s.errorMap,[i]:r}}))}else this.baseStore.setState(r=>({...r,errorMap:{...r.errorMap,[i]:o}}))})})}}function Hc(e){if(e){if(Mp(e)){const t=Hc(e.form).formError,n=e.fields;return{formError:t,fieldErrors:n}}return{formError:e}}return{formError:void 0}}function Ja(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 pU{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 r=this.runValidator({validate:i,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});r&&this.setMeta(a=>({...a,errorMap:{...a?.errorMap,onMount:r},errorSourceMap:{...a?.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=cs(n.form.options.defaultValues,n.name),r=n.defaultValue??i;o?this.setValue(a=>a||r,{dontUpdateMeta:!0}):r!==void 0&&this.setValue(r,{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,zt(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,zt(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(n,o,i)=>{this.form.insertFieldValue(this.name,n,o,zt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(n,o,i)=>{this.form.replaceFieldValue(this.name,n,o,zt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(n,o)=>{this.form.removeFieldValue(this.name,n,zt(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(n,o,i)=>{this.form.swapFieldValues(this.name,n,o,zt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(n,o,i)=>{this.form.moveFieldValues(this.name,n,o,zt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=n=>{this.form.clearFieldValues(this.name,zt(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=n=>{const o=Object.values(this.form.fieldInfo),i=[];for(const r of o){if(!r.instance)continue;const{onChangeListenTo:a,onBlurListenTo:s}=r.instance.options.validators||{};n==="change"&&a?.includes(this.name)&&i.push(r.instance),n==="blur"&&s?.includes(this.name)&&i.push(r.instance)}return i},this.validateSync=(n,o)=>{const i=Dp(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||Mr}),a=this.getLinkedFields(n).reduce((c,u)=>{const d=Dp(n,{...u.options,form:u.form,validationLogic:u.form.options.validationLogic||Mr});return d.forEach(h=>{h.field=u}),c.concat(d)},[]);let s=!1;qn(()=>{const c=(u,d)=>{const h=dc(d.cause),p=d.validate?f0(u.runValidator({validate:d.validate,value:{value:u.store.state.value,validationSource:"field",fieldApi:u},type:"validate"})):void 0,m=o[h],{newErrorValue:f,newSource:b}=h0({formLevelError:m,fieldLevelError:p});u.state.meta.errorMap?.[h]!==f&&u.setMeta(v=>({...v,errorMap:{...v.errorMap,[h]:f},errorSourceMap:{...v.errorSourceMap,[h]:b}})),f&&(s=!0)};for(const u of i)c(this,u);for(const u of a)u.validate&&c(u.field,u)});const l=dc("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=Vp(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||Mr}),r=await o,a=this.getLinkedFields(n),s=a.reduce((h,p)=>{const m=Vp(n,{...p.options,form:p.form,validationLogic:p.form.options.validationLogic||Mr});return m.forEach(f=>{f.field=p}),h.concat(m)},[]);this.state.meta.isValidating||this.setMeta(h=>({...h,isValidating:!0}));for(const h of a)h.setMeta(p=>({...p,isValidating:!0}));const l=[],c=[],u=(h,p,m)=>{const f=dc(p.cause);h.getInfo().validationMetaMap[f]?.lastAbortController.abort();const v=new AbortController;this.getInfo().validationMetaMap[f]={lastAbortController:v},m.push(new Promise(async y=>{let x;try{x=await new Promise((S,R)=>{this.timeoutIds.validations[p.cause]&&clearTimeout(this.timeoutIds.validations[p.cause]),this.timeoutIds.validations[p.cause]=setTimeout(async()=>{if(v.signal.aborted)return S(void 0);try{S(await this.runValidator({validate:p.validate,value:{value:h.store.state.value,fieldApi:h,signal:v.signal,validationSource:"field"},type:"validateAsync"}))}catch(F){R(F)}},p.debounceMs)})}catch(S){x=S}if(v.signal.aborted)return y(void 0);const _=f0(x),k=r[this.name]?.[f],{newErrorValue:$,newSource:A}=h0({formLevelError:k,fieldLevelError:_});h.setMeta(S=>({...S,errorMap:{...S?.errorMap,[f]:$},errorSourceMap:{...S.errorSourceMap,[f]:A}})),y($)}))};for(const h of i)h.validate&&u(this,h,l);for(const h of s)h.validate&&u(h.field,h,c);let d=[];(l.length||c.length)&&(d=await Promise.all(l),await Promise.all(c)),this.setMeta(h=>({...h,isValidating:!1}));for(const h of a)h.setMeta(p=>({...p,isValidating:!1}));return d.filter(Boolean)},this.validate=(n,o)=>{if(!this.state.meta.isTouched)return[];const{fieldsErrorMap:i}=o?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(n),{hasErrored:r}=this.validateSync(n,i[this.name]??{});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[dc(n)]?.lastAbortController.abort(),this.state.meta.errors;const a=o?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(n);return this.validateAsync(n,a)},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=>zr.validate({value:this.state.value,validationSource:"field"},n),this.parseValueWithSchemaAsync=n=>zr.validateAsync({value:this.state.value,validationSource:"field"},n),this.form=t.form,this.name=t.name,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new Io({deps:[this.form.store],fn:()=>{const n=this.form.getFieldValue(this.name),o=this.form.getFieldMeta(this.name)??{...Su,...t.defaultMeta};return{value:n,meta:o}}}),this.options=t}get state(){return this.store.state}runValidator(t){return LC(t.validate)?zr[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 f0(e){if(e)return e}function dc(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 Np(e,t=n=>n){const n=fe(t(e.state));return ze(()=>e,(o,i,r)=>{const a=o.subscribe(()=>{const s=t(o.state);fU(ck(n.value),s)||(n.value=s)});r(()=>{a()})},{immediate:!0}),w0(n)}function fU(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 FC(e){const t=(()=>{const r=new pU({...e,form:e.form,name:e.name});return r.Field=BC,r})(),n=Np(t.store,i=>i);let o;return ta(()=>{o=t.mount()}),Hp(()=>{o()}),ze(()=>e,()=>{t.update({...e,form:e.form})}),{api:t,state:n}}const BC=O((e,t)=>{const n=FC({...e,...t.attrs});return()=>t.slots.default({field:n.api,state:n.state.value})},{name:"Field",inheritAttrs:!1});function gU(e){const t=(()=>{const n=new hU(e),o=n;return o.Field=O((i,r)=>()=>Pt(BC,{...i,...r.attrs,form:n},r.slots),{name:"APIField",inheritAttrs:!1}),o.useField=i=>FC({...i,form:n}),o.useStore=i=>Np(n.store,i),o.Subscribe=O((i,r)=>{const s={...i,...r.attrs}.selector??(c=>c),l=Np(n.store,s);return()=>r.slots.default(l.value)},{name:"Subscribe",inheritAttrs:!1}),o})();return ta(t.mount),t.update(e),t}const mU=O({__name:"DynamicFormWrapper",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=e,o=gU({defaultValues:id(n.configMap)}),i=C0("formRef");zp(Vt,o);async function r(){const a=await i.value.validate();return n.currentStep?Qf(a,[...n.currentStep.properties,"credential_guid_body","credential_property_id"]):a}return t({validate:r,form:o}),(a,s)=>{const l=AC;return w(),E(l,U({ref:"formRef"},n),null,16)}}}),vU=Object.assign(mU,{__name:"DynamicFormWrapper"}),Nn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),g0=e=>e.length>4&&e.startsWith("{{")&&e.endsWith("}}"),bU=e=>{if(typeof e!="string")return e;const t=e.trim();if(!t||!t.startsWith("{")&&!t.startsWith("["))return e;try{return JSON.parse(t)}catch{return e}},yU=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t,bU(n)])),xU=e=>typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e),Lp=(e,t)=>{if(typeof e=="string"){let n=e;for(const[o,i]of Object.entries(t)){const r=`{{${o}}}`;if(n===r)return i;n.includes(r)&&(n=n.replaceAll(r,xU(i)))}return n}return Array.isArray(e)?e.map(n=>Lp(n,t)):Nn(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>[n,Lp(o,t)])):e},Fp=e=>Array.isArray(e)?e.map(Fp).filter(t=>!(typeof t=="string"&&g0(t))):Nn(e)?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,Fp(n)]).filter(([,t])=>!(typeof t=="string"&&g0(t)))):e,wU=e=>!Nn(e)||!Nn(e.dag)?null:e.dag,Bp=e=>!Nn(e)||!Nn(e.inputs)?null:e.inputs,_U=e=>{const t=Object.values(e),n=t.find(o=>{const i=Bp(o);return i&&Nn(i.args)&&i.workflow_type!=="PublishWorkflow"})??t.find(o=>{const i=Bp(o);return i&&Nn(i.args)});return Nn(n)?n:null};function CU(e,t){const n=wU(e);if(!n)return null;const o=_U(n),i=Bp(o);if(!i||!Nn(i.args))return null;const r=yU(t),a=Lp(i.args,r),s=Fp(a);return Nn(s)?s:null}async function kU(){const{data:e}=await Xi("configmaps",()=>$fetch("/workflows/v1/configmaps")),{data:t}=await Xi("workflow_manifest",()=>$fetch("/workflows/v1/manifest")),n=I(()=>{const a=e.value?.data??[];return(Array.isArray(a)?a:a.configmaps).find(l=>!l.startsWith("atlan-connectors-")&&!l.startsWith("csa-connectors-")&&l!=="manifest")??"workflow"}),{credentialConfig:o,data:i}=await W_(n),r=I(()=>{const a=i.value?.data,s=a&&"kind"in a?a.metadata?.name:void 0,l=a&&"kind"in a?a.metadata?.name:a?.name,c=a&&"kind"in a?a.metadata?.logo:a?.logo;return{id:s||n.value,name:o.value?.name||l||n.value,logo:o.value?.logo||c||"",config:o.value}});return{workflowConfig:o,workflowMeta:r,workflowManifest:t}}const SU={class:"min-h-screen bg-gray-50 py-8 flex flex-col"},$U={class:"w-[700px] mx-auto px-4 flex flex-col flex-1"},EU={class:"flex items-center justify-between mb-8"},TU={class:"flex items-center gap-4"},OU=["src"],IU={class:"mb-8 overflow-x-auto pb-3"},PU={class:"bg-white rounded-lg shadow-sm p-8 flex gap-8 grow"},AU={class:"flex-1 w-full"},RU={class:"flex justify-between py-3 border-t"},DU={key:2,class:"flex ml-auto gap-x-2"},VU={key:3,class:"flex ml-auto gap-x-2"},XU=O({__name:"index",async setup(e){let t,n;const{workflowConfig:o,workflowMeta:i,workflowManifest:r}=([t,n]=na(()=>kU()),t=await t,n(),t);uk(()=>({title:i.value.name?`${i.value.name} | App Playground`:"App Playground"}));const a=fe(1),s=I(()=>o.value.steps||[]),l=I(()=>s.value?s.value[a.value-1]:{}),c=I(()=>s.value.map(v=>({...v,value:v.id}))),u=fe(!1),d=fe({}),h=fe(""),p=fe(!1),m=C0("formRef");async function f(){let v=h8(await m.value.validate(),P=>mu(P)||gu(P)?JSON.stringify(P):P);const y=v.credential_guid_body,x=v.credential_property_id;v=B_(v,["credential_guid_body","credential_property_id",x]),d.value={...d.value,[l.value.id]:v};let _;y&&(_={...JSON.parse(y),credentialSource:"direct"});const k=Object.assign({},...Object.values(d.value)),$=k.connection,S=$?.typeName==="Connection"&&!!$.attributes?.qualifiedName?$:{typeName:"Connection",attributes:{qualifiedName:`default/${i.value.id}/${Math.round(Date.now()/1e3)}`,name:$?.name||k.name||"test-connection"}},R={...k,connection:S},F=CU(r.value,R);return{credentialBody:_,startPayload:F??R}}zp(F_,f);async function b(){u.value=!0,h.value="";try{const{credentialBody:v,startPayload:y}=await f();if(a.value===s.value.length){try{let x,_;if(v)try{const{data:k}=await $fetch("/workflows/v1/dev/local-vault",{method:"POST",body:v});x=k.credential_guid}catch(k){const $=k?.status??k?.statusCode;if($!==404&&$!==405)throw k;_=v}await $fetch("/workflows/v1/start",{method:"POST",body:{...y,...x?{credential_guid:x}:{},..._?{credentials:_}:{}}}),a.value=1,d.value={},m.value.form.reset(),Fr.success("Workflow started successfully!",{placement:"top",duration:3e3})}catch{Fr.failed("Failed to start workflow. Please try again.",{placement:"top",duration:3e3})}return}a.value=a.value+1}catch(v){Fr.failed("Failed to validate form: "+v.message,{placement:"top"})}finally{u.value=!1}}return(v,y)=>{const x=vU;return w(),M("div",SU,[N("div",$U,[N("div",EU,[N("div",TU,[N("img",{src:g(i).logo,alt:"App Logo",class:"w-16 h-16"},null,8,OU),j(g(LF),{as:"h1",size:"xl"},{default:C(()=>[Ne(se(g(i).name)+" App ",1)]),_:1})])]),N("div",IU,[j(g(j3),{items:g(c),"model-value":g(a),orientation:"horizontal",type:"default",onStepChange:y[0]||(y[0]=_=>a.value=_)},null,8,["items","model-value"])]),N("div",PU,[N("div",AU,[j(x,{ref:"formRef","current-step":g(l),"config-map":g(o)},null,8,["current-step","config-map"])])]),N("div",RU,[g(a)>0?(w(),E(g(Xn),{key:0,type:"subtle",label:"Back",onClick:y[1]||(y[1]=()=>{a.value=g(a)-1})})):oe("",!0),g(a)<g(s).length?(w(),E(g(Xn),{key:1,label:"Next",class:"ml-auto","is-loading":g(u),onClick:b},null,8,["is-loading"])):g(a)===g(s).length&&!g(p)?(w(),M("div",DU,[g(h)?(w(),E(g(Xn),{key:1,label:"Retry",type:"subtle","is-loading":g(u),onClick:b},null,8,["is-loading"])):(w(),E(g(Xn),{key:0,label:"Start Workflow","is-loading":g(u),onClick:b},null,8,["is-loading"]))])):g(p)?(w(),M("div",VU,[j(g(Xn),{label:"Workflow Started!",type:"success",disabled:!0})])):oe("",!0)])])])}}});export{XU as default};
|