@oniratec/onira-react-ui 3.3.0 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2559 -2485
- package/dist/index.js.map +1 -1
- package/dist/patterns/data-table/DataTable.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -4
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Uo=require("tailwind-merge"),ha=require("clsx"),l=require("react/jsx-runtime"),x=require("react"),J=require("lucide-react"),ma=require("react-dom"),Id=require("@radix-ui/react-dropdown-menu"),Pd=require("lottie-react"),Fd=require("@radix-ui/react-select"),Ld=require("@radix-ui/react-tooltip");function Un(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const h=Un(x),Ho=Un(ma),fe=Un(Id),pe=Un(Fd),Wt=Un(Ld),_n=t=>{let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e)},qo=(t,e)=>Math.floor(t/Math.pow(10,e)%10),zs=(t,e)=>!(qo(t,e)%2),ke=(t,e,n)=>{const r=t%e;return n&&qo(t,n)%2===0?-r:r},zt=(t,e,n)=>e[t%n],Vd=t=>{t.slice(0,1)==="#"&&(t=t.slice(1));const e=parseInt(t.substr(0,2),16),n=parseInt(t.substr(2,2),16),r=parseInt(t.substr(4,2),16);return(e*299+n*587+r*114)/1e3>=128?"#000000":"#FFFFFF"},$d=4,ue=80;function Wd(t,e){const n=_n(t),r=e&&e.length;return Array.from({length:$d},(s,a)=>({color:zt(n+a,e,r),translateX:ke(n*(a+1),ue/2-(a+17),1),translateY:ke(n*(a+1),ue/2-(a+17),2),rotate:ke(n*(a+1),360),isSquare:zs(n,2)}))}const mi=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Wd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+ue+" "+ue,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:ue,height:ue,children:l.jsx("rect",{width:ue,height:ue,rx:r?void 0:ue*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:ue,height:ue,fill:i[0].color}),l.jsx("rect",{x:(ue-60)/2,y:(ue-20)/2,width:ue,height:i[1].isSquare?ue:ue/8,fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+ue/2+" "+ue/2+")"}),l.jsx("circle",{cx:ue/2,cy:ue/2,fill:i[2].color,r:ue/5,transform:"translate("+i[2].translateX+" "+i[2].translateY+")"}),l.jsx("line",{x1:0,y1:ue/2,x2:ue,y2:ue/2,strokeWidth:2,stroke:i[3].color,transform:"translate("+i[3].translateX+" "+i[3].translateY+") rotate("+i[3].rotate+" "+ue/2+" "+ue/2+")"})]})]})},It=90,zd=5;function Zd(t,e){const n=_n(t),r=e&&e.length,s=Array.from({length:zd},(i,o)=>zt(n+o,e,r)),a=[];return a[0]=s[0],a[1]=s[1],a[2]=s[1],a[3]=s[2],a[4]=s[2],a[5]=s[3],a[6]=s[3],a[7]=s[0],a[8]=s[4],a}const Bd=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Zd(t,e),o=x.useId();return l.jsxs("svg",{viewBox:"0 0 "+It+" "+It,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:It,height:It,children:l.jsx("rect",{width:It,height:It,rx:r?void 0:It*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("path",{d:"M0 0h90v45H0z",fill:i[0]}),l.jsx("path",{d:"M0 45h90v45H0z",fill:i[1]}),l.jsx("path",{d:"M83 45a38 38 0 00-76 0h76z",fill:i[2]}),l.jsx("path",{d:"M83 45a38 38 0 01-76 0h76z",fill:i[3]}),l.jsx("path",{d:"M77 45a32 32 0 10-64 0h64z",fill:i[4]}),l.jsx("path",{d:"M77 45a32 32 0 11-64 0h64z",fill:i[5]}),l.jsx("path",{d:"M71 45a26 26 0 00-52 0h52z",fill:i[6]}),l.jsx("path",{d:"M71 45a26 26 0 01-52 0h52z",fill:i[7]}),l.jsx("circle",{cx:45,cy:45,r:23,fill:i[8]})]})]})},Ud=64,Pt=80;function Hd(t,e){const n=_n(t),r=e&&e.length;return Array.from({length:Ud},(s,a)=>zt(n%(a+1),e,r))}const qd=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Hd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Pt+" "+Pt,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,"mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:Pt,height:Pt,children:l.jsx("rect",{width:Pt,height:Pt,rx:r?void 0:Pt*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:10,height:10,fill:i[0]}),l.jsx("rect",{x:20,width:10,height:10,fill:i[1]}),l.jsx("rect",{x:40,width:10,height:10,fill:i[2]}),l.jsx("rect",{x:60,width:10,height:10,fill:i[3]}),l.jsx("rect",{x:10,width:10,height:10,fill:i[4]}),l.jsx("rect",{x:30,width:10,height:10,fill:i[5]}),l.jsx("rect",{x:50,width:10,height:10,fill:i[6]}),l.jsx("rect",{x:70,width:10,height:10,fill:i[7]}),l.jsx("rect",{y:10,width:10,height:10,fill:i[8]}),l.jsx("rect",{y:20,width:10,height:10,fill:i[9]}),l.jsx("rect",{y:30,width:10,height:10,fill:i[10]}),l.jsx("rect",{y:40,width:10,height:10,fill:i[11]}),l.jsx("rect",{y:50,width:10,height:10,fill:i[12]}),l.jsx("rect",{y:60,width:10,height:10,fill:i[13]}),l.jsx("rect",{y:70,width:10,height:10,fill:i[14]}),l.jsx("rect",{x:20,y:10,width:10,height:10,fill:i[15]}),l.jsx("rect",{x:20,y:20,width:10,height:10,fill:i[16]}),l.jsx("rect",{x:20,y:30,width:10,height:10,fill:i[17]}),l.jsx("rect",{x:20,y:40,width:10,height:10,fill:i[18]}),l.jsx("rect",{x:20,y:50,width:10,height:10,fill:i[19]}),l.jsx("rect",{x:20,y:60,width:10,height:10,fill:i[20]}),l.jsx("rect",{x:20,y:70,width:10,height:10,fill:i[21]}),l.jsx("rect",{x:40,y:10,width:10,height:10,fill:i[22]}),l.jsx("rect",{x:40,y:20,width:10,height:10,fill:i[23]}),l.jsx("rect",{x:40,y:30,width:10,height:10,fill:i[24]}),l.jsx("rect",{x:40,y:40,width:10,height:10,fill:i[25]}),l.jsx("rect",{x:40,y:50,width:10,height:10,fill:i[26]}),l.jsx("rect",{x:40,y:60,width:10,height:10,fill:i[27]}),l.jsx("rect",{x:40,y:70,width:10,height:10,fill:i[28]}),l.jsx("rect",{x:60,y:10,width:10,height:10,fill:i[29]}),l.jsx("rect",{x:60,y:20,width:10,height:10,fill:i[30]}),l.jsx("rect",{x:60,y:30,width:10,height:10,fill:i[31]}),l.jsx("rect",{x:60,y:40,width:10,height:10,fill:i[32]}),l.jsx("rect",{x:60,y:50,width:10,height:10,fill:i[33]}),l.jsx("rect",{x:60,y:60,width:10,height:10,fill:i[34]}),l.jsx("rect",{x:60,y:70,width:10,height:10,fill:i[35]}),l.jsx("rect",{x:10,y:10,width:10,height:10,fill:i[36]}),l.jsx("rect",{x:10,y:20,width:10,height:10,fill:i[37]}),l.jsx("rect",{x:10,y:30,width:10,height:10,fill:i[38]}),l.jsx("rect",{x:10,y:40,width:10,height:10,fill:i[39]}),l.jsx("rect",{x:10,y:50,width:10,height:10,fill:i[40]}),l.jsx("rect",{x:10,y:60,width:10,height:10,fill:i[41]}),l.jsx("rect",{x:10,y:70,width:10,height:10,fill:i[42]}),l.jsx("rect",{x:30,y:10,width:10,height:10,fill:i[43]}),l.jsx("rect",{x:30,y:20,width:10,height:10,fill:i[44]}),l.jsx("rect",{x:30,y:30,width:10,height:10,fill:i[45]}),l.jsx("rect",{x:30,y:40,width:10,height:10,fill:i[46]}),l.jsx("rect",{x:30,y:50,width:10,height:10,fill:i[47]}),l.jsx("rect",{x:30,y:60,width:10,height:10,fill:i[48]}),l.jsx("rect",{x:30,y:70,width:10,height:10,fill:i[49]}),l.jsx("rect",{x:50,y:10,width:10,height:10,fill:i[50]}),l.jsx("rect",{x:50,y:20,width:10,height:10,fill:i[51]}),l.jsx("rect",{x:50,y:30,width:10,height:10,fill:i[52]}),l.jsx("rect",{x:50,y:40,width:10,height:10,fill:i[53]}),l.jsx("rect",{x:50,y:50,width:10,height:10,fill:i[54]}),l.jsx("rect",{x:50,y:60,width:10,height:10,fill:i[55]}),l.jsx("rect",{x:50,y:70,width:10,height:10,fill:i[56]}),l.jsx("rect",{x:70,y:10,width:10,height:10,fill:i[57]}),l.jsx("rect",{x:70,y:20,width:10,height:10,fill:i[58]}),l.jsx("rect",{x:70,y:30,width:10,height:10,fill:i[59]}),l.jsx("rect",{x:70,y:40,width:10,height:10,fill:i[60]}),l.jsx("rect",{x:70,y:50,width:10,height:10,fill:i[61]}),l.jsx("rect",{x:70,y:60,width:10,height:10,fill:i[62]}),l.jsx("rect",{x:70,y:70,width:10,height:10,fill:i[63]})]})]})},he=36;function Yd(t,e){const n=_n(t),r=e&&e.length,s=zt(n,e,r),a=ke(n,10,1),i=a<5?a+he/9:a,o=ke(n,10,2),c=o<5?o+he/9:o;return{wrapperColor:s,faceColor:Vd(s),backgroundColor:zt(n+13,e,r),wrapperTranslateX:i,wrapperTranslateY:c,wrapperRotate:ke(n,360),wrapperScale:1+ke(n,he/12)/10,isMouthOpen:zs(n,2),isCircle:zs(n,1),eyeSpread:ke(n,5),mouthSpread:ke(n,3),faceRotate:ke(n,10,3),faceTranslateX:i>he/6?i/2:ke(n,8,1),faceTranslateY:c>he/6?c/2:ke(n,7,2)}}const pi=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Yd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+he+" "+he,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:he,height:he,children:l.jsx("rect",{width:he,height:he,rx:r?void 0:he*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:he,height:he,fill:i.backgroundColor}),l.jsx("rect",{x:"0",y:"0",width:he,height:he,transform:"translate("+i.wrapperTranslateX+" "+i.wrapperTranslateY+") rotate("+i.wrapperRotate+" "+he/2+" "+he/2+") scale("+i.wrapperScale+")",fill:i.wrapperColor,rx:i.isCircle?he:he/6}),l.jsxs("g",{transform:"translate("+i.faceTranslateX+" "+i.faceTranslateY+") rotate("+i.faceRotate+" "+he/2+" "+he/2+")",children:[i.isMouthOpen?l.jsx("path",{d:"M15 "+(19+i.mouthSpread)+"c2 1 4 1 6 0",stroke:i.faceColor,fill:"none",strokeLinecap:"round"}):l.jsx("path",{d:"M13,"+(19+i.mouthSpread)+" a1,0.75 0 0,0 10,0",fill:i.faceColor}),l.jsx("rect",{x:14-i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor}),l.jsx("rect",{x:20+i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor})]})]})]})},Gd=4,Oe=80;function Xd(t,e){const n=_n(t),r=e&&e.length;return Array.from({length:Gd},(s,a)=>zt(n+a,e,r))}const Jd=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Xd(t,e),o=t.replace(/\s/g,""),c=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Oe+" "+Oe,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:c,maskUnits:"userSpaceOnUse",x:0,y:0,width:Oe,height:Oe,children:l.jsx("rect",{width:Oe,height:Oe,rx:r?void 0:Oe*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${c})`,children:[l.jsx("path",{fill:"url(#gradient_paint0_linear_"+o+")",d:"M0 0h80v40H0z"}),l.jsx("path",{fill:"url(#gradient_paint1_linear_"+o+")",d:"M0 40h80v40H0z"})]}),l.jsxs("defs",{children:[l.jsxs("linearGradient",{id:"gradient_paint0_linear_"+o,x1:Oe/2,y1:0,x2:Oe/2,y2:Oe/2,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[0]}),l.jsx("stop",{offset:1,stopColor:i[1]})]}),l.jsxs("linearGradient",{id:"gradient_paint1_linear_"+o,x1:Oe/2,y1:Oe/2,x2:Oe/2,y2:Oe,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[2]}),l.jsx("stop",{offset:1,stopColor:i[3]})]})]})]})},Kd=3,_e=80;function Qd(t,e){const n=_n(t),r=e&&e.length;return Array.from({length:Kd},(s,a)=>({color:zt(n+a,e,r),translateX:ke(n*(a+1),_e/10,1),translateY:ke(n*(a+1),_e/10,2),scale:1.2+ke(n*(a+1),_e/20)/10,rotate:ke(n*(a+1),360,1)}))}const Yo=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Qd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+_e+" "+_e,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:_e,height:_e,children:l.jsx("rect",{width:_e,height:_e,rx:r?void 0:_e*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:_e,height:_e,fill:i[0].color}),l.jsx("path",{filter:`url(#filter_${o})`,d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+_e/2+" "+_e/2+") scale("+i[2].scale+")"}),l.jsx("path",{filter:`url(#filter_${o})`,style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:i[2].color,transform:"translate("+i[2].translateX+" "+i[2].translateY+") rotate("+i[2].rotate+" "+_e/2+" "+_e/2+") scale("+i[2].scale+")"})]}),l.jsx("defs",{children:l.jsxs("filter",{id:`filter_${o}`,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),l.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),l.jsx("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"})]})})]})},ef={pixel:qd,bauhaus:mi,ring:Bd,beam:pi,sunset:Jd,marble:Yo,geometric:pi,abstract:mi},Go=({variant:t="marble",colors:e=["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:n="Clara Barton",title:r=!1,size:s="40px",square:a=!1,...i})=>{const o=ef[t]||Yo;return l.jsx(o,{colors:e,name:n,title:r,size:s,square:a,...i})},Xo=["var(--brand-primary)","var(--surface-1)","var(--text-1)"],tf=({personId:t,className:e})=>l.jsx(Go,{size:40,name:t,variant:"beam",colors:Xo}),nf=({userId:t})=>l.jsx(Go,{size:40,name:t,variant:"bauhaus",colors:Xo});function N(...t){return Uo.twMerge(ha.clsx(t))}const Jo=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-box",t),...e}));Jo.displayName="Box";function gi(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ko(...t){return e=>{let n=!1;const r=t.map(s=>{const a=gi(s,e);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():gi(t[s],null)}}}}function $e(...t){return h.useCallback(Ko(...t),t)}function Hr(t){const e=rf(t),n=h.forwardRef((r,s)=>{const{children:a,...i}=r,o=h.Children.toArray(a),c=o.find(af);if(c){const d=c.props.children,f=o.map(u=>u===c?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:u);return l.jsx(e,{...i,ref:s,children:h.isValidElement(d)?h.cloneElement(d,void 0,f):null})}return l.jsx(e,{...i,ref:s,children:a})});return n.displayName=`${t}.Slot`,n}var Qo=Hr("Slot");function rf(t){const e=h.forwardRef((n,r)=>{const{children:s,...a}=n;if(h.isValidElement(s)){const i=lf(s),o=of(a,s.props);return s.type!==h.Fragment&&(o.ref=r?Ko(r,i):i),h.cloneElement(s,o)}return h.Children.count(s)>1?h.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var sf=Symbol("radix.slottable");function af(t){return h.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===sf}function of(t,e){const n={...e};for(const r in e){const s=t[r],a=e[r];/^on[A-Z]/.test(r)?s&&a?n[r]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...a}:r==="className"&&(n[r]=[s,a].filter(Boolean).join(" "))}return{...t,...n}}function lf(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const yi=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,vi=ha.clsx,cf=(t,e)=>n=>{var r;if(e?.variants==null)return vi(t,n?.class,n?.className);const{variants:s,defaultVariants:a}=e,i=Object.keys(s).map(d=>{const f=n?.[d],u=a?.[d];if(f===null)return null;const m=yi(f)||yi(u);return s[d][m]}),o=n&&Object.entries(n).reduce((d,f)=>{let[u,m]=f;return m===void 0||(d[u]=m),d},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:m,...p}=f;return Object.entries(p).every(y=>{let[g,w]=y;return Array.isArray(w)?w.includes({...a,...o}[g]):{...a,...o}[g]===w})?[...d,u,m]:d},[]);return vi(t,i,c,n?.class,n?.className)},el=cf("oniratec-button",{variants:{variant:{default:"",primary:"oniratec-button--primary",secondary:"oniratec-button--secondary",destructive:"oniratec-button--destructive",outline:"oniratec-button--outline",ghost:"oniratec-button--ghost",link:"oniratec-button--link"},size:{xs:"",sm:"",md:"",lg:"",icon:"","icon-sm":"","icon-lg":""}},defaultVariants:{variant:"default",size:"md"}}),Le=h.forwardRef(({className:t,asChild:e=!1,variant:n="default",size:r="md",loading:s=!1,disabled:a,children:i,...o},c)=>{const d=e?Qo:"button";return l.jsxs(d,{ref:c,"data-size":r??void 0,"data-variant":n??void 0,className:N(el({variant:n,size:r}),s&&"oniratec-button--loading",t),disabled:a||s,...o,children:[s&&l.jsx(J.Loader2,{className:"oniratec-button__spinner"}),i]})});Le.displayName="Button";const tl=h.forwardRef(({src:t,alt:e,width:n=70,height:r=70,className:s,ImageComponent:a,...i},o)=>{const c=a??"img";return l.jsx(c,{type:void 0,props:void 0,ref:o,src:t,alt:e,width:n,height:r,className:N("oniratec-logo",s),...i},null)});tl.displayName="Logo";const Tr=h.forwardRef(({className:t,size:e="default",...n},r)=>l.jsx("div",{ref:r,"data-size":e,className:N("oniratec-card",t),...n}));Tr.displayName="Card";const pa=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__header",t),...e}));pa.displayName="CardHeader";const ga=h.forwardRef(({className:t,...e},n)=>l.jsx("h3",{ref:n,className:N("oniratec-card__title",t),...e}));ga.displayName="CardTitle";const nl=h.forwardRef(({className:t,...e},n)=>l.jsx("p",{ref:n,className:N("oniratec-card__description",t),...e}));nl.displayName="CardDescription";const ya=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__content",t),...e}));ya.displayName="CardContent";const rl=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__action",t),...e}));rl.displayName="CardAction";const sl=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__footer",t),...e}));sl.displayName="CardFooter";const uf={error:J.AlertCircle,warning:J.AlertTriangle,info:J.Info,success:J.CheckCircle},al=h.forwardRef(({className:t,variant:e="info",children:n,...r},s)=>{const a=uf[e];return l.jsxs("div",{ref:s,role:"alert","data-variant":e,className:N("oniratec-alert",t),...r,children:[a&&l.jsx(a,{className:"oniratec-alert__icon","aria-hidden":"true"}),l.jsx("div",{className:"oniratec-alert__content",children:n})]})});al.displayName="Alert";const il=h.forwardRef(({className:t,...e},n)=>l.jsx("h5",{ref:n,className:N("oniratec-alert__title",t),...e}));il.displayName="AlertTitle";const ol=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-alert__description",t),...e}));ol.displayName="AlertDescription";const va=h.forwardRef(({className:t,variant:e="default",size:n="md",...r},s)=>l.jsx("span",{ref:s,"data-variant":e,"data-size":n,className:N("oniratec-badge",t),...r}));va.displayName="Badge";const ll=h.forwardRef(({className:t,id:e,label:n,description:r,size:s="md",indeterminate:a=!1,disabled:i,"aria-describedby":o,"aria-invalid":c,...d},f)=>{const u=h.useId(),m=e??u,p=r?`${m}-description`:void 0,y=c===!0||c==="true",g=h.useRef(null);h.useEffect(()=>{g.current&&(g.current.indeterminate=a)},[a]);const w=h.useCallback(v=>{g.current=v,typeof f=="function"?f(v):f&&(f.current=v)},[f]);return l.jsxs("label",{htmlFor:m,"data-size":s,"data-type":"checkbox",className:N("oniratec-control",i&&"cursor-not-allowed opacity-60",t),children:[l.jsx("input",{ref:w,id:m,type:"checkbox",disabled:i,"aria-invalid":y||void 0,"aria-checked":a?"mixed":void 0,"aria-describedby":[o,p].filter(Boolean).join(" ")||void 0,className:"oniratec-control__input",...d}),l.jsx("span",{className:N("oniratec-control__box",y&&"border-destructive"),children:a?l.jsx(J.Minus,{className:"h-3.5 w-3.5"}):l.jsx(J.Check,{className:"h-3.5 w-3.5 opacity-0 transition-opacity"})}),(n||r)&&l.jsxs("span",{className:"oniratec-control__label grid gap-1 leading-tight",children:[n&&l.jsx("span",{className:"font-medium",children:n}),r&&l.jsx("span",{id:p,className:"text-sm text-[color:var(--text-2)]",children:r})]})]})});ll.displayName="Checkbox";function Re(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t?.(s),n===!1||!s.defaultPrevented)return e?.(s)}}function df(t,e){const n=h.createContext(e),r=a=>{const{children:i,...o}=a,c=h.useMemo(()=>o,Object.values(o));return l.jsx(n.Provider,{value:c,children:i})};r.displayName=t+"Provider";function s(a){const i=h.useContext(n);if(i)return i;if(e!==void 0)return e;throw new Error(`\`${a}\` must be used within \`${t}\``)}return[r,s]}function qr(t,e=[]){let n=[];function r(a,i){const o=h.createContext(i),c=n.length;n=[...n,i];const d=u=>{const{scope:m,children:p,...y}=u,g=m?.[t]?.[c]||o,w=h.useMemo(()=>y,Object.values(y));return l.jsx(g.Provider,{value:w,children:p})};d.displayName=a+"Provider";function f(u,m){const p=m?.[t]?.[c]||o,y=h.useContext(p);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[d,f]}const s=()=>{const a=n.map(i=>h.createContext(i));return function(o){const c=o?.[t]||a;return h.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,ff(s,...e)]}function ff(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=r.reduce((o,{useScope:c,scopeName:d})=>{const u=c(a)[`__scope${d}`];return{...o,...u}},{});return h.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var hf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=hf.reduce((t,e)=>{const n=Hr(`Primitive.${e}`),r=h.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:a})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function mf(t,e){t&&Ho.flushSync(()=>t.dispatchEvent(e))}function mn(t){const e=h.useRef(t);return h.useEffect(()=>{e.current=t}),h.useMemo(()=>(...n)=>e.current?.(...n),[])}function pf(t,e=globalThis?.document){const n=mn(t);h.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var gf="DismissableLayer",Zs="dismissableLayer.update",yf="dismissableLayer.pointerDownOutside",vf="dismissableLayer.focusOutside",xi,cl=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xa=h.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:i,onDismiss:o,...c}=t,d=h.useContext(cl),[f,u]=h.useState(null),m=f?.ownerDocument??globalThis?.document,[,p]=h.useState({}),y=$e(e,T=>u(T)),g=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(w),k=f?g.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,_=k>=v,b=bf(T=>{const A=T.target,V=[...d.branches].some(L=>L.contains(A));!_||V||(s?.(T),i?.(T),T.defaultPrevented||o?.())},m),E=_f(T=>{const A=T.target;[...d.branches].some(L=>L.contains(A))||(a?.(T),i?.(T),T.defaultPrevented||o?.())},m);return pf(T=>{k===d.layers.size-1&&(r?.(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},m),h.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(xi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),wi(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xi)}},[f,m,n,d]),h.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),wi())},[f,d]),h.useEffect(()=>{const T=()=>p({});return document.addEventListener(Zs,T),()=>document.removeEventListener(Zs,T)},[]),l.jsx(Ce.div,{...c,ref:y,style:{pointerEvents:S?_?"auto":"none":void 0,...t.style},onFocusCapture:Re(t.onFocusCapture,E.onFocusCapture),onBlurCapture:Re(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Re(t.onPointerDownCapture,b.onPointerDownCapture)})});xa.displayName=gf;var xf="DismissableLayerBranch",wf=h.forwardRef((t,e)=>{const n=h.useContext(cl),r=h.useRef(null),s=$e(e,r);return h.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(Ce.div,{...t,ref:s})});wf.displayName=xf;function bf(t,e=globalThis?.document){const n=mn(t),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let c=function(){ul(yf,n,d,{discrete:!0})};const d={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",a),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function _f(t,e=globalThis?.document){const n=mn(t),r=h.useRef(!1);return h.useEffect(()=>{const s=a=>{a.target&&!r.current&&ul(vf,n,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wi(){const t=new CustomEvent(Zs);document.dispatchEvent(t)}function ul(t,e,n,{discrete:r}){const s=n.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?mf(s,a):s.dispatchEvent(a)}var ws=0;function dl(){h.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??bi()),document.body.insertAdjacentElement("beforeend",t[1]??bi()),ws++,()=>{ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ws--}},[])}function bi(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var bs="focusScope.autoFocusOnMount",_s="focusScope.autoFocusOnUnmount",_i={bubbles:!1,cancelable:!0},kf="FocusScope",wa=h.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...i}=t,[o,c]=h.useState(null),d=mn(s),f=mn(a),u=h.useRef(null),m=$e(e,g=>c(g)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let g=function(S){if(p.paused||!o)return;const _=S.target;o.contains(_)?u.current=_:_t(u.current,{select:!0})},w=function(S){if(p.paused||!o)return;const _=S.relatedTarget;_!==null&&(o.contains(_)||_t(u.current,{select:!0}))},v=function(S){if(document.activeElement===document.body)for(const b of S)b.removedNodes.length>0&&_t(o)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const k=new MutationObserver(v);return o&&k.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),k.disconnect()}}},[r,o,p.paused]),h.useEffect(()=>{if(o){Si.add(p);const g=document.activeElement;if(!o.contains(g)){const v=new CustomEvent(bs,_i);o.addEventListener(bs,d),o.dispatchEvent(v),v.defaultPrevented||(Sf(Of(fl(o)),{select:!0}),document.activeElement===g&&_t(o))}return()=>{o.removeEventListener(bs,d),setTimeout(()=>{const v=new CustomEvent(_s,_i);o.addEventListener(_s,f),o.dispatchEvent(v),v.defaultPrevented||_t(g??document.body,{select:!0}),o.removeEventListener(_s,f),Si.remove(p)},0)}}},[o,d,f,p]);const y=h.useCallback(g=>{if(!n&&!r||p.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const k=g.currentTarget,[S,_]=Nf(k);S&&_?!g.shiftKey&&v===_?(g.preventDefault(),n&&_t(S,{select:!0})):g.shiftKey&&v===S&&(g.preventDefault(),n&&_t(_,{select:!0})):v===k&&g.preventDefault()}},[n,r,p.paused]);return l.jsx(Ce.div,{tabIndex:-1,...i,ref:m,onKeyDown:y})});wa.displayName=kf;function Sf(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(_t(r,{select:e}),document.activeElement!==n)return}function Nf(t){const e=fl(t),n=ki(e,t),r=ki(e.reverse(),t);return[n,r]}function fl(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function ki(t,e){for(const n of t)if(!Cf(n,{upTo:e}))return n}function Cf(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Tf(t){return t instanceof HTMLInputElement&&"select"in t}function _t(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Tf(t)&&e&&t.select()}}var Si=Ef();function Ef(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=Ni(t,e),t.unshift(e)},remove(e){t=Ni(t,e),t[0]?.resume()}}}function Ni(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Of(t){return t.filter(e=>e.tagName!=="A")}var Et=globalThis?.document?h.useLayoutEffect:()=>{},jf=h[" useId ".trim().toString()]||(()=>{}),Df=0;function xr(t){const[e,n]=h.useState(jf());return Et(()=>{n(r=>r??String(Df++))},[t]),t||(e?`radix-${e}`:"")}const Rf=["top","right","bottom","left"],Ot=Math.min,Ie=Math.max,Er=Math.round,ir=Math.floor,lt=t=>({x:t,y:t}),Af={left:"right",right:"left",bottom:"top",top:"bottom"},Mf={start:"end",end:"start"};function Bs(t,e,n){return Ie(t,Ot(e,n))}function pt(t,e){return typeof t=="function"?t(e):t}function gt(t){return t.split("-")[0]}function kn(t){return t.split("-")[1]}function ba(t){return t==="x"?"y":"x"}function _a(t){return t==="y"?"height":"width"}const If=new Set(["top","bottom"]);function ot(t){return If.has(gt(t))?"y":"x"}function ka(t){return ba(ot(t))}function Pf(t,e,n){n===void 0&&(n=!1);const r=kn(t),s=ka(t),a=_a(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Or(i)),[i,Or(i)]}function Ff(t){const e=Or(t);return[Us(t),e,Us(e)]}function Us(t){return t.replace(/start|end/g,e=>Mf[e])}const Ci=["left","right"],Ti=["right","left"],Lf=["top","bottom"],Vf=["bottom","top"];function $f(t,e,n){switch(t){case"top":case"bottom":return n?e?Ti:Ci:e?Ci:Ti;case"left":case"right":return e?Lf:Vf;default:return[]}}function Wf(t,e,n,r){const s=kn(t);let a=$f(gt(t),n==="start",r);return s&&(a=a.map(i=>i+"-"+s),e&&(a=a.concat(a.map(Us)))),a}function Or(t){return t.replace(/left|right|bottom|top/g,e=>Af[e])}function zf(t){return{top:0,right:0,bottom:0,left:0,...t}}function hl(t){return typeof t!="number"?zf(t):{top:t,right:t,bottom:t,left:t}}function jr(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function Ei(t,e,n){let{reference:r,floating:s}=t;const a=ot(e),i=ka(e),o=_a(i),c=gt(e),d=a==="y",f=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,m=r[o]/2-s[o]/2;let p;switch(c){case"top":p={x:f,y:r.y-s.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-s.width,y:u};break;default:p={x:r.x,y:r.y}}switch(kn(e)){case"start":p[i]-=m*(n&&d?-1:1);break;case"end":p[i]+=m*(n&&d?-1:1);break}return p}const Zf=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:i}=n,o=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(e));let d=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=Ei(d,r,c),m=r,p={},y=0;for(let g=0;g<o.length;g++){const{name:w,fn:v}=o[g],{x:k,y:S,data:_,reset:b}=await v({x:f,y:u,initialPlacement:r,placement:m,strategy:s,middlewareData:p,rects:d,platform:i,elements:{reference:t,floating:e}});f=k??f,u=S??u,p={...p,[w]:{...p[w],..._}},b&&y<=50&&(y++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(d=b.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):b.rects),{x:f,y:u}=Ei(d,m,c)),g=-1)}return{x:f,y:u,placement:m,strategy:s,middlewareData:p}};async function Ln(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:a,rects:i,elements:o,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=pt(e,t),y=hl(p),w=o[m?u==="floating"?"reference":"floating":u],v=jr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:d,rootBoundary:f,strategy:c})),k=u==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),_=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},b=jr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:k,offsetParent:S,strategy:c}):k);return{top:(v.top-b.top+y.top)/_.y,bottom:(b.bottom-v.bottom+y.bottom)/_.y,left:(v.left-b.left+y.left)/_.x,right:(b.right-v.right+y.right)/_.x}}const Bf=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:a,platform:i,elements:o,middlewareData:c}=e,{element:d,padding:f=0}=pt(t,e)||{};if(d==null)return{};const u=hl(f),m={x:n,y:r},p=ka(s),y=_a(p),g=await i.getDimensions(d),w=p==="y",v=w?"top":"left",k=w?"bottom":"right",S=w?"clientHeight":"clientWidth",_=a.reference[y]+a.reference[p]-m[p]-a.floating[y],b=m[p]-a.reference[p],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let T=E?E[S]:0;(!T||!await(i.isElement==null?void 0:i.isElement(E)))&&(T=o.floating[S]||a.floating[y]);const A=_/2-b/2,V=T/2-g[y]/2-1,L=Ot(u[v],V),z=Ot(u[k],V),B=L,G=T-g[y]-z,Q=T/2-g[y]/2+A,H=Bs(B,Q,G),P=!c.arrow&&kn(s)!=null&&Q!==H&&a.reference[y]/2-(Q<B?L:z)-g[y]/2<0,U=P?Q<B?Q-B:Q-G:0;return{[p]:m[p]+U,data:{[p]:H,centerOffset:Q-H-U,...P&&{alignmentOffset:U}},reset:P}}}),Uf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:a,rects:i,initialPlacement:o,platform:c,elements:d}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...w}=pt(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=gt(s),k=ot(o),S=gt(o)===o,_=await(c.isRTL==null?void 0:c.isRTL(d.floating)),b=m||(S||!g?[Or(o)]:Ff(o)),E=y!=="none";!m&&E&&b.push(...Wf(o,g,y,_));const T=[o,...b],A=await Ln(e,w),V=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&V.push(A[v]),u){const Q=Pf(s,i,_);V.push(A[Q[0]],A[Q[1]])}if(L=[...L,{placement:s,overflows:V}],!V.every(Q=>Q<=0)){var z,B;const Q=(((z=a.flip)==null?void 0:z.index)||0)+1,H=T[Q];if(H&&(!(u==="alignment"?k!==ot(H):!1)||L.every($=>ot($.placement)===k?$.overflows[0]>0:!0)))return{data:{index:Q,overflows:L},reset:{placement:H}};let P=(B=L.filter(U=>U.overflows[0]<=0).sort((U,$)=>U.overflows[1]-$.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(p){case"bestFit":{var G;const U=(G=L.filter($=>{if(E){const ie=ot($.placement);return ie===k||ie==="y"}return!0}).map($=>[$.placement,$.overflows.filter(ie=>ie>0).reduce((ie,F)=>ie+F,0)]).sort(($,ie)=>$[1]-ie[1])[0])==null?void 0:G[0];U&&(P=U);break}case"initialPlacement":P=o;break}if(s!==P)return{reset:{placement:P}}}return{}}}};function Oi(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ji(t){return Rf.some(e=>t[e]>=0)}const Hf=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=pt(t,e);switch(r){case"referenceHidden":{const a=await Ln(e,{...s,elementContext:"reference"}),i=Oi(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ji(i)}}}case"escaped":{const a=await Ln(e,{...s,altBoundary:!0}),i=Oi(a,n.floating);return{data:{escapedOffsets:i,escaped:ji(i)}}}default:return{}}}}},ml=new Set(["left","top"]);async function qf(t,e){const{placement:n,platform:r,elements:s}=t,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=gt(n),o=kn(n),c=ot(n)==="y",d=ml.has(i)?-1:1,f=a&&c?-1:1,u=pt(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:y}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof y=="number"&&(p=o==="end"?y*-1:y),c?{x:p*f,y:m*d}:{x:m*d,y:p*f}}const Yf=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:a,placement:i,middlewareData:o}=e,c=await qf(e,t);return i===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:i}}}}},Gf=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:o={fn:w=>{let{x:v,y:k}=w;return{x:v,y:k}}},...c}=pt(t,e),d={x:n,y:r},f=await Ln(e,c),u=ot(gt(s)),m=ba(u);let p=d[m],y=d[u];if(a){const w=m==="y"?"top":"left",v=m==="y"?"bottom":"right",k=p+f[w],S=p-f[v];p=Bs(k,p,S)}if(i){const w=u==="y"?"top":"left",v=u==="y"?"bottom":"right",k=y+f[w],S=y-f[v];y=Bs(k,y,S)}const g=o.fn({...e,[m]:p,[u]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:a,[u]:i}}}}}},Xf=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:a,middlewareData:i}=e,{offset:o=0,mainAxis:c=!0,crossAxis:d=!0}=pt(t,e),f={x:n,y:r},u=ot(s),m=ba(u);let p=f[m],y=f[u];const g=pt(o,e),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const S=m==="y"?"height":"width",_=a.reference[m]-a.floating[S]+w.mainAxis,b=a.reference[m]+a.reference[S]-w.mainAxis;p<_?p=_:p>b&&(p=b)}if(d){var v,k;const S=m==="y"?"width":"height",_=ml.has(gt(s)),b=a.reference[u]-a.floating[S]+(_&&((v=i.offset)==null?void 0:v[u])||0)+(_?0:w.crossAxis),E=a.reference[u]+a.reference[S]+(_?0:((k=i.offset)==null?void 0:k[u])||0)-(_?w.crossAxis:0);y<b?y=b:y>E&&(y=E)}return{[m]:p,[u]:y}}}},Jf=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:a,platform:i,elements:o}=e,{apply:c=()=>{},...d}=pt(t,e),f=await Ln(e,d),u=gt(s),m=kn(s),p=ot(s)==="y",{width:y,height:g}=a.floating;let w,v;u==="top"||u==="bottom"?(w=u,v=m===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=u,w=m==="end"?"top":"bottom");const k=g-f.top-f.bottom,S=y-f.left-f.right,_=Ot(g-f[w],k),b=Ot(y-f[v],S),E=!e.middlewareData.shift;let T=_,A=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=S),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(T=k),E&&!m){const L=Ie(f.left,0),z=Ie(f.right,0),B=Ie(f.top,0),G=Ie(f.bottom,0);p?A=y-2*(L!==0||z!==0?L+z:Ie(f.left,f.right)):T=g-2*(B!==0||G!==0?B+G:Ie(f.top,f.bottom))}await c({...e,availableWidth:A,availableHeight:T});const V=await i.getDimensions(o.floating);return y!==V.width||g!==V.height?{reset:{rects:!0}}:{}}}};function Yr(){return typeof window<"u"}function Sn(t){return pl(t)?(t.nodeName||"").toLowerCase():"#document"}function Pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(pl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pl(t){return Yr()?t instanceof Node||t instanceof Pe(t).Node:!1}function et(t){return Yr()?t instanceof Element||t instanceof Pe(t).Element:!1}function ut(t){return Yr()?t instanceof HTMLElement||t instanceof Pe(t).HTMLElement:!1}function Di(t){return!Yr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pe(t).ShadowRoot}const Kf=new Set(["inline","contents"]);function Hn(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!Kf.has(s)}const Qf=new Set(["table","td","th"]);function eh(t){return Qf.has(Sn(t))}const th=[":popover-open",":modal"];function Gr(t){return th.some(e=>{try{return t.matches(e)}catch{return!1}})}const nh=["transform","translate","scale","rotate","perspective"],rh=["transform","translate","scale","rotate","perspective","filter"],sh=["paint","layout","strict","content"];function Sa(t){const e=Na(),n=et(t)?tt(t):t;return nh.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||rh.some(r=>(n.willChange||"").includes(r))||sh.some(r=>(n.contain||"").includes(r))}function ah(t){let e=jt(t);for(;ut(e)&&!pn(e);){if(Sa(e))return e;if(Gr(e))return null;e=jt(e)}return null}function Na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ih=new Set(["html","body","#document"]);function pn(t){return ih.has(Sn(t))}function tt(t){return Pe(t).getComputedStyle(t)}function Xr(t){return et(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function jt(t){if(Sn(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Di(t)&&t.host||ft(t);return Di(e)?e.host:e}function gl(t){const e=jt(t);return pn(e)?t.ownerDocument?t.ownerDocument.body:t.body:ut(e)&&Hn(e)?e:gl(e)}function Vn(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=gl(t),a=s===((r=t.ownerDocument)==null?void 0:r.body),i=Pe(s);if(a){const o=Hs(i);return e.concat(i,i.visualViewport||[],Hn(s)?s:[],o&&n?Vn(o):[])}return e.concat(s,Vn(s,[],n))}function Hs(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function yl(t){const e=tt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=ut(t),a=s?t.offsetWidth:n,i=s?t.offsetHeight:r,o=Er(n)!==a||Er(r)!==i;return o&&(n=a,r=i),{width:n,height:r,$:o}}function Ca(t){return et(t)?t:t.contextElement}function un(t){const e=Ca(t);if(!ut(e))return lt(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:a}=yl(e);let i=(a?Er(n.width):n.width)/r,o=(a?Er(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const oh=lt(0);function vl(t){const e=Pe(t);return!Na()||!e.visualViewport?oh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function lh(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Pe(t)?!1:e}function Zt(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),a=Ca(t);let i=lt(1);e&&(r?et(r)&&(i=un(r)):i=un(t));const o=lh(a,n,r)?vl(a):lt(0);let c=(s.left+o.x)/i.x,d=(s.top+o.y)/i.y,f=s.width/i.x,u=s.height/i.y;if(a){const m=Pe(a),p=r&&et(r)?Pe(r):r;let y=m,g=Hs(y);for(;g&&r&&p!==y;){const w=un(g),v=g.getBoundingClientRect(),k=tt(g),S=v.left+(g.clientLeft+parseFloat(k.paddingLeft))*w.x,_=v.top+(g.clientTop+parseFloat(k.paddingTop))*w.y;c*=w.x,d*=w.y,f*=w.x,u*=w.y,c+=S,d+=_,y=Pe(g),g=Hs(y)}}return jr({width:f,height:u,x:c,y:d})}function Jr(t,e){const n=Xr(t).scrollLeft;return e?e.left+n:Zt(ft(t)).left+n}function xl(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Jr(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function ch(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const a=s==="fixed",i=ft(r),o=e?Gr(e.floating):!1;if(r===i||o&&a)return n;let c={scrollLeft:0,scrollTop:0},d=lt(1);const f=lt(0),u=ut(r);if((u||!u&&!a)&&((Sn(r)!=="body"||Hn(i))&&(c=Xr(r)),ut(r))){const p=Zt(r);d=un(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const m=i&&!u&&!a?xl(i,c):lt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+m.x,y:n.y*d.y-c.scrollTop*d.y+f.y+m.y}}function uh(t){return Array.from(t.getClientRects())}function dh(t){const e=ft(t),n=Xr(t),r=t.ownerDocument.body,s=Ie(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),a=Ie(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Jr(t);const o=-n.scrollTop;return tt(r).direction==="rtl"&&(i+=Ie(e.clientWidth,r.clientWidth)-s),{width:s,height:a,x:i,y:o}}const Ri=25;function fh(t,e){const n=Pe(t),r=ft(t),s=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,o=0,c=0;if(s){a=s.width,i=s.height;const f=Na();(!f||f&&e==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}const d=Jr(r);if(d<=0){const f=r.ownerDocument,u=f.body,m=getComputedStyle(u),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(r.clientWidth-u.clientWidth-p);y<=Ri&&(a-=y)}else d<=Ri&&(a+=d);return{width:a,height:i,x:o,y:c}}const hh=new Set(["absolute","fixed"]);function mh(t,e){const n=Zt(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,a=ut(t)?un(t):lt(1),i=t.clientWidth*a.x,o=t.clientHeight*a.y,c=s*a.x,d=r*a.y;return{width:i,height:o,x:c,y:d}}function Ai(t,e,n){let r;if(e==="viewport")r=fh(t,n);else if(e==="document")r=dh(ft(t));else if(et(e))r=mh(e,n);else{const s=vl(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return jr(r)}function wl(t,e){const n=jt(t);return n===e||!et(n)||pn(n)?!1:tt(n).position==="fixed"||wl(n,e)}function ph(t,e){const n=e.get(t);if(n)return n;let r=Vn(t,[],!1).filter(o=>et(o)&&Sn(o)!=="body"),s=null;const a=tt(t).position==="fixed";let i=a?jt(t):t;for(;et(i)&&!pn(i);){const o=tt(i),c=Sa(i);!c&&o.position==="fixed"&&(s=null),(a?!c&&!s:!c&&o.position==="static"&&!!s&&hh.has(s.position)||Hn(i)&&!c&&wl(t,i))?r=r.filter(f=>f!==i):s=o,i=jt(i)}return e.set(t,r),r}function gh(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const i=[...n==="clippingAncestors"?Gr(e)?[]:ph(e,this._c):[].concat(n),r],o=i[0],c=i.reduce((d,f)=>{const u=Ai(e,f,s);return d.top=Ie(u.top,d.top),d.right=Ot(u.right,d.right),d.bottom=Ot(u.bottom,d.bottom),d.left=Ie(u.left,d.left),d},Ai(e,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yh(t){const{width:e,height:n}=yl(t);return{width:e,height:n}}function vh(t,e,n){const r=ut(e),s=ft(e),a=n==="fixed",i=Zt(t,!0,a,e);let o={scrollLeft:0,scrollTop:0};const c=lt(0);function d(){c.x=Jr(s)}if(r||!r&&!a)if((Sn(e)!=="body"||Hn(s))&&(o=Xr(e)),r){const p=Zt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else s&&d();a&&!r&&s&&d();const f=s&&!r&&!a?xl(s,o):lt(0),u=i.left+o.scrollLeft-c.x-f.x,m=i.top+o.scrollTop-c.y-f.y;return{x:u,y:m,width:i.width,height:i.height}}function ks(t){return tt(t).position==="static"}function Mi(t,e){if(!ut(t)||tt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ft(t)===n&&(n=n.ownerDocument.body),n}function bl(t,e){const n=Pe(t);if(Gr(t))return n;if(!ut(t)){let s=jt(t);for(;s&&!pn(s);){if(et(s)&&!ks(s))return s;s=jt(s)}return n}let r=Mi(t,e);for(;r&&eh(r)&&ks(r);)r=Mi(r,e);return r&&pn(r)&&ks(r)&&!Sa(r)?n:r||ah(t)||n}const xh=async function(t){const e=this.getOffsetParent||bl,n=this.getDimensions,r=await n(t.floating);return{reference:vh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wh(t){return tt(t).direction==="rtl"}const bh={convertOffsetParentRelativeRectToViewportRelativeRect:ch,getDocumentElement:ft,getClippingRect:gh,getOffsetParent:bl,getElementRects:xh,getClientRects:uh,getDimensions:yh,getScale:un,isElement:et,isRTL:wh};function _l(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function _h(t,e){let n=null,r;const s=ft(t);function a(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function i(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),a();const d=t.getBoundingClientRect(),{left:f,top:u,width:m,height:p}=d;if(o||e(),!m||!p)return;const y=ir(u),g=ir(s.clientWidth-(f+m)),w=ir(s.clientHeight-(u+p)),v=ir(f),S={rootMargin:-y+"px "+-g+"px "+-w+"px "+-v+"px",threshold:Ie(0,Ot(1,c))||1};let _=!0;function b(E){const T=E[0].intersectionRatio;if(T!==c){if(!_)return i();T?i(!1,T):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!_l(d,t.getBoundingClientRect())&&i(),_=!1}try{n=new IntersectionObserver(b,{...S,root:s.ownerDocument})}catch{n=new IntersectionObserver(b,S)}n.observe(t)}return i(!0),a}function kh(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Ca(t),f=s||a?[...d?Vn(d):[],...Vn(e)]:[];f.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=d&&o?_h(d,n):null;let m=-1,p=null;i&&(p=new ResizeObserver(v=>{let[k]=v;k&&k.target===d&&p&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(e)})),n()}),d&&!c&&p.observe(d),p.observe(e));let y,g=c?Zt(t):null;c&&w();function w(){const v=Zt(t);g&&!_l(g,v)&&n(),g=v,y=requestAnimationFrame(w)}return n(),()=>{var v;f.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),u?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const Sh=Yf,Nh=Gf,Ch=Uf,Th=Jf,Eh=Hf,Ii=Bf,Oh=Xf,jh=(t,e,n)=>{const r=new Map,s={platform:bh,...n},a={...s.platform,_c:r};return Zf(t,e,{...s,platform:a})};var Dh=typeof document<"u",Rh=function(){},wr=Dh?x.useLayoutEffect:Rh;function Dr(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Dr(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&t.$$typeof)&&!Dr(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function kl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Pi(t,e){const n=kl(t);return Math.round(e*n)/n}function Ss(t){const e=h.useRef(t);return wr(()=>{e.current=t}),e}function Ah(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:i}={},transform:o=!0,whileElementsMounted:c,open:d}=t,[f,u]=h.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,p]=h.useState(r);Dr(m,r)||p(r);const[y,g]=h.useState(null),[w,v]=h.useState(null),k=h.useCallback($=>{$!==E.current&&(E.current=$,g($))},[]),S=h.useCallback($=>{$!==T.current&&(T.current=$,v($))},[]),_=a||y,b=i||w,E=h.useRef(null),T=h.useRef(null),A=h.useRef(f),V=c!=null,L=Ss(c),z=Ss(s),B=Ss(d),G=h.useCallback(()=>{if(!E.current||!T.current)return;const $={placement:e,strategy:n,middleware:m};z.current&&($.platform=z.current),jh(E.current,T.current,$).then(ie=>{const F={...ie,isPositioned:B.current!==!1};Q.current&&!Dr(A.current,F)&&(A.current=F,Ho.flushSync(()=>{u(F)}))})},[m,e,n,z,B]);wr(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,u($=>({...$,isPositioned:!1})))},[d]);const Q=h.useRef(!1);wr(()=>(Q.current=!0,()=>{Q.current=!1}),[]),wr(()=>{if(_&&(E.current=_),b&&(T.current=b),_&&b){if(L.current)return L.current(_,b,G);G()}},[_,b,G,L,V]);const H=h.useMemo(()=>({reference:E,floating:T,setReference:k,setFloating:S}),[k,S]),P=h.useMemo(()=>({reference:_,floating:b}),[_,b]),U=h.useMemo(()=>{const $={position:n,left:0,top:0};if(!P.floating)return $;const ie=Pi(P.floating,f.x),F=Pi(P.floating,f.y);return o?{...$,transform:"translate("+ie+"px, "+F+"px)",...kl(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:F}},[n,o,P.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:G,refs:H,elements:P,floatingStyles:U}),[f,G,H,P,U])}const Mh=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Ii({element:r.current,padding:s}).fn(n):{}:r?Ii({element:r,padding:s}).fn(n):{}}}},Ih=(t,e)=>({...Sh(t),options:[t,e]}),Ph=(t,e)=>({...Nh(t),options:[t,e]}),Fh=(t,e)=>({...Oh(t),options:[t,e]}),Lh=(t,e)=>({...Ch(t),options:[t,e]}),Vh=(t,e)=>({...Th(t),options:[t,e]}),$h=(t,e)=>({...Eh(t),options:[t,e]}),Wh=(t,e)=>({...Mh(t),options:[t,e]});var zh="Arrow",Sl=h.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...a}=t;return l.jsx(Ce.svg,{...a,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sl.displayName=zh;var Zh=Sl;function Nl(t){const[e,n]=h.useState(void 0);return Et(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let i,o;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,o=d.blockSize}else i=t.offsetWidth,o=t.offsetHeight;n({width:i,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var Ta="Popper",[Cl,Tl]=qr(Ta),[Bh,El]=Cl(Ta),Ol=t=>{const{__scopePopper:e,children:n}=t,[r,s]=h.useState(null);return l.jsx(Bh,{scope:e,anchor:r,onAnchorChange:s,children:n})};Ol.displayName=Ta;var jl="PopperAnchor",Dl=h.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,a=El(jl,n),i=h.useRef(null),o=$e(e,i),c=h.useRef(null);return h.useEffect(()=>{const d=c.current;c.current=r?.current||i.current,d!==c.current&&a.onAnchorChange(c.current)}),r?null:l.jsx(Ce.div,{...s,ref:o})});Dl.displayName=jl;var Ea="PopperContent",[Uh,Hh]=Cl(Ea),Rl=h.forwardRef((t,e)=>{const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:y,...g}=t,w=El(Ea,n),[v,k]=h.useState(null),S=$e(e,Te=>k(Te)),[_,b]=h.useState(null),E=Nl(_),T=E?.width??0,A=E?.height??0,V=r+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(d)?d:[d],B=z.length>0,G={padding:L,boundary:z.filter(Yh),altBoundary:B},{refs:Q,floatingStyles:H,placement:P,isPositioned:U,middlewareData:$}=Ah({strategy:"fixed",placement:V,whileElementsMounted:(...Te)=>kh(...Te,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[Ih({mainAxis:s+A,alignmentAxis:i}),c&&Ph({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Fh():void 0,...G}),c&&Lh({...G}),Vh({...G,apply:({elements:Te,rects:oe,availableWidth:vt,availableHeight:Yt})=>{const{width:Gt,height:xt}=oe.reference,Xt=Te.floating.style;Xt.setProperty("--radix-popper-available-width",`${vt}px`),Xt.setProperty("--radix-popper-available-height",`${Yt}px`),Xt.setProperty("--radix-popper-anchor-width",`${Gt}px`),Xt.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),_&&Wh({element:_,padding:o}),Gh({arrowWidth:T,arrowHeight:A}),m&&$h({strategy:"referenceHidden",...G})]}),[ie,F]=Il(P),D=mn(y);Et(()=>{U&&D?.()},[U,D]);const ee=$.arrow?.x,W=$.arrow?.y,le=$.arrow?.centerOffset!==0,[ce,ve]=h.useState();return Et(()=>{v&&ve(window.getComputedStyle(v).zIndex)},[v]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:U?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(Uh,{scope:n,placedSide:ie,onArrowChange:b,arrowX:ee,arrowY:W,shouldHideArrow:le,children:l.jsx(Ce.div,{"data-side":ie,"data-align":F,...g,ref:S,style:{...g.style,animation:U?void 0:"none"}})})})});Rl.displayName=Ea;var Al="PopperArrow",qh={top:"bottom",right:"left",bottom:"top",left:"right"},Ml=h.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,a=Hh(Al,r),i=qh[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Zh,{...s,ref:n,style:{...s.style,display:"block"}})})});Ml.displayName=Al;function Yh(t){return t!==null}var Gh=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:s}=e,i=s.arrow?.centerOffset!==0,o=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[d,f]=Il(n),u={start:"0%",center:"50%",end:"100%"}[f],m=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+c/2;let y="",g="";return d==="bottom"?(y=i?u:`${m}px`,g=`${-c}px`):d==="top"?(y=i?u:`${m}px`,g=`${r.floating.height+c}px`):d==="right"?(y=`${-c}px`,g=i?u:`${p}px`):d==="left"&&(y=`${r.floating.width+c}px`,g=i?u:`${p}px`),{data:{x:y,y:g}}}});function Il(t){const[e,n="center"]=t.split("-");return[e,n]}var Xh=Ol,Pl=Dl,Jh=Rl,Kh=Ml,Qh="Portal",Oa=h.forwardRef((t,e)=>{const{container:n,...r}=t,[s,a]=h.useState(!1);Et(()=>a(!0),[]);const i=n||s&&globalThis?.document?.body;return i?ma.createPortal(l.jsx(Ce.div,{...r,ref:e}),i):null});Oa.displayName=Qh;function em(t,e){return h.useReducer((n,r)=>e[n][r]??n,t)}var Nn=t=>{const{present:e,children:n}=t,r=tm(e),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),a=$e(r.ref,nm(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:a}):null};Nn.displayName="Presence";function tm(t){const[e,n]=h.useState(),r=h.useRef(null),s=h.useRef(t),a=h.useRef("none"),i=t?"mounted":"unmounted",[o,c]=em(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=or(r.current);a.current=o==="mounted"?d:"none"},[o]),Et(()=>{const d=r.current,f=s.current;if(f!==t){const m=a.current,p=or(d);t?c("MOUNT"):p==="none"||d?.display==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Et(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,u=p=>{const g=or(r.current).includes(CSS.escape(p.animationName));if(p.target===e&&g&&(c("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",d=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},m=p=>{p.target===e&&(a.current=or(r.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{f.clearTimeout(d),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:h.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function or(t){return t?.animationName||"none"}function nm(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var rm=h[" useInsertionEffect ".trim().toString()]||Et;function ja({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,a,i]=sm({defaultProp:e,onChange:n}),o=t!==void 0,c=o?t:s;{const f=h.useRef(t!==void 0);h.useEffect(()=>{const u=f.current;u!==o&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=o},[o,r])}const d=h.useCallback(f=>{if(o){const u=am(f)?f(t):f;u!==t&&i.current?.(u)}else a(f)},[o,t,a,i]);return[c,d]}function sm({defaultProp:t,onChange:e}){const[n,r]=h.useState(t),s=h.useRef(n),a=h.useRef(e);return rm(()=>{a.current=e},[e]),h.useEffect(()=>{s.current!==n&&(a.current?.(n),s.current=n)},[n,s]),[n,r,a]}function am(t){return typeof t=="function"}var im=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},en=new WeakMap,lr=new WeakMap,cr={},Ns=0,Fl=function(t){return t&&(t.host||Fl(t.parentNode))},om=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Fl(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},lm=function(t,e,n,r){var s=om(e,Array.isArray(t)?t:[t]);cr[n]||(cr[n]=new WeakMap);var a=cr[n],i=[],o=new Set,c=new Set(s),d=function(u){!u||o.has(u)||(o.add(u),d(u.parentNode))};s.forEach(d);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(m){if(o.has(m))f(m);else try{var p=m.getAttribute(r),y=p!==null&&p!=="false",g=(en.get(m)||0)+1,w=(a.get(m)||0)+1;en.set(m,g),a.set(m,w),i.push(m),g===1&&y&&lr.set(m,!0),w===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return f(e),o.clear(),Ns++,function(){i.forEach(function(u){var m=en.get(u)-1,p=a.get(u)-1;en.set(u,m),a.set(u,p),m||(lr.has(u)||u.removeAttribute(r),lr.delete(u)),p||u.removeAttribute(n)}),Ns--,Ns||(en=new WeakMap,en=new WeakMap,lr=new WeakMap,cr={})}},Ll=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=im(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),lm(r,s,n,"aria-hidden")):function(){return null}},it=function(){return it=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},it.apply(this,arguments)};function Vl(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function cm(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,a;r<s;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var br="right-scroll-bar-position",_r="width-before-scroll-bar",um="with-scroll-bars-hidden",dm="--removed-body-scroll-bar-size";function Cs(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function fm(t,e){var n=x.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var hm=typeof window<"u"?h.useLayoutEffect:h.useEffect,Fi=new WeakMap;function mm(t,e){var n=fm(null,function(r){return t.forEach(function(s){return Cs(s,r)})});return hm(function(){var r=Fi.get(n);if(r){var s=new Set(r),a=new Set(t),i=n.current;s.forEach(function(o){a.has(o)||Cs(o,null)}),a.forEach(function(o){s.has(o)||Cs(o,i)})}Fi.set(n,t)},[t]),n}function pm(t){return t}function gm(t,e){e===void 0&&(e=pm);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(a){var i=e(a,r);return n.push(i),function(){n=n.filter(function(o){return o!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(o){return a(o)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var o=n;n=[],o.forEach(a),i=n}var c=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return s}function ym(t){t===void 0&&(t={});var e=gm(null);return e.options=it({async:!0,ssr:!1},t),e}var $l=function(t){var e=t.sideCar,n=Vl(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,it({},n))};$l.isSideCarExport=!0;function vm(t,e){return t.useMedium(e),$l}var Wl=ym(),Ts=function(){},Kr=h.forwardRef(function(t,e){var n=h.useRef(null),r=h.useState({onScrollCapture:Ts,onWheelCapture:Ts,onTouchMoveCapture:Ts}),s=r[0],a=r[1],i=t.forwardProps,o=t.children,c=t.className,d=t.removeScrollBar,f=t.enabled,u=t.shards,m=t.sideCar,p=t.noRelative,y=t.noIsolation,g=t.inert,w=t.allowPinchZoom,v=t.as,k=v===void 0?"div":v,S=t.gapMode,_=Vl(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=m,E=mm([n,e]),T=it(it({},_),s);return h.createElement(h.Fragment,null,f&&h.createElement(b,{sideCar:Wl,removeScrollBar:d,shards:u,noRelative:p,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!w,lockRef:n,gapMode:S}),i?h.cloneElement(h.Children.only(o),it(it({},T),{ref:E})):h.createElement(k,it({},T,{className:c,ref:E}),o))});Kr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kr.classNames={fullWidth:_r,zeroRight:br};var xm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wm(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=xm();return e&&t.setAttribute("nonce",e),t}function bm(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function _m(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var km=function(){var t=0,e=null;return{add:function(n){t==0&&(e=wm())&&(bm(e,n),_m(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Sm=function(){var t=km();return function(e,n){h.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},zl=function(){var t=Sm(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},Nm={left:0,top:0,right:0,gap:0},Es=function(t){return parseInt(t||"",10)||0},Cm=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Es(n),Es(r),Es(s)]},Tm=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Nm;var e=Cm(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Em=zl(),dn="data-scroll-locked",Om=function(t,e,n,r){var s=t.left,a=t.top,i=t.right,o=t.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ho=require("tailwind-merge"),ma=require("clsx"),l=require("react/jsx-runtime"),x=require("react"),J=require("lucide-react"),pa=require("react-dom"),Pd=require("@radix-ui/react-dropdown-menu"),Ld=require("@radix-ui/react-select"),Vd=require("lottie-react"),$d=require("@radix-ui/react-tooltip");function Un(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const h=Un(x),qo=Un(pa),fe=Un(Pd),pe=Un(Ld),zt=Un($d),kn=t=>{let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e)},Yo=(t,e)=>Math.floor(t/Math.pow(10,e)%10),Zs=(t,e)=>!(Yo(t,e)%2),ke=(t,e,n)=>{const r=t%e;return n&&Yo(t,n)%2===0?-r:r},Zt=(t,e,n)=>e[t%n],Wd=t=>{t.slice(0,1)==="#"&&(t=t.slice(1));const e=parseInt(t.substr(0,2),16),n=parseInt(t.substr(2,2),16),r=parseInt(t.substr(4,2),16);return(e*299+n*587+r*114)/1e3>=128?"#000000":"#FFFFFF"},zd=4,ue=80;function Zd(t,e){const n=kn(t),r=e&&e.length;return Array.from({length:zd},(s,a)=>({color:Zt(n+a,e,r),translateX:ke(n*(a+1),ue/2-(a+17),1),translateY:ke(n*(a+1),ue/2-(a+17),2),rotate:ke(n*(a+1),360),isSquare:Zs(n,2)}))}const pi=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Zd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+ue+" "+ue,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:ue,height:ue,children:l.jsx("rect",{width:ue,height:ue,rx:r?void 0:ue*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:ue,height:ue,fill:i[0].color}),l.jsx("rect",{x:(ue-60)/2,y:(ue-20)/2,width:ue,height:i[1].isSquare?ue:ue/8,fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+ue/2+" "+ue/2+")"}),l.jsx("circle",{cx:ue/2,cy:ue/2,fill:i[2].color,r:ue/5,transform:"translate("+i[2].translateX+" "+i[2].translateY+")"}),l.jsx("line",{x1:0,y1:ue/2,x2:ue,y2:ue/2,strokeWidth:2,stroke:i[3].color,transform:"translate("+i[3].translateX+" "+i[3].translateY+") rotate("+i[3].rotate+" "+ue/2+" "+ue/2+")"})]})]})},It=90,Bd=5;function Ud(t,e){const n=kn(t),r=e&&e.length,s=Array.from({length:Bd},(i,o)=>Zt(n+o,e,r)),a=[];return a[0]=s[0],a[1]=s[1],a[2]=s[1],a[3]=s[2],a[4]=s[2],a[5]=s[3],a[6]=s[3],a[7]=s[0],a[8]=s[4],a}const Hd=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Ud(t,e),o=x.useId();return l.jsxs("svg",{viewBox:"0 0 "+It+" "+It,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:It,height:It,children:l.jsx("rect",{width:It,height:It,rx:r?void 0:It*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("path",{d:"M0 0h90v45H0z",fill:i[0]}),l.jsx("path",{d:"M0 45h90v45H0z",fill:i[1]}),l.jsx("path",{d:"M83 45a38 38 0 00-76 0h76z",fill:i[2]}),l.jsx("path",{d:"M83 45a38 38 0 01-76 0h76z",fill:i[3]}),l.jsx("path",{d:"M77 45a32 32 0 10-64 0h64z",fill:i[4]}),l.jsx("path",{d:"M77 45a32 32 0 11-64 0h64z",fill:i[5]}),l.jsx("path",{d:"M71 45a26 26 0 00-52 0h52z",fill:i[6]}),l.jsx("path",{d:"M71 45a26 26 0 01-52 0h52z",fill:i[7]}),l.jsx("circle",{cx:45,cy:45,r:23,fill:i[8]})]})]})},qd=64,Ft=80;function Yd(t,e){const n=kn(t),r=e&&e.length;return Array.from({length:qd},(s,a)=>Zt(n%(a+1),e,r))}const Gd=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Yd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Ft+" "+Ft,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,"mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:Ft,height:Ft,children:l.jsx("rect",{width:Ft,height:Ft,rx:r?void 0:Ft*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:10,height:10,fill:i[0]}),l.jsx("rect",{x:20,width:10,height:10,fill:i[1]}),l.jsx("rect",{x:40,width:10,height:10,fill:i[2]}),l.jsx("rect",{x:60,width:10,height:10,fill:i[3]}),l.jsx("rect",{x:10,width:10,height:10,fill:i[4]}),l.jsx("rect",{x:30,width:10,height:10,fill:i[5]}),l.jsx("rect",{x:50,width:10,height:10,fill:i[6]}),l.jsx("rect",{x:70,width:10,height:10,fill:i[7]}),l.jsx("rect",{y:10,width:10,height:10,fill:i[8]}),l.jsx("rect",{y:20,width:10,height:10,fill:i[9]}),l.jsx("rect",{y:30,width:10,height:10,fill:i[10]}),l.jsx("rect",{y:40,width:10,height:10,fill:i[11]}),l.jsx("rect",{y:50,width:10,height:10,fill:i[12]}),l.jsx("rect",{y:60,width:10,height:10,fill:i[13]}),l.jsx("rect",{y:70,width:10,height:10,fill:i[14]}),l.jsx("rect",{x:20,y:10,width:10,height:10,fill:i[15]}),l.jsx("rect",{x:20,y:20,width:10,height:10,fill:i[16]}),l.jsx("rect",{x:20,y:30,width:10,height:10,fill:i[17]}),l.jsx("rect",{x:20,y:40,width:10,height:10,fill:i[18]}),l.jsx("rect",{x:20,y:50,width:10,height:10,fill:i[19]}),l.jsx("rect",{x:20,y:60,width:10,height:10,fill:i[20]}),l.jsx("rect",{x:20,y:70,width:10,height:10,fill:i[21]}),l.jsx("rect",{x:40,y:10,width:10,height:10,fill:i[22]}),l.jsx("rect",{x:40,y:20,width:10,height:10,fill:i[23]}),l.jsx("rect",{x:40,y:30,width:10,height:10,fill:i[24]}),l.jsx("rect",{x:40,y:40,width:10,height:10,fill:i[25]}),l.jsx("rect",{x:40,y:50,width:10,height:10,fill:i[26]}),l.jsx("rect",{x:40,y:60,width:10,height:10,fill:i[27]}),l.jsx("rect",{x:40,y:70,width:10,height:10,fill:i[28]}),l.jsx("rect",{x:60,y:10,width:10,height:10,fill:i[29]}),l.jsx("rect",{x:60,y:20,width:10,height:10,fill:i[30]}),l.jsx("rect",{x:60,y:30,width:10,height:10,fill:i[31]}),l.jsx("rect",{x:60,y:40,width:10,height:10,fill:i[32]}),l.jsx("rect",{x:60,y:50,width:10,height:10,fill:i[33]}),l.jsx("rect",{x:60,y:60,width:10,height:10,fill:i[34]}),l.jsx("rect",{x:60,y:70,width:10,height:10,fill:i[35]}),l.jsx("rect",{x:10,y:10,width:10,height:10,fill:i[36]}),l.jsx("rect",{x:10,y:20,width:10,height:10,fill:i[37]}),l.jsx("rect",{x:10,y:30,width:10,height:10,fill:i[38]}),l.jsx("rect",{x:10,y:40,width:10,height:10,fill:i[39]}),l.jsx("rect",{x:10,y:50,width:10,height:10,fill:i[40]}),l.jsx("rect",{x:10,y:60,width:10,height:10,fill:i[41]}),l.jsx("rect",{x:10,y:70,width:10,height:10,fill:i[42]}),l.jsx("rect",{x:30,y:10,width:10,height:10,fill:i[43]}),l.jsx("rect",{x:30,y:20,width:10,height:10,fill:i[44]}),l.jsx("rect",{x:30,y:30,width:10,height:10,fill:i[45]}),l.jsx("rect",{x:30,y:40,width:10,height:10,fill:i[46]}),l.jsx("rect",{x:30,y:50,width:10,height:10,fill:i[47]}),l.jsx("rect",{x:30,y:60,width:10,height:10,fill:i[48]}),l.jsx("rect",{x:30,y:70,width:10,height:10,fill:i[49]}),l.jsx("rect",{x:50,y:10,width:10,height:10,fill:i[50]}),l.jsx("rect",{x:50,y:20,width:10,height:10,fill:i[51]}),l.jsx("rect",{x:50,y:30,width:10,height:10,fill:i[52]}),l.jsx("rect",{x:50,y:40,width:10,height:10,fill:i[53]}),l.jsx("rect",{x:50,y:50,width:10,height:10,fill:i[54]}),l.jsx("rect",{x:50,y:60,width:10,height:10,fill:i[55]}),l.jsx("rect",{x:50,y:70,width:10,height:10,fill:i[56]}),l.jsx("rect",{x:70,y:10,width:10,height:10,fill:i[57]}),l.jsx("rect",{x:70,y:20,width:10,height:10,fill:i[58]}),l.jsx("rect",{x:70,y:30,width:10,height:10,fill:i[59]}),l.jsx("rect",{x:70,y:40,width:10,height:10,fill:i[60]}),l.jsx("rect",{x:70,y:50,width:10,height:10,fill:i[61]}),l.jsx("rect",{x:70,y:60,width:10,height:10,fill:i[62]}),l.jsx("rect",{x:70,y:70,width:10,height:10,fill:i[63]})]})]})},he=36;function Xd(t,e){const n=kn(t),r=e&&e.length,s=Zt(n,e,r),a=ke(n,10,1),i=a<5?a+he/9:a,o=ke(n,10,2),c=o<5?o+he/9:o;return{wrapperColor:s,faceColor:Wd(s),backgroundColor:Zt(n+13,e,r),wrapperTranslateX:i,wrapperTranslateY:c,wrapperRotate:ke(n,360),wrapperScale:1+ke(n,he/12)/10,isMouthOpen:Zs(n,2),isCircle:Zs(n,1),eyeSpread:ke(n,5),mouthSpread:ke(n,3),faceRotate:ke(n,10,3),faceTranslateX:i>he/6?i/2:ke(n,8,1),faceTranslateY:c>he/6?c/2:ke(n,7,2)}}const gi=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Xd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+he+" "+he,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:he,height:he,children:l.jsx("rect",{width:he,height:he,rx:r?void 0:he*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:he,height:he,fill:i.backgroundColor}),l.jsx("rect",{x:"0",y:"0",width:he,height:he,transform:"translate("+i.wrapperTranslateX+" "+i.wrapperTranslateY+") rotate("+i.wrapperRotate+" "+he/2+" "+he/2+") scale("+i.wrapperScale+")",fill:i.wrapperColor,rx:i.isCircle?he:he/6}),l.jsxs("g",{transform:"translate("+i.faceTranslateX+" "+i.faceTranslateY+") rotate("+i.faceRotate+" "+he/2+" "+he/2+")",children:[i.isMouthOpen?l.jsx("path",{d:"M15 "+(19+i.mouthSpread)+"c2 1 4 1 6 0",stroke:i.faceColor,fill:"none",strokeLinecap:"round"}):l.jsx("path",{d:"M13,"+(19+i.mouthSpread)+" a1,0.75 0 0,0 10,0",fill:i.faceColor}),l.jsx("rect",{x:14-i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor}),l.jsx("rect",{x:20+i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor})]})]})]})},Jd=4,Oe=80;function Kd(t,e){const n=kn(t),r=e&&e.length;return Array.from({length:Jd},(s,a)=>Zt(n+a,e,r))}const Qd=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=Kd(t,e),o=t.replace(/\s/g,""),c=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Oe+" "+Oe,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:c,maskUnits:"userSpaceOnUse",x:0,y:0,width:Oe,height:Oe,children:l.jsx("rect",{width:Oe,height:Oe,rx:r?void 0:Oe*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${c})`,children:[l.jsx("path",{fill:"url(#gradient_paint0_linear_"+o+")",d:"M0 0h80v40H0z"}),l.jsx("path",{fill:"url(#gradient_paint1_linear_"+o+")",d:"M0 40h80v40H0z"})]}),l.jsxs("defs",{children:[l.jsxs("linearGradient",{id:"gradient_paint0_linear_"+o,x1:Oe/2,y1:0,x2:Oe/2,y2:Oe/2,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[0]}),l.jsx("stop",{offset:1,stopColor:i[1]})]}),l.jsxs("linearGradient",{id:"gradient_paint1_linear_"+o,x1:Oe/2,y1:Oe/2,x2:Oe/2,y2:Oe,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[2]}),l.jsx("stop",{offset:1,stopColor:i[3]})]})]})]})},ef=3,_e=80;function tf(t,e){const n=kn(t),r=e&&e.length;return Array.from({length:ef},(s,a)=>({color:Zt(n+a,e,r),translateX:ke(n*(a+1),_e/10,1),translateY:ke(n*(a+1),_e/10,2),scale:1.2+ke(n*(a+1),_e/20)/10,rotate:ke(n*(a+1),360,1)}))}const Go=({name:t,colors:e,title:n,square:r,size:s,...a})=>{const i=tf(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+_e+" "+_e,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[n&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:_e,height:_e,children:l.jsx("rect",{width:_e,height:_e,rx:r?void 0:_e*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:_e,height:_e,fill:i[0].color}),l.jsx("path",{filter:`url(#filter_${o})`,d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+_e/2+" "+_e/2+") scale("+i[2].scale+")"}),l.jsx("path",{filter:`url(#filter_${o})`,style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:i[2].color,transform:"translate("+i[2].translateX+" "+i[2].translateY+") rotate("+i[2].rotate+" "+_e/2+" "+_e/2+") scale("+i[2].scale+")"})]}),l.jsx("defs",{children:l.jsxs("filter",{id:`filter_${o}`,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),l.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),l.jsx("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"})]})})]})},nf={pixel:Gd,bauhaus:pi,ring:Hd,beam:gi,sunset:Qd,marble:Go,geometric:gi,abstract:pi},Xo=({variant:t="marble",colors:e=["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:n="Clara Barton",title:r=!1,size:s="40px",square:a=!1,...i})=>{const o=nf[t]||Go;return l.jsx(o,{colors:e,name:n,title:r,size:s,square:a,...i})},Jo=["var(--brand-primary)","var(--surface-1)","var(--text-1)"],rf=({personId:t,className:e})=>l.jsx(Xo,{size:40,name:t,variant:"beam",colors:Jo}),sf=({userId:t})=>l.jsx(Xo,{size:40,name:t,variant:"bauhaus",colors:Jo});function N(...t){return Ho.twMerge(ma.clsx(t))}const Ko=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-box",t),...e}));Ko.displayName="Box";function yi(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Qo(...t){return e=>{let n=!1;const r=t.map(s=>{const a=yi(s,e);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():yi(t[s],null)}}}}function $e(...t){return h.useCallback(Qo(...t),t)}function Hr(t){const e=af(t),n=h.forwardRef((r,s)=>{const{children:a,...i}=r,o=h.Children.toArray(a),c=o.find(lf);if(c){const d=c.props.children,f=o.map(u=>u===c?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:u);return l.jsx(e,{...i,ref:s,children:h.isValidElement(d)?h.cloneElement(d,void 0,f):null})}return l.jsx(e,{...i,ref:s,children:a})});return n.displayName=`${t}.Slot`,n}var el=Hr("Slot");function af(t){const e=h.forwardRef((n,r)=>{const{children:s,...a}=n;if(h.isValidElement(s)){const i=uf(s),o=cf(a,s.props);return s.type!==h.Fragment&&(o.ref=r?Qo(r,i):i),h.cloneElement(s,o)}return h.Children.count(s)>1?h.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var of=Symbol("radix.slottable");function lf(t){return h.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===of}function cf(t,e){const n={...e};for(const r in e){const s=t[r],a=e[r];/^on[A-Z]/.test(r)?s&&a?n[r]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...a}:r==="className"&&(n[r]=[s,a].filter(Boolean).join(" "))}return{...t,...n}}function uf(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const vi=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,xi=ma.clsx,df=(t,e)=>n=>{var r;if(e?.variants==null)return xi(t,n?.class,n?.className);const{variants:s,defaultVariants:a}=e,i=Object.keys(s).map(d=>{const f=n?.[d],u=a?.[d];if(f===null)return null;const m=vi(f)||vi(u);return s[d][m]}),o=n&&Object.entries(n).reduce((d,f)=>{let[u,m]=f;return m===void 0||(d[u]=m),d},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:m,...p}=f;return Object.entries(p).every(y=>{let[g,w]=y;return Array.isArray(w)?w.includes({...a,...o}[g]):{...a,...o}[g]===w})?[...d,u,m]:d},[]);return xi(t,i,c,n?.class,n?.className)},tl=df("oniratec-button",{variants:{variant:{default:"",primary:"oniratec-button--primary",secondary:"oniratec-button--secondary",destructive:"oniratec-button--destructive",outline:"oniratec-button--outline",ghost:"oniratec-button--ghost",link:"oniratec-button--link"},size:{xs:"",sm:"",md:"",lg:"",icon:"","icon-sm":"","icon-lg":""}},defaultVariants:{variant:"default",size:"md"}}),Le=h.forwardRef(({className:t,asChild:e=!1,variant:n="default",size:r="md",loading:s=!1,disabled:a,children:i,...o},c)=>{const d=e?el:"button";return l.jsxs(d,{ref:c,"data-size":r??void 0,"data-variant":n??void 0,className:N(tl({variant:n,size:r}),s&&"oniratec-button--loading",t),disabled:a||s,...o,children:[s&&l.jsx(J.Loader2,{className:"oniratec-button__spinner"}),i]})});Le.displayName="Button";const nl=h.forwardRef(({src:t,alt:e,width:n=70,height:r=70,className:s,ImageComponent:a,...i},o)=>{const c=a??"img";return l.jsx(c,{type:void 0,props:void 0,ref:o,src:t,alt:e,width:n,height:r,className:N("oniratec-logo",s),...i},null)});nl.displayName="Logo";const Tr=h.forwardRef(({className:t,size:e="default",...n},r)=>l.jsx("div",{ref:r,"data-size":e,className:N("oniratec-card",t),...n}));Tr.displayName="Card";const ga=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__header",t),...e}));ga.displayName="CardHeader";const ya=h.forwardRef(({className:t,...e},n)=>l.jsx("h3",{ref:n,className:N("oniratec-card__title",t),...e}));ya.displayName="CardTitle";const rl=h.forwardRef(({className:t,...e},n)=>l.jsx("p",{ref:n,className:N("oniratec-card__description",t),...e}));rl.displayName="CardDescription";const va=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__content",t),...e}));va.displayName="CardContent";const sl=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__action",t),...e}));sl.displayName="CardAction";const al=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-card__footer",t),...e}));al.displayName="CardFooter";const ff={error:J.AlertCircle,warning:J.AlertTriangle,info:J.Info,success:J.CheckCircle},il=h.forwardRef(({className:t,variant:e="info",children:n,...r},s)=>{const a=ff[e];return l.jsxs("div",{ref:s,role:"alert","data-variant":e,className:N("oniratec-alert",t),...r,children:[a&&l.jsx(a,{className:"oniratec-alert__icon","aria-hidden":"true"}),l.jsx("div",{className:"oniratec-alert__content",children:n})]})});il.displayName="Alert";const ol=h.forwardRef(({className:t,...e},n)=>l.jsx("h5",{ref:n,className:N("oniratec-alert__title",t),...e}));ol.displayName="AlertTitle";const ll=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-alert__description",t),...e}));ll.displayName="AlertDescription";const xa=h.forwardRef(({className:t,variant:e="default",size:n="md",...r},s)=>l.jsx("span",{ref:s,"data-variant":e,"data-size":n,className:N("oniratec-badge",t),...r}));xa.displayName="Badge";const cl=h.forwardRef(({className:t,id:e,label:n,description:r,size:s="md",indeterminate:a=!1,disabled:i,"aria-describedby":o,"aria-invalid":c,...d},f)=>{const u=h.useId(),m=e??u,p=r?`${m}-description`:void 0,y=c===!0||c==="true",g=h.useRef(null);h.useEffect(()=>{g.current&&(g.current.indeterminate=a)},[a]);const w=h.useCallback(v=>{g.current=v,typeof f=="function"?f(v):f&&(f.current=v)},[f]);return l.jsxs("label",{htmlFor:m,"data-size":s,"data-type":"checkbox",className:N("oniratec-control",i&&"cursor-not-allowed opacity-60",t),children:[l.jsx("input",{ref:w,id:m,type:"checkbox",disabled:i,"aria-invalid":y||void 0,"aria-checked":a?"mixed":void 0,"aria-describedby":[o,p].filter(Boolean).join(" ")||void 0,className:"oniratec-control__input",...d}),l.jsx("span",{className:N("oniratec-control__box",y&&"border-destructive"),children:a?l.jsx(J.Minus,{className:"h-3.5 w-3.5"}):l.jsx(J.Check,{className:"h-3.5 w-3.5 opacity-0 transition-opacity"})}),(n||r)&&l.jsxs("span",{className:"oniratec-control__label grid gap-1 leading-tight",children:[n&&l.jsx("span",{className:"font-medium",children:n}),r&&l.jsx("span",{id:p,className:"text-sm text-[color:var(--text-2)]",children:r})]})]})});cl.displayName="Checkbox";function Re(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t?.(s),n===!1||!s.defaultPrevented)return e?.(s)}}function hf(t,e){const n=h.createContext(e),r=a=>{const{children:i,...o}=a,c=h.useMemo(()=>o,Object.values(o));return l.jsx(n.Provider,{value:c,children:i})};r.displayName=t+"Provider";function s(a){const i=h.useContext(n);if(i)return i;if(e!==void 0)return e;throw new Error(`\`${a}\` must be used within \`${t}\``)}return[r,s]}function qr(t,e=[]){let n=[];function r(a,i){const o=h.createContext(i),c=n.length;n=[...n,i];const d=u=>{const{scope:m,children:p,...y}=u,g=m?.[t]?.[c]||o,w=h.useMemo(()=>y,Object.values(y));return l.jsx(g.Provider,{value:w,children:p})};d.displayName=a+"Provider";function f(u,m){const p=m?.[t]?.[c]||o,y=h.useContext(p);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[d,f]}const s=()=>{const a=n.map(i=>h.createContext(i));return function(o){const c=o?.[t]||a;return h.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,mf(s,...e)]}function mf(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=r.reduce((o,{useScope:c,scopeName:d})=>{const u=c(a)[`__scope${d}`];return{...o,...u}},{});return h.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var pf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=pf.reduce((t,e)=>{const n=Hr(`Primitive.${e}`),r=h.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:a})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function gf(t,e){t&&qo.flushSync(()=>t.dispatchEvent(e))}function pn(t){const e=h.useRef(t);return h.useEffect(()=>{e.current=t}),h.useMemo(()=>(...n)=>e.current?.(...n),[])}function yf(t,e=globalThis?.document){const n=pn(t);h.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var vf="DismissableLayer",Bs="dismissableLayer.update",xf="dismissableLayer.pointerDownOutside",wf="dismissableLayer.focusOutside",wi,ul=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wa=h.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:i,onDismiss:o,...c}=t,d=h.useContext(ul),[f,u]=h.useState(null),m=f?.ownerDocument??globalThis?.document,[,p]=h.useState({}),y=$e(e,E=>u(E)),g=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(w),k=f?g.indexOf(f):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,S=k>=v,_=kf(E=>{const I=E.target,W=[...d.branches].some(L=>L.contains(I));!S||W||(s?.(E),i?.(E),E.defaultPrevented||o?.())},m),T=Sf(E=>{const I=E.target;[...d.branches].some(L=>L.contains(I))||(a?.(E),i?.(E),E.defaultPrevented||o?.())},m);return yf(E=>{k===d.layers.size-1&&(r?.(E),!E.defaultPrevented&&o&&(E.preventDefault(),o()))},m),h.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(wi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),bi(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=wi)}},[f,m,n,d]),h.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),bi())},[f,d]),h.useEffect(()=>{const E=()=>p({});return document.addEventListener(Bs,E),()=>document.removeEventListener(Bs,E)},[]),l.jsx(Ce.div,{...c,ref:y,style:{pointerEvents:b?S?"auto":"none":void 0,...t.style},onFocusCapture:Re(t.onFocusCapture,T.onFocusCapture),onBlurCapture:Re(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Re(t.onPointerDownCapture,_.onPointerDownCapture)})});wa.displayName=vf;var bf="DismissableLayerBranch",_f=h.forwardRef((t,e)=>{const n=h.useContext(ul),r=h.useRef(null),s=$e(e,r);return h.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(Ce.div,{...t,ref:s})});_f.displayName=bf;function kf(t,e=globalThis?.document){const n=pn(t),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let c=function(){dl(xf,n,d,{discrete:!0})};const d={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",a),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Sf(t,e=globalThis?.document){const n=pn(t),r=h.useRef(!1);return h.useEffect(()=>{const s=a=>{a.target&&!r.current&&dl(wf,n,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bi(){const t=new CustomEvent(Bs);document.dispatchEvent(t)}function dl(t,e,n,{discrete:r}){const s=n.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?gf(s,a):s.dispatchEvent(a)}var ws=0;function fl(){h.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??_i()),document.body.insertAdjacentElement("beforeend",t[1]??_i()),ws++,()=>{ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ws--}},[])}function _i(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var bs="focusScope.autoFocusOnMount",_s="focusScope.autoFocusOnUnmount",ki={bubbles:!1,cancelable:!0},Nf="FocusScope",ba=h.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...i}=t,[o,c]=h.useState(null),d=pn(s),f=pn(a),u=h.useRef(null),m=$e(e,g=>c(g)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let g=function(b){if(p.paused||!o)return;const S=b.target;o.contains(S)?u.current=S:_t(u.current,{select:!0})},w=function(b){if(p.paused||!o)return;const S=b.relatedTarget;S!==null&&(o.contains(S)||_t(u.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const _ of b)_.removedNodes.length>0&&_t(o)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const k=new MutationObserver(v);return o&&k.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),k.disconnect()}}},[r,o,p.paused]),h.useEffect(()=>{if(o){Ni.add(p);const g=document.activeElement;if(!o.contains(g)){const v=new CustomEvent(bs,ki);o.addEventListener(bs,d),o.dispatchEvent(v),v.defaultPrevented||(Cf(Df(hl(o)),{select:!0}),document.activeElement===g&&_t(o))}return()=>{o.removeEventListener(bs,d),setTimeout(()=>{const v=new CustomEvent(_s,ki);o.addEventListener(_s,f),o.dispatchEvent(v),v.defaultPrevented||_t(g??document.body,{select:!0}),o.removeEventListener(_s,f),Ni.remove(p)},0)}}},[o,d,f,p]);const y=h.useCallback(g=>{if(!n&&!r||p.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const k=g.currentTarget,[b,S]=Tf(k);b&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&_t(b,{select:!0})):g.shiftKey&&v===b&&(g.preventDefault(),n&&_t(S,{select:!0})):v===k&&g.preventDefault()}},[n,r,p.paused]);return l.jsx(Ce.div,{tabIndex:-1,...i,ref:m,onKeyDown:y})});ba.displayName=Nf;function Cf(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(_t(r,{select:e}),document.activeElement!==n)return}function Tf(t){const e=hl(t),n=Si(e,t),r=Si(e.reverse(),t);return[n,r]}function hl(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Si(t,e){for(const n of t)if(!Ef(n,{upTo:e}))return n}function Ef(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Of(t){return t instanceof HTMLInputElement&&"select"in t}function _t(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Of(t)&&e&&t.select()}}var Ni=jf();function jf(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=Ci(t,e),t.unshift(e)},remove(e){t=Ci(t,e),t[0]?.resume()}}}function Ci(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Df(t){return t.filter(e=>e.tagName!=="A")}var Et=globalThis?.document?h.useLayoutEffect:()=>{},Rf=h[" useId ".trim().toString()]||(()=>{}),Af=0;function xr(t){const[e,n]=h.useState(Rf());return Et(()=>{n(r=>r??String(Af++))},[t]),t||(e?`radix-${e}`:"")}const Mf=["top","right","bottom","left"],Ot=Math.min,Ie=Math.max,Er=Math.round,ir=Math.floor,lt=t=>({x:t,y:t}),If={left:"right",right:"left",bottom:"top",top:"bottom"};function Us(t,e,n){return Ie(t,Ot(e,n))}function mt(t,e){return typeof t=="function"?t(e):t}function pt(t){return t.split("-")[0]}function Sn(t){return t.split("-")[1]}function _a(t){return t==="x"?"y":"x"}function ka(t){return t==="y"?"height":"width"}function ot(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Sa(t){return _a(ot(t))}function Ff(t,e,n){n===void 0&&(n=!1);const r=Sn(t),s=Sa(t),a=ka(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Or(i)),[i,Or(i)]}function Pf(t){const e=Or(t);return[Hs(t),e,Hs(e)]}function Hs(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ti=["left","right"],Ei=["right","left"],Lf=["top","bottom"],Vf=["bottom","top"];function $f(t,e,n){switch(t){case"top":case"bottom":return n?e?Ei:Ti:e?Ti:Ei;case"left":case"right":return e?Lf:Vf;default:return[]}}function Wf(t,e,n,r){const s=Sn(t);let a=$f(pt(t),n==="start",r);return s&&(a=a.map(i=>i+"-"+s),e&&(a=a.concat(a.map(Hs)))),a}function Or(t){const e=pt(t);return If[e]+t.slice(e.length)}function zf(t){return{top:0,right:0,bottom:0,left:0,...t}}function ml(t){return typeof t!="number"?zf(t):{top:t,right:t,bottom:t,left:t}}function jr(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function Oi(t,e,n){let{reference:r,floating:s}=t;const a=ot(e),i=Sa(e),o=ka(i),c=pt(e),d=a==="y",f=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,m=r[o]/2-s[o]/2;let p;switch(c){case"top":p={x:f,y:r.y-s.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-s.width,y:u};break;default:p={x:r.x,y:r.y}}switch(Sn(e)){case"start":p[i]-=m*(n&&d?-1:1);break;case"end":p[i]+=m*(n&&d?-1:1);break}return p}async function Zf(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:a,rects:i,elements:o,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=mt(e,t),y=ml(p),w=o[m?u==="floating"?"reference":"floating":u],v=jr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:d,rootBoundary:f,strategy:c})),k=u==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),S=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},_=jr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:k,offsetParent:b,strategy:c}):k);return{top:(v.top-_.top+y.top)/S.y,bottom:(_.bottom-v.bottom+y.bottom)/S.y,left:(v.left-_.left+y.left)/S.x,right:(_.right-v.right+y.right)/S.x}}const Bf=50,Uf=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:i}=n,o=i.detectOverflow?i:{...i,detectOverflow:Zf},c=await(i.isRTL==null?void 0:i.isRTL(e));let d=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=Oi(d,r,c),m=r,p=0;const y={};for(let g=0;g<a.length;g++){const w=a[g];if(!w)continue;const{name:v,fn:k}=w,{x:b,y:S,data:_,reset:T}=await k({x:f,y:u,initialPlacement:r,placement:m,strategy:s,middlewareData:y,rects:d,platform:o,elements:{reference:t,floating:e}});f=b??f,u=S??u,y[v]={...y[v],..._},T&&p<Bf&&(p++,typeof T=="object"&&(T.placement&&(m=T.placement),T.rects&&(d=T.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):T.rects),{x:f,y:u}=Oi(d,m,c)),g=-1)}return{x:f,y:u,placement:m,strategy:s,middlewareData:y}},Hf=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:a,platform:i,elements:o,middlewareData:c}=e,{element:d,padding:f=0}=mt(t,e)||{};if(d==null)return{};const u=ml(f),m={x:n,y:r},p=Sa(s),y=ka(p),g=await i.getDimensions(d),w=p==="y",v=w?"top":"left",k=w?"bottom":"right",b=w?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[p]-m[p]-a.floating[y],_=m[p]-a.reference[p],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let E=T?T[b]:0;(!E||!await(i.isElement==null?void 0:i.isElement(T)))&&(E=o.floating[b]||a.floating[y]);const I=S/2-_/2,W=E/2-g[y]/2-1,L=Ot(u[v],W),z=Ot(u[k],W),B=L,G=E-g[y]-z,Q=E/2-g[y]/2+I,H=Us(B,Q,G),F=!c.arrow&&Sn(s)!=null&&Q!==H&&a.reference[y]/2-(Q<B?L:z)-g[y]/2<0,U=F?Q<B?Q-B:Q-G:0;return{[p]:m[p]+U,data:{[p]:H,centerOffset:Q-H-U,...F&&{alignmentOffset:U}},reset:F}}}),qf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:a,rects:i,initialPlacement:o,platform:c,elements:d}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...w}=mt(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=pt(s),k=ot(o),b=pt(o)===o,S=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=m||(b||!g?[Or(o)]:Pf(o)),T=y!=="none";!m&&T&&_.push(...Wf(o,g,y,S));const E=[o,..._],I=await c.detectOverflow(e,w),W=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&W.push(I[v]),u){const Q=Ff(s,i,S);W.push(I[Q[0]],I[Q[1]])}if(L=[...L,{placement:s,overflows:W}],!W.every(Q=>Q<=0)){var z,B;const Q=(((z=a.flip)==null?void 0:z.index)||0)+1,H=E[Q];if(H&&(!(u==="alignment"?k!==ot(H):!1)||L.every(V=>ot(V.placement)===k?V.overflows[0]>0:!0)))return{data:{index:Q,overflows:L},reset:{placement:H}};let F=(B=L.filter(U=>U.overflows[0]<=0).sort((U,V)=>U.overflows[1]-V.overflows[1])[0])==null?void 0:B.placement;if(!F)switch(p){case"bestFit":{var G;const U=(G=L.filter(V=>{if(T){const ie=ot(V.placement);return ie===k||ie==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ie=>ie>0).reduce((ie,P)=>ie+P,0)]).sort((V,ie)=>V[1]-ie[1])[0])==null?void 0:G[0];U&&(F=U);break}case"initialPlacement":F=o;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function ji(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Di(t){return Mf.some(e=>t[e]>=0)}const Yf=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:s="referenceHidden",...a}=mt(t,e);switch(s){case"referenceHidden":{const i=await r.detectOverflow(e,{...a,elementContext:"reference"}),o=ji(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Di(o)}}}case"escaped":{const i=await r.detectOverflow(e,{...a,altBoundary:!0}),o=ji(i,n.floating);return{data:{escapedOffsets:o,escaped:Di(o)}}}default:return{}}}}},pl=new Set(["left","top"]);async function Gf(t,e){const{placement:n,platform:r,elements:s}=t,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=pt(n),o=Sn(n),c=ot(n)==="y",d=pl.has(i)?-1:1,f=a&&c?-1:1,u=mt(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:y}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof y=="number"&&(p=o==="end"?y*-1:y),c?{x:p*f,y:m*d}:{x:m*d,y:p*f}}const Xf=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:a,placement:i,middlewareData:o}=e,c=await Gf(e,t);return i===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:i}}}}},Jf=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s,platform:a}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:c={fn:v=>{let{x:k,y:b}=v;return{x:k,y:b}}},...d}=mt(t,e),f={x:n,y:r},u=await a.detectOverflow(e,d),m=ot(pt(s)),p=_a(m);let y=f[p],g=f[m];if(i){const v=p==="y"?"top":"left",k=p==="y"?"bottom":"right",b=y+u[v],S=y-u[k];y=Us(b,y,S)}if(o){const v=m==="y"?"top":"left",k=m==="y"?"bottom":"right",b=g+u[v],S=g-u[k];g=Us(b,g,S)}const w=c.fn({...e,[p]:y,[m]:g});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[p]:i,[m]:o}}}}}},Kf=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:a,middlewareData:i}=e,{offset:o=0,mainAxis:c=!0,crossAxis:d=!0}=mt(t,e),f={x:n,y:r},u=ot(s),m=_a(u);let p=f[m],y=f[u];const g=mt(o,e),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=m==="y"?"height":"width",S=a.reference[m]-a.floating[b]+w.mainAxis,_=a.reference[m]+a.reference[b]-w.mainAxis;p<S?p=S:p>_&&(p=_)}if(d){var v,k;const b=m==="y"?"width":"height",S=pl.has(pt(s)),_=a.reference[u]-a.floating[b]+(S&&((v=i.offset)==null?void 0:v[u])||0)+(S?0:w.crossAxis),T=a.reference[u]+a.reference[b]+(S?0:((k=i.offset)==null?void 0:k[u])||0)-(S?w.crossAxis:0);y<_?y=_:y>T&&(y=T)}return{[m]:p,[u]:y}}}},Qf=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:a,platform:i,elements:o}=e,{apply:c=()=>{},...d}=mt(t,e),f=await i.detectOverflow(e,d),u=pt(s),m=Sn(s),p=ot(s)==="y",{width:y,height:g}=a.floating;let w,v;u==="top"||u==="bottom"?(w=u,v=m===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=u,w=m==="end"?"top":"bottom");const k=g-f.top-f.bottom,b=y-f.left-f.right,S=Ot(g-f[w],k),_=Ot(y-f[v],b),T=!e.middlewareData.shift;let E=S,I=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(I=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=k),T&&!m){const L=Ie(f.left,0),z=Ie(f.right,0),B=Ie(f.top,0),G=Ie(f.bottom,0);p?I=y-2*(L!==0||z!==0?L+z:Ie(f.left,f.right)):E=g-2*(B!==0||G!==0?B+G:Ie(f.top,f.bottom))}await c({...e,availableWidth:I,availableHeight:E});const W=await i.getDimensions(o.floating);return y!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Yr(){return typeof window<"u"}function Nn(t){return gl(t)?(t.nodeName||"").toLowerCase():"#document"}function Fe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function dt(t){var e;return(e=(gl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function gl(t){return Yr()?t instanceof Node||t instanceof Fe(t).Node:!1}function et(t){return Yr()?t instanceof Element||t instanceof Fe(t).Element:!1}function yt(t){return Yr()?t instanceof HTMLElement||t instanceof Fe(t).HTMLElement:!1}function Ri(t){return!Yr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fe(t).ShadowRoot}function Hn(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&s!=="inline"&&s!=="contents"}function eh(t){return/^(table|td|th)$/.test(Nn(t))}function Gr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const th=/transform|translate|scale|rotate|perspective|filter/,nh=/paint|layout|strict|content/,Pt=t=>!!t&&t!=="none";let ks;function Na(t){const e=et(t)?tt(t):t;return Pt(e.transform)||Pt(e.translate)||Pt(e.scale)||Pt(e.rotate)||Pt(e.perspective)||!Ca()&&(Pt(e.backdropFilter)||Pt(e.filter))||th.test(e.willChange||"")||nh.test(e.contain||"")}function rh(t){let e=jt(t);for(;yt(e)&&!gn(e);){if(Na(e))return e;if(Gr(e))return null;e=jt(e)}return null}function Ca(){return ks==null&&(ks=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ks}function gn(t){return/^(html|body|#document)$/.test(Nn(t))}function tt(t){return Fe(t).getComputedStyle(t)}function Xr(t){return et(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function jt(t){if(Nn(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ri(t)&&t.host||dt(t);return Ri(e)?e.host:e}function yl(t){const e=jt(t);return gn(e)?t.ownerDocument?t.ownerDocument.body:t.body:yt(e)&&Hn(e)?e:yl(e)}function Vn(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=yl(t),a=s===((r=t.ownerDocument)==null?void 0:r.body),i=Fe(s);if(a){const o=qs(i);return e.concat(i,i.visualViewport||[],Hn(s)?s:[],o&&n?Vn(o):[])}else return e.concat(s,Vn(s,[],n))}function qs(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function vl(t){const e=tt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=yt(t),a=s?t.offsetWidth:n,i=s?t.offsetHeight:r,o=Er(n)!==a||Er(r)!==i;return o&&(n=a,r=i),{width:n,height:r,$:o}}function Ta(t){return et(t)?t:t.contextElement}function dn(t){const e=Ta(t);if(!yt(e))return lt(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:a}=vl(e);let i=(a?Er(n.width):n.width)/r,o=(a?Er(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const sh=lt(0);function xl(t){const e=Fe(t);return!Ca()||!e.visualViewport?sh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ah(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Fe(t)?!1:e}function Bt(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),a=Ta(t);let i=lt(1);e&&(r?et(r)&&(i=dn(r)):i=dn(t));const o=ah(a,n,r)?xl(a):lt(0);let c=(s.left+o.x)/i.x,d=(s.top+o.y)/i.y,f=s.width/i.x,u=s.height/i.y;if(a){const m=Fe(a),p=r&&et(r)?Fe(r):r;let y=m,g=qs(y);for(;g&&r&&p!==y;){const w=dn(g),v=g.getBoundingClientRect(),k=tt(g),b=v.left+(g.clientLeft+parseFloat(k.paddingLeft))*w.x,S=v.top+(g.clientTop+parseFloat(k.paddingTop))*w.y;c*=w.x,d*=w.y,f*=w.x,u*=w.y,c+=b,d+=S,y=Fe(g),g=qs(y)}}return jr({width:f,height:u,x:c,y:d})}function Jr(t,e){const n=Xr(t).scrollLeft;return e?e.left+n:Bt(dt(t)).left+n}function wl(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Jr(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function ih(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const a=s==="fixed",i=dt(r),o=e?Gr(e.floating):!1;if(r===i||o&&a)return n;let c={scrollLeft:0,scrollTop:0},d=lt(1);const f=lt(0),u=yt(r);if((u||!u&&!a)&&((Nn(r)!=="body"||Hn(i))&&(c=Xr(r)),u)){const p=Bt(r);d=dn(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const m=i&&!u&&!a?wl(i,c):lt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+m.x,y:n.y*d.y-c.scrollTop*d.y+f.y+m.y}}function oh(t){return Array.from(t.getClientRects())}function lh(t){const e=dt(t),n=Xr(t),r=t.ownerDocument.body,s=Ie(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),a=Ie(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Jr(t);const o=-n.scrollTop;return tt(r).direction==="rtl"&&(i+=Ie(e.clientWidth,r.clientWidth)-s),{width:s,height:a,x:i,y:o}}const Ai=25;function ch(t,e){const n=Fe(t),r=dt(t),s=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,o=0,c=0;if(s){a=s.width,i=s.height;const f=Ca();(!f||f&&e==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}const d=Jr(r);if(d<=0){const f=r.ownerDocument,u=f.body,m=getComputedStyle(u),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(r.clientWidth-u.clientWidth-p);y<=Ai&&(a-=y)}else d<=Ai&&(a+=d);return{width:a,height:i,x:o,y:c}}function uh(t,e){const n=Bt(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,a=yt(t)?dn(t):lt(1),i=t.clientWidth*a.x,o=t.clientHeight*a.y,c=s*a.x,d=r*a.y;return{width:i,height:o,x:c,y:d}}function Mi(t,e,n){let r;if(e==="viewport")r=ch(t,n);else if(e==="document")r=lh(dt(t));else if(et(e))r=uh(e,n);else{const s=xl(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return jr(r)}function bl(t,e){const n=jt(t);return n===e||!et(n)||gn(n)?!1:tt(n).position==="fixed"||bl(n,e)}function dh(t,e){const n=e.get(t);if(n)return n;let r=Vn(t,[],!1).filter(o=>et(o)&&Nn(o)!=="body"),s=null;const a=tt(t).position==="fixed";let i=a?jt(t):t;for(;et(i)&&!gn(i);){const o=tt(i),c=Na(i);!c&&o.position==="fixed"&&(s=null),(a?!c&&!s:!c&&o.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Hn(i)&&!c&&bl(t,i))?r=r.filter(f=>f!==i):s=o,i=jt(i)}return e.set(t,r),r}function fh(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const i=[...n==="clippingAncestors"?Gr(e)?[]:dh(e,this._c):[].concat(n),r],o=Mi(e,i[0],s);let c=o.top,d=o.right,f=o.bottom,u=o.left;for(let m=1;m<i.length;m++){const p=Mi(e,i[m],s);c=Ie(p.top,c),d=Ot(p.right,d),f=Ot(p.bottom,f),u=Ie(p.left,u)}return{width:d-u,height:f-c,x:u,y:c}}function hh(t){const{width:e,height:n}=vl(t);return{width:e,height:n}}function mh(t,e,n){const r=yt(e),s=dt(e),a=n==="fixed",i=Bt(t,!0,a,e);let o={scrollLeft:0,scrollTop:0};const c=lt(0);function d(){c.x=Jr(s)}if(r||!r&&!a)if((Nn(e)!=="body"||Hn(s))&&(o=Xr(e)),r){const p=Bt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else s&&d();a&&!r&&s&&d();const f=s&&!r&&!a?wl(s,o):lt(0),u=i.left+o.scrollLeft-c.x-f.x,m=i.top+o.scrollTop-c.y-f.y;return{x:u,y:m,width:i.width,height:i.height}}function Ss(t){return tt(t).position==="static"}function Ii(t,e){if(!yt(t)||tt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return dt(t)===n&&(n=n.ownerDocument.body),n}function _l(t,e){const n=Fe(t);if(Gr(t))return n;if(!yt(t)){let s=jt(t);for(;s&&!gn(s);){if(et(s)&&!Ss(s))return s;s=jt(s)}return n}let r=Ii(t,e);for(;r&&eh(r)&&Ss(r);)r=Ii(r,e);return r&&gn(r)&&Ss(r)&&!Na(r)?n:r||rh(t)||n}const ph=async function(t){const e=this.getOffsetParent||_l,n=this.getDimensions,r=await n(t.floating);return{reference:mh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gh(t){return tt(t).direction==="rtl"}const yh={convertOffsetParentRelativeRectToViewportRelativeRect:ih,getDocumentElement:dt,getClippingRect:fh,getOffsetParent:_l,getElementRects:ph,getClientRects:oh,getDimensions:hh,getScale:dn,isElement:et,isRTL:gh};function kl(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function vh(t,e){let n=null,r;const s=dt(t);function a(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function i(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),a();const d=t.getBoundingClientRect(),{left:f,top:u,width:m,height:p}=d;if(o||e(),!m||!p)return;const y=ir(u),g=ir(s.clientWidth-(f+m)),w=ir(s.clientHeight-(u+p)),v=ir(f),b={rootMargin:-y+"px "+-g+"px "+-w+"px "+-v+"px",threshold:Ie(0,Ot(1,c))||1};let S=!0;function _(T){const E=T[0].intersectionRatio;if(E!==c){if(!S)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!kl(d,t.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(_,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,b)}n.observe(t)}return i(!0),a}function xh(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Ta(t),f=s||a?[...d?Vn(d):[],...e?Vn(e):[]]:[];f.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=d&&o?vh(d,n):null;let m=-1,p=null;i&&(p=new ResizeObserver(v=>{let[k]=v;k&&k.target===d&&p&&e&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),n()}),d&&!c&&p.observe(d),e&&p.observe(e));let y,g=c?Bt(t):null;c&&w();function w(){const v=Bt(t);g&&!kl(g,v)&&n(),g=v,y=requestAnimationFrame(w)}return n(),()=>{var v;f.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),u?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const wh=Xf,bh=Jf,_h=qf,kh=Qf,Sh=Yf,Fi=Hf,Nh=Kf,Ch=(t,e,n)=>{const r=new Map,s={platform:yh,...n},a={...s.platform,_c:r};return Uf(t,e,{...s,platform:a})};var Th=typeof document<"u",Eh=function(){},wr=Th?x.useLayoutEffect:Eh;function Dr(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Dr(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&t.$$typeof)&&!Dr(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Sl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Pi(t,e){const n=Sl(t);return Math.round(e*n)/n}function Ns(t){const e=h.useRef(t);return wr(()=>{e.current=t}),e}function Oh(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:i}={},transform:o=!0,whileElementsMounted:c,open:d}=t,[f,u]=h.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,p]=h.useState(r);Dr(m,r)||p(r);const[y,g]=h.useState(null),[w,v]=h.useState(null),k=h.useCallback(V=>{V!==T.current&&(T.current=V,g(V))},[]),b=h.useCallback(V=>{V!==E.current&&(E.current=V,v(V))},[]),S=a||y,_=i||w,T=h.useRef(null),E=h.useRef(null),I=h.useRef(f),W=c!=null,L=Ns(c),z=Ns(s),B=Ns(d),G=h.useCallback(()=>{if(!T.current||!E.current)return;const V={placement:e,strategy:n,middleware:m};z.current&&(V.platform=z.current),Ch(T.current,E.current,V).then(ie=>{const P={...ie,isPositioned:B.current!==!1};Q.current&&!Dr(I.current,P)&&(I.current=P,qo.flushSync(()=>{u(P)}))})},[m,e,n,z,B]);wr(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,u(V=>({...V,isPositioned:!1})))},[d]);const Q=h.useRef(!1);wr(()=>(Q.current=!0,()=>{Q.current=!1}),[]),wr(()=>{if(S&&(T.current=S),_&&(E.current=_),S&&_){if(L.current)return L.current(S,_,G);G()}},[S,_,G,L,W]);const H=h.useMemo(()=>({reference:T,floating:E,setReference:k,setFloating:b}),[k,b]),F=h.useMemo(()=>({reference:S,floating:_}),[S,_]),U=h.useMemo(()=>{const V={position:n,left:0,top:0};if(!F.floating)return V;const ie=Pi(F.floating,f.x),P=Pi(F.floating,f.y);return o?{...V,transform:"translate("+ie+"px, "+P+"px)",...Sl(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:P}},[n,o,F.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:G,refs:H,elements:F,floatingStyles:U}),[f,G,H,F,U])}const jh=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Fi({element:r.current,padding:s}).fn(n):{}:r?Fi({element:r,padding:s}).fn(n):{}}}},Dh=(t,e)=>{const n=wh(t);return{name:n.name,fn:n.fn,options:[t,e]}},Rh=(t,e)=>{const n=bh(t);return{name:n.name,fn:n.fn,options:[t,e]}},Ah=(t,e)=>({fn:Nh(t).fn,options:[t,e]}),Mh=(t,e)=>{const n=_h(t);return{name:n.name,fn:n.fn,options:[t,e]}},Ih=(t,e)=>{const n=kh(t);return{name:n.name,fn:n.fn,options:[t,e]}},Fh=(t,e)=>{const n=Sh(t);return{name:n.name,fn:n.fn,options:[t,e]}},Ph=(t,e)=>{const n=jh(t);return{name:n.name,fn:n.fn,options:[t,e]}};var Lh="Arrow",Nl=h.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...a}=t;return l.jsx(Ce.svg,{...a,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nl.displayName=Lh;var Vh=Nl;function Cl(t){const[e,n]=h.useState(void 0);return Et(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let i,o;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,o=d.blockSize}else i=t.offsetWidth,o=t.offsetHeight;n({width:i,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var Ea="Popper",[Tl,El]=qr(Ea),[$h,Ol]=Tl(Ea),jl=t=>{const{__scopePopper:e,children:n}=t,[r,s]=h.useState(null);return l.jsx($h,{scope:e,anchor:r,onAnchorChange:s,children:n})};jl.displayName=Ea;var Dl="PopperAnchor",Rl=h.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,a=Ol(Dl,n),i=h.useRef(null),o=$e(e,i),c=h.useRef(null);return h.useEffect(()=>{const d=c.current;c.current=r?.current||i.current,d!==c.current&&a.onAnchorChange(c.current)}),r?null:l.jsx(Ce.div,{...s,ref:o})});Rl.displayName=Dl;var Oa="PopperContent",[Wh,zh]=Tl(Oa),Al=h.forwardRef((t,e)=>{const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:y,...g}=t,w=Ol(Oa,n),[v,k]=h.useState(null),b=$e(e,Te=>k(Te)),[S,_]=h.useState(null),T=Cl(S),E=T?.width??0,I=T?.height??0,W=r+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(d)?d:[d],B=z.length>0,G={padding:L,boundary:z.filter(Bh),altBoundary:B},{refs:Q,floatingStyles:H,placement:F,isPositioned:U,middlewareData:V}=Oh({strategy:"fixed",placement:W,whileElementsMounted:(...Te)=>xh(...Te,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[Dh({mainAxis:s+I,alignmentAxis:i}),c&&Rh({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Ah():void 0,...G}),c&&Mh({...G}),Ih({...G,apply:({elements:Te,rects:oe,availableWidth:vt,availableHeight:Gt})=>{const{width:Xt,height:xt}=oe.reference,Jt=Te.floating.style;Jt.setProperty("--radix-popper-available-width",`${vt}px`),Jt.setProperty("--radix-popper-available-height",`${Gt}px`),Jt.setProperty("--radix-popper-anchor-width",`${Xt}px`),Jt.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),S&&Ph({element:S,padding:o}),Uh({arrowWidth:E,arrowHeight:I}),m&&Fh({strategy:"referenceHidden",...G})]}),[ie,P]=Fl(F),D=pn(y);Et(()=>{U&&D?.()},[U,D]);const ee=V.arrow?.x,$=V.arrow?.y,le=V.arrow?.centerOffset!==0,[ce,ve]=h.useState();return Et(()=>{v&&ve(window.getComputedStyle(v).zIndex)},[v]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:U?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(Wh,{scope:n,placedSide:ie,onArrowChange:_,arrowX:ee,arrowY:$,shouldHideArrow:le,children:l.jsx(Ce.div,{"data-side":ie,"data-align":P,...g,ref:b,style:{...g.style,animation:U?void 0:"none"}})})})});Al.displayName=Oa;var Ml="PopperArrow",Zh={top:"bottom",right:"left",bottom:"top",left:"right"},Il=h.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,a=zh(Ml,r),i=Zh[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Vh,{...s,ref:n,style:{...s.style,display:"block"}})})});Il.displayName=Ml;function Bh(t){return t!==null}var Uh=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:s}=e,i=s.arrow?.centerOffset!==0,o=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[d,f]=Fl(n),u={start:"0%",center:"50%",end:"100%"}[f],m=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+c/2;let y="",g="";return d==="bottom"?(y=i?u:`${m}px`,g=`${-c}px`):d==="top"?(y=i?u:`${m}px`,g=`${r.floating.height+c}px`):d==="right"?(y=`${-c}px`,g=i?u:`${p}px`):d==="left"&&(y=`${r.floating.width+c}px`,g=i?u:`${p}px`),{data:{x:y,y:g}}}});function Fl(t){const[e,n="center"]=t.split("-");return[e,n]}var Hh=jl,Pl=Rl,qh=Al,Yh=Il,Gh="Portal",ja=h.forwardRef((t,e)=>{const{container:n,...r}=t,[s,a]=h.useState(!1);Et(()=>a(!0),[]);const i=n||s&&globalThis?.document?.body;return i?pa.createPortal(l.jsx(Ce.div,{...r,ref:e}),i):null});ja.displayName=Gh;function Xh(t,e){return h.useReducer((n,r)=>e[n][r]??n,t)}var Cn=t=>{const{present:e,children:n}=t,r=Jh(e),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),a=$e(r.ref,Kh(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:a}):null};Cn.displayName="Presence";function Jh(t){const[e,n]=h.useState(),r=h.useRef(null),s=h.useRef(t),a=h.useRef("none"),i=t?"mounted":"unmounted",[o,c]=Xh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=or(r.current);a.current=o==="mounted"?d:"none"},[o]),Et(()=>{const d=r.current,f=s.current;if(f!==t){const m=a.current,p=or(d);t?c("MOUNT"):p==="none"||d?.display==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Et(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,u=p=>{const g=or(r.current).includes(CSS.escape(p.animationName));if(p.target===e&&g&&(c("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",d=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},m=p=>{p.target===e&&(a.current=or(r.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{f.clearTimeout(d),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:h.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function or(t){return t?.animationName||"none"}function Kh(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Qh=h[" useInsertionEffect ".trim().toString()]||Et;function Da({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,a,i]=em({defaultProp:e,onChange:n}),o=t!==void 0,c=o?t:s;{const f=h.useRef(t!==void 0);h.useEffect(()=>{const u=f.current;u!==o&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=o},[o,r])}const d=h.useCallback(f=>{if(o){const u=tm(f)?f(t):f;u!==t&&i.current?.(u)}else a(f)},[o,t,a,i]);return[c,d]}function em({defaultProp:t,onChange:e}){const[n,r]=h.useState(t),s=h.useRef(n),a=h.useRef(e);return Qh(()=>{a.current=e},[e]),h.useEffect(()=>{s.current!==n&&(a.current?.(n),s.current=n)},[n,s]),[n,r,a]}function tm(t){return typeof t=="function"}var nm=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},tn=new WeakMap,lr=new WeakMap,cr={},Cs=0,Ll=function(t){return t&&(t.host||Ll(t.parentNode))},rm=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Ll(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},sm=function(t,e,n,r){var s=rm(e,Array.isArray(t)?t:[t]);cr[n]||(cr[n]=new WeakMap);var a=cr[n],i=[],o=new Set,c=new Set(s),d=function(u){!u||o.has(u)||(o.add(u),d(u.parentNode))};s.forEach(d);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(m){if(o.has(m))f(m);else try{var p=m.getAttribute(r),y=p!==null&&p!=="false",g=(tn.get(m)||0)+1,w=(a.get(m)||0)+1;tn.set(m,g),a.set(m,w),i.push(m),g===1&&y&&lr.set(m,!0),w===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return f(e),o.clear(),Cs++,function(){i.forEach(function(u){var m=tn.get(u)-1,p=a.get(u)-1;tn.set(u,m),a.set(u,p),m||(lr.has(u)||u.removeAttribute(r),lr.delete(u)),p||u.removeAttribute(n)}),Cs--,Cs||(tn=new WeakMap,tn=new WeakMap,lr=new WeakMap,cr={})}},Vl=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=nm(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),sm(r,s,n,"aria-hidden")):function(){return null}},it=function(){return it=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},it.apply(this,arguments)};function $l(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function am(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,a;r<s;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var br="right-scroll-bar-position",_r="width-before-scroll-bar",im="with-scroll-bars-hidden",om="--removed-body-scroll-bar-size";function Ts(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function lm(t,e){var n=x.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var cm=typeof window<"u"?h.useLayoutEffect:h.useEffect,Li=new WeakMap;function um(t,e){var n=lm(null,function(r){return t.forEach(function(s){return Ts(s,r)})});return cm(function(){var r=Li.get(n);if(r){var s=new Set(r),a=new Set(t),i=n.current;s.forEach(function(o){a.has(o)||Ts(o,null)}),a.forEach(function(o){s.has(o)||Ts(o,i)})}Li.set(n,t)},[t]),n}function dm(t){return t}function fm(t,e){e===void 0&&(e=dm);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(a){var i=e(a,r);return n.push(i),function(){n=n.filter(function(o){return o!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(o){return a(o)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var o=n;n=[],o.forEach(a),i=n}var c=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return s}function hm(t){t===void 0&&(t={});var e=fm(null);return e.options=it({async:!0,ssr:!1},t),e}var Wl=function(t){var e=t.sideCar,n=$l(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,it({},n))};Wl.isSideCarExport=!0;function mm(t,e){return t.useMedium(e),Wl}var zl=hm(),Es=function(){},Kr=h.forwardRef(function(t,e){var n=h.useRef(null),r=h.useState({onScrollCapture:Es,onWheelCapture:Es,onTouchMoveCapture:Es}),s=r[0],a=r[1],i=t.forwardProps,o=t.children,c=t.className,d=t.removeScrollBar,f=t.enabled,u=t.shards,m=t.sideCar,p=t.noRelative,y=t.noIsolation,g=t.inert,w=t.allowPinchZoom,v=t.as,k=v===void 0?"div":v,b=t.gapMode,S=$l(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,T=um([n,e]),E=it(it({},S),s);return h.createElement(h.Fragment,null,f&&h.createElement(_,{sideCar:zl,removeScrollBar:d,shards:u,noRelative:p,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!w,lockRef:n,gapMode:b}),i?h.cloneElement(h.Children.only(o),it(it({},E),{ref:T})):h.createElement(k,it({},E,{className:c,ref:T}),o))});Kr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kr.classNames={fullWidth:_r,zeroRight:br};var pm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gm(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=pm();return e&&t.setAttribute("nonce",e),t}function ym(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function vm(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var xm=function(){var t=0,e=null;return{add:function(n){t==0&&(e=gm())&&(ym(e,n),vm(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},wm=function(){var t=xm();return function(e,n){h.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Zl=function(){var t=wm(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},bm={left:0,top:0,right:0,gap:0},Os=function(t){return parseInt(t||"",10)||0},_m=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Os(n),Os(r),Os(s)]},km=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return bm;var e=_m(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Sm=Zl(),fn="data-scroll-locked",Nm=function(t,e,n,r){var s=t.left,a=t.top,i=t.right,o=t.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(im,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(o,"px ").concat(r,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(fn,`] {
|
|
7
7
|
overflow: hidden `).concat(r,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
margin-right: 0 `).concat(r,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(fn,`] {
|
|
36
|
+
`).concat(om,": ").concat(o,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},Vi=function(){var t=parseInt(document.body.getAttribute(fn)||"0",10);return isFinite(t)?t:0},Cm=function(){h.useEffect(function(){return document.body.setAttribute(fn,(Vi()+1).toString()),function(){var t=Vi()-1;t<=0?document.body.removeAttribute(fn):document.body.setAttribute(fn,t.toString())}},[])},Tm=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;Cm();var a=h.useMemo(function(){return km(s)},[s]);return h.createElement(Sm,{styles:Nm(a,!e,s,n?"":"!important")})},Ys=!1;if(typeof window<"u")try{var ur=Object.defineProperty({},"passive",{get:function(){return Ys=!0,!0}});window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Ys=!1}var nn=Ys?{passive:!1}:!1,Em=function(t){return t.tagName==="TEXTAREA"},Bl=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Em(t)&&n[e]==="visible")},Om=function(t){return Bl(t,"overflowY")},jm=function(t){return Bl(t,"overflowX")},$i=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Ul(t,r);if(s){var a=Hl(t,r),i=a[1],o=a[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dm=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Rm=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Ul=function(t,e){return t==="v"?Om(e):jm(e)},Hl=function(t,e){return t==="v"?Dm(e):Rm(e)},Am=function(t,e){return t==="h"&&e==="rtl"?-1:1},Mm=function(t,e,n,r,s){var a=Am(t,window.getComputedStyle(e).direction),i=a*r,o=n.target,c=e.contains(o),d=!1,f=i>0,u=0,m=0;do{if(!o)break;var p=Hl(t,o),y=p[0],g=p[1],w=p[2],v=g-w-a*y;(y||v)&&Ul(t,o)&&(u+=v,m+=y);var k=o.parentNode;o=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(f&&Math.abs(u)<1||!f&&Math.abs(m)<1)&&(d=!0),d},dr=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Wi=function(t){return[t.deltaX,t.deltaY]},zi=function(t){return t&&"current"in t?t.current:t},Im=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Fm=function(t){return`
|
|
39
39
|
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
41
|
-
`)},Wm=0,nn=[];function zm(t){var e=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(Wm++)[0],a=h.useState(zl)[0],i=h.useRef(t);h.useEffect(function(){i.current=t},[t]),h.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var g=cm([t.lockRef.current],(t.shards||[]).map(Wi),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=h.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var v=dr(g),k=n.current,S="deltaX"in g?g.deltaX:k[0]-v[0],_="deltaY"in g?g.deltaY:k[1]-v[1],b,E=g.target,T=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in g&&T==="h"&&E.type==="range")return!1;var A=window.getSelection(),V=A&&A.anchorNode,L=V?V===E||V.contains(E):!1;if(L)return!1;var z=Vi(T,E);if(!z)return!0;if(z?b=T:(b=T==="v"?"h":"v",z=Vi(T,E)),!z)return!1;if(!r.current&&"changedTouches"in g&&(S||_)&&(r.current=b),!b)return!0;var B=r.current||b;return Lm(B,w,g,B==="h"?S:_)},[]),c=h.useCallback(function(g){var w=g;if(!(!nn.length||nn[nn.length-1]!==a)){var v="deltaY"in w?$i(w):dr(w),k=e.current.filter(function(b){return b.name===w.type&&(b.target===w.target||w.target===b.shadowParent)&&Vm(b.delta,v)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}if(!k){var S=(i.current.shards||[]).map(Wi).filter(Boolean).filter(function(b){return b.contains(w.target)}),_=S.length>0?o(w,S[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),d=h.useCallback(function(g,w,v,k){var S={name:g,delta:w,target:v,should:k,shadowParent:Zm(v)};e.current.push(S),setTimeout(function(){e.current=e.current.filter(function(_){return _!==S})},1)},[]),f=h.useCallback(function(g){n.current=dr(g),r.current=void 0},[]),u=h.useCallback(function(g){d(g.type,$i(g),g.target,o(g,t.lockRef.current))},[]),m=h.useCallback(function(g){d(g.type,dr(g),g.target,o(g,t.lockRef.current))},[]);h.useEffect(function(){return nn.push(a),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",c,tn),document.addEventListener("touchmove",c,tn),document.addEventListener("touchstart",f,tn),function(){nn=nn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,tn),document.removeEventListener("touchmove",c,tn),document.removeEventListener("touchstart",f,tn)}},[]);var p=t.removeScrollBar,y=t.inert;return h.createElement(h.Fragment,null,y?h.createElement(a,{styles:$m(s)}):null,p?h.createElement(Dm,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Zm(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const Bm=vm(Wl,zm);var Da=h.forwardRef(function(t,e){return h.createElement(Kr,it({},t,{ref:e,sideCar:Bm}))});Da.classNames=Kr.classNames;var Qr="Popover",[Hl]=qr(Qr,[Tl]),qn=Tl(),[Um,At]=Hl(Qr),ql=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:i=!1}=t,o=qn(e),c=h.useRef(null),[d,f]=h.useState(!1),[u,m]=ja({prop:r,defaultProp:s??!1,onChange:a,caller:Qr});return l.jsx(Xh,{...o,children:l.jsx(Um,{scope:e,contentId:xr(),triggerRef:c,open:u,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:d,onCustomAnchorAdd:h.useCallback(()=>f(!0),[]),onCustomAnchorRemove:h.useCallback(()=>f(!1),[]),modal:i,children:n})})};ql.displayName=Qr;var Yl="PopoverAnchor",Hm=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=At(Yl,n),a=qn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:o}=s;return h.useEffect(()=>(i(),()=>o()),[i,o]),l.jsx(Pl,{...a,...r,ref:e})});Hm.displayName=Yl;var Gl="PopoverTrigger",Xl=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=At(Gl,n),a=qn(n),i=$e(e,s.triggerRef),o=l.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":tc(s.open),...r,ref:i,onClick:Re(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?o:l.jsx(Pl,{asChild:!0,...a,children:o})});Xl.displayName=Gl;var Ra="PopoverPortal",[qm,Ym]=Hl(Ra,{forceMount:void 0}),Jl=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,a=At(Ra,e);return l.jsx(qm,{scope:e,forceMount:n,children:l.jsx(Nn,{present:n||a.open,children:l.jsx(Oa,{asChild:!0,container:s,children:r})})})};Jl.displayName=Ra;var gn="PopoverContent",Kl=h.forwardRef((t,e)=>{const n=Ym(gn,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,a=At(gn,t.__scopePopover);return l.jsx(Nn,{present:r||a.open,children:a.modal?l.jsx(Xm,{...s,ref:e}):l.jsx(Jm,{...s,ref:e})})});Kl.displayName=gn;var Gm=Hr("PopoverContent.RemoveScroll"),Xm=h.forwardRef((t,e)=>{const n=At(gn,t.__scopePopover),r=h.useRef(null),s=$e(e,r),a=h.useRef(!1);return h.useEffect(()=>{const i=r.current;if(i)return Ll(i)},[]),l.jsx(Da,{as:Gm,allowPinchZoom:!0,children:l.jsx(Ql,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(t.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Re(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0,d=o.button===2||c;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Re(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Jm=h.forwardRef((t,e)=>{const n=At(gn,t.__scopePopover),r=h.useRef(!1),s=h.useRef(!1);return l.jsx(Ql,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),Ql=h.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...u}=t,m=At(gn,n),p=qn(n);return dl(),l.jsx(wa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:l.jsx(xa,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),children:l.jsx(Jh,{"data-state":tc(m.open),role:"dialog",id:m.contentId,...p,...u,ref:e,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ec="PopoverClose",Km=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=At(ec,n);return l.jsx(Ce.button,{type:"button",...r,ref:e,onClick:Re(t.onClick,()=>s.onOpenChange(!1))})});Km.displayName=ec;var Qm="PopoverArrow",ep=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=qn(n);return l.jsx(Kh,{...s,...r,ref:e})});ep.displayName=Qm;function tc(t){return t?"open":"closed"}var tp=ql,np=Xl,rp=Jl,sp=Kl;class qt extends Error{}class ap extends qt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class ip extends qt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class op extends qt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class cn extends qt{}class nc extends qt{constructor(e){super(`Invalid unit ${e}`)}}class Se extends qt{}class bt extends qt{constructor(){super("Zone is an abstract class")}}const O="numeric",nt="short",Fe="long",Rr={year:O,month:O,day:O},rc={year:O,month:nt,day:O},lp={year:O,month:nt,day:O,weekday:nt},sc={year:O,month:Fe,day:O},ac={year:O,month:Fe,day:O,weekday:Fe},ic={hour:O,minute:O},oc={hour:O,minute:O,second:O},lc={hour:O,minute:O,second:O,timeZoneName:nt},cc={hour:O,minute:O,second:O,timeZoneName:Fe},uc={hour:O,minute:O,hourCycle:"h23"},dc={hour:O,minute:O,second:O,hourCycle:"h23"},fc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:nt},hc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:Fe},mc={year:O,month:O,day:O,hour:O,minute:O},pc={year:O,month:O,day:O,hour:O,minute:O,second:O},gc={year:O,month:nt,day:O,hour:O,minute:O},yc={year:O,month:nt,day:O,hour:O,minute:O,second:O},cp={year:O,month:nt,day:O,weekday:nt,hour:O,minute:O},vc={year:O,month:Fe,day:O,hour:O,minute:O,timeZoneName:nt},xc={year:O,month:Fe,day:O,hour:O,minute:O,second:O,timeZoneName:nt},wc={year:O,month:Fe,day:O,weekday:Fe,hour:O,minute:O,timeZoneName:Fe},bc={year:O,month:Fe,day:O,weekday:Fe,hour:O,minute:O,second:O,timeZoneName:Fe};class Yn{get type(){throw new bt}get name(){throw new bt}get ianaName(){return this.name}get isUniversal(){throw new bt}offsetName(e,n){throw new bt}formatOffset(e,n){throw new bt}offset(e){throw new bt}equals(e){throw new bt}get isValid(){throw new bt}}let Os=null;class es extends Yn{static get instance(){return Os===null&&(Os=new es),Os}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Rc(e,n,r)}formatOffset(e,n){return Fn(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Ys=new Map;function up(t){let e=Ys.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ys.set(t,e)),e}const dp={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function fp(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,i,o,c,d,f]=r;return[i,s,a,o,c,d,f]}function hp(t,e){const n=t.formatToParts(e),r=[];for(let s=0;s<n.length;s++){const{type:a,value:i}=n[s],o=dp[a];a==="era"?r[o]=i:Z(o)||(r[o]=parseInt(i,10))}return r}const js=new Map;class dt extends Yn{static create(e){let n=js.get(e);return n===void 0&&js.set(e,n=new dt(e)),n}static resetCache(){js.clear(),Ys.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=dt.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Rc(e,n,r,this.name)}formatOffset(e,n){return Fn(this.offset(e),n)}offset(e){if(!this.valid)return NaN;const n=new Date(e);if(isNaN(n))return NaN;const r=up(this.name);let[s,a,i,o,c,d,f]=r.formatToParts?hp(r,n):fp(r,n);o==="BC"&&(s=-Math.abs(s)+1);const m=ns({year:s,month:a,day:i,hour:c===24?0:c,minute:d,second:f,millisecond:0});let p=+n;const y=p%1e3;return p-=y>=0?y:1e3+y,(m-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let zi={};function mp(t,e={}){const n=JSON.stringify([t,e]);let r=zi[n];return r||(r=new Intl.ListFormat(t,e),zi[n]=r),r}const Gs=new Map;function Xs(t,e={}){const n=JSON.stringify([t,e]);let r=Gs.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(t,e),Gs.set(n,r)),r}const Js=new Map;function pp(t,e={}){const n=JSON.stringify([t,e]);let r=Js.get(n);return r===void 0&&(r=new Intl.NumberFormat(t,e),Js.set(n,r)),r}const Ks=new Map;function gp(t,e={}){const{base:n,...r}=e,s=JSON.stringify([t,r]);let a=Ks.get(s);return a===void 0&&(a=new Intl.RelativeTimeFormat(t,e),Ks.set(s,a)),a}let Rn=null;function yp(){return Rn||(Rn=new Intl.DateTimeFormat().resolvedOptions().locale,Rn)}const Qs=new Map;function _c(t){let e=Qs.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Qs.set(t,e)),e}const ea=new Map;function vp(t){let e=ea.get(t);if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...kc,...e}),ea.set(t,e)}return e}function xp(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,s;try{r=Xs(t).resolvedOptions(),s=t}catch{const c=t.substring(0,n);r=Xs(c).resolvedOptions(),s=c}const{numberingSystem:a,calendar:i}=r;return[s,a,i]}}function wp(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function bp(t){const e=[];for(let n=1;n<=12;n++){const r=I.utc(2009,n,1);e.push(t(r))}return e}function _p(t){const e=[];for(let n=1;n<=7;n++){const r=I.utc(2016,11,13+n);e.push(t(r))}return e}function fr(t,e,n,r){const s=t.listingMode();return s==="error"?null:s==="en"?n(e):r(e)}function kp(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||_c(t.locale).numberingSystem==="latn"}class Sp{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:a,...i}=r;if(!n||Object.keys(i).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=pp(e,o)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):Fa(e,3);return ge(n,this.padTo)}}}class Np{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const i=-1*(e.offset/60),o=i>=0?`Etc/GMT+${i}`:`Etc/GMT${i}`;e.offset!==0&&dt.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Xs(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Cp{constructor(e,n,r){this.opts={style:"long",...r},!n&&jc()&&(this.rtf=gp(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):Yp(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const kc={firstDay:1,minimalDays:4,weekend:[6,7]};class ae{static fromOpts(e){return ae.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,s,a=!1){const i=e||de.defaultLocale,o=i||(a?"en-US":yp()),c=n||de.defaultNumberingSystem,d=r||de.defaultOutputCalendar,f=na(s)||de.defaultWeekSettings;return new ae(o,c,d,f,i)}static resetCache(){Rn=null,Gs.clear(),Js.clear(),Ks.clear(),Qs.clear(),ea.clear()}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:s}={}){return ae.create(e,n,r,s)}constructor(e,n,r,s,a){const[i,o,c]=xp(e);this.locale=i,this.numberingSystem=n||o||null,this.outputCalendar=r||c||null,this.weekSettings=s,this.intl=wp(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=kp(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ae.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,na(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return fr(this,e,Ic,()=>{const r=this.intl==="ja"||this.intl.startsWith("ja-");n&=!r;const s=n?{month:e,day:"numeric"}:{month:e},a=n?"format":"standalone";if(!this.monthsCache[a][e]){const i=r?o=>this.dtFormatter(o,s).format():o=>this.extract(o,s,"month");this.monthsCache[a][e]=bp(i)}return this.monthsCache[a][e]})}weekdays(e,n=!1){return fr(this,e,Lc,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=n?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=_p(a=>this.extract(a,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return fr(this,void 0,()=>Vc,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[I.utc(2016,11,13,9),I.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return fr(this,e,$c,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[I.utc(-40,1,1),I.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const s=this.dtFormatter(e,n),a=s.formatToParts(),i=a.find(o=>o.type.toLowerCase()===r);return i?i.value:null}numberFormatter(e={}){return new Sp(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Np(e,this.intl,n)}relFormatter(e={}){return new Cp(this.intl,this.isEnglish(),e)}listFormatter(e={}){return mp(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||_c(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Dc()?vp(this.locale):kc}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Ds=null;class Ee extends Yn{static get utcInstance(){return Ds===null&&(Ds=new Ee(0)),Ds}static instance(e){return e===0?Ee.utcInstance:new Ee(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ee(rs(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Fn(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Fn(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Fn(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Tp extends Yn{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Nt(t,e){if(Z(t)||t===null)return e;if(t instanceof Yn)return t;if(Ap(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?es.instance:n==="utc"||n==="gmt"?Ee.utcInstance:Ee.parseSpecifier(n)||dt.create(t)}else return Ct(t)?Ee.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Tp(t)}const Aa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Zi={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ep=Aa.hanidec.replace(/[\[|\]]/g,"").split("");function Op(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(Aa.hanidec)!==-1)e+=Ep.indexOf(t[n]);else for(const s in Zi){const[a,i]=Zi[s];r>=a&&r<=i&&(e+=r-a)}}return parseInt(e,10)}else return e}const ta=new Map;function jp(){ta.clear()}function Ye({numberingSystem:t},e=""){const n=t||"latn";let r=ta.get(n);r===void 0&&(r=new Map,ta.set(n,r));let s=r.get(e);return s===void 0&&(s=new RegExp(`${Aa[n]}${e}`),r.set(e,s)),s}let Bi=()=>Date.now(),Ui="system",Hi=null,qi=null,Yi=null,Gi=60,Xi,Ji=null;class de{static get now(){return Bi}static set now(e){Bi=e}static set defaultZone(e){Ui=e}static get defaultZone(){return Nt(Ui,es.instance)}static get defaultLocale(){return Hi}static set defaultLocale(e){Hi=e}static get defaultNumberingSystem(){return qi}static set defaultNumberingSystem(e){qi=e}static get defaultOutputCalendar(){return Yi}static set defaultOutputCalendar(e){Yi=e}static get defaultWeekSettings(){return Ji}static set defaultWeekSettings(e){Ji=na(e)}static get twoDigitCutoffYear(){return Gi}static set twoDigitCutoffYear(e){Gi=e%100}static get throwOnInvalid(){return Xi}static set throwOnInvalid(e){Xi=e}static resetCaches(){ae.resetCache(),dt.resetCache(),I.resetCache(),jp()}}class Qe{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Sc=[0,31,59,90,120,151,181,212,243,273,304,334],Nc=[0,31,60,91,121,152,182,213,244,274,305,335];function Ze(t,e){return new Qe("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ma(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function Cc(t,e,n){return n+(Gn(t)?Nc:Sc)[e-1]}function Tc(t,e){const n=Gn(t)?Nc:Sc,r=n.findIndex(a=>a<e),s=e-n[r];return{month:r+1,day:s}}function Ia(t,e){return(t-e+7)%7+1}function Ar(t,e=4,n=1){const{year:r,month:s,day:a}=t,i=Cc(r,s,a),o=Ia(Ma(r,s,a),n);let c=Math.floor((i-o+14-e)/7),d;return c<1?(d=r-1,c=$n(d,e,n)):c>$n(r,e,n)?(d=r+1,c=1):d=r,{weekYear:d,weekNumber:c,weekday:o,...ss(t)}}function Ki(t,e=4,n=1){const{weekYear:r,weekNumber:s,weekday:a}=t,i=Ia(Ma(r,1,e),n),o=fn(r);let c=s*7+a-i-7+e,d;c<1?(d=r-1,c+=fn(d)):c>o?(d=r+1,c-=fn(r)):d=r;const{month:f,day:u}=Tc(d,c);return{year:d,month:f,day:u,...ss(t)}}function Rs(t){const{year:e,month:n,day:r}=t,s=Cc(e,n,r);return{year:e,ordinal:s,...ss(t)}}function Qi(t){const{year:e,ordinal:n}=t,{month:r,day:s}=Tc(e,n);return{year:e,month:r,day:s,...ss(t)}}function eo(t,e){if(!Z(t.localWeekday)||!Z(t.localWeekNumber)||!Z(t.localWeekYear)){if(!Z(t.weekday)||!Z(t.weekNumber)||!Z(t.weekYear))throw new cn("Cannot mix locale-based week fields with ISO-based week fields");return Z(t.localWeekday)||(t.weekday=t.localWeekday),Z(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Z(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Dp(t,e=4,n=1){const r=ts(t.weekYear),s=Be(t.weekNumber,1,$n(t.weekYear,e,n)),a=Be(t.weekday,1,7);return r?s?a?!1:Ze("weekday",t.weekday):Ze("week",t.weekNumber):Ze("weekYear",t.weekYear)}function Rp(t){const e=ts(t.year),n=Be(t.ordinal,1,fn(t.year));return e?n?!1:Ze("ordinal",t.ordinal):Ze("year",t.year)}function Ec(t){const e=ts(t.year),n=Be(t.month,1,12),r=Be(t.day,1,Mr(t.year,t.month));return e?n?r?!1:Ze("day",t.day):Ze("month",t.month):Ze("year",t.year)}function Oc(t){const{hour:e,minute:n,second:r,millisecond:s}=t,a=Be(e,0,23)||e===24&&n===0&&r===0&&s===0,i=Be(n,0,59),o=Be(r,0,59),c=Be(s,0,999);return a?i?o?c?!1:Ze("millisecond",s):Ze("second",r):Ze("minute",n):Ze("hour",e)}function Z(t){return typeof t>"u"}function Ct(t){return typeof t=="number"}function ts(t){return typeof t=="number"&&t%1===0}function Ap(t){return typeof t=="string"}function Mp(t){return Object.prototype.toString.call(t)==="[object Date]"}function jc(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Dc(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Ip(t){return Array.isArray(t)?t:[t]}function to(t,e,n){if(t.length!==0)return t.reduce((r,s)=>{const a=[e(s),s];return r&&n(r[0],a[0])===r[0]?r:a},null)[1]}function Pp(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function yn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function na(t){if(t==null)return null;if(typeof t!="object")throw new Se("Week settings must be an object");if(!Be(t.firstDay,1,7)||!Be(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Be(e,1,7)))throw new Se("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Be(t,e,n){return ts(t)&&t>=e&&t<=n}function Fp(t,e){return t-e*Math.floor(t/e)}function ge(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function kt(t){if(!(Z(t)||t===null||t===""))return parseInt(t,10)}function Ft(t){if(!(Z(t)||t===null||t===""))return parseFloat(t)}function Pa(t){if(!(Z(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Fa(t,e,n="round"){const r=10**e;switch(n){case"expand":return t>0?Math.ceil(t*r)/r:Math.floor(t*r)/r;case"trunc":return Math.trunc(t*r)/r;case"round":return Math.round(t*r)/r;case"floor":return Math.floor(t*r)/r;case"ceil":return Math.ceil(t*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Gn(t){return t%4===0&&(t%100!==0||t%400===0)}function fn(t){return Gn(t)?366:365}function Mr(t,e){const n=Fp(e-1,12)+1,r=t+(e-n)/12;return n===2?Gn(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ns(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function no(t,e,n){return-Ia(Ma(t,1,e),n)+e-1}function $n(t,e=4,n=1){const r=no(t,e,n),s=no(t+1,e,n);return(fn(t)-r+s)/7}function ra(t){return t>99?t:t>de.twoDigitCutoffYear?1900+t:2e3+t}function Rc(t,e,n,r=null){const s=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const i={timeZoneName:e,...a},o=new Intl.DateTimeFormat(n,i).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return o?o.value:null}function rs(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,s=n<0||Object.is(n,-0)?-r:r;return n*60+s}function Ac(t){const e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new Se(`Invalid unit value ${t}`);return e}function Ir(t,e){const n={};for(const r in t)if(yn(t,r)){const s=t[r];if(s==null)continue;n[e(r)]=Ac(s)}return n}function Fn(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${ge(n,2)}:${ge(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${ge(n,2)}${ge(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ss(t){return Pp(t,["hour","minute","second","millisecond"])}const Lp=["January","February","March","April","May","June","July","August","September","October","November","December"],Mc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Vp=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ic(t){switch(t){case"narrow":return[...Vp];case"short":return[...Mc];case"long":return[...Lp];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Pc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Fc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$p=["M","T","W","T","F","S","S"];function Lc(t){switch(t){case"narrow":return[...$p];case"short":return[...Fc];case"long":return[...Pc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Vc=["AM","PM"],Wp=["Before Christ","Anno Domini"],zp=["BC","AD"],Zp=["B","A"];function $c(t){switch(t){case"narrow":return[...Zp];case"short":return[...zp];case"long":return[...Wp];default:return null}}function Bp(t){return Vc[t.hour<12?0:1]}function Up(t,e){return Lc(e)[t.weekday-1]}function Hp(t,e){return Ic(e)[t.month-1]}function qp(t,e){return $c(e)[t.year<0?0:1]}function Yp(t,e,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const u=t==="days";switch(e){case 1:return u?"tomorrow":`next ${s[t][0]}`;case-1:return u?"yesterday":`last ${s[t][0]}`;case 0:return u?"today":`this ${s[t][0]}`}}const i=Object.is(e,-0)||e<0,o=Math.abs(e),c=o===1,d=s[t],f=r?c?d[1]:d[2]||d[1]:c?s[t][0]:t;return i?`${o} ${f} ago`:`in ${o} ${f}`}function ro(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const Gp={D:Rr,DD:rc,DDD:sc,DDDD:ac,t:ic,tt:oc,ttt:lc,tttt:cc,T:uc,TT:dc,TTT:fc,TTTT:hc,f:mc,ff:gc,fff:vc,ffff:wc,F:pc,FF:yc,FFF:xc,FFFF:bc};class Ne{static create(e,n={}){return new Ne(e,n)}static parseFormat(e){let n=null,r="",s=!1;const a=[];for(let i=0;i<e.length;i++){const o=e.charAt(i);o==="'"?((r.length>0||s)&&a.push({literal:s||/^\s+$/.test(r),val:r===""?"'":r}),n=null,r="",s=!s):s||o===n?r+=o:(r.length>0&&a.push({literal:/^\s+$/.test(r),val:r}),r=o,n=o)}return r.length>0&&a.push({literal:s||/^\s+$/.test(r),val:r}),a}static macroTokenToFormatOpts(e){return Gp[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0,r=void 0){if(this.opts.forceSimple)return ge(e,n);const s={...this.opts};return n>0&&(s.padTo=n),r&&(s.signDisplay=r),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(p,y)=>this.loc.extract(e,p,y),i=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",o=()=>r?Bp(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,y)=>r?Hp(e,p):a(y?{month:p}:{month:p,day:"numeric"},"month"),d=(p,y)=>r?Up(e,p):a(y?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),f=p=>{const y=Ne.macroTokenToFormatOpts(p);return y?this.formatWithSystemDefault(e,y):p},u=p=>r?qp(e,p):a({era:p},"era"),m=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return s?a({day:"numeric"},"day"):this.num(e.day);case"dd":return s?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return s?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?a({month:"numeric"},"month"):this.num(e.month);case"MM":return s?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?a({year:"numeric"},"year"):this.num(e.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(p)}};return ro(Ne.parseFormat(n),m)}formatDurationFromString(e,n){const r=this.opts.signMode==="negativeLargestOnly"?-1:1,s=f=>{switch(f[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},a=(f,u)=>m=>{const p=s(m);if(p){const y=u.isNegativeDuration&&p!==u.largestUnit?r:1;let g;return this.opts.signMode==="negativeLargestOnly"&&p!==u.largestUnit?g="never":this.opts.signMode==="all"?g="always":g="auto",this.num(f.get(p)*y,m.length,g)}else return m},i=Ne.parseFormat(n),o=i.reduce((f,{literal:u,val:m})=>u?f:f.concat(m),[]),c=e.shiftTo(...o.map(s).filter(f=>f)),d={isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]};return ro(i,a(c,d))}}const Wc=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Cn(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function Tn(...t){return e=>t.reduce(([n,r,s],a)=>{const[i,o,c]=a(e,s);return[{...n,...i},o||r,c]},[{},null,1]).slice(0,2)}function En(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const s=n.exec(t);if(s)return r(s)}return[null,null]}function zc(...t){return(e,n)=>{const r={};let s;for(s=0;s<t.length;s++)r[t[s]]=kt(e[n+s]);return[r,null,n+s]}}const Zc=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Xp=`(?:${Zc.source}?(?:\\[(${Wc.source})\\])?)?`,La=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Bc=RegExp(`${La.source}${Xp}`),Va=RegExp(`(?:[Tt]${Bc.source})?`),Jp=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Kp=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Qp=/(\d{4})-?(\d{3})/,eg=zc("weekYear","weekNumber","weekDay"),tg=zc("year","ordinal"),ng=/(\d{4})-(\d\d)-(\d\d)/,Uc=RegExp(`${La.source} ?(?:${Zc.source}|(${Wc.source}))?`),rg=RegExp(`(?: ${Uc.source})?`);function hn(t,e,n){const r=t[e];return Z(r)?n:kt(r)}function sg(t,e){return[{year:hn(t,e),month:hn(t,e+1,1),day:hn(t,e+2,1)},null,e+3]}function On(t,e){return[{hours:hn(t,e,0),minutes:hn(t,e+1,0),seconds:hn(t,e+2,0),milliseconds:Pa(t[e+3])},null,e+4]}function Xn(t,e){const n=!t[e]&&!t[e+1],r=rs(t[e+1],t[e+2]),s=n?null:Ee.instance(r);return[{},s,e+3]}function Jn(t,e){const n=t[e]?dt.create(t[e]):null;return[{},n,e+1]}const ag=RegExp(`^T?${La.source}$`),ig=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function og(t){const[e,n,r,s,a,i,o,c,d]=t,f=e[0]==="-",u=c&&c[0]==="-",m=(p,y=!1)=>p!==void 0&&(y||p&&f)?-p:p;return[{years:m(Ft(n)),months:m(Ft(r)),weeks:m(Ft(s)),days:m(Ft(a)),hours:m(Ft(i)),minutes:m(Ft(o)),seconds:m(Ft(c),c==="-0"),milliseconds:m(Pa(d),u)}]}const lg={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function $a(t,e,n,r,s,a,i){const o={year:e.length===2?ra(kt(e)):kt(e),month:Mc.indexOf(n)+1,day:kt(r),hour:kt(s),minute:kt(a)};return i&&(o.second=kt(i)),t&&(o.weekday=t.length>3?Pc.indexOf(t)+1:Fc.indexOf(t)+1),o}const cg=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ug(t){const[,e,n,r,s,a,i,o,c,d,f,u]=t,m=$a(e,s,r,n,a,i,o);let p;return c?p=lg[c]:d?p=0:p=rs(f,u),[m,new Ee(p)]}function dg(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const fg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,hg=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,mg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function so(t){const[,e,n,r,s,a,i,o]=t;return[$a(e,s,r,n,a,i,o),Ee.utcInstance]}function pg(t){const[,e,n,r,s,a,i,o]=t;return[$a(e,o,n,r,s,a,i),Ee.utcInstance]}const gg=Cn(Jp,Va),yg=Cn(Kp,Va),vg=Cn(Qp,Va),xg=Cn(Bc),Hc=Tn(sg,On,Xn,Jn),wg=Tn(eg,On,Xn,Jn),bg=Tn(tg,On,Xn,Jn),_g=Tn(On,Xn,Jn);function kg(t){return En(t,[gg,Hc],[yg,wg],[vg,bg],[xg,_g])}function Sg(t){return En(dg(t),[cg,ug])}function Ng(t){return En(t,[fg,so],[hg,so],[mg,pg])}function Cg(t){return En(t,[ig,og])}const Tg=Tn(On);function Eg(t){return En(t,[ag,Tg])}const Og=Cn(ng,rg),jg=Cn(Uc),Dg=Tn(On,Xn,Jn);function Rg(t){return En(t,[Og,Hc],[jg,Dg])}const ao="Invalid Duration",qc={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Ag={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...qc},ze=146097/400,rn=146097/4800,Mg={years:{quarters:4,months:12,weeks:ze/7,days:ze,hours:ze*24,minutes:ze*24*60,seconds:ze*24*60*60,milliseconds:ze*24*60*60*1e3},quarters:{months:3,weeks:ze/28,days:ze/4,hours:ze*24/4,minutes:ze*24*60/4,seconds:ze*24*60*60/4,milliseconds:ze*24*60*60*1e3/4},months:{weeks:rn/7,days:rn,hours:rn*24,minutes:rn*24*60,seconds:rn*24*60*60,milliseconds:rn*24*60*60*1e3},...qc},Vt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ig=Vt.slice(0).reverse();function mt(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new te(r)}function Yc(t,e){let n=e.milliseconds??0;for(const r of Ig.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function io(t,e){const n=Yc(t,e)<0?-1:1;Vt.reduceRight((r,s)=>{if(Z(e[s]))return r;if(r){const a=e[r]*n,i=t[s][r],o=Math.floor(a/i);e[s]+=o*n,e[r]-=o*i*n}return s},null),Vt.reduce((r,s)=>{if(Z(e[s]))return r;if(r){const a=e[r]%1;e[r]-=a,e[s]+=a*t[r][s]}return s},null)}function oo(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class te{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?Mg:Ag;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||ae.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return te.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Se(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new te({values:Ir(e,te.normalizeUnit),loc:ae.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Ct(e))return te.fromMillis(e);if(te.isDuration(e))return e;if(typeof e=="object")return te.fromObject(e);throw new Se(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=Cg(e);return r?te.fromObject(r,n):te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=Eg(e);return r?te.fromObject(r,n):te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Se("need to specify a reason the Duration is invalid");const r=e instanceof Qe?e:new Qe(e,n);if(de.throwOnInvalid)throw new op(r);return new te({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new nc(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ne.create(this.loc,r).formatDurationFromString(this,e):ao}toHuman(e={}){if(!this.isValid)return ao;const n=e.showZeros!==!1,r=Vt.map(s=>{const a=this.values[s];return Z(a)||a===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(a)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Fa(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},I.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Yc(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e),r={};for(const s of Vt)(yn(n.values,s)||yn(this.values,s))&&(r[s]=n.get(s)+this.get(s));return mt(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Ac(e(this.values[r],r));return mt(this,{values:n},!0)}get(e){return this[te.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Ir(e,te.normalizeUnit)};return mt(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:s}={}){const i={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:s,conversionAccuracy:r};return mt(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return io(this.matrix,e),mt(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=oo(this.normalize().shiftToAll().toObject());return mt(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(i=>te.normalizeUnit(i));const n={},r={},s=this.toObject();let a;for(const i of Vt)if(e.indexOf(i)>=0){a=i;let o=0;for(const d in r)o+=this.matrix[d][i]*r[d],r[d]=0;Ct(s[i])&&(o+=s[i]);const c=Math.trunc(o);n[i]=c,r[i]=(o*1e3-c*1e3)/1e3}else Ct(s[i])&&(r[i]=s[i]);for(const i in r)r[i]!==0&&(n[a]+=i===a?r[i]:r[i]/this.matrix[a][i]);return io(this.matrix,n),mt(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return mt(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=oo(this.values);return mt(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of Vt)if(!n(this.values[r],e.values[r]))return!1;return!0}}const sn="Invalid Interval";function Pg(t,e){return!t||!t.isValid?me.invalid("missing or invalid start"):!e||!e.isValid?me.invalid("missing or invalid end"):e<t?me.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class me{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Se("need to specify a reason the Interval is invalid");const r=e instanceof Qe?e:new Qe(e,n);if(de.throwOnInvalid)throw new ip(r);return new me({invalid:r})}static fromDateTimes(e,n){const r=Dn(e),s=Dn(n),a=Pg(r,s);return a??new me({start:r,end:s})}static after(e,n){const r=te.fromDurationLike(n),s=Dn(e);return me.fromDateTimes(s,s.plus(r))}static before(e,n){const r=te.fromDurationLike(n),s=Dn(e);return me.fromDateTimes(s.minus(r),s)}static fromISO(e,n){const[r,s]=(e||"").split("/",2);if(r&&s){let a,i;try{a=I.fromISO(r,n),i=a.isValid}catch{i=!1}let o,c;try{o=I.fromISO(s,n),c=o.isValid}catch{c=!1}if(i&&c)return me.fromDateTimes(a,o);if(i){const d=te.fromISO(s,n);if(d.isValid)return me.after(a,d)}else if(c){const d=te.fromISO(r,n);if(d.isValid)return me.before(o,d)}}return me.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let s;return n?.useLocaleWeeks?s=this.end.reconfigure({locale:r.locale}):s=this.end,s=s.startOf(e,n),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?me.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Dn).filter(i=>this.contains(i)).sort((i,o)=>i.toMillis()-o.toMillis()),r=[];let{s}=this,a=0;for(;s<this.e;){const i=n[a]||this.e,o=+i>+this.e?this.e:i;r.push(me.fromDateTimes(s,o)),s=o,a+=1}return r}splitBy(e){const n=te.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,s=1,a;const i=[];for(;r<this.e;){const o=this.start.plus(n.mapUnits(c=>c*s));a=+o>+this.e?this.e:o,i.push(me.fromDateTimes(r,a)),r=a,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:me.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return me.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((s,a)=>s.s-a.s).reduce(([s,a],i)=>a?a.overlaps(i)||a.abutsStart(i)?[s,a.union(i)]:[s.concat([a]),i]:[s,i],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const s=[],a=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),i=Array.prototype.concat(...a),o=i.sort((c,d)=>c.time-d.time);for(const c of o)r+=c.type==="s"?1:-1,r===1?n=c.time:(n&&+n!=+c.time&&s.push(me.fromDateTimes(n,c.time)),n=null);return me.merge(s)}difference(...e){return me.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:sn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Rr,n={}){return this.isValid?Ne.create(this.s.loc.clone(n),e).formatInterval(this):sn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:sn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:sn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:sn}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:sn}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):te.invalid(this.invalidReason)}mapEndpoints(e){return me.fromDateTimes(e(this.s),e(this.e))}}class hr{static hasDST(e=de.defaultZone){const n=I.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return dt.isValidZone(e)}static normalizeZone(e){return Nt(e,de.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||ae.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||ae.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||ae.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||ae.create(n,r,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||ae.create(n,r,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null}={}){return(s||ae.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null}={}){return(s||ae.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ae.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return ae.create(n,null,"gregory").eras(e)}static features(){return{relative:jc(),localeWeek:Dc()}}}function lo(t,e){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(te.fromMillis(r).as("days"))}function Fg(t,e,n){const r=[["years",(c,d)=>d.year-c.year],["quarters",(c,d)=>d.quarter-c.quarter+(d.year-c.year)*4],["months",(c,d)=>d.month-c.month+(d.year-c.year)*12],["weeks",(c,d)=>{const f=lo(c,d);return(f-f%7)/7}],["days",lo]],s={},a=t;let i,o;for(const[c,d]of r)n.indexOf(c)>=0&&(i=c,s[c]=d(t,e),o=a.plus(s),o>e?(s[c]--,t=a.plus(s),t>e&&(o=t,s[c]--,t=a.plus(s))):t=o);return[t,s,o,i]}function Lg(t,e,n,r){let[s,a,i,o]=Fg(t,e,n);const c=e-s,d=n.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(i<e&&(i=s.plus({[o]:1})),i!==s&&(a[o]=(a[o]||0)+c/(i-s)));const f=te.fromObject(a,r);return d.length>0?te.fromMillis(c,r).shiftTo(...d).plus(f):f}const Vg="missing Intl.DateTimeFormat.formatToParts support";function se(t,e=n=>n){return{regex:t,deser:([n])=>e(Op(n))}}const $g=" ",Gc=`[ ${$g}]`,Xc=new RegExp(Gc,"g");function Wg(t){return t.replace(/\./g,"\\.?").replace(Xc,Gc)}function co(t){return t.replace(/\./g,"").replace(Xc," ").toLowerCase()}function Ge(t,e){return t===null?null:{regex:RegExp(t.map(Wg).join("|")),deser:([n])=>t.findIndex(r=>co(n)===co(r))+e}}function uo(t,e){return{regex:t,deser:([,n,r])=>rs(n,r),groups:e}}function mr(t){return{regex:t,deser:([e])=>e}}function zg(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zg(t,e){const n=Ye(e),r=Ye(e,"{2}"),s=Ye(e,"{3}"),a=Ye(e,"{4}"),i=Ye(e,"{6}"),o=Ye(e,"{1,2}"),c=Ye(e,"{1,3}"),d=Ye(e,"{1,6}"),f=Ye(e,"{1,9}"),u=Ye(e,"{2,4}"),m=Ye(e,"{4,6}"),p=w=>({regex:RegExp(zg(w.val)),deser:([v])=>v,literal:!0}),g=(w=>{if(t.literal)return p(w);switch(w.val){case"G":return Ge(e.eras("short"),0);case"GG":return Ge(e.eras("long"),0);case"y":return se(d);case"yy":return se(u,ra);case"yyyy":return se(a);case"yyyyy":return se(m);case"yyyyyy":return se(i);case"M":return se(o);case"MM":return se(r);case"MMM":return Ge(e.months("short",!0),1);case"MMMM":return Ge(e.months("long",!0),1);case"L":return se(o);case"LL":return se(r);case"LLL":return Ge(e.months("short",!1),1);case"LLLL":return Ge(e.months("long",!1),1);case"d":return se(o);case"dd":return se(r);case"o":return se(c);case"ooo":return se(s);case"HH":return se(r);case"H":return se(o);case"hh":return se(r);case"h":return se(o);case"mm":return se(r);case"m":return se(o);case"q":return se(o);case"qq":return se(r);case"s":return se(o);case"ss":return se(r);case"S":return se(c);case"SSS":return se(s);case"u":return mr(f);case"uu":return mr(o);case"uuu":return se(n);case"a":return Ge(e.meridiems(),0);case"kkkk":return se(a);case"kk":return se(u,ra);case"W":return se(o);case"WW":return se(r);case"E":case"c":return se(n);case"EEE":return Ge(e.weekdays("short",!1),1);case"EEEE":return Ge(e.weekdays("long",!1),1);case"ccc":return Ge(e.weekdays("short",!0),1);case"cccc":return Ge(e.weekdays("long",!0),1);case"Z":case"ZZ":return uo(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return uo(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return mr(/[a-z_+-/]{1,256}?/i);case" ":return mr(/[^\S\n\r]/);default:return p(w)}})(t)||{invalidReason:Vg};return g.token=t,g}const Bg={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Ug(t,e,n){const{type:r,value:s}=t;if(r==="literal"){const c=/^\s+$/.test(s);return{literal:!c,val:c?" ":s}}const a=e[r];let i=r;r==="hour"&&(e.hour12!=null?i=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?i="hour12":i="hour24":i=n.hour12?"hour12":"hour24");let o=Bg[i];if(typeof o=="object"&&(o=o[a]),o)return{literal:!1,val:o}}function Hg(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function qg(t,e,n){const r=t.match(e);if(r){const s={};let a=1;for(const i in n)if(yn(n,i)){const o=n[i],c=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(a,a+c))),a+=c}return[r,s]}else return[r,{}]}function Yg(t){const e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Z(t.z)||(n=dt.create(t.z)),Z(t.Z)||(n||(n=new Ee(t.Z)),r=t.Z),Z(t.q)||(t.M=(t.q-1)*3+1),Z(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Z(t.u)||(t.S=Pa(t.u)),[Object.keys(t).reduce((a,i)=>{const o=e(i);return o&&(a[o]=t[i]),a},{}),n,r]}let As=null;function Gg(){return As||(As=I.fromMillis(1555555555555)),As}function Xg(t,e){if(t.literal)return t;const n=Ne.macroTokenToFormatOpts(t.val),r=eu(n,e);return r==null||r.includes(void 0)?t:r}function Jc(t,e){return Array.prototype.concat(...t.map(n=>Xg(n,e)))}class Kc{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Jc(Ne.parseFormat(n),e),this.units=this.tokens.map(r=>Zg(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=Hg(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[n,r]=qg(e,this.regex,this.handlers),[s,a,i]=r?Yg(r):[null,null,void 0];if(yn(r,"a")&&yn(r,"H"))throw new cn("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:s,zone:a,specificOffset:i}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Qc(t,e,n){return new Kc(t,n).explainFromTokens(e)}function Jg(t,e,n){const{result:r,zone:s,specificOffset:a,invalidReason:i}=Qc(t,e,n);return[r,s,a,i]}function eu(t,e){if(!t)return null;const r=Ne.create(e,t).dtFormatter(Gg()),s=r.formatToParts(),a=r.resolvedOptions();return s.map(i=>Ug(i,t,a))}const Ms="Invalid DateTime",fo=864e13;function An(t){return new Qe("unsupported zone",`the zone "${t.name}" is not supported`)}function Is(t){return t.weekData===null&&(t.weekData=Ar(t.c)),t.weekData}function Ps(t){return t.localWeekData===null&&(t.localWeekData=Ar(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Lt(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new I({...n,...e,old:n})}function tu(t,e,n){let r=t-e*60*1e3;const s=n.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const a=n.offset(r);return s===a?[r,s]:[t-Math.min(s,a)*60*1e3,Math.max(s,a)]}function pr(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function kr(t,e,n){return tu(ns(t),e,n)}function ho(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:r,month:s,day:Math.min(t.c.day,Mr(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},i=te.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=ns(a);let[c,d]=tu(o,n,t.zone);return i!==0&&(c+=i,d=t.zone.offset(c)),{ts:c,o:d}}function an(t,e,n,r,s,a){const{setZone:i,zone:o}=n;if(t&&Object.keys(t).length!==0||e){const c=e||o,d=I.fromObject(t,{...n,zone:c,specificOffset:a});return i?d:d.setZone(o)}else return I.invalid(new Qe("unparsable",`the input "${s}" can't be parsed as ${r}`))}function gr(t,e,n=!0){return t.isValid?Ne.create(ae.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Fs(t,e,n){const r=t.c.year>9999||t.c.year<0;let s="";if(r&&t.c.year>=0&&(s+="+"),s+=ge(t.c.year,r?6:4),n==="year")return s;if(e){if(s+="-",s+=ge(t.c.month),n==="month")return s;s+="-"}else if(s+=ge(t.c.month),n==="month")return s;return s+=ge(t.c.day),s}function mo(t,e,n,r,s,a,i){let o=!n||t.c.millisecond!==0||t.c.second!==0,c="";switch(i){case"day":case"month":case"year":break;default:if(c+=ge(t.c.hour),i==="hour")break;if(e){if(c+=":",c+=ge(t.c.minute),i==="minute")break;o&&(c+=":",c+=ge(t.c.second))}else{if(c+=ge(t.c.minute),i==="minute")break;o&&(c+=ge(t.c.second))}if(i==="second")break;o&&(!r||t.c.millisecond!==0)&&(c+=".",c+=ge(t.c.millisecond,3))}return s&&(t.isOffsetFixed&&t.offset===0&&!a?c+="Z":t.o<0?(c+="-",c+=ge(Math.trunc(-t.o/60)),c+=":",c+=ge(Math.trunc(-t.o%60))):(c+="+",c+=ge(Math.trunc(t.o/60)),c+=":",c+=ge(Math.trunc(t.o%60)))),a&&(c+="["+t.zone.ianaName+"]"),c}const nu={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Kg={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Qg={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Sr=["year","month","day","hour","minute","second","millisecond"],ey=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ty=["year","ordinal","hour","minute","second","millisecond"];function Nr(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new nc(t);return e}function po(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Nr(t)}}function ny(t){if(Mn===void 0&&(Mn=de.now()),t.type!=="iana")return t.offset(Mn);const e=t.name;let n=sa.get(e);return n===void 0&&(n=t.offset(Mn),sa.set(e,n)),n}function go(t,e){const n=Nt(e.zone,de.defaultZone);if(!n.isValid)return I.invalid(An(n));const r=ae.fromObject(e);let s,a;if(Z(t.year))s=de.now();else{for(const c of Sr)Z(t[c])&&(t[c]=nu[c]);const i=Ec(t)||Oc(t);if(i)return I.invalid(i);const o=ny(n);[s,a]=kr(t,o,n)}return new I({ts:s,zone:n,loc:r,o:a})}function yo(t,e,n){const r=Z(n.round)?!0:n.round,s=Z(n.rounding)?"trunc":n.rounding,a=(o,c)=>(o=Fa(o,r||n.calendary?0:2,n.calendary?"round":s),e.loc.clone(n).relFormatter(n).format(o,c)),i=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return a(i(n.unit),n.unit);for(const o of n.units){const c=i(o);if(Math.abs(c)>=1)return a(c,o)}return a(t>e?-0:0,n.units[n.units.length-1])}function vo(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let Mn;const sa=new Map;class I{constructor(e){const n=e.zone||de.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new Qe("invalid input"):null)||(n.isValid?null:An(n));this.ts=Z(e.ts)?de.now():e.ts;let s=null,a=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[s,a]=[e.old.c,e.old.o];else{const o=Ct(e.o)&&!e.old?e.o:n.offset(this.ts);s=pr(this.ts,o),r=Number.isNaN(s.year)?new Qe("invalid input"):null,s=r?null:s,a=r?null:o}this._zone=n,this.loc=e.loc||ae.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new I({})}static local(){const[e,n]=vo(arguments),[r,s,a,i,o,c,d]=n;return go({year:r,month:s,day:a,hour:i,minute:o,second:c,millisecond:d},e)}static utc(){const[e,n]=vo(arguments),[r,s,a,i,o,c,d]=n;return e.zone=Ee.utcInstance,go({year:r,month:s,day:a,hour:i,minute:o,second:c,millisecond:d},e)}static fromJSDate(e,n={}){const r=Mp(e)?e.valueOf():NaN;if(Number.isNaN(r))return I.invalid("invalid input");const s=Nt(n.zone,de.defaultZone);return s.isValid?new I({ts:r,zone:s,loc:ae.fromObject(n)}):I.invalid(An(s))}static fromMillis(e,n={}){if(Ct(e))return e<-fo||e>fo?I.invalid("Timestamp out of range"):new I({ts:e,zone:Nt(n.zone,de.defaultZone),loc:ae.fromObject(n)});throw new Se(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Ct(e))return new I({ts:e*1e3,zone:Nt(n.zone,de.defaultZone),loc:ae.fromObject(n)});throw new Se("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=Nt(n.zone,de.defaultZone);if(!r.isValid)return I.invalid(An(r));const s=ae.fromObject(n),a=Ir(e,po),{minDaysInFirstWeek:i,startOfWeek:o}=eo(a,s),c=de.now(),d=Z(n.specificOffset)?r.offset(c):n.specificOffset,f=!Z(a.ordinal),u=!Z(a.year),m=!Z(a.month)||!Z(a.day),p=u||m,y=a.weekYear||a.weekNumber;if((p||f)&&y)throw new cn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(m&&f)throw new cn("Can't mix ordinal dates with month/day");const g=y||a.weekday&&!p;let w,v,k=pr(c,d);g?(w=ey,v=Kg,k=Ar(k,i,o)):f?(w=ty,v=Qg,k=Rs(k)):(w=Sr,v=nu);let S=!1;for(const L of w){const z=a[L];Z(z)?S?a[L]=v[L]:a[L]=k[L]:S=!0}const _=g?Dp(a,i,o):f?Rp(a):Ec(a),b=_||Oc(a);if(b)return I.invalid(b);const E=g?Ki(a,i,o):f?Qi(a):a,[T,A]=kr(E,d,r),V=new I({ts:T,zone:r,o:A,loc:s});return a.weekday&&p&&e.weekday!==V.weekday?I.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${V.toISO()}`):V.isValid?V:I.invalid(V.invalid)}static fromISO(e,n={}){const[r,s]=kg(e);return an(r,s,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,s]=Sg(e);return an(r,s,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,s]=Ng(e);return an(r,s,n,"HTTP",n)}static fromFormat(e,n,r={}){if(Z(e)||Z(n))throw new Se("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=r,i=ae.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[o,c,d,f]=Jg(i,e,n);return f?I.invalid(f):an(o,c,r,`format ${n}`,e,d)}static fromString(e,n,r={}){return I.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,s]=Rg(e);return an(r,s,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Se("need to specify a reason the DateTime is invalid");const r=e instanceof Qe?e:new Qe(e,n);if(de.throwOnInvalid)throw new ap(r);return new I({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=eu(e,ae.fromObject(n));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,n={}){return Jc(Ne.parseFormat(e),ae.fromObject(n)).map(s=>s.val).join("")}static resetCache(){Mn=void 0,sa.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Is(this).weekYear:NaN}get weekNumber(){return this.isValid?Is(this).weekNumber:NaN}get weekday(){return this.isValid?Is(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ps(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ps(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ps(this).weekYear:NaN}get ordinal(){return this.isValid?Rs(this.c).ordinal:NaN}get monthShort(){return this.isValid?hr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?hr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?hr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?hr.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=ns(this.c),s=this.zone.offset(r-e),a=this.zone.offset(r+e),i=this.zone.offset(r-s*n),o=this.zone.offset(r-a*n);if(i===o)return[this];const c=r-i*n,d=r-o*n,f=pr(c,i),u=pr(d,o);return f.hour===u.hour&&f.minute===u.minute&&f.second===u.second&&f.millisecond===u.millisecond?[Lt(this,{ts:c}),Lt(this,{ts:d})]:[this]}get isInLeapYear(){return Gn(this.year)}get daysInMonth(){return Mr(this.year,this.month)}get daysInYear(){return this.isValid?fn(this.year):NaN}get weeksInWeekYear(){return this.isValid?$n(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?$n(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:s}=Ne.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:s}}toUTC(e=0,n={}){return this.setZone(Ee.instance(e),n)}toLocal(){return this.setZone(de.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=Nt(e,de.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(n||r){const a=e.offset(this.ts),i=this.toObject();[s]=kr(i,a,e)}return Lt(this,{ts:s,zone:e})}else return I.invalid(An(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Lt(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Ir(e,po),{minDaysInFirstWeek:r,startOfWeek:s}=eo(n,this.loc),a=!Z(n.weekYear)||!Z(n.weekNumber)||!Z(n.weekday),i=!Z(n.ordinal),o=!Z(n.year),c=!Z(n.month)||!Z(n.day),d=o||c,f=n.weekYear||n.weekNumber;if((d||i)&&f)throw new cn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&i)throw new cn("Can't mix ordinal dates with month/day");let u;a?u=Ki({...Ar(this.c,r,s),...n},r,s):Z(n.ordinal)?(u={...this.toObject(),...n},Z(n.day)&&(u.day=Math.min(Mr(u.year,u.month),u.day))):u=Qi({...Rs(this.c),...n});const[m,p]=kr(u,this.o,this.zone);return Lt(this,{ts:m,o:p})}plus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e);return Lt(this,ho(this,n))}minus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e).negate();return Lt(this,ho(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},s=te.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:i}=this;i<a&&(r.weekNumber=this.weekNumber-1),r.weekday=a}else r.weekday=1;if(s==="quarters"){const a=Math.ceil(this.month/3);r.month=(a-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?Ne.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Ms}toLocaleString(e=Rr,n={}){return this.isValid?Ne.create(this.loc.clone(n),e).formatDateTime(this):Ms}toLocaleParts(e={}){return this.isValid?Ne.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:a=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;i=Nr(i);const o=e==="extended";let c=Fs(this,o,i);return Sr.indexOf(i)>=3&&(c+="T"),c+=mo(this,o,n,r,s,a,i),c}toISODate({format:e="extended",precision:n="day"}={}){return this.isValid?Fs(this,e==="extended",Nr(n)):null}toISOWeekDate(){return gr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:a=!1,format:i="extended",precision:o="milliseconds"}={}){return this.isValid?(o=Nr(o),(s&&Sr.indexOf(o)>=3?"T":"")+mo(this,i==="extended",n,e,r,a,o)):null}toRFC2822(){return gr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return gr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Fs(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(n||e)&&(r&&(s+=" "),n?s+="z":e&&(s+="ZZ")),gr(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ms}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return te.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},a=Ip(n).map(te.normalizeUnit),i=e.valueOf()>this.valueOf(),o=i?this:e,c=i?e:this,d=Lg(o,c,a,s);return i?d.negate():d}diffNow(e="milliseconds",n={}){return this.diff(I.now(),e,n)}until(e){return this.isValid?me.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const s=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,r)<=s&&s<=a.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||I.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(s=e.unit,a=void 0),yo(n,this.plus(r),{...e,numeric:"always",units:s,unit:a})}toRelativeCalendar(e={}){return this.isValid?yo(e.base||I.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(I.isDateTime))throw new Se("min requires all arguments be DateTimes");return to(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(I.isDateTime))throw new Se("max requires all arguments be DateTimes");return to(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:s=null,numberingSystem:a=null}=r,i=ae.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return Qc(i,e,n)}static fromStringExplain(e,n,r={}){return I.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:s=null}=n,a=ae.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new Kc(a,e)}static fromFormatParser(e,n,r={}){if(Z(e)||Z(n))throw new Se("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:a=null}=r,i=ae.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});if(!i.equals(n.locale))throw new Se(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${n.locale}`);const{result:o,zone:c,specificOffset:d,invalidReason:f}=n.explainFromTokens(e);return f?I.invalid(f):an(o,c,r,`format ${n.format}`,e,d)}static get DATE_SHORT(){return Rr}static get DATE_MED(){return rc}static get DATE_MED_WITH_WEEKDAY(){return lp}static get DATE_FULL(){return sc}static get DATE_HUGE(){return ac}static get TIME_SIMPLE(){return ic}static get TIME_WITH_SECONDS(){return oc}static get TIME_WITH_SHORT_OFFSET(){return lc}static get TIME_WITH_LONG_OFFSET(){return cc}static get TIME_24_SIMPLE(){return uc}static get TIME_24_WITH_SECONDS(){return dc}static get TIME_24_WITH_SHORT_OFFSET(){return fc}static get TIME_24_WITH_LONG_OFFSET(){return hc}static get DATETIME_SHORT(){return mc}static get DATETIME_SHORT_WITH_SECONDS(){return pc}static get DATETIME_MED(){return gc}static get DATETIME_MED_WITH_SECONDS(){return yc}static get DATETIME_MED_WITH_WEEKDAY(){return cp}static get DATETIME_FULL(){return vc}static get DATETIME_FULL_WITH_SECONDS(){return xc}static get DATETIME_HUGE(){return wc}static get DATETIME_HUGE_WITH_SECONDS(){return bc}}function Dn(t){if(I.isDateTime(t))return t;if(t&&t.valueOf&&Ct(t.valueOf()))return I.fromJSDate(t);if(t&&typeof t=="object")return I.fromObject(t);throw new Se(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Pr="Europe/Madrid";de.defaultZone=Pr;function Fr(t){return dt.isValidZone(t)}function Kn(t){if(t&&Fr(t))return t;const e=de.defaultZone.name||Pr;return Fr(e)?e:Pr}function ry(t){return Fr(t)?(de.defaultZone=t,!0):!1}function sy(t,e){const n=Kn(e);return typeof t=="string"?I.fromISO(t,{zone:n}):I.fromJSDate(t,{zone:n})}function ru(t,e){const n=Kn(e),r=I.isDateTime(t)?t.setZone(n):I.fromJSDate(t,{zone:n});return r.isValid?r.toISODate():null}function ay(t,e){const n=Kn(e),r=I.isDateTime(t)?t.setZone(n):I.fromJSDate(t,{zone:n});return r.isValid?r.toISO():null}const iy=["Do","Lu","Ma","Mi","Ju","Vi","Sa"],oy=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];function ly(t,e,n){return I.fromObject({year:t,month:e,day:1},{zone:n}).daysInMonth??0}function cy(t,e,n){return I.fromObject({year:t,month:e,day:1},{zone:n}).weekday%7}function Ls(t,e){return t.hasSame(e,"day")}function Vs(t,e,n){return!!(e&&t<e||n&&t>n)}function uy(t){return t.toFormat("dd/LL/yyyy")}const as=h.forwardRef(({value:t,defaultValue:e,onChange:n,disabled:r=!1,placeholder:s="Seleccionar fecha",min:a,max:i,className:o,isInvalid:c,timeZone:d},f)=>{const u=h.useMemo(()=>Kn(d),[d]),[m,p]=h.useState(!1),[y,g]=h.useState(e??null),[w,v]=h.useState(()=>{const D=t??e??new Date;return I.fromJSDate(D,{zone:u}).startOf("month")}),[k,S]=h.useState(null),_=t!==void 0,b=_?t:y,E=h.useMemo(()=>b?I.fromJSDate(b,{zone:u}):null,[b,u]),T=h.useMemo(()=>a?I.fromJSDate(a,{zone:u}).startOf("day"):null,[a,u]),A=h.useMemo(()=>i?I.fromJSDate(i,{zone:u}).startOf("day"):null,[i,u]),V=h.useRef(null),L=D=>{if(Vs(D,T,A))return;const ee=D.toJSDate();_||g(ee),n?.(ee),p(!1)},z=D=>{v(ee=>ee.plus({months:D}).startOf("month"))},B=D=>{v(ee=>ee.plus({years:D}).startOf("month"))},G=D=>{if(!m)return;const ee=k??E??I.now().setZone(u);let W=null;switch(D.key){case"ArrowLeft":D.preventDefault(),W=ee.minus({days:1});break;case"ArrowRight":D.preventDefault(),W=ee.plus({days:1});break;case"ArrowUp":D.preventDefault(),W=ee.minus({days:7});break;case"ArrowDown":D.preventDefault(),W=ee.plus({days:7});break;case"Enter":case" ":D.preventDefault(),k&&!Vs(k,T,A)&&L(k);return;case"Escape":D.preventDefault(),p(!1);return;case"Home":D.preventDefault(),W=ee.startOf("month");break;case"End":D.preventDefault(),W=ee.endOf("month");break;case"PageUp":D.preventDefault(),D.shiftKey?B(-1):z(-1);return;case"PageDown":D.preventDefault(),D.shiftKey?B(1):z(1);return;default:return}W&&(S(W),(W.month!==w.month||W.year!==w.year)&&v(W.startOf("month")))};h.useEffect(()=>{if(m){const D=E??I.now().setZone(u);S(D),v(D.startOf("month"))}},[m,u,E]);const Q=w.year,H=w.month,P=ly(Q,H,u),U=cy(Q,H,u),$=I.now().setZone(u),ie=!!E?.isValid,F=[];for(let D=0;D<U;D++)F.push(null);for(let D=1;D<=P;D++)F.push(D);return l.jsxs(tp,{open:m,onOpenChange:p,children:[l.jsx(np,{asChild:!0,disabled:r,children:l.jsxs("button",{ref:f,type:"button",className:N("oniratec-datepicker__trigger",o),"data-disabled":r?"true":void 0,"data-invalid":c?"true":void 0,"aria-haspopup":"dialog","aria-expanded":m,children:[l.jsx("span",{className:"oniratec-datepicker__value","data-placeholder":ie?void 0:"true",children:ie&&E?uy(E):s}),l.jsx(J.Calendar,{className:"oniratec-datepicker__icon"})]})}),l.jsx(rp,{children:l.jsxs(sp,{ref:V,className:"oniratec-datepicker__popover",sideOffset:4,align:"start",onKeyDown:G,role:"dialog","aria-modal":"true","aria-label":"Calendario",children:[l.jsxs("div",{className:"oniratec-datepicker__header",children:[l.jsx("button",{type:"button",className:"oniratec-datepicker__nav",onClick:()=>z(-1),"aria-label":"Mes anterior",children:l.jsx(J.ChevronLeft,{className:"h-4 w-4"})}),l.jsxs("span",{className:"oniratec-datepicker__title",children:[oy[H-1]," ",Q]}),l.jsx("button",{type:"button",className:"oniratec-datepicker__nav",onClick:()=>z(1),"aria-label":"Mes siguiente",children:l.jsx(J.ChevronRight,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"oniratec-datepicker__weekdays",role:"row",children:iy.map(D=>l.jsx("span",{className:"oniratec-datepicker__weekday",role:"columnheader",children:D},D))}),l.jsx("div",{className:"oniratec-datepicker__grid",role:"grid",children:F.map((D,ee)=>{if(D===null)return l.jsx("span",{className:"oniratec-datepicker__day--empty"},`empty-${ee}`);const W=w.set({day:D}).startOf("day"),le=E?Ls(W,E):!1,ce=Ls(W,$),ve=Vs(W,T,A),Te=k?Ls(W,k):!1;return l.jsx("button",{type:"button",className:"oniratec-datepicker__day","data-selected":le?"true":void 0,"data-today":ce?"true":void 0,"data-disabled":ve?"true":void 0,"data-focused":Te?"true":void 0,disabled:ve,onClick:()=>L(W),tabIndex:Te?0:-1,"aria-selected":!!le,"aria-disabled":!!ve,children:D},D)})})]})})]})});as.displayName="DatePicker";var is="Dialog",[su]=qr(is),[dy,rt]=su(is),au=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:i=!0}=t,o=h.useRef(null),c=h.useRef(null),[d,f]=ja({prop:r,defaultProp:s??!1,onChange:a,caller:is});return l.jsx(dy,{scope:e,triggerRef:o,contentRef:c,contentId:xr(),titleId:xr(),descriptionId:xr(),open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(u=>!u),[f]),modal:i,children:n})};au.displayName=is;var iu="DialogTrigger",ou=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(iu,n),a=$e(e,s.triggerRef);return l.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Za(s.open),...r,ref:a,onClick:Re(t.onClick,s.onOpenToggle)})});ou.displayName=iu;var Wa="DialogPortal",[fy,lu]=su(Wa,{forceMount:void 0}),cu=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,a=rt(Wa,e);return l.jsx(fy,{scope:e,forceMount:n,children:h.Children.map(r,i=>l.jsx(Nn,{present:n||a.open,children:l.jsx(Oa,{asChild:!0,container:s,children:i})}))})};cu.displayName=Wa;var Lr="DialogOverlay",uu=h.forwardRef((t,e)=>{const n=lu(Lr,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,a=rt(Lr,t.__scopeDialog);return a.modal?l.jsx(Nn,{present:r||a.open,children:l.jsx(my,{...s,ref:e})}):null});uu.displayName=Lr;var hy=Hr("DialogOverlay.RemoveScroll"),my=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(Lr,n);return l.jsx(Da,{as:hy,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Ce.div,{"data-state":Za(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Bt="DialogContent",du=h.forwardRef((t,e)=>{const n=lu(Bt,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,a=rt(Bt,t.__scopeDialog);return l.jsx(Nn,{present:r||a.open,children:a.modal?l.jsx(py,{...s,ref:e}):l.jsx(gy,{...s,ref:e})})});du.displayName=Bt;var py=h.forwardRef((t,e)=>{const n=rt(Bt,t.__scopeDialog),r=h.useRef(null),s=$e(e,n.contentRef,r);return h.useEffect(()=>{const a=r.current;if(a)return Ll(a)},[]),l.jsx(fu,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(t.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Re(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,o=i.button===0&&i.ctrlKey===!0;(i.button===2||o)&&a.preventDefault()}),onFocusOutside:Re(t.onFocusOutside,a=>a.preventDefault())})}),gy=h.forwardRef((t,e)=>{const n=rt(Bt,t.__scopeDialog),r=h.useRef(!1),s=h.useRef(!1);return l.jsx(fu,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),fu=h.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,...i}=t,o=rt(Bt,n),c=h.useRef(null),d=$e(e,c);return dl(),l.jsxs(l.Fragment,{children:[l.jsx(wa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:l.jsx(xa,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Za(o.open),...i,ref:d,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(yy,{titleId:o.titleId}),l.jsx(xy,{contentRef:c,descriptionId:o.descriptionId})]})]})}),za="DialogTitle",hu=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(za,n);return l.jsx(Ce.h2,{id:s.titleId,...r,ref:e})});hu.displayName=za;var mu="DialogDescription",pu=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(mu,n);return l.jsx(Ce.p,{id:s.descriptionId,...r,ref:e})});pu.displayName=mu;var gu="DialogClose",yu=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(gu,n);return l.jsx(Ce.button,{type:"button",...r,ref:e,onClick:Re(t.onClick,()=>s.onOpenChange(!1))})});yu.displayName=gu;function Za(t){return t?"open":"closed"}var vu="DialogTitleWarning",[z0,xu]=df(vu,{contentName:Bt,titleName:za,docsSlug:"dialog"}),yy=({titleId:t})=>{const e=xu(vu),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
41
|
+
`)},Pm=0,rn=[];function Lm(t){var e=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(Pm++)[0],a=h.useState(Zl)[0],i=h.useRef(t);h.useEffect(function(){i.current=t},[t]),h.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var g=am([t.lockRef.current],(t.shards||[]).map(zi),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=h.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var v=dr(g),k=n.current,b="deltaX"in g?g.deltaX:k[0]-v[0],S="deltaY"in g?g.deltaY:k[1]-v[1],_,T=g.target,E=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&T.type==="range")return!1;var I=window.getSelection(),W=I&&I.anchorNode,L=W?W===T||W.contains(T):!1;if(L)return!1;var z=$i(E,T);if(!z)return!0;if(z?_=E:(_=E==="v"?"h":"v",z=$i(E,T)),!z)return!1;if(!r.current&&"changedTouches"in g&&(b||S)&&(r.current=_),!_)return!0;var B=r.current||_;return Mm(B,w,g,B==="h"?b:S)},[]),c=h.useCallback(function(g){var w=g;if(!(!rn.length||rn[rn.length-1]!==a)){var v="deltaY"in w?Wi(w):dr(w),k=e.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&Im(_.delta,v)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}if(!k){var b=(i.current.shards||[]).map(zi).filter(Boolean).filter(function(_){return _.contains(w.target)}),S=b.length>0?o(w,b[0]):!i.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),d=h.useCallback(function(g,w,v,k){var b={name:g,delta:w,target:v,should:k,shadowParent:Vm(v)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(S){return S!==b})},1)},[]),f=h.useCallback(function(g){n.current=dr(g),r.current=void 0},[]),u=h.useCallback(function(g){d(g.type,Wi(g),g.target,o(g,t.lockRef.current))},[]),m=h.useCallback(function(g){d(g.type,dr(g),g.target,o(g,t.lockRef.current))},[]);h.useEffect(function(){return rn.push(a),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",c,nn),document.addEventListener("touchmove",c,nn),document.addEventListener("touchstart",f,nn),function(){rn=rn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,nn),document.removeEventListener("touchmove",c,nn),document.removeEventListener("touchstart",f,nn)}},[]);var p=t.removeScrollBar,y=t.inert;return h.createElement(h.Fragment,null,y?h.createElement(a,{styles:Fm(s)}):null,p?h.createElement(Tm,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Vm(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const $m=mm(zl,Lm);var Ra=h.forwardRef(function(t,e){return h.createElement(Kr,it({},t,{ref:e,sideCar:$m}))});Ra.classNames=Kr.classNames;var Qr="Popover",[ql]=qr(Qr,[El]),qn=El(),[Wm,At]=ql(Qr),Yl=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:i=!1}=t,o=qn(e),c=h.useRef(null),[d,f]=h.useState(!1),[u,m]=Da({prop:r,defaultProp:s??!1,onChange:a,caller:Qr});return l.jsx(Hh,{...o,children:l.jsx(Wm,{scope:e,contentId:xr(),triggerRef:c,open:u,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:d,onCustomAnchorAdd:h.useCallback(()=>f(!0),[]),onCustomAnchorRemove:h.useCallback(()=>f(!1),[]),modal:i,children:n})})};Yl.displayName=Qr;var Gl="PopoverAnchor",zm=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=At(Gl,n),a=qn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:o}=s;return h.useEffect(()=>(i(),()=>o()),[i,o]),l.jsx(Pl,{...a,...r,ref:e})});zm.displayName=Gl;var Xl="PopoverTrigger",Jl=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=At(Xl,n),a=qn(n),i=$e(e,s.triggerRef),o=l.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":nc(s.open),...r,ref:i,onClick:Re(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?o:l.jsx(Pl,{asChild:!0,...a,children:o})});Jl.displayName=Xl;var Aa="PopoverPortal",[Zm,Bm]=ql(Aa,{forceMount:void 0}),Kl=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,a=At(Aa,e);return l.jsx(Zm,{scope:e,forceMount:n,children:l.jsx(Cn,{present:n||a.open,children:l.jsx(ja,{asChild:!0,container:s,children:r})})})};Kl.displayName=Aa;var yn="PopoverContent",Ql=h.forwardRef((t,e)=>{const n=Bm(yn,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,a=At(yn,t.__scopePopover);return l.jsx(Cn,{present:r||a.open,children:a.modal?l.jsx(Hm,{...s,ref:e}):l.jsx(qm,{...s,ref:e})})});Ql.displayName=yn;var Um=Hr("PopoverContent.RemoveScroll"),Hm=h.forwardRef((t,e)=>{const n=At(yn,t.__scopePopover),r=h.useRef(null),s=$e(e,r),a=h.useRef(!1);return h.useEffect(()=>{const i=r.current;if(i)return Vl(i)},[]),l.jsx(Ra,{as:Um,allowPinchZoom:!0,children:l.jsx(ec,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(t.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Re(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0,d=o.button===2||c;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Re(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),qm=h.forwardRef((t,e)=>{const n=At(yn,t.__scopePopover),r=h.useRef(!1),s=h.useRef(!1);return l.jsx(ec,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),ec=h.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...u}=t,m=At(yn,n),p=qn(n);return fl(),l.jsx(ba,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:l.jsx(wa,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),children:l.jsx(qh,{"data-state":nc(m.open),role:"dialog",id:m.contentId,...p,...u,ref:e,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),tc="PopoverClose",Ym=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=At(tc,n);return l.jsx(Ce.button,{type:"button",...r,ref:e,onClick:Re(t.onClick,()=>s.onOpenChange(!1))})});Ym.displayName=tc;var Gm="PopoverArrow",Xm=h.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=qn(n);return l.jsx(Yh,{...s,...r,ref:e})});Xm.displayName=Gm;function nc(t){return t?"open":"closed"}var Jm=Yl,Km=Jl,Qm=Kl,ep=Ql;class Yt extends Error{}class tp extends Yt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class np extends Yt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class rp extends Yt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class un extends Yt{}class rc extends Yt{constructor(e){super(`Invalid unit ${e}`)}}class Se extends Yt{}class bt extends Yt{constructor(){super("Zone is an abstract class")}}const O="numeric",nt="short",Pe="long",Rr={year:O,month:O,day:O},sc={year:O,month:nt,day:O},sp={year:O,month:nt,day:O,weekday:nt},ac={year:O,month:Pe,day:O},ic={year:O,month:Pe,day:O,weekday:Pe},oc={hour:O,minute:O},lc={hour:O,minute:O,second:O},cc={hour:O,minute:O,second:O,timeZoneName:nt},uc={hour:O,minute:O,second:O,timeZoneName:Pe},dc={hour:O,minute:O,hourCycle:"h23"},fc={hour:O,minute:O,second:O,hourCycle:"h23"},hc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:nt},mc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:Pe},pc={year:O,month:O,day:O,hour:O,minute:O},gc={year:O,month:O,day:O,hour:O,minute:O,second:O},yc={year:O,month:nt,day:O,hour:O,minute:O},vc={year:O,month:nt,day:O,hour:O,minute:O,second:O},ap={year:O,month:nt,day:O,weekday:nt,hour:O,minute:O},xc={year:O,month:Pe,day:O,hour:O,minute:O,timeZoneName:nt},wc={year:O,month:Pe,day:O,hour:O,minute:O,second:O,timeZoneName:nt},bc={year:O,month:Pe,day:O,weekday:Pe,hour:O,minute:O,timeZoneName:Pe},_c={year:O,month:Pe,day:O,weekday:Pe,hour:O,minute:O,second:O,timeZoneName:Pe};class Yn{get type(){throw new bt}get name(){throw new bt}get ianaName(){return this.name}get isUniversal(){throw new bt}offsetName(e,n){throw new bt}formatOffset(e,n){throw new bt}offset(e){throw new bt}equals(e){throw new bt}get isValid(){throw new bt}}let js=null;class es extends Yn{static get instance(){return js===null&&(js=new es),js}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Ac(e,n,r)}formatOffset(e,n){return Ln(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Gs=new Map;function ip(t){let e=Gs.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Gs.set(t,e)),e}const op={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function lp(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,i,o,c,d,f]=r;return[i,s,a,o,c,d,f]}function cp(t,e){const n=t.formatToParts(e),r=[];for(let s=0;s<n.length;s++){const{type:a,value:i}=n[s],o=op[a];a==="era"?r[o]=i:Z(o)||(r[o]=parseInt(i,10))}return r}const Ds=new Map;class ut extends Yn{static create(e){let n=Ds.get(e);return n===void 0&&Ds.set(e,n=new ut(e)),n}static resetCache(){Ds.clear(),Gs.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ut.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Ac(e,n,r,this.name)}formatOffset(e,n){return Ln(this.offset(e),n)}offset(e){if(!this.valid)return NaN;const n=new Date(e);if(isNaN(n))return NaN;const r=ip(this.name);let[s,a,i,o,c,d,f]=r.formatToParts?cp(r,n):lp(r,n);o==="BC"&&(s=-Math.abs(s)+1);const m=ns({year:s,month:a,day:i,hour:c===24?0:c,minute:d,second:f,millisecond:0});let p=+n;const y=p%1e3;return p-=y>=0?y:1e3+y,(m-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Zi={};function up(t,e={}){const n=JSON.stringify([t,e]);let r=Zi[n];return r||(r=new Intl.ListFormat(t,e),Zi[n]=r),r}const Xs=new Map;function Js(t,e={}){const n=JSON.stringify([t,e]);let r=Xs.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(t,e),Xs.set(n,r)),r}const Ks=new Map;function dp(t,e={}){const n=JSON.stringify([t,e]);let r=Ks.get(n);return r===void 0&&(r=new Intl.NumberFormat(t,e),Ks.set(n,r)),r}const Qs=new Map;function fp(t,e={}){const{base:n,...r}=e,s=JSON.stringify([t,r]);let a=Qs.get(s);return a===void 0&&(a=new Intl.RelativeTimeFormat(t,e),Qs.set(s,a)),a}let An=null;function hp(){return An||(An=new Intl.DateTimeFormat().resolvedOptions().locale,An)}const ea=new Map;function kc(t){let e=ea.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),ea.set(t,e)),e}const ta=new Map;function mp(t){let e=ta.get(t);if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...Sc,...e}),ta.set(t,e)}return e}function pp(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,s;try{r=Js(t).resolvedOptions(),s=t}catch{const c=t.substring(0,n);r=Js(c).resolvedOptions(),s=c}const{numberingSystem:a,calendar:i}=r;return[s,a,i]}}function gp(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function yp(t){const e=[];for(let n=1;n<=12;n++){const r=M.utc(2009,n,1);e.push(t(r))}return e}function vp(t){const e=[];for(let n=1;n<=7;n++){const r=M.utc(2016,11,13+n);e.push(t(r))}return e}function fr(t,e,n,r){const s=t.listingMode();return s==="error"?null:s==="en"?n(e):r(e)}function xp(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||kc(t.locale).numberingSystem==="latn"}class wp{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:a,...i}=r;if(!n||Object.keys(i).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=dp(e,o)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):La(e,3);return ge(n,this.padTo)}}}class bp{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const i=-1*(e.offset/60),o=i>=0?`Etc/GMT+${i}`:`Etc/GMT${i}`;e.offset!==0&&ut.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Js(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class _p{constructor(e,n,r){this.opts={style:"long",...r},!n&&Dc()&&(this.rtf=fp(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):Bp(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Sc={firstDay:1,minimalDays:4,weekend:[6,7]};class ae{static fromOpts(e){return ae.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,s,a=!1){const i=e||de.defaultLocale,o=i||(a?"en-US":hp()),c=n||de.defaultNumberingSystem,d=r||de.defaultOutputCalendar,f=ra(s)||de.defaultWeekSettings;return new ae(o,c,d,f,i)}static resetCache(){An=null,Xs.clear(),Ks.clear(),Qs.clear(),ea.clear(),ta.clear()}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:s}={}){return ae.create(e,n,r,s)}constructor(e,n,r,s,a){const[i,o,c]=pp(e);this.locale=i,this.numberingSystem=n||o||null,this.outputCalendar=r||c||null,this.weekSettings=s,this.intl=gp(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=xp(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ae.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,ra(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return fr(this,e,Fc,()=>{const r=this.intl==="ja"||this.intl.startsWith("ja-");n&=!r;const s=n?{month:e,day:"numeric"}:{month:e},a=n?"format":"standalone";if(!this.monthsCache[a][e]){const i=r?o=>this.dtFormatter(o,s).format():o=>this.extract(o,s,"month");this.monthsCache[a][e]=yp(i)}return this.monthsCache[a][e]})}weekdays(e,n=!1){return fr(this,e,Vc,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=n?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=vp(a=>this.extract(a,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return fr(this,void 0,()=>$c,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[M.utc(2016,11,13,9),M.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return fr(this,e,Wc,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[M.utc(-40,1,1),M.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const s=this.dtFormatter(e,n),a=s.formatToParts(),i=a.find(o=>o.type.toLowerCase()===r);return i?i.value:null}numberFormatter(e={}){return new wp(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new bp(e,this.intl,n)}relFormatter(e={}){return new _p(this.intl,this.isEnglish(),e)}listFormatter(e={}){return up(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||kc(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Rc()?mp(this.locale):Sc}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Rs=null;class Ee extends Yn{static get utcInstance(){return Rs===null&&(Rs=new Ee(0)),Rs}static instance(e){return e===0?Ee.utcInstance:new Ee(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ee(rs(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ln(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ln(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Ln(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class kp extends Yn{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Nt(t,e){if(Z(t)||t===null)return e;if(t instanceof Yn)return t;if(Op(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?es.instance:n==="utc"||n==="gmt"?Ee.utcInstance:Ee.parseSpecifier(n)||ut.create(t)}else return Ct(t)?Ee.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new kp(t)}const Ma={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Bi={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Sp=Ma.hanidec.replace(/[\[|\]]/g,"").split("");function Np(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(Ma.hanidec)!==-1)e+=Sp.indexOf(t[n]);else for(const s in Bi){const[a,i]=Bi[s];r>=a&&r<=i&&(e+=r-a)}}return parseInt(e,10)}else return e}const na=new Map;function Cp(){na.clear()}function Ye({numberingSystem:t},e=""){const n=t||"latn";let r=na.get(n);r===void 0&&(r=new Map,na.set(n,r));let s=r.get(e);return s===void 0&&(s=new RegExp(`${Ma[n]}${e}`),r.set(e,s)),s}let Ui=()=>Date.now(),Hi="system",qi=null,Yi=null,Gi=null,Xi=60,Ji,Ki=null;class de{static get now(){return Ui}static set now(e){Ui=e}static set defaultZone(e){Hi=e}static get defaultZone(){return Nt(Hi,es.instance)}static get defaultLocale(){return qi}static set defaultLocale(e){qi=e}static get defaultNumberingSystem(){return Yi}static set defaultNumberingSystem(e){Yi=e}static get defaultOutputCalendar(){return Gi}static set defaultOutputCalendar(e){Gi=e}static get defaultWeekSettings(){return Ki}static set defaultWeekSettings(e){Ki=ra(e)}static get twoDigitCutoffYear(){return Xi}static set twoDigitCutoffYear(e){Xi=e%100}static get throwOnInvalid(){return Ji}static set throwOnInvalid(e){Ji=e}static resetCaches(){ae.resetCache(),ut.resetCache(),M.resetCache(),Cp()}}class Qe{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Nc=[0,31,59,90,120,151,181,212,243,273,304,334],Cc=[0,31,60,91,121,152,182,213,244,274,305,335];function Ze(t,e){return new Qe("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ia(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function Tc(t,e,n){return n+(Gn(t)?Cc:Nc)[e-1]}function Ec(t,e){const n=Gn(t)?Cc:Nc,r=n.findIndex(a=>a<e),s=e-n[r];return{month:r+1,day:s}}function Fa(t,e){return(t-e+7)%7+1}function Ar(t,e=4,n=1){const{year:r,month:s,day:a}=t,i=Tc(r,s,a),o=Fa(Ia(r,s,a),n);let c=Math.floor((i-o+14-e)/7),d;return c<1?(d=r-1,c=$n(d,e,n)):c>$n(r,e,n)?(d=r+1,c=1):d=r,{weekYear:d,weekNumber:c,weekday:o,...ss(t)}}function Qi(t,e=4,n=1){const{weekYear:r,weekNumber:s,weekday:a}=t,i=Fa(Ia(r,1,e),n),o=hn(r);let c=s*7+a-i-7+e,d;c<1?(d=r-1,c+=hn(d)):c>o?(d=r+1,c-=hn(r)):d=r;const{month:f,day:u}=Ec(d,c);return{year:d,month:f,day:u,...ss(t)}}function As(t){const{year:e,month:n,day:r}=t,s=Tc(e,n,r);return{year:e,ordinal:s,...ss(t)}}function eo(t){const{year:e,ordinal:n}=t,{month:r,day:s}=Ec(e,n);return{year:e,month:r,day:s,...ss(t)}}function to(t,e){if(!Z(t.localWeekday)||!Z(t.localWeekNumber)||!Z(t.localWeekYear)){if(!Z(t.weekday)||!Z(t.weekNumber)||!Z(t.weekYear))throw new un("Cannot mix locale-based week fields with ISO-based week fields");return Z(t.localWeekday)||(t.weekday=t.localWeekday),Z(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Z(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Tp(t,e=4,n=1){const r=ts(t.weekYear),s=Be(t.weekNumber,1,$n(t.weekYear,e,n)),a=Be(t.weekday,1,7);return r?s?a?!1:Ze("weekday",t.weekday):Ze("week",t.weekNumber):Ze("weekYear",t.weekYear)}function Ep(t){const e=ts(t.year),n=Be(t.ordinal,1,hn(t.year));return e?n?!1:Ze("ordinal",t.ordinal):Ze("year",t.year)}function Oc(t){const e=ts(t.year),n=Be(t.month,1,12),r=Be(t.day,1,Mr(t.year,t.month));return e?n?r?!1:Ze("day",t.day):Ze("month",t.month):Ze("year",t.year)}function jc(t){const{hour:e,minute:n,second:r,millisecond:s}=t,a=Be(e,0,23)||e===24&&n===0&&r===0&&s===0,i=Be(n,0,59),o=Be(r,0,59),c=Be(s,0,999);return a?i?o?c?!1:Ze("millisecond",s):Ze("second",r):Ze("minute",n):Ze("hour",e)}function Z(t){return typeof t>"u"}function Ct(t){return typeof t=="number"}function ts(t){return typeof t=="number"&&t%1===0}function Op(t){return typeof t=="string"}function jp(t){return Object.prototype.toString.call(t)==="[object Date]"}function Dc(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Rc(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Dp(t){return Array.isArray(t)?t:[t]}function no(t,e,n){if(t.length!==0)return t.reduce((r,s)=>{const a=[e(s),s];return r&&n(r[0],a[0])===r[0]?r:a},null)[1]}function Rp(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function vn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ra(t){if(t==null)return null;if(typeof t!="object")throw new Se("Week settings must be an object");if(!Be(t.firstDay,1,7)||!Be(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Be(e,1,7)))throw new Se("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Be(t,e,n){return ts(t)&&t>=e&&t<=n}function Ap(t,e){return t-e*Math.floor(t/e)}function ge(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function kt(t){if(!(Z(t)||t===null||t===""))return parseInt(t,10)}function Lt(t){if(!(Z(t)||t===null||t===""))return parseFloat(t)}function Pa(t){if(!(Z(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function La(t,e,n="round"){const r=10**e;switch(n){case"expand":return t>0?Math.ceil(t*r)/r:Math.floor(t*r)/r;case"trunc":return Math.trunc(t*r)/r;case"round":return Math.round(t*r)/r;case"floor":return Math.floor(t*r)/r;case"ceil":return Math.ceil(t*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Gn(t){return t%4===0&&(t%100!==0||t%400===0)}function hn(t){return Gn(t)?366:365}function Mr(t,e){const n=Ap(e-1,12)+1,r=t+(e-n)/12;return n===2?Gn(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ns(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function ro(t,e,n){return-Fa(Ia(t,1,e),n)+e-1}function $n(t,e=4,n=1){const r=ro(t,e,n),s=ro(t+1,e,n);return(hn(t)-r+s)/7}function sa(t){return t>99?t:t>de.twoDigitCutoffYear?1900+t:2e3+t}function Ac(t,e,n,r=null){const s=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const i={timeZoneName:e,...a},o=new Intl.DateTimeFormat(n,i).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return o?o.value:null}function rs(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,s=n<0||Object.is(n,-0)?-r:r;return n*60+s}function Mc(t){const e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new Se(`Invalid unit value ${t}`);return e}function Ir(t,e){const n={};for(const r in t)if(vn(t,r)){const s=t[r];if(s==null)continue;n[e(r)]=Mc(s)}return n}function Ln(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${ge(n,2)}:${ge(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${ge(n,2)}${ge(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ss(t){return Rp(t,["hour","minute","second","millisecond"])}const Mp=["January","February","March","April","May","June","July","August","September","October","November","December"],Ic=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ip=["J","F","M","A","M","J","J","A","S","O","N","D"];function Fc(t){switch(t){case"narrow":return[...Ip];case"short":return[...Ic];case"long":return[...Mp];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Pc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Fp=["M","T","W","T","F","S","S"];function Vc(t){switch(t){case"narrow":return[...Fp];case"short":return[...Lc];case"long":return[...Pc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const $c=["AM","PM"],Pp=["Before Christ","Anno Domini"],Lp=["BC","AD"],Vp=["B","A"];function Wc(t){switch(t){case"narrow":return[...Vp];case"short":return[...Lp];case"long":return[...Pp];default:return null}}function $p(t){return $c[t.hour<12?0:1]}function Wp(t,e){return Vc(e)[t.weekday-1]}function zp(t,e){return Fc(e)[t.month-1]}function Zp(t,e){return Wc(e)[t.year<0?0:1]}function Bp(t,e,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const u=t==="days";switch(e){case 1:return u?"tomorrow":`next ${s[t][0]}`;case-1:return u?"yesterday":`last ${s[t][0]}`;case 0:return u?"today":`this ${s[t][0]}`}}const i=Object.is(e,-0)||e<0,o=Math.abs(e),c=o===1,d=s[t],f=r?c?d[1]:d[2]||d[1]:c?s[t][0]:t;return i?`${o} ${f} ago`:`in ${o} ${f}`}function so(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const Up={D:Rr,DD:sc,DDD:ac,DDDD:ic,t:oc,tt:lc,ttt:cc,tttt:uc,T:dc,TT:fc,TTT:hc,TTTT:mc,f:pc,ff:yc,fff:xc,ffff:bc,F:gc,FF:vc,FFF:wc,FFFF:_c};class Ne{static create(e,n={}){return new Ne(e,n)}static parseFormat(e){let n=null,r="",s=!1;const a=[];for(let i=0;i<e.length;i++){const o=e.charAt(i);o==="'"?((r.length>0||s)&&a.push({literal:s||/^\s+$/.test(r),val:r===""?"'":r}),n=null,r="",s=!s):s||o===n?r+=o:(r.length>0&&a.push({literal:/^\s+$/.test(r),val:r}),r=o,n=o)}return r.length>0&&a.push({literal:s||/^\s+$/.test(r),val:r}),a}static macroTokenToFormatOpts(e){return Up[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0,r=void 0){if(this.opts.forceSimple)return ge(e,n);const s={...this.opts};return n>0&&(s.padTo=n),r&&(s.signDisplay=r),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(p,y)=>this.loc.extract(e,p,y),i=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",o=()=>r?$p(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,y)=>r?zp(e,p):a(y?{month:p}:{month:p,day:"numeric"},"month"),d=(p,y)=>r?Wp(e,p):a(y?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),f=p=>{const y=Ne.macroTokenToFormatOpts(p);return y?this.formatWithSystemDefault(e,y):p},u=p=>r?Zp(e,p):a({era:p},"era"),m=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return s?a({day:"numeric"},"day"):this.num(e.day);case"dd":return s?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return s?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?a({month:"numeric"},"month"):this.num(e.month);case"MM":return s?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?a({year:"numeric"},"year"):this.num(e.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(p)}};return so(Ne.parseFormat(n),m)}formatDurationFromString(e,n){const r=this.opts.signMode==="negativeLargestOnly"?-1:1,s=f=>{switch(f[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},a=(f,u)=>m=>{const p=s(m);if(p){const y=u.isNegativeDuration&&p!==u.largestUnit?r:1;let g;return this.opts.signMode==="negativeLargestOnly"&&p!==u.largestUnit?g="never":this.opts.signMode==="all"?g="always":g="auto",this.num(f.get(p)*y,m.length,g)}else return m},i=Ne.parseFormat(n),o=i.reduce((f,{literal:u,val:m})=>u?f:f.concat(m),[]),c=e.shiftTo(...o.map(s).filter(f=>f)),d={isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]};return so(i,a(c,d))}}const zc=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Tn(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function En(...t){return e=>t.reduce(([n,r,s],a)=>{const[i,o,c]=a(e,s);return[{...n,...i},o||r,c]},[{},null,1]).slice(0,2)}function On(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const s=n.exec(t);if(s)return r(s)}return[null,null]}function Zc(...t){return(e,n)=>{const r={};let s;for(s=0;s<t.length;s++)r[t[s]]=kt(e[n+s]);return[r,null,n+s]}}const Bc=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Hp=`(?:${Bc.source}?(?:\\[(${zc.source})\\])?)?`,Va=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Uc=RegExp(`${Va.source}${Hp}`),$a=RegExp(`(?:[Tt]${Uc.source})?`),qp=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Yp=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Gp=/(\d{4})-?(\d{3})/,Xp=Zc("weekYear","weekNumber","weekDay"),Jp=Zc("year","ordinal"),Kp=/(\d{4})-(\d\d)-(\d\d)/,Hc=RegExp(`${Va.source} ?(?:${Bc.source}|(${zc.source}))?`),Qp=RegExp(`(?: ${Hc.source})?`);function mn(t,e,n){const r=t[e];return Z(r)?n:kt(r)}function eg(t,e){return[{year:mn(t,e),month:mn(t,e+1,1),day:mn(t,e+2,1)},null,e+3]}function jn(t,e){return[{hours:mn(t,e,0),minutes:mn(t,e+1,0),seconds:mn(t,e+2,0),milliseconds:Pa(t[e+3])},null,e+4]}function Xn(t,e){const n=!t[e]&&!t[e+1],r=rs(t[e+1],t[e+2]),s=n?null:Ee.instance(r);return[{},s,e+3]}function Jn(t,e){const n=t[e]?ut.create(t[e]):null;return[{},n,e+1]}const tg=RegExp(`^T?${Va.source}$`),ng=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function rg(t){const[e,n,r,s,a,i,o,c,d]=t,f=e[0]==="-",u=c&&c[0]==="-",m=(p,y=!1)=>p!==void 0&&(y||p&&f)?-p:p;return[{years:m(Lt(n)),months:m(Lt(r)),weeks:m(Lt(s)),days:m(Lt(a)),hours:m(Lt(i)),minutes:m(Lt(o)),seconds:m(Lt(c),c==="-0"),milliseconds:m(Pa(d),u)}]}const sg={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Wa(t,e,n,r,s,a,i){const o={year:e.length===2?sa(kt(e)):kt(e),month:Ic.indexOf(n)+1,day:kt(r),hour:kt(s),minute:kt(a)};return i&&(o.second=kt(i)),t&&(o.weekday=t.length>3?Pc.indexOf(t)+1:Lc.indexOf(t)+1),o}const ag=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ig(t){const[,e,n,r,s,a,i,o,c,d,f,u]=t,m=Wa(e,s,r,n,a,i,o);let p;return c?p=sg[c]:d?p=0:p=rs(f,u),[m,new Ee(p)]}function og(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const lg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,cg=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ug=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ao(t){const[,e,n,r,s,a,i,o]=t;return[Wa(e,s,r,n,a,i,o),Ee.utcInstance]}function dg(t){const[,e,n,r,s,a,i,o]=t;return[Wa(e,o,n,r,s,a,i),Ee.utcInstance]}const fg=Tn(qp,$a),hg=Tn(Yp,$a),mg=Tn(Gp,$a),pg=Tn(Uc),qc=En(eg,jn,Xn,Jn),gg=En(Xp,jn,Xn,Jn),yg=En(Jp,jn,Xn,Jn),vg=En(jn,Xn,Jn);function xg(t){return On(t,[fg,qc],[hg,gg],[mg,yg],[pg,vg])}function wg(t){return On(og(t),[ag,ig])}function bg(t){return On(t,[lg,ao],[cg,ao],[ug,dg])}function _g(t){return On(t,[ng,rg])}const kg=En(jn);function Sg(t){return On(t,[tg,kg])}const Ng=Tn(Kp,Qp),Cg=Tn(Hc),Tg=En(jn,Xn,Jn);function Eg(t){return On(t,[Ng,qc],[Cg,Tg])}const io="Invalid Duration",Yc={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Og={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...Yc},ze=146097/400,sn=146097/4800,jg={years:{quarters:4,months:12,weeks:ze/7,days:ze,hours:ze*24,minutes:ze*24*60,seconds:ze*24*60*60,milliseconds:ze*24*60*60*1e3},quarters:{months:3,weeks:ze/28,days:ze/4,hours:ze*24/4,minutes:ze*24*60/4,seconds:ze*24*60*60/4,milliseconds:ze*24*60*60*1e3/4},months:{weeks:sn/7,days:sn,hours:sn*24,minutes:sn*24*60,seconds:sn*24*60*60,milliseconds:sn*24*60*60*1e3},...Yc},$t=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Dg=$t.slice(0).reverse();function ht(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new te(r)}function Gc(t,e){let n=e.milliseconds??0;for(const r of Dg.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function oo(t,e){const n=Gc(t,e)<0?-1:1;$t.reduceRight((r,s)=>{if(Z(e[s]))return r;if(r){const a=e[r]*n,i=t[s][r],o=Math.floor(a/i);e[s]+=o*n,e[r]-=o*i*n}return s},null),$t.reduce((r,s)=>{if(Z(e[s]))return r;if(r){const a=e[r]%1;e[r]-=a,e[s]+=a*t[r][s]}return s},null)}function lo(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class te{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?jg:Og;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||ae.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return te.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Se(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new te({values:Ir(e,te.normalizeUnit),loc:ae.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Ct(e))return te.fromMillis(e);if(te.isDuration(e))return e;if(typeof e=="object")return te.fromObject(e);throw new Se(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=_g(e);return r?te.fromObject(r,n):te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=Sg(e);return r?te.fromObject(r,n):te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Se("need to specify a reason the Duration is invalid");const r=e instanceof Qe?e:new Qe(e,n);if(de.throwOnInvalid)throw new rp(r);return new te({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new rc(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ne.create(this.loc,r).formatDurationFromString(this,e):io}toHuman(e={}){if(!this.isValid)return io;const n=e.showZeros!==!1,r=$t.map(s=>{const a=this.values[s];return Z(a)||a===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(a)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=La(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},M.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Gc(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e),r={};for(const s of $t)(vn(n.values,s)||vn(this.values,s))&&(r[s]=n.get(s)+this.get(s));return ht(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Mc(e(this.values[r],r));return ht(this,{values:n},!0)}get(e){return this[te.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Ir(e,te.normalizeUnit)};return ht(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:s}={}){const i={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:s,conversionAccuracy:r};return ht(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return oo(this.matrix,e),ht(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=lo(this.normalize().shiftToAll().toObject());return ht(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(i=>te.normalizeUnit(i));const n={},r={},s=this.toObject();let a;for(const i of $t)if(e.indexOf(i)>=0){a=i;let o=0;for(const d in r)o+=this.matrix[d][i]*r[d],r[d]=0;Ct(s[i])&&(o+=s[i]);const c=Math.trunc(o);n[i]=c,r[i]=(o*1e3-c*1e3)/1e3}else Ct(s[i])&&(r[i]=s[i]);for(const i in r)r[i]!==0&&(n[a]+=i===a?r[i]:r[i]/this.matrix[a][i]);return oo(this.matrix,n),ht(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return ht(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=lo(this.values);return ht(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of $t)if(!n(this.values[r],e.values[r]))return!1;return!0}}const an="Invalid Interval";function Rg(t,e){return!t||!t.isValid?me.invalid("missing or invalid start"):!e||!e.isValid?me.invalid("missing or invalid end"):e<t?me.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class me{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Se("need to specify a reason the Interval is invalid");const r=e instanceof Qe?e:new Qe(e,n);if(de.throwOnInvalid)throw new np(r);return new me({invalid:r})}static fromDateTimes(e,n){const r=Rn(e),s=Rn(n),a=Rg(r,s);return a??new me({start:r,end:s})}static after(e,n){const r=te.fromDurationLike(n),s=Rn(e);return me.fromDateTimes(s,s.plus(r))}static before(e,n){const r=te.fromDurationLike(n),s=Rn(e);return me.fromDateTimes(s.minus(r),s)}static fromISO(e,n){const[r,s]=(e||"").split("/",2);if(r&&s){let a,i;try{a=M.fromISO(r,n),i=a.isValid}catch{i=!1}let o,c;try{o=M.fromISO(s,n),c=o.isValid}catch{c=!1}if(i&&c)return me.fromDateTimes(a,o);if(i){const d=te.fromISO(s,n);if(d.isValid)return me.after(a,d)}else if(c){const d=te.fromISO(r,n);if(d.isValid)return me.before(o,d)}}return me.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let s;return n?.useLocaleWeeks?s=this.end.reconfigure({locale:r.locale}):s=this.end,s=s.startOf(e,n),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?me.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Rn).filter(i=>this.contains(i)).sort((i,o)=>i.toMillis()-o.toMillis()),r=[];let{s}=this,a=0;for(;s<this.e;){const i=n[a]||this.e,o=+i>+this.e?this.e:i;r.push(me.fromDateTimes(s,o)),s=o,a+=1}return r}splitBy(e){const n=te.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,s=1,a;const i=[];for(;r<this.e;){const o=this.start.plus(n.mapUnits(c=>c*s));a=+o>+this.e?this.e:o,i.push(me.fromDateTimes(r,a)),r=a,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:me.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return me.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((s,a)=>s.s-a.s).reduce(([s,a],i)=>a?a.overlaps(i)||a.abutsStart(i)?[s,a.union(i)]:[s.concat([a]),i]:[s,i],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const s=[],a=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),i=Array.prototype.concat(...a),o=i.sort((c,d)=>c.time-d.time);for(const c of o)r+=c.type==="s"?1:-1,r===1?n=c.time:(n&&+n!=+c.time&&s.push(me.fromDateTimes(n,c.time)),n=null);return me.merge(s)}difference(...e){return me.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:an}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Rr,n={}){return this.isValid?Ne.create(this.s.loc.clone(n),e).formatInterval(this):an}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:an}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:an}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:an}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:an}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):te.invalid(this.invalidReason)}mapEndpoints(e){return me.fromDateTimes(e(this.s),e(this.e))}}class hr{static hasDST(e=de.defaultZone){const n=M.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return ut.isValidZone(e)}static normalizeZone(e){return Nt(e,de.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||ae.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||ae.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||ae.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||ae.create(n,r,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||ae.create(n,r,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null}={}){return(s||ae.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null}={}){return(s||ae.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ae.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return ae.create(n,null,"gregory").eras(e)}static features(){return{relative:Dc(),localeWeek:Rc()}}}function co(t,e){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(te.fromMillis(r).as("days"))}function Ag(t,e,n){const r=[["years",(c,d)=>d.year-c.year],["quarters",(c,d)=>d.quarter-c.quarter+(d.year-c.year)*4],["months",(c,d)=>d.month-c.month+(d.year-c.year)*12],["weeks",(c,d)=>{const f=co(c,d);return(f-f%7)/7}],["days",co]],s={},a=t;let i,o;for(const[c,d]of r)n.indexOf(c)>=0&&(i=c,s[c]=d(t,e),o=a.plus(s),o>e?(s[c]--,t=a.plus(s),t>e&&(o=t,s[c]--,t=a.plus(s))):t=o);return[t,s,o,i]}function Mg(t,e,n,r){let[s,a,i,o]=Ag(t,e,n);const c=e-s,d=n.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(i<e&&(i=s.plus({[o]:1})),i!==s&&(a[o]=(a[o]||0)+c/(i-s)));const f=te.fromObject(a,r);return d.length>0?te.fromMillis(c,r).shiftTo(...d).plus(f):f}const Ig="missing Intl.DateTimeFormat.formatToParts support";function se(t,e=n=>n){return{regex:t,deser:([n])=>e(Np(n))}}const Fg=" ",Xc=`[ ${Fg}]`,Jc=new RegExp(Xc,"g");function Pg(t){return t.replace(/\./g,"\\.?").replace(Jc,Xc)}function uo(t){return t.replace(/\./g,"").replace(Jc," ").toLowerCase()}function Ge(t,e){return t===null?null:{regex:RegExp(t.map(Pg).join("|")),deser:([n])=>t.findIndex(r=>uo(n)===uo(r))+e}}function fo(t,e){return{regex:t,deser:([,n,r])=>rs(n,r),groups:e}}function mr(t){return{regex:t,deser:([e])=>e}}function Lg(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Vg(t,e){const n=Ye(e),r=Ye(e,"{2}"),s=Ye(e,"{3}"),a=Ye(e,"{4}"),i=Ye(e,"{6}"),o=Ye(e,"{1,2}"),c=Ye(e,"{1,3}"),d=Ye(e,"{1,6}"),f=Ye(e,"{1,9}"),u=Ye(e,"{2,4}"),m=Ye(e,"{4,6}"),p=w=>({regex:RegExp(Lg(w.val)),deser:([v])=>v,literal:!0}),g=(w=>{if(t.literal)return p(w);switch(w.val){case"G":return Ge(e.eras("short"),0);case"GG":return Ge(e.eras("long"),0);case"y":return se(d);case"yy":return se(u,sa);case"yyyy":return se(a);case"yyyyy":return se(m);case"yyyyyy":return se(i);case"M":return se(o);case"MM":return se(r);case"MMM":return Ge(e.months("short",!0),1);case"MMMM":return Ge(e.months("long",!0),1);case"L":return se(o);case"LL":return se(r);case"LLL":return Ge(e.months("short",!1),1);case"LLLL":return Ge(e.months("long",!1),1);case"d":return se(o);case"dd":return se(r);case"o":return se(c);case"ooo":return se(s);case"HH":return se(r);case"H":return se(o);case"hh":return se(r);case"h":return se(o);case"mm":return se(r);case"m":return se(o);case"q":return se(o);case"qq":return se(r);case"s":return se(o);case"ss":return se(r);case"S":return se(c);case"SSS":return se(s);case"u":return mr(f);case"uu":return mr(o);case"uuu":return se(n);case"a":return Ge(e.meridiems(),0);case"kkkk":return se(a);case"kk":return se(u,sa);case"W":return se(o);case"WW":return se(r);case"E":case"c":return se(n);case"EEE":return Ge(e.weekdays("short",!1),1);case"EEEE":return Ge(e.weekdays("long",!1),1);case"ccc":return Ge(e.weekdays("short",!0),1);case"cccc":return Ge(e.weekdays("long",!0),1);case"Z":case"ZZ":return fo(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return fo(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return mr(/[a-z_+-/]{1,256}?/i);case" ":return mr(/[^\S\n\r]/);default:return p(w)}})(t)||{invalidReason:Ig};return g.token=t,g}const $g={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Wg(t,e,n){const{type:r,value:s}=t;if(r==="literal"){const c=/^\s+$/.test(s);return{literal:!c,val:c?" ":s}}const a=e[r];let i=r;r==="hour"&&(e.hour12!=null?i=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?i="hour12":i="hour24":i=n.hour12?"hour12":"hour24");let o=$g[i];if(typeof o=="object"&&(o=o[a]),o)return{literal:!1,val:o}}function zg(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function Zg(t,e,n){const r=t.match(e);if(r){const s={};let a=1;for(const i in n)if(vn(n,i)){const o=n[i],c=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(a,a+c))),a+=c}return[r,s]}else return[r,{}]}function Bg(t){const e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Z(t.z)||(n=ut.create(t.z)),Z(t.Z)||(n||(n=new Ee(t.Z)),r=t.Z),Z(t.q)||(t.M=(t.q-1)*3+1),Z(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Z(t.u)||(t.S=Pa(t.u)),[Object.keys(t).reduce((a,i)=>{const o=e(i);return o&&(a[o]=t[i]),a},{}),n,r]}let Ms=null;function Ug(){return Ms||(Ms=M.fromMillis(1555555555555)),Ms}function Hg(t,e){if(t.literal)return t;const n=Ne.macroTokenToFormatOpts(t.val),r=tu(n,e);return r==null||r.includes(void 0)?t:r}function Kc(t,e){return Array.prototype.concat(...t.map(n=>Hg(n,e)))}class Qc{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Kc(Ne.parseFormat(n),e),this.units=this.tokens.map(r=>Vg(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=zg(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[n,r]=Zg(e,this.regex,this.handlers),[s,a,i]=r?Bg(r):[null,null,void 0];if(vn(r,"a")&&vn(r,"H"))throw new un("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:s,zone:a,specificOffset:i}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function eu(t,e,n){return new Qc(t,n).explainFromTokens(e)}function qg(t,e,n){const{result:r,zone:s,specificOffset:a,invalidReason:i}=eu(t,e,n);return[r,s,a,i]}function tu(t,e){if(!t)return null;const r=Ne.create(e,t).dtFormatter(Ug()),s=r.formatToParts(),a=r.resolvedOptions();return s.map(i=>Wg(i,t,a))}const Is="Invalid DateTime",ho=864e13;function Mn(t){return new Qe("unsupported zone",`the zone "${t.name}" is not supported`)}function Fs(t){return t.weekData===null&&(t.weekData=Ar(t.c)),t.weekData}function Ps(t){return t.localWeekData===null&&(t.localWeekData=Ar(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Vt(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new M({...n,...e,old:n})}function nu(t,e,n){let r=t-e*60*1e3;const s=n.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const a=n.offset(r);return s===a?[r,s]:[t-Math.min(s,a)*60*1e3,Math.max(s,a)]}function pr(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function kr(t,e,n){return nu(ns(t),e,n)}function mo(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:r,month:s,day:Math.min(t.c.day,Mr(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},i=te.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=ns(a);let[c,d]=nu(o,n,t.zone);return i!==0&&(c+=i,d=t.zone.offset(c)),{ts:c,o:d}}function on(t,e,n,r,s,a){const{setZone:i,zone:o}=n;if(t&&Object.keys(t).length!==0||e){const c=e||o,d=M.fromObject(t,{...n,zone:c,specificOffset:a});return i?d:d.setZone(o)}else return M.invalid(new Qe("unparsable",`the input "${s}" can't be parsed as ${r}`))}function gr(t,e,n=!0){return t.isValid?Ne.create(ae.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Ls(t,e,n){const r=t.c.year>9999||t.c.year<0;let s="";if(r&&t.c.year>=0&&(s+="+"),s+=ge(t.c.year,r?6:4),n==="year")return s;if(e){if(s+="-",s+=ge(t.c.month),n==="month")return s;s+="-"}else if(s+=ge(t.c.month),n==="month")return s;return s+=ge(t.c.day),s}function po(t,e,n,r,s,a,i){let o=!n||t.c.millisecond!==0||t.c.second!==0,c="";switch(i){case"day":case"month":case"year":break;default:if(c+=ge(t.c.hour),i==="hour")break;if(e){if(c+=":",c+=ge(t.c.minute),i==="minute")break;o&&(c+=":",c+=ge(t.c.second))}else{if(c+=ge(t.c.minute),i==="minute")break;o&&(c+=ge(t.c.second))}if(i==="second")break;o&&(!r||t.c.millisecond!==0)&&(c+=".",c+=ge(t.c.millisecond,3))}return s&&(t.isOffsetFixed&&t.offset===0&&!a?c+="Z":t.o<0?(c+="-",c+=ge(Math.trunc(-t.o/60)),c+=":",c+=ge(Math.trunc(-t.o%60))):(c+="+",c+=ge(Math.trunc(t.o/60)),c+=":",c+=ge(Math.trunc(t.o%60)))),a&&(c+="["+t.zone.ianaName+"]"),c}const ru={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Yg={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Gg={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Sr=["year","month","day","hour","minute","second","millisecond"],Xg=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Jg=["year","ordinal","hour","minute","second","millisecond"];function Nr(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new rc(t);return e}function go(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Nr(t)}}function Kg(t){if(In===void 0&&(In=de.now()),t.type!=="iana")return t.offset(In);const e=t.name;let n=aa.get(e);return n===void 0&&(n=t.offset(In),aa.set(e,n)),n}function yo(t,e){const n=Nt(e.zone,de.defaultZone);if(!n.isValid)return M.invalid(Mn(n));const r=ae.fromObject(e);let s,a;if(Z(t.year))s=de.now();else{for(const c of Sr)Z(t[c])&&(t[c]=ru[c]);const i=Oc(t)||jc(t);if(i)return M.invalid(i);const o=Kg(n);[s,a]=kr(t,o,n)}return new M({ts:s,zone:n,loc:r,o:a})}function vo(t,e,n){const r=Z(n.round)?!0:n.round,s=Z(n.rounding)?"trunc":n.rounding,a=(o,c)=>(o=La(o,r||n.calendary?0:2,n.calendary?"round":s),e.loc.clone(n).relFormatter(n).format(o,c)),i=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return a(i(n.unit),n.unit);for(const o of n.units){const c=i(o);if(Math.abs(c)>=1)return a(c,o)}return a(t>e?-0:0,n.units[n.units.length-1])}function xo(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let In;const aa=new Map;class M{constructor(e){const n=e.zone||de.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new Qe("invalid input"):null)||(n.isValid?null:Mn(n));this.ts=Z(e.ts)?de.now():e.ts;let s=null,a=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[s,a]=[e.old.c,e.old.o];else{const o=Ct(e.o)&&!e.old?e.o:n.offset(this.ts);s=pr(this.ts,o),r=Number.isNaN(s.year)?new Qe("invalid input"):null,s=r?null:s,a=r?null:o}this._zone=n,this.loc=e.loc||ae.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new M({})}static local(){const[e,n]=xo(arguments),[r,s,a,i,o,c,d]=n;return yo({year:r,month:s,day:a,hour:i,minute:o,second:c,millisecond:d},e)}static utc(){const[e,n]=xo(arguments),[r,s,a,i,o,c,d]=n;return e.zone=Ee.utcInstance,yo({year:r,month:s,day:a,hour:i,minute:o,second:c,millisecond:d},e)}static fromJSDate(e,n={}){const r=jp(e)?e.valueOf():NaN;if(Number.isNaN(r))return M.invalid("invalid input");const s=Nt(n.zone,de.defaultZone);return s.isValid?new M({ts:r,zone:s,loc:ae.fromObject(n)}):M.invalid(Mn(s))}static fromMillis(e,n={}){if(Ct(e))return e<-ho||e>ho?M.invalid("Timestamp out of range"):new M({ts:e,zone:Nt(n.zone,de.defaultZone),loc:ae.fromObject(n)});throw new Se(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Ct(e))return new M({ts:e*1e3,zone:Nt(n.zone,de.defaultZone),loc:ae.fromObject(n)});throw new Se("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=Nt(n.zone,de.defaultZone);if(!r.isValid)return M.invalid(Mn(r));const s=ae.fromObject(n),a=Ir(e,go),{minDaysInFirstWeek:i,startOfWeek:o}=to(a,s),c=de.now(),d=Z(n.specificOffset)?r.offset(c):n.specificOffset,f=!Z(a.ordinal),u=!Z(a.year),m=!Z(a.month)||!Z(a.day),p=u||m,y=a.weekYear||a.weekNumber;if((p||f)&&y)throw new un("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(m&&f)throw new un("Can't mix ordinal dates with month/day");const g=y||a.weekday&&!p;let w,v,k=pr(c,d);g?(w=Xg,v=Yg,k=Ar(k,i,o)):f?(w=Jg,v=Gg,k=As(k)):(w=Sr,v=ru);let b=!1;for(const L of w){const z=a[L];Z(z)?b?a[L]=v[L]:a[L]=k[L]:b=!0}const S=g?Tp(a,i,o):f?Ep(a):Oc(a),_=S||jc(a);if(_)return M.invalid(_);const T=g?Qi(a,i,o):f?eo(a):a,[E,I]=kr(T,d,r),W=new M({ts:E,zone:r,o:I,loc:s});return a.weekday&&p&&e.weekday!==W.weekday?M.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${W.toISO()}`):W.isValid?W:M.invalid(W.invalid)}static fromISO(e,n={}){const[r,s]=xg(e);return on(r,s,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,s]=wg(e);return on(r,s,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,s]=bg(e);return on(r,s,n,"HTTP",n)}static fromFormat(e,n,r={}){if(Z(e)||Z(n))throw new Se("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=r,i=ae.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[o,c,d,f]=qg(i,e,n);return f?M.invalid(f):on(o,c,r,`format ${n}`,e,d)}static fromString(e,n,r={}){return M.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,s]=Eg(e);return on(r,s,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Se("need to specify a reason the DateTime is invalid");const r=e instanceof Qe?e:new Qe(e,n);if(de.throwOnInvalid)throw new tp(r);return new M({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=tu(e,ae.fromObject(n));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,n={}){return Kc(Ne.parseFormat(e),ae.fromObject(n)).map(s=>s.val).join("")}static resetCache(){In=void 0,aa.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Fs(this).weekYear:NaN}get weekNumber(){return this.isValid?Fs(this).weekNumber:NaN}get weekday(){return this.isValid?Fs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ps(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ps(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ps(this).weekYear:NaN}get ordinal(){return this.isValid?As(this.c).ordinal:NaN}get monthShort(){return this.isValid?hr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?hr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?hr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?hr.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=ns(this.c),s=this.zone.offset(r-e),a=this.zone.offset(r+e),i=this.zone.offset(r-s*n),o=this.zone.offset(r-a*n);if(i===o)return[this];const c=r-i*n,d=r-o*n,f=pr(c,i),u=pr(d,o);return f.hour===u.hour&&f.minute===u.minute&&f.second===u.second&&f.millisecond===u.millisecond?[Vt(this,{ts:c}),Vt(this,{ts:d})]:[this]}get isInLeapYear(){return Gn(this.year)}get daysInMonth(){return Mr(this.year,this.month)}get daysInYear(){return this.isValid?hn(this.year):NaN}get weeksInWeekYear(){return this.isValid?$n(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?$n(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:s}=Ne.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:s}}toUTC(e=0,n={}){return this.setZone(Ee.instance(e),n)}toLocal(){return this.setZone(de.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=Nt(e,de.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(n||r){const a=e.offset(this.ts),i=this.toObject();[s]=kr(i,a,e)}return Vt(this,{ts:s,zone:e})}else return M.invalid(Mn(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Vt(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Ir(e,go),{minDaysInFirstWeek:r,startOfWeek:s}=to(n,this.loc),a=!Z(n.weekYear)||!Z(n.weekNumber)||!Z(n.weekday),i=!Z(n.ordinal),o=!Z(n.year),c=!Z(n.month)||!Z(n.day),d=o||c,f=n.weekYear||n.weekNumber;if((d||i)&&f)throw new un("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&i)throw new un("Can't mix ordinal dates with month/day");let u;a?u=Qi({...Ar(this.c,r,s),...n},r,s):Z(n.ordinal)?(u={...this.toObject(),...n},Z(n.day)&&(u.day=Math.min(Mr(u.year,u.month),u.day))):u=eo({...As(this.c),...n});const[m,p]=kr(u,this.o,this.zone);return Vt(this,{ts:m,o:p})}plus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e);return Vt(this,mo(this,n))}minus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e).negate();return Vt(this,mo(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},s=te.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:i}=this;i<a&&(r.weekNumber=this.weekNumber-1),r.weekday=a}else r.weekday=1;if(s==="quarters"){const a=Math.ceil(this.month/3);r.month=(a-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?Ne.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Is}toLocaleString(e=Rr,n={}){return this.isValid?Ne.create(this.loc.clone(n),e).formatDateTime(this):Is}toLocaleParts(e={}){return this.isValid?Ne.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:a=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;i=Nr(i);const o=e==="extended";let c=Ls(this,o,i);return Sr.indexOf(i)>=3&&(c+="T"),c+=po(this,o,n,r,s,a,i),c}toISODate({format:e="extended",precision:n="day"}={}){return this.isValid?Ls(this,e==="extended",Nr(n)):null}toISOWeekDate(){return gr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:a=!1,format:i="extended",precision:o="milliseconds"}={}){return this.isValid?(o=Nr(o),(s&&Sr.indexOf(o)>=3?"T":"")+po(this,i==="extended",n,e,r,a,o)):null}toRFC2822(){return gr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return gr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ls(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(n||e)&&(r&&(s+=" "),n?s+="z":e&&(s+="ZZ")),gr(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Is}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return te.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},a=Dp(n).map(te.normalizeUnit),i=e.valueOf()>this.valueOf(),o=i?this:e,c=i?e:this,d=Mg(o,c,a,s);return i?d.negate():d}diffNow(e="milliseconds",n={}){return this.diff(M.now(),e,n)}until(e){return this.isValid?me.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const s=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,r)<=s&&s<=a.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||M.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(s=e.unit,a=void 0),vo(n,this.plus(r),{...e,numeric:"always",units:s,unit:a})}toRelativeCalendar(e={}){return this.isValid?vo(e.base||M.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(M.isDateTime))throw new Se("min requires all arguments be DateTimes");return no(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(M.isDateTime))throw new Se("max requires all arguments be DateTimes");return no(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:s=null,numberingSystem:a=null}=r,i=ae.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return eu(i,e,n)}static fromStringExplain(e,n,r={}){return M.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:s=null}=n,a=ae.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new Qc(a,e)}static fromFormatParser(e,n,r={}){if(Z(e)||Z(n))throw new Se("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:a=null}=r,i=ae.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});if(!i.equals(n.locale))throw new Se(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${n.locale}`);const{result:o,zone:c,specificOffset:d,invalidReason:f}=n.explainFromTokens(e);return f?M.invalid(f):on(o,c,r,`format ${n.format}`,e,d)}static get DATE_SHORT(){return Rr}static get DATE_MED(){return sc}static get DATE_MED_WITH_WEEKDAY(){return sp}static get DATE_FULL(){return ac}static get DATE_HUGE(){return ic}static get TIME_SIMPLE(){return oc}static get TIME_WITH_SECONDS(){return lc}static get TIME_WITH_SHORT_OFFSET(){return cc}static get TIME_WITH_LONG_OFFSET(){return uc}static get TIME_24_SIMPLE(){return dc}static get TIME_24_WITH_SECONDS(){return fc}static get TIME_24_WITH_SHORT_OFFSET(){return hc}static get TIME_24_WITH_LONG_OFFSET(){return mc}static get DATETIME_SHORT(){return pc}static get DATETIME_SHORT_WITH_SECONDS(){return gc}static get DATETIME_MED(){return yc}static get DATETIME_MED_WITH_SECONDS(){return vc}static get DATETIME_MED_WITH_WEEKDAY(){return ap}static get DATETIME_FULL(){return xc}static get DATETIME_FULL_WITH_SECONDS(){return wc}static get DATETIME_HUGE(){return bc}static get DATETIME_HUGE_WITH_SECONDS(){return _c}}function Rn(t){if(M.isDateTime(t))return t;if(t&&t.valueOf&&Ct(t.valueOf()))return M.fromJSDate(t);if(t&&typeof t=="object")return M.fromObject(t);throw new Se(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Fr="Europe/Madrid";de.defaultZone=Fr;function Pr(t){return ut.isValidZone(t)}function Kn(t){if(t&&Pr(t))return t;const e=de.defaultZone.name||Fr;return Pr(e)?e:Fr}function Qg(t){return Pr(t)?(de.defaultZone=t,!0):!1}function ey(t,e){const n=Kn(e);return typeof t=="string"?M.fromISO(t,{zone:n}):M.fromJSDate(t,{zone:n})}function su(t,e){const n=Kn(e),r=M.isDateTime(t)?t.setZone(n):M.fromJSDate(t,{zone:n});return r.isValid?r.toISODate():null}function ty(t,e){const n=Kn(e),r=M.isDateTime(t)?t.setZone(n):M.fromJSDate(t,{zone:n});return r.isValid?r.toISO():null}const ny=["Do","Lu","Ma","Mi","Ju","Vi","Sa"],ry=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];function sy(t,e,n){return M.fromObject({year:t,month:e,day:1},{zone:n}).daysInMonth??0}function ay(t,e,n){return M.fromObject({year:t,month:e,day:1},{zone:n}).weekday%7}function Vs(t,e){return t.hasSame(e,"day")}function $s(t,e,n){return!!(e&&t<e||n&&t>n)}function iy(t){return t.toFormat("dd/LL/yyyy")}const as=h.forwardRef(({value:t,defaultValue:e,onChange:n,disabled:r=!1,placeholder:s="Seleccionar fecha",min:a,max:i,className:o,isInvalid:c,timeZone:d},f)=>{const u=h.useMemo(()=>Kn(d),[d]),[m,p]=h.useState(!1),[y,g]=h.useState(e??null),[w,v]=h.useState(()=>{const D=t??e??new Date;return M.fromJSDate(D,{zone:u}).startOf("month")}),[k,b]=h.useState(null),S=t!==void 0,_=S?t:y,T=h.useMemo(()=>_?M.fromJSDate(_,{zone:u}):null,[_,u]),E=h.useMemo(()=>a?M.fromJSDate(a,{zone:u}).startOf("day"):null,[a,u]),I=h.useMemo(()=>i?M.fromJSDate(i,{zone:u}).startOf("day"):null,[i,u]),W=h.useRef(null),L=D=>{if($s(D,E,I))return;const ee=D.toJSDate();S||g(ee),n?.(ee),p(!1)},z=D=>{v(ee=>ee.plus({months:D}).startOf("month"))},B=D=>{v(ee=>ee.plus({years:D}).startOf("month"))},G=D=>{if(!m)return;const ee=k??T??M.now().setZone(u);let $=null;switch(D.key){case"ArrowLeft":D.preventDefault(),$=ee.minus({days:1});break;case"ArrowRight":D.preventDefault(),$=ee.plus({days:1});break;case"ArrowUp":D.preventDefault(),$=ee.minus({days:7});break;case"ArrowDown":D.preventDefault(),$=ee.plus({days:7});break;case"Enter":case" ":D.preventDefault(),k&&!$s(k,E,I)&&L(k);return;case"Escape":D.preventDefault(),p(!1);return;case"Home":D.preventDefault(),$=ee.startOf("month");break;case"End":D.preventDefault(),$=ee.endOf("month");break;case"PageUp":D.preventDefault(),D.shiftKey?B(-1):z(-1);return;case"PageDown":D.preventDefault(),D.shiftKey?B(1):z(1);return;default:return}$&&(b($),($.month!==w.month||$.year!==w.year)&&v($.startOf("month")))};h.useEffect(()=>{if(m){const D=T??M.now().setZone(u);b(D),v(D.startOf("month"))}},[m,u,T]);const Q=w.year,H=w.month,F=sy(Q,H,u),U=ay(Q,H,u),V=M.now().setZone(u),ie=!!T?.isValid,P=[];for(let D=0;D<U;D++)P.push(null);for(let D=1;D<=F;D++)P.push(D);return l.jsxs(Jm,{open:m,onOpenChange:p,children:[l.jsx(Km,{asChild:!0,disabled:r,children:l.jsxs("button",{ref:f,type:"button",className:N("oniratec-datepicker__trigger",o),"data-disabled":r?"true":void 0,"data-invalid":c?"true":void 0,"aria-haspopup":"dialog","aria-expanded":m,children:[l.jsx("span",{className:"oniratec-datepicker__value","data-placeholder":ie?void 0:"true",children:ie&&T?iy(T):s}),l.jsx(J.Calendar,{className:"oniratec-datepicker__icon"})]})}),l.jsx(Qm,{children:l.jsxs(ep,{ref:W,className:"oniratec-datepicker__popover",sideOffset:4,align:"start",onKeyDown:G,role:"dialog","aria-modal":"true","aria-label":"Calendario",children:[l.jsxs("div",{className:"oniratec-datepicker__header",children:[l.jsx("button",{type:"button",className:"oniratec-datepicker__nav",onClick:()=>z(-1),"aria-label":"Mes anterior",children:l.jsx(J.ChevronLeft,{className:"h-4 w-4"})}),l.jsxs("span",{className:"oniratec-datepicker__title",children:[ry[H-1]," ",Q]}),l.jsx("button",{type:"button",className:"oniratec-datepicker__nav",onClick:()=>z(1),"aria-label":"Mes siguiente",children:l.jsx(J.ChevronRight,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"oniratec-datepicker__weekdays",role:"row",children:ny.map(D=>l.jsx("span",{className:"oniratec-datepicker__weekday",role:"columnheader",children:D},D))}),l.jsx("div",{className:"oniratec-datepicker__grid",role:"grid",children:P.map((D,ee)=>{if(D===null)return l.jsx("span",{className:"oniratec-datepicker__day--empty"},`empty-${ee}`);const $=w.set({day:D}).startOf("day"),le=T?Vs($,T):!1,ce=Vs($,V),ve=$s($,E,I),Te=k?Vs($,k):!1;return l.jsx("button",{type:"button",className:"oniratec-datepicker__day","data-selected":le?"true":void 0,"data-today":ce?"true":void 0,"data-disabled":ve?"true":void 0,"data-focused":Te?"true":void 0,disabled:ve,onClick:()=>L($),tabIndex:Te?0:-1,"aria-selected":!!le,"aria-disabled":!!ve,children:D},D)})})]})})]})});as.displayName="DatePicker";var is="Dialog",[au]=qr(is),[oy,rt]=au(is),iu=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:i=!0}=t,o=h.useRef(null),c=h.useRef(null),[d,f]=Da({prop:r,defaultProp:s??!1,onChange:a,caller:is});return l.jsx(oy,{scope:e,triggerRef:o,contentRef:c,contentId:xr(),titleId:xr(),descriptionId:xr(),open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(u=>!u),[f]),modal:i,children:n})};iu.displayName=is;var ou="DialogTrigger",lu=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(ou,n),a=$e(e,s.triggerRef);return l.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ba(s.open),...r,ref:a,onClick:Re(t.onClick,s.onOpenToggle)})});lu.displayName=ou;var za="DialogPortal",[ly,cu]=au(za,{forceMount:void 0}),uu=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,a=rt(za,e);return l.jsx(ly,{scope:e,forceMount:n,children:h.Children.map(r,i=>l.jsx(Cn,{present:n||a.open,children:l.jsx(ja,{asChild:!0,container:s,children:i})}))})};uu.displayName=za;var Lr="DialogOverlay",du=h.forwardRef((t,e)=>{const n=cu(Lr,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,a=rt(Lr,t.__scopeDialog);return a.modal?l.jsx(Cn,{present:r||a.open,children:l.jsx(uy,{...s,ref:e})}):null});du.displayName=Lr;var cy=Hr("DialogOverlay.RemoveScroll"),uy=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(Lr,n);return l.jsx(Ra,{as:cy,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Ce.div,{"data-state":Ba(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Ut="DialogContent",fu=h.forwardRef((t,e)=>{const n=cu(Ut,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,a=rt(Ut,t.__scopeDialog);return l.jsx(Cn,{present:r||a.open,children:a.modal?l.jsx(dy,{...s,ref:e}):l.jsx(fy,{...s,ref:e})})});fu.displayName=Ut;var dy=h.forwardRef((t,e)=>{const n=rt(Ut,t.__scopeDialog),r=h.useRef(null),s=$e(e,n.contentRef,r);return h.useEffect(()=>{const a=r.current;if(a)return Vl(a)},[]),l.jsx(hu,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(t.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Re(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,o=i.button===0&&i.ctrlKey===!0;(i.button===2||o)&&a.preventDefault()}),onFocusOutside:Re(t.onFocusOutside,a=>a.preventDefault())})}),fy=h.forwardRef((t,e)=>{const n=rt(Ut,t.__scopeDialog),r=h.useRef(!1),s=h.useRef(!1);return l.jsx(hu,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),hu=h.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,...i}=t,o=rt(Ut,n),c=h.useRef(null),d=$e(e,c);return fl(),l.jsxs(l.Fragment,{children:[l.jsx(ba,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:l.jsx(wa,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Ba(o.open),...i,ref:d,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(hy,{titleId:o.titleId}),l.jsx(py,{contentRef:c,descriptionId:o.descriptionId})]})]})}),Za="DialogTitle",mu=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(Za,n);return l.jsx(Ce.h2,{id:s.titleId,...r,ref:e})});mu.displayName=Za;var pu="DialogDescription",gu=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(pu,n);return l.jsx(Ce.p,{id:s.descriptionId,...r,ref:e})});gu.displayName=pu;var yu="DialogClose",vu=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=rt(yu,n);return l.jsx(Ce.button,{type:"button",...r,ref:e,onClick:Re(t.onClick,()=>s.onOpenChange(!1))})});vu.displayName=yu;function Ba(t){return t?"open":"closed"}var xu="DialogTitleWarning",[P0,wu]=hf(xu,{contentName:Ut,titleName:Za,docsSlug:"dialog"}),hy=({titleId:t})=>{const e=wu(xu),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return h.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},vy="DialogDescriptionWarning",xy=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xu(vy).contentName}}.`;return h.useEffect(()=>{const s=t.current?.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},wu=au,bu=ou,_u=cu,os=uu,ls=du,cs=hu,us=pu,ds=yu;const ku=wu,wy=bu,Su=_u,by=ds,Ba=h.forwardRef(({className:t,...e},n)=>l.jsx(os,{ref:n,className:N("oniratec-dialog__overlay",t),...e}));Ba.displayName=os.displayName;const Ua=h.forwardRef(({className:t,children:e,hideClose:n,size:r="md",...s},a)=>l.jsxs(Su,{children:[l.jsx(Ba,{}),l.jsxs(ls,{ref:a,"data-size":r,className:N("oniratec-dialog__content",t),...s,children:[e,!n&&l.jsx(ds,{asChild:!0,children:l.jsxs(Le,{variant:"ghost",size:"icon-sm",className:"absolute right-2 top-2","aria-label":"Cerrar",children:[l.jsx(J.X,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Cerrar"})]})})]})]}));Ua.displayName=ls.displayName;const Ha=({className:t,...e})=>l.jsx("div",{className:N("oniratec-dialog__header",t),...e});Ha.displayName="DialogHeader";const qa=({className:t,...e})=>l.jsx("div",{className:N("oniratec-dialog__footer",t),...e});qa.displayName="DialogFooter";const Ya=h.forwardRef(({className:t,...e},n)=>l.jsx(cs,{ref:n,className:N("oniratec-dialog__title",t),...e}));Ya.displayName=cs.displayName;const Ga=h.forwardRef(({className:t,...e},n)=>l.jsx(us,{ref:n,className:N("oniratec-dialog__description",t),...e}));Ga.displayName=us.displayName;const _y=fe.Root,ky=fe.Trigger,Sy=fe.Group,Ny=fe.Portal,Cy=fe.Sub,Ty=fe.RadioGroup,Nu=h.forwardRef(({className:t,sideOffset:e=6,...n},r)=>l.jsx(fe.Portal,{children:l.jsx(fe.Content,{ref:r,sideOffset:e,className:N("oniratec-dropdown",t),...n})}));Nu.displayName=fe.Content.displayName;const Cu=h.forwardRef(({className:t,inset:e,icon:n,destructive:r,children:s,...a},i)=>l.jsxs(fe.Item,{ref:i,className:N("oniratec-dropdown__item",e&&"oniratec-dropdown__item--inset",r&&"text-destructive",t),...a,children:[n&&l.jsx("span",{className:"oniratec-dropdown__icon",children:n}),s]}));Cu.displayName=fe.Item.displayName;const Tu=h.forwardRef(({className:t,children:e,checked:n,...r},s)=>l.jsxs(fe.CheckboxItem,{ref:s,className:N("oniratec-dropdown__item",t),checked:n,...r,children:[l.jsx("span",{className:"oniratec-dropdown__indicator",children:l.jsx(fe.ItemIndicator,{children:l.jsx(J.Check,{className:"h-4 w-4"})})}),e]}));Tu.displayName=fe.CheckboxItem.displayName;const Eu=h.forwardRef(({className:t,children:e,...n},r)=>l.jsxs(fe.RadioItem,{ref:r,className:N("oniratec-dropdown__item",t),...n,children:[l.jsx("span",{className:"oniratec-dropdown__indicator",children:l.jsx(fe.ItemIndicator,{children:l.jsx(J.Circle,{className:"h-2.5 w-2.5 fill-current"})})}),e]}));Eu.displayName=fe.RadioItem.displayName;const Ou=h.forwardRef(({className:t,inset:e,...n},r)=>l.jsx(fe.Label,{ref:r,className:N("oniratec-dropdown__label",e&&"oniratec-dropdown__item--inset",t),...n}));Ou.displayName=fe.Label.displayName;const ju=h.forwardRef(({className:t,...e},n)=>l.jsx(fe.Separator,{ref:n,className:N("oniratec-dropdown__separator",t),...e}));ju.displayName=fe.Separator.displayName;const Du=h.forwardRef(({className:t,inset:e,children:n,...r},s)=>l.jsxs(fe.SubTrigger,{ref:s,className:N("oniratec-dropdown__item",e&&"oniratec-dropdown__item--inset",t),...r,children:[n,l.jsx(J.ChevronRight,{className:"oniratec-dropdown__chevron"})]}));Du.displayName=fe.SubTrigger.displayName;const Ru=h.forwardRef(({className:t,...e},n)=>l.jsx(fe.SubContent,{ref:n,className:N("oniratec-dropdown",t),...e}));Ru.displayName=fe.SubContent.displayName;const Au=({className:t,...e})=>l.jsx("span",{className:N("oniratec-dropdown__shortcut",t),...e});Au.displayName="DropdownMenuShortcut";const Ey="Arrastra y suelta archivos aquí o selecciona desde tu dispositivo.",Oy=t=>{if(t===0)return"0 B";const e=1024,n=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(t)/Math.log(e));return`${(t/Math.pow(e,r)).toFixed(r===0?0:1)} ${n[r]}`},on=t=>`${t.name}-${t.size}-${t.lastModified}`,xo=t=>t.type.startsWith("image/");function fs({label:t,helperText:e,error:n,disabled:r=!1,multiple:s=!1,accept:a,files:i,defaultFiles:o=[],onFilesChange:c,id:d,name:f,allowDrop:u=!1,placeholder:m=Ey,showPreview:p=!0,previewMode:y="auto",maxPreviewItems:g=4,defaultPreviewUrl:w}){const v=x.useId(),k=d??v,S=e?`${k}-helper`:void 0,_=n?`${k}-error`:void 0,b=[S,_].filter(Boolean).join(" ")||void 0,E=x.useRef(null),[T,A]=x.useState(o),[V,L]=x.useState(!1),z=i!==void 0,B=z?i:T,G=F=>{const D=s?F:F.slice(0,1);z||A(D),c?.(D)},Q=F=>{if(!s)return F.slice(0,1);const D=new Map(B.map(ee=>[on(ee),ee]));for(const ee of F)D.set(on(ee),ee);return Array.from(D.values())},H=F=>{const D=Array.from(F.target.files??[]);G(s?Q(D):D),F.target.value=""},P=F=>{G(B.filter(D=>on(D)!==on(F)))},U=F=>{if(!u||r)return;F.preventDefault(),L(!1);const D=Array.from(F.dataTransfer.files??[]);D.length!==0&&G(s?Q(D):D)},$=x.useMemo(()=>{if(!p)return[];const F=B.slice(0,g);return y==="image"||y==="auto"&&F.some(ee=>xo(ee))?F.filter(ee=>xo(ee)).map(ee=>({key:on(ee),file:ee,url:URL.createObjectURL(ee)})):[]},[B,g,y,p]);x.useEffect(()=>()=>{for(const F of $)URL.revokeObjectURL(F.url)},[$]);const ie=!!w&&B.length===0;return l.jsxs("div",{className:"oniratec-file-upload","data-disabled":r?"true":void 0,children:[t&&l.jsx("label",{htmlFor:k,className:"oniratec-file-upload__label",children:t}),l.jsx("input",{ref:E,id:k,name:f,type:"file",className:"sr-only",disabled:r,multiple:s,accept:a,"aria-invalid":n?"true":void 0,"aria-describedby":b,onChange:H}),l.jsxs("button",{type:"button",disabled:r,className:N("oniratec-file-upload__dropzone",V&&"oniratec-file-upload__dropzone--dragging"),onClick:()=>E.current?.click(),onDragOver:F=>{!u||r||(F.preventDefault(),L(!0))},onDragLeave:()=>u&&L(!1),onDrop:U,children:[l.jsx(J.UploadCloud,{className:"oniratec-file-upload__icon"}),l.jsxs("div",{children:[l.jsx("p",{className:"oniratec-file-upload__text",children:s?"Seleccionar archivos":"Seleccionar archivo"}),l.jsx("p",{className:"oniratec-file-upload__hint",children:m}),a&&l.jsxs("p",{className:"oniratec-file-upload__accept",children:["Acepta: ",a]})]})]}),ie&&l.jsx("div",{className:"oniratec-file-upload__preview",children:l.jsx("div",{className:"oniratec-file-upload__preview-item",children:l.jsx("img",{src:w,alt:"Logo actual",className:"oniratec-file-upload__preview-img"})})}),$.length>0&&l.jsx("div",{className:"oniratec-file-upload__preview",children:$.map(F=>l.jsx("div",{className:"oniratec-file-upload__preview-item",children:l.jsx("img",{src:F.url,alt:F.file.name,className:"oniratec-file-upload__preview-img"})},F.key))}),e&&!n&&l.jsx("p",{id:S,className:"oniratec-file-upload__helper",children:e}),n&&l.jsx("p",{id:_,className:"oniratec-file-upload__error",children:n}),B.length>0&&l.jsx("ul",{className:"oniratec-file-upload__list",children:B.map(F=>l.jsxs("li",{className:"oniratec-file-upload__item",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx(J.FileIcon,{className:"h-4 w-4 shrink-0 text-[color:var(--text-2)]"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"oniratec-file-upload__name truncate",children:F.name}),l.jsx("p",{className:"oniratec-file-upload__size",children:Oy(F.size)})]})]}),l.jsx("button",{type:"button",className:"oniratec-file-upload__remove",onClick:()=>P(F),"aria-label":`Eliminar ${F.name}`,children:l.jsx(J.X,{className:"h-4 w-4"})})]},on(F)))})]})}const jy=fs,Mu=h.createContext(null);function hs(){const t=h.useContext(Mu);if(!t)throw new Error("Field components must be used inside <Field>");return t}const Xe=h.forwardRef(({className:t,error:e,required:n,...r},s)=>{const a=h.useId();return l.jsx(Mu.Provider,{value:{id:a,error:e,required:n},children:l.jsx("div",{ref:s,className:N("oniratec-field",t),...r})})});Xe.displayName="Field";const Je=x.forwardRef((t,e)=>{const{id:n,error:r}=hs();return l.jsx(Qo,{ref:e,id:n,"aria-invalid":!!r,...t})});Je.displayName="FieldControl";const at=h.forwardRef(({className:t,children:e,...n},r)=>{const{id:s,required:a}=hs();return l.jsxs("label",{ref:r,htmlFor:s,className:N("oniratec-field__label",t),...n,children:[e,a&&l.jsx("span",{className:"oniratec-field__required",children:"*"})]})});at.displayName="FieldLabel";const Ke=h.forwardRef(({className:t,children:e,...n},r)=>{const{error:s}=hs(),a=s??e;return a?l.jsx("p",{ref:r,className:N("oniratec-field__message",!s&&"oniratec-field__message--hint",t),...n,children:a}):null});Ke.displayName="FieldMessage";const Iu=x.forwardRef(({className:t,containerClassName:e,isInvalid:n,...r},s)=>{const[a,i]=x.useState(!1);return l.jsxs("div",{className:N("oniratec-password-input",e),children:[l.jsx("input",{ref:s,type:a?"text":"password","aria-invalid":n||void 0,className:N("oniratec-input",n&&"oniratec-input--invalid",t),...r}),l.jsx("button",{type:"button",className:"oniratec-password-input__toggle",onClick:()=>i(o=>!o),children:a?l.jsx(J.EyeOff,{className:"h-4 w-4"}):l.jsx(J.EyeIcon,{className:"h-4 w-4"})})]})});Iu.displayName="PasswordInput";const Wn=h.forwardRef(({className:t,isInvalid:e,"aria-invalid":n,...r},s)=>{const a=e??(n===!0||n==="true");return l.jsx("input",{ref:s,"aria-invalid":a||void 0,className:N("oniratec-input",a&&"oniratec-input--invalid",t),...r})});Wn.displayName="Input";const Pu=h.forwardRef(({className:t,...e},n)=>l.jsx("kbd",{ref:n,className:N("oniratec-kbd",t),...e}));Pu.displayName="Kbd";const Fu=h.forwardRef(({lottieJson:t,title:e,description:n,actionLabel:r,onAction:s,fallbackIcon:a},i)=>l.jsxs("div",{ref:i,className:"oniratec-not-found",children:[t?l.jsx("div",{className:"oniratec-not-found__illustration",children:l.jsx(Pd,{animationData:t,loop:!0})}):a&&l.jsx("div",{className:"oniratec-not-found__icon",children:a}),l.jsx("h2",{className:"oniratec-not-found__title",children:e}),n&&l.jsx("p",{className:"oniratec-not-found__description",children:n}),r&&s&&l.jsx(Le,{size:"md",onClick:s,children:r})]}));Fu.displayName="NotFoundState";const Lu=h.forwardRef(({className:t,indicatorClassName:e,max:n=100,value:r=0,...s},a)=>{const i=n>0?n:100,o=r==null?0:Math.min(Math.max(r,0),i),c=`${o/i*100}%`;return l.jsx("div",{ref:a,role:"progressbar","aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":r==null?void 0:o,className:N("oniratec-progress",t),...s,children:l.jsx("div",{className:N("oniratec-progress__indicator",e),style:{width:c}})})});Lu.displayName="Progress";const Vu=h.createContext(null);function Dy(){const t=h.useContext(Vu);if(!t)throw new Error("RadioGroupItem must be used inside <RadioGroup>.");return t}function Ry({className:t,defaultValue:e,disabled:n,name:r,onValueChange:s,orientation:a="vertical",required:i,value:o,...c}){const d=h.useId(),[f,u]=h.useState(e),m=o!==void 0,p=m?o:f,y=h.useCallback(g=>{m||u(g),s?.(g)},[m,s]);return l.jsx(Vu.Provider,{value:{disabled:n,name:r??d,onValueChange:y,orientation:a,required:i,value:p},children:l.jsx("div",{role:"radiogroup","aria-required":i,"data-orientation":a,className:N("oniratec-radio-group",t),...c})})}const $u=h.forwardRef(({className:t,description:e,disabled:n,id:r,label:s,size:a="md",value:i,"aria-describedby":o,"aria-invalid":c,onChange:d,...f},u)=>{const m=h.useId(),p=r??m,y=e?`${p}-description`:void 0,g=c===!0||c==="true",w=Dy(),v=w.value===i,k=w.disabled||n;return l.jsxs("label",{htmlFor:p,"data-size":a,"data-type":"radio",className:N("oniratec-control",k&&"cursor-not-allowed opacity-60",t),children:[l.jsx("input",{ref:u,id:p,type:"radio",name:w.name,value:i,checked:v,required:w.required,disabled:k,"aria-invalid":g||void 0,"aria-describedby":[o,y].filter(Boolean).join(" ")||void 0,className:"oniratec-control__input",onChange:S=>{S.target.checked&&w.onValueChange(i),d?.(S)},...f}),l.jsx("span",{className:N("oniratec-control__box",g&&"border-destructive")}),(s||e)&&l.jsxs("span",{className:"oniratec-control__label grid gap-1 leading-tight",children:[s&&l.jsx("span",{className:"font-medium",children:s}),e&&l.jsx("span",{id:y,className:"text-sm text-[color:var(--text-2)]",children:e})]})]})});$u.displayName="RadioGroupItem";const ms=pe.Root,Ay=pe.Group,ps=pe.Value,Qn=h.forwardRef(({className:t,hasError:e,children:n,...r},s)=>l.jsxs(pe.Trigger,{ref:s,"aria-invalid":e||void 0,className:N("oniratec-select__trigger",e&&"oniratec-select__trigger--error",t),...r,children:[n,l.jsx(pe.Icon,{asChild:!0,children:l.jsx(J.ChevronDown,{className:"oniratec-select__chevron"})})]}));Qn.displayName=pe.Trigger.displayName;const Xa=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.ScrollUpButton,{ref:n,className:N("oniratec-select__scroll-button",t),...e,children:l.jsx(J.ChevronUp,{className:"h-4 w-4"})}));Xa.displayName=pe.ScrollUpButton.displayName;const Ja=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.ScrollDownButton,{ref:n,className:N("oniratec-select__scroll-button",t),...e,children:l.jsx(J.ChevronDown,{className:"h-4 w-4"})}));Ja.displayName=pe.ScrollDownButton.displayName;const er=h.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>l.jsx(pe.Portal,{children:l.jsxs(pe.Content,{ref:s,className:N("oniratec-select",t),position:n,...r,children:[l.jsx(Xa,{}),l.jsx(pe.Viewport,{className:N(n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),l.jsx(Ja,{})]})}));er.displayName=pe.Content.displayName;const Wu=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.Label,{ref:n,className:N("oniratec-select__label",t),...e}));Wu.displayName=pe.Label.displayName;const tr=h.forwardRef(({className:t,children:e,...n},r)=>l.jsxs(pe.Item,{ref:r,className:N("oniratec-select__item",t),...n,children:[l.jsx("span",{className:"oniratec-select__indicator",children:l.jsx(pe.ItemIndicator,{children:l.jsx(J.Check,{className:"h-4 w-4"})})}),l.jsx(pe.ItemText,{children:e})]}));tr.displayName=pe.Item.displayName;const zu=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.Separator,{ref:n,className:N("oniratec-dropdown__separator",t),...e}));zu.displayName=pe.Separator.displayName;function My(t,e){const[n,r]=h.useState(t);return h.useEffect(()=>{const s=setTimeout(()=>r(t),e);return()=>clearTimeout(s)},[t,e]),n}function Ka({value:t,onValueChange:e,placeholder:n="Seleccionar",searchPlaceholder:r="Buscar...",disabled:s,hasError:a,minChars:i=2,debounceMs:o=300,fetcher:c,getOptionValue:d,getOptionLabel:f,emptyLabel:u="Sin resultados",loadingLabel:m="Buscando...",emptyActionLabel:p,onEmptyActionClick:y,contentClassName:g,triggerClassName:w}){const[v,k]=h.useState(!1),[S,_]=h.useState(""),[b,E]=h.useState(!1),[T,A]=h.useState([]),[V,L]=h.useState(""),z=My(S,o),B=z.trim().length>=i,G=h.useRef(null);h.useEffect(()=>{const H=P=>{G.current&&(G.current.contains(P.target)||k(!1))};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]),h.useEffect(()=>{let H=!0;return(async()=>{if(v){if(!B){A([]);return}E(!0);try{const U=await c(z.trim());if(!H)return;A(U??[])}finally{H&&E(!1)}}})(),()=>{H=!1}},[v,z,B,c]),h.useEffect(()=>{if(!t){L("");return}const H=T.find(P=>d(P)===t);H&&L(f(H))},[t,T,d,f]);const Q=V||n;return l.jsxs("div",{ref:G,className:"relative w-full",children:[l.jsxs("button",{type:"button",disabled:s,"aria-invalid":a?"true":"false","aria-expanded":v,"aria-haspopup":"listbox",onClick:()=>k(H=>!H),className:N("oniratec-async-select__trigger",a&&"oniratec-async-select__trigger--error",w),children:[l.jsx("span",{className:N("oniratec-async-select__value",!V&&"oniratec-async-select__value--placeholder"),children:Q}),l.jsx(J.ChevronDown,{className:N("oniratec-async-select__chevron",v&&"rotate-180")})]}),v&&l.jsxs("div",{className:N("oniratec-async-select",g),role:"listbox",children:[l.jsxs("div",{className:"oniratec-async-select__search",children:[l.jsx("input",{className:"oniratec-async-select__search-input",value:S,onChange:H=>_(H.target.value),placeholder:r,autoFocus:!0}),b&&l.jsx(J.Loader2,{className:"oniratec-async-select__loader"})]}),l.jsxs("div",{className:"oniratec-async-select__list",children:[!B&&l.jsxs("p",{className:"oniratec-async-select__hint",children:["Escribe al menos ",i," caracteres"]}),B&&b&&l.jsx("p",{className:"oniratec-async-select__hint",children:m}),B&&!b&&T.length===0&&l.jsxs("div",{className:"oniratec-async-select__empty",children:[l.jsx("p",{children:u}),p&&y&&l.jsx("button",{type:"button",className:"oniratec-async-select__empty-action",onClick:y,children:p})]}),T.length>0&&l.jsx("ul",{children:T.map(H=>{const P=d(H),U=f(H),$=P===t;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":$,className:N("oniratec-async-select__item",$&&"oniratec-async-select__item--selected"),onClick:()=>{e(P),L(U),k(!1),_("")},children:[l.jsx("span",{className:"oniratec-async-select__indicator",children:$&&l.jsx(J.Check,{className:"h-4 w-4"})}),U]})},P)})})]})]})]})}const Zu=h.forwardRef(({className:t,decorative:e=!0,orientation:n="horizontal",...r},s)=>l.jsx("div",{ref:s,role:e?"none":"separator","aria-orientation":e?void 0:n,"data-orientation":n,className:N("oniratec-separator",t),...r}));Zu.displayName="Separator";const Iy=wu,Py=bu,Fy=ds,Bu=_u,Qa=h.forwardRef(({className:t,...e},n)=>l.jsx(os,{ref:n,className:N("oniratec-sheet__overlay",t),...e}));Qa.displayName=os.displayName;const Uu=h.forwardRef(({side:t="right",className:e,children:n,hideClose:r,...s},a)=>l.jsxs(Bu,{children:[l.jsx(Qa,{}),l.jsxs(ls,{ref:a,"data-side":t,className:N("oniratec-sheet__content",e),...s,children:[!r&&l.jsx(ds,{asChild:!0,children:l.jsxs(Le,{variant:"ghost",size:"icon-sm",className:"absolute right-2 top-2","aria-label":"Cerrar",children:[l.jsx(J.X,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Cerrar"})]})}),n]})]}));Uu.displayName=ls.displayName;const Hu=({className:t,...e})=>l.jsx("div",{className:N("oniratec-sheet__header",t),...e});Hu.displayName="SheetHeader";const qu=({className:t,...e})=>l.jsx("div",{className:N("oniratec-sheet__footer",t),...e});qu.displayName="SheetFooter";const Yu=h.forwardRef(({className:t,...e},n)=>l.jsx(cs,{ref:n,className:N("oniratec-sheet__title",t),...e}));Yu.displayName=cs.displayName;const Gu=h.forwardRef(({className:t,...e},n)=>l.jsx(us,{ref:n,className:N("oniratec-sheet__description",t),...e}));Gu.displayName=us.displayName;const Vr=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-skeleton",t),...e}));Vr.displayName="Skeleton";const Xu=h.forwardRef(({className:t,isInvalid:e,"aria-invalid":n,...r},s)=>{const a=e??(n===!0||n==="true");return l.jsx("textarea",{ref:s,"aria-invalid":a||void 0,className:N("oniratec-textarea",a&&"oniratec-textarea--invalid",t),...r})});Xu.displayName="Textarea";const Ju=h.createContext(null);function ei(){const t=h.useContext(Ju);if(!t)throw new Error("Tabs components must be used inside <Tabs>.");return t}function Ly({children:t,className:e,defaultValue:n,onValueChange:r,orientation:s="horizontal",value:a,...i}){const o=h.useId(),[c,d]=h.useState(n),f=a!==void 0,u=f?a:c,m=h.useCallback(p=>{f||d(p),r?.(p)},[f,r]);return l.jsx(Ju.Provider,{value:{baseId:o,onValueChange:m,orientation:s,value:u},children:l.jsx("div",{className:N("oniratec-tabs",e),"data-orientation":s,...i,children:t})})}const Ku=h.forwardRef(({className:t,onKeyDown:e,...n},r)=>{const{onValueChange:s,orientation:a}=ei();return l.jsx("div",{ref:r,role:"tablist","aria-orientation":a,className:N("oniratec-tabs__list",t),onKeyDown:i=>{const o=a==="horizontal"?i.key==="ArrowRight":i.key==="ArrowDown",c=a==="horizontal"?i.key==="ArrowLeft":i.key==="ArrowUp",d=i.key==="Home"||i.key==="End";if(!o&&!c&&!d){e?.(i);return}const f=Array.from(i.currentTarget.querySelectorAll('[role="tab"]:not(:disabled)'));if(f.length===0){e?.(i);return}const u=f.findIndex(g=>g===document.activeElement);let m=u===-1?0:u;o&&(m=(u+1+f.length)%f.length),c&&(m=(u-1+f.length)%f.length),i.key==="Home"&&(m=0),i.key==="End"&&(m=f.length-1),i.preventDefault();const p=f[m];p?.focus();const y=p?.dataset.value;y&&s(y),e?.(i)},...n})});Ku.displayName="TabsList";const Qu=h.forwardRef(({children:t,className:e,value:n,...r},s)=>{const{baseId:a,onValueChange:i,value:o}=ei(),c=n===o;return l.jsx("button",{ref:s,id:`${a}-trigger-${n}`,type:"button",role:"tab","aria-controls":`${a}-content-${n}`,"aria-selected":c,tabIndex:c?0:-1,"data-state":c?"active":"inactive","data-value":n,className:N("oniratec-tabs__trigger",e),onClick:()=>i(n),...r,children:t})});Qu.displayName="TabsTrigger";const ed=h.forwardRef(({className:t,forceMount:e=!1,value:n,...r},s)=>{const{baseId:a,value:i}=ei(),o=n===i;return!o&&!e?null:l.jsx("div",{ref:s,id:`${a}-content-${n}`,role:"tabpanel","aria-labelledby":`${a}-trigger-${n}`,hidden:!o,tabIndex:0,"data-state":o?"active":"inactive",className:N("oniratec-tabs__content",!o&&"hidden",t),...r})});ed.displayName="TabsContent";function Vy(t){const e=h.useRef({value:t,previous:t});return h.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var gs="Switch",[$y]=qr(gs),[Wy,zy]=$y(gs),td=h.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:a,required:i,disabled:o,value:c="on",onCheckedChange:d,form:f,...u}=t,[m,p]=h.useState(null),y=$e(e,S=>p(S)),g=h.useRef(!1),w=m?f||!!m.closest("form"):!0,[v,k]=ja({prop:s,defaultProp:a??!1,onChange:d,caller:gs});return l.jsxs(Wy,{scope:n,checked:v,disabled:o,children:[l.jsx(Ce.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":ad(v),"data-disabled":o?"":void 0,disabled:o,value:c,...u,ref:y,onClick:Re(t.onClick,S=>{k(_=>!_),w&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),w&&l.jsx(sd,{control:m,bubbles:!g.current,name:r,value:c,checked:v,required:i,disabled:o,form:f,style:{transform:"translateX(-100%)"}})]})});td.displayName=gs;var nd="SwitchThumb",rd=h.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=zy(nd,n);return l.jsx(Ce.span,{"data-state":ad(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});rd.displayName=nd;var Zy="SwitchBubbleInput",sd=h.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:r=!0,...s},a)=>{const i=h.useRef(null),o=$e(i,a),c=Vy(n),d=Nl(e);return h.useEffect(()=>{const f=i.current;if(!f)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(c!==n&&p){const y=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(y)}},[c,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});sd.displayName=Zy;function ad(t){return t?"checked":"unchecked"}var By=td,Uy=rd;const nr=h.forwardRef(({checked:t,defaultChecked:e=!1,onChange:n,size:r="md",disabled:s=!1,label:a,className:i,ariaLabel:o,id:c},d)=>{const f=h.useId(),u=c??f;return l.jsxs("div",{className:N("oniratec-toggle",i),"data-size":r,children:[l.jsx(By,{ref:d,id:u,checked:t,defaultChecked:e,onCheckedChange:n,disabled:s,"aria-label":o,className:"oniratec-toggle__switch",children:l.jsx(Uy,{className:"oniratec-toggle__thumb"})}),a&&l.jsx("label",{htmlFor:u,className:N("oniratec-toggle__label",s&&"cursor-not-allowed opacity-50"),children:a})]})});nr.displayName="Toggle";const Hy=nr;function qy(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const Yy=t=>{switch(t){case"success":return Jy;case"info":return Qy;case"warning":return Ky;case"error":return ev;default:return null}},Gy=Array(12).fill(0),Xy=({visible:t,className:e})=>x.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},x.createElement("div",{className:"sonner-spinner"},Gy.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Jy=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ky=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Qy=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ev=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),tv=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),nv=()=>{const[t,e]=x.useState(document.hidden);return x.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let aa=1;class rv{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:r,...s}=e,a=typeof e?.id=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:aa++,i=this.toasts.find(c=>c.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...e,id:a,title:r}),{...c,...e,id:a,dismissible:o,title:r}):c):this.addToast({title:r,...s,dismissible:o,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(e instanceof Function?e():e);let a=r!==void 0,i;const o=s.then(async d=>{if(i=["resolve",d],x.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(av(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,y=typeof u=="object"&&!x.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...y})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,m=typeof n.description=="function"?await n.description(d):n.description,y=typeof u=="object"&&!x.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...y})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,m=typeof n.description=="function"?await n.description(d):n.description,y=typeof u=="object"&&!x.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:m,...y})}}).catch(async d=>{if(i=["reject",d],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,p=typeof f=="object"&&!x.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:u,...p})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,f)=>o.then(()=>i[0]==="reject"?f(i[1]):d(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(e,n)=>{const r=n?.id||aa++;return this.create({jsx:e(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const De=new rv,sv=(t,e)=>{const n=e?.id||aa++;return De.addToast({title:t,...e,id:n}),n},av=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",iv=sv,ov=()=>De.toasts,lv=()=>De.getActiveToasts(),cv=Object.assign(iv,{success:De.success,info:De.info,warning:De.warning,error:De.error,custom:De.custom,message:De.message,promise:De.promise,dismiss:De.dismiss,loading:De.loading},{getHistory:ov,getToasts:lv});qy("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function yr(t){return t.label!==void 0}const uv=3,dv="24px",fv="16px",wo=4e3,hv=356,mv=14,pv=45,gv=200;function st(...t){return t.filter(Boolean).join(" ")}function yv(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const vv=t=>{var e,n,r,s,a,i,o,c,d;const{invert:f,toast:u,unstyled:m,interacting:p,setHeights:y,visibleToasts:g,heights:w,index:v,toasts:k,expanded:S,removeToast:_,defaultRichColors:b,closeButton:E,style:T,cancelButtonStyle:A,actionButtonStyle:V,className:L="",descriptionClassName:z="",duration:B,position:G,gap:Q,expandByDefault:H,classNames:P,icons:U,closeButtonAriaLabel:$="Close toast"}=t,[ie,F]=x.useState(null),[D,ee]=x.useState(null),[W,le]=x.useState(!1),[ce,ve]=x.useState(!1),[Te,oe]=x.useState(!1),[vt,Yt]=x.useState(!1),[Gt,xt]=x.useState(!1),[Xt,ys]=x.useState(0),[Sd,ai]=x.useState(0),jn=x.useRef(u.duration||B||wo),ii=x.useRef(null),ht=x.useRef(null),Nd=v===0,Cd=v+1<=g,Ae=u.type,Jt=u.dismissible!==!1,Td=u.className||"",Ed=u.descriptionClassName||"",rr=x.useMemo(()=>w.findIndex(X=>X.toastId===u.id)||0,[w,u.id]),Od=x.useMemo(()=>{var X;return(X=u.closeButton)!=null?X:E},[u.closeButton,E]),oi=x.useMemo(()=>u.duration||B||wo,[u.duration,B]),vs=x.useRef(0),Kt=x.useRef(0),li=x.useRef(0),Qt=x.useRef(null),[jd,Dd]=G.split("-"),ci=x.useMemo(()=>w.reduce((X,xe,be)=>be>=rr?X:X+xe.height,0),[w,rr]),ui=nv(),Rd=u.invert||f,xs=Ae==="loading";Kt.current=x.useMemo(()=>rr*Q+ci,[rr,ci]),x.useEffect(()=>{jn.current=oi},[oi]),x.useEffect(()=>{le(!0)},[]),x.useEffect(()=>{const X=ht.current;if(X){const xe=X.getBoundingClientRect().height;return ai(xe),y(be=>[{toastId:u.id,height:xe,position:u.position},...be]),()=>y(be=>be.filter(Me=>Me.toastId!==u.id))}},[y,u.id]),x.useLayoutEffect(()=>{if(!W)return;const X=ht.current,xe=X.style.height;X.style.height="auto";const be=X.getBoundingClientRect().height;X.style.height=xe,ai(be),y(Me=>Me.find(we=>we.toastId===u.id)?Me.map(we=>we.toastId===u.id?{...we,height:be}:we):[{toastId:u.id,height:be,position:u.position},...Me])},[W,u.title,u.description,y,u.id,u.jsx,u.action,u.cancel]);const wt=x.useCallback(()=>{ve(!0),ys(Kt.current),y(X=>X.filter(xe=>xe.toastId!==u.id)),setTimeout(()=>{_(u)},gv)},[u,_,y,Kt]);x.useEffect(()=>{if(u.promise&&Ae==="loading"||u.duration===1/0||u.type==="loading")return;let X;return S||p||ui?(()=>{if(li.current<vs.current){const Me=new Date().getTime()-vs.current;jn.current=jn.current-Me}li.current=new Date().getTime()})():jn.current!==1/0&&(vs.current=new Date().getTime(),X=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),wt()},jn.current)),()=>clearTimeout(X)},[S,p,u,Ae,ui,wt]),x.useEffect(()=>{u.delete&&(wt(),u.onDismiss==null||u.onDismiss.call(u,u))},[wt,u.delete]);function Ad(){var X;if(U?.loading){var xe;return x.createElement("div",{className:st(P?.loader,u==null||(xe=u.classNames)==null?void 0:xe.loader,"sonner-loader"),"data-visible":Ae==="loading"},U.loading)}return x.createElement(Xy,{className:st(P?.loader,u==null||(X=u.classNames)==null?void 0:X.loader),visible:Ae==="loading"})}const Md=u.icon||U?.[Ae]||Yy(Ae);var di,fi;return x.createElement("li",{tabIndex:0,ref:ht,className:st(L,Td,P?.toast,u==null||(e=u.classNames)==null?void 0:e.toast,P?.default,P?.[Ae],u==null||(n=u.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(di=u.richColors)!=null?di:b,"data-styled":!(u.jsx||u.unstyled||m),"data-mounted":W,"data-promise":!!u.promise,"data-swiped":Gt,"data-removed":ce,"data-visible":Cd,"data-y-position":jd,"data-x-position":Dd,"data-index":v,"data-front":Nd,"data-swiping":Te,"data-dismissible":Jt,"data-type":Ae,"data-invert":Rd,"data-swipe-out":vt,"data-swipe-direction":D,"data-expanded":!!(S||H&&W),"data-testid":u.testId,style:{"--index":v,"--toasts-before":v,"--z-index":k.length-v,"--offset":`${ce?Xt:Kt.current}px`,"--initial-height":H?"auto":`${Sd}px`,...T,...u.style},onDragEnd:()=>{oe(!1),F(null),Qt.current=null},onPointerDown:X=>{X.button!==2&&(xs||!Jt||(ii.current=new Date,ys(Kt.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(oe(!0),Qt.current={x:X.clientX,y:X.clientY})))},onPointerUp:()=>{var X,xe,be;if(vt||!Jt)return;Qt.current=null;const Me=Number(((X=ht.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),sr=Number(((xe=ht.current)==null?void 0:xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((be=ii.current)==null?void 0:be.getTime()),We=ie==="x"?Me:sr,ar=Math.abs(We)/we;if(Math.abs(We)>=pv||ar>.11){ys(Kt.current),u.onDismiss==null||u.onDismiss.call(u,u),ee(ie==="x"?Me>0?"right":"left":sr>0?"down":"up"),wt(),Yt(!0);return}else{var He,qe;(He=ht.current)==null||He.style.setProperty("--swipe-amount-x","0px"),(qe=ht.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}xt(!1),oe(!1),F(null)},onPointerMove:X=>{var xe,be,Me;if(!Qt.current||!Jt||((xe=window.getSelection())==null?void 0:xe.toString().length)>0)return;const we=X.clientY-Qt.current.y,We=X.clientX-Qt.current.x;var ar;const He=(ar=t.swipeDirections)!=null?ar:yv(G);!ie&&(Math.abs(We)>1||Math.abs(we)>1)&&F(Math.abs(We)>Math.abs(we)?"x":"y");let qe={x:0,y:0};const hi=Mt=>1/(1.5+Math.abs(Mt)/20);if(ie==="y"){if(He.includes("top")||He.includes("bottom"))if(He.includes("top")&&we<0||He.includes("bottom")&&we>0)qe.y=we;else{const Mt=we*hi(we);qe.y=Math.abs(Mt)<Math.abs(we)?Mt:we}}else if(ie==="x"&&(He.includes("left")||He.includes("right")))if(He.includes("left")&&We<0||He.includes("right")&&We>0)qe.x=We;else{const Mt=We*hi(We);qe.x=Math.abs(Mt)<Math.abs(We)?Mt:We}(Math.abs(qe.x)>0||Math.abs(qe.y)>0)&&xt(!0),(be=ht.current)==null||be.style.setProperty("--swipe-amount-x",`${qe.x}px`),(Me=ht.current)==null||Me.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Od&&!u.jsx&&Ae!=="loading"?x.createElement("button",{"aria-label":$,"data-disabled":xs,"data-close-button":!0,onClick:xs||!Jt?()=>{}:()=>{wt(),u.onDismiss==null||u.onDismiss.call(u,u)},className:st(P?.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(fi=U?.close)!=null?fi:tv):null,(Ae||u.icon||u.promise)&&u.icon!==null&&(U?.[Ae]!==null||u.icon)?x.createElement("div",{"data-icon":"",className:st(P?.icon,u==null||(s=u.classNames)==null?void 0:s.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||Ad():null,u.type!=="loading"?Md:null):null,x.createElement("div",{"data-content":"",className:st(P?.content,u==null||(a=u.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:st(P?.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?x.createElement("div",{"data-description":"",className:st(z,Ed,P?.description,u==null||(o=u.classNames)==null?void 0:o.description)},typeof u.description=="function"?u.description():u.description):null),x.isValidElement(u.cancel)?u.cancel:u.cancel&&yr(u.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||A,onClick:X=>{yr(u.cancel)&&Jt&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,X),wt())},className:st(P?.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,x.isValidElement(u.action)?u.action:u.action&&yr(u.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||V,onClick:X=>{yr(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,X),!X.defaultPrevented&&wt())},className:st(P?.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function bo(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function xv(t,e){const n={};return[t,e].forEach((r,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",o=a?fv:dv;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=o:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(o)}),n}const wv=x.forwardRef(function(e,n){const{id:r,invert:s,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:c,className:d,offset:f,mobileOffset:u,theme:m="light",richColors:p,duration:y,style:g,visibleToasts:w=uv,toastOptions:v,dir:k=bo(),gap:S=mv,icons:_,containerAriaLabel:b="Notifications"}=e,[E,T]=x.useState([]),A=x.useMemo(()=>r?E.filter(W=>W.toasterId===r):E.filter(W=>!W.toasterId),[E,r]),V=x.useMemo(()=>Array.from(new Set([a].concat(A.filter(W=>W.position).map(W=>W.position)))),[A,a]),[L,z]=x.useState([]),[B,G]=x.useState(!1),[Q,H]=x.useState(!1),[P,U]=x.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=x.useRef(null),ie=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=x.useRef(null),D=x.useRef(!1),ee=x.useCallback(W=>{T(le=>{var ce;return(ce=le.find(ve=>ve.id===W.id))!=null&&ce.delete||De.dismiss(W.id),le.filter(({id:ve})=>ve!==W.id)})},[]);return x.useEffect(()=>De.subscribe(W=>{if(W.dismiss){requestAnimationFrame(()=>{T(le=>le.map(ce=>ce.id===W.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{ma.flushSync(()=>{T(le=>{const ce=le.findIndex(ve=>ve.id===W.id);return ce!==-1?[...le.slice(0,ce),{...le[ce],...W},...le.slice(ce+1)]:[W,...le]})})})}),[E]),x.useEffect(()=>{if(m!=="system"){U(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:le})=>{U(le?"dark":"light")})}catch{W.addListener(({matches:ce})=>{try{U(ce?"dark":"light")}catch(ve){console.error(ve)}})}},[m]),x.useEffect(()=>{E.length<=1&&G(!1)},[E]),x.useEffect(()=>{const W=le=>{var ce;if(i.every(oe=>le[oe]||le.code===oe)){var Te;G(!0),(Te=$.current)==null||Te.focus()}le.code==="Escape"&&(document.activeElement===$.current||(ce=$.current)!=null&&ce.contains(document.activeElement))&&G(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[i]),x.useEffect(()=>{if($.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,D.current=!1)}},[$.current]),x.createElement("section",{ref:n,"aria-label":`${b} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((W,le)=>{var ce;const[ve,Te]=W.split("-");return A.length?x.createElement("ol",{key:W,dir:k==="auto"?bo():k,tabIndex:-1,ref:$,className:d,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":ve,"data-x-position":Te,style:{"--front-toast-height":`${((ce=L[0])==null?void 0:ce.height)||0}px`,"--width":`${hv}px`,"--gap":`${S}px`,...g,...xv(f,u)},onBlur:oe=>{D.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(D.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||D.current||(D.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>G(!0),onMouseMove:()=>G(!0),onMouseLeave:()=>{Q||G(!1)},onDragEnd:()=>G(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},A.filter(oe=>!oe.position&&le===0||oe.position===W).map((oe,vt)=>{var Yt,Gt;return x.createElement(vv,{key:oe.id,icons:_,index:vt,toast:oe,defaultRichColors:p,duration:(Yt=v?.duration)!=null?Yt:y,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:s,visibleToasts:w,closeButton:(Gt=v?.closeButton)!=null?Gt:c,interacting:Q,position:W,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:ee,toasts:A.filter(xt=>xt.position==oe.position),heights:L.filter(xt=>xt.position==oe.position),setHeights:z,expandByDefault:o,gap:S,expanded:B,swipeDirections:e.swipeDirections})})):null}))});function bv({...t}){return l.jsx(wv,{position:"bottom-right",richColors:!1,toastOptions:{classNames:{toast:"oniratec-toast",title:"oniratec-toast__title",description:"oniratec-toast__description",closeButton:"oniratec-toast__close-button",actionButton:"oniratec-toast__action-button",success:"oniratec-toast--success",error:"oniratec-toast--error",warning:"oniratec-toast--warning"}},...t})}const _v=Wt.Provider,kv=Wt.Root,Sv=Wt.Trigger,id=x.forwardRef(({className:t,sideOffset:e=6,tone:n="default",children:r,...s},a)=>l.jsx(Wt.Portal,{children:l.jsxs(Wt.Content,{ref:a,sideOffset:e,"data-tone":n!=="default"?n:void 0,className:N("oniratec-tooltip",t),...s,children:[r,l.jsx(Wt.Arrow,{className:"oniratec-tooltip__arrow"})]})}));id.displayName=Wt.Content.displayName;const od=({logo:t,children:e,footer:n,className:r})=>l.jsx("div",{className:"oniratec-auth-layout",children:l.jsxs("div",{className:N("oniratec-auth-layout__card",r),children:[t&&l.jsx("div",{className:"oniratec-auth-layout__logo",children:t.href?l.jsx("a",{href:t.href,className:"focus-visible:outline-none focus-visible:ring-2",children:l.jsx("img",{src:t.src,alt:t.alt,className:"h-10 w-auto"})}):l.jsx("img",{src:t.src,alt:t.alt,className:"h-10 w-auto"})}),l.jsx("div",{className:"oniratec-auth-layout__content",children:e}),n&&l.jsx("div",{className:"oniratec-auth-layout__footer",children:n})]})});od.displayName="AuthLayout";function Nv({items:t,className:e,separator:n,renderLink:r}){const s=n??l.jsx(J.ChevronRight,{className:"oniratec-breadcrumbs__separator h-4 w-4"});return l.jsx("nav",{"aria-label":"Breadcrumb",className:N("oniratec-breadcrumbs",e),children:l.jsx("ol",{className:"oniratec-breadcrumbs__list",children:t.map((a,i)=>{const o=i===t.length-1,c=l.jsx("span",{className:o?"oniratec-breadcrumbs__current":void 0,children:a.label});return l.jsxs("li",{className:"oniratec-breadcrumbs__item",children:[o?l.jsx("span",{"aria-current":"page",children:c}):r?r({item:a,className:"oniratec-breadcrumbs__link",children:c}):a.href?l.jsx("a",{href:a.href,className:"oniratec-breadcrumbs__link",children:c}):l.jsx("button",{type:"button",onClick:a.onClick,className:"oniratec-breadcrumbs__link",children:c}),!o&&l.jsx("span",{"aria-hidden":"true",children:s})]},`${a.label}-${i}`)})})})}function Cv({open:t,onOpenChange:e,title:n,description:r,confirmLabel:s="Confirmar",cancelLabel:a="Cancelar",variant:i="default",onConfirm:o,loading:c=!1}){const d=async()=>{await o()};return l.jsx(ku,{open:t,onOpenChange:e,children:l.jsxs(Ua,{size:"sm",hideClose:!0,children:[l.jsxs(Ha,{children:[l.jsx(Ya,{children:n}),r&&l.jsx(Ga,{children:r})]}),l.jsxs(qa,{children:[l.jsx(Le,{variant:"secondary",onClick:()=>e(!1),disabled:c,children:a}),l.jsxs(Le,{variant:i==="destructive"?"destructive":"default",onClick:d,disabled:c,children:[c&&l.jsx(J.Loader2,{className:"h-4 w-4 animate-spin"}),s]})]})]})})}const _o="onira-sidebar-collapsed",Tv=({to:t,children:e,className:n,onClick:r})=>l.jsx("a",{href:t,className:n,onClick:r,children:e});function Ev({item:t,collapsed:e,LinkComponent:n,onMobileClose:r}){const s=n??Tv,a=t.icon;return l.jsxs(s,{to:t.to,end:t.end,className:"oniratec-dashboard__nav-item",onClick:r,children:[a&&l.jsx(a,{className:"h-4 w-4 shrink-0"}),!e&&l.jsx("span",{className:"flex-1 truncate",children:t.label}),!e&&t.badge!==void 0&&l.jsx(va,{variant:"secondary",size:"sm",children:t.badge})]})}function ko({navSections:t,logo:e,appName:n,collapsed:r,LinkComponent:s,onMobileClose:a}){return l.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[l.jsxs("div",{className:"oniratec-dashboard__sidebar-header",children:[e&&l.jsx("div",{className:"shrink-0",children:e}),!r&&n&&l.jsx("span",{className:"oniratec-dashboard__app-name",children:n})]}),l.jsx("nav",{className:"oniratec-dashboard__nav",children:t.map((i,o)=>l.jsxs("div",{className:"oniratec-dashboard__nav-section",children:[!r&&i.title&&l.jsx("p",{className:"oniratec-dashboard__nav-section-title",children:i.title}),i.items.map(c=>l.jsx(Ev,{item:c,collapsed:r,LinkComponent:s,onMobileClose:a},c.to))]},o))})]})}function Ov({navSections:t,logo:e,appName:n,headerActions:r,children:s,LinkComponent:a}){const[i,o]=h.useState(()=>{try{return localStorage.getItem(_o)==="true"}catch{return!1}}),[c,d]=h.useState(!1),f=()=>{const u=!i;o(u);try{localStorage.setItem(_o,String(u))}catch{return}};return l.jsxs("div",{className:"oniratec-dashboard",children:[l.jsxs("aside",{className:"oniratec-dashboard__sidebar","data-collapsed":i?"true":void 0,children:[l.jsx(ko,{navSections:t,logo:e,appName:n,collapsed:i,LinkComponent:a}),l.jsx("button",{type:"button",onClick:f,className:"oniratec-dashboard__toggle","aria-label":i?"Expandir sidebar":"Colapsar sidebar",children:i?l.jsx(J.ChevronRight,{className:"h-3 w-3"}):l.jsx(J.ChevronLeft,{className:"h-3 w-3"})})]}),c&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"oniratec-dashboard__drawer-overlay md:hidden",onClick:()=>d(!1)}),l.jsxs("div",{className:"oniratec-dashboard__drawer md:hidden",children:[l.jsx("button",{type:"button",onClick:()=>d(!1),className:"oniratec-dashboard__drawer-close",children:l.jsx(J.X,{className:"h-5 w-5"})}),l.jsx(ko,{navSections:t,logo:e,appName:n,collapsed:!1,LinkComponent:a,onMobileClose:()=>d(!1)})]})]}),l.jsxs("div",{className:"oniratec-dashboard__main",children:[l.jsxs("header",{className:"oniratec-dashboard__header",children:[l.jsx("button",{type:"button",className:N("oniratec-dashboard__mobile-menu","md:hidden"),onClick:()=>d(!0),"aria-label":"Abrir menú",children:l.jsx(J.Menu,{className:"h-5 w-5"})}),l.jsx("div",{className:"hidden md:block"}),r&&l.jsx("div",{className:"oniratec-dashboard__header-actions",children:r})]}),l.jsx("main",{className:"oniratec-dashboard__content",children:s})]})]})}function So(t){return t?Array.isArray(t)?t:[t]:[]}function jv(t,e){return t==null&&e==null?0:t==null?1:e==null?-1:typeof t=="number"&&typeof e=="number"?t-e:typeof t=="boolean"&&typeof e=="boolean"?Number(t)-Number(e):t instanceof Date&&e instanceof Date?t.getTime()-e.getTime():String(t).localeCompare(String(e),void 0,{numeric:!0,sensitivity:"base"})}function ld({columns:t,data:e,enableSorting:n=!0,sortState:r,defaultSortState:s=null,onSortChange:a,unsortedIcon:i="muted",sortMode:o="single",manualSorting:c=!1,emptyContent:d,loadingContent:f,errorContent:u,isLoading:m=!1}){const[p,y]=x.useState(s),g=r!==void 0?r:p,w=So(g),v=x.useMemo(()=>new Map(t.map(b=>[b.key,b])),[t]),k=x.useMemo(()=>{if(c||!n||w.length===0)return e;const b=[...e];return b.sort((E,T)=>{for(const A of w){const V=v.get(A.columnId);if(!V)continue;const z=(V.sortFn??((B,G)=>{const Q=V.sortValue?.(B)??B[V.key],H=V.sortValue?.(G)??G[V.key];return jv(Q,H)}))(E,T);if(z!==0)return A.direction==="asc"?z:-z}return 0}),b},[e,c,w,v,n]),S=b=>{r===void 0&&y(b),a?.(b)},_=(b,E)=>{if(!(n&&(b.sortable??!!(b.sortFn||b.sortValue))))return;const A=So(g),V=A.find(z=>z.columnId===b.key),L=V?.direction==="asc"?"desc":V?.direction==="desc"?null:"asc";if(o==="multi"&&E){const z=A.filter(B=>B.columnId!==b.key);L&&z.push({columnId:b.key,direction:L}),S(z.length?z:null);return}if(!L){S(null);return}S({columnId:b.key,direction:L})};return l.jsx("div",{className:"oniratec-data-table",children:l.jsxs("table",{className:"oniratec-data-table__table",children:[l.jsx("thead",{className:"oniratec-data-table__head",children:l.jsx("tr",{className:"oniratec-data-table__head-row",children:t.map(b=>{const E=n&&(b.sortable??!!(b.sortFn||b.sortValue)),A=w.find(L=>L.columnId===b.key)?.direction,V=E?A==="asc"?"ascending":A==="desc"?"descending":"none":void 0;return l.jsx("th",{scope:"col","aria-sort":V,className:N("oniratec-data-table__th",b.headerClassName),children:E?l.jsxs("button",{type:"button",onClick:L=>_(b,L.shiftKey),className:"oniratec-data-table__sort-button",children:[l.jsx("span",{className:"flex-1",children:b.header}),l.jsxs("span",{className:N("oniratec-data-table__sort-icon",A&&"oniratec-data-table__sort-icon--active",!A&&i==="placeholder"&&"opacity-0",!A&&i==="hidden"&&"hidden"),"aria-hidden":"true",children:[A==="asc"&&l.jsx(J.ChevronUp,{className:"h-4 w-4"}),A==="desc"&&l.jsx(J.ChevronDown,{className:"h-4 w-4"}),!A&&i!=="hidden"&&l.jsx(J.ChevronsUpDown,{className:"h-4 w-4"})]})]}):b.header},b.key)})})}),l.jsx("tbody",{className:"oniratec-data-table__divider",children:u&&!m?l.jsx("tr",{children:l.jsx("td",{colSpan:t.length,className:"oniratec-data-table__empty",children:u})}):m?l.jsx("tr",{children:l.jsx("td",{colSpan:t.length,className:"oniratec-data-table__empty",children:f??"Cargando..."})}):k.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:t.length,className:"oniratec-data-table__empty",children:d??"No hay datos disponibles."})}):k.map((b,E)=>l.jsx("tr",{className:"oniratec-data-table__row",children:t.map(T=>l.jsx("td",{className:N("oniratec-data-table__td",T.className),children:T.render(b)},T.key))},E))})]})})}const Dv=[5,10,25,50],cd=({value:t,onChange:e,options:n=Dv})=>l.jsxs("div",{className:"flex items-center gap-2 text-[color:var(--oniratec-label-secondary)]",children:[l.jsx("span",{children:"Mostrar"}),l.jsxs(ms,{value:t.toString(),onValueChange:r=>{e(parseInt(r))},children:[l.jsx(Qn,{children:l.jsx(ps,{})}),l.jsx(er,{children:(n??[]).map(r=>l.jsx(tr,{value:r.toString(),children:String(r)},r))})]}),l.jsx("span",{children:"por página"})]}),Rv=({page:t,pageSize:e,total:n,onPageChange:r,onPageSizeChange:s})=>{const a=Math.ceil(n/e);if(a<=1&&n<=e)return null;const i=t+1,o="rounded-md border border-[color:var(--border-1)] px-3 py-1 text-[color:var(--text-1)] transition-colors hover:bg-[color:color-mix(in srgb, var(--brand) 12%, transparent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--focus)] disabled:opacity-50 disabled:cursor-not-allowed";return l.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-4 text-sm text-[color:var(--text-2)]",children:[l.jsxs("span",{children:["Página ",i," de ",a]}),l.jsx(cd,{value:e,onChange:s}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{disabled:t===0,onClick:()=>r(t-1),"aria-label":"Página anterior",className:o,children:"Anterior"}),l.jsx("button",{disabled:t+1>=a,onClick:()=>r(t+1),"aria-label":"Página siguiente",className:o,children:"Siguiente"})]})]})};function ud({filters:t,value:e,onChange:n,onReset:r,resetLabel:s="Resetear filtros",showReset:a=!0,className:i,layout:o="inline",actions:c}){const d=(u,m)=>{n({...e,[u]:m})},f=a&&!!r;return l.jsxs("section",{className:N("oniratec-filters-panel",i),children:[l.jsx("div",{className:N("oniratec-filters-panel__grid",o==="stacked"&&"oniratec-filters-panel__grid--stacked"),children:t.map(u=>l.jsxs("div",{className:"oniratec-filters-panel__filter",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"oniratec-filters-panel__label",children:u.label}),u.helperText&&l.jsx("span",{className:"oniratec-filters-panel__helper",children:u.helperText})]}),u.type==="text"&&l.jsx(Wn,{placeholder:u.placeholder,value:e[u.id]??"",onChange:m=>d(u.id,m.target.value),disabled:u.disabled}),u.type==="select"&&l.jsxs(ms,{value:e[u.id]??"",onValueChange:m=>d(u.id,m),disabled:u.disabled,children:[l.jsx(Qn,{children:l.jsx(ps,{placeholder:u.placeholder??"Seleccionar"})}),l.jsx(er,{children:u.options.map(m=>l.jsx(tr,{value:m.value,children:m.label},m.value))})]}),u.type==="async-select"&&l.jsx(Ka,{value:e[u.id]??"",onValueChange:m=>d(u.id,m),placeholder:u.placeholder,searchPlaceholder:u.searchPlaceholder,minChars:u.minChars,debounceMs:u.debounceMs,fetcher:u.fetcher,getOptionLabel:u.getOptionLabel,getOptionValue:u.getOptionValue,emptyLabel:u.emptyLabel,loadingLabel:u.loadingLabel,emptyActionLabel:u.emptyActionLabel,onEmptyActionClick:u.onEmptyActionClick,disabled:u.disabled}),u.type==="toggle"&&l.jsx(nr,{checked:e[u.id]??!1,onChange:m=>d(u.id,m),disabled:u.disabled,ariaLabel:u.label,label:u.description}),u.type==="date"&&l.jsx(as,{value:e[u.id]??null,onChange:m=>d(u.id,m??null),placeholder:u.placeholder,min:u.min,max:u.max,timeZone:u.timeZone,disabled:u.disabled})]},u.id))}),(f||c)&&l.jsxs("div",{className:"oniratec-filters-panel__actions",children:[f&&l.jsx(Le,{type:"button",variant:"ghost",onClick:r,children:s}),c&&l.jsx("div",{className:"oniratec-filters-panel__action-group",children:c})]})]})}function dd({title:t="Filtros",description:e,children:n,isOpen:r,onOpenChange:s,onApply:a,applyLabel:i="Aplicar filtros",closeLabel:o="Cerrar",className:c}){const d=x.useId(),f=e?`${d}-description`:void 0,u=r,m=x.useCallback(p=>{s(p)},[s]);return x.useEffect(()=>{if(!u)return;const p=y=>{y.key==="Escape"&&m(!1)};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[u,m]),x.useEffect(()=>{if(!u)return;const p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[u]),u?l.jsx("div",{className:"oniratec-filters-modal__overlay",children:l.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":f,className:N("oniratec-filters-modal__content",c),children:[l.jsxs("div",{className:"oniratec-filters-modal__header",children:[l.jsxs("div",{className:"oniratec-filters-modal__title-group",children:[l.jsx("h2",{id:d,className:"oniratec-filters-modal__title",children:t}),e&&l.jsx("p",{id:f,className:"oniratec-filters-modal__description",children:e})]}),l.jsx("button",{type:"button",onClick:()=>m(!1),className:"oniratec-filters-modal__close","aria-label":o,children:l.jsx(J.X,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"oniratec-filters-modal__body",children:n}),l.jsxs("div",{className:"oniratec-filters-modal__footer",children:[l.jsx(Le,{type:"button",variant:"ghost",onClick:()=>m(!1),children:o}),l.jsx(Le,{type:"button",onClick:()=>{a?.(),m(!1)},children:i})]})]})}):null}const Av=".csv,.xlsx";function Mv({title:t="Importar datos",description:e="Sube un fichero CSV o XLSX para ejecutar la importacion.",helperText:n="El sistema procesara cada fila de forma tolerante.",accept:r=Av,className:s,actionLabel:a="Importar",disabled:i=!1,loading:o=!1,summary:c,onImport:d}){const[f,u]=x.useState([]),m=f[0]??null,p=x.useMemo(()=>c?`Resultado: ${c.created} creados, ${c.updated} actualizados, ${c.failed} fallidos`:null,[c]),y=async()=>{!m||i||o||await d(m)};return l.jsxs("section",{className:N("oniratec-import-file-card",s),children:[l.jsxs("header",{className:"oniratec-import-file-card__header",children:[l.jsx("h3",{className:"oniratec-import-file-card__title",children:t}),l.jsx("p",{className:"oniratec-import-file-card__description",children:e})]}),l.jsx(fs,{files:f,onFilesChange:u,multiple:!1,accept:r,helperText:n,allowDrop:!0,showPreview:!1,disabled:i||o}),p&&l.jsx("p",{className:"oniratec-import-file-card__summary",children:p}),l.jsx("div",{className:"oniratec-import-file-card__footer",children:l.jsx(Le,{type:"button",variant:"primary",onClick:()=>{y()},disabled:!m||i,loading:o,children:a})})]})}function Iv({title:t,value:e,delta:n,deltaLabel:r,icon:s,description:a,loading:i=!1,className:o}){const c=n!==void 0&&n>=0;return i?l.jsxs(Tr,{className:N("oniratec-kpi-card",o),children:[l.jsx(Vr,{className:"mb-2 h-4 w-24"}),l.jsx(Vr,{className:"h-8 w-32"})]}):l.jsxs(Tr,{className:N("oniratec-kpi-card",o),children:[l.jsx(pa,{children:l.jsxs("div",{className:"oniratec-kpi-card__header",children:[l.jsx(ga,{className:"oniratec-kpi-card__label",children:t}),s&&l.jsx("div",{className:"oniratec-kpi-card__icon-wrapper",children:l.jsx(s,{})})]})}),l.jsxs(ya,{children:[l.jsx("div",{className:"oniratec-kpi-card__value",children:e}),(n!==void 0||a)&&l.jsxs("div",{className:"mt-1 flex items-center gap-1.5",children:[n!==void 0&&l.jsxs("span",{className:N("oniratec-kpi-card__delta",c?"oniratec-kpi-card__delta--positive":"oniratec-kpi-card__delta--negative"),children:[c?l.jsx(J.TrendingUp,{className:"h-3 w-3"}):l.jsx(J.TrendingDown,{className:"h-3 w-3"}),Math.abs(n),"%"]}),a&&l.jsx("p",{className:"oniratec-kpi-card__description",children:r??a})]})]})]})}function Pv({title:t,description:e,actions:n,className:r}){return l.jsxs("div",{className:N("oniratec-page-header",r),children:[l.jsxs("div",{className:"oniratec-page-header__content",children:[l.jsx("h1",{className:"oniratec-page-header__title",children:t}),e&&l.jsx("p",{className:"oniratec-page-header__description",children:e})]}),n&&l.jsx("div",{className:"oniratec-page-header__actions",children:n})]})}const $r=x.createContext({mode:"light",theme:"nova",tokens:{},isRoot:!1});function Fv({mode:t="light",theme:e="nova",tokens:n={},children:r}){const a=!x.useContext($r).isRoot,i=x.useRef({});return x.useEffect(()=>{if(!a)return;const o=document.documentElement;o.dataset.mode=t,o.dataset.theme=e,o.classList.toggle("dark",t==="dark"),o.style.colorScheme=t;const c=i.current,d=n;for(const f of Object.keys(c))f in d||o.style.removeProperty(f);for(const[f,u]of Object.entries(d))o.style.setProperty(f,u);i.current={...d}},[t,e,n,a]),x.useEffect(()=>{if(a)return()=>{const o=document.documentElement;for(const c of Object.keys(i.current))o.style.removeProperty(c)}},[a]),l.jsx($r.Provider,{value:{mode:t,theme:e,tokens:n,isRoot:!0},children:r})}function Lv(){const{mode:t,theme:e,tokens:n}=x.useContext($r);return{mode:t,theme:e,tokens:n}}var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},t.getValidEnumValues=s=>{const a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(const i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=r,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(re||(re={}));var No;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(No||(No={}));const R=re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),St=t=>{switch(typeof t){case"undefined":return R.undefined;case"string":return R.string;case"number":return Number.isNaN(t)?R.nan:R.number;case"boolean":return R.boolean;case"function":return R.function;case"bigint":return R.bigint;case"symbol":return R.symbol;case"object":return Array.isArray(t)?R.array:t===null?R.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?R.promise:typeof Map<"u"&&t instanceof Map?R.map:typeof Set<"u"&&t instanceof Set?R.set:typeof Date<"u"&&t instanceof Date?R.date:R.object;default:return R.unknown}},C=re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class yt extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},r={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let o=r,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(n(i))):o[d]=o[d]||{_errors:[]},o=o[d],c++}}};return s(this),r}static assert(e){if(!(e instanceof yt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];n[a]=n[a]||[],n[a].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}yt.create=t=>new yt(t);const ia=(t,e)=>{let n;switch(t.code){case C.invalid_type:t.received===R.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case C.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,re.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:n=`Unrecognized key(s) in object: ${re.joinValues(t.keys,", ")}`;break;case C.invalid_union:n="Invalid input";break;case C.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${re.joinValues(t.options)}`;break;case C.invalid_enum_value:n=`Invalid enum value. Expected ${re.joinValues(t.options)}, received '${t.received}'`;break;case C.invalid_arguments:n="Invalid function arguments";break;case C.invalid_return_type:n="Invalid function return type";break;case C.invalid_date:n="Invalid date";break;case C.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:re.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case C.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case C.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case C.custom:n="Invalid input";break;case C.invalid_intersection_types:n="Intersection results could not be merged";break;case C.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case C.not_finite:n="Number must be finite";break;default:n=e.defaultError,re.assertNever(t)}return{message:n}};let Vv=ia;function $v(){return Vv}const Wv=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,a=[...n,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const c=r.filter(d=>!!d).slice().reverse();for(const d of c)o=d(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}};function j(t,e){const n=$v(),r=Wv({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ia?void 0:ia].filter(s=>!!s)});t.common.issues.push(r)}class Ve{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return q;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const a=await s.key,i=await s.value;r.push({key:a,value:i})}return Ve.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return q;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const q=Object.freeze({status:"aborted"}),In=t=>({status:"dirty",value:t}),Ue=t=>({status:"valid",value:t}),Co=t=>t.status==="aborted",To=t=>t.status==="dirty",vn=t=>t.status==="valid",Wr=t=>typeof Promise<"u"&&t instanceof Promise;var M;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(M||(M={}));class Dt{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Eo=(t,e)=>{if(vn(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new yt(t.common.issues);return this._error=n,this._error}}};function K(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{const{message:c}=t;return i.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:c??n??o.defaultError}},description:s}}class ne{get description(){return this._def.description}_getType(e){return St(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:St(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ve,ctx:{common:e.parent.common,data:e.data,parsedType:St(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Wr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:St(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Eo(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:St(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return vn(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>vn(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:St(e)},s=this._parse({data:e,path:r.path,parent:r}),a=await(Wr(s)?s:Promise.resolve(s));return Eo(r,a)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:C.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new wn({schema:this,typeName:Y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Tt.create(this,this._def)}nullable(){return bn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ct.create(this)}promise(){return Ur.create(this,this._def)}or(e){return Zr.create([this,e],this._def)}and(e){return Br.create(this,e,this._def)}transform(e){return new wn({...K(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ca({...K(this._def),innerType:this,defaultValue:n,typeName:Y.ZodDefault})}brand(){return new u0({typeName:Y.ZodBranded,type:this,...K(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ua({...K(this._def),innerType:this,catchValue:n,typeName:Y.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ti.create(this,e)}readonly(){return da.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const zv=/^c[^\s-]{8,}$/i,Zv=/^[0-9a-z]+$/,Bv=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Uv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Hv=/^[a-z0-9_-]{21}$/i,qv=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Gv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $s;const Jv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Qv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,e0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,t0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,n0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",r0=new RegExp(`^${fd}$`);function hd(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function s0(t){return new RegExp(`^${hd(t)}$`)}function a0(t){let e=`${fd}T${hd(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function i0(t,e){return!!((e==="v4"||!e)&&Jv.test(t)||(e==="v6"||!e)&&Qv.test(t))}function o0(t,e){if(!qv.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function l0(t,e){return!!((e==="v4"||!e)&&Kv.test(t)||(e==="v6"||!e)&&e0.test(t))}class $t extends ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==R.string){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_type,expected:R.string,received:a.parsedType}),q}const r=new Ve;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?j(s,{code:C.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&j(s,{code:C.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Gv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"email",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")$s||($s=new RegExp(Xv,"u")),$s.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"emoji",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Uv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"uuid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Hv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"nanoid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")zv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"cuid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Zv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"cuid2",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Bv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"ulid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),j(s,{validation:"url",code:C.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"regex",code:C.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?a0(a).test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?r0.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?s0(a).test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Yv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"duration",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?i0(e.data,a.version)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"ip",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?o0(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"jwt",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?l0(e.data,a.version)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"cidr",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?t0.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"base64",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?n0.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"base64url",code:C.invalid_string,message:a.message}),r.dirty()):re.assertNever(a);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:C.invalid_string,...M.errToObj(r)})}_addCheck(e){return new $t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...M.errToObj(e)})}url(e){return this._addCheck({kind:"url",...M.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...M.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...M.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...M.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...M.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...M.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...M.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...M.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...M.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...M.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...M.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...M.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...M.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...M.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...M.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...M.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...M.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...M.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...M.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...M.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...M.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...M.errToObj(n)})}nonempty(e){return this.min(1,M.errToObj(e))}trim(){return new $t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}$t.create=t=>new $t({checks:[],typeName:Y.ZodString,coerce:t?.coerce??!1,...K(t)});function c0(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,a=Number.parseInt(t.toFixed(s).replace(".","")),i=Number.parseInt(e.toFixed(s).replace(".",""));return a%i/10**s}class zn extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==R.number){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_type,expected:R.number,received:a.parsedType}),q}let r;const s=new Ve;for(const a of this._def.checks)a.kind==="int"?re.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),j(r,{code:C.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?c0(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),j(r,{code:C.not_finite,message:a.message}),s.dirty()):re.assertNever(a);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,M.toString(n))}gt(e,n){return this.setLimit("min",e,!1,M.toString(n))}lte(e,n){return this.setLimit("max",e,!0,M.toString(n))}lt(e,n){return this.setLimit("max",e,!1,M.toString(n))}setLimit(e,n,r,s){return new zn({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:M.toString(s)}]})}_addCheck(e){return new zn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:M.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:M.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:M.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:M.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:M.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:M.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:M.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:M.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:M.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&re.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}zn.create=t=>new zn({checks:[],typeName:Y.ZodNumber,coerce:t?.coerce||!1,...K(t)});class Zn extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==R.bigint)return this._getInvalidInput(e);let r;const s=new Ve;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):re.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return j(n,{code:C.invalid_type,expected:R.bigint,received:n.parsedType}),q}gte(e,n){return this.setLimit("min",e,!0,M.toString(n))}gt(e,n){return this.setLimit("min",e,!1,M.toString(n))}lte(e,n){return this.setLimit("max",e,!0,M.toString(n))}lt(e,n){return this.setLimit("max",e,!1,M.toString(n))}setLimit(e,n,r,s){return new Zn({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:M.toString(s)}]})}_addCheck(e){return new Zn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:M.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:M.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:M.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:M.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:M.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Zn.create=t=>new Zn({checks:[],typeName:Y.ZodBigInt,coerce:t?.coerce??!1,...K(t)});class Oo extends ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==R.boolean){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.boolean,received:r.parsedType}),q}return Ue(e.data)}}Oo.create=t=>new Oo({typeName:Y.ZodBoolean,coerce:t?.coerce||!1,...K(t)});class zr extends ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==R.date){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_type,expected:R.date,received:a.parsedType}),q}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_date}),q}const r=new Ve;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):re.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new zr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:M.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:M.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}zr.create=t=>new zr({checks:[],coerce:t?.coerce||!1,typeName:Y.ZodDate,...K(t)});class jo extends ne{_parse(e){if(this._getType(e)!==R.symbol){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.symbol,received:r.parsedType}),q}return Ue(e.data)}}jo.create=t=>new jo({typeName:Y.ZodSymbol,...K(t)});class Do extends ne{_parse(e){if(this._getType(e)!==R.undefined){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.undefined,received:r.parsedType}),q}return Ue(e.data)}}Do.create=t=>new Do({typeName:Y.ZodUndefined,...K(t)});class Ro extends ne{_parse(e){if(this._getType(e)!==R.null){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.null,received:r.parsedType}),q}return Ue(e.data)}}Ro.create=t=>new Ro({typeName:Y.ZodNull,...K(t)});class oa extends ne{constructor(){super(...arguments),this._any=!0}_parse(e){return Ue(e.data)}}oa.create=t=>new oa({typeName:Y.ZodAny,...K(t)});class Ao extends ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ue(e.data)}}Ao.create=t=>new Ao({typeName:Y.ZodUnknown,...K(t)});class Rt extends ne{_parse(e){const n=this._getOrReturnCtx(e);return j(n,{code:C.invalid_type,expected:R.never,received:n.parsedType}),q}}Rt.create=t=>new Rt({typeName:Y.ZodNever,...K(t)});class Mo extends ne{_parse(e){if(this._getType(e)!==R.undefined){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.void,received:r.parsedType}),q}return Ue(e.data)}}Mo.create=t=>new Mo({typeName:Y.ZodVoid,...K(t)});class ct extends ne{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==R.array)return j(n,{code:C.invalid_type,expected:R.array,received:n.parsedType}),q;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,o=n.data.length<s.exactLength.value;(i||o)&&(j(n,{code:i?C.too_big:C.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(j(n,{code:C.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(j(n,{code:C.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,o)=>s.type._parseAsync(new Dt(n,i,n.path,o)))).then(i=>Ve.mergeArray(r,i));const a=[...n.data].map((i,o)=>s.type._parseSync(new Dt(n,i,n.path,o)));return Ve.mergeArray(r,a)}get element(){return this._def.type}min(e,n){return new ct({...this._def,minLength:{value:e,message:M.toString(n)}})}max(e,n){return new ct({...this._def,maxLength:{value:e,message:M.toString(n)}})}length(e,n){return new ct({...this._def,exactLength:{value:e,message:M.toString(n)}})}nonempty(e){return this.min(1,e)}}ct.create=(t,e)=>new ct({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Y.ZodArray,...K(e)});function ln(t){if(t instanceof ye){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Tt.create(ln(r))}return new ye({...t._def,shape:()=>e})}else return t instanceof ct?new ct({...t._def,type:ln(t.element)}):t instanceof Tt?Tt.create(ln(t.unwrap())):t instanceof bn?bn.create(ln(t.unwrap())):t instanceof Ut?Ut.create(t.items.map(e=>ln(e))):t}class ye extends ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=re.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==R.object){const d=this._getOrReturnCtx(e);return j(d,{code:C.invalid_type,expected:R.object,received:d.parsedType}),q}const{status:r,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Rt&&this._def.unknownKeys==="strip"))for(const d in s.data)i.includes(d)||o.push(d);const c=[];for(const d of i){const f=a[d],u=s.data[d];c.push({key:{status:"valid",value:d},value:f._parse(new Dt(s,u,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof Rt){const d=this._def.unknownKeys;if(d==="passthrough")for(const f of o)c.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(d==="strict")o.length>0&&(j(s,{code:C.unrecognized_keys,keys:o}),r.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const f of o){const u=s.data[f];c.push({key:{status:"valid",value:f},value:d._parse(new Dt(s,u,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const d=[];for(const f of c){const u=await f.key,m=await f.value;d.push({key:u,value:m,alwaysSet:f.alwaysSet})}return d}).then(d=>Ve.mergeObjectSync(r,d)):Ve.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return M.errToObj,new ye({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:M.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ye({...this._def,unknownKeys:"strip"})}passthrough(){return new ye({...this._def,unknownKeys:"passthrough"})}extend(e){return new ye({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ye({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Y.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new ye({...this._def,catchall:e})}pick(e){const n={};for(const r of re.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new ye({...this._def,shape:()=>n})}omit(e){const n={};for(const r of re.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new ye({...this._def,shape:()=>n})}deepPartial(){return ln(this)}partial(e){const n={};for(const r of re.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new ye({...this._def,shape:()=>n})}required(e){const n={};for(const r of re.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Tt;)a=a._def.innerType;n[r]=a}return new ye({...this._def,shape:()=>n})}keyof(){return md(re.objectKeys(this.shape))}}ye.create=(t,e)=>new ye({shape:()=>t,unknownKeys:"strip",catchall:Rt.create(),typeName:Y.ZodObject,...K(e)});ye.strictCreate=(t,e)=>new ye({shape:()=>t,unknownKeys:"strict",catchall:Rt.create(),typeName:Y.ZodObject,...K(e)});ye.lazycreate=(t,e)=>new ye({shape:t,unknownKeys:"strip",catchall:Rt.create(),typeName:Y.ZodObject,...K(e)});class Zr extends ne{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new yt(o.ctx.common.issues));return j(n,{code:C.invalid_union,unionErrors:i}),q}if(n.common.async)return Promise.all(r.map(async a=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const c of r){const d={...n,common:{...n.common,issues:[]},parent:null},f=c._parseSync({data:n.data,path:n.path,parent:d});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new yt(c));return j(n,{code:C.invalid_union,unionErrors:o}),q}}get options(){return this._def.options}}Zr.create=(t,e)=>new Zr({options:t,typeName:Y.ZodUnion,...K(e)});function la(t,e){const n=St(t),r=St(e);if(t===e)return{valid:!0,data:t};if(n===R.object&&r===R.object){const s=re.objectKeys(e),a=re.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(const o of a){const c=la(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(n===R.array&&r===R.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<t.length;a++){const i=t[a],o=e[a],c=la(i,o);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===R.date&&r===R.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Br extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(a,i)=>{if(Co(a)||Co(i))return q;const o=la(a.value,i.value);return o.valid?((To(a)||To(i))&&n.dirty(),{status:n.value,value:o.data}):(j(r,{code:C.invalid_intersection_types}),q)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Br.create=(t,e,n)=>new Br({left:t,right:e,typeName:Y.ZodIntersection,...K(n)});class Ut extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.array)return j(r,{code:C.invalid_type,expected:R.array,received:r.parsedType}),q;if(r.data.length<this._def.items.length)return j(r,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&r.data.length>this._def.items.length&&(j(r,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Dt(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>Ve.mergeArray(n,i)):Ve.mergeArray(n,a)}get items(){return this._def.items}rest(e){return new Ut({...this._def,rest:e})}}Ut.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ut({items:t,typeName:Y.ZodTuple,rest:null,...K(e)})};class Io extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.map)return j(r,{code:C.invalid_type,expected:R.map,received:r.parsedType}),q;const s=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,c],d)=>({key:s._parse(new Dt(r,o,r.path,[d,"key"])),value:a._parse(new Dt(r,c,r.path,[d,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const d=await c.key,f=await c.value;if(d.status==="aborted"||f.status==="aborted")return q;(d.status==="dirty"||f.status==="dirty")&&n.dirty(),o.set(d.value,f.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const c of i){const d=c.key,f=c.value;if(d.status==="aborted"||f.status==="aborted")return q;(d.status==="dirty"||f.status==="dirty")&&n.dirty(),o.set(d.value,f.value)}return{status:n.value,value:o}}}}Io.create=(t,e,n)=>new Io({valueType:e,keyType:t,typeName:Y.ZodMap,...K(n)});class Bn extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.set)return j(r,{code:C.invalid_type,expected:R.set,received:r.parsedType}),q;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(j(r,{code:C.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(j(r,{code:C.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const a=this._def.valueType;function i(c){const d=new Set;for(const f of c){if(f.status==="aborted")return q;f.status==="dirty"&&n.dirty(),d.add(f.value)}return{status:n.value,value:d}}const o=[...r.data.values()].map((c,d)=>a._parse(new Dt(r,c,r.path,d)));return r.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,n){return new Bn({...this._def,minSize:{value:e,message:M.toString(n)}})}max(e,n){return new Bn({...this._def,maxSize:{value:e,message:M.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Bn.create=(t,e)=>new Bn({valueType:t,minSize:null,maxSize:null,typeName:Y.ZodSet,...K(e)});class Po extends ne{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Po.create=(t,e)=>new Po({getter:t,typeName:Y.ZodLazy,...K(e)});class Fo extends ne{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return j(n,{received:n.data,code:C.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}}Fo.create=(t,e)=>new Fo({value:t,typeName:Y.ZodLiteral,...K(e)});function md(t,e){return new xn({values:t,typeName:Y.ZodEnum,...K(e)})}class xn extends ne{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return j(n,{expected:re.joinValues(r),received:n.parsedType,code:C.invalid_type}),q}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return j(n,{received:n.data,code:C.invalid_enum_value,options:r}),q}return Ue(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return xn.create(e,{...this._def,...n})}exclude(e,n=this._def){return xn.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}xn.create=md;class Lo extends ne{_parse(e){const n=re.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==R.string&&r.parsedType!==R.number){const s=re.objectValues(n);return j(r,{expected:re.joinValues(s),received:r.parsedType,code:C.invalid_type}),q}if(this._cache||(this._cache=new Set(re.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=re.objectValues(n);return j(r,{received:r.data,code:C.invalid_enum_value,options:s}),q}return Ue(e.data)}get enum(){return this._def.values}}Lo.create=(t,e)=>new Lo({values:t,typeName:Y.ZodNativeEnum,...K(e)});class Ur extends ne{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==R.promise&&n.common.async===!1)return j(n,{code:C.invalid_type,expected:R.promise,received:n.parsedType}),q;const r=n.parsedType===R.promise?n.data:Promise.resolve(n.data);return Ue(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ur.create=(t,e)=>new Ur({type:t,typeName:Y.ZodPromise,...K(e)});class wn extends ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{j(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(n.value==="aborted")return q;const c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return c.status==="aborted"?q:c.status==="dirty"||n.value==="dirty"?In(c.value):c});{if(n.value==="aborted")return q;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?q:o.status==="dirty"||n.value==="dirty"?In(o.value):o}}if(s.type==="refinement"){const i=o=>{const c=s.refinement(o,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?q:(o.status==="dirty"&&n.dirty(),i(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?q:(o.status==="dirty"&&n.dirty(),i(o.value).then(()=>({status:n.value,value:o.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!vn(i))return q;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>vn(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:n.value,value:o})):q);re.assertNever(s)}}wn.create=(t,e,n)=>new wn({schema:t,typeName:Y.ZodEffects,effect:e,...K(n)});wn.createWithPreprocess=(t,e,n)=>new wn({schema:e,effect:{type:"preprocess",transform:t},typeName:Y.ZodEffects,...K(n)});class Tt extends ne{_parse(e){return this._getType(e)===R.undefined?Ue(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tt.create=(t,e)=>new Tt({innerType:t,typeName:Y.ZodOptional,...K(e)});class bn extends ne{_parse(e){return this._getType(e)===R.null?Ue(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}bn.create=(t,e)=>new bn({innerType:t,typeName:Y.ZodNullable,...K(e)});class ca extends ne{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===R.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ca.create=(t,e)=>new ca({innerType:t,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...K(e)});class ua extends ne{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Wr(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new yt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new yt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ua.create=(t,e)=>new ua({innerType:t,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...K(e)});class Vo extends ne{_parse(e){if(this._getType(e)!==R.nan){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.nan,received:r.parsedType}),q}return{status:"valid",value:e.data}}}Vo.create=t=>new Vo({typeName:Y.ZodNaN,...K(t)});class u0 extends ne{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ti extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?q:a.status==="dirty"?(n.dirty(),In(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?q:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new ti({in:e,out:n,typeName:Y.ZodPipeline})}}class da extends ne{_parse(e){const n=this._def.innerType._parse(e),r=s=>(vn(s)&&(s.value=Object.freeze(s.value)),s);return Wr(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}da.create=(t,e)=>new da({innerType:t,typeName:Y.ZodReadonly,...K(e)});var Y;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Y||(Y={}));const d0=oa.create;Rt.create;ct.create;const f0=ye.create;Zr.create;Br.create;Ut.create;xn.create;Ur.create;Tt.create;bn.create;function h0(t){const e=[];for(const n of t.sections)for(const r of n.fields)Array.isArray(r)?e.push(...r):e.push(r);return e}function m0(t){const e={};for(const r of t.sections)for(const s of r.fields){const a=Array.isArray(s)?s:[s];for(const i of a)e[i.name]=i.schema??d0().optional()}let n=f0(e);return t.crossRules?.length&&(n=n.superRefine((r,s)=>{for(const a of t.crossRules)a(r,s)})),n}function p0(t,e){const n=t.defaultValues?.(e)??{},r=h0(t),s={...n};for(const a of r)a.defaultValue!==void 0&&s[a.name]===void 0&&(s[a.name]=a.defaultValue);return s}var g0=t=>t.type==="checkbox",Pn=t=>t instanceof Date,ni=t=>t==null;const pd=t=>typeof t=="object";var Ht=t=>!ni(t)&&!Array.isArray(t)&&pd(t)&&!Pn(t),y0=t=>Ht(t)&&t.target?g0(t.target)?t.target.checked:t.target.value:t,v0=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,x0=(t,e)=>t.has(v0(e)),w0=t=>{const e=t.constructor&&t.constructor.prototype;return Ht(e)&&e.hasOwnProperty("isPrototypeOf")},b0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function gd(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(b0&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(Ht(t)&&w0(t)))return t;const r=n?[]:Object.create(Object.getPrototypeOf(t));for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=gd(t[s]));return r}var yd=t=>/^\w*$/.test(t),fa=t=>t===void 0,_0=t=>Array.isArray(t)?t.filter(Boolean):[],vd=t=>_0(t.replace(/["|']|\]/g,"").split(/\.|\[/)),je=(t,e,n)=>{if(!e||!Ht(t))return n;const r=(yd(e)?[e]:vd(e)).reduce((s,a)=>ni(s)?s:s[a],t);return fa(r)||r===t?fa(t[e])?n:t[e]:r},Ws=t=>typeof t=="boolean",vr=t=>typeof t=="function",$o=(t,e,n)=>{let r=-1;const s=yd(e)?[e]:vd(e),a=s.length,i=a-1;for(;++r<a;){const o=s[r];let c=n;if(r!==i){const d=t[o];c=Ht(d)||Array.isArray(d)?d:isNaN(+s[r+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;t[o]=c,t=t[o]}};const Wo={BLUR:"blur",CHANGE:"change"},zo={all:"all"},ri=x.createContext(null);ri.displayName="HookFormContext";const si=()=>x.useContext(ri),k0=t=>{const{children:e,...n}=t;return x.createElement(ri.Provider,{value:n},e)};var S0=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const a in t)Object.defineProperty(s,a,{get:()=>{const i=a;return e._proxyFormState[i]!==zo.all&&(e._proxyFormState[i]=!r||zo.all),n&&(n[i]=!0),t[i]}});return s};const xd=typeof window<"u"?x.useLayoutEffect:x.useEffect;function N0(t){const e=si(),{control:n=e.control,disabled:r,name:s,exact:a}=t||{},[i,o]=x.useState(n._formState),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return xd(()=>n._subscribe({name:s,formState:c.current,exact:a,callback:d=>{!r&&o({...n._formState,...d})}}),[s,r,a]),x.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),x.useMemo(()=>S0(i,n,c.current,!1),[i,n])}var C0=t=>typeof t=="string",Zo=(t,e,n,r,s)=>C0(t)?je(n,t,s):Array.isArray(t)?t.map(a=>je(n,a)):n,Bo=t=>ni(t)||!pd(t);function Cr(t,e,n=new WeakSet){if(Bo(t)||Bo(e))return Object.is(t,e);if(Pn(t)&&Pn(e))return Object.is(t.getTime(),e.getTime());const r=Object.keys(t),s=Object.keys(e);if(r.length!==s.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const a of r){const i=t[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=e[a];if(Pn(i)&&Pn(o)||Ht(i)&&Ht(o)||Array.isArray(i)&&Array.isArray(o)?!Cr(i,o,n):!Object.is(i,o))return!1}}return!0}function wd(t){const e=si(),{control:n=e.control,name:r,defaultValue:s,disabled:a,exact:i,compute:o}=t||{},c=x.useRef(s),d=x.useRef(o),f=x.useRef(void 0),u=x.useRef(n),m=x.useRef(r);d.current=o;const[p,y]=x.useState(()=>{const _=n._getWatch(r,c.current);return d.current?d.current(_):_}),g=x.useCallback(_=>{const b=Zo(r,n._names,_||n._formValues,!1,c.current);return d.current?d.current(b):b},[n._formValues,n._names,r]),w=x.useCallback(_=>{if(!a){const b=Zo(r,n._names,_||n._formValues,!1,c.current);if(d.current){const E=d.current(b);Cr(E,f.current)||(y(E),f.current=E)}else y(b)}},[n._formValues,n._names,a,r]);xd(()=>((u.current!==n||!Cr(m.current,r))&&(u.current=n,m.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:i,callback:_=>{w(_.values)}})),[n,i,r,w]),x.useEffect(()=>n._removeUnmounted());const v=u.current!==n,k=m.current,S=x.useMemo(()=>{if(a)return null;const _=!v&&!Cr(k,r);return v||_?g():null},[a,v,r,k,g]);return S!==null?S:p}function T0(t){const e=si(),{name:n,disabled:r,control:s=e.control,shouldUnregister:a,defaultValue:i,exact:o=!0}=t,c=x0(s._names.array,n),d=x.useMemo(()=>je(s._formValues,n,je(s._defaultValues,n,i)),[s,n,i]),f=wd({control:s,name:n,defaultValue:d,exact:o}),u=N0({control:s,name:n,exact:o}),m=x.useRef(t),p=x.useRef(void 0),y=x.useRef(s.register(n,{...t.rules,value:f,...Ws(t.disabled)?{disabled:t.disabled}:{}}));m.current=t;const g=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!je(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!je(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!je(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!je(u.validatingFields,n)},error:{enumerable:!0,get:()=>je(u.errors,n)}}),[u,n]),w=x.useCallback(_=>y.current.onChange({target:{value:y0(_),name:n},type:Wo.CHANGE}),[n]),v=x.useCallback(()=>y.current.onBlur({target:{value:je(s._formValues,n),name:n},type:Wo.BLUR}),[n,s._formValues]),k=x.useCallback(_=>{const b=je(s._fields,n);b&&b._f&&_&&(b._f.ref={focus:()=>vr(_.focus)&&_.focus(),select:()=>vr(_.select)&&_.select(),setCustomValidity:E=>vr(_.setCustomValidity)&&_.setCustomValidity(E),reportValidity:()=>vr(_.reportValidity)&&_.reportValidity()})},[s._fields,n]),S=x.useMemo(()=>({name:n,value:f,...Ws(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:w,onBlur:v,ref:k}),[n,r,u.disabled,w,v,k,f]);return x.useEffect(()=>{const _=s._options.shouldUnregister||a,b=p.current;b&&b!==n&&!c&&s.unregister(b),s.register(n,{...m.current.rules,...Ws(m.current.disabled)?{disabled:m.current.disabled}:{}});const E=(T,A)=>{const V=je(s._fields,T);V&&V._f&&(V._f.mount=A)};if(E(n,!0),_){const T=gd(je(s._options.defaultValues,n,m.current.defaultValue));$o(s._defaultValues,n,T),fa(je(s._formValues,n))&&$o(s._formValues,n,T)}return!c&&s.register(n),p.current=n,()=>{(c?_&&!s._state.action:_)?s.unregister(n):E(n,!1)}},[n,s,c,a]),x.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),x.useMemo(()=>({field:S,formState:u,fieldState:g}),[S,u,g])}const E0=t=>t.render(T0(t));function O0({form:t,field:e}){const[n,r]=x.useState(!1);return l.jsx(E0,{control:t.control,name:e.name,render:({field:s,fieldState:{error:a}})=>{const i=d=>e.normalize?e.normalize(d):d,o=()=>{e.deps?.onChangeTrigger&&t.trigger(e.deps.onChangeTrigger)},c={className:e.className,error:a?.message,required:!e.schema?.isOptional?.()};switch(e.kind){case"custom":if(!e.render)throw new Error(`Field ${e.name} marked as custom but has no render function`);return l.jsx("div",{className:e.className,children:e.render({form:t})});case"input":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(Wn,{type:"text",placeholder:e.placeholder,value:s.value??"",onChange:d=>{s.onChange(i(d.target.value)),o()},onBlur:s.onBlur})}),l.jsx(Ke,{})]});case"password":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsxs("div",{className:"relative flex w-full items-center",children:[l.jsx(Je,{children:l.jsx(Wn,{type:n?"text":"password",placeholder:e.placeholder,value:s.value??"",className:"pr-10",onChange:d=>{const f=d.target.value;s.onChange(i(f)),o()},onBlur:s.onBlur})}),l.jsx(Le,{type:"button",variant:"ghost",className:"absolute right-3 flex items-center justify-center text-slate-400 hover:text-slate-600 focus:outline-none",onClick:()=>r(!n),tabIndex:-1,children:n?l.jsx(J.EyeOff,{className:"h-4 w-4"}):l.jsx(J.Eye,{className:"h-4 w-4"})})]}),l.jsx(Ke,{})]});case"textarea":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx("textarea",{className:"oniratec-field__textarea",value:s.value??"",placeholder:e.placeholder,rows:4,onChange:d=>{s.onChange(i(d.target.value)),o()},onBlur:s.onBlur})}),l.jsx(Ke,{})]});case"select":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsxs(ms,{value:s.value||void 0,onValueChange:d=>{s.onChange(i(d||void 0)),o()},children:[l.jsx(Qn,{children:l.jsx(ps,{})}),l.jsx(er,{children:(e.options??[]).map(d=>l.jsx(tr,{value:String(d.value),children:d.label},d.value))})]})}),l.jsx(Ke,{})]});case"asyncSelect":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(Ka,{value:s.value||void 0,onValueChange:d=>{s.onChange(i(d)),o()},placeholder:e.placeholder,searchPlaceholder:e.searchPlaceholder,minChars:e.minChars,debounceMs:e.debounceMs,fetcher:e.fetcher,getOptionValue:e.getOptionValue,getOptionLabel:e.getOptionLabel,emptyLabel:e.emptyLabel,emptyActionLabel:e.emptyActionLabel,onEmptyActionClick:e.onEmptyActionClick,hasError:!!a?.message})}),l.jsx(Ke,{})]});case"toggle":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(nr,{checked:!!s.value,onChange:d=>{s.onChange(i(d)),o()}})}),l.jsx(Ke,{})]});case"checkbox":return l.jsxs(Xe,{...c,children:[l.jsx(Je,{children:l.jsxs("label",{className:"oniratec-checkbox",children:[l.jsx("input",{type:"checkbox",checked:!!s.value,onChange:d=>{s.onChange(i(d.target.checked)),o()},onBlur:s.onBlur}),l.jsx("span",{children:e.label})]})}),l.jsx(Ke,{})]});case"date":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(as,{value:s.value,onChange:d=>{s.onChange(i(d)),o()},placeholder:e.placeholder,min:e.min,max:e.max,timeZone:e.timeZone,isInvalid:!!a?.message})}),l.jsx(Ke,{})]});case"fileUpload":{const d=Array.isArray(s.value)?s.value:[];return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(fs,{files:d,onFilesChange:f=>{s.onChange(i(f)),o()},accept:e.accept,multiple:e.multiple,helperText:e.helperText,allowDrop:e.allowDrop,placeholder:e.placeholder,defaultPreviewUrl:e.defaultPreviewUrl})}),l.jsx(Ke,{})]})}}}})}function j0(t){return Array.isArray(t)?t:[t]}function bd({config:t,form:e,onSubmitAction:n,handleErrors:r,submitLabel:s,maxWidthClass:a,children:i}){const o=wd({control:e.control});return l.jsx(k0,{...e,children:l.jsxs("form",{onSubmit:e.handleSubmit(n,c=>r(c)),className:N("space-y-8",a),children:[t.sections.map((c,d)=>l.jsxs(x.Fragment,{children:[l.jsxs("section",{className:"space-y-4",children:[l.jsx("h3",{className:"oniratec-form__section-title",children:c.title}),l.jsx("div",{className:"space-y-4",children:c.fields.map((f,u)=>{const m=j0(f).filter(g=>!g.hidden?.(o));if(!m.length)return null;const p=m.reduce((g,w)=>g+(w.colSpan??1),0),y=p>1?N("grid gap-4",p===2&&"grid-cols-2",p===3&&"grid-cols-3",p===4&&"grid-cols-4"):"";return l.jsx("div",{className:y,children:m.map(g=>l.jsx("div",{className:g.colSpan?`col-span-${g.colSpan}`:void 0,children:l.jsx(O0,{form:e,field:g})},g.name))},u)})})]},c.title),d<t.sections.length-1&&l.jsx(x.Fragment,{children:l.jsx("hr",{className:"oniratec-form__separator"})})]},`fragment-${c.title}`)),i,l.jsx("div",{className:"oniratec-form__actions",children:l.jsx(Le,{type:"submit",loading:e.formState.isSubmitting,children:s})})]})})}function D0(t){return l.jsx(bd,{...t})}const R0=t=>t==="center"?"text-center":t==="right"?"text-right":"text-left",A0=t=>{if(t)return typeof t=="number"?`w-[${t}px]`:t.startsWith("w-")?t:`w-[${t}]`},M0=t=>t?Array.isArray(t)?t:[t]:[];function _d(t){return{columns:t.columns.map(r=>{const s=R0(r.align),a=A0(r.width),i=[s,a,r.className].filter(Boolean).join(" "),o=[s,a,r.headerClassName].filter(Boolean).join(" ");return{key:r.id,header:r.header,render:r.cell??(c=>String(r.accessor?.(c)??"")),className:i||void 0,headerClassName:o||void 0,sortable:r.sortable??!!(r.sortFn||r.accessor),sortFn:r.sortFn,sortValue:r.accessor}}),getSortDirection:(r,s)=>M0(r).find(o=>o.columnId===s)?.direction??null}}function I0(t,e,n){const{columns:r}=_d(t);return l.jsx(ld,{columns:r,data:e,...n})}const P0=t=>t.reduce((e,n)=>n.type==="toggle"?(e[n.id]=n.value??!1,e):n.type==="date"?(e[n.id]=n.value??null,e):(e[n.id]=n.value??"",e),{});function F0(t){const e=P0(t.filters),n=(a,i,o)=>({...a,[i]:o}),r=()=>({...e}),s=a=>t.buildQueryParams?t.buildQueryParams(a):a;return{filters:t.filters,initialState:e,updateFilter:n,resetState:r,buildQueryParams:s}}function kd(t,e,n,r){return l.jsx(ud,{filters:t.filters,value:e,onChange:n,onReset:r?.onReset,resetLabel:r?.resetLabel,showReset:r?.showReset,className:r?.className,layout:r?.layout,actions:r?.actions})}function L0(t,e,n,r){return l.jsx(dd,{title:r.title,description:r.description,isOpen:r.isOpen,onOpenChange:r.onOpenChange,onApply:r.onApply,applyLabel:r.applyLabel,closeLabel:r.closeLabel,className:r.className,children:kd(t,e,n,r.panel)})}function V0(t,e,n){const r=new Set(t.filter(s=>s.type==="date").map(s=>s.id));return Object.entries(e).reduce((s,[a,i])=>i==null?(s[a]=void 0,s):r.has(a)&&i instanceof Date?(s[a]=ru(i,n?.timeZone)??void 0,s):(s[a]=i,s),{})}function $0(...t){return Uo.twMerge(ha.clsx(t))}exports.Alert=al;exports.AlertDescription=ol;exports.AlertTitle=il;exports.AsyncSelect=Ka;exports.AuthLayout=od;exports.Badge=va;exports.Box=Jo;exports.Breadcrumbs=Nv;exports.Button=Le;exports.Card=Tr;exports.CardAction=rl;exports.CardContent=ya;exports.CardDescription=nl;exports.CardFooter=sl;exports.CardHeader=pa;exports.CardTitle=ga;exports.Checkbox=ll;exports.ConfirmDialog=Cv;exports.DEFAULT_TIME_ZONE=Pr;exports.DashboardLayout=Ov;exports.DataTable=ld;exports.DatePicker=as;exports.Dialog=ku;exports.DialogClose=by;exports.DialogContent=Ua;exports.DialogDescription=Ga;exports.DialogFooter=qa;exports.DialogHeader=Ha;exports.DialogOverlay=Ba;exports.DialogPortal=Su;exports.DialogTitle=Ya;exports.DialogTrigger=wy;exports.DropdownMenu=_y;exports.DropdownMenuCheckboxItem=Tu;exports.DropdownMenuContent=Nu;exports.DropdownMenuGroup=Sy;exports.DropdownMenuItem=Cu;exports.DropdownMenuLabel=Ou;exports.DropdownMenuPortal=Ny;exports.DropdownMenuRadioGroup=Ty;exports.DropdownMenuRadioItem=Eu;exports.DropdownMenuSeparator=ju;exports.DropdownMenuShortcut=Au;exports.DropdownMenuSub=Cy;exports.DropdownMenuSubContent=Ru;exports.DropdownMenuSubTrigger=Du;exports.DropdownMenuTrigger=ky;exports.Field=Xe;exports.FieldControl=Je;exports.FieldLabel=at;exports.FieldMessage=Ke;exports.FilePicker=jy;exports.FileUpload=fs;exports.FiltersModal=dd;exports.FiltersPanel=ud;exports.FormFactoryRenderer=bd;exports.ImportFileCard=Mv;exports.Input=Wn;exports.Kbd=Pu;exports.KpiCard=Iv;exports.Logo=tl;exports.NotFoundState=Fu;exports.PageHeader=Pv;exports.PageSizeSelector=cd;exports.Pagination=Rv;exports.PasswordInput=Iu;exports.PersonAvatar=tf;exports.ProfileAvatar=nf;exports.Progress=Lu;exports.RadioGroup=Ry;exports.RadioGroupItem=$u;exports.Select=ms;exports.SelectContent=er;exports.SelectGroup=Ay;exports.SelectItem=tr;exports.SelectLabel=Wu;exports.SelectScrollDownButton=Ja;exports.SelectScrollUpButton=Xa;exports.SelectSeparator=zu;exports.SelectTrigger=Qn;exports.SelectValue=ps;exports.Separator=Zu;exports.Sheet=Iy;exports.SheetClose=Fy;exports.SheetContent=Uu;exports.SheetDescription=Gu;exports.SheetFooter=qu;exports.SheetHeader=Hu;exports.SheetOverlay=Qa;exports.SheetPortal=Bu;exports.SheetTitle=Yu;exports.SheetTrigger=Py;exports.Skeleton=Vr;exports.Switch=Hy;exports.Tabs=Ly;exports.TabsContent=ed;exports.TabsList=Ku;exports.TabsTrigger=Qu;exports.Textarea=Xu;exports.ThemeContext=$r;exports.ThemeProvider=Fv;exports.Toaster=bv;exports.Toggle=nr;exports.Tooltip=kv;exports.TooltipContent=id;exports.TooltipProvider=_v;exports.TooltipTrigger=Sv;exports.buildDefaultValues=p0;exports.buildFiltersQueryParams=V0;exports.buildZodSchema=m0;exports.buttonVariants=el;exports.cn=$0;exports.createFiltersFactory=F0;exports.createTableFactory=_d;exports.isValidTimeZone=Fr;exports.renderFiltersModal=L0;exports.renderFiltersPanel=kd;exports.renderFormFactory=D0;exports.renderTable=I0;exports.resolveTimeZone=Kn;exports.setDefaultTimeZone=ry;exports.toDateTime=sy;exports.toISODate=ru;exports.toISODateTime=ay;exports.toast=cv;exports.useField=hs;exports.useTheme=Lv;
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return h.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},my="DialogDescriptionWarning",py=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wu(my).contentName}}.`;return h.useEffect(()=>{const s=t.current?.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},bu=iu,_u=lu,ku=uu,os=du,ls=fu,cs=mu,us=gu,ds=vu;const Su=bu,gy=_u,Nu=ku,yy=ds,Ua=h.forwardRef(({className:t,...e},n)=>l.jsx(os,{ref:n,className:N("oniratec-dialog__overlay",t),...e}));Ua.displayName=os.displayName;const Ha=h.forwardRef(({className:t,children:e,hideClose:n,size:r="md",...s},a)=>l.jsxs(Nu,{children:[l.jsx(Ua,{}),l.jsxs(ls,{ref:a,"data-size":r,className:N("oniratec-dialog__content",t),...s,children:[e,!n&&l.jsx(ds,{asChild:!0,children:l.jsxs(Le,{variant:"ghost",size:"icon-sm",className:"absolute right-2 top-2","aria-label":"Cerrar",children:[l.jsx(J.X,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Cerrar"})]})})]})]}));Ha.displayName=ls.displayName;const qa=({className:t,...e})=>l.jsx("div",{className:N("oniratec-dialog__header",t),...e});qa.displayName="DialogHeader";const Ya=({className:t,...e})=>l.jsx("div",{className:N("oniratec-dialog__footer",t),...e});Ya.displayName="DialogFooter";const Ga=h.forwardRef(({className:t,...e},n)=>l.jsx(cs,{ref:n,className:N("oniratec-dialog__title",t),...e}));Ga.displayName=cs.displayName;const Xa=h.forwardRef(({className:t,...e},n)=>l.jsx(us,{ref:n,className:N("oniratec-dialog__description",t),...e}));Xa.displayName=us.displayName;const vy=fe.Root,xy=fe.Trigger,wy=fe.Group,by=fe.Portal,_y=fe.Sub,ky=fe.RadioGroup,Cu=h.forwardRef(({className:t,sideOffset:e=6,...n},r)=>l.jsx(fe.Portal,{children:l.jsx(fe.Content,{ref:r,sideOffset:e,className:N("oniratec-dropdown",t),...n})}));Cu.displayName=fe.Content.displayName;const Tu=h.forwardRef(({className:t,inset:e,icon:n,destructive:r,children:s,...a},i)=>l.jsxs(fe.Item,{ref:i,className:N("oniratec-dropdown__item",e&&"oniratec-dropdown__item--inset",r&&"text-destructive",t),...a,children:[n&&l.jsx("span",{className:"oniratec-dropdown__icon",children:n}),s]}));Tu.displayName=fe.Item.displayName;const Eu=h.forwardRef(({className:t,children:e,checked:n,...r},s)=>l.jsxs(fe.CheckboxItem,{ref:s,className:N("oniratec-dropdown__item",t),checked:n,...r,children:[l.jsx("span",{className:"oniratec-dropdown__indicator",children:l.jsx(fe.ItemIndicator,{children:l.jsx(J.Check,{className:"h-4 w-4"})})}),e]}));Eu.displayName=fe.CheckboxItem.displayName;const Ou=h.forwardRef(({className:t,children:e,...n},r)=>l.jsxs(fe.RadioItem,{ref:r,className:N("oniratec-dropdown__item",t),...n,children:[l.jsx("span",{className:"oniratec-dropdown__indicator",children:l.jsx(fe.ItemIndicator,{children:l.jsx(J.Circle,{className:"h-2.5 w-2.5 fill-current"})})}),e]}));Ou.displayName=fe.RadioItem.displayName;const ju=h.forwardRef(({className:t,inset:e,...n},r)=>l.jsx(fe.Label,{ref:r,className:N("oniratec-dropdown__label",e&&"oniratec-dropdown__item--inset",t),...n}));ju.displayName=fe.Label.displayName;const Du=h.forwardRef(({className:t,...e},n)=>l.jsx(fe.Separator,{ref:n,className:N("oniratec-dropdown__separator",t),...e}));Du.displayName=fe.Separator.displayName;const Ru=h.forwardRef(({className:t,inset:e,children:n,...r},s)=>l.jsxs(fe.SubTrigger,{ref:s,className:N("oniratec-dropdown__item",e&&"oniratec-dropdown__item--inset",t),...r,children:[n,l.jsx(J.ChevronRight,{className:"oniratec-dropdown__chevron"})]}));Ru.displayName=fe.SubTrigger.displayName;const Au=h.forwardRef(({className:t,...e},n)=>l.jsx(fe.SubContent,{ref:n,className:N("oniratec-dropdown",t),...e}));Au.displayName=fe.SubContent.displayName;const Mu=({className:t,...e})=>l.jsx("span",{className:N("oniratec-dropdown__shortcut",t),...e});Mu.displayName="DropdownMenuShortcut";const Sy="Arrastra y suelta archivos aquí o selecciona desde tu dispositivo.",Ny=t=>{if(t===0)return"0 B";const e=1024,n=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(t)/Math.log(e));return`${(t/Math.pow(e,r)).toFixed(r===0?0:1)} ${n[r]}`},ln=t=>`${t.name}-${t.size}-${t.lastModified}`,wo=t=>t.type.startsWith("image/");function fs({label:t,helperText:e,error:n,disabled:r=!1,multiple:s=!1,accept:a,files:i,defaultFiles:o=[],onFilesChange:c,id:d,name:f,allowDrop:u=!1,placeholder:m=Sy,showPreview:p=!0,previewMode:y="auto",maxPreviewItems:g=4,defaultPreviewUrl:w}){const v=x.useId(),k=d??v,b=e?`${k}-helper`:void 0,S=n?`${k}-error`:void 0,_=[b,S].filter(Boolean).join(" ")||void 0,T=x.useRef(null),[E,I]=x.useState(o),[W,L]=x.useState(!1),z=i!==void 0,B=z?i:E,G=P=>{const D=s?P:P.slice(0,1);z||I(D),c?.(D)},Q=P=>{if(!s)return P.slice(0,1);const D=new Map(B.map(ee=>[ln(ee),ee]));for(const ee of P)D.set(ln(ee),ee);return Array.from(D.values())},H=P=>{const D=Array.from(P.target.files??[]);G(s?Q(D):D),P.target.value=""},F=P=>{G(B.filter(D=>ln(D)!==ln(P)))},U=P=>{if(!u||r)return;P.preventDefault(),L(!1);const D=Array.from(P.dataTransfer.files??[]);D.length!==0&&G(s?Q(D):D)},V=x.useMemo(()=>{if(!p)return[];const P=B.slice(0,g);return y==="image"||y==="auto"&&P.some(ee=>wo(ee))?P.filter(ee=>wo(ee)).map(ee=>({key:ln(ee),file:ee,url:URL.createObjectURL(ee)})):[]},[B,g,y,p]);x.useEffect(()=>()=>{for(const P of V)URL.revokeObjectURL(P.url)},[V]);const ie=!!w&&B.length===0;return l.jsxs("div",{className:"oniratec-file-upload","data-disabled":r?"true":void 0,children:[t&&l.jsx("label",{htmlFor:k,className:"oniratec-file-upload__label",children:t}),l.jsx("input",{ref:T,id:k,name:f,type:"file",className:"sr-only",disabled:r,multiple:s,accept:a,"aria-invalid":n?"true":void 0,"aria-describedby":_,onChange:H}),l.jsxs("button",{type:"button",disabled:r,className:N("oniratec-file-upload__dropzone",W&&"oniratec-file-upload__dropzone--dragging"),onClick:()=>T.current?.click(),onDragOver:P=>{!u||r||(P.preventDefault(),L(!0))},onDragLeave:()=>u&&L(!1),onDrop:U,children:[l.jsx(J.UploadCloud,{className:"oniratec-file-upload__icon"}),l.jsxs("div",{children:[l.jsx("p",{className:"oniratec-file-upload__text",children:s?"Seleccionar archivos":"Seleccionar archivo"}),l.jsx("p",{className:"oniratec-file-upload__hint",children:m}),a&&l.jsxs("p",{className:"oniratec-file-upload__accept",children:["Acepta: ",a]})]})]}),ie&&l.jsx("div",{className:"oniratec-file-upload__preview",children:l.jsx("div",{className:"oniratec-file-upload__preview-item",children:l.jsx("img",{src:w,alt:"Logo actual",className:"oniratec-file-upload__preview-img"})})}),V.length>0&&l.jsx("div",{className:"oniratec-file-upload__preview",children:V.map(P=>l.jsx("div",{className:"oniratec-file-upload__preview-item",children:l.jsx("img",{src:P.url,alt:P.file.name,className:"oniratec-file-upload__preview-img"})},P.key))}),e&&!n&&l.jsx("p",{id:b,className:"oniratec-file-upload__helper",children:e}),n&&l.jsx("p",{id:S,className:"oniratec-file-upload__error",children:n}),B.length>0&&l.jsx("ul",{className:"oniratec-file-upload__list",children:B.map(P=>l.jsxs("li",{className:"oniratec-file-upload__item",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx(J.FileIcon,{className:"h-4 w-4 shrink-0 text-[color:var(--text-2)]"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"oniratec-file-upload__name truncate",children:P.name}),l.jsx("p",{className:"oniratec-file-upload__size",children:Ny(P.size)})]})]}),l.jsx("button",{type:"button",className:"oniratec-file-upload__remove",onClick:()=>F(P),"aria-label":`Eliminar ${P.name}`,children:l.jsx(J.X,{className:"h-4 w-4"})})]},ln(P)))})]})}const Cy=fs,Iu=h.createContext(null);function hs(){const t=h.useContext(Iu);if(!t)throw new Error("Field components must be used inside <Field>");return t}const Xe=h.forwardRef(({className:t,error:e,required:n,...r},s)=>{const a=h.useId();return l.jsx(Iu.Provider,{value:{id:a,error:e,required:n},children:l.jsx("div",{ref:s,className:N("oniratec-field",t),...r})})});Xe.displayName="Field";const Je=x.forwardRef((t,e)=>{const{id:n,error:r}=hs();return l.jsx(el,{ref:e,id:n,"aria-invalid":!!r,...t})});Je.displayName="FieldControl";const at=h.forwardRef(({className:t,children:e,...n},r)=>{const{id:s,required:a}=hs();return l.jsxs("label",{ref:r,htmlFor:s,className:N("oniratec-field__label",t),...n,children:[e,a&&l.jsx("span",{className:"oniratec-field__required",children:"*"})]})});at.displayName="FieldLabel";const Ke=h.forwardRef(({className:t,children:e,...n},r)=>{const{error:s}=hs(),a=s??e;return a?l.jsx("p",{ref:r,className:N("oniratec-field__message",!s&&"oniratec-field__message--hint",t),...n,children:a}):null});Ke.displayName="FieldMessage";const Fu=x.forwardRef(({className:t,containerClassName:e,isInvalid:n,...r},s)=>{const[a,i]=x.useState(!1);return l.jsxs("div",{className:N("oniratec-password-input",e),children:[l.jsx("input",{ref:s,type:a?"text":"password","aria-invalid":n||void 0,className:N("oniratec-input",n&&"oniratec-input--invalid",t),...r}),l.jsx("button",{type:"button",className:"oniratec-password-input__toggle",onClick:()=>i(o=>!o),children:a?l.jsx(J.EyeOff,{className:"h-4 w-4"}):l.jsx(J.EyeIcon,{className:"h-4 w-4"})})]})});Fu.displayName="PasswordInput";const Wn=h.forwardRef(({className:t,isInvalid:e,"aria-invalid":n,...r},s)=>{const a=e??(n===!0||n==="true");return l.jsx("input",{ref:s,"aria-invalid":a||void 0,className:N("oniratec-input",a&&"oniratec-input--invalid",t),...r})});Wn.displayName="Input";const Pu=h.forwardRef(({className:t,...e},n)=>l.jsx("kbd",{ref:n,className:N("oniratec-kbd",t),...e}));Pu.displayName="Kbd";const Lu=h.forwardRef(({lottieJson:t,title:e,description:n,actionLabel:r,onAction:s,fallbackIcon:a},i)=>l.jsxs("div",{ref:i,className:"oniratec-not-found",children:[t?l.jsx("div",{className:"oniratec-not-found__illustration",children:l.jsx(Vd,{animationData:t,loop:!0})}):a&&l.jsx("div",{className:"oniratec-not-found__icon",children:a}),l.jsx("h2",{className:"oniratec-not-found__title",children:e}),n&&l.jsx("p",{className:"oniratec-not-found__description",children:n}),r&&s&&l.jsx(Le,{size:"md",onClick:s,children:r})]}));Lu.displayName="NotFoundState";const Vu=h.forwardRef(({className:t,indicatorClassName:e,max:n=100,value:r=0,...s},a)=>{const i=n>0?n:100,o=r==null?0:Math.min(Math.max(r,0),i),c=`${o/i*100}%`;return l.jsx("div",{ref:a,role:"progressbar","aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":r==null?void 0:o,className:N("oniratec-progress",t),...s,children:l.jsx("div",{className:N("oniratec-progress__indicator",e),style:{width:c}})})});Vu.displayName="Progress";const $u=h.createContext(null);function Ty(){const t=h.useContext($u);if(!t)throw new Error("RadioGroupItem must be used inside <RadioGroup>.");return t}function Ey({className:t,defaultValue:e,disabled:n,name:r,onValueChange:s,orientation:a="vertical",required:i,value:o,...c}){const d=h.useId(),[f,u]=h.useState(e),m=o!==void 0,p=m?o:f,y=h.useCallback(g=>{m||u(g),s?.(g)},[m,s]);return l.jsx($u.Provider,{value:{disabled:n,name:r??d,onValueChange:y,orientation:a,required:i,value:p},children:l.jsx("div",{role:"radiogroup","aria-required":i,"data-orientation":a,className:N("oniratec-radio-group",t),...c})})}const Wu=h.forwardRef(({className:t,description:e,disabled:n,id:r,label:s,size:a="md",value:i,"aria-describedby":o,"aria-invalid":c,onChange:d,...f},u)=>{const m=h.useId(),p=r??m,y=e?`${p}-description`:void 0,g=c===!0||c==="true",w=Ty(),v=w.value===i,k=w.disabled||n;return l.jsxs("label",{htmlFor:p,"data-size":a,"data-type":"radio",className:N("oniratec-control",k&&"cursor-not-allowed opacity-60",t),children:[l.jsx("input",{ref:u,id:p,type:"radio",name:w.name,value:i,checked:v,required:w.required,disabled:k,"aria-invalid":g||void 0,"aria-describedby":[o,y].filter(Boolean).join(" ")||void 0,className:"oniratec-control__input",onChange:b=>{b.target.checked&&w.onValueChange(i),d?.(b)},...f}),l.jsx("span",{className:N("oniratec-control__box",g&&"border-destructive")}),(s||e)&&l.jsxs("span",{className:"oniratec-control__label grid gap-1 leading-tight",children:[s&&l.jsx("span",{className:"font-medium",children:s}),e&&l.jsx("span",{id:y,className:"text-sm text-[color:var(--text-2)]",children:e})]})]})});Wu.displayName="RadioGroupItem";const ms=pe.Root,Oy=pe.Group,ps=pe.Value,Qn=h.forwardRef(({className:t,hasError:e,children:n,...r},s)=>l.jsxs(pe.Trigger,{ref:s,"aria-invalid":e||void 0,className:N("oniratec-select__trigger",e&&"oniratec-select__trigger--error",t),...r,children:[n,l.jsx(pe.Icon,{asChild:!0,children:l.jsx(J.ChevronDown,{className:"oniratec-select__chevron"})})]}));Qn.displayName=pe.Trigger.displayName;const Ja=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.ScrollUpButton,{ref:n,className:N("oniratec-select__scroll-button",t),...e,children:l.jsx(J.ChevronUp,{className:"h-4 w-4"})}));Ja.displayName=pe.ScrollUpButton.displayName;const Ka=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.ScrollDownButton,{ref:n,className:N("oniratec-select__scroll-button",t),...e,children:l.jsx(J.ChevronDown,{className:"h-4 w-4"})}));Ka.displayName=pe.ScrollDownButton.displayName;const er=h.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>l.jsx(pe.Portal,{children:l.jsxs(pe.Content,{ref:s,className:N("oniratec-select",t),position:n,...r,children:[l.jsx(Ja,{}),l.jsx(pe.Viewport,{className:N(n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),l.jsx(Ka,{})]})}));er.displayName=pe.Content.displayName;const zu=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.Label,{ref:n,className:N("oniratec-select__label",t),...e}));zu.displayName=pe.Label.displayName;const tr=h.forwardRef(({className:t,children:e,...n},r)=>l.jsxs(pe.Item,{ref:r,className:N("oniratec-select__item",t),...n,children:[l.jsx("span",{className:"oniratec-select__indicator",children:l.jsx(pe.ItemIndicator,{children:l.jsx(J.Check,{className:"h-4 w-4"})})}),l.jsx(pe.ItemText,{children:e})]}));tr.displayName=pe.Item.displayName;const Zu=h.forwardRef(({className:t,...e},n)=>l.jsx(pe.Separator,{ref:n,className:N("oniratec-dropdown__separator",t),...e}));Zu.displayName=pe.Separator.displayName;function jy(t,e){const[n,r]=h.useState(t);return h.useEffect(()=>{const s=setTimeout(()=>r(t),e);return()=>clearTimeout(s)},[t,e]),n}function Qa({value:t,onValueChange:e,placeholder:n="Seleccionar",searchPlaceholder:r="Buscar...",disabled:s,hasError:a,minChars:i=2,debounceMs:o=300,fetcher:c,getOptionValue:d,getOptionLabel:f,emptyLabel:u="Sin resultados",loadingLabel:m="Buscando...",emptyActionLabel:p,onEmptyActionClick:y,contentClassName:g,triggerClassName:w}){const[v,k]=h.useState(!1),[b,S]=h.useState(""),[_,T]=h.useState(!1),[E,I]=h.useState([]),[W,L]=h.useState(""),z=jy(b,o),B=z.trim().length>=i,G=h.useRef(null);h.useEffect(()=>{const H=F=>{G.current&&(G.current.contains(F.target)||k(!1))};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]),h.useEffect(()=>{let H=!0;return(async()=>{if(v){if(!B){I([]);return}T(!0);try{const U=await c(z.trim());if(!H)return;I(U??[])}finally{H&&T(!1)}}})(),()=>{H=!1}},[v,z,B,c]),h.useEffect(()=>{if(!t){L("");return}const H=E.find(F=>d(F)===t);H&&L(f(H))},[t,E,d,f]);const Q=W||n;return l.jsxs("div",{ref:G,className:"relative w-full",children:[l.jsxs("button",{type:"button",disabled:s,"aria-invalid":a?"true":"false","aria-expanded":v,"aria-haspopup":"listbox",onClick:()=>k(H=>!H),className:N("oniratec-async-select__trigger",a&&"oniratec-async-select__trigger--error",w),children:[l.jsx("span",{className:N("oniratec-async-select__value",!W&&"oniratec-async-select__value--placeholder"),children:Q}),l.jsx(J.ChevronDown,{className:N("oniratec-async-select__chevron",v&&"rotate-180")})]}),v&&l.jsxs("div",{className:N("oniratec-async-select",g),role:"listbox",children:[l.jsxs("div",{className:"oniratec-async-select__search",children:[l.jsx("input",{className:"oniratec-async-select__search-input",value:b,onChange:H=>S(H.target.value),placeholder:r,autoFocus:!0}),_&&l.jsx(J.Loader2,{className:"oniratec-async-select__loader"})]}),l.jsxs("div",{className:"oniratec-async-select__list",children:[!B&&l.jsxs("p",{className:"oniratec-async-select__hint",children:["Escribe al menos ",i," caracteres"]}),B&&_&&l.jsx("p",{className:"oniratec-async-select__hint",children:m}),B&&!_&&E.length===0&&l.jsxs("div",{className:"oniratec-async-select__empty",children:[l.jsx("p",{children:u}),p&&y&&l.jsx("button",{type:"button",className:"oniratec-async-select__empty-action",onClick:y,children:p})]}),E.length>0&&l.jsx("ul",{children:E.map(H=>{const F=d(H),U=f(H),V=F===t;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":V,className:N("oniratec-async-select__item",V&&"oniratec-async-select__item--selected"),onClick:()=>{e(F),L(U),k(!1),S("")},children:[l.jsx("span",{className:"oniratec-async-select__indicator",children:V&&l.jsx(J.Check,{className:"h-4 w-4"})}),U]})},F)})})]})]})]})}const Bu=h.forwardRef(({className:t,decorative:e=!0,orientation:n="horizontal",...r},s)=>l.jsx("div",{ref:s,role:e?"none":"separator","aria-orientation":e?void 0:n,"data-orientation":n,className:N("oniratec-separator",t),...r}));Bu.displayName="Separator";const Dy=bu,Ry=_u,Ay=ds,Uu=ku,ei=h.forwardRef(({className:t,...e},n)=>l.jsx(os,{ref:n,className:N("oniratec-sheet__overlay",t),...e}));ei.displayName=os.displayName;const Hu=h.forwardRef(({side:t="right",className:e,children:n,hideClose:r,...s},a)=>l.jsxs(Uu,{children:[l.jsx(ei,{}),l.jsxs(ls,{ref:a,"data-side":t,className:N("oniratec-sheet__content",e),...s,children:[!r&&l.jsx(ds,{asChild:!0,children:l.jsxs(Le,{variant:"ghost",size:"icon-sm",className:"absolute right-2 top-2","aria-label":"Cerrar",children:[l.jsx(J.X,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Cerrar"})]})}),n]})]}));Hu.displayName=ls.displayName;const qu=({className:t,...e})=>l.jsx("div",{className:N("oniratec-sheet__header",t),...e});qu.displayName="SheetHeader";const Yu=({className:t,...e})=>l.jsx("div",{className:N("oniratec-sheet__footer",t),...e});Yu.displayName="SheetFooter";const Gu=h.forwardRef(({className:t,...e},n)=>l.jsx(cs,{ref:n,className:N("oniratec-sheet__title",t),...e}));Gu.displayName=cs.displayName;const Xu=h.forwardRef(({className:t,...e},n)=>l.jsx(us,{ref:n,className:N("oniratec-sheet__description",t),...e}));Xu.displayName=us.displayName;const Vr=h.forwardRef(({className:t,...e},n)=>l.jsx("div",{ref:n,className:N("oniratec-skeleton",t),...e}));Vr.displayName="Skeleton";const Ju=h.forwardRef(({className:t,isInvalid:e,"aria-invalid":n,...r},s)=>{const a=e??(n===!0||n==="true");return l.jsx("textarea",{ref:s,"aria-invalid":a||void 0,className:N("oniratec-textarea",a&&"oniratec-textarea--invalid",t),...r})});Ju.displayName="Textarea";const Ku=h.createContext(null);function ti(){const t=h.useContext(Ku);if(!t)throw new Error("Tabs components must be used inside <Tabs>.");return t}function My({children:t,className:e,defaultValue:n,onValueChange:r,orientation:s="horizontal",value:a,...i}){const o=h.useId(),[c,d]=h.useState(n),f=a!==void 0,u=f?a:c,m=h.useCallback(p=>{f||d(p),r?.(p)},[f,r]);return l.jsx(Ku.Provider,{value:{baseId:o,onValueChange:m,orientation:s,value:u},children:l.jsx("div",{className:N("oniratec-tabs",e),"data-orientation":s,...i,children:t})})}const Qu=h.forwardRef(({className:t,onKeyDown:e,...n},r)=>{const{onValueChange:s,orientation:a}=ti();return l.jsx("div",{ref:r,role:"tablist","aria-orientation":a,className:N("oniratec-tabs__list",t),onKeyDown:i=>{const o=a==="horizontal"?i.key==="ArrowRight":i.key==="ArrowDown",c=a==="horizontal"?i.key==="ArrowLeft":i.key==="ArrowUp",d=i.key==="Home"||i.key==="End";if(!o&&!c&&!d){e?.(i);return}const f=Array.from(i.currentTarget.querySelectorAll('[role="tab"]:not(:disabled)'));if(f.length===0){e?.(i);return}const u=f.findIndex(g=>g===document.activeElement);let m=u===-1?0:u;o&&(m=(u+1+f.length)%f.length),c&&(m=(u-1+f.length)%f.length),i.key==="Home"&&(m=0),i.key==="End"&&(m=f.length-1),i.preventDefault();const p=f[m];p?.focus();const y=p?.dataset.value;y&&s(y),e?.(i)},...n})});Qu.displayName="TabsList";const ed=h.forwardRef(({children:t,className:e,value:n,...r},s)=>{const{baseId:a,onValueChange:i,value:o}=ti(),c=n===o;return l.jsx("button",{ref:s,id:`${a}-trigger-${n}`,type:"button",role:"tab","aria-controls":`${a}-content-${n}`,"aria-selected":c,tabIndex:c?0:-1,"data-state":c?"active":"inactive","data-value":n,className:N("oniratec-tabs__trigger",e),onClick:()=>i(n),...r,children:t})});ed.displayName="TabsTrigger";const td=h.forwardRef(({className:t,forceMount:e=!1,value:n,...r},s)=>{const{baseId:a,value:i}=ti(),o=n===i;return!o&&!e?null:l.jsx("div",{ref:s,id:`${a}-content-${n}`,role:"tabpanel","aria-labelledby":`${a}-trigger-${n}`,hidden:!o,tabIndex:0,"data-state":o?"active":"inactive",className:N("oniratec-tabs__content",!o&&"hidden",t),...r})});td.displayName="TabsContent";function Iy(t){const e=h.useRef({value:t,previous:t});return h.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var gs="Switch",[Fy]=qr(gs),[Py,Ly]=Fy(gs),nd=h.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:a,required:i,disabled:o,value:c="on",onCheckedChange:d,form:f,...u}=t,[m,p]=h.useState(null),y=$e(e,b=>p(b)),g=h.useRef(!1),w=m?f||!!m.closest("form"):!0,[v,k]=Da({prop:s,defaultProp:a??!1,onChange:d,caller:gs});return l.jsxs(Py,{scope:n,checked:v,disabled:o,children:[l.jsx(Ce.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":id(v),"data-disabled":o?"":void 0,disabled:o,value:c,...u,ref:y,onClick:Re(t.onClick,b=>{k(S=>!S),w&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),w&&l.jsx(ad,{control:m,bubbles:!g.current,name:r,value:c,checked:v,required:i,disabled:o,form:f,style:{transform:"translateX(-100%)"}})]})});nd.displayName=gs;var rd="SwitchThumb",sd=h.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=Ly(rd,n);return l.jsx(Ce.span,{"data-state":id(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});sd.displayName=rd;var Vy="SwitchBubbleInput",ad=h.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:r=!0,...s},a)=>{const i=h.useRef(null),o=$e(i,a),c=Iy(n),d=Cl(e);return h.useEffect(()=>{const f=i.current;if(!f)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(c!==n&&p){const y=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(y)}},[c,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ad.displayName=Vy;function id(t){return t?"checked":"unchecked"}var $y=nd,Wy=sd;const nr=h.forwardRef(({checked:t,defaultChecked:e=!1,onChange:n,size:r="md",disabled:s=!1,label:a,className:i,ariaLabel:o,id:c},d)=>{const f=h.useId(),u=c??f;return l.jsxs("div",{className:N("oniratec-toggle",i),"data-size":r,children:[l.jsx($y,{ref:d,id:u,checked:t,defaultChecked:e,onCheckedChange:n,disabled:s,"aria-label":o,className:"oniratec-toggle__switch",children:l.jsx(Wy,{className:"oniratec-toggle__thumb"})}),a&&l.jsx("label",{htmlFor:u,className:N("oniratec-toggle__label",s&&"cursor-not-allowed opacity-50"),children:a})]})});nr.displayName="Toggle";const zy=nr;function Zy(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const By=t=>{switch(t){case"success":return qy;case"info":return Gy;case"warning":return Yy;case"error":return Xy;default:return null}},Uy=Array(12).fill(0),Hy=({visible:t,className:e})=>x.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},x.createElement("div",{className:"sonner-spinner"},Uy.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),qy=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Yy=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Gy=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Xy=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Jy=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ky=()=>{const[t,e]=x.useState(document.hidden);return x.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let ia=1;class Qy{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:r,...s}=e,a=typeof e?.id=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:ia++,i=this.toasts.find(c=>c.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...e,id:a,title:r}),{...c,...e,id:a,dismissible:o,title:r}):c):this.addToast({title:r,...s,dismissible:o,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(e instanceof Function?e():e);let a=r!==void 0,i;const o=s.then(async d=>{if(i=["resolve",d],x.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(tv(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,y=typeof u=="object"&&!x.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...y})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,m=typeof n.description=="function"?await n.description(d):n.description,y=typeof u=="object"&&!x.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...y})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,m=typeof n.description=="function"?await n.description(d):n.description,y=typeof u=="object"&&!x.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:m,...y})}}).catch(async d=>{if(i=["reject",d],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,p=typeof f=="object"&&!x.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:u,...p})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,f)=>o.then(()=>i[0]==="reject"?f(i[1]):d(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(e,n)=>{const r=n?.id||ia++;return this.create({jsx:e(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const De=new Qy,ev=(t,e)=>{const n=e?.id||ia++;return De.addToast({title:t,...e,id:n}),n},tv=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",nv=ev,rv=()=>De.toasts,sv=()=>De.getActiveToasts(),av=Object.assign(nv,{success:De.success,info:De.info,warning:De.warning,error:De.error,custom:De.custom,message:De.message,promise:De.promise,dismiss:De.dismiss,loading:De.loading},{getHistory:rv,getToasts:sv});Zy("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function yr(t){return t.label!==void 0}const iv=3,ov="24px",lv="16px",bo=4e3,cv=356,uv=14,dv=45,fv=200;function st(...t){return t.filter(Boolean).join(" ")}function hv(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const mv=t=>{var e,n,r,s,a,i,o,c,d;const{invert:f,toast:u,unstyled:m,interacting:p,setHeights:y,visibleToasts:g,heights:w,index:v,toasts:k,expanded:b,removeToast:S,defaultRichColors:_,closeButton:T,style:E,cancelButtonStyle:I,actionButtonStyle:W,className:L="",descriptionClassName:z="",duration:B,position:G,gap:Q,expandByDefault:H,classNames:F,icons:U,closeButtonAriaLabel:V="Close toast"}=t,[ie,P]=x.useState(null),[D,ee]=x.useState(null),[$,le]=x.useState(!1),[ce,ve]=x.useState(!1),[Te,oe]=x.useState(!1),[vt,Gt]=x.useState(!1),[Xt,xt]=x.useState(!1),[Jt,ys]=x.useState(0),[Cd,ii]=x.useState(0),Dn=x.useRef(u.duration||B||bo),oi=x.useRef(null),ft=x.useRef(null),Td=v===0,Ed=v+1<=g,Ae=u.type,Kt=u.dismissible!==!1,Od=u.className||"",jd=u.descriptionClassName||"",rr=x.useMemo(()=>w.findIndex(X=>X.toastId===u.id)||0,[w,u.id]),Dd=x.useMemo(()=>{var X;return(X=u.closeButton)!=null?X:T},[u.closeButton,T]),li=x.useMemo(()=>u.duration||B||bo,[u.duration,B]),vs=x.useRef(0),Qt=x.useRef(0),ci=x.useRef(0),en=x.useRef(null),[Rd,Ad]=G.split("-"),ui=x.useMemo(()=>w.reduce((X,xe,be)=>be>=rr?X:X+xe.height,0),[w,rr]),di=Ky(),Md=u.invert||f,xs=Ae==="loading";Qt.current=x.useMemo(()=>rr*Q+ui,[rr,ui]),x.useEffect(()=>{Dn.current=li},[li]),x.useEffect(()=>{le(!0)},[]),x.useEffect(()=>{const X=ft.current;if(X){const xe=X.getBoundingClientRect().height;return ii(xe),y(be=>[{toastId:u.id,height:xe,position:u.position},...be]),()=>y(be=>be.filter(Me=>Me.toastId!==u.id))}},[y,u.id]),x.useLayoutEffect(()=>{if(!$)return;const X=ft.current,xe=X.style.height;X.style.height="auto";const be=X.getBoundingClientRect().height;X.style.height=xe,ii(be),y(Me=>Me.find(we=>we.toastId===u.id)?Me.map(we=>we.toastId===u.id?{...we,height:be}:we):[{toastId:u.id,height:be,position:u.position},...Me])},[$,u.title,u.description,y,u.id,u.jsx,u.action,u.cancel]);const wt=x.useCallback(()=>{ve(!0),ys(Qt.current),y(X=>X.filter(xe=>xe.toastId!==u.id)),setTimeout(()=>{S(u)},fv)},[u,S,y,Qt]);x.useEffect(()=>{if(u.promise&&Ae==="loading"||u.duration===1/0||u.type==="loading")return;let X;return b||p||di?(()=>{if(ci.current<vs.current){const Me=new Date().getTime()-vs.current;Dn.current=Dn.current-Me}ci.current=new Date().getTime()})():Dn.current!==1/0&&(vs.current=new Date().getTime(),X=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),wt()},Dn.current)),()=>clearTimeout(X)},[b,p,u,Ae,di,wt]),x.useEffect(()=>{u.delete&&(wt(),u.onDismiss==null||u.onDismiss.call(u,u))},[wt,u.delete]);function Id(){var X;if(U?.loading){var xe;return x.createElement("div",{className:st(F?.loader,u==null||(xe=u.classNames)==null?void 0:xe.loader,"sonner-loader"),"data-visible":Ae==="loading"},U.loading)}return x.createElement(Hy,{className:st(F?.loader,u==null||(X=u.classNames)==null?void 0:X.loader),visible:Ae==="loading"})}const Fd=u.icon||U?.[Ae]||By(Ae);var fi,hi;return x.createElement("li",{tabIndex:0,ref:ft,className:st(L,Od,F?.toast,u==null||(e=u.classNames)==null?void 0:e.toast,F?.default,F?.[Ae],u==null||(n=u.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(fi=u.richColors)!=null?fi:_,"data-styled":!(u.jsx||u.unstyled||m),"data-mounted":$,"data-promise":!!u.promise,"data-swiped":Xt,"data-removed":ce,"data-visible":Ed,"data-y-position":Rd,"data-x-position":Ad,"data-index":v,"data-front":Td,"data-swiping":Te,"data-dismissible":Kt,"data-type":Ae,"data-invert":Md,"data-swipe-out":vt,"data-swipe-direction":D,"data-expanded":!!(b||H&&$),"data-testid":u.testId,style:{"--index":v,"--toasts-before":v,"--z-index":k.length-v,"--offset":`${ce?Jt:Qt.current}px`,"--initial-height":H?"auto":`${Cd}px`,...E,...u.style},onDragEnd:()=>{oe(!1),P(null),en.current=null},onPointerDown:X=>{X.button!==2&&(xs||!Kt||(oi.current=new Date,ys(Qt.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(oe(!0),en.current={x:X.clientX,y:X.clientY})))},onPointerUp:()=>{var X,xe,be;if(vt||!Kt)return;en.current=null;const Me=Number(((X=ft.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),sr=Number(((xe=ft.current)==null?void 0:xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((be=oi.current)==null?void 0:be.getTime()),We=ie==="x"?Me:sr,ar=Math.abs(We)/we;if(Math.abs(We)>=dv||ar>.11){ys(Qt.current),u.onDismiss==null||u.onDismiss.call(u,u),ee(ie==="x"?Me>0?"right":"left":sr>0?"down":"up"),wt(),Gt(!0);return}else{var He,qe;(He=ft.current)==null||He.style.setProperty("--swipe-amount-x","0px"),(qe=ft.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}xt(!1),oe(!1),P(null)},onPointerMove:X=>{var xe,be,Me;if(!en.current||!Kt||((xe=window.getSelection())==null?void 0:xe.toString().length)>0)return;const we=X.clientY-en.current.y,We=X.clientX-en.current.x;var ar;const He=(ar=t.swipeDirections)!=null?ar:hv(G);!ie&&(Math.abs(We)>1||Math.abs(we)>1)&&P(Math.abs(We)>Math.abs(we)?"x":"y");let qe={x:0,y:0};const mi=Mt=>1/(1.5+Math.abs(Mt)/20);if(ie==="y"){if(He.includes("top")||He.includes("bottom"))if(He.includes("top")&&we<0||He.includes("bottom")&&we>0)qe.y=we;else{const Mt=we*mi(we);qe.y=Math.abs(Mt)<Math.abs(we)?Mt:we}}else if(ie==="x"&&(He.includes("left")||He.includes("right")))if(He.includes("left")&&We<0||He.includes("right")&&We>0)qe.x=We;else{const Mt=We*mi(We);qe.x=Math.abs(Mt)<Math.abs(We)?Mt:We}(Math.abs(qe.x)>0||Math.abs(qe.y)>0)&&xt(!0),(be=ft.current)==null||be.style.setProperty("--swipe-amount-x",`${qe.x}px`),(Me=ft.current)==null||Me.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Dd&&!u.jsx&&Ae!=="loading"?x.createElement("button",{"aria-label":V,"data-disabled":xs,"data-close-button":!0,onClick:xs||!Kt?()=>{}:()=>{wt(),u.onDismiss==null||u.onDismiss.call(u,u)},className:st(F?.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(hi=U?.close)!=null?hi:Jy):null,(Ae||u.icon||u.promise)&&u.icon!==null&&(U?.[Ae]!==null||u.icon)?x.createElement("div",{"data-icon":"",className:st(F?.icon,u==null||(s=u.classNames)==null?void 0:s.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||Id():null,u.type!=="loading"?Fd:null):null,x.createElement("div",{"data-content":"",className:st(F?.content,u==null||(a=u.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:st(F?.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?x.createElement("div",{"data-description":"",className:st(z,jd,F?.description,u==null||(o=u.classNames)==null?void 0:o.description)},typeof u.description=="function"?u.description():u.description):null),x.isValidElement(u.cancel)?u.cancel:u.cancel&&yr(u.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||I,onClick:X=>{yr(u.cancel)&&Kt&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,X),wt())},className:st(F?.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,x.isValidElement(u.action)?u.action:u.action&&yr(u.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||W,onClick:X=>{yr(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,X),!X.defaultPrevented&&wt())},className:st(F?.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function _o(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function pv(t,e){const n={};return[t,e].forEach((r,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",o=a?lv:ov;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=o:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(o)}),n}const gv=x.forwardRef(function(e,n){const{id:r,invert:s,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:c,className:d,offset:f,mobileOffset:u,theme:m="light",richColors:p,duration:y,style:g,visibleToasts:w=iv,toastOptions:v,dir:k=_o(),gap:b=uv,icons:S,containerAriaLabel:_="Notifications"}=e,[T,E]=x.useState([]),I=x.useMemo(()=>r?T.filter($=>$.toasterId===r):T.filter($=>!$.toasterId),[T,r]),W=x.useMemo(()=>Array.from(new Set([a].concat(I.filter($=>$.position).map($=>$.position)))),[I,a]),[L,z]=x.useState([]),[B,G]=x.useState(!1),[Q,H]=x.useState(!1),[F,U]=x.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=x.useRef(null),ie=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=x.useRef(null),D=x.useRef(!1),ee=x.useCallback($=>{E(le=>{var ce;return(ce=le.find(ve=>ve.id===$.id))!=null&&ce.delete||De.dismiss($.id),le.filter(({id:ve})=>ve!==$.id)})},[]);return x.useEffect(()=>De.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{E(le=>le.map(ce=>ce.id===$.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{pa.flushSync(()=>{E(le=>{const ce=le.findIndex(ve=>ve.id===$.id);return ce!==-1?[...le.slice(0,ce),{...le[ce],...$},...le.slice(ce+1)]:[$,...le]})})})}),[T]),x.useEffect(()=>{if(m!=="system"){U(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:le})=>{U(le?"dark":"light")})}catch{$.addListener(({matches:ce})=>{try{U(ce?"dark":"light")}catch(ve){console.error(ve)}})}},[m]),x.useEffect(()=>{T.length<=1&&G(!1)},[T]),x.useEffect(()=>{const $=le=>{var ce;if(i.every(oe=>le[oe]||le.code===oe)){var Te;G(!0),(Te=V.current)==null||Te.focus()}le.code==="Escape"&&(document.activeElement===V.current||(ce=V.current)!=null&&ce.contains(document.activeElement))&&G(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[i]),x.useEffect(()=>{if(V.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,D.current=!1)}},[V.current]),x.createElement("section",{ref:n,"aria-label":`${_} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map(($,le)=>{var ce;const[ve,Te]=$.split("-");return I.length?x.createElement("ol",{key:$,dir:k==="auto"?_o():k,tabIndex:-1,ref:V,className:d,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":ve,"data-x-position":Te,style:{"--front-toast-height":`${((ce=L[0])==null?void 0:ce.height)||0}px`,"--width":`${cv}px`,"--gap":`${b}px`,...g,...pv(f,u)},onBlur:oe=>{D.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(D.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||D.current||(D.current=!0,P.current=oe.relatedTarget)},onMouseEnter:()=>G(!0),onMouseMove:()=>G(!0),onMouseLeave:()=>{Q||G(!1)},onDragEnd:()=>G(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},I.filter(oe=>!oe.position&&le===0||oe.position===$).map((oe,vt)=>{var Gt,Xt;return x.createElement(mv,{key:oe.id,icons:S,index:vt,toast:oe,defaultRichColors:p,duration:(Gt=v?.duration)!=null?Gt:y,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:s,visibleToasts:w,closeButton:(Xt=v?.closeButton)!=null?Xt:c,interacting:Q,position:$,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:ee,toasts:I.filter(xt=>xt.position==oe.position),heights:L.filter(xt=>xt.position==oe.position),setHeights:z,expandByDefault:o,gap:b,expanded:B,swipeDirections:e.swipeDirections})})):null}))});function yv({...t}){return l.jsx(gv,{position:"bottom-right",richColors:!1,toastOptions:{classNames:{toast:"oniratec-toast",title:"oniratec-toast__title",description:"oniratec-toast__description",closeButton:"oniratec-toast__close-button",actionButton:"oniratec-toast__action-button",success:"oniratec-toast--success",error:"oniratec-toast--error",warning:"oniratec-toast--warning"}},...t})}const vv=zt.Provider,xv=zt.Root,wv=zt.Trigger,od=x.forwardRef(({className:t,sideOffset:e=6,tone:n="default",children:r,...s},a)=>l.jsx(zt.Portal,{children:l.jsxs(zt.Content,{ref:a,sideOffset:e,"data-tone":n!=="default"?n:void 0,className:N("oniratec-tooltip",t),...s,children:[r,l.jsx(zt.Arrow,{className:"oniratec-tooltip__arrow"})]})}));od.displayName=zt.Content.displayName;const ld=({logo:t,children:e,footer:n,className:r})=>l.jsx("div",{className:"oniratec-auth-layout",children:l.jsxs("div",{className:N("oniratec-auth-layout__card",r),children:[t&&l.jsx("div",{className:"oniratec-auth-layout__logo",children:t.href?l.jsx("a",{href:t.href,className:"focus-visible:outline-none focus-visible:ring-2",children:l.jsx("img",{src:t.src,alt:t.alt,className:"h-10 w-auto"})}):l.jsx("img",{src:t.src,alt:t.alt,className:"h-10 w-auto"})}),l.jsx("div",{className:"oniratec-auth-layout__content",children:e}),n&&l.jsx("div",{className:"oniratec-auth-layout__footer",children:n})]})});ld.displayName="AuthLayout";function bv({items:t,className:e,separator:n,renderLink:r}){const s=n??l.jsx(J.ChevronRight,{className:"oniratec-breadcrumbs__separator h-4 w-4"});return l.jsx("nav",{"aria-label":"Breadcrumb",className:N("oniratec-breadcrumbs",e),children:l.jsx("ol",{className:"oniratec-breadcrumbs__list",children:t.map((a,i)=>{const o=i===t.length-1,c=l.jsx("span",{className:o?"oniratec-breadcrumbs__current":void 0,children:a.label});return l.jsxs("li",{className:"oniratec-breadcrumbs__item",children:[o?l.jsx("span",{"aria-current":"page",children:c}):r?r({item:a,className:"oniratec-breadcrumbs__link",children:c}):a.href?l.jsx("a",{href:a.href,className:"oniratec-breadcrumbs__link",children:c}):l.jsx("button",{type:"button",onClick:a.onClick,className:"oniratec-breadcrumbs__link",children:c}),!o&&l.jsx("span",{"aria-hidden":"true",children:s})]},`${a.label}-${i}`)})})})}function _v({open:t,onOpenChange:e,title:n,description:r,confirmLabel:s="Confirmar",cancelLabel:a="Cancelar",variant:i="default",onConfirm:o,loading:c=!1}){const d=async()=>{await o()};return l.jsx(Su,{open:t,onOpenChange:e,children:l.jsxs(Ha,{size:"sm",hideClose:!0,children:[l.jsxs(qa,{children:[l.jsx(Ga,{children:n}),r&&l.jsx(Xa,{children:r})]}),l.jsxs(Ya,{children:[l.jsx(Le,{variant:"secondary",onClick:()=>e(!1),disabled:c,children:a}),l.jsxs(Le,{variant:i==="destructive"?"destructive":"default",onClick:d,disabled:c,children:[c&&l.jsx(J.Loader2,{className:"h-4 w-4 animate-spin"}),s]})]})]})})}const ko="onira-sidebar-collapsed",kv=({to:t,children:e,className:n,onClick:r})=>l.jsx("a",{href:t,className:n,onClick:r,children:e});function Sv({item:t,collapsed:e,LinkComponent:n,onMobileClose:r}){const s=n??kv,a=t.icon;return l.jsxs(s,{to:t.to,end:t.end,className:"oniratec-dashboard__nav-item",onClick:r,children:[a&&l.jsx(a,{className:"h-4 w-4 shrink-0"}),!e&&l.jsx("span",{className:"flex-1 truncate",children:t.label}),!e&&t.badge!==void 0&&l.jsx(xa,{variant:"secondary",size:"sm",children:t.badge})]})}function So({navSections:t,logo:e,appName:n,collapsed:r,LinkComponent:s,onMobileClose:a}){return l.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[l.jsxs("div",{className:"oniratec-dashboard__sidebar-header",children:[e&&l.jsx("div",{className:"shrink-0",children:e}),!r&&n&&l.jsx("span",{className:"oniratec-dashboard__app-name",children:n})]}),l.jsx("nav",{className:"oniratec-dashboard__nav",children:t.map((i,o)=>l.jsxs("div",{className:"oniratec-dashboard__nav-section",children:[!r&&i.title&&l.jsx("p",{className:"oniratec-dashboard__nav-section-title",children:i.title}),i.items.map(c=>l.jsx(Sv,{item:c,collapsed:r,LinkComponent:s,onMobileClose:a},c.to))]},o))})]})}function Nv({navSections:t,logo:e,appName:n,headerActions:r,children:s,LinkComponent:a}){const[i,o]=h.useState(()=>{try{return localStorage.getItem(ko)==="true"}catch{return!1}}),[c,d]=h.useState(!1),f=()=>{const u=!i;o(u);try{localStorage.setItem(ko,String(u))}catch{return}};return l.jsxs("div",{className:"oniratec-dashboard",children:[l.jsxs("aside",{className:"oniratec-dashboard__sidebar","data-collapsed":i?"true":void 0,children:[l.jsx(So,{navSections:t,logo:e,appName:n,collapsed:i,LinkComponent:a}),l.jsx("button",{type:"button",onClick:f,className:"oniratec-dashboard__toggle","aria-label":i?"Expandir sidebar":"Colapsar sidebar",children:i?l.jsx(J.ChevronRight,{className:"h-3 w-3"}):l.jsx(J.ChevronLeft,{className:"h-3 w-3"})})]}),c&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"oniratec-dashboard__drawer-overlay md:hidden",onClick:()=>d(!1)}),l.jsxs("div",{className:"oniratec-dashboard__drawer md:hidden",children:[l.jsx("button",{type:"button",onClick:()=>d(!1),className:"oniratec-dashboard__drawer-close",children:l.jsx(J.X,{className:"h-5 w-5"})}),l.jsx(So,{navSections:t,logo:e,appName:n,collapsed:!1,LinkComponent:a,onMobileClose:()=>d(!1)})]})]}),l.jsxs("div",{className:"oniratec-dashboard__main",children:[l.jsxs("header",{className:"oniratec-dashboard__header",children:[l.jsx("button",{type:"button",className:N("oniratec-dashboard__mobile-menu","md:hidden"),onClick:()=>d(!0),"aria-label":"Abrir menú",children:l.jsx(J.Menu,{className:"h-5 w-5"})}),l.jsx("div",{className:"hidden md:block"}),r&&l.jsx("div",{className:"oniratec-dashboard__header-actions",children:r})]}),l.jsx("main",{className:"oniratec-dashboard__content",children:s})]})]})}function No(t){return t?Array.isArray(t)?t:[t]:[]}function Cv(t,e){return t==null&&e==null?0:t==null?1:e==null?-1:typeof t=="number"&&typeof e=="number"?t-e:typeof t=="boolean"&&typeof e=="boolean"?Number(t)-Number(e):t instanceof Date&&e instanceof Date?t.getTime()-e.getTime():String(t).localeCompare(String(e),void 0,{numeric:!0,sensitivity:"base"})}function cd({columns:t,data:e,enableSorting:n=!0,sortState:r,defaultSortState:s=null,onSortChange:a,unsortedIcon:i="muted",sortMode:o="single",manualSorting:c=!1,emptyContent:d,loadingContent:f,errorContent:u,isLoading:m=!1}){const[p,y]=x.useState(s),g=r!==void 0?r:p,w=No(g),v=x.useMemo(()=>new Map(t.map(_=>[_.key,_])),[t]),k=x.useMemo(()=>{if(c||!n||w.length===0)return e;const _=[...e];return _.sort((T,E)=>{for(const I of w){const W=v.get(I.columnId);if(!W)continue;const z=(W.sortFn??((B,G)=>{const Q=W.sortValue?.(B)??B[W.key],H=W.sortValue?.(G)??G[W.key];return Cv(Q,H)}))(T,E);if(z!==0)return I.direction==="asc"?z:-z}return 0}),_},[e,c,w,v,n]),b=_=>{r===void 0&&y(_),a?.(_)},S=(_,T)=>{if(!(n&&(_.sortable??!!(_.sortFn||_.sortValue))))return;const I=No(g),W=I.find(z=>z.columnId===_.key),L=W?.direction==="asc"?"desc":W?.direction==="desc"?null:"asc";if(o==="multi"&&T){const z=I.filter(B=>B.columnId!==_.key);L&&z.push({columnId:_.key,direction:L}),b(z.length?z:null);return}if(!L){b(null);return}b({columnId:_.key,direction:L})};return l.jsx("div",{className:"oniratec-data-table",children:l.jsx("div",{className:"oniratec-data-table__scroll",tabIndex:0,role:"region",children:l.jsxs("table",{className:"oniratec-data-table__table",children:[l.jsx("thead",{className:"oniratec-data-table__head",children:l.jsx("tr",{className:"oniratec-data-table__head-row",children:t.map(_=>{const T=n&&(_.sortable??!!(_.sortFn||_.sortValue)),I=w.find(L=>L.columnId===_.key)?.direction,W=T?I==="asc"?"ascending":I==="desc"?"descending":"none":void 0;return l.jsx("th",{scope:"col","aria-sort":W,className:N("oniratec-data-table__th",_.headerClassName),children:T?l.jsxs("button",{type:"button",onClick:L=>S(_,L.shiftKey),className:"oniratec-data-table__sort-button",children:[l.jsx("span",{className:"flex-1",children:_.header}),l.jsxs("span",{className:N("oniratec-data-table__sort-icon",I&&"oniratec-data-table__sort-icon--active",!I&&i==="placeholder"&&"opacity-0",!I&&i==="hidden"&&"hidden"),"aria-hidden":"true",children:[I==="asc"&&l.jsx(J.ChevronUp,{className:"h-4 w-4"}),I==="desc"&&l.jsx(J.ChevronDown,{className:"h-4 w-4"}),!I&&i!=="hidden"&&l.jsx(J.ChevronsUpDown,{className:"h-4 w-4"})]})]}):_.header},_.key)})})}),l.jsx("tbody",{className:"oniratec-data-table__divider",children:u&&!m?l.jsx("tr",{children:l.jsx("td",{colSpan:t.length,className:"oniratec-data-table__empty",children:u})}):m?l.jsx("tr",{children:l.jsx("td",{colSpan:t.length,className:"oniratec-data-table__empty",children:f??"Cargando..."})}):k.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:t.length,className:"oniratec-data-table__empty",children:d??"No hay datos disponibles."})}):k.map((_,T)=>l.jsx("tr",{className:"oniratec-data-table__row",children:t.map(E=>l.jsx("td",{className:N("oniratec-data-table__td",E.className),children:E.render(_)},E.key))},T))})]})})})}const Tv=[5,10,25,50],ud=({value:t,onChange:e,options:n=Tv})=>l.jsxs("div",{className:"flex items-center gap-2 text-[color:var(--oniratec-label-secondary)]",children:[l.jsx("span",{children:"Mostrar"}),l.jsxs(ms,{value:t.toString(),onValueChange:r=>{e(parseInt(r))},children:[l.jsx(Qn,{children:l.jsx(ps,{})}),l.jsx(er,{children:(n??[]).map(r=>l.jsx(tr,{value:r.toString(),children:String(r)},r))})]}),l.jsx("span",{children:"por página"})]}),Ev=({page:t,pageSize:e,total:n,onPageChange:r,onPageSizeChange:s})=>{const a=Math.ceil(n/e);if(a<=1&&n<=e)return null;const i=t+1,o="rounded-md border border-[color:var(--border-1)] px-3 py-1 text-[color:var(--text-1)] transition-colors hover:bg-[color:color-mix(in srgb, var(--brand) 12%, transparent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--focus)] disabled:opacity-50 disabled:cursor-not-allowed";return l.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-4 text-sm text-[color:var(--text-2)]",children:[l.jsxs("span",{children:["Página ",i," de ",a]}),l.jsx(ud,{value:e,onChange:s}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{disabled:t===0,onClick:()=>r(t-1),"aria-label":"Página anterior",className:o,children:"Anterior"}),l.jsx("button",{disabled:t+1>=a,onClick:()=>r(t+1),"aria-label":"Página siguiente",className:o,children:"Siguiente"})]})]})};function dd({filters:t,value:e,onChange:n,onReset:r,resetLabel:s="Resetear filtros",showReset:a=!0,className:i,layout:o="inline",actions:c}){const d=(u,m)=>{n({...e,[u]:m})},f=a&&!!r;return l.jsxs("section",{className:N("oniratec-filters-panel",i),children:[l.jsx("div",{className:N("oniratec-filters-panel__grid",o==="stacked"&&"oniratec-filters-panel__grid--stacked"),children:t.map(u=>l.jsxs("div",{className:"oniratec-filters-panel__filter",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"oniratec-filters-panel__label",children:u.label}),u.helperText&&l.jsx("span",{className:"oniratec-filters-panel__helper",children:u.helperText})]}),u.type==="text"&&l.jsx(Wn,{placeholder:u.placeholder,value:e[u.id]??"",onChange:m=>d(u.id,m.target.value),disabled:u.disabled}),u.type==="select"&&l.jsxs(ms,{value:e[u.id]??"",onValueChange:m=>d(u.id,m),disabled:u.disabled,children:[l.jsx(Qn,{children:l.jsx(ps,{placeholder:u.placeholder??"Seleccionar"})}),l.jsx(er,{children:u.options.map(m=>l.jsx(tr,{value:m.value,children:m.label},m.value))})]}),u.type==="async-select"&&l.jsx(Qa,{value:e[u.id]??"",onValueChange:m=>d(u.id,m),placeholder:u.placeholder,searchPlaceholder:u.searchPlaceholder,minChars:u.minChars,debounceMs:u.debounceMs,fetcher:u.fetcher,getOptionLabel:u.getOptionLabel,getOptionValue:u.getOptionValue,emptyLabel:u.emptyLabel,loadingLabel:u.loadingLabel,emptyActionLabel:u.emptyActionLabel,onEmptyActionClick:u.onEmptyActionClick,disabled:u.disabled}),u.type==="toggle"&&l.jsx(nr,{checked:e[u.id]??!1,onChange:m=>d(u.id,m),disabled:u.disabled,ariaLabel:u.label,label:u.description}),u.type==="date"&&l.jsx(as,{value:e[u.id]??null,onChange:m=>d(u.id,m??null),placeholder:u.placeholder,min:u.min,max:u.max,timeZone:u.timeZone,disabled:u.disabled})]},u.id))}),(f||c)&&l.jsxs("div",{className:"oniratec-filters-panel__actions",children:[f&&l.jsx(Le,{type:"button",variant:"ghost",onClick:r,children:s}),c&&l.jsx("div",{className:"oniratec-filters-panel__action-group",children:c})]})]})}function fd({title:t="Filtros",description:e,children:n,isOpen:r,onOpenChange:s,onApply:a,applyLabel:i="Aplicar filtros",closeLabel:o="Cerrar",className:c}){const d=x.useId(),f=e?`${d}-description`:void 0,u=r,m=x.useCallback(p=>{s(p)},[s]);return x.useEffect(()=>{if(!u)return;const p=y=>{y.key==="Escape"&&m(!1)};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[u,m]),x.useEffect(()=>{if(!u)return;const p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[u]),u?l.jsx("div",{className:"oniratec-filters-modal__overlay",children:l.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":f,className:N("oniratec-filters-modal__content",c),children:[l.jsxs("div",{className:"oniratec-filters-modal__header",children:[l.jsxs("div",{className:"oniratec-filters-modal__title-group",children:[l.jsx("h2",{id:d,className:"oniratec-filters-modal__title",children:t}),e&&l.jsx("p",{id:f,className:"oniratec-filters-modal__description",children:e})]}),l.jsx("button",{type:"button",onClick:()=>m(!1),className:"oniratec-filters-modal__close","aria-label":o,children:l.jsx(J.X,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"oniratec-filters-modal__body",children:n}),l.jsxs("div",{className:"oniratec-filters-modal__footer",children:[l.jsx(Le,{type:"button",variant:"ghost",onClick:()=>m(!1),children:o}),l.jsx(Le,{type:"button",onClick:()=>{a?.(),m(!1)},children:i})]})]})}):null}const Ov=".csv,.xlsx";function jv({title:t="Importar datos",description:e="Sube un fichero CSV o XLSX para ejecutar la importacion.",helperText:n="El sistema procesara cada fila de forma tolerante.",accept:r=Ov,className:s,actionLabel:a="Importar",disabled:i=!1,loading:o=!1,summary:c,onImport:d}){const[f,u]=x.useState([]),m=f[0]??null,p=x.useMemo(()=>c?`Resultado: ${c.created} creados, ${c.updated} actualizados, ${c.failed} fallidos`:null,[c]),y=async()=>{!m||i||o||await d(m)};return l.jsxs("section",{className:N("oniratec-import-file-card",s),children:[l.jsxs("header",{className:"oniratec-import-file-card__header",children:[l.jsx("h3",{className:"oniratec-import-file-card__title",children:t}),l.jsx("p",{className:"oniratec-import-file-card__description",children:e})]}),l.jsx(fs,{files:f,onFilesChange:u,multiple:!1,accept:r,helperText:n,allowDrop:!0,showPreview:!1,disabled:i||o}),p&&l.jsx("p",{className:"oniratec-import-file-card__summary",children:p}),l.jsx("div",{className:"oniratec-import-file-card__footer",children:l.jsx(Le,{type:"button",variant:"primary",onClick:()=>{y()},disabled:!m||i,loading:o,children:a})})]})}function Dv({title:t,value:e,delta:n,deltaLabel:r,icon:s,description:a,loading:i=!1,className:o}){const c=n!==void 0&&n>=0;return i?l.jsxs(Tr,{className:N("oniratec-kpi-card",o),children:[l.jsx(Vr,{className:"mb-2 h-4 w-24"}),l.jsx(Vr,{className:"h-8 w-32"})]}):l.jsxs(Tr,{className:N("oniratec-kpi-card",o),children:[l.jsx(ga,{children:l.jsxs("div",{className:"oniratec-kpi-card__header",children:[l.jsx(ya,{className:"oniratec-kpi-card__label",children:t}),s&&l.jsx("div",{className:"oniratec-kpi-card__icon-wrapper",children:l.jsx(s,{})})]})}),l.jsxs(va,{children:[l.jsx("div",{className:"oniratec-kpi-card__value",children:e}),(n!==void 0||a)&&l.jsxs("div",{className:"mt-1 flex items-center gap-1.5",children:[n!==void 0&&l.jsxs("span",{className:N("oniratec-kpi-card__delta",c?"oniratec-kpi-card__delta--positive":"oniratec-kpi-card__delta--negative"),children:[c?l.jsx(J.TrendingUp,{className:"h-3 w-3"}):l.jsx(J.TrendingDown,{className:"h-3 w-3"}),Math.abs(n),"%"]}),a&&l.jsx("p",{className:"oniratec-kpi-card__description",children:r??a})]})]})]})}function Rv({title:t,description:e,actions:n,className:r}){return l.jsxs("div",{className:N("oniratec-page-header",r),children:[l.jsxs("div",{className:"oniratec-page-header__content",children:[l.jsx("h1",{className:"oniratec-page-header__title",children:t}),e&&l.jsx("p",{className:"oniratec-page-header__description",children:e})]}),n&&l.jsx("div",{className:"oniratec-page-header__actions",children:n})]})}const $r=x.createContext({mode:"light",theme:"nova",tokens:{},isRoot:!1});function Av({mode:t="light",theme:e="nova",tokens:n={},children:r}){const a=!x.useContext($r).isRoot,i=x.useRef({});return x.useEffect(()=>{if(!a)return;const o=document.documentElement;o.dataset.mode=t,o.dataset.theme=e,o.classList.toggle("dark",t==="dark"),o.style.colorScheme=t;const c=i.current,d=n;for(const f of Object.keys(c))f in d||o.style.removeProperty(f);for(const[f,u]of Object.entries(d))o.style.setProperty(f,u);i.current={...d}},[t,e,n,a]),x.useEffect(()=>{if(a)return()=>{const o=document.documentElement;for(const c of Object.keys(i.current))o.style.removeProperty(c)}},[a]),l.jsx($r.Provider,{value:{mode:t,theme:e,tokens:n,isRoot:!0},children:r})}function Mv(){const{mode:t,theme:e,tokens:n}=x.useContext($r);return{mode:t,theme:e,tokens:n}}var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},t.getValidEnumValues=s=>{const a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(const i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=r,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(re||(re={}));var Co;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Co||(Co={}));const R=re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),St=t=>{switch(typeof t){case"undefined":return R.undefined;case"string":return R.string;case"number":return Number.isNaN(t)?R.nan:R.number;case"boolean":return R.boolean;case"function":return R.function;case"bigint":return R.bigint;case"symbol":return R.symbol;case"object":return Array.isArray(t)?R.array:t===null?R.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?R.promise:typeof Map<"u"&&t instanceof Map?R.map:typeof Set<"u"&&t instanceof Set?R.set:typeof Date<"u"&&t instanceof Date?R.date:R.object;default:return R.unknown}},C=re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class gt extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},r={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let o=r,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(n(i))):o[d]=o[d]||{_errors:[]},o=o[d],c++}}};return s(this),r}static assert(e){if(!(e instanceof gt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];n[a]=n[a]||[],n[a].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}gt.create=t=>new gt(t);const oa=(t,e)=>{let n;switch(t.code){case C.invalid_type:t.received===R.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case C.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,re.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:n=`Unrecognized key(s) in object: ${re.joinValues(t.keys,", ")}`;break;case C.invalid_union:n="Invalid input";break;case C.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${re.joinValues(t.options)}`;break;case C.invalid_enum_value:n=`Invalid enum value. Expected ${re.joinValues(t.options)}, received '${t.received}'`;break;case C.invalid_arguments:n="Invalid function arguments";break;case C.invalid_return_type:n="Invalid function return type";break;case C.invalid_date:n="Invalid date";break;case C.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:re.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case C.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case C.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case C.custom:n="Invalid input";break;case C.invalid_intersection_types:n="Intersection results could not be merged";break;case C.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case C.not_finite:n="Number must be finite";break;default:n=e.defaultError,re.assertNever(t)}return{message:n}};let Iv=oa;function Fv(){return Iv}const Pv=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,a=[...n,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const c=r.filter(d=>!!d).slice().reverse();for(const d of c)o=d(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}};function j(t,e){const n=Fv(),r=Pv({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===oa?void 0:oa].filter(s=>!!s)});t.common.issues.push(r)}class Ve{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return q;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const a=await s.key,i=await s.value;r.push({key:a,value:i})}return Ve.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return q;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const q=Object.freeze({status:"aborted"}),Fn=t=>({status:"dirty",value:t}),Ue=t=>({status:"valid",value:t}),To=t=>t.status==="aborted",Eo=t=>t.status==="dirty",xn=t=>t.status==="valid",Wr=t=>typeof Promise<"u"&&t instanceof Promise;var A;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(A||(A={}));class Dt{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Oo=(t,e)=>{if(xn(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new gt(t.common.issues);return this._error=n,this._error}}};function K(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{const{message:c}=t;return i.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:c??n??o.defaultError}},description:s}}class ne{get description(){return this._def.description}_getType(e){return St(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:St(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ve,ctx:{common:e.parent.common,data:e.data,parsedType:St(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Wr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:St(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Oo(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:St(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return xn(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>xn(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:St(e)},s=this._parse({data:e,path:r.path,parent:r}),a=await(Wr(s)?s:Promise.resolve(s));return Oo(r,a)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:C.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new bn({schema:this,typeName:Y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Tt.create(this,this._def)}nullable(){return _n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ct.create(this)}promise(){return Ur.create(this,this._def)}or(e){return Zr.create([this,e],this._def)}and(e){return Br.create(this,e,this._def)}transform(e){return new bn({...K(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ua({...K(this._def),innerType:this,defaultValue:n,typeName:Y.ZodDefault})}brand(){return new i0({typeName:Y.ZodBranded,type:this,...K(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new da({...K(this._def),innerType:this,catchValue:n,typeName:Y.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ni.create(this,e)}readonly(){return fa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Lv=/^c[^\s-]{8,}$/i,Vv=/^[0-9a-z]+$/,$v=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Wv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zv=/^[a-z0-9_-]{21}$/i,Zv=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Bv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Uv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Hv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ws;const qv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Yv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Gv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Xv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Jv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Kv=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Qv=new RegExp(`^${hd}$`);function md(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function e0(t){return new RegExp(`^${md(t)}$`)}function t0(t){let e=`${hd}T${md(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function n0(t,e){return!!((e==="v4"||!e)&&qv.test(t)||(e==="v6"||!e)&&Gv.test(t))}function r0(t,e){if(!Zv.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function s0(t,e){return!!((e==="v4"||!e)&&Yv.test(t)||(e==="v6"||!e)&&Xv.test(t))}class Wt extends ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==R.string){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_type,expected:R.string,received:a.parsedType}),q}const r=new Ve;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?j(s,{code:C.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&j(s,{code:C.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Uv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"email",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Ws||(Ws=new RegExp(Hv,"u")),Ws.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"emoji",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Wv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"uuid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")zv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"nanoid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Lv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"cuid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Vv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"cuid2",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$v.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"ulid",code:C.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),j(s,{validation:"url",code:C.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"regex",code:C.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?t0(a).test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Qv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?e0(a).test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{code:C.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Bv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"duration",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?n0(e.data,a.version)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"ip",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?r0(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"jwt",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?s0(e.data,a.version)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"cidr",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Jv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"base64",code:C.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?Kv.test(e.data)||(s=this._getOrReturnCtx(e,s),j(s,{validation:"base64url",code:C.invalid_string,message:a.message}),r.dirty()):re.assertNever(a);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:C.invalid_string,...A.errToObj(r)})}_addCheck(e){return new Wt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...A.errToObj(e)})}url(e){return this._addCheck({kind:"url",...A.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...A.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...A.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...A.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...A.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...A.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...A.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...A.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...A.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...A.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...A.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...A.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...A.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...A.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...A.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...A.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...A.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...A.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...A.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...A.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...A.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...A.errToObj(n)})}nonempty(e){return this.min(1,A.errToObj(e))}trim(){return new Wt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Wt.create=t=>new Wt({checks:[],typeName:Y.ZodString,coerce:t?.coerce??!1,...K(t)});function a0(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,a=Number.parseInt(t.toFixed(s).replace(".","")),i=Number.parseInt(e.toFixed(s).replace(".",""));return a%i/10**s}class zn extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==R.number){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_type,expected:R.number,received:a.parsedType}),q}let r;const s=new Ve;for(const a of this._def.checks)a.kind==="int"?re.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),j(r,{code:C.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?a0(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),j(r,{code:C.not_finite,message:a.message}),s.dirty()):re.assertNever(a);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,A.toString(n))}gt(e,n){return this.setLimit("min",e,!1,A.toString(n))}lte(e,n){return this.setLimit("max",e,!0,A.toString(n))}lt(e,n){return this.setLimit("max",e,!1,A.toString(n))}setLimit(e,n,r,s){return new zn({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:A.toString(s)}]})}_addCheck(e){return new zn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:A.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:A.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&re.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}zn.create=t=>new zn({checks:[],typeName:Y.ZodNumber,coerce:t?.coerce||!1,...K(t)});class Zn extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==R.bigint)return this._getInvalidInput(e);let r;const s=new Ve;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),j(r,{code:C.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):re.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return j(n,{code:C.invalid_type,expected:R.bigint,received:n.parsedType}),q}gte(e,n){return this.setLimit("min",e,!0,A.toString(n))}gt(e,n){return this.setLimit("min",e,!1,A.toString(n))}lte(e,n){return this.setLimit("max",e,!0,A.toString(n))}lt(e,n){return this.setLimit("max",e,!1,A.toString(n))}setLimit(e,n,r,s){return new Zn({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:A.toString(s)}]})}_addCheck(e){return new Zn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Zn.create=t=>new Zn({checks:[],typeName:Y.ZodBigInt,coerce:t?.coerce??!1,...K(t)});class jo extends ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==R.boolean){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.boolean,received:r.parsedType}),q}return Ue(e.data)}}jo.create=t=>new jo({typeName:Y.ZodBoolean,coerce:t?.coerce||!1,...K(t)});class zr extends ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==R.date){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_type,expected:R.date,received:a.parsedType}),q}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return j(a,{code:C.invalid_date}),q}const r=new Ve;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),j(s,{code:C.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):re.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new zr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:A.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:A.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}zr.create=t=>new zr({checks:[],coerce:t?.coerce||!1,typeName:Y.ZodDate,...K(t)});class Do extends ne{_parse(e){if(this._getType(e)!==R.symbol){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.symbol,received:r.parsedType}),q}return Ue(e.data)}}Do.create=t=>new Do({typeName:Y.ZodSymbol,...K(t)});class Ro extends ne{_parse(e){if(this._getType(e)!==R.undefined){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.undefined,received:r.parsedType}),q}return Ue(e.data)}}Ro.create=t=>new Ro({typeName:Y.ZodUndefined,...K(t)});class Ao extends ne{_parse(e){if(this._getType(e)!==R.null){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.null,received:r.parsedType}),q}return Ue(e.data)}}Ao.create=t=>new Ao({typeName:Y.ZodNull,...K(t)});class la extends ne{constructor(){super(...arguments),this._any=!0}_parse(e){return Ue(e.data)}}la.create=t=>new la({typeName:Y.ZodAny,...K(t)});class Mo extends ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ue(e.data)}}Mo.create=t=>new Mo({typeName:Y.ZodUnknown,...K(t)});class Rt extends ne{_parse(e){const n=this._getOrReturnCtx(e);return j(n,{code:C.invalid_type,expected:R.never,received:n.parsedType}),q}}Rt.create=t=>new Rt({typeName:Y.ZodNever,...K(t)});class Io extends ne{_parse(e){if(this._getType(e)!==R.undefined){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.void,received:r.parsedType}),q}return Ue(e.data)}}Io.create=t=>new Io({typeName:Y.ZodVoid,...K(t)});class ct extends ne{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==R.array)return j(n,{code:C.invalid_type,expected:R.array,received:n.parsedType}),q;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,o=n.data.length<s.exactLength.value;(i||o)&&(j(n,{code:i?C.too_big:C.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(j(n,{code:C.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(j(n,{code:C.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,o)=>s.type._parseAsync(new Dt(n,i,n.path,o)))).then(i=>Ve.mergeArray(r,i));const a=[...n.data].map((i,o)=>s.type._parseSync(new Dt(n,i,n.path,o)));return Ve.mergeArray(r,a)}get element(){return this._def.type}min(e,n){return new ct({...this._def,minLength:{value:e,message:A.toString(n)}})}max(e,n){return new ct({...this._def,maxLength:{value:e,message:A.toString(n)}})}length(e,n){return new ct({...this._def,exactLength:{value:e,message:A.toString(n)}})}nonempty(e){return this.min(1,e)}}ct.create=(t,e)=>new ct({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Y.ZodArray,...K(e)});function cn(t){if(t instanceof ye){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Tt.create(cn(r))}return new ye({...t._def,shape:()=>e})}else return t instanceof ct?new ct({...t._def,type:cn(t.element)}):t instanceof Tt?Tt.create(cn(t.unwrap())):t instanceof _n?_n.create(cn(t.unwrap())):t instanceof Ht?Ht.create(t.items.map(e=>cn(e))):t}class ye extends ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=re.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==R.object){const d=this._getOrReturnCtx(e);return j(d,{code:C.invalid_type,expected:R.object,received:d.parsedType}),q}const{status:r,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Rt&&this._def.unknownKeys==="strip"))for(const d in s.data)i.includes(d)||o.push(d);const c=[];for(const d of i){const f=a[d],u=s.data[d];c.push({key:{status:"valid",value:d},value:f._parse(new Dt(s,u,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof Rt){const d=this._def.unknownKeys;if(d==="passthrough")for(const f of o)c.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(d==="strict")o.length>0&&(j(s,{code:C.unrecognized_keys,keys:o}),r.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const f of o){const u=s.data[f];c.push({key:{status:"valid",value:f},value:d._parse(new Dt(s,u,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const d=[];for(const f of c){const u=await f.key,m=await f.value;d.push({key:u,value:m,alwaysSet:f.alwaysSet})}return d}).then(d=>Ve.mergeObjectSync(r,d)):Ve.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return A.errToObj,new ye({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:A.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ye({...this._def,unknownKeys:"strip"})}passthrough(){return new ye({...this._def,unknownKeys:"passthrough"})}extend(e){return new ye({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ye({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Y.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new ye({...this._def,catchall:e})}pick(e){const n={};for(const r of re.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new ye({...this._def,shape:()=>n})}omit(e){const n={};for(const r of re.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new ye({...this._def,shape:()=>n})}deepPartial(){return cn(this)}partial(e){const n={};for(const r of re.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new ye({...this._def,shape:()=>n})}required(e){const n={};for(const r of re.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Tt;)a=a._def.innerType;n[r]=a}return new ye({...this._def,shape:()=>n})}keyof(){return pd(re.objectKeys(this.shape))}}ye.create=(t,e)=>new ye({shape:()=>t,unknownKeys:"strip",catchall:Rt.create(),typeName:Y.ZodObject,...K(e)});ye.strictCreate=(t,e)=>new ye({shape:()=>t,unknownKeys:"strict",catchall:Rt.create(),typeName:Y.ZodObject,...K(e)});ye.lazycreate=(t,e)=>new ye({shape:t,unknownKeys:"strip",catchall:Rt.create(),typeName:Y.ZodObject,...K(e)});class Zr extends ne{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new gt(o.ctx.common.issues));return j(n,{code:C.invalid_union,unionErrors:i}),q}if(n.common.async)return Promise.all(r.map(async a=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const c of r){const d={...n,common:{...n.common,issues:[]},parent:null},f=c._parseSync({data:n.data,path:n.path,parent:d});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new gt(c));return j(n,{code:C.invalid_union,unionErrors:o}),q}}get options(){return this._def.options}}Zr.create=(t,e)=>new Zr({options:t,typeName:Y.ZodUnion,...K(e)});function ca(t,e){const n=St(t),r=St(e);if(t===e)return{valid:!0,data:t};if(n===R.object&&r===R.object){const s=re.objectKeys(e),a=re.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(const o of a){const c=ca(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(n===R.array&&r===R.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<t.length;a++){const i=t[a],o=e[a],c=ca(i,o);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===R.date&&r===R.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Br extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(a,i)=>{if(To(a)||To(i))return q;const o=ca(a.value,i.value);return o.valid?((Eo(a)||Eo(i))&&n.dirty(),{status:n.value,value:o.data}):(j(r,{code:C.invalid_intersection_types}),q)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Br.create=(t,e,n)=>new Br({left:t,right:e,typeName:Y.ZodIntersection,...K(n)});class Ht extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.array)return j(r,{code:C.invalid_type,expected:R.array,received:r.parsedType}),q;if(r.data.length<this._def.items.length)return j(r,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&r.data.length>this._def.items.length&&(j(r,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Dt(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>Ve.mergeArray(n,i)):Ve.mergeArray(n,a)}get items(){return this._def.items}rest(e){return new Ht({...this._def,rest:e})}}Ht.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ht({items:t,typeName:Y.ZodTuple,rest:null,...K(e)})};class Fo extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.map)return j(r,{code:C.invalid_type,expected:R.map,received:r.parsedType}),q;const s=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,c],d)=>({key:s._parse(new Dt(r,o,r.path,[d,"key"])),value:a._parse(new Dt(r,c,r.path,[d,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const d=await c.key,f=await c.value;if(d.status==="aborted"||f.status==="aborted")return q;(d.status==="dirty"||f.status==="dirty")&&n.dirty(),o.set(d.value,f.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const c of i){const d=c.key,f=c.value;if(d.status==="aborted"||f.status==="aborted")return q;(d.status==="dirty"||f.status==="dirty")&&n.dirty(),o.set(d.value,f.value)}return{status:n.value,value:o}}}}Fo.create=(t,e,n)=>new Fo({valueType:e,keyType:t,typeName:Y.ZodMap,...K(n)});class Bn extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.set)return j(r,{code:C.invalid_type,expected:R.set,received:r.parsedType}),q;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(j(r,{code:C.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(j(r,{code:C.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const a=this._def.valueType;function i(c){const d=new Set;for(const f of c){if(f.status==="aborted")return q;f.status==="dirty"&&n.dirty(),d.add(f.value)}return{status:n.value,value:d}}const o=[...r.data.values()].map((c,d)=>a._parse(new Dt(r,c,r.path,d)));return r.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,n){return new Bn({...this._def,minSize:{value:e,message:A.toString(n)}})}max(e,n){return new Bn({...this._def,maxSize:{value:e,message:A.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Bn.create=(t,e)=>new Bn({valueType:t,minSize:null,maxSize:null,typeName:Y.ZodSet,...K(e)});class Po extends ne{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Po.create=(t,e)=>new Po({getter:t,typeName:Y.ZodLazy,...K(e)});class Lo extends ne{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return j(n,{received:n.data,code:C.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}}Lo.create=(t,e)=>new Lo({value:t,typeName:Y.ZodLiteral,...K(e)});function pd(t,e){return new wn({values:t,typeName:Y.ZodEnum,...K(e)})}class wn extends ne{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return j(n,{expected:re.joinValues(r),received:n.parsedType,code:C.invalid_type}),q}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return j(n,{received:n.data,code:C.invalid_enum_value,options:r}),q}return Ue(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return wn.create(e,{...this._def,...n})}exclude(e,n=this._def){return wn.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}wn.create=pd;class Vo extends ne{_parse(e){const n=re.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==R.string&&r.parsedType!==R.number){const s=re.objectValues(n);return j(r,{expected:re.joinValues(s),received:r.parsedType,code:C.invalid_type}),q}if(this._cache||(this._cache=new Set(re.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=re.objectValues(n);return j(r,{received:r.data,code:C.invalid_enum_value,options:s}),q}return Ue(e.data)}get enum(){return this._def.values}}Vo.create=(t,e)=>new Vo({values:t,typeName:Y.ZodNativeEnum,...K(e)});class Ur extends ne{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==R.promise&&n.common.async===!1)return j(n,{code:C.invalid_type,expected:R.promise,received:n.parsedType}),q;const r=n.parsedType===R.promise?n.data:Promise.resolve(n.data);return Ue(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ur.create=(t,e)=>new Ur({type:t,typeName:Y.ZodPromise,...K(e)});class bn extends ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{j(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(n.value==="aborted")return q;const c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return c.status==="aborted"?q:c.status==="dirty"||n.value==="dirty"?Fn(c.value):c});{if(n.value==="aborted")return q;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?q:o.status==="dirty"||n.value==="dirty"?Fn(o.value):o}}if(s.type==="refinement"){const i=o=>{const c=s.refinement(o,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?q:(o.status==="dirty"&&n.dirty(),i(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?q:(o.status==="dirty"&&n.dirty(),i(o.value).then(()=>({status:n.value,value:o.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!xn(i))return q;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>xn(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:n.value,value:o})):q);re.assertNever(s)}}bn.create=(t,e,n)=>new bn({schema:t,typeName:Y.ZodEffects,effect:e,...K(n)});bn.createWithPreprocess=(t,e,n)=>new bn({schema:e,effect:{type:"preprocess",transform:t},typeName:Y.ZodEffects,...K(n)});class Tt extends ne{_parse(e){return this._getType(e)===R.undefined?Ue(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tt.create=(t,e)=>new Tt({innerType:t,typeName:Y.ZodOptional,...K(e)});class _n extends ne{_parse(e){return this._getType(e)===R.null?Ue(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:Y.ZodNullable,...K(e)});class ua extends ne{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===R.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ua.create=(t,e)=>new ua({innerType:t,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...K(e)});class da extends ne{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Wr(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new gt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new gt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}da.create=(t,e)=>new da({innerType:t,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...K(e)});class $o extends ne{_parse(e){if(this._getType(e)!==R.nan){const r=this._getOrReturnCtx(e);return j(r,{code:C.invalid_type,expected:R.nan,received:r.parsedType}),q}return{status:"valid",value:e.data}}}$o.create=t=>new $o({typeName:Y.ZodNaN,...K(t)});class i0 extends ne{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ni extends ne{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?q:a.status==="dirty"?(n.dirty(),Fn(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?q:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new ni({in:e,out:n,typeName:Y.ZodPipeline})}}class fa extends ne{_parse(e){const n=this._def.innerType._parse(e),r=s=>(xn(s)&&(s.value=Object.freeze(s.value)),s);return Wr(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}fa.create=(t,e)=>new fa({innerType:t,typeName:Y.ZodReadonly,...K(e)});var Y;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Y||(Y={}));const o0=la.create;Rt.create;ct.create;const l0=ye.create;Zr.create;Br.create;Ht.create;wn.create;Ur.create;Tt.create;_n.create;function c0(t){const e=[];for(const n of t.sections)for(const r of n.fields)Array.isArray(r)?e.push(...r):e.push(r);return e}function u0(t){const e={};for(const r of t.sections)for(const s of r.fields){const a=Array.isArray(s)?s:[s];for(const i of a)e[i.name]=i.schema??o0().optional()}let n=l0(e);return t.crossRules?.length&&(n=n.superRefine((r,s)=>{for(const a of t.crossRules)a(r,s)})),n}function d0(t,e){const n=t.defaultValues?.(e)??{},r=c0(t),s={...n};for(const a of r)a.defaultValue!==void 0&&s[a.name]===void 0&&(s[a.name]=a.defaultValue);return s}var f0=t=>t.type==="checkbox",Pn=t=>t instanceof Date,ri=t=>t==null;const gd=t=>typeof t=="object";var qt=t=>!ri(t)&&!Array.isArray(t)&&gd(t)&&!Pn(t),h0=t=>qt(t)&&t.target?f0(t.target)?t.target.checked:t.target.value:t,m0=(t,e)=>e.split(".").some((n,r,s)=>!isNaN(Number(n))&&t.has(s.slice(0,r).join("."))),p0=t=>{const e=t.constructor&&t.constructor.prototype;return qt(e)&&e.hasOwnProperty("isPrototypeOf")},g0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function yd(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(g0&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(qt(t)&&p0(t)))return t;const r=n?[]:Object.create(Object.getPrototypeOf(t));for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=yd(t[s]));return r}var vd=t=>/^\w*$/.test(t),ha=t=>t===void 0,y0=t=>Array.isArray(t)?t.filter(Boolean):[],xd=t=>y0(t.replace(/["|']|\]/g,"").split(/\.|\[/)),je=(t,e,n)=>{if(!e||!qt(t))return n;const s=(vd(e)?[e]:xd(e)).reduce((a,i)=>ri(a)?void 0:a[i],t);return ha(s)||s===t?ha(t[e])?n:t[e]:s},zs=t=>typeof t=="boolean",vr=t=>typeof t=="function",Wo=(t,e,n)=>{let r=-1;const s=vd(e)?[e]:xd(e),a=s.length,i=a-1;for(;++r<a;){const o=s[r];let c=n;if(r!==i){const d=t[o];c=qt(d)||Array.isArray(d)?d:isNaN(+s[r+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;t[o]=c,t=t[o]}};const zo={BLUR:"blur",CHANGE:"change"},Zo={all:"all"},si=x.createContext(null);si.displayName="HookFormControlContext";const ai=()=>x.useContext(si);var v0=(t,e,n,r=!0)=>{const s={};for(const a in t)Object.defineProperty(s,a,{get:()=>{const i=a;return e._proxyFormState[i]!==Zo.all&&(e._proxyFormState[i]=!r||Zo.all),n&&(n[i]=!0),t[i]}});return s};const wd=typeof window<"u"?x.useLayoutEffect:x.useEffect;function x0(t){const e=ai(),{control:n=e,disabled:r,name:s,exact:a}=t||{},[i,o]=x.useState(()=>({...n._formState,defaultValues:n._defaultValues})),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return wd(()=>n._subscribe({name:s,formState:c.current,exact:a,callback:d=>{!r&&o({...n._formState,...d,defaultValues:n._defaultValues})}}),[s,r,a]),x.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),x.useMemo(()=>v0(i,n,c.current,!1),[i,n])}var w0=t=>typeof t=="string",Bo=(t,e,n,r,s)=>w0(t)?je(n,t,s):Array.isArray(t)?t.map(a=>je(n,a)):n,Uo=t=>ri(t)||!gd(t);function Cr(t,e,n=new WeakSet){if(t===e)return!0;if(Uo(t)||Uo(e))return Object.is(t,e);if(Pn(t)&&Pn(e))return Object.is(t.getTime(),e.getTime());const r=Object.keys(t),s=Object.keys(e);if(r.length!==s.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const a of r){const i=t[a];if(!(a in e))return!1;if(a!=="ref"){const o=e[a];if(Pn(i)&&Pn(o)||(qt(i)||Array.isArray(i))&&(qt(o)||Array.isArray(o))?!Cr(i,o,n):!Object.is(i,o))return!1}}return!0}function bd(t){const e=ai(),{control:n=e,name:r,defaultValue:s,disabled:a,exact:i,compute:o}=t||{},c=x.useRef(s),d=x.useRef(o),f=x.useRef(void 0),u=x.useRef(n),m=x.useRef(r);d.current=o;const[p,y]=x.useState(()=>{const S=n._getWatch(r,c.current);return d.current?d.current(S):S}),g=x.useCallback(S=>{const _=Bo(r,n._names,S||n._formValues,!1,c.current);return d.current?d.current(_):_},[n._formValues,n._names,r]),w=x.useCallback(S=>{if(!a){const _=Bo(r,n._names,S||n._formValues,!1,c.current);if(d.current){const T=d.current(_);Cr(T,f.current)||(y(T),f.current=T)}else y(_)}},[n._formValues,n._names,a,r]);wd(()=>((u.current!==n||!Cr(m.current,r))&&(u.current=n,m.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:i,callback:S=>{w(S.values)}})),[n,i,r,w]),x.useEffect(()=>n._removeUnmounted());const v=u.current!==n,k=m.current,b=x.useMemo(()=>{if(a)return null;const S=!v&&!Cr(k,r);return v||S?g():null},[a,v,r,k,g]);return b!==null?b:p}function b0(t){const e=ai(),{name:n,disabled:r,control:s=e,shouldUnregister:a,defaultValue:i,exact:o=!0}=t,c=m0(s._names.array,n),d=x.useMemo(()=>je(s._formValues,n,je(s._defaultValues,n,i)),[s,n,i]),f=bd({control:s,name:n,defaultValue:d,exact:o}),u=x0({control:s,name:n,exact:o}),m=x.useRef(t),p=x.useRef(s.register(n,{...t.rules,value:f,...zs(t.disabled)?{disabled:t.disabled}:{}}));m.current=t;const y=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!je(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!je(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!je(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!je(u.validatingFields,n)},error:{enumerable:!0,get:()=>je(u.errors,n)}}),[u,n]),g=x.useCallback(b=>p.current.onChange({target:{value:h0(b),name:n},type:zo.CHANGE}),[n]),w=x.useCallback(()=>p.current.onBlur({target:{value:je(s._formValues,n),name:n},type:zo.BLUR}),[n,s._formValues]),v=x.useCallback(b=>{const S=je(s._fields,n);S&&S._f&&b&&(S._f.ref={focus:()=>vr(b.focus)&&b.focus(),select:()=>vr(b.select)&&b.select(),setCustomValidity:_=>vr(b.setCustomValidity)&&b.setCustomValidity(_),reportValidity:()=>vr(b.reportValidity)&&b.reportValidity()})},[s._fields,n]),k=x.useMemo(()=>({name:n,value:f,...zs(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:g,onBlur:w,ref:v}),[n,r,u.disabled,g,w,v,f]);return x.useEffect(()=>{const b=s._options.shouldUnregister||a;s.register(n,{...m.current.rules,...zs(m.current.disabled)?{disabled:m.current.disabled}:{}});const S=(_,T)=>{const E=je(s._fields,_);E&&E._f&&(E._f.mount=T)};if(S(n,!0),b){const _=yd(je(s._options.defaultValues,n,m.current.defaultValue));Wo(s._defaultValues,n,_),ha(je(s._formValues,n))&&Wo(s._formValues,n,_)}return!c&&s.register(n),()=>{(c?b&&!s._state.action:b)?s.unregister(n):S(n,!1)}},[n,s,c,a]),x.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),x.useMemo(()=>({field:k,formState:u,fieldState:y}),[k,u,y])}const _0=t=>t.render(b0(t)),_d=x.createContext(null);_d.displayName="HookFormContext";const k0=t=>{const{children:e,watch:n,getValues:r,getFieldState:s,setError:a,clearErrors:i,setValue:o,setValues:c,trigger:d,formState:f,resetField:u,reset:m,handleSubmit:p,unregister:y,control:g,register:w,setFocus:v,subscribe:k}=t,b=x.useMemo(()=>({watch:n,getValues:r,getFieldState:s,setError:a,clearErrors:i,setValue:o,setValues:c,trigger:d,formState:f,resetField:u,reset:m,handleSubmit:p,unregister:y,control:g,register:w,setFocus:v,subscribe:k}),[i,g,f,s,r,p,w,m,u,a,v,o,c,k,d,y,n]);return x.createElement(_d.Provider,{value:b},x.createElement(si.Provider,{value:b.control},e))};function S0({form:t,field:e}){const[n,r]=x.useState(!1);return l.jsx(_0,{control:t.control,name:e.name,render:({field:s,fieldState:{error:a}})=>{const i=d=>e.normalize?e.normalize(d):d,o=()=>{e.deps?.onChangeTrigger&&t.trigger(e.deps.onChangeTrigger)},c={className:e.className,error:a?.message,required:!e.schema?.isOptional?.()};switch(e.kind){case"custom":if(!e.render)throw new Error(`Field ${e.name} marked as custom but has no render function`);return l.jsx("div",{className:e.className,children:e.render({form:t})});case"input":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(Wn,{type:"text",placeholder:e.placeholder,value:s.value??"",onChange:d=>{s.onChange(i(d.target.value)),o()},onBlur:s.onBlur})}),l.jsx(Ke,{})]});case"password":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsxs("div",{className:"relative flex w-full items-center",children:[l.jsx(Je,{children:l.jsx(Wn,{type:n?"text":"password",placeholder:e.placeholder,value:s.value??"",className:"pr-10",onChange:d=>{const f=d.target.value;s.onChange(i(f)),o()},onBlur:s.onBlur})}),l.jsx(Le,{type:"button",variant:"ghost",className:"absolute right-3 flex items-center justify-center text-slate-400 hover:text-slate-600 focus:outline-none",onClick:()=>r(!n),tabIndex:-1,children:n?l.jsx(J.EyeOff,{className:"h-4 w-4"}):l.jsx(J.Eye,{className:"h-4 w-4"})})]}),l.jsx(Ke,{})]});case"textarea":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx("textarea",{className:"oniratec-field__textarea",value:s.value??"",placeholder:e.placeholder,rows:4,onChange:d=>{s.onChange(i(d.target.value)),o()},onBlur:s.onBlur})}),l.jsx(Ke,{})]});case"select":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsxs(ms,{value:s.value||void 0,onValueChange:d=>{s.onChange(i(d||void 0)),o()},children:[l.jsx(Qn,{children:l.jsx(ps,{})}),l.jsx(er,{children:(e.options??[]).map(d=>l.jsx(tr,{value:String(d.value),children:d.label},d.value))})]})}),l.jsx(Ke,{})]});case"asyncSelect":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(Qa,{value:s.value||void 0,onValueChange:d=>{s.onChange(i(d)),o()},placeholder:e.placeholder,searchPlaceholder:e.searchPlaceholder,minChars:e.minChars,debounceMs:e.debounceMs,fetcher:e.fetcher,getOptionValue:e.getOptionValue,getOptionLabel:e.getOptionLabel,emptyLabel:e.emptyLabel,emptyActionLabel:e.emptyActionLabel,onEmptyActionClick:e.onEmptyActionClick,hasError:!!a?.message})}),l.jsx(Ke,{})]});case"toggle":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(nr,{checked:!!s.value,onChange:d=>{s.onChange(i(d)),o()}})}),l.jsx(Ke,{})]});case"checkbox":return l.jsxs(Xe,{...c,children:[l.jsx(Je,{children:l.jsxs("label",{className:"oniratec-checkbox",children:[l.jsx("input",{type:"checkbox",checked:!!s.value,onChange:d=>{s.onChange(i(d.target.checked)),o()},onBlur:s.onBlur}),l.jsx("span",{children:e.label})]})}),l.jsx(Ke,{})]});case"date":return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(as,{value:s.value,onChange:d=>{s.onChange(i(d)),o()},placeholder:e.placeholder,min:e.min,max:e.max,timeZone:e.timeZone,isInvalid:!!a?.message})}),l.jsx(Ke,{})]});case"fileUpload":{const d=Array.isArray(s.value)?s.value:[];return l.jsxs(Xe,{...c,children:[l.jsxs(at,{children:[e.label,e.labelAddon]}),l.jsx(Je,{children:l.jsx(fs,{files:d,onFilesChange:f=>{s.onChange(i(f)),o()},accept:e.accept,multiple:e.multiple,helperText:e.helperText,allowDrop:e.allowDrop,placeholder:e.placeholder,defaultPreviewUrl:e.defaultPreviewUrl})}),l.jsx(Ke,{})]})}}}})}function N0(t){return Array.isArray(t)?t:[t]}function kd({config:t,form:e,onSubmitAction:n,handleErrors:r,submitLabel:s,maxWidthClass:a,children:i}){const o=bd({control:e.control});return l.jsx(k0,{...e,children:l.jsxs("form",{onSubmit:e.handleSubmit(n,c=>r(c)),className:N("space-y-8",a),children:[t.sections.map((c,d)=>l.jsxs(x.Fragment,{children:[l.jsxs("section",{className:"space-y-4",children:[l.jsx("h3",{className:"oniratec-form__section-title",children:c.title}),l.jsx("div",{className:"space-y-4",children:c.fields.map((f,u)=>{const m=N0(f).filter(g=>!g.hidden?.(o));if(!m.length)return null;const p=m.reduce((g,w)=>g+(w.colSpan??1),0),y=p>1?N("grid gap-4",p===2&&"grid-cols-2",p===3&&"grid-cols-3",p===4&&"grid-cols-4"):"";return l.jsx("div",{className:y,children:m.map(g=>l.jsx("div",{className:g.colSpan?`col-span-${g.colSpan}`:void 0,children:l.jsx(S0,{form:e,field:g})},g.name))},u)})})]},c.title),d<t.sections.length-1&&l.jsx(x.Fragment,{children:l.jsx("hr",{className:"oniratec-form__separator"})})]},`fragment-${c.title}`)),i,l.jsx("div",{className:"oniratec-form__actions",children:l.jsx(Le,{type:"submit",loading:e.formState.isSubmitting,children:s})})]})})}function C0(t){return l.jsx(kd,{...t})}const T0=t=>t==="center"?"text-center":t==="right"?"text-right":"text-left",E0=t=>{if(t)return typeof t=="number"?`w-[${t}px]`:t.startsWith("w-")?t:`w-[${t}]`},O0=t=>t?Array.isArray(t)?t:[t]:[];function Sd(t){return{columns:t.columns.map(r=>{const s=T0(r.align),a=E0(r.width),i=[s,a,r.className].filter(Boolean).join(" "),o=[s,a,r.headerClassName].filter(Boolean).join(" ");return{key:r.id,header:r.header,render:r.cell??(c=>String(r.accessor?.(c)??"")),className:i||void 0,headerClassName:o||void 0,sortable:r.sortable??!!(r.sortFn||r.accessor),sortFn:r.sortFn,sortValue:r.accessor}}),getSortDirection:(r,s)=>O0(r).find(o=>o.columnId===s)?.direction??null}}function j0(t,e,n){const{columns:r}=Sd(t);return l.jsx(cd,{columns:r,data:e,...n})}const D0=t=>t.reduce((e,n)=>n.type==="toggle"?(e[n.id]=n.value??!1,e):n.type==="date"?(e[n.id]=n.value??null,e):(e[n.id]=n.value??"",e),{});function R0(t){const e=D0(t.filters),n=(a,i,o)=>({...a,[i]:o}),r=()=>({...e}),s=a=>t.buildQueryParams?t.buildQueryParams(a):a;return{filters:t.filters,initialState:e,updateFilter:n,resetState:r,buildQueryParams:s}}function Nd(t,e,n,r){return l.jsx(dd,{filters:t.filters,value:e,onChange:n,onReset:r?.onReset,resetLabel:r?.resetLabel,showReset:r?.showReset,className:r?.className,layout:r?.layout,actions:r?.actions})}function A0(t,e,n,r){return l.jsx(fd,{title:r.title,description:r.description,isOpen:r.isOpen,onOpenChange:r.onOpenChange,onApply:r.onApply,applyLabel:r.applyLabel,closeLabel:r.closeLabel,className:r.className,children:Nd(t,e,n,r.panel)})}function M0(t,e,n){const r=new Set(t.filter(s=>s.type==="date").map(s=>s.id));return Object.entries(e).reduce((s,[a,i])=>i==null?(s[a]=void 0,s):r.has(a)&&i instanceof Date?(s[a]=su(i,n?.timeZone)??void 0,s):(s[a]=i,s),{})}function I0(...t){return Ho.twMerge(ma.clsx(t))}exports.Alert=il;exports.AlertDescription=ll;exports.AlertTitle=ol;exports.AsyncSelect=Qa;exports.AuthLayout=ld;exports.Badge=xa;exports.Box=Ko;exports.Breadcrumbs=bv;exports.Button=Le;exports.Card=Tr;exports.CardAction=sl;exports.CardContent=va;exports.CardDescription=rl;exports.CardFooter=al;exports.CardHeader=ga;exports.CardTitle=ya;exports.Checkbox=cl;exports.ConfirmDialog=_v;exports.DEFAULT_TIME_ZONE=Fr;exports.DashboardLayout=Nv;exports.DataTable=cd;exports.DatePicker=as;exports.Dialog=Su;exports.DialogClose=yy;exports.DialogContent=Ha;exports.DialogDescription=Xa;exports.DialogFooter=Ya;exports.DialogHeader=qa;exports.DialogOverlay=Ua;exports.DialogPortal=Nu;exports.DialogTitle=Ga;exports.DialogTrigger=gy;exports.DropdownMenu=vy;exports.DropdownMenuCheckboxItem=Eu;exports.DropdownMenuContent=Cu;exports.DropdownMenuGroup=wy;exports.DropdownMenuItem=Tu;exports.DropdownMenuLabel=ju;exports.DropdownMenuPortal=by;exports.DropdownMenuRadioGroup=ky;exports.DropdownMenuRadioItem=Ou;exports.DropdownMenuSeparator=Du;exports.DropdownMenuShortcut=Mu;exports.DropdownMenuSub=_y;exports.DropdownMenuSubContent=Au;exports.DropdownMenuSubTrigger=Ru;exports.DropdownMenuTrigger=xy;exports.Field=Xe;exports.FieldControl=Je;exports.FieldLabel=at;exports.FieldMessage=Ke;exports.FilePicker=Cy;exports.FileUpload=fs;exports.FiltersModal=fd;exports.FiltersPanel=dd;exports.FormFactoryRenderer=kd;exports.ImportFileCard=jv;exports.Input=Wn;exports.Kbd=Pu;exports.KpiCard=Dv;exports.Logo=nl;exports.NotFoundState=Lu;exports.PageHeader=Rv;exports.PageSizeSelector=ud;exports.Pagination=Ev;exports.PasswordInput=Fu;exports.PersonAvatar=rf;exports.ProfileAvatar=sf;exports.Progress=Vu;exports.RadioGroup=Ey;exports.RadioGroupItem=Wu;exports.Select=ms;exports.SelectContent=er;exports.SelectGroup=Oy;exports.SelectItem=tr;exports.SelectLabel=zu;exports.SelectScrollDownButton=Ka;exports.SelectScrollUpButton=Ja;exports.SelectSeparator=Zu;exports.SelectTrigger=Qn;exports.SelectValue=ps;exports.Separator=Bu;exports.Sheet=Dy;exports.SheetClose=Ay;exports.SheetContent=Hu;exports.SheetDescription=Xu;exports.SheetFooter=Yu;exports.SheetHeader=qu;exports.SheetOverlay=ei;exports.SheetPortal=Uu;exports.SheetTitle=Gu;exports.SheetTrigger=Ry;exports.Skeleton=Vr;exports.Switch=zy;exports.Tabs=My;exports.TabsContent=td;exports.TabsList=Qu;exports.TabsTrigger=ed;exports.Textarea=Ju;exports.ThemeContext=$r;exports.ThemeProvider=Av;exports.Toaster=yv;exports.Toggle=nr;exports.Tooltip=xv;exports.TooltipContent=od;exports.TooltipProvider=vv;exports.TooltipTrigger=wv;exports.buildDefaultValues=d0;exports.buildFiltersQueryParams=M0;exports.buildZodSchema=u0;exports.buttonVariants=tl;exports.cn=I0;exports.createFiltersFactory=R0;exports.createTableFactory=Sd;exports.isValidTimeZone=Pr;exports.renderFiltersModal=A0;exports.renderFiltersPanel=Nd;exports.renderFormFactory=C0;exports.renderTable=j0;exports.resolveTimeZone=Kn;exports.setDefaultTimeZone=Qg;exports.toDateTime=ey;exports.toISODate=su;exports.toISODateTime=ty;exports.toast=av;exports.useField=hs;exports.useTheme=Mv;
|
|
46
46
|
//# sourceMappingURL=index.cjs.map
|