PageSourceSearch

https://www.grtjewels.com/_next/static/chunks/4567-4b07c66ad8e51a08.js

js grtjewels.com collected 2026-09-24 10:27:52 UTC 218,498 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4567],{70798:function(e,t,n){n.d(t,{Z:function(){return f}});var r=n(36760),i=n.n(r),s=n(2265),a=n(85001),l=n(68440),o=n(86289),u=n(57437);let d=s.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:s="span",...l}=e;return r=(0,a.vE)(r,"input-group-text"),(0,u.jsx)(s,{ref:t,className:i()(n,r),...l})});d.displayName="InputGroupText";let c=s.forwardRef((e,t)=>{let{bsPrefix:n,size:r,hasValidation:l,className:d,as:c="div",...f}=e;n=(0,a.vE)(n,"input-group");let h=(0,s.useMemo)(()=>({}),[]);return(0,u.jsx)(o.Z.Provider,{value:h,children:(0,u.jsx)(c,{ref:t,...f,className:i()(d,n,r&&"".concat(n,"-").concat(r),l&&"has-validation")})})});c.displayName="InputGroup";var f=Object.assign(c,{Text:d,Radio:e=>(0,u.jsx)(d,{children:(0,u.jsx)(l.Z,{type:"radio",...e})}),Checkbox:e=>(0,u.jsx)(d,{children:(0,u.jsx)(l.Z,{type:"checkbox",...e})})})},10279:function(e,t,n){var r=n(36760),i=n.n(r),s=n(2265),a=n(85001),l=n(57437);let o=s.forwardRef((e,t)=>{let{bsPrefix:n,variant:r,animation:s="border",size:o,as:u="div",className:d,...c}=e;n=(0,a.vE)(n,"spinner");let f="".concat(n,"-").concat(s);return(0,l.jsx)(u,{ref:t,...c,className:i()(d,f,o&&"".concat(f,"-").concat(o),r&&"text-".concat(r))})});o.displayName="Spinner",t.default=o},29139:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(36760),i=n.n(r),s=n(2265),a=n(85001),l=n(57437);let o=s.forwardRef((e,t)=>{let{as:n="div",bsPrefix:r,className:s,direction:o,gap:u,...d}=e;r=(0,a.vE)(r,"horizontal"===o?"hstack":"vstack");let c=(0,a.pi)(),f=(0,a.zG)();return(0,l.jsx)(n,{...d,ref:t,className:i()(s,r,...function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Hz,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.cs,r=[];return Object.entries(e).forEach(e=>{let[i,s]=e;null!=s&&("object"==typeof s?t.forEach(e=>{let t=s[e];null!=t&&r.push("".concat(i).concat(e!==n?"-".concat(e):"","-").concat(t))}):r.push("".concat(i,"-").concat(s)))}),r}({gap:u},c,f))})});o.displayName="Stack";var u=o},51050:function(e,t,n){n.d(t,{Me:function(){return E},oo:function(){return L},US:function(){return O},RR:function(){return A},cv:function(){return T},uY:function(){return C},dp:function(){return F}});var r=n(72695);function i(e,t,n){let i,{reference:s,floating:a}=e,l=(0,r.Qq)(t),o=(0,r.Wh)(t),u=(0,r.I4)(o),d=(0,r.k3)(t),c=s.x+s.width/2-a.width/2,f=s.y+s.height/2-a.height/2,h=s[u]/2-a[u]/2;switch(d){case"top":i={x:c,y:s.y-a.height};break;case"bottom":i={x:c,y:s.y+s.height};break;case"right":i={x:s.x+s.width,y:f};break;case"left":i={x:s.x-a.width,y:f};break;default:i={x:s.x,y:s.y}}let p=(0,r.hp)(t);return p&&(i[o]+=h*("end"===p?1:-1)*(n&&"y"===l?-1:1)),i}async function s(e,t){var n;void 0===t&&(t={});let{x:i,y:s,platform:a,rects:l,elements:o,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=(0,r.ku)(t,e),m=(0,r.yd)(p),g=o[h?"floating"===f?"reference":"floating":f],v=(0,r.JB)(await a.getClippingRect({element:null==(n=await (null==a.isElement?void 0:a.isElement(g)))||n?g:g.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(o.floating)),boundary:d,rootBoundary:c,strategy:u})),y="floating"===f?{x:i,y:s,width:l.floating.width,height:l.floating.height}:l.reference,b=await (null==a.getOffsetParent?void 0:a.getOffsetParent(o.floating)),_=await (null==a.isElement?void 0:a.isElement(b))&&await (null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},x=(0,r.JB)(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:b,strategy:u}):y);return{top:(v.top-x.top+m.top)/_.y,bottom:(x.bottom-v.bottom+m.bottom)/_.y,left:(v.left-x.left+m.left)/_.x,right:(x.right-v.right+m.right)/_.x}}let a=async(e,t,n)=>{let{placement:r="bottom",strategy:a="absolute",middleware:l=[],platform:o}=n,u=o.detectOverflow?o:{...o,detectOverflow:s},d=await (null==o.isRTL?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:h}=i(c,r,d),p=r,m=0,g={};for(let n=0;n<l.length;n++){let s=l[n];if(!s)continue;let{name:v,fn:y}=s,{x:b,y:_,data:x,reset:w}=await y({x:f,y:h,initialPlacement:r,placement:p,strategy:a,middlewareData:g,rects:c,platform:u,elements:{reference:e,floating:t}});f=null!=b?b:f,h=null!=_?_:h,g[v]={...g[v],...x},w&&m<50&&(m++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await o.getElementRects({reference:e,floating:t,strategy:a}):w.rects),{x:f,y:h}=i(c,p,d)),n=-1)}return{x:f,y:h,placement:p,strategy:a,middlewareData:g}},l=new Set(["left","top"]);async function o(e,t){let{placement:n,platform:i,elements:s}=e,a=await (null==i.isRTL?void 0:i.isRTL(s.floating)),o=(0,r.k3)(n),u=(0,r.hp)(n),d="y"===(0,r.Qq)(n),c=l.has(o)?-1:1,f=a&&d?-1:1,h=(0,r.ku)(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}
vendor: 6,099 bytes, line 1
1:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&"number"==typeof g&&(m="end"===u?-1*g:g),d?{x:m*f,y:p*c}:{x:p*c,y:m*f}}var u=n(94046);function d(e){let t=(0,u.Dx)(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,s=(0,u.Re)(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:i,o=(0,r.NM)(n)!==a||(0,r.NM)(i)!==l;return o&&(n=a,i=l),{width:n,height:i,$:o}}function c(e){return(0,u.kK)(e)?e:e.contextElement}function f(e){let t=c(e);if(!(0,u.Re)(t))return(0,r.ze)(1);let n=t.getBoundingClientRect(),{width:i,height:s,$:a}=d(t),l=(a?(0,r.NM)(n.width):n.width)/i,o=(a?(0,r.NM)(n.height):n.height)/s;return l&&Number.isFinite(l)||(l=1),o&&Number.isFinite(o)||(o=1),{x:l,y:o}}let h=(0,r.ze)(0);function p(e){let t=(0,u.Jj)(e);return(0,u.Pf)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:h}function m(e,t,n,i){var s;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),l=c(e),o=(0,r.ze)(1);t&&(i?(0,u.kK)(i)&&(o=f(i)):o=f(e));let d=(void 0===(s=n)&&(s=!1),i&&s&&i===(0,u.Jj)(l))?p(l):(0,r.ze)(0),h=(a.left+d.x)/o.x,m=(a.top+d.y)/o.y,g=a.width/o.x,v=a.height/o.y;if(l&&i){let e=(0,u.Jj)(l),t=(0,u.kK)(i)?(0,u.Jj)(i):i,n=e,r=(0,u.wK)(n);for(;r&&t!==n;){let e=f(r),t=r.getBoundingClientRect(),i=(0,u.Dx)(r),s=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;h*=e.x,m*=e.y,g*=e.x,v*=e.y,h+=s,m+=a,n=(0,u.Jj)(r),r=(0,u.wK)(n)}}return(0,r.JB)({width:g,height:v,x:h,y:m})}function g(e,t){let n=(0,u.Lw)(e).scrollLeft;return t?t.left+n:m((0,u.tF)(e)).left+n}function v(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-g(e,n),y:n.top+t.scrollTop}}function y(e,t,n){let i;if("viewport"===t||"layoutViewport"===t)i=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,i=(0,u.Jj)(e),s=(0,u.tF)(e),a=i.visualViewport,l=s.clientWidth,o=s.clientHeight,d=0,c=0;if(a){let e=!(0,u.Pf)()||"fixed"===t;r?e||(d=-a.offsetLeft,c=-a.offsetTop):(l=a.width,o=a.height,e&&(d=a.offsetLeft,c=a.offsetTop))}if(0>=g(s)){let e=s.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(s.clientWidth-t.clientWidth-r),a="stable both-edges"===getComputedStyle(s).scrollbarGutter?i/2:i;a<=25&&(l-=a)}return{width:l,height:o,x:d,y:c}}(e,n,t);else if("document"===t)i=function(e){let t=(0,u.Lw)(e),n=e.ownerDocument.body,i=(0,r.Fp)(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=(0,r.Fp)(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+g(e),l=-t.scrollTop;return"rtl"===(0,u.Dx)(n).direction&&(a+=(0,r.Fp)(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:l}}((0,u.tF)(e));else if((0,u.kK)(t))i=function(e,t){let n=m(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=f(e),a=e.clientWidth*s.x;return{width:a,height:e.clientHeight*s.y,x:i*s.x,y:r*s.y}}(t,n);else{let n=p(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return(0,r.JB)(i)}function b(e){return"static"===(0,u.Dx)(e).position}function _(e,t){if(!(0,u.Re)(e)||"fixed"===(0,u.Dx)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,u.tF)(e)===n&&(n=n.ownerDocument.body),n}function x(e,t){let n=(0,u.Jj)(e);if((0,u.tR)(e))return n;if(!(0,u.Re)(e)){let t=(0,u.Ow)(e);for(;t&&!(0,u.Py)(t);){if((0,u.kK)(t)&&!b(t))return t;t=(0,u.Ow)(t)}return n}let r=_(e,t);for(;r&&(0,u.Ze)(r)&&b(r);)r=_(r,t);return r&&(0,u.Py)(r)&&b(r)&&!(0,u.hT)(r)?n:r||(0,u.gQ)(e)||n}let w=async function(e){let t=this.getOffsetParent||x,n=this.getDimensions,i=await n(e.floating);return{reference:function(e,t,n){let i=(0,u.Re)(t),s=(0,u.tF)(t),a="fixed"===n,l=m(e,!0,a,t),o={scrollLeft:0,scrollTop:0},d=(0,r.ze)(0);if((i||!a)&&(("body"!==(0,u.wk)(t)||(0,u.ao)(s))&&(o=(0,u.Lw)(t)),i)){let e=m(t,!0,a,t);d.x=e.x+t.clientLeft,d.y=e.y+t.clientTop}!i&&s&&(d.x=g(s));let c=!s||i||a?(0,r.ze)(0):v(s,o);return{x:l.left+o.scrollLeft-d.x-c.x,y:l.top+o.scrollTop-d.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},k={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e,a="fixed"===s,l=(0,u.tF)(i),o=!!t&&(0,u.tR)(t.floating);if(i===l||o&&a)return n;let d={scrollLeft:0,scrollTop:0},c=(0,r.ze)(1),h=(0,r.ze)(0),p=(0,u.Re)(i);if((p||!a)&&(("body"!==(0,u.wk)(i)||(0,u.ao)(l))&&(d=(0,u.Lw)(i)),p)){let e=m(i);c=f(i),h.x=e.x+i.clientLeft,h.y=e.y+i.clientTop}let g=!l||p||a?(0,r.ze)(0):v(l,d);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+h.x+g.x,y:n.y*c.y-d.scrollTop*c.y+h.y+g.y}},getDocumentElement:u.tF,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e,a=[..."clippingAncestors"===n?(0,u.tR)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,u.Kx)(e,[],!1).filter(e=>(0,u.kK)(e)&&"body"!==(0,u.wk)(e)),i=null,s="fixed"===(0,u.Dx)(e).position,a=s?(0,u.Ow)(e):e;for(;(0,u.kK)(a)&&!(0,u.Py)(a);){let e=(0,u.Dx)(a),t=(0,u.hT)(a),n=i?i.position:s?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==a),a=(0,u.Ow)(a)}return t.set(e,r),r}(t,this._c):[].concat(n),i],l=y(t,a[0],s),o=l.top,d=l.right,c=l.bottom,f=l.left;for(let e=1;e<a.length;e++){let n=y(t,a[e],s);o=(0,r.Fp)(n.top,o),d=(0,r.VV)(n.right,d),c=(0,r.VV)(n.bottom,c),f=(0,r.Fp)(n.left,f)}return{width:d-f,height:c-o,x:f,y:o}},getOffsetParent:x,getElementRects:w,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=d(e);return{width:t,height:n}},getScale:f,isElement:u.kK,isRTL:function(e){return"rtl"===(0,u.Dx)(e).direction}};function S(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function E(e,t,n,i){let s;void 0===i&&(i={});let{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=i,h=c(e),p=a||l?[...h?(0,u.Kx)(h):[],...t?(0,u.Kx)(t):[]]:[];
vendor: 6,164 bytes, line 1
1p.forEach(e=>{a&&e.addEventListener("scroll",n),l&&e.addEventListener("resize",n)});let g=h&&d?function(e,t,n){let i,s=null,a=(0,u.tF)(e);function l(){var e;clearTimeout(i),null==(e=s)||e.disconnect(),s=null}function o(n,u){void 0===n&&(n=!1),void 0===u&&(u=1),l();let d=e.getBoundingClientRect(),{left:c,top:f,width:h,height:p}=d;if(n||t(),!h||!p)return;let m=(0,r.GW)(f),g=(0,r.GW)(a.clientWidth-(c+h)),v={rootMargin:-m+"px "+-g+"px "+-(0,r.GW)(a.clientHeight-(f+p))+"px "+-(0,r.GW)(c)+"px",threshold:(0,r.Fp)(0,(0,r.VV)(1,u))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!S(d,e.getBoundingClientRect()))return o();if(n!==u){if(!y)return o();n?o(!1,n):i=setTimeout(()=>{o(!1,1e-7)},1e3)}y=!1}try{s=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch(e){s=new IntersectionObserver(b,v)}s.observe(e)}let d=(0,u.Jj)(e),c=()=>o(n);return d.addEventListener("resize",c),o(!0),()=>{d.removeEventListener("resize",c),l()}}(h,n,l):null,v=-1,y=null;o&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===h&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),h&&!f&&y.observe(h),t&&y.observe(t));let b=f?m(e):null;return f&&function t(){let r=m(e);b&&!S(b,r)&&n(),b=r,s=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{a&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==g||g(),null==(e=y)||e.disconnect(),y=null,f&&cancelAnimationFrame(s)}}let O=s,T=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:s,placement:a,middlewareData:l}=t,u=await o(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},C=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:i,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:o=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=(0,r.ku)(e,t),c={x:n,y:i},f=await a.detectOverflow(t,d),h=(0,r.Qq)(s),p=(0,r.Rn)(h),m=c[p],g=c[h],v=(e,t)=>(0,r.uZ)(t+f["y"===e?"top":"left"],t,t-f["y"===e?"bottom":"right"]);l&&(m=v(p,m)),o&&(g=v(h,g));let y=u.fn({...t,[p]:m,[h]:g});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[p]:l,[h]:o}}}}}},A=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i,s,a,l;let{placement:o,middlewareData:u,rects:d,initialPlacement:c,platform:f,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,..._}=(0,r.ku)(e,t);if(null!=(n=u.arrow)&&n.alignmentOffset)return{};let x=(0,r.k3)(o),w=(0,r.Qq)(c),k=(0,r.k3)(c)===c,S=await (null==f.isRTL?void 0:f.isRTL(h.floating)),E=g||(k||!b?[(0,r.pw)(c)]:(0,r.gy)(c)),O="none"!==y;!g&&O&&E.push(...(0,r.KX)(c,b,y,S));let T=[c,...E],C=await f.detectOverflow(t,_),A=[],F=(null==(i=u.flip)?void 0:i.overflows)||[];if(p&&A.push(C[x]),m){let e=(0,r.i8)(o,d,S);A.push(C[e[0]],C[e[1]])}if(F=[...F,{placement:o,overflows:A}],!A.every(e=>e<=0)){let e=((null==(s=u.flip)?void 0:s.index)||0)+1,t=T[e];if(t&&(!("alignment"===m&&w!==(0,r.Qq)(t))||F.every(e=>(0,r.Qq)(e.placement)!==w||e.overflows[0]>0)))return{data:{index:e,overflows:F},reset:{placement:t}};let n=null==(a=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(v){case"bestFit":{let e=null==(l=F.filter(e=>{if(O){let t=(0,r.Qq)(e.placement);return t===w||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},F=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let n,i;let{placement:s,rects:a,platform:l,elements:o}=t,{apply:u=()=>{},...d}=(0,r.ku)(e,t),c=await l.detectOverflow(t,d),f=(0,r.k3)(s),h=(0,r.hp)(s),p="y"===(0,r.Qq)(s),{width:m,height:g}=a.floating;"top"===f||"bottom"===f?(n=f,i=h===(await (null==l.isRTL?void 0:l.isRTL(o.floating))?"start":"end")?"left":"right"):(i=f,n="end"===h?"top":"bottom");let v=g-c.top-c.bottom,y=m-c.left-c.right,b=(0,r.VV)(g-c[n],v),_=(0,r.VV)(m-c[i],y),x=t.middlewareData.shift,w=b,k=_;null!=x&&x.enabled.x&&(k=y),null!=x&&x.enabled.y&&(w=v),x||h||(p?k=m-2*(0,r.Fp)(c.left,c.right):w=g-2*(0,r.Fp)(c.top,c.bottom)),await u({...t,availableWidth:k,availableHeight:w});let S=await l.getDimensions(o.floating);return m!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}},L=(e,t,n)=>{let r=new Map,i=null!=n?n:{},s={...k,...i.platform,_c:r};return a(e,t,{...i,platform:s})}},97859:function(e,t,n){n.d(t,{RR:function(){return p},YF:function(){return c},cv:function(){return f},dp:function(){return m},uY:function(){return h}});var r=n(51050),i=n(2265),s=n(54887),a="undefined"!=typeof document?i.useLayoutEffect:function(){};function l(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!l(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!l(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function o(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let n=o(e);return Math.round(t*n)/n}function d(e){let t=i.useRef(e);return a(()=>{t.current=e}),t}function c(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:c=[],platform:f,elements:{reference:h,floating:p}={},transform:m=!0,whileElementsMounted:g,open:v}=e,[y,b]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[_,x]=i.useState(c);l(_,c)||x(c);let[w,k]=i.useState(null),[S,E]=i.useState(null),O=i.useCallback(e=>{e!==F.current&&(F.current=e,k(e))},[]),T=i.useCallback(e=>{e!==L.current&&(L.current=e,E(e))},[]),C=h||w,A=p||S,F=i.useRef(null),L=i.useRef(null),N=i.useRef(y),R=null!=g,I=d(g),M=d(f),P=d(v),D=i.useCallback(()=>
1{if(!F.current||!L.current)return;let e={placement:t,strategy:n,middleware:_};M.current&&(e.platform=M.current),(0,r.oo)(F.current,L.current,e).then(e=>{let t={...e,isPositioned:!1!==P.current};j.current&&!l(N.current,t)&&(N.current=t,s.flushSync(()=>{b(t)}))})},[_,t,n,M,P]);a(()=>{!1===v&&N.current.isPositioned&&(N.current.isPositioned=!1,b(e=>({...e,isPositioned:!1})))},[v]);let j=i.useRef(!1);a(()=>(j.current=!0,()=>{j.current=!1}),[]),a(()=>{if(C&&(F.current=C),A&&(L.current=A),C&&A){if(I.current)return I.current(C,A,D);D()}},[C,A,D,I,R]);let V=i.useMemo(()=>({reference:F,floating:L,setReference:O,setFloating:T}),[O,T]),z=i.useMemo(()=>({reference:C,floating:A}),[C,A]),$=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!z.floating)return e;let t=u(z.floating,y.x),r=u(z.floating,y.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...o(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,z.floating,y.x,y.y]);return i.useMemo(()=>({...y,update:D,refs:V,elements:z,floatingStyles:$}),[y,D,V,z,$])}let f=(e,t)=>{let n=(0,r.cv)(e);return{name:n.name,fn:n.fn,options:[e,t]}},h=(e,t)=>{let n=(0,r.uY)(e);return{name:n.name,fn:n.fn,options:[e,t]}},p=(e,t)=>{let n=(0,r.RR)(e);return{name:n.name,fn:n.fn,options:[e,t]}},m=(e,t)=>{let n=(0,r.dp)(e);return{name:n.name,fn:n.fn,options:[e,t]}}},89750:function(e,t,n){n.d(t,{ij:function(){return r}});function r(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}},94046:function(e,t,n){let r;function i(){return"undefined"!=typeof window}function s(e){return o(e)?(e.nodeName||"").toLowerCase():"#document"}function a(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function l(e){var t;return null==(t=(o(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function o(e){return!!i()&&(e instanceof Node||e instanceof a(e).Node)}function u(e){return!!i()&&(e instanceof Element||e instanceof a(e).Element)}function d(e){return!!i()&&(e instanceof HTMLElement||e instanceof a(e).HTMLElement)}function c(e){return!!i()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof a(e).ShadowRoot)}function f(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=w(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function h(e){return/^(table|td|th)$/.test(s(e))}function p(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}n.d(t,{Dx:function(){return w},Jj:function(){return a},Kx:function(){return function e(t,n,r){var i;void 0===n&&(n=[]),void 0===r&&(r=!0);let s=function e(t){let n=S(t);return x(n)?(t.ownerDocument||t).body:d(n)&&f(n)?n:e(n)}(t),l=s===(null==(i=t.ownerDocument)?void 0:i.body),o=a(s);if(!l)return n.concat(s,e(s,[],r));{let t=E(o);return n.concat(o,o.visualViewport||[],f(s)?s:[],t&&r?e(t):[])}}},Lw:function(){return k},Ow:function(){return S},Pf:function(){return _},Py:function(){return x},Re:function(){return d},Ze:function(){return h},ao:function(){return f},gQ:function(){return b},hT:function(){return y},kK:function(){return u},tF:function(){return l},tR:function(){return p},wK:function(){return E},wk:function(){return s}});let m=/transform|translate|scale|rotate|perspective|filter/,g=/paint|layout|strict|content/,v=e=>!!e&&"none"!==e;function y(e){let t=u(e)?w(e):e;return v(t.transform)||v(t.translate)||v(t.scale)||v(t.rotate)||v(t.perspective)||!_()&&(v(t.backdropFilter)||v(t.filter))||m.test(t.willChange||"")||g.test(t.contain||"")}function b(e){let t=S(e);for(;d(t)&&!x(t);){if(y(t))return t;if(p(t))break;t=S(t)}return null}function _(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function x(e){return/^(html|body|#document)$/.test(s(e))}function w(e){return a(e).getComputedStyle(e)}function k(e){return u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function S(e){if("html"===s(e))return e;let t=e.assignedSlot||e.parentNode||c(e)&&e.host||l(e);return c(t)?t.host:t}function E(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}},72695:function(e,t,n){n.d(t,{Fp:function(){return i},GW:function(){return a},I4:function(){return p},JB:function(){return T},KX:function(){return S},NM:function(){return s},Qq:function(){return m},Rn:function(){return h},VV:function(){return r},Wh:function(){return g},gy:function(){return y},hp:function(){return f},i8:function(){return v},k3:function(){return c},ku:function(){return d},pw:function(){return E},uZ:function(){return u},yd:function(){return O},ze:function(){return l}});let r=Math.min,i=Math.max,s=Math.round,a=Math.floor,l=e=>({x:e,y:e}
1),o={left:"right",right:"left",bottom:"top",top:"bottom"};function u(e,t,n){return i(e,r(t,n))}function d(e,t){return"function"==typeof e?e(t):e}function c(e){return e.split("-")[0]}function f(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function p(e){return"y"===e?"height":"width"}function m(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function g(e){return h(m(e))}function v(e,t,n){void 0===n&&(n=!1);let r=f(e),i=g(e),s=p(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=E(a)),[a,E(a)]}function y(e){let t=E(e);return[b(e),t,b(t)]}function b(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let _=["left","right"],x=["right","left"],w=["top","bottom"],k=["bottom","top"];function S(e,t,n,r){let i=f(e),s=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?x:_;return t?_:x;case"left":case"right":return t?w:k;default:return[]}}(c(e),"start"===n,r);return i&&(s=s.map(e=>e+"-"+i),t&&(s=s.concat(s.map(b)))),s}function E(e){let t=c(e);return o[t]+e.slice(t.length)}function O(e){var t,n,r,i;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(i=e.left)?i:0}:{top:e,right:e,bottom:e,left:e}}function T(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}},30389:function(e,t,n){let r,i,s,a,l,o,u,d,c,f,h,p,m,g,v,y,b,_,x,w,k,S;n.d(t,{hQ:function(){return rr},gA:function(){return re},O2:function(){return rn},L5:function(){return rt}});let E=e=>{var t;return"object"==typeof e&&null!=e&&"window"in e&&e.window===e?e.document:null!==(t=e)&&"object"==typeof t&&"nodeType"in t&&"number"==typeof t.nodeType&&9===e.nodeType?e:e?.ownerDocument??("undefined"!=typeof document?document:void 0)},O=e=>{let t=E(e);return t?.defaultView??("undefined"!=typeof window?window:void 0)};function T(e,t){return!!t&&!!e&&e.contains(t)}let C=(e=document)=>e.activeElement;function A(e){return e.target}var F,L,N,R,I,M,P,D=n(2265),j=n.t(D,2);let V="undefined"!=typeof document?D.useLayoutEffect:()=>{};function z(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function $(e){let t=(0,D.useRef)({isFocused:!1,observer:null});return V(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,D.useCallback)(n=>{let r=A(n);(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&(t.current.isFocused=!0,r.addEventListener("focusout",n=>{if(t.current.isFocused=!1,r.disabled){let t=z(n);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){t.current.observer?.disconnect();let e=r===C()?null:C();r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]}))},[e])}function Z(e){if("undefined"==typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function W(e){return"undefined"!=typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function U(e){let t=null;return()=>(null==t&&(t=e()),t)}let B=U(function(){return W(/^Mac/i)}),H=U(function(){return W(/^iPhone/i)}),K=U(function(){return W(/^iPad/i)||B()&&navigator.maxTouchPoints>1}),q=U(function(){return H()||K()});U(function(){return B()||q()});let G=U(function(){return Z(/AppleWebKit/i)&&(q()||!Y())});U(function(){return G()&&!Y()&&!Q()});let Y=U(function(){return Z(/Chrome|CriOS|CrMo/i)}),J=U(function(){return Z(/Android/i)}),Q=U(function(){return Z(/(Firefox|FxiOS)/i)}),X=null;function ee(e,t,n=!0){let{metaKey:r,ctrlKey:i,altKey:s,shiftKey:a}=t;!G()&&Q()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(B()?r=!0:i=!0);let l=G()&&B()&&!K()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:i,altKey:s,shiftKey:a}):new MouseEvent("click",{metaKey:r,ctrlKey:i,altKey:s,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});ee.isOpening=n,function(e){if(function(){if(null==X){X=!1;try{document.createElement("div").focus({get preventScroll(){return X=!0,!0}})}catch{}}return X}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}
1(e),e.dispatchEvent(l),ee.isOpening=!1}ee.isOpening=!1;let et=null,en=new Set,er=new Map,ei=!1,es=!1,ea={Tab:!0,Escape:!0};function el(e,t){for(let n of en)n(e,t)}function eo(e){ei=!0,ee.isOpening||e.metaKey||!B()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(et="keyboard",el("keyboard",e))}function eu(e){et="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(ei=!0,el("pointer",e))}function ed(e){ee.isOpening||(""!==e.pointerType||!e.isTrusted)&&(J()&&e.pointerType?"click"!==e.type||1!==e.buttons:0!==e.detail||e.pointerType)||(ei=!0,et="virtual")}function ec(e){let t=A(e),n=O(t),r=E(t);if(t===n){es=!0;return}t!==r&&e.isTrusted&&(ei||es||(et="virtual",el("virtual",e)),ei=!1,es=!1)}function ef(){ei=!1,es=!0}function eh(e){if("undefined"==typeof window||"undefined"==typeof document)return;let t=O(e),n=E(e);if(er.get(t))return;let r=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){ei=!0,r.apply(this,arguments)}}),n.addEventListener("keydown",eo,!0),n.addEventListener("keyup",eo,!0),n.addEventListener("click",ed,!0),t.addEventListener("focus",ec,!0),t.addEventListener("blur",ef,!1),"undefined"!=typeof PointerEvent&&(n.addEventListener("pointerdown",eu,!0),n.addEventListener("pointermove",eu,!0),n.addEventListener("pointerup",eu,!0)),t.addEventListener("beforeunload",()=>{ep(e)},{once:!0}),er.set(t,{focus:r})}let ep=(e,t)=>{let n=O(e),r=E(e);t&&r.removeEventListener("DOMContentLoaded",t),er.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:er.get(n).focus}),r.removeEventListener("keydown",eo,!0),r.removeEventListener("keyup",eo,!0),r.removeEventListener("click",ed,!0),n.removeEventListener("focus",ec,!0),n.removeEventListener("blur",ef,!1),"undefined"!=typeof PointerEvent&&(r.removeEventListener("pointerdown",eu,!0),r.removeEventListener("pointermove",eu,!0),r.removeEventListener("pointerup",eu,!0)),er.delete(n))};function em(){return"pointer"!==et}"undefined"!=typeof document&&function(e){let t;let n=E(void 0);"loading"!==n.readyState?eh(void 0):(t=()=>{eh(void 0)},n.addEventListener("DOMContentLoaded",t)),()=>ep(e,t)}();let eg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ev(){let e=(0,D.useRef)(new Map),t=(0,D.useCallback)((t,n,r,i)=>{let s=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:s,options:i}),t.addEventListener(n,s,i)},[]),n=(0,D.useCallback)((t,n,r,i)=>{let s=e.current.get(r)?.fn||r;t.removeEventListener(n,s,i),e.current.delete(r)},[]),r=(0,D.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,D.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function ey(e={}){var t,n,r;let{autoFocus:i=!1,isTextInput:s,within:a}=e,l=(0,D.useRef)({isFocused:!1,isFocusVisible:i||em()}),[o,u]=(0,D.useState)(!1),[d,c]=(0,D.useState)(()=>l.current.isFocused&&l.current.isFocusVisible),f=(0,D.useCallback)(()=>c(l.current.isFocused&&l.current.isFocusVisible),[]),h=(0,D.useCallback)(e=>{l.current.isFocused=e,l.current.isFocusVisible=em(),u(e),f()},[f]);t=e=>{l.current.isFocusVisible=e,f()},n=[s,o],r={enabled:o,isTextInput:s},eh(),(0,D.useEffect)(()=>{if(r?.enabled===!1)return;let e=(e,n)=>{(function(e,t,n){let r=n?A(n):void 0,i=E(r),s=O(r),a=void 0!==s?s.HTMLInputElement:HTMLInputElement,l=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,o=void 0!==s?s.HTMLElement:HTMLElement,u=void 0!==s?s.KeyboardEvent:KeyboardEvent,d=C(i);return!((e=e||d instanceof a&&!eg.has(d.type)||d instanceof l||d instanceof o&&d.isContentEditable)&&"keyboard"===t&&n instanceof u&&!ea[n.key])})(!!r?.isTextInput,e,n)&&t(em())};return en.add(e),()=>{en.delete(e)}},n);let{focusProps:p}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,s=(0,D.useCallback)(e=>{if(A(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),a=$(s),l=(0,D.useCallback)(e=>{let t=A(e),r=E(t),s=r?C(r):C();t===e.currentTarget&&t===s&&(n&&n(e),i&&i(!0),a(e))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?l:void 0,onBlur:!t&&(r||i)?s:void 0}}}({isDisabled:a,onFocusChange:h}),{focusWithinProps:m}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=(0,D.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:l}=ev(),o=(0,D.useCallback)(e=>{T(e.currentTarget,A(e))&&s.current.isFocusWithin&&!T(e.currentTarget,e.relatedTarget)&&(s.current.isFocusWithin=!1,l(),n&&n(e),i&&i(!1))},[n,i,s,l]),u=$(o),d=(0,D.useCallback)(e=>{if(!T(e.currentTarget,A(e)))return;let t=A(e),n=E(t),l=C(n);if(!s.current.isFocusWithin&&l===t){r&&r(e),i&&i(!0),s.current.isFocusWithin=!0,u(e);let t=e.currentTarget;a(n,"focus",e=>{let r=A(e);if(s.current.isFocusWithin&&!T(t,r)){let e=new n.defaultView.FocusEvent("blur",{relatedTarget:r});Object.defineProperty(e,"target",{value:t}
1),Object.defineProperty(e,"currentTarget",{value:t}),o(z(e))}},{capture:!0})}},[r,i,u,a,o]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:o}}}({isDisabled:!a,onFocusWithinChange:h});return{isFocused:o,isFocusVisible:d,focusProps:a?m:p}}let eb=!1,e_=0;function ex(e){"touch"===e.pointerType&&(eb=!0,setTimeout(()=>{eb=!1},500))}function ew(){let e=E(null);if(void 0!==e)return 0===e_&&"undefined"!=typeof PointerEvent&&e.addEventListener("pointerup",ex),e_++,()=>{--e_>0||"undefined"==typeof PointerEvent||e.removeEventListener("pointerup",ex)}}function ek(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,a]=(0,D.useState)(!1),l=(0,D.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,D.useEffect)(ew,[]);let{addGlobalListener:o,removeAllGlobalListeners:u}=ev(),{hoverProps:d,triggerHoverEnd:c}=(0,D.useMemo)(()=>{let e=(e,r)=>{if(l.pointerType=r,i||"touch"===r||l.isHovered||!T(e.currentTarget,A(e)))return;l.isHovered=!0;let u=e.currentTarget;l.target=u,o(E(A(e)),"pointerover",e=>{l.isHovered&&l.target&&!T(l.target,A(e))&&s(e,e.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:r}),n&&n(!0),a(!0)},s=(e,t)=>{let i=l.target;
1l.pointerType="",l.target=null,"touch"!==t&&l.isHovered&&i&&(l.isHovered=!1,u(),r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),a(!1))},d={};return"undefined"!=typeof PointerEvent&&(d.onPointerEnter=t=>{eb&&"mouse"===t.pointerType||e(t,t.pointerType)},d.onPointerLeave=e=>{!i&&T(e.currentTarget,A(e))&&s(e,e.pointerType)}),{hoverProps:d,triggerHoverEnd:s}},[t,n,r,i,l,o,u]);return(0,D.useEffect)(()=>{i&&c({currentTarget:l.target},l.pointerType)},[i]),{hoverProps:d,isHovered:s}}var eS=n(54887);function eE(e,t,n){let r,i=n.initialDeps??[],s=!0;function a(){let a=e();return(a.length!==i.length||a.some((e,t)=>i[t]!==e))&&(i=a,r=t(...a),(null==n?void 0:n.onChange)&&!(s&&n.skipInitialOnChange)&&n.onChange(r),s=!1),r}return a.updateDeps=e=>{i=e},a}function eO(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let eT=(e,t)=>1.01>Math.abs(e-t),eC=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},eA=()=>{if(void 0!==r)return r;if("undefined"==typeof navigator)return r=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return r=!0;let e=navigator.maxTouchPoints;return r="MacIntel"===navigator.platform&&void 0!==e&&e>0},eF=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},eL=e=>e,eN=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},eR=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(eF(n)),!r.ResizeObserver)return()=>{};let s=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(eF(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},eI={passive:!0},eM="undefined"==typeof window||"onscrollend"in window,eP=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let s=e.options.useScrollendEvent&&eM,a=0,l=s?null:eC(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),o=e=>()=>{a=n(r),null==l||l(),t(a,e)},u=o(!0),d=o(!1);return r.addEventListener("scroll",u,eI),s&&r.addEventListener("scrollend",d,eI),()=>{r.removeEventListener("scroll",u),s&&r.removeEventListener("scrollend",d),null==l||l.cancel()}},eD=(e,t)=>eP(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),ej=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(void 0!==i)return i}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},eV=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;null==(s=null==(i=r.scrollElement)?void 0:i.scrollTo)||s.call(i,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})};class ez{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>
1{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){for(let[e,n]of(this.observer.unobserve(t),this.elementsCache))if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t;let n={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:eL,rangeExtractor:eN,onChange:()=>{},measureElement:ej,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let r=e[t];void 0!==r&&(n[t]=r)}let r=this.options,i=null,s=null,a=!1;if(void 0!==r&&r.enabled&&n.enabled&&"end"===n.anchorTo&&null!==this.scrollElement){let e=r.count,l=n.count,o=this.getMeasurements(),u=(null==(t=this._singleLaneMeasurements)?void 0:t.items)??o,d=e=>{var t;return"object"==typeof(t=u[e])?t.key:t},c=e>0?d(0):null,f=e>0?d(e-1):null;if(l!==e||e>0&&l>0&&(n.getItemKey(0)!==c||n.getItemKey(l-1)!==f)){a=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??o[0]:null;t&&(i=[t.key,this.getScrollOffset()-t.start]);let u=!0===n.followOnAppend?"auto":n.followOnAppend||null;u&&l>0&&this.isAtEnd(r.scrollEndThreshold)&&(0===e||n.getItemKey(l-1)!==f)&&(l>e||function(e,t,n,r){if(0===t)return!1;let i=r(0),s=new Set,a=0;for(;a<e;){let e=n(a);if(e===i)break;s.add(e),a++}let l=e-a;if(0===l||l>=t)return!1;for(let e=0;e<l;e++)if(r(e)!==n(a+e))return!1;for(let e=l;e<t;e++)if(s.has(r(e)))return!1;return!0}(e,l,d,n.getItemKey))&&(s=u)}}this.options=n,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let l=!1,o=0;if(i&&null!==this.scrollOffset){let[e,t]=i,n=this.getMeasurements(),{count:r,getItemKey:a}=this.options,u=0;for(;u<r&&a(u)!==e;)u++;if(u<r){let e=n[u];if(e){let n=Math.max(0,e.start+t);s||n===this.scrollOffset||(o=n-this.scrollOffset,this.scrollOffset=n,l=!0)}}}(l||s)&&(this.pendingScrollAnchor=[l?i[0]:null,l?i[1]:0,s,o])},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=eE(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e,t;let n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&null===this._intendedScrollOffset&&e===this.scrollOffset)return;null!==this._intendedScrollOffset&&1.5>Math.abs(e-this._intendedScrollOffset)&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,null!==this._clampedAdjustment&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,eA()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",t,eI),e.addEventListener("touchend",n,eI),this.unsubs.push(()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",n),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let r=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,r&&this.scrollElement&&this.options.enabled){let[e,n,i,s]=r;null!==e&&!i&&(eA()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==s&&(this._iosDeferredAdjustment+=s):((null==(t=this.scrollState)?void 0:t.behavior)!=="smooth"||eT(this.getScrollOffset()-s,this.scrollState.lastTargetOffset))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),i&&this.scrollToEnd({behavior:i})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(null===this._clampedAdjustment||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>
1{if(0===this._iosDeferredAdjustment||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=eE(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,s,a,l)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:a,gap:l}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=eE(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:a,gap:l},o)=>{var u;let d=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let c=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===s){let i;let s=2*e,a=null==(u=this._singleLaneMeasurements)?void 0:u.flat;if(!a||a.length<s){let e=new Float64Array(s);a&&c>0&&e.set(a.subarray(0,2*c)),a=e}let o=0===c?Array(e):this._singleLaneMeasurements.items.slice();if(0===c)i=t+n;else{let e=c-1;i=a[2*e]+a[2*e+1]+l}for(let t=c;t<e;t++){let e=r(t);o[t]=e;let n=d.get(e),s="number"==typeof n?n:this.options.estimateSize(t);a[2*t]=i,a[2*t+1]=s,i+=s+l}this._singleLaneMeasurements={flat:a,items:o};let f=function(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if("string"==typeof r){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if("object"!=typeof n){let r=t[2*i];n=e[i]={index:i,key:n,start:r,size:t[2*i+1],end:r+t[2*i+1],lane:0}}return n}}if("length"===r)return n}return Reflect.get(e,r,i)}})}(o,a);return this.measurementsCache=f,f}let f=this.measurementsCache.slice(0,c),h=Array(s).fill(void 0),p=new Float64Array(s),m=0;for(let e=0;e<c;e++){let t=f[e];t&&(void 0===h[t.lane]&&m++,h[t.lane]=e,p[t.lane]=t.end)}for(let i=c;i<e;i++){let e,o;let u=r(i),c=this.laneAssignments.get(i),g="estimate"===a||d.has(u);if(void 0!==c&&this.options.lanes>1){let r=h[e=c],i=void 0!==r?f[r]:void 0;o=i?i.end+l:t+n}else if(m===s){let t=0,n=p[0],r=h[0];for(let e=1;e<s;e++){let i=p[e];(i<n||i===n&&h[e]<r)&&(t=e,n=i,r=h[e])}e=t,o=n+l,g&&this.laneAssignments.set(i,e)}else e=i%this.options.lanes,o=t+n,g&&this.laneAssignments.set(i,e);let v=d.get(u),y="number"==typeof v?v:this.options.estimateSize(i),b=o+y;f[i]={index:i,start:o,size:y,end:b,key:u,lane:e},void 0===h[e]&&m++,h[e]=i,p[e]=b}return this.measurementsCache=f,f},{key:!1,debug:()=>this.options.debug}),this.calculateRange=eE(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>0===e.length||0===t?(this.range=null,null):(this.range=function(e,t,n,r,i){let s=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:s};if(1===r&&null!==i){let e=function(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,s=e[2*i];if(s<n)r=i+1;else{if(!(s>n))return i;t=i-1}}return r>0?r-1:0}(i,s,n),r=e,a=n+t;
1for(;r<s&&i[2*r]+i[2*r+1]<a;)r++;return{startIndex:e,endIndex:r}}let a=e$(0,s,t=>e[t].start,n),l=a;if(1===r)for(;l<s&&e[l].end<n+t;)l++;else if(r>1){let i=Array(r).fill(0);for(;l<s&&i.some(e=>e<n+t);){let t=e[l];i[t.lane]=t.end,l++}let o=Array(r).fill(n+t);for(;a>=0&&o.some(e=>e>=n);){let t=e[a];o[t.lane]=t.start,a--}a=Math.max(0,a-a%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:a,endIndex:l}}(e,t,n,r,1===r&&null!==this._singleLaneMeasurements?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=eE(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.min(this.options.count-1,n+t);return e>=Math.max(0,n-t)&&e<=r}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n,r,i;let s,a,l;if(!this.isIndexInRange(e))return;let o=null==(n=this._singleLaneMeasurements)?void 0:n.flat;if(1===this.options.lanes&&null!=o)l=this.options.getItemKey(e),a=o[2*e],s=o[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;l=t.key,a=t.start,s=t.size}let u=this.itemSizeCache.get(l)??s,d=t-u;if(0!==d){let n="end"===this.options.anchorTo&&(null==(r=this.scrollState)?void 0:r.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,o=n?this.getTotalSize():0,c=this.getScrollOffset()+this.scrollAdjustments,f=this.itemSizeCache.has(l)?a+u<=c&&"backward"!==this.scrollDirection:a<c,h=(null==(i=this.scrollState)?void 0:i.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:l,start:a,size:s,end:a+s,lane:0},d,this):f);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(l,t),this.itemSizeCacheVersion++;let p=!1;n?p=this.applyScrollAdjustment(this.getTotalSize()-o):h&&(p=this.applyScrollAdjustment(d)),this.notify(p),this._retryClampedAdjustment()}},this.getVirtualItems=eE(()=>
1[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{var t;let n=this.getMeasurements();if(0===n.length)return;let r=null==(t=this._singleLaneMeasurements)?void 0:t.flat,i=1===this.options.lanes&&null!=r,s=e$(0,n.length-1,i?e=>r[2*e]:e=>eO(n[e]).start,e);return eO(n[s])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>
1{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();return"auto"===t&&(t=e>=i+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if("auto"===t){if(i.end>=r+n-this.options.scrollPaddingEnd)t="end";else{if(!(i.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let s="end"===t?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,i.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,s]=r,a=this.now();this.scrollState={index:e,align:s,behavior:n,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e,t;let n;let r=this.getMeasurements();if(0===r.length)n=this.options.paddingStart;else if(1===this.options.lanes){let i=r.length-1,s=null==(e=this._singleLaneMeasurements)?void 0:e.flat;n=null!=s?s[2*i]+s[2*i+1]:(null==(t=r[i])?void 0:t.end)??0}else{let e=Array(this.options.lanes).fill(null),t=r.length-1;for(;t>=0&&e.some(e=>null===e);){let n=r[t];null===e[n.lane]&&(e[n.lane]=n.end),t--}n=Math.max(...e.filter(e=>null!==e))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];
1if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){if(0===e)return!1;if(eA()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=e,!1;{let n=this.getScrollOffset()+this.scrollAdjustments+e,r=this.scrollElement,i=null!==r&&("scrollHeight"in r||"document"in r)?this.getMaxScrollOffset():null;return this._clampedAdjustment=null!==i&&n>i+.5?{target:n,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),null!==this.scrollOffset&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&eT(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r="smooth"===this.scrollState.behavior&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}}let e$=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else{if(!(s>r))return i;t=i-1}}return e>0?e-1:0},eZ="undefined"!=typeof document?D.useLayoutEffect:D.useEffect;var eW=Object.defineProperty,eU=(e,t,n)=>t in e?eW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eB=(e,t,n)=>(eU(e,"symbol"!=typeof t?t+"":t,n),n);class eH{set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}constructor(){eB(this,"current",this.detect()),eB(this,"handoffState","pending"),eB(this,"currentId",0)}}let eK=new eH;function eq(e){var t;return eK.isServer?null:null==e?document:null!=(t=null==e?void 0:e.ownerDocument)?t:document}function eG(e){var t,n,r,i;return(null!=(n=null==(t=eK.isServer?null:null==e?document:null!=(i=null==(r=null==e?void 0:e.getRootNode)?void 0:r.call(e))?i:document)?void 0:t.activeElement)?n:null)===e}function eY(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function eJ(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))),requestAnimationFrame(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(i))},nextFrame(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=setTimeout(...n);return t.add(()=>clearTimeout(i))},microTask(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i={current:!0};return eY(()=>{i.current&&n[0]()}),t.add(()=>{i.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=eJ();return e(t),this.add(()=>t.dispose())},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function eQ(){let[e]=(0,D.useState)(eJ);return(0,D.useEffect)(()=>()=>
1e.dispose(),[e]),e}let eX=(e,t)=>{eK.isServer?(0,D.useEffect)(e,t):(0,D.useLayoutEffect)(e,t)};function e0(e){let t=(0,D.useRef)(e);return eX(()=>{t.current=e},[e]),t}let e1=function(e){let t=e0(e);return D.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current(...n)},[t])};function e2(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function e4(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function e9(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],[r,i]=(0,D.useState)(()=>e4(t));return eX(()=>{if(!t||!e)return;let n=eJ();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=e4(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:"".concat(r.width,"px"),height:"".concat(r.height,"px")}:r}var e5=((i=e5||{})[i.Left=0]="Left",i[i.Right=2]="Right",i);function e3(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function e6(e){return e3(e)&&"tagName"in e}function e8(e){return e6(e)&&"accessKey"in e}function e7(e){return e6(e)&&"tabIndex"in e}function te(e){return e8(e)&&"INPUT"===e.nodeName}function tt(e){return e8(e)&&"LABEL"===e.nodeName}function tn(e){return e8(e)&&"LEGEND"===e.nodeName}function tr(e){var t;let n=e.parentElement,r=null;for(;n&&!(e8(t=n)&&"FIELDSET"===t.nodeName);)tn(n)&&(r=n),n=n.parentElement;let i=(null==n?void 0:n.getAttribute("disabled"))==="";return!(i&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(tn(t))return!1;t=t.previousElementSibling}return!0}(r))&&i}class ti extends Map{get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}constructor(e){super(),this.factory=e}}var ts=Object.defineProperty,ta=(e,t,n)=>t in e?ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tl=(e,t,n)=>(ta(e,"symbol"!=typeof t?t+"":t,n),n),to=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},tu=(e,t,n)=>(to(e,t,"read from private field"),n?n.call(e):t.get(e)),td=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},tc=(e,t,n,r)=>(to(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class tf{dispose(){this.disposables.dispose()}get state(){return tu(this,N)}subscribe(e,t){if(eK.isServer)return()=>{};let n={selector:e,callback:t,current:e(tu(this,N))};return tu(this,I).add(n),this.disposables.add(()=>{tu(this,I).delete(n)})}on(e,t){return eK.isServer?()=>{}:(tu(this,R).get(e).add(t),this.disposables.add(()=>{tu(this,R).get(e).delete(t)}))}send(e){let t=this.reduce(tu(this,N),e);if(t!==tu(this,N)){for(let e of(tc(this,N,t),tu(this,I))){let t=e.selector(tu(this,N));th(e.current,t)||(e.current=t,e.callback(t))}for(let t of tu(this,R).get(e.type))t(tu(this,N),e)}}constructor(e){td(this,N,{}),td(this,R,new ti(()=>new Set)),td(this,I,new Set),tl(this,"disposables",eJ()),tc(this,N,e),eK.isServer&&this.disposables.microTask(()=>{this.dispose()})}}function th(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&tp(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&tp(e.entries(),t.entries()):!!(tm(e)&&tm(t))&&tp(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function tp(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function tm(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function tg(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let s=Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map(e=>'"'.concat(e,'"')).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(s,tg),s}N=new WeakMap,R=new WeakMap,I=new WeakMap;var tv=Object.defineProperty,ty=(e,t,n)=>t in e?tv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tb=(e,t,n)=>(ty(e,"symbol"!=typeof t?t+"":t,n),n),t_=((s=t_||{})[s.Push=0]="Push",s[s.Pop=1]="Pop",s);let tx={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(-1!==i){let t=e.stack.slice();return t.splice(i,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}};class tw extends tf{static new(){return new tw({stack:[]})}reduce(e,t){return tg(t.type,tx,e,t)}constructor(){super(...arguments),tb(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),tb(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}}let tk=new ti(()=>tw.new());var tS=n(76548);function tE(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:th;return(0,tS.useSyncExternalStoreWithSelector)(e1(t=>e.subscribe(tO,t)),e1(()=>e.state),e1(()=>e.state),e1(t),n)}function tO(e){return e}function tT(e,t){let n=(0,D.useId)(),r=tk.get(t),[i,s]=tE(r,(0,D.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return eX(()=>
1{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),!!e&&(!s||i)}let tC=new Map,tA=new Map;function tF(e){var t;let n=null!=(t=tA.get(e))?t:0;return tA.set(e,n+1),0!==n||(tC.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>(function(e){var t;let n=null!=(t=tA.get(e))?t:1;if(1===n?tA.delete(e):tA.set(e,n-1),1!==n)return;let r=tC.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,tC.delete(e))})(e)}let tL=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");["[data-autofocus]"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");var tN=((a=tN||{})[a.First=1]="First",a[a.Previous=2]="Previous",a[a.Next=4]="Next",a[a.Last=8]="Last",a[a.WrapAround=16]="WrapAround",a[a.NoScroll=32]="NoScroll",a[a.AutoFocus=64]="AutoFocus",a),tR=((l=tR||{})[l.Error=0]="Error",l[l.Overflow=1]="Overflow",l[l.Success=2]="Success",l[l.Underflow=3]="Underflow",l),tI=((o=tI||{})[o.Previous=-1]="Previous",o[o.Next=1]="Next",o),tM=((u=tM||{})[u.Strict=0]="Strict",u[u.Loose=1]="Loose",u),tP=((d=tP||{})[d.Keyboard=0]="Keyboard",d[d.Mouse=1]="Mouse",d);function tD(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function tj(){return tD()||/Android/gi.test(window.navigator.userAgent)}function tV(e,t,n,r){let i=e0(n);(0,D.useEffect)(()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){i.current(e)}},[e,t,r])}function tz(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,D.useMemo)(()=>eq(...t),[...t])}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));var t$=((c=t$||{})[c.Ignore=0]="Ignore",c[c.Select=1]="Select",c[c.Close=2]="Close",c);let tZ={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}};function tW(e){var t,n,r;let i,s=(0,D.useRef)({value:"",selectionStart:null,selectionEnd:null});return t=e,n="blur",i=e0(e=>{let t=e.target;te(t)&&(s.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),(0,D.useEffect)(()=>{function e(e){i.current(e)}return(t=null!=t?t:window).addEventListener(n,e,void 0),()=>t.removeEventListener(n,e,r)},[t,n,r]),e1(()=>{if(!eG(e)&&te(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==s.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:t,selectionEnd:n}=s.current;null!==t&&null!==n&&e.setSelectionRange(t,n)}s.current={value:"",selectionStart:null,selectionEnd:null}}})}function tU(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let tB=(F=()=>new Map,L={PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:eJ(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=tU(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=tU(n.meta)),this},SCROLL_PREVENT(e){let t;let n={doc:e.doc,d:e.d,meta:()=>e.computedMeta},r=[tD()?{before(e){let{doc:t,d:n,meta:r}=e;function i(e){for(let t of r().containers)for(let n of t())if(n.contains(e))return!0;return!1}n.microTask(()=>{var e;if("auto"!==window.getComputedStyle(t.documentElement).scrollBehavior){let e=eJ();e.style(t.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>e.dispose()))}let r=null!=(e=window.scrollY)?e:window.pageYOffset,s=null;n.addEventListener(t,"click",e=>{if(e7(e.target))try{let n=e.target.closest("a");if(!n)return;let{hash:r}=new URL(n.href),a=t.querySelector(r);e7(a)&&!i(a)&&(s=a)}catch(e){}},!0),n.group(e=>{n.addEventListener(t,"touchstart",t=>{var n;if(e.dispose(),e7(t.target)&&e6(n=t.target)&&"style"in n){if(i(t.target)){let n=t.target;for(;n.parentElement&&i(n.parentElement);)n=n.parentElement;e.style(n,"overscrollBehavior","contain")}else e.style(t.target,"touchAction","none")}})}),n.addEventListener(t,"touchmove",e=>{if(e7(e.target)&&!te(e.target)){if(i(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),n.add(()=>{var e;r!==(null!=(e=window.scrollY)?e:window.pageYOffset)&&window.scrollTo(0,r),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{},{before(e){var n;let{doc:r}=e,i=r.documentElement;t=Math.max(0,(null!=(n=r.defaultView)?n:window).innerWidth-i.clientWidth)},after(e){let{doc:n,d:r}=e,i=n.documentElement,s=Math.max(0,i.clientWidth-i.offsetWidth),a=Math.max(0,t-s);r.style(i,"paddingRight","".concat(a,"px"))}},{before(e){let{doc:t,d:n}=e;n.style(t.documentElement,"overflow","hidden")}}];
1r.forEach(e=>{let{before:t}=e;return null==t?void 0:t(n)}),r.forEach(e=>{let{after:t}=e;return null==t?void 0:t(n)})},SCROLL_ALLOW(e){let{d:t}=e;t.dispose()},TEARDOWN(e){let{doc:t}=e;this.delete(t)}},f=F(),h=new Set,{getSnapshot:()=>f,subscribe:e=>(h.add(e),()=>h.delete(e)),dispatch(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=L[e].call(f,...n);i&&(f=i,h.forEach(e=>e()))}});function tH(e){return(0,D.useMemo)(()=>e,Object.values(e))}tB.subscribe(()=>{let e=tB.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&tB.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&tB.dispatch("TEARDOWN",n)}});let tK=Symbol();function tq(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=(0,D.useRef)(t);(0,D.useEffect)(()=>{r.current=t},[t]);let i=e1(e=>{for(let t of r.current)null!=t&&("function"==typeof t?t(e):t.current=e)});return t.every(e=>null==e||(null==e?void 0:e[tK]))?void 0:i}function tG(e){return[e.screenX,e.screenY]}var tY=n(40257);void 0!==tY&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&(null==(M=null==tY?void 0:tY.env)?void 0:M.NODE_ENV)==="test"&&void 0===(null==(P=null==Element?void 0:Element.prototype)?void 0:P.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn("Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.\nPlease install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.\n\nExample usage:\n```js\nimport { mockAnimationsApi } from 'jsdom-testing-mocks'\nmockAnimationsApi()\n```"),[]});var tJ=((p=tJ||{})[p.None=0]="None",p[p.Closed=1]="Closed",p[p.Enter=2]="Enter",p[p.Leave=4]="Leave",p);function tQ(e,t){let n=(0,D.useRef)([]),r=e1(e);(0,D.useEffect)(()=>{let e=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let i=r(t,e);return n.current=t,i}},[r,...t])}let tX=(0,D.createContext)(void 0);function t0(){return(0,D.useContext)(tX)}var t1=n(61896),t2=n(97859),t4=n(51050);let t9=(0,D.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});t9.displayName="FloatingContext";let t5=(0,D.createContext)(null);function t3(e){var t,n,r,i;let s,a,l,{children:o,enabled:u=!0}=e,[d,c]=(0,D.useState)(null),[f,h]=(0,D.useState)(0),p=(0,D.useRef)(null),[m,g]=(0,D.useState)(null);eX(()=>{if(!t)return;let e=new MutationObserver(()=>{let e=window.getComputedStyle(t).maxHeight,n=parseFloat(e);if(isNaN(n))return;let r=parseInt(e);isNaN(r)||n!==r&&(t.style.maxHeight="".concat(Math.ceil(n),"px"))});return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[t=m]);let v=u&&null!==d&&null!==m,{to:y="bottom",gap:b=0,offset:_=0,padding:x=0,inner:w}=(s=t6(null!=(n=null==d?void 0:d.gap)?n:"var(--anchor-gap, 0)",m),a=t6(null!=(r=null==d?void 0:d.offset)?r:"var(--anchor-offset, 0)",m),l=t6(null!=(i=null==d?void 0:d.padding)?i:"var(--anchor-padding, 0)",m),{...d,gap:s,offset:a,padding:l}),[k,S="center"]=y.split(" ");eX(()=>{v&&h(0)},[v]);let{refs:E,floatingStyles:O,context:T}=(0,t1.YF)({open:v,placement:"selection"===k?"center"===S?"bottom":"bottom-".concat(S):"center"===S?"".concat(k):"".concat(k,"-").concat(S),strategy:"absolute",transform:!1,middleware:[(0,t2.cv)({mainAxis:"selection"===k?0:b,crossAxis:_}),(0,t2.uY)({padding:x}),"selection"!==k&&(0,t2.RR)({padding:x}),"selection"===k&&w?(0,t1.aN)({...w,padding:x,overflowRef:p,offset:f,minItemsVisible:4,referenceOverflowThreshold:x,onFallbackChange(e){var t,n;if(!e)return;let r=T.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,s=Math.min(4,r.childElementCount),a=0,l=0;for(let e of null!=(n=null==(t=T.elements.floating)?void 0:t.childNodes)?n:[])if(e8(e)){let t=e.offsetTop,n=t+e.clientHeight+i,o=r.scrollTop,u=o+r.clientHeight;if(t>=o&&n<=u)s--;else{l=Math.max(0,Math.min(n,u)-Math.max(t,o)),a=e.clientHeight;break}}s>=1&&h(e=>{let t=a*s-l+i;return e>=t?e:t})}}):null,(0,t2.dp)({padding:x,apply(e){let{availableWidth:t,availableHeight:n,elements:r}=e;Object.assign(r.floating.style,{overflow:"auto",maxWidth:"".concat(t,"px"),maxHeight:"min(var(--anchor-max-height, 100vh), ".concat(n,"px)")})}}
1)].filter(Boolean),whileElementsMounted:t4.Me}),[C=k,A=S]=T.placement.split("-");"selection"===k&&(C="selection");let F=(0,D.useMemo)(()=>({anchor:[C,A].filter(Boolean).join(" ")}),[C,A]),L=(0,t1.Rz)(T,{overflowRef:p,onChange:h}),{getReferenceProps:N,getFloatingProps:R}=(0,t1.NI)([L]),I=e1(e=>{g(e),E.setFloating(e)});return D.createElement(t5.Provider,{value:c},D.createElement(t9.Provider,{value:{setFloating:I,setReference:E.setReference,styles:O,getReferenceProps:N,getFloatingProps:R,slot:F}},o))}function t6(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=eQ(),i=e1((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=t8(e,t);return[i,n=>{let s=function e(t){let n=/var\((.*)\)/.exec(t);if(n){let t=n[1].indexOf(",");if(-1===t)return[n[1]];let r=n[1].slice(0,t).trim(),i=n[1].slice(t+1).trim();return i?[r,...e(i)]:[r]}return[]}(e);{let a=s.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function l(){r.nextFrame(l);let o=!1;for(let[e,n]of s.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(a[e]!==r){a[e]=r,o=!0;break}}if(!o)return;let u=t8(e,t);i!==u&&(n(u),i=u)})}return r.dispose}]}return[n,null]}),s=(0,D.useMemo)(()=>i(e,t)[0],[e,t]),[a=s,l]=(0,D.useState)();return eX(()=>{let[n,r]=i(e,t);if(l(n),r)return r(l)},[e,t]),a}function t8(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function t7(e,t){return e?e+"["+t+"]":t}function ne(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.from(new Set(t.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}t5.displayName="PlacementContext";var nt=((m=nt||{})[m.None=0]="None",m[m.RenderStrategy=1]="RenderStrategy",m[m.Static=2]="Static",m),nn=((g=nn||{})[g.Unmount=0]="Unmount",g[g.Hidden=1]="Hidden",g);function nr(){let e,t;let n=(e=(0,D.useRef)([]),t=(0,D.useCallback)(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]),function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];if(!r.every(e=>null==e))return e.current=r,t});return(0,D.useCallback)(e=>(function(e){let{ourProps:t,theirProps:n,slot:r,defaultTag:i,features:s,visible:a=!0,name:l,mergeRefs:o}=e;o=null!=o?o:ns;let u=na(n,t);if(a)return ni(u,r,i,l,o);let d=null!=s?s:0;if(2&d){let{static:e=!1,...t}=u;if(e)return ni(t,r,i,l,o)}if(1&d){let{unmount:e=!0,...t}=u;return tg(e?0:1,{0:()=>null,1:()=>ni({...t,hidden:!0,style:{display:"none"}},r,i,l,o)})}return ni(u,r,i,l,o)})({mergeRefs:n,...e}),[n])}function ni(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,{as:s=n,children:a,refName:l="ref",...o}=nd(e,["unmount","static"]),u=void 0!==e.ref?{[l]:e.ref}:{},d="function"==typeof a?a(t):a;d=function e(t){if(null!=t&&t.$$typeof===Symbol.for("react.lazy")){let n=t._payload;if(null!=n&&"fulfilled"===n.status)return e(n.value)}return t}(d),"className"in o&&o.className&&"function"==typeof o.className&&(o.className=o.className(t)),o["aria-labelledby"]&&o["aria-labelledby"]===o.id&&(o["aria-labelledby"]=void 0);let c={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())));if(e)for(let e of(c["data-headlessui-state"]=n.join(" "),n))c["data-".concat(e)]=""}if(nc(s)&&(Object.keys(nu(o)).length>0||Object.keys(nu(c)).length>0)){if(!(0,D.isValidElement)(d)||Array.isArray(d)&&d.length>1||nc(d.type)){if(Object.keys(nu(o)).length>0)throw Error(['Passing props on "Fragment"!',"","The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(nu(o)).concat(Object.keys(nu(c))).map(e=>"  - ".concat(e)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>"  - ".concat(e)).join("\n")].join("\n"))}else{var f;let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return ne(t(...n),o.className)}:ne(t,o.className),r=na(d.props,nu(nd(o,["ref"])));for(let e in c)e in r&&delete c[e];return(0,D.cloneElement)(d,Object.assign({},r,c,u,{ref:i((f=d,D.version.split(".")[0]>="19"?f.props.ref:f.ref),u.ref)},n?{className:n}:{}))}}return(0,D.createElement)(s,Object.assign({},nd(o,["ref"]),!nc(s)&&u,!nc(s)&&c),d)}function ns(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(e=>null==e)?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function na(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];let r={},i={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=i[t]||(i[t]=[]),i[t].push(e[t])):r[t]=e[t];if(r.disabled||r["aria-disabled"])for(let e in i)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(i[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in i)Object.assign(r,{[e](t){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];for(let n of i[e]){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;n(t,...r)}}});return r}function nl(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];let r={},i={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=i[t]||(i[t]=[]),i[t].push(e[t])):r[t]=e[t];for(let e in i)Object.assign(r,{[e](){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(let t of i[e])null==t||t(...n)}});return r}function no(e){var t;return Object.assign((0,D.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function nu(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}
1function nd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function nc(e){return e===D.Fragment||e===Symbol.for("react.fragment")}var nf=((v=nf||{})[v.None=1]="None",v[v.Focusable=2]="Focusable",v[v.Hidden=4]="Hidden",v);let nh=no(function(e,t){var n;let{features:r=1,...i}=e,s={ref:t,"aria-hidden":(2&r)==2||(null!=(n=i["aria-hidden"])?n:void 0),hidden:(4&r)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&r)==4&&(2&r)!=2&&{display:"none"}}};return nr()({ourProps:s,theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})}),np=(0,D.createContext)(null);function nm(e){let{children:t}=e,n=(0,D.useContext)(np);if(!n)return D.createElement(D.Fragment,null,t);let{target:r}=n;return r?(0,eS.createPortal)(D.createElement(D.Fragment,null,t),r):null}function ng(e){let{data:t,form:n,disabled:r,onReset:i,overrides:s}=e,[a,l]=(0,D.useState)(null),o=eQ();return(0,D.useEffect)(()=>{if(i&&a)return o.addEventListener(a,"reset",i)},[a,n,i]),D.createElement(nm,null,D.createElement(nv,{setForm:l,formId:n}),(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[i,s]of Object.entries(t))!function t(n,r,i){if(Array.isArray(i))for(let[e,s]of i.entries())t(n,t7(r,e.toString()),s);else i instanceof Date?n.push([r,i.toISOString()]):"boolean"==typeof i?n.push([r,i?"1":"0"]):"string"==typeof i?n.push([r,i]):"number"==typeof i?n.push([r,"".concat(i)]):null==i?n.push([r,""]):function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(i)&&!(0,D.isValidElement)(i)&&e(i,r,n)}(r,t7(n,i),s);return r})(t).map(e=>{let[t,i]=e;return D.createElement(nh,{features:nf.Hidden,...nu({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:r,name:t,value:i,...s})})}))}function nv(e){let{setForm:t,formId:n}=e;return(0,D.useEffect)(()=>{if(n){let e=document.getElementById(n);e&&t(e)}},[t,n]),n?null:D.createElement(nh,{features:nf.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&t(n)}})}let ny=D.forwardRef(function(e,t){let{children:n,freeze:r}=e,i=nb(r,n);return(0,D.isValidElement)(i)?(0,D.cloneElement)(i,{ref:t}):D.createElement(D.Fragment,null,i)});function nb(e,t){let[n,r]=(0,D.useState)(t);return e||n===t||r(t),e?n:t}let n_=(0,D.createContext)(void 0);function nx(){return(0,D.useContext)(n_)}let nw=(0,D.createContext)(null);nw.displayName="OpenClosedContext";var nk=((y=nk||{})[y.Open=1]="Open",y[y.Closed=2]="Closed",y[y.Closing=4]="Closing",y[y.Opening=8]="Opening",y);function nS(e){let{value:t,children:n}=e;return D.createElement(nw.Provider,{value:t},n)}let nE=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}(()=>{function e(e){if(!e7(e.target)||e.target===document.body||nE[0]===e.target)return;let t=e.target;t=t.closest(tL),nE.unshift(null!=t?t:e.target),(nE=nE.filter(e=>null!=e&&e.isConnected)).splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});var nO=((b=nO||{})[b.First=0]="First",b[b.Previous=1]="Previous",b[b.Next=2]="Next",b[b.Last=3]="Last",b[b.Specific=4]="Specific",b[b.Nothing=5]="Nothing",b);function nT(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw Error("Unexpected object: "+e)}(e)}}let nC=(0,D.createContext)(null);nC.displayName="DescriptionContext",Object.assign(no(function(e,t){let n=(0,D.useId)(),r=t0(),{id:i="headlessui-description-".concat(n),...s}=e,a=function e(){let t=(0,D.useContext)(nC);if(null===t){let t=Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),l=tq(t);eX(()=>a.register(i),[i,a.register]);let o=tH({...a.slot,disabled:r||!1}),u={ref:l,...a.props,id:i};return nr()({ourProps:u,theirProps:s,slot:o,defaultTag:"p",name:a.name||"Description"})}),{});var nA=((_=nA||{}).Space=" ",_.Enter="Enter",_.Escape="Escape",_.Backspace="Backspace",_.Delete="Delete",_.ArrowLeft="ArrowLeft",_.ArrowUp="ArrowUp",_.ArrowRight="ArrowRight",_.ArrowDown="ArrowDown",_.Home="Home",_.End="End",_.PageUp="PageUp",_.PageDown="PageDown",_.Tab="Tab",_);let nF=(0,D.createContext)(null);function nL(e){var t,n,r;let i=null!=(n=null==(t=(0,D.useContext)(nF))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>
10?[i,...e].filter(Boolean).join(" "):i}nF.displayName="LabelContext";let nN=Object.assign(no(function(e,t){var n;let r=(0,D.useId)(),i=function e(){let t=(0,D.useContext)(nF);if(null===t){let t=Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),s=nx(),a=t0(),{id:l="headlessui-label-".concat(r),htmlFor:o=null!=s?s:null==(n=i.props)?void 0:n.htmlFor,passive:u=!1,...d}=e,c=tq(t);eX(()=>i.register(l),[l,i.register]);let f=e1(e=>{var t;let n=e.currentTarget;if(!(e.target!==e.currentTarget&&e6(t=e.target)&&t.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'))&&(tt(n)&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),tt(n))){let e=document.getElementById(n.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(te(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),h=tH({...i.slot,disabled:a||!1}),p={ref:c,...i.props,id:l,htmlFor:o,onClick:f};return u&&("onClick"in p&&(delete p.htmlFor,delete p.onClick),"onClick"in d&&delete d.onClick),nr()({ourProps:p,theirProps:d,slot:h,defaultTag:o?"label":"div",name:i.name||"Label"})}),{});function nR(e){let t=e1(e),n=(0,D.useRef)(!1);(0,D.useEffect)(()=>(n.current=!1,()=>{n.current=!0,eY(()=>{n.current&&t()})}),[t])}let nI=(0,D.createContext)(!1),nM=D.Fragment,nP=no(function(e,t){let{ownerDocument:n=null,...r}=e,i=(0,D.useRef)(null),s=tq(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return Object.assign(e,{[tK]:t})}(e=>{i.current=e}),t),a=tz(i.current),l=function(e){let t=(0,D.useContext)(nI),n=(0,D.useContext)(nj),[r,i]=(0,D.useState)(()=>{var r;if(!t&&null!==n)return null!=(r=n.current)?r:null;if(eK.isServer)return null;let i=null==e?void 0:e.getElementById("headlessui-portal-root");if(i)return i;if(null===e)return null;let s=e.createElement("div");return s.setAttribute("id","headlessui-portal-root"),e.body.appendChild(s)});return(0,D.useEffect)(()=>{null!==r&&(null!=e&&e.body.contains(r)||null==e||e.body.appendChild(r))},[r,e]),(0,D.useEffect)(()=>{t||null!==n&&i(n.current)},[n,i,t]),r}(null!=n?n:a),o=(0,D.useContext)(nV),u=eQ(),d=function(){let e;let t=(e="undefined"==typeof document,(0,j.useSyncExternalStore)(()=>()=>{},()=>!1,()=>!e)),[n,r]=D.useState(eK.isHandoffComplete);return n&&!1===eK.isHandoffComplete&&r(!1),D.useEffect(()=>{!0!==n&&r(!0)},[n]),D.useEffect(()=>eK.handoff(),[]),!t&&n}(),c=nr();return nR(()=>{var e;l&&l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l))}),l&&d?(0,eS.createPortal)(D.createElement("div",{"data-headlessui-portal":"",ref:e=>{u.dispose(),o&&e&&u.add(o.register(e))}},c({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:nM,name:"Portal"})),l):null}),nD=D.Fragment,nj=(0,D.createContext)(null),nV=(0,D.createContext)(null),nz=Object.assign(no(function(e,t){let n=tq(t),{enabled:r=!0,ownerDocument:i,...s}=e,a=nr();return r?D.createElement(nP,{...s,ownerDocument:i,ref:n}):a({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:nM,name:"Portal"})}),{Group:no(function(e,t){let{target:n,...r}=e,i={ref:tq(t)},s=nr();return D.createElement(nj.Provider,{value:n},s({ourProps:i,theirProps:r,defaultTag:nD,name:"Popover.Group"}))})}),n$={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function nZ(e){let t=e.getBoundingClientRect();return"".concat(t.x,",").concat(t.y)}var nW=Object.defineProperty,nU=(e,t,n)=>t in e?nW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nB=(e,t,n)=>(nU(e,"symbol"!=typeof t?t+"":t,n),n),nH=((x=nH||{})[x.Open=0]="Open",x[x.Closed=1]="Closed",x),nK=((w=nK||{})[w.Single=0]="Single",w[w.Multi=1]="Multi",w),nq=((k=nq||{})[k.Pointer=0]="Pointer",k[k.Focus=1]="Focus",k[k.Other=2]="Other",k),nG=((S=nG||{})[S.OpenCombobox=0]="OpenCombobox",S[S.CloseCombobox=1]="CloseCombobox",S[S.GoToOption=2]="GoToOption",S[S.SetTyping=3]="SetTyping",S[S.RegisterOption=4]="RegisterOption",S[S.UnregisterOption=5]="UnregisterOption",S[S.DefaultToFirstOption=6]="DefaultToFirstOption",S[S.SetActivationTrigger=7]="SetActivationTrigger",S[S.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",S[S.SetInputElement=9]="SetInputElement",S[S.SetButtonElement=10]="SetButtonElement",S[S.SetOptionsElement=11]="SetOptionsElement",S[S.MarkInputAsMoved=12]="MarkInputAsMoved",S);function nY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),i=r.length>0&&null!==r[0].dataRef.current.order?r.sort((e,t)=>
1e.dataRef.current.order-t.dataRef.current.order):function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let s=r.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}(r,e=>e.dataRef.current.domRef.current),s=n?i.indexOf(n):null;return -1===s&&(s=null),{options:i,activeOptionIndex:s}}let nJ={1(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState)return e;let n=e.inputElement?n$.Tracked(nZ(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:n,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1,inputPositionState:n$.Idle}}return{...e,comboboxState:0,inputPositionState:n$.Idle,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,r,i,s;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&!(null!=(r=e.dataRef.current)&&r.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,s=t.focus===nO.Specific?t.idx:nT(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,i;return null!=(i=null!=(t=e.activeOptionIndex)?t:n.findIndex(e=>!r(e)))?i:null},resolveDisabled:r,resolveId(){throw Error("Function not implemented.")}}),a=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===s&&e.activationTrigger===a?e:{...e,activeOptionIndex:s,activationTrigger:a,isTyping:!1,__demoMode:!1}}let a=nY(e);if(null===a.activeOptionIndex){let e=a.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(a.activeOptionIndex=e)}let l=t.focus===nO.Specific?t.idx:nT(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),o=null!=(s=t.trigger)?s:2;return e.activeOptionIndex===l&&e.activationTrigger===o?e:{...e,...a,isTyping:!1,activeOptionIndex:l,activationTrigger:o,__demoMode:!1}},4:(e,t)=>{var n,r,i,s;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let a=t.payload,l=nY(e,e=>(e.push(a),e));null===e.activeOptionIndex&&null!=(i=(r=e.dataRef.current).isSelected)&&i.call(r,t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(a));let o={...e,...l,activationTrigger:2};return null!=(s=e.dataRef.current)&&s.__demoMode&&void 0===e.dataRef.current.value&&(o.activeOptionIndex=0),o},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let r=nY(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...r,activationTrigger:2}},6:(e,t)=>e.defaultToFirstOption===t.value?e:{...e,defaultToFirstOption:t.value},7:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},8:(e,t)=>
1{var n,r;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let i=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);i=-1!==n?n:null}return{...e,activeOptionIndex:i,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}}},9:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},10:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},11:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},12:e=>"Tracked"!==e.inputPositionState.kind?e:{...e,inputPositionState:n$.Moved}};class nQ extends tf{static new(e){var t;let{id:n,virtual:r=null,__demoMode:i=!1}=e;return new nQ({id:n,dataRef:{current:{}},comboboxState:i?0:1,isTyping:!1,options:[],virtual:r?{options:r.options,disabled:null!=(t=r.disabled)?t:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:i,inputPositionState:n$.Idle})}reduce(e,t){return tg(t.type,nJ,e,t)}constructor(e){super(e),nB(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return tg(r,{0:()=>null==t?void 0:t(e),1:()=>{let r=i.slice(),s=r.findIndex(t=>n(t,e));return -1===s?r.push(e):r.splice(s,1),null==t?void 0:t(r)}})},registerOption:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),null==(t=(e=this.state.dataRef.current).onClose)||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(null!==e){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:nO.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),nB(this,"selectors",{activeDescendantId:e=>{var t,n;let r=this.selectors.activeOptionIndex(e);if(null!==r)return e.virtual?null==(n=e.options.find(t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[r])))?void 0:n.id:null==(t=e.options[r])?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&null===e.activeOptionIndex&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:n}=e.virtual,r=t.findIndex(e=>{var t;return!(null!=(t=null==n?void 0:n(e))&&t)});if(-1!==r)return r}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,n;let r=this.selectors.activeOptionIndex(e);return null===r?null:e.virtual?e.virtual.options[null!=r?r:0]:null!=(n=null==(t=e.options[r])?void 0:t.dataRef.current.value)?n:null},isActive:(e,t,n)=>{var r;let i=this.selectors.activeOptionIndex(e);return null!==i&&(e.virtual?i===e.dataRef.current.calculateIndex(t):(null==(r=e.options[i])?void 0:r.id)===n)},shouldScrollIntoView:(e,t,n)=>!(e.virtual||e.__demoMode||0!==e.comboboxState||0===e.activationTrigger||!this.selectors.isActive(e,t,n)),didInputMove:e=>"Moved"===e.inputPositionState.kind});{let e=this.state.id,t=tk.get(null);this.disposables.add(t.on(t_.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.comboboxState||this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.inputElement&&(e.dispose(),e.add(function(e,t,n){let r=eJ();if("Tracked"===t.kind){let i=function(){s!==nZ(e)&&(r.dispose(),n())},{position:s}=t,a=new ResizeObserver(i);a.observe(e),r.add(()=>a.disconnect()),r.addEventListener(window,"scroll",i,{passive:!0}),r.addEventListener(window,"resize",i)}return()=>r.dispose()}(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}}let nX=(0,D.createContext)(null);function n0(e){let t=(0,D.useContext)(nX);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Combobox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,n1),t}return t}function n1(e){let{id:t,virtual:n=null,__demoMode:r=!1}=e,i=(0,D.useMemo)(()=>nQ.new({id:t,virtual:n,__demoMode:r}),[]);return nR(()=>i.dispose()),i}let n2=(0,D.createContext)(null);function n4(e){let t=(0,D.useContext)(n2);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Combobox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,n4),t}return t}n2.displayName="ComboboxDataContext";let n9=(0,D.createContext)(null);function n5(e){let t=n0("VirtualProvider"),{options:n}=n4("VirtualProvider").virtual,r=tE(t,e=>e.optionsElement),[i,s]=(0,D.useMemo)(()=>
1{if(!r)return[0,0];let e=window.getComputedStyle(r);return[parseFloat(e.paddingBlockStart||e.paddingTop),parseFloat(e.paddingBlockEnd||e.paddingBottom)]},[r]),a=function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...r}){let i=D.useReducer(e=>e+1,0)[1],s=D.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=t,s.current.mode=n;let a=D.useRef(!1),l=e=>{let t=s.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?"width":"height";t.container.style[r]=`${n}px`}},o=e=>{let t=s.current;if(!t.enabled||!t.container)return;l(e);let n=!!e.options.horizontal,r="transform"===t.mode,i=n?"left":"top",a=e.options.scrollMargin;for(let s of e.getVirtualItems()){let l=s.start-a,o=e.elementsCache.get(s.key);o&&t.lastPositions.get(o)!==l&&(t.lastPositions.set(o,l),r?o.style.transform=n?`translate3d(${l}px, 0, 0)`:`translate3d(0, ${l}px, 0)`:o.style[i]=`${l}px`)}},u={...r,onChange:(t,n)=>{var l;let u=s.current,d=!0;if(u.enabled){o(t);let e=t.range,n=u.prevRange;(d=!n||n.isScrolling!==t.isScrolling||n.startIndex!==(null==e?void 0:e.startIndex)||n.endIndex!==(null==e?void 0:e.endIndex))&&(u.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}d&&(e&&n&&!a.current?(0,eS.flushSync)(i):i()),null==(l=r.onChange)||l.call(r,t,n)}},[d]=D.useState(()=>{let e=new ez(u),t=e.measureElement;return e.measureElement=e=>{a.current=!0;try{t(e)}finally{a.current=!1}},Object.assign(e,{containerRef:t=>{let n=s.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?"width":"height";t.style[i]=`${r}px`}}})});return d.setOptions(u),eZ(()=>d._didMount(),[]),eZ(()=>(l(d),d._willUpdate())),eZ(()=>{o(d)}),d}({observeElementRect:eR,observeElementOffset:eD,scrollToFn:eV,enabled:0!==n.length,scrollPaddingStart:i,scrollPaddingEnd:s,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.state.optionsElement,overscan:12}),[l,o]=(0,D.useState)(0);eX(()=>{o(e=>e+1)},[n]);let u=a.getVirtualItems(),d=tE(t,e=>e.activationTrigger===nq.Pointer),c=tE(t,t.selectors.activeOptionIndex);return 0===u.length?null:D.createElement(n9.Provider,{value:a},D.createElement("div",{style:{position:"relative",width:"100%",height:"".concat(a.getTotalSize(),"px")},ref:e=>{e&&(d||null!==c&&n.length>c&&a.scrollToIndex(c))}},u.map(t=>{var r;return D.createElement(D.Fragment,{key:t.key},D.cloneElement(null==(r=e.children)?void 0:r.call(e,{...e.slot,option:n[t.index]}),{key:"".concat(l,"-").concat(t.key),"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:"translateY(".concat(t.start,"px)"),overflowAnchor:"none"}}))})))}let n3=D.Fragment,n6=nt.RenderStrategy|nt.Static,n8=no(function(e,t){var n,r,i;let s,a,l,o,u,d=(0,D.useId)(),c=t0(),{value:f,defaultValue:h,onChange:p,form:m,name:g,by:v,invalid:y=!1,disabled:b=c||!1,onClose:_,__demoMode:x=!1,multiple:w=!1,immediate:k=!1,virtual:S=null,nullable:E,...O}=e,T=function(e){let[t]=(0,D.useState)(e);return t}(h),[C=w?[]:void 0,A]=function(e,t,n){let[r,i]=(0,D.useState)(n),s=void 0!==e,a=(0,D.useRef)(s),l=(0,D.useRef)(!1),o=(0,D.useRef)(!1);return!s||a.current||l.current?s||!a.current||o.current||(o.current=!0,a.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,a.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[s?e:r,e1(e=>(s||(0,eS.flushSync)(()=>i(e)),null==t?void 0:t(e)))]}(f,p,T),F=n1({id:d,virtual:S,__demoMode:x}),L=(0,D.useRef)({static:!1,hold:!1}),N=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e2;return(0,D.useCallback)((t,n)=>"string"==typeof e?(null==t?void 0:t[e])===(null==n?void 0:n[e]):e(t,n),[e])}(v),R=e1(e=>S?null===v?S.options.indexOf(e):S.options.findIndex(t=>N(t,e)):F.state.options.findIndex(t=>N(t.dataRef.current.value,e))),I=(0,D.useCallback)(e=>tg(j.mode,{[nK.Multi]:()=>C.some(t=>N(t,e)),[nK.Single]:()=>N(C,e)}),[C]),M=tE(F,e=>e.virtual),P=e1(()=>null==_?void 0:_()),j=(0,D.useMemo)(()=>({__demoMode:x,immediate:k,optionsPropsRef:L,value:C,defaultValue:T,disabled:b,invali
1d:y,mode:w?nK.Multi:nK.Single,virtual:S?M:null,onChange:A,isSelected:I,calculateIndex:R,compare:N,onClose:P}),[x,k,L,C,T,b,y,w,S,M,A,I,R,N,P]);eX(()=>{var e;S&&F.send({type:nG.UpdateVirtualConfiguration,options:S.options,disabled:null!=(e=S.disabled)?e:null})},[S,null==S?void 0:S.options,null==S?void 0:S.disabled]),eX(()=>{F.state.dataRef.current=j},[j]);let[V,z,$,Z]=tE(F,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),W=tk.get(null);n=tE(W,(0,D.useCallback)(e=>W.selectors.isTop(e,d),[W,d])),r=[z,$,Z],s=e0(()=>F.actions.closeCombobox()),a=(0,D.useCallback)(function(e,t){if(e.defaultPrevented)return;let n=t(e);if(null!==n&&n.getRootNode().contains(n)&&n.isConnected){for(let t of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(r))if(null!==t&&(t.contains(n)||e.composed&&e.composedPath().includes(t)))return;return!function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(t=eq(e))?void 0:t.body)&&tg(n,{0:()=>e.matches(tL),1(){let t=e;for(;null!==t;){if(t.matches(tL))return!0;t=t.parentElement}return!1}})}(n,tM.Loose)&&-1!==n.tabIndex&&e.preventDefault(),s.current(e,n)}},[s,r]),l=(0,D.useRef)(null),tV(n,"pointerdown",e=>{var t,n;tj()||(l.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),tV(n,"pointerup",e=>{if(tj()||!l.current)return;let t=l.current;return l.current=null,a(e,()=>t)},!0),o=(0,D.useRef)({x:0,y:0}),tV(n,"touchstart",e=>{o.current.x=e.touches[0].clientX,o.current.y=e.touches[0].clientY},!0),tV(n,"touchend",e=>{let t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(!(Math.abs(t.x-o.current.x)>=30||Math.abs(t.y-o.current.y)>=30))return a(e,()=>e7(e.target)?e.target:null)},!0),i="blur",u=e0(e=>a(e,()=>{var e;return e8(e=window.document.activeElement)&&"IFRAME"===e.nodeName?window.document.activeElement:null})),(0,D.useEffect)(()=>{if(n)return window.addEventListener(i,e,!0),()=>window.removeEventListener(i,e,!0);function e(e){u.current(e)}},[n,i,!0]);let U=tE(F,F.selectors.activeOptionIndex),B=tE(F,F.selectors.activeOption),H=tH({open:V===nH.Open,disabled:b,invalid:y,activeIndex:U,activeOption:B,value:C}),[K,q]=function(){let{inherit:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=nL(),[n,r]=(0,D.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,(0,D.useMemo)(()=>function(e){let t=e1(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),n=(0,D.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return D.createElement(nF.Provider,{value:n},e.children)},[r])]}(),G=(0,D.useCallback)(()=>{if(void 0!==T)return null==A?void 0:A(T)},[A,T]),Y=nr();return D.createElement(q,{value:K,props:{htmlFor:null==$?void 0:$.id},slot:{open:V===nH.Open,disabled:b}},D.createElement(t3,null,D.createElement(n2.Provider,{value:j},D.createElement(nX.Provider,{value:F},D.createElement(nS,{value:tg(V,{[nH.Open]:nk.Open,[nH.Closed]:nk.Closed})},null!=g&&D.createElement(ng,{disabled:b,data:null!=C?{[g]:C}:{},form:m,onReset:G}),Y({ourProps:null===t?{}:{ref:t},theirProps:O,slot:H,defaultTag:n3,name:"Combobox"}))))))}),n7=no(function(e,t){var n;let r,i=n0("Combobox.Button"),s=n4("Combobox.Button"),[a,l]=(0,D.useState)(null),o=tq(t,l,i.actions.setButtonElement),u=(0,D.useId)(),{id:d="headlessui-combobox-button-".concat(u),disabled:c=s.disabled||!1,autoFocus:f=!1,...h}=e,[p,m,g]=tE(i,e=>[e.comboboxState,e.inputElement,e.optionsElement]),v=tW(m);!function(e,t){let{trigger:n,action:r,close:i,select:s}=t,a=(0,D.useRef)(null),l=(0,D.useRef)(null),o=(0,D.useRef)(null);tV(e&&null!==n,"pointerdown",e=>{e3(null==e?void 0:e.target)&&null!=n&&n.contains(e.target)&&(l.current=e.x,o.current=e.y,a.current=e.timeStamp)}),tV(e&&null!==n,"pointerup",e=>{var t,n;let u=a.current;if(null===u||(a.current=null,!e7(e.target))||5>Math.abs(e.x-(null!=(t=l.current)?t:e.x))&&5>Math.abs(e.y-(null!=(n=o.current)?n:e.y)))return;let d=r(e);switch(d.kind){case 0:return;case 1:e.timeStamp-u>200&&(s(d.target),i());break;case 2:i()}},{capture:!0})}(p===nH.Open,{trigger:a,action:(0,D.useCallback)(e=>{if(null!=a&&a.contains(e.target)||null!=m&&m.contains(e.target))return tZ.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return e8(t)?tZ.Select(t):null!=g&&g.contains(e.target)?tZ.Ignore:tZ.Close},[a,m,g]),close:i.actions.closeCombobox,select:i.actions.selectActiveOption});let y=e1(e=>{switch(e.key){case nA.Space:case nA.Enter:e.preventDefault(),e.stopPropagation(),i.state.comboboxState===nH.Closed&&(0,eS.flushSync)(()=>i.actions.openCombobox()),v();return;case nA.ArrowDown:e.preventDefault(),e.stopPropagation(),i.state.comboboxState===nH.Closed&&((0,eS.flushSync)(()=>i.actions.openCombobox()),i.state.dataRef.current.value||i.actions.goToOption({focus:nO.First})),v();return;case nA.ArrowUp:e.preventDefault(),e.stopPropagation(),i.state.comboboxState===nH.Closed&&((0,eS.flushSync)(()=>i.actions.openCombobox()),i.state.dataRef.current.value||i.actions.goToOption({focus:nO.Last})),v();return;case nA.Escape:if(i.state.comboboxState!==nH.Open)return;e.preventDefault(),i.state.optionsElement&&!s.optionsPropsRef.current.static&&e.stopPropagation(),(0,eS.flushSync)(()=>i.actions.closeCombobox()),v();return;default:return}}),b=(n=()=>{i.state.comboboxState===nH.Open?i.actions.closeCombobox():i.actions.openCombobox(),v()},r=(0,D.useRef)(null),{onPointerDown:e1(e=>{r.current=e.pointerType,tr(e.currentTarget)||"mouse"!==e.pointerType||e.button!==e5.Left||(e.preventDefault(),n(e))}),onClick:e1(e=>{"mouse"!==r.current&&(tr(e.currentTarget)||n(e))})}),_=nL([d]),{isFocusVisible:x,focusProps:w}=ey({autoFocus:f}),{isHovered:k,hoverProps:S}=ek({isDisabled:c}),{pressed:E,pressProps:O}=function(){let{disabled:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,D.useRef)(null),[n,r]=(0,D.useState)(!1),i=eQ(),s=e1(()=>{t.current=null,r(!1),i.dispose()}),a=e1(e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=eq(e.currentTarget);i.addEventListener(n,"pointerup",s,!1),i.addEventListener(n,"pointermove",e=>{if(t.current){var n,i;let s,a;r((s=e.width/2,a=e.height/2,n={top:e.clientY-a,right:e.clientX+s,bottom:e.clientY+a,left
1:e.clientX-s},i=t.current.getBoundingClientRect(),!(!n||!i||n.right<i.left||n.left>i.right||n.bottom<i.top||n.top>i.bottom)))}},!1),i.addEventListener(n,"pointercancel",s,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:a,onPointerUp:s,onClick:s}}}({disabled:c}),T=tH({open:p===nH.Open,active:E||p===nH.Open,disabled:c,invalid:s.invalid,value:s.value,hover:k,focus:x}),C=nl({ref:o,id:d,type:(0,D.useMemo)(()=>{var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase()||(null==a?void 0:a.tagName)==="BUTTON"&&!a.hasAttribute("type"))return"button"},[e.type,e.as,a]),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==g?void 0:g.id,"aria-expanded":p===nH.Open,"aria-labelledby":_,disabled:c||void 0,autoFocus:f,onKeyDown:y},b,w,S,O);return nr()({ourProps:C,theirProps:h,slot:T,defaultTag:"button",name:"Combobox.Button"})}),re=no(function(e,t){var n,r,i,s;let a=n0("Combobox.Input"),l=n4("Combobox.Input"),o=(0,D.useId)(),u=nx(),{id:d=u||"headlessui-combobox-input-".concat(o),onChange:c,displayValue:f,disabled:h=l.disabled||!1,autoFocus:p=!1,type:m="text",...g}=e,v=(0,D.useRef)(null),y=tq(v,t,(0,D.useContext)(t9).setReference,a.actions.setInputElement),[b,_]=tE(a,e=>[e.comboboxState,e.isTyping]),x=eQ(),w=e1(()=>{a.actions.onChange(null),a.state.optionsElement&&(a.state.optionsElement.scrollTop=0),a.actions.goToOption({focus:nO.Nothing})});tQ((e,t)=>{let[n,r]=e,[i,s]=t;if(a.state.isTyping)return;let l=v.current;l&&((s===nH.Open&&r===nH.Closed||n!==i)&&(l.value=n),requestAnimationFrame(()=>{if(a.state.isTyping||!l||eG(l))return;let{selectionStart:e,selectionEnd:t}=l;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&l.setSelectionRange(l.value.length,l.value.length)}))},[(0,D.useMemo)(()=>{var e;return"function"==typeof f&&void 0!==l.value?null!=(e=f(l.value))?e:"":"string"==typeof l.value?l.value:""},[l.value,f]),b,_]),tQ((e,t)=>{let[n]=e,[r]=t;if(n===nH.Open&&r===nH.Closed){if(a.state.isTyping)return;let e=v.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:i}=e;e.value="",e.value=t,null!==i?e.setSelectionRange(n,r,i):e.setSelectionRange(n,r)}},[b]);let k=(0,D.useRef)(!1),S=e1(()=>{k.current=!0}),E=e1(()=>{x.nextFrame(()=>{k.current=!1})}),O=e1(e=>{switch(a.actions.setIsTyping(!0),e.key){case nA.Enter:if(a.state.comboboxState!==nH.Open||k.current)return;if(e.preventDefault(),e.stopPropagation(),null===a.selectors.activeOptionIndex(a.state)){a.actions.closeCombobox();return}a.actions.selectActiveOption(),l.mode===nK.Single&&a.actions.closeCombobox();break;case nA.ArrowDown:return e.preventDefault(),e.stopPropagation(),tg(a.state.comboboxState,{[nH.Open]:()=>a.actions.goToOption({focus:nO.Next}),[nH.Closed]:()=>a.actions.openCombobox()});case nA.ArrowUp:return e.preventDefault(),e.stopPropagation(),tg(a.state.comboboxState,{[nH.Open]:()=>a.actions.goToOption({focus:nO.Previous}),[nH.Closed]:()=>{(0,eS.flushSync)(()=>a.actions.openCombobox()),l.value||a.actions.goToOption({focus:nO.Last})}});case nA.Home:if(a.state.comboboxState===nH.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),a.actions.goToOption({focus:nO.First});case nA.PageUp:return e.preventDefault(),e.stopPropagation(),a.actions.goToOption({focus:nO.First});case nA.End:if(a.state.comboboxState===nH.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),a.actions.goToOption({focus:nO.Last});case nA.PageDown:return e.preventDefault(),e.stopPropagation(),a.actions.goToOption({focus:nO.Last});case nA.Escape:return a.state.comboboxState!==nH.Open?void 0:(e.preventDefault(),a.state.optionsElement&&!l.optionsPropsRef.current.static&&e.stopPropagation(),l.mode===nK.Single&&null===l.value&&w(),a.actions.closeCombobox());case nA.Tab:if(a.actions.setIsTyping(!1),a.state.comboboxState!==nH.Open)return;l.mode===nK.Single&&a.state.activationTrigger!==nq.Focus&&a.actions.selectActiveOption(),a.actions.closeCombobox()}}),T=e1(e=>{null==c||c(e),l.mode===nK.Single&&""===e.target.value&&w(),a.actions.openCombobox()}),C=e1(e=>{var t,n,r;let i=null!=(t=e.relatedTarget)?t:nE.find(t=>t!==e.currentTarget);
1if(!(null!=(n=a.state.optionsElement)&&n.contains(i))&&!(null!=(r=a.state.buttonElement)&&r.contains(i))&&a.state.comboboxState===nH.Open)return e.preventDefault(),l.mode===nK.Single&&null===l.value&&w(),a.actions.closeCombobox()}),A=e1(e=>{var t,n,r;let i=null!=(t=e.relatedTarget)?t:nE.find(t=>t!==e.currentTarget);null!=(n=a.state.buttonElement)&&n.contains(i)||null!=(r=a.state.optionsElement)&&r.contains(i)||l.disabled||l.immediate&&a.state.comboboxState!==nH.Open&&x.microTask(()=>{(0,eS.flushSync)(()=>a.actions.openCombobox()),a.actions.setActivationTrigger(nq.Focus)})}),F=nL(),L=null!=(s=null==(i=(0,D.useContext)(nC))?void 0:i.value)?s:void 0,{isFocused:N,focusProps:R}=ey({autoFocus:p}),{isHovered:I,hoverProps:M}=ek({isDisabled:h}),P=tE(a,e=>e.optionsElement),j=tH({open:b===nH.Open,disabled:h,invalid:l.invalid,hover:I,focus:N,autofocus:p}),V=nl({ref:y,id:d,role:"combobox",type:m,"aria-controls":null==P?void 0:P.id,"aria-expanded":b===nH.Open,"aria-activedescendant":tE(a,a.selectors.activeDescendantId),"aria-labelledby":F,"aria-describedby":L,"aria-autocomplete":"list",defaultValue:null!=(r=null!=(n=e.defaultValue)?n:void 0!==l.defaultValue?null==f?void 0:f(l.defaultValue):null)?r:l.defaultValue,disabled:h||void 0,autoFocus:p,onCompositionStart:S,onCompositionEnd:E,onKeyDown:O,onChange:T,onFocus:A,onBlur:C},R,M);return nr()({ourProps:V,theirProps:g,slot:j,defaultTag:"input",name:"Combobox.Input"})}),rt=no(function(e,t){var n,r,i,s;let a;let l=(0,D.useId)(),{id:o="headlessui-combobox-options-".concat(l),hold:u=!1,anchor:d,portal:c=!1,modal:f=!0,transition:h=!1,...p}=e,m=n0("Combobox.Options"),g=n4("Combobox.Options"),v=(0,D.useMemo)(()=>d?"string"==typeof d?{to:d}:d:null,[d]);v&&(c=!0);let[y,b]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,D.useContext)(t5),n=(0,D.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t})]);eX(()=>{null==t||t(null!=n?n:null)},[t,n]);let r=(0,D.useContext)(t9);return(0,D.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}(v),[_,x]=(0,D.useState)(null),w=function(){let{getFloatingProps:e,slot:t}=(0,D.useContext)(t9);return(0,D.useCallback)(function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return Object.assign({},e(...r),{"data-anchor":t.anchor})},[e,t])}(),k=tq(t,v?y:null,m.actions.setOptionsElement,x),[S,E,O,T,C]=tE(m,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),A=tz(E||O),F=tz(T),L=(0,D.useContext)(nw),[N,R]=function(e,t,n,r){let[i,s]=(0,D.useState)(n),{hasFlag:a,addFlag:l,removeFlag:o}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,n]=(0,D.useState)(e),r=(0,D.useCallback)(e=>n(e),[]),i=(0,D.useCallback)(e=>n(t=>t|e),[]),s=(0,D.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:(0,D.useCallback)(e=>n(t=>t&~e),[]),toggleFlag:(0,D.useCallback)(e=>n(t=>t^e),[])}}(e&&i?3:0),u=(0,D.useRef)(!1),d=(0,D.useRef)(!1);return eX(()=>{if(e){if(n&&s(!0),!t){n&&l(3);return}return function(e,t){let{prepare:n,run:r,done:i,inFlight:s}=t,a=eJ();return function(e,t){let{inFlight:n,prepare:r}=t;if(null!=n&&n.current){r();return}let i=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=i}(e,{prepare:n,inFlight:s}),a.nextFrame(()=>{r(),a.requestAnimationFrame(()=>{a.add(function(e,t){var n,r;let i=eJ();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let a=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?r:[];return 0===a.length?t():Promise.allSettled(a.map(e=>e.finished)).then(()=>{s||t()}),i.dispose}(e,i))})}),a.dispose}(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,d.current||(n?(l(3),o(4)):(l(4),o(2)))},run(){d.current?n?(o(3),l(4)):(o(4),l(3)):n?o(1):l(1)},done(){var e,i,a;d.current&&(null!=(a=null==(i=t.getAnimations)?void 0:i.call(t))?a:[]).some(e=>e instanceof CSSTransition&&"finished"!==e.playState)||(u.current=!1,o(7),n||s(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})}},[e,n,t,eQ()]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}(h,_,null!==L?(L&nk.Open)===nk.Open:S===nH.Open);s=m.actions.closeCombobox,a=e0(e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&s()}),(0,D.useEffect)(()=>
1{if(!N)return;let e=null===E?null:e8(E)?E:E.current;if(!e)return;let t=eJ();if("undefined"!=typeof ResizeObserver){let n=new ResizeObserver(()=>a.current(e));n.observe(e),t.add(()=>n.disconnect())}if("undefined"!=typeof IntersectionObserver){let n=new IntersectionObserver(()=>a.current(e));n.observe(e),t.add(()=>n.disconnect())}return()=>t.dispose()},[E,a,N]),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[document.body];!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>({containers:[]}),r=(0,D.useSyncExternalStore)(tB.subscribe,tB.getSnapshot,tB.getSnapshot),i=t?r.get(t):void 0;i&&i.count,eX(()=>{if(!(!t||!e))return tB.dispatch("PUSH",t,n),()=>tB.dispatch("POP",t,n)},[e,t])}(tT(e,"scroll-lock"),t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}(!g.__demoMode&&f&&S===nH.Open,F),function(e){let{allowed:t,disallowed:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=tT(e,"inert-others");eX(()=>{var e,i;if(!r)return;let s=eJ();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&s.add(tF(t));let a=null!=(i=null==t?void 0:t())?i:[];for(let e of a){if(!e)continue;let t=eq(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)a.some(t=>e.contains(t))||s.add(tF(e));n=n.parentElement}}return s.dispose},[r,t,n])}(!g.__demoMode&&f&&S===nH.Open,{allowed:(0,D.useCallback)(()=>[E,O,T],[E,O,T])});let I=!tE(m,m.selectors.didInputMove)&&N;eX(()=>{var t;g.optionsPropsRef.current.static=null!=(t=e.static)&&t},[g.optionsPropsRef,e.static]),eX(()=>{g.optionsPropsRef.current.hold=u},[g.optionsPropsRef,u]),function(e,t){let{container:n,accept:r,walk:i}=t,s=(0,D.useRef)(r),a=(0,D.useRef)(i);(0,D.useEffect)(()=>{s.current=r,a.current=i},[r,i]),eX(()=>{if(!n||!e)return;let t=eq(n);if(!t)return;let r=s.current,i=a.current,l=Object.assign(e=>r(e),{acceptNode:r}),o=t.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,l,!1);for(;o.nextNode();)i(o.currentNode)},[n,e,s,a])}(S===nH.Open,{container:T,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let M=nL([null==O?void 0:O.id]),P=tH({open:S===nH.Open,option:void 0}),j=e1(()=>{m.actions.setActivationTrigger(nq.Pointer)}),V=e1(e=>{e.preventDefault(),m.actions.setActivationTrigger(nq.Pointer)}),z=nl(v?w():{},{"aria-labelledby":M,role:"listbox","aria-multiselectable":g.mode===nK.Multi||void 0,id:o,ref:k,style:{...p.style,...b,"--input-width":e9(N,E,!0).width,"--button-width":e9(N,O,!0).width},onWheel:C===nq.Pointer?void 0:j,onMouseDown:V,...function(e){let t={};for(let n in e)!0===e[n]&&(t["data-".concat(n)]="");return t}(R)}),$=N&&S===nH.Closed&&!e.static,Z=nb($,null==(n=g.virtual)?void 0:n.options),W=nb($,g.value),U=(0,D.useCallback)(e=>g.compare(W,e),[g.compare,W]),B=(0,D.useMemo)(()=>{if(!g.virtual)return g;if(void 0===Z)throw Error("Missing `options` in virtual mode");return Z!==g.virtual.options?{...g,virtual:{...g.virtual,options:Z}}:g},[g,Z,null==(r=g.virtual)?void 0:r.options]);g.virtual&&Object.assign(p,{children:D.createElement(n2.Provider,{value:B},D.createElement(n5,{slot:P},p.children))});let H=nr(),K=(0,D.useMemo)(()=>g.mode===nK.Multi?g:{...g,isSelected:U},[g,U]);return D.createElement(nz,{enabled:!!c&&(e.static||N),ownerDocument:A},D.createElement(n2.Provider,{value:K},H({ourProps:z,theirProps:{...p,children:D.createElement(ny,{freeze:$},"function"==typeof p.children?null==(i=p.children)?void 0:i.call(p,P):p.children)},slot:P,defaultTag:"div",features:n6,visible:I,name:"Combobox.Options"}
1)))}),rn=no(function(e,t){var n,r,i;let s;let a=n4("Combobox.Option"),l=n0("Combobox.Option"),o=(0,D.useId)(),{id:u="headlessui-combobox-option-".concat(o),value:d,disabled:c=null!=(i=null==(r=null==(n=a.virtual)?void 0:n.disabled)?void 0:r.call(n,d))&&i,order:f=null,...h}=e,[p]=tE(l,e=>[e.inputElement]),m=tW(p),g=tE(l,(0,D.useCallback)(e=>l.selectors.isActive(e,d,u),[d,u])),v=a.isSelected(d),y=(0,D.useRef)(null),b=e0({disabled:c,value:d,domRef:y,order:f}),_=(0,D.useContext)(n9),x=tq(t,y,_?_.measureElement:null),w=e1(()=>{l.actions.setIsTyping(!1),l.actions.onChange(d)});eX(()=>l.actions.registerOption(u,b),[b,u]);let k=tE(l,(0,D.useCallback)(e=>l.selectors.shouldScrollIntoView(e,d,u),[d,u]));eX(()=>{if(k)return eJ().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=y.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[k,y]);let S=e1(e=>{e.preventDefault(),e.button===e5.Left&&(c||(w(),tj()||requestAnimationFrame(()=>m()),a.mode===nK.Single&&l.actions.closeCombobox()))}),E=e1(()=>{if(c)return l.actions.goToOption({focus:nO.Nothing});let e=a.calculateIndex(d);l.actions.goToOption({focus:nO.Specific,idx:e})}),O=(s=(0,D.useRef)([-1,-1]),{wasMoved(e){let t=tG(e);return(s.current[0]!==t[0]||s.current[1]!==t[1])&&(s.current=t,!0)},update(e){s.current=tG(e)}}),T=e1(e=>O.update(e)),C=e1(e=>{if(!O.wasMoved(e)||c||g&&l.state.activationTrigger===nq.Pointer)return;let t=a.calculateIndex(d);l.actions.goToOption({focus:nO.Specific,idx:t},nq.Pointer)}),A=e1(e=>{O.wasMoved(e)&&(c||g&&(a.optionsPropsRef.current.hold||l.state.activationTrigger===nq.Pointer&&l.actions.goToOption({focus:nO.Nothing})))}),F=tH({active:g,focus:g,selected:v,disabled:c});return nr()({ourProps:{id:u,ref:x,role:"option",tabIndex:!0===c?void 0:-1,"aria-disabled":!0===c||void 0,"aria-selected":v,disabled:void 0,onMouseDown:S,onFocus:E,onPointerEnter:T,onMouseEnter:T,onPointerMove:C,onMouseMove:C,onPointerLeave:A,onMouseLeave:A},theirProps:h,slot:F,defaultTag:"div",name:"Combobox.Option"})}),rr=Object.assign(n8,{Input:re,Button:n7,Label:nN,Options:rt,Option:rn})},13590:function(e,t,n){n.d(t,{F:function(){return u}});var r=n(29501);let i=(e,t,n)=>{if(e&&"reportValidity"in e){let i=(0,r.U2)(n,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},s=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?i(r.ref,n,e):r.refs&&r.refs.forEach(t=>i(t,n,e))}},a=(e,t)=>{t.shouldUseNativeValidation&&s(e,t);let n={};for(let i in e){let s=(0,r.U2)(t.fields,i),a=Object.assign(e[i]||{},{ref:s&&s.ref});if(l(t.names||Object.keys(e),i)){let e=Object.assign({},(0,r.U2)(n,i));(0,r.t8)(e,"root",a),(0,r.t8)(n,i,e)}else(0,r.t8)(n,i,a)}return n},l=(e,t)=>e.some(e=>e.startsWith(t+"."));var o=function(e,t){for(var n={};e.length;){var i=e[0],s=i.code,a=i.message,l=i.path.join(".");if(!n[l]){if("unionErrors"in i){var o=i.unionErrors[0].errors[0];n[l]={message:o.message,type:o.code}}else n[l]={message:a,type:s}}if("unionErrors"in i&&i.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var u=n[l].types,d=u&&u[i.code];n[l]=(0,r.KN)(l,t,n,s,d?[].concat(d,i.message):i.message)}e.shift()}return n},u=function(e,t,n){return void 0===n&&(n={}),function(r,i,l){try{return Promise.resolve(function(i,a){try{var o=Promise.resolve(e["sync"===n.mode?"parse":"parseAsync"](r,t)).then(function(e){return l.shouldUseNativeValidation&&s({},l),{errors:{},values:n.raw?r:e}})}catch(e){return a(e)}return o&&o.then?o.then(void 0,a):o}(0,function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:a(o(e.errors,!l.shouldUseNativeValidation&&"all"===l.criteriaMode),l)};throw e}))}catch(e){return Promise.reject(e)}}}},14835:function(e,t,n){n.d(t,{U:function(){return i}});var r=n(55036);function i(e,t){let n=+(0,r.Q)(e)-+(0,r.Q)(t);return n<0?-1:n>0?1:n}},25075:function(e,t,n){n.d(t,{o:function(){return s}});var r=n(77967),i=n(14835);function s(e,t,n){let[s,a]=(0,r.d)(null==n?void 0:n.in,e,t),l=(0,i.U)(s,a),o=Math.abs(function(e,t,n){let[i,s]=(0,r.d)(void 0,e,t);return i.getFullYear()-s.getFullYear()}(s,a));s.setFullYear(1584),a.setFullYear(1584);let u=(0,i.U)(s,a)===-l,d=l*(o-+u);return 0===d?0:d}},12258:function(e,t,n){n.d(t,{D:function(){return a}});var r=n(29955),i=n(14993),s=n(55036);function a(e,t){var n;let a,m;let g=()=>(0,i.L)(null==t?void 0:t.in,NaN),v=null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2,y=function(e){let t;let n={},r=e.split(l.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],l.timeZoneDelimiter.test(n.date)&&(n.date=e.split(l.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){let e=l.timezone.exec(t);e?(n.time=t.replace(e[1],""),n.timezone=e[1]):n.time=t}return n}(e);if(y.date){let e=function(e,t){let n=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};
1let i=r[1]?parseInt(r[1]):null,s=r[2]?parseInt(r[2]):null;return{year:null===s?i:100*s,restDateString:e.slice((r[1]||r[2]).length)}}(y.date,v);a=function(e,t){if(null===t)return new Date(NaN);let n=e.match(o);if(!n)return new Date(NaN);let r=!!n[4],i=c(n[1]),s=c(n[2])-1,a=c(n[3]),l=c(n[4]),u=c(n[5])-1;if(r)return l>=1&&l<=53&&u>=0&&u<=6?function(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+((t-1)*7+n+1-i)),r}(t,l,u):new Date(NaN);{let e=new Date(0);return s>=0&&s<=11&&a>=1&&a<=(h[s]||(p(t)?29:28))&&i>=1&&i<=(p(t)?366:365)?(e.setUTCFullYear(t,s,Math.max(i,a)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return g();let b=+a,_=0;if(y.time&&isNaN(_=function(e){let t=e.match(u);if(!t)return NaN;let n=f(t[1]),i=f(t[2]),s=f(t[3]);return(24===n?0===i&&0===s:s>=0&&s<60&&i>=0&&i<60&&n>=0&&n<25)?n*r.vh+i*r.yJ+1e3*s:NaN}(y.time)))return g();if(y.timezone){if(isNaN(m=function(e){if("Z"===e)return 0;let t=e.match(d);if(!t)return 0;let n="+"===t[1]?-1:1,i=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return s>=0&&s<=59?n*(i*r.vh+s*r.yJ):NaN}(y.timezone)))return g()}else{let e=new Date(b+_),n=(0,s.Q)(0,null==t?void 0:t.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return(0,s.Q)(b+_+m,null==t?void 0:t.in)}let l={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},o=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,u=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,d=/^([+-])(\d{2})(?::?(\d{2}))?$/;function c(e){return e?parseInt(e):1}function f(e){return e&&parseFloat(e.replace(",","."))||0}let h=[31,null,31,30,31,30,31,31,30,31,30,31];function p(e){return e%400==0||e%4==0&&e%100!=0}},29501:function(e,t,n){n.d(t,{KN:function(){return G},Qr:function(){return z},U2:function(){return S},cI:function(){return ej},qo:function(){return V},t8:function(){return T}});var r=n(2265),i=e=>"checkbox"===e.type,s=e=>"file"===e.type,a=e=>e instanceof Date,l=e=>null==e;let o=e=>"object"==typeof e;var u=e=>!l(e)&&!Array.isArray(e)&&o(e)&&!a(e),d=e=>u(e)&&e.target?i(e.target)?e.target.checked:s(e.target)?e.target.files:e.target.value:e;let c=/[.[\]'"]/;var f=e=>e.split(c).filter(Boolean),h=(e,t)=>t.split(".").some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join("."))),p="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function m(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e);let t="undefined"!=typeof Blob&&e instanceof Blob,n="undefined"!=typeof FileList&&e instanceof FileList;if(p&&(t||n))return e;let r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;let i=r?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=m(e[t]));return i}let g={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},v={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},y={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},b="root",_=["__proto__","constructor","prototype"],x=/^\w*$/;var w=e=>x.test(e),k=e=>void 0===e,S=(e,t,n)=>{if(!t||!u(e))return n;let r=w(t)?[t]:f(t);if(r.some(e=>_.includes(e)))return n;let i=r.reduce((e,t)=>l(e)?void 0:e[t],e);return k(i)||i===e?k(e[t])?n:e[t]:i},E=e=>"boolean"==typeof e,O=e=>"function"==typeof e,T=(e,t,n)=>{let r=-1,i=w(t)?[t]:f(t),s=i.length,a=s-1;for(;++r<s;){let t=i[r],s=n;if(r!==a){let n=e[t];s=u(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(_.includes(t))return;e[t]=s,e=e[t]}};let C=r.createContext(null);C.displayName="HookFormControlContext";let A=()=>r.useContext(C);var F=(e,t,n,r=!0)=>{let i={};for(let s in e)Object.defineProperty(i,s,{get:()=>(t._proxyFormState[s]!==v.all&&(t._proxyFormState[s]=!r||v.all),n&&(n[s]=!0),e[s])});return i};let L=p?r.useLayoutEffect:r.useEffect;var N=e=>{let t=e.constructor&&e.constructor.prototype;return u(t)&&t.hasOwnProperty("isPrototypeOf")},R=e=>l(e)||!o(e);let I=(e,t)=>0===t.length&&!Array.isArray(e)&&!N(e);
1function M(e,t,n=new WeakMap){if(e===t)return!0;if(R(e)||R(t))return Object.is(e,t);if(a(e)&&a(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(I(e,r)||I(t,i))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;let s=n.get(e);if(s&&s.has(t))return!0;if(s)s.add(t);else{let r=new WeakSet;r.add(t),n.set(e,r)}for(let i of r){let r=e[i];if(!(i in t))return!1;if("ref"!==i){let e=t[i];if(a(r)&&a(e)||(u(r)||Array.isArray(r))&&(u(e)||Array.isArray(e))?!M(r,e,n):!Object.is(r,e))return!1}}return!0}function P(e){let t=r.useRef(!1),n=r.useRef(!1),i=r.useRef(void 0),s=r.useRef(0);return s.current++,!n.current&&e&&(n.current=!0,i.current=m(e())),{resyncIfNeeded:r.useCallback((e,r,a)=>{if(e&&(t.current||n.current&&s.current>1)){let e=r();M(i.current,e)||a(e)}t.current=!0},[]),snapshot:r.useCallback((e,t)=>{e&&(i.current=m(t()))},[])}}var D=e=>"string"==typeof e,j=(e,t,n,r,i)=>D(e)?(r&&t.watch.add(e),S(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),S(n,e,S(i,e)))):(r&&(t.watchAll=!0),n);function V(e){let t=A(),{control:n=t,name:i,defaultValue:s,disabled:a,exact:l,compute:o}=e||{},u=r.useRef(s),d=r.useRef(o),c=r.useRef(n),f=r.useRef(i);d.current=o;let h=()=>{let e=n._getWatch(i,u.current);return d.current?d.current(e):e},[p,m]=r.useState(h),g=r.useRef(p),v=r.useCallback(e=>{let t=j(i,n._names,e||n._formValues,!1,u.current);return d.current?d.current(t):t},[n._formValues,n._names,i]),y=r.useCallback(e=>{if(!a){let t=j(i,n._names,e||n._formValues,!1,u.current);if(d.current){let e=d.current(t);M(e,g.current)||(m(e),g.current=e)}else m(t)}},[n._formValues,n._names,a,i]),{resyncIfNeeded:b,snapshot:_}=P(h),x=r.useRef(y);x.current=y;let w=r.useRef(v);w.current=v,L(()=>{c.current===n&&M(f.current,i)?b(!a,()=>w.current(),e=>{m(e),g.current=e}):(c.current=n,f.current=i,x.current());let e=n._subscribe({name:i,formState:{values:!0},exact:l,callback:e=>{x.current(e.values)}});return()=>{e(),_(!a,()=>w.current())}},[n,l,i,a,b,_]),r.useEffect(()=>n._removeUnmounted());let k=c.current!==n,S=f.current;return r.useMemo(()=>{if(a)return!1;let e=!k&&!M(S,i);return k||e},[a,k,i,S])?v():p}let z=e=>e.render(function(e){let t=A(),{name:n,disabled:i,control:s=t,shouldUnregister:a,defaultValue:l,exact:o=!0}=e,u=h(s._names.array,n),c=r.useMemo(()=>{let e=S(s._formValues,n,S(s._defaultValues,n,l));return k(e)?function(e,t){let n=f(t),r=e._formValues,i=e._defaultValues;for(let e=0;e<n.length-1;e++){let t=n[e];if(r=null==r?r:r[t],i=null==i?i:i[t],null===r||null===i)return null}}(s,n):e},[s,n,l]),p=V({control:s,name:n,defaultValue:c,exact:o}),v=function(e){let t=A(),{control:n=t,disabled:i,name:s,exact:a}=e||{},l=()=>({...n._formState,defaultValues:n._defaultValues}),[o,u]=r.useState(l),d=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:c,snapshot:f}=P(l);return L(()=>{c(!i,l,u);let e=n._subscribe({name:s,formState:d.current,exact:a,callback:e=>{i||u({...n._formState,...e,defaultValues:n._defaultValues})}});return()=>{e(),f(!i,l)}},[n,s,i,a,c,f]),r.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>F(o,n,d.current,!1),[o,n])}({control:s,name:n,exact:o}),y=r.useRef(e),b=r.useRef(null),_=r.useRef(s.register(n,{...e.rules,value:p,...E(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;let x=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!S(v.errors,n)},isDirty:{enumerable:!0,get:()=>!!S(v.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!S(v.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!S(v.validatingFields,n)},error:{enumerable:!0,get:()=>S(v.errors,n)}}),[v,n]),w=r.useCallback(e=>{let t=d(e);return S(s._fields,n)||(_.current=s.register(n,{...y.current.rules,value:t})),_.current.onChange({target:{value:d(e),name:n},type:g.CHANGE})},[n,s]),C=r.useCallback(()=>_.current.onBlur({target:{value:S(s._formValues,n),name:n},type:g.BLUR}),[n,s._formValues]),N=r.useCallback(e=>{e&&(b.current={focus:()=>O(e.focus)&&e.focus(),select:()=>O(e.select)&&e.select(),setCustomValidity:t=>O(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>O(e.reportValidity)&&e.reportValidity()});let t=S(s._fields,n);t&&t._f&&e&&(t._f.ref=b.current)},[s._fields,n]),R=r.useMemo(()=>({name:n,value:p,...E(i)||v.disabled?{disabled:v.disabled||i}:{},onChange:w,onBlur:C,ref:N}),[n,i,v.disabled,w,C,N,p]);return r.useEffect(()=>{let e=s._options.shouldUnregister||a;_.current=s.register(n,{...y.current.rules,...E(y.current.disabled)?{disabled:y.current.disabled}:{}});let t=(e,t)=>{let n=S(s._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=m(S(a?s._defaultValues:s._options.values||s._defaultValues,n,S(s._options.defaultValues,n,y.current.defaultValue)));T(s._defaultValues,n,e),k(S(s._formValues,n))&&T(s._formValues,n,e)}if(u||s.register(n),b.current){let e=S(s._fields,n);e&&e._f&&(e._f.ref=b.current)}return()=>{(u?e&&!s._state.action:e)?s.unregister(n):t(n,!1)}},[n,s,u,a]),r.useEffect(()=>{s._setDisabledField({disabled:i,name:n})},[i,n,s]),r.useMemo(()=>({field:R,formState:v,fieldState:x}),[R,v,x])}(e));var $=e=>({isOnSubmit:!e||e===v.onSubmit,isOnBlur:e===v.onBlur,isOnChange:e===v.onChange,isOnAll:e===v.all,isOnTouch:e===v.onTouched}),Z=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(let n of t.watch)if(e.startsWith(n)&&"."===e.charAt(n.length))return!0;return!1};let W=(e,t,n)=>{for(let r of n||Object.keys(e)){if("_f"===r)continue;let i=n?S(e,r):e[r];if(i){let{_f:e}=i;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],e.name)||e.ref&&t(e.ref,e.name)||W(i,t))return!0}else if((u(i)||Array.isArray(i))&&W(i,t))return!0}}};var U=(e,t,n)=>{let r=S(e,n),i=Array.isArray(r)?r:[];return T(i,b,t[n]),T(e,n,i),e},B=e=>u(e)&&!Object.keys(e).length,H=e=>{if(!p)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},K=e=>"radio"===e.type,q=e=>e instanceof RegExp,G=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{};let Y={value:!1,isValid:!1},J={value:!0,isValid:!0};var Q=e=>{if(!Array.isArray(e))return Y;if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}let t=e[0];return t&&t.checked&&!t.disabled?t.attributes&&"value"in t.attributes?k(t.value)||""===t.value?J:{value:t.value,isValid:!0}:J:Y};let X={isValid:!1,value:null};var ee=e=>Array.isArray(e)?e.reduce((e,t)=>
1t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,X):X;function et(e,t,n="validate"){if(D(e)||Array.isArray(e)&&e.every(D)||E(e)&&!e)return{type:n,message:D(e)?e:"",ref:t}}var en=e=>u(e)&&!q(e)?e:{value:e,message:""},er=async(e,t,n,r,o,d)=>{let{ref:c,refs:f,required:h,maxLength:p,minLength:m,min:g,max:v,pattern:b,validate:_,name:x,valueAsNumber:w,mount:T}=e._f,C=S(n,x);if(!T||t.has(x))return{};let A=f?f[0]:c,F=e=>{if(o&&A.reportValidity){let t=E(e)?"":e||"";f?f.forEach(e=>e.setCustomValidity(t)):A.setCustomValidity(t),A.reportValidity()}},L={},N=K(c),R=i(c),I=(w||s(c))&&k(c.value)&&k(C)||H(c)&&""===c.value||""===C||Array.isArray(C)&&!C.length,M=G.bind(null,x,r,L),P=(e,t,n,r=y.maxLength,i=y.minLength)=>{let s=e?t:n;L[x]={type:e?r:i,message:s,ref:c,...M(e?r:i,s)}};if(d?!Array.isArray(C)||!C.length:h&&(!(N||R)&&(I||l(C))||E(C)&&!C||R&&!Q(f).isValid||N&&!ee(f).isValid)){let{value:e,message:t}=D(h)?{value:!!h,message:h}:en(h);if(e&&(L[x]={type:y.required,message:t,ref:A,...M(y.required,t)},!r))return F(t),L}if(!I&&(!l(g)||!l(v))){let e,t;let n=en(v),i=en(g);if(l(C)||a(C)||isNaN(C)){let r=c.valueAsDate||new Date(C),s=e=>new Date(new Date().toDateString()+" "+e),a="time"==c.type,l="week"==c.type;D(n.value)&&C&&(e=a?s(C)>s(n.value):l?C>n.value:r>new Date(n.value)),D(i.value)&&C&&(t=a?s(C)<s(i.value):l?C<i.value:r<new Date(i.value))}else{let r=c.valueAsNumber||(C?+C:C);l(n.value)||(e=r>n.value),l(i.value)||(t=r<i.value)}if((e||t)&&(P(!!e,n.message,i.message,y.max,y.min),!r))return F(L[x].message),L}if((p||m)&&!I&&(D(C)||d&&Array.isArray(C))){let e=en(p),t=en(m),n=!l(e.value)&&C.length>+e.value,i=!l(t.value)&&C.length<+t.value;if((n||i)&&(P(n,e.message,t.message),!r))return F(L[x].message),L}if(b&&!I&&D(C)){let{value:e,message:t}=en(b);if(q(e)&&!C.match(e)&&(L[x]={type:y.pattern,message:t,ref:c,...M(y.pattern,t)},!r))return F(t),L}if(_){if(O(_)){let e=et(await _(C,n),A);if(e&&(L[x]={...e,...M(y.validate,e.message)},!r))return F(e.message),L}else if(u(_)){let e={};for(let t in _){if(!B(e)&&!r)break;let i=et(await _[t](C,n),A,t);i&&(e={...i,...M(t,i.message)},r||F(i.message),r&&(L[x]=e))}if(!B(e)&&(L[x]={ref:A,...e},!r))return L}}let j=L[x];return F(!j||j.message),L},ei=e=>Array.isArray(e)?e:[e],es=e=>Array.isArray(e)?e.filter(Boolean):[];function ea(e,t){if(D(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:w(t)?[t]:f(t);if(n.some(e=>_.includes(String(e))))return e;let r=1===n.length?e:function(e,t){let n=t.length-1,r=0;for(;r<n;){if(l(e)){e=void 0;break}e=e[t[r]],r++}return e}(e,n),i=n.length-1,s=n[i];return r&&delete r[s],0!==i&&(u(r)&&B(r)||Array.isArray(r)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!k(e[t]))return!1;return!0}(r))&&ea(e,n.slice(0,-1)),e}r.createContext(null).displayName="HookFormContext";var el=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};let eo=(e,t)=>null!==e&&o(e)&&Object.prototype.hasOwnProperty.call(e,t);var eu=(e,t)=>{if(!t)return!1;let n=e;for(let r of w(t)?[t]:f(t)){if(!eo(n,r))return eo(e,t);n=n[r]}return!0},ed=e=>"select-multiple"===e.type,ec=e=>K(e)||i(e),ef=e=>H(e)&&e.isConnected;function eh(e){return Array.isArray(e)||u(e)}var ep=e=>{for(let t in e)if(O(e[t]))return!0;return!1};function em(e){return Array.isArray(e)||u(e)&&!ep(e)}function eg(e){return!!(e&&"_f"in e)}function ev(e){return Array.isArray(e)?!e.some(e=>!k(e)):!Object.keys(e).length}function ey(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function eb(e,t={},n){for(let r in e){let i=e[r],s=n&&n[r];!em(i)||Array.isArray(i)&&eg(s)?k(i)||(t[r]=!0):(t[r]=Array.isArray(i)?[]:{},eb(i,t[r],s),ev(t[r])&&ey(t,r))}return t}function e_(e,t,n,r){for(let i in n||(n=eb(t,{},r)),e){let s=e[i],a=r&&r[i];!em(s)||Array.isArray(s)&&eg(a)?M(s,t[i])?ey(n,i):n[i]=!0:(k(t)||R(n[i])?n[i]=eb(s,Array.isArray(s)?[]:{},a):e_(s,l(t)?{}:t[i],n[i],a),ev(n[i])&&ey(n,i))}return n}var ex=(e,t)=>{let n=t.split("."),r=[],i=n[0];for(let t=1;t<n.length;i+="."+n[t++])!isNaN(+n[t])&&e.has(i)&&r.push(`${i}.${n[t]}`);return r},ew=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>k(e)?e:t?""===e?NaN:e?+e:e:n&&D(e)?new Date(e):r?r(e):e;function ek(e){let t=e.ref;return s(t)?t.files:K(t)?ee(e.refs).value:ed(t)?[...t.selectedOptions].map(({value:e})=>e):i(t)?Q(e.refs).value:ew(t.value,e)}var eS=(e,t,n,r)=>{let i={};for(let n of e){let e=S(t,n);e&&T(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},eE=e=>k(e)?e:q(e)?e.source:u(e)?q(e.value)?e.value.source:e.value:e;let eO="AsyncFunction";var eT=e=>{if(!e||!e.validate)return!1;if(O(e.validate))return e.validate.constructor.name===eO;if(u(e.validate)){for(let t in e.validate)if(e.validate[t].constructor.name===eO)return!0}return!1},eC=e=>e.mount&&(e.required||!k(e.required)&&!1!==e.required||!k(e.min)||!k(e.max)||!k(e.maxLength)||!k(e.minLength)||e.pattern||e.validate);function eA(e,t,n){let r=S(e,n);if((null==r?void 0:r.type)||(null==r?void 0:r.message)||Array.isArray(r))return{error:r,name:n};let i=n.split(".");for(;i.length;){let r=i.join("."),s=S(t,r),a=S(e,r);if(s&&!Array.isArray(s)&&n!==r)break;
1if(a&&a.type)return{name:r,error:a};if(a&&a.root&&a.root.type)return{name:`${r}.root`,error:a.root};i.pop()}return{name:n}}var eF=(e,t,n,r)=>{n(e);let i=Object.keys(e).filter(e=>"name"!==e);return!i.length||r&&i.length>=Object.keys(t).length||i.find(e=>t[e]===(!r||v.all))},eL=(e,t,n)=>!e||!t||e===t||ei(e).some(e=>e&&(n?e===t||e.startsWith(t+"."):e.startsWith(t)||t.startsWith(e))),eN=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?!r.isOnChange:!i.isOnChange)||e),eR=(e,t)=>{let n=S(e,t);es(n).length||(null==n?void 0:n.root)||ea(e,t)};let eI={mode:v.onSubmit,reValidateMode:v.onChange,shouldFocusError:!0},eM="form",eP=(e,t)=>{for(let n in e)n in t||delete e[n];Object.assign(e,t)},eD={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function ej(e={}){let t=r.useRef(void 0),n=r.useRef(void 0),o=r.useRef(e.formControl),[c,_]=r.useState(()=>({...m(eD),isLoading:O(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:O(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&o.current!==e.formControl){if(o.current=e.formControl,e.formControl)t.current={...e.formControl,formState:c},e.defaultValues&&!O(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...r}=function(e={}){let t={...eI,...e},n={...m(eD),isLoading:O(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},o=(u(t.defaultValues)||u(t.values))&&m(t.defaultValues||t.values)||{},c=t.shouldUnregister?{}:m(o),_={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},x={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},C={},A={},F=0,L=$(t.mode),N=$(t.reValidateMode),R={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},I={...R},P={...I},V=(...e)=>e.some(e=>I[e]||P[e]),z={array:el(),state:el()},K=0,q=0,G=t.criteriaMode===v.all,Y=(e,t)=>n=>{clearTimeout(A[e]),A[e]=setTimeout(t,n)},J=e=>{clearTimeout(A[e]),delete A[e],delete C[e]},Q=e=>{J(e);let t=`${e}.`;for(let e of Object.keys(C))e.startsWith(t)&&J(e)},X=async e=>{if(!_.keepIsValid&&!t.disabled&&(V("isValid")||e)){let e;let i=++K;t.resolver?(e=B((await ey()).errors),i===K&&ee()):e=await ej({fields:r,onlyCheckValid:!0,eventType:g.VALID}),i===K&&e!==n.isValid&&z.state.next({isValid:e})}},ee=(e,r)=>{!t.disabled&&V("isValidating","validatingFields")&&((e||x.mount).forEach(e=>{e&&(r?T(n.validatingFields,e,r):ea(n.validatingFields,e))}),z.state.next({validatingFields:n.validatingFields,isValidating:!B(n.validatingFields)}))},et=()=>{n.dirtyFields=e_(o,c,void 0,r)},en=(e,t)=>{T(n.errors,e,t),n.errors={...n.errors},z.state.next({errors:n.errors})},eo=e=>{let t=w(e)?[e]:f(e),n=c,r=o;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=l(n)?n:n[i],r=l(r)?r:r[i],null===n&&null!==r)return!0}return!1},ep=e=>{if(!_.actionArrayLengths.size)return!1;let t=w(e)?[e]:f(e),n=c,r="",i=-1,s=0;for(let e=0;e<t.length&&!l(n);e++){let a=t[e];if(r=r?`${r}.${a}`:a,Array.isArray(n)&&+a>=n.length)return -1!==i&&(e!==i||+a<s);if(_.actionArrayLengths.has(r)&&(i=e+1,s=_.actionArrayLengths.get(r)),k(n=n[a])&&-1!==i&&e>i&&+t[i]<s)return!0}return!1},em=(t,i,s,a)=>{let l=S(r,t);if(l){if(eo(t)||ep(t))return;let r=k(S(c,t)),u=S(c,t,k(s)?S(o,t):s);k(u)||a&&a.defaultChecked||i?T(c,t,i?u:ek(l._f)):e$(t,u),_.mount&&!_.action&&(X(),r&&n.isDirty&&V("isDirty")&&!eV()&&(n.isDirty=!1,z.state.next({...n})),e.shouldUnregister&&r&&!k(S(c,t))&&Z(t,x)&&(_.watch=!0))}},eg=(e,i,s,a,l)=>{let u=!1,d=!1,f={name:e};if(!t.disabled||!0===a){if(!s||a){let t=M(S(o,e),i);V("isDirty")&&(d=n.isDirty,n.isDirty=f.isDirty=!t||eV(),u=d!==f.isDirty),d=!!S(n.dirtyFields,e),t!==n.isDirty?eP(n.dirtyFields,e_(o,c,void 0,r)):t?ea(n.dirtyFields,e):T(n.dirtyFields,e,!0),f.dirtyFields=n.dirtyFields,u=u||V("dirtyFields")&&!t!==d}if(s){let t=S(n.touchedFields,e);t||(T(n.touchedFields,e,s),f.touchedFields=n.touchedFields,u=u||V("touchedFields")&&t!==s)}u&&l&&z.state.next(f)}return u?f:{}},ev=(e,r,i,s)=>{let a=S(n.errors,e),l=V("isValid")&&E(r)&&n.isValid!==r;if(t.delayError&&i?(C[e]=Y(e,()=>en(e,i)),C[e](t.delayError)):(J(e),i?T(n.errors,e,i):ea(n.errors,e),n.errors={...n.errors}),(i?!M(a,i):a)||!B(s)||l){let t={...s,...l&&E(r)?{isValid:r}:{},errors:n.errors,name:e};z.state.next(t)}},ey=async e=>(ee(e,!0),await t.resolver(c,t.context,eS(e||x.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),eb=async e=>{let t=q,{errors:i}=await ey(e);if(t!==q)return i;if(ee(e),e){for(let t of e){let e=S(i,t);J(t);let s=x.array.has(t)&&u(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e))),a=S(r,t),l=u(a)&&Object.keys(a).some(e=>"_f"!==e);s?U(n.errors,{[t]:e},t):(null==e?void 0:e.type)||(null==e?void 0:e.message)||Array.isArray(e)||u(e)&&l?T(n.errors,t,e):ea(n.errors,t)}n.errors={...n.errors}}
1else Object.keys(C).forEach(J),n.errors=i;return i},eO=async({name:t,eventType:r})=>{if(e.validate){let i=await e.validate({formValues:c,formState:n,name:t,eventType:r});if(u(i))for(let e in i){let t=i[e];t&&eY(`${eM}.${e}`,{message:D(t.message)?t.message:"",type:t.type||y.validate})}else D(i)||!i?eY(eM,{message:i||"",type:y.validate}):eG(eM);return i}return!0},ej=async({fields:r,onlyCheckValid:i,name:s,eventType:a,context:l={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(l.runRootValidation=!0,!await eO({name:s,eventType:a})&&(l.valid=!1,i)))return l.valid;for(let s in r){let o=r[s];if(o){let{_f:r,...u}=o;if(r){let s=x.array.has(r.name),a=o._f&&eT(o._f),u=V("isValidating","validatingFields");a&&u&&ee([r.name],!0);let d=await er(o,x.disabled,c,G,t.shouldUseNativeValidation&&!i,s);if(a&&u&&ee([r.name]),d[r.name]&&(l.valid=!1,i)||(i||(J(r.name),S(d,r.name)?s?U(n.errors,d,r.name):T(n.errors,r.name,d[r.name]):ea(n.errors,r.name)),e.shouldUseNativeValidation&&d[r.name]))break}B(u)||await ej({context:l,onlyCheckValid:i,fields:u,name:s,eventType:a})}}return l.valid},eV=(e,t)=>(e&&t&&T(c,e,t),!M(_.mount?c:o,o)),ez=(e,t,n)=>j(e,x,{..._.mount?c:k(t)||D(e)?o:t},n,t),e$=(e,t,n={},a=!1,o=!1,u=!1)=>{let d=S(r,e),f=t;if(d){let n=d._f;!n||(n.disabled||T(c,e,ew(t,n)),f=H(n.ref)&&l(t)?"":t,ed(n.ref)?[...n.ref.options].forEach(e=>e.selected=f.includes(e.value)):n.refs?i(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(f)?e.checked=!!f.find(t=>t===e.value):e.checked=f===e.value||!!f)}):n.refs.forEach(e=>e.checked=e.value===f):s(n.ref)?n.ref.value="":(n.ref.value=f,n.ref.type||o||u||z.state.next({name:e,values:a?c:m(c)})))}(n.shouldDirty||n.shouldTouch)&&eg(e,d&&d._f&&!d._f.disabled&&(d._f.valueAsNumber||d._f.valueAsDate||d._f.setValueAs)?ew(t,d._f):f,n.shouldTouch,n.shouldDirty,!o),n.shouldValidate&&eK(e,{delayError:n.delayError})},eZ=(e,t,n,i=!1,s=!1,l=!1)=>{for(let o in x.array.has(e)&&z.array.next({name:e,values:i?c:m(c)}),t){if(!t.hasOwnProperty(o))continue;let d=t[o],c=e+"."+o,f=S(r,c);(x.array.has(e)||u(d)||f&&!f._f)&&!a(d)?eZ(c,d,n,i,s,l):e$(c,d,n,i,s,l)}},eW=(e,t,i,s,a=!1)=>{let o=S(r,e),u=x.array.has(e),d=s?t:m(t),f=M(S(c,e),d);if(f||T(c,e,d),u)z.array.next({name:e,values:s?c:m(c)}),V("isDirty","dirtyFields")&&i.shouldDirty&&(et(),a||z.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:eV(e,d)}));else{let t=Array.isArray(d)&&!d.length||B(d),n=!f&&!a;!o||o._f||l(d)||t?e$(e,d,i,s,a,n):eZ(e,d,i,s,a,n)}if(!f&&!a){let t=Z(e,x),r=s?c:m(c);if(z.state.next({...t&&n,name:_.mount||t?e:void 0,values:r}),!u)for(let t of ex(x.array,e))z.state.next({name:t,values:r})}},eU=(e,t,n={})=>eW(e,t,n,!1),eB=async i=>{_.mount=!0;let s=i.target,l=s.name,o=!0,u=S(r,l),f=e=>{o=Number.isNaN(e)||a(e)&&isNaN(e.getTime())||M(e,S(c,l,e))};if(u){let a,h;let p=s.type?ek(u._f):d(i),v=i.type===g.BLUR||i.type===g.FOCUS_OUT,y=!eC(u._f)&&!e.validate&&!t.resolver&&!S(n.errors,l)&&!u._f.deps,b=y||eN(v,S(n.touchedFields,l),n.isSubmitted,N,L),_=Z(l,x,v);if(T(c,l,m(p)),v){if(!s||!s.readOnly){u._f.onBlur&&u._f.onBlur(i);let e=C[l];e&&e(0)}}else u._f.onChange&&u._f.onChange(i);let w=eg(l,p,v),k=!B(w)||_;if(v||z.state.next({name:l,type:i.type,...F?{values:m(c)}:{}}),b)return(!y||!n.isValid)&&V("isValid")&&("onBlur"===t.mode?v&&X():v||X()),k&&z.state.next({name:l,..._?{}:w});if(!t.resolver&&e.validate&&await eO({name:l,eventType:i.type}),!v&&_&&z.state.next({...n}),t.resolver){let{errors:e}=await ey([l]);if(ee([l]),f(p),!o){B(w)||z.state.next(w);return}let t=eA(n.errors,r,l),i=eA(e,r,t.name||l);a=i.error,l=i.name,h=B(e)}else ee([l],!0),a=(await er(u,x.disabled,c,G,t.shouldUseNativeValidation))[l],ee([l]),f(p),o&&(a?h=!1:V("isValid")&&(h=await ej({fields:r,onlyCheckValid:!0,name:l,eventType:i.type})));o&&(u._f.deps&&(!Array.isArray(u._f.deps)||u._f.deps.length>0)&&eK(u._f.deps),ev(l,h,a,w))}},eH=(e,t)=>{if(S(n.errors,t)&&e.focus)return e.focus(),1},eK=async(e,i={})=>{let s,a;let l=ei(e);if(t.resolver){let t=q,n=await eb(k(e)?e:l);if(s=B(n),a=e?!l.some(e=>S(n,e)):s,t!==q)return a}else e?((a=(await Promise.all(l.map(async e=>{let t=S(r,e);return await ej({fields:t&&t._f?{[e]:t}:t,eventType:g.TRIGGER})}))).every(Boolean))||n.isValid)&&X():a=s=await ej({fields:r,name:e,eventType:g.TRIGGER});if(i.delayError&&t.delayError&&D(e)){let r=S(n.errors,e);r?(ea(n.errors,e),C[e]=Y(e,()=>en(e,r)),C[e](t.delayError)):J(e)}if(i.shouldTouch)for(let t of e?l:x.mount)x.array.has(t)||T(n.touchedFields,t,!0);return z.state.next({...!D(e)||V("isValid")&&s!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:s}:{},...i.shouldTouch&&V("touchedFields")?{touchedFields:n.touchedFields}:{},errors:n.errors}),i.shouldFocus&&!a&&W(r,eH,e?l:x.mount),a},eq=(e,t)=>
1{let r=t||n,i=S(r.errors,e);return{invalid:!!i,isDirty:!!S(r.dirtyFields,e),error:i,isValidating:!!S(r.validatingFields,e),isTouched:!!S(r.touchedFields,e)}},eG=e=>{let t=e?ei(e):void 0;t?t.forEach(e=>{Q(e),ea(n.errors,e),z.state.next({name:e,errors:n.errors})}):(Object.keys(C).forEach(J),n.errors={},z.state.next({errors:n.errors}))},eY=(e,t,i)=>{J(e);let s=(S(r,e,{_f:{}})._f||{}).ref,{ref:a,message:l,type:o,types:u,...d}=S(n.errors,e)||{};T(n.errors,e,{...d,...t,ref:s}),z.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&s&&s.focus&&s.focus()},eJ=e=>{var t;let r=!!(null===(t=e.formState)||void 0===t?void 0:t.values);r&&F++;let{unsubscribe:i}=z.state.subscribe({next:t=>{if(eL(e.name,t.name,e.exact)&&eF(t,e.formState||I,e5,e.reRenderRoot)){let r={...c};e.callback({values:r,...n,...t,defaultValues:o})}}});if(!r)return i;let s=!1;return()=>{s||(s=!0,F--,i())}},eQ=(e,i={})=>{for(let s of e?ei(e):x.mount)x.mount.delete(s),x.array.delete(s),x.disabled.delete(s),i.keepValue||(ea(r,s),ea(c,s)),i.keepError||(Q(s),ea(n.errors,s)),i.keepDirty||ea(n.dirtyFields,s),i.keepTouched||ea(n.touchedFields,s),i.keepIsValidating||ea(n.validatingFields,s),t.shouldUnregister||i.keepDefaultValue||ea(o,s);F&&z.state.next({values:m(c)}),z.state.next({...n,...i.keepDirty?{}:{isDirty:eV()},...i.keepIsValidating?{}:{isValidating:!B(n.validatingFields)}}),i.keepIsValid||X()},eX=({disabled:e,name:t})=>{if(E(e)&&_.mount||e||x.disabled.has(t)){let n=x.disabled.has(t),r=!!e;e?x.disabled.add(t):x.disabled.delete(t),n!==r&&_.mount&&!_.action&&X()}},e0=(e,n={})=>{let i=S(r,e),s=E(n.disabled)||E(t.disabled),a=!x.registerName.has(e)&&i&&i._f&&!i._f.mount;return T(r,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...n}}),x.mount.add(e),i&&!a?eX({disabled:E(n.disabled)?n.disabled:t.disabled,name:e}):em(e,!0,n.value),{...s?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:eE(n.min),max:eE(n.max),minLength:eE(n.minLength),maxLength:eE(n.maxLength),pattern:eE(n.pattern)}:{},name:e,onChange:eB,onBlur:eB,ref:s=>{if(s){x.registerName.add(e),e0(e,n),x.registerName.delete(e),i=S(r,e);let t=k(s.value)&&s.querySelectorAll&&s.querySelectorAll("input,select,textarea")[0]||s,a=ec(t),l=i._f.refs||[];if(a?l.find(e=>e===t):t===i._f.ref)return;let u={...i._f};a?(u.refs=[...l.filter(ef),t,...Array.isArray(S(o,e))?[{}]:[]],u.ref={type:t.type,name:e}):(u.ref=t,delete u.refs),T(r,e,{_f:u}),em(e,!1,void 0,t)}else(i=S(r,e,{}))._f&&(i._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(h(x.array,e)&&_.action)&&x.unMount.add(e)}}},e1=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&W(r,eH,x.mount),e2=(e,i)=>async s=>{let a,l;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let o=m(c);if(z.state.next({isSubmitting:!0}),t.resolver){let e=q,{errors:t,values:r}=await ey();if(e!==q)return;ee(),Object.keys(C).forEach(J),n.errors=t,o=m(r)}else await ej({fields:r,eventType:g.SUBMIT}),ea(n.errors,b);if(x.disabled.size)for(let e of x.disabled)ea(o,e);if(B(n.errors)){z.state.next({errors:{}});try{a=await e(o,s)}catch(e){l=e}}else i&&await i({...n.errors},s),e1(),setTimeout(e1);if(z.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(n.errors)&&!l,submitCount:n.submitCount+1,errors:n.errors}),l)throw l;return a},e4=(e,i={})=>{q++;let s=e?m(e):o,a=m(s),l=B(e),u=r;if(Object.keys(C).forEach(J),i.keepDefaultValues||(o=s),!i.keepValues){if(i.keepDirtyValues)for(let e of new Set([...x.mount,...function e(t,n,r="",i=[]){for(let s in t){let a=r?`${r}.${s}`:s,l=t[s];eh(l)&&eh(S(n,a))?e(l,n,a,i):i.push(a)}return i}(e_(o,c,void 0,u),n.dirtyFields)])){let t=S(n.dirtyFields,e),r=S(c,e),i=S(a,e);t&&!k(r)?T(a,e,r):t||k(i)||eU(e,i)}else{if(p&&k(e))for(let e of x.mount){let t=S(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(H(e)){let t=e.closest("form");if(t){t.reset();break}}}}if(i.keepFieldsRef)for(let e of x.mount)eU(e,S(a,e));else r={}}if(t.shouldUnregister){if(c=i.keepDefaultValues?m(o):{},i.keepFieldsRef)for(let e of x.mount)T(c,e,S(a,e))}else c=m(a);z.array.next({values:{...a}}),z.state.next({name:void 0,type:void 0,values:{...a}})}x={mount:i.keepDirtyValues?x.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},_.mount=!I.isValid||!!i.keepIsValid||!!i.keepDirtyValues||!t.shouldUnregister&&!B(a),_.watch=!!t.shouldUnregister,_.keepIsValid=!!i.keepIsValid,_.action=!1,_.actionArrayLengths.clear(),i.keepErrors||(n.errors={}),z.state.next({submitCount:i.keepSubmitCount?n.submitCount:0,isDirty:!l&&(i.keepDirty?n.isDirty:i.keepValues?eV():!!(i.keepDefaultValues&&!M(e,o))),isSubmitted:!!i.keepIsSubmitted&&n.isSubmitted,dirtyFields:l?{}:i.keepDirtyValues?i.keepDefaultValues&&c?e_(o,c,void 0,u):n.dirtyFields:i.keepDefaultValues&&e?e_(o,e,void 0,u):i.keepDirty?n.dirtyFields:i.keepValues?e_(o,c,void 0,u):{},touchedFields:i.keepTouched?n.touchedFields:{},...i.keepIsValidating||!n.isValidating&&B(n.validatingFields)?null:{validatingFields:{},isValidating:!1},errors:i.keepErrors?n.errors:{},isSubmitSuccessful:!!i.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1,defaultValues:o})},e9=(e,n)=>e4(O(e)?e(c):e,{...t.resetOptions,...n}),e5=e=>{let{name:t,type:r,values:i,...s}=e;n={...n,...s}};z.state.subscribe({next:e5});let e3={control:{register:e0,unregister:eQ,getFieldState:eq,handleSubmit:e2,setError:eY,_subscribe:eJ,_runSchema:ey,_updateIsValidating:ee,_focusError:e1,_getWatch:ez,_getDirty:eV,_setValid:X,_setFieldArray:(e,i=[],s,a,l=!0,o=!0)=>
1{if(a&&s&&!t.disabled){_.action=!0;let t=S(r,e);if(_.actionArrayLengths.has(e)||_.actionArrayLengths.set(e,Array.isArray(t)?t.length:0),o&&Array.isArray(t)){let n=s(t,a.argA,a.argB);l&&T(r,e,n)}let u=S(n.errors,e);if(o&&Array.isArray(u)){let t=u.root,r=s(u,a.argA,a.argB)||u;t&&(r.root=t),l&&T(n.errors,e,r),eR(n.errors,e)}let d=S(n.touchedFields,e);if(V("touchedFields")&&o&&Array.isArray(d)){let t=s(d,a.argA,a.argB);l&&T(n.touchedFields,e,t)}V("dirtyFields")&&et(),z.state.next({name:e,isDirty:eV(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else T(c,e,i)},_setDisabledField:eX,_setErrors:e=>{Object.keys(C).forEach(J),n.errors=e,z.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>es(S(_.mount?c:o,e,t.shouldUnregister?S(o,e,[]):[])),_reset:e4,_resetDefaultValues:()=>O(t.defaultValues)&&t.defaultValues().then(e=>{e9(e,t.resetOptions),z.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(let e of x.unMount){let t=S(r,e);t&&(t._f.refs?t._f.refs.every(e=>!ef(e)):!ef(t._f.ref))&&eQ(e)}x.unMount=new Set},_disableForm:e=>{E(e)&&(z.state.next({disabled:e}),W(r,(t,n)=>{let i=S(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0))},_subjects:z,_proxyFormState:I,get _fields(){return r},get _formValues(){return c},get _state(){return _},set _state(value){_=value},get _defaultValues(){return o},get _names(){return x},set _names(value){x=value},get _formState(){return n},get _options(){return t},set _options(value){L=$((t={...t,...value}).mode),N=$(t.reValidateMode),G=t.criteriaMode===v.all}},subscribe:e=>(_.mount=!0,P={...P,...e.formState},eJ({...e,formState:{...R,...e.formState}})),trigger:eK,register:e0,handleSubmit:e2,watch:(e,t)=>{if(O(e)){F++;let{unsubscribe:n}=z.state.subscribe({next:n=>"values"in n&&e(n.values||ez(void 0,t),n)}),r=!1;return{unsubscribe:()=>{r||(r=!0,F--,n())}}}return ez(e,t,!0)},setValue:eU,setValues:(e,t={})=>{let r=O(e)?e(c):e;if(!M(c,r)){for(let e of(c={...c,...r},x.mount))eu(r,e)&&eW(e,S(r,e),t,!0,!0);z.state.next({...n,name:void 0,type:void 0,...F?{values:c}:{}}),t.shouldValidate&&X()}},getValues:(e,t)=>{let r={..._.mount?c:o};return t&&(r=function e(t,n){let r={};for(let i in t)if(t.hasOwnProperty(i)){let s=t[i],a=n[i];if(s&&u(s)&&a){let t=e(s,a);u(t)&&(r[i]=t)}else t[i]&&(r[i]=a)}return r}(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),k(e)?r:D(e)?S(r,e):e.map(e=>S(r,e))},getErrors:e=>k(e)?{...n.errors}:D(e)?S(n.errors,e):e.map(e=>S(n.errors,e)),reset:e9,resetField:(e,t={})=>{S(r,e)&&(ea(n.validatingFields,e),k(t.defaultValue)?eU(e,m(S(o,e))):(eU(e,t.defaultValue),T(o,e,m(t.defaultValue))),t.keepTouched||ea(n.touchedFields,e),t.keepDirty||(ea(n.dirtyFields,e),n.isDirty=t.defaultValue?eV(e,m(S(o,e))):eV()),t.keepError||(J(e),ea(n.errors,e),X()),z.state.next({...n,isValidating:!B(n.validatingFields)}))},resetDefaultValues:(e,t={})=>{if(o=m(e),!t.keepDirty){let e=e_(o,c,void 0,r);n.dirtyFields=e,n.isDirty=!B(e)}t.keepIsValid||X(),z.state.next({...n,defaultValues:o})},clearErrors:eG,unregister:eQ,setError:eY,setFocus:(e,t={})=>{let n=S(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&O(e.select)&&e.select()})}},getFieldState:eq};return{...e3,formControl:e3}}(e);t.current={...r,formState:c}}}let x=t.current.control;x._options=e;let C=()=>({...x._formState,defaultValues:x._defaultValues}),{resyncIfNeeded:A,snapshot:N}=P(C);return L(()=>{A(!0,C,_);let e=x._subscribe({formState:x._proxyFormState,callback:()=>_({...x._formState,defaultValues:x._defaultValues}),reRenderRoot:!0});return _(e=>({...e,isReady:!0})),x._formState.isReady=!0,()=>{e(),N(!0,C)}},[x,A,N]),r.useEffect(()=>x._disableForm(e.disabled),[x,e.disabled]),r.useEffect(()=>{e.mode&&(x._options.mode=e.mode),e.reValidateMode&&(x._options.reValidateMode=e.reValidateMode)},[x,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(x._setErrors(e.errors),x._focusError())},[x,e.errors]),r.useEffect(()=>{e.shouldUnregister&&x._subjects.state.next({values:x._getWatch()})},[x,e.shouldUnregister]),r.useEffect(()=>{if(x._proxyFormState.isDirty){let e=x._getDirty();e!==c.isDirty&&x._subjects.state.next({isDirty:e})}},[x,c.isDirty]),r.useEffect(()=>{var t;e.values&&!M(e.values,n.current)?(x._reset(e.values,{keepFieldsRef:!0,...x._options.resetOptions}),(null===(t=x._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||x._setValid(),n.current=e.values,_(e=>({...e}))):x._resetDefaultValues()},[x,e.values]),r.useEffect(()=>{x._state.mount||(x._setValid(),x._state.mount=!0),x._state.watch&&(x._state.watch=!1,x._subjects.state.next({...x._formState})),x._removeUnmounted()}),t.current.formState=r.useMemo(()=>F(c,x),[x,c]),t.current}},91351:function(e,t,n){let r;n.d(t,{Yj:function(){return eA},IX:function(){return eN},O7:function(){return eC},oQ:function(){return ej},Km:function(){return eD},ZI:function(){return eM},i0:function(){return eP},Rx:function(){return eT},Ry:function(){return eR},Z_:function(){return eO},G0:function(){return eI},_4:function(){return eF},Hc:function(){return eL}});var i,s,a,l,o=n(29133),u=n(82555),d=(e,t)=>{let n;switch(e.code){case o.NL.invalid_type:n=e.received===u.$k.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.NL.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,u.D5.jsonStringifyReplacer)}`;break;case o.NL.unrecognized_keys:n=`Unrecognized key(s) in object: ${u.D5.joinValues(e.keys,", ")}`;break;case o.NL.invalid_union:n="Invalid input";break;case o.NL.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${u.D5.joinValues(e.options)}`;break;case o.NL.invalid_enum_value:n=`Invalid enum value. Expected ${u.D5.joinValues(e.options)}, received '${e.received}'`;break;case o.NL.invalid_arguments:n="Invalid function arguments";break;case o.NL.invalid_return_type:n="Invalid function return type";break;case o.NL.invalid_date:n="Invalid date";break;case o.NL.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:u.D5.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.NL.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.NL.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.NL.custom:n="Invalid input";break;case o.NL.invalid_intersection_types:n="Intersection results could not be merged";break;case o.NL.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case o.NL.not_finite:n="Number must be finite";break;default:n=t.defaultError,u.D5.assertNever(e)}return{message:n}};(i=a||(a={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},i.toString=e=>"string"==typeof e?e:e?.message;
1let c=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],a={...i,path:s};if(void 0!==i.message)return{...i,path:s,message:i.message};let l="";for(let e of r.filter(e=>!!e).slice().reverse())l=e(a,{data:t,defaultError:l}).message;return{...i,path:s,message:l}};function f(e,t){let n=c({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,d,d==d?void 0:d].filter(e=>!!e)});e.common.issues.push(n)}class h{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return p;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return h.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return p;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let p=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),g=e=>({status:"valid",value:e}),v=e=>"aborted"===e.status,y=e=>"dirty"===e.status,b=e=>"valid"===e.status,_=e=>"undefined"!=typeof Promise&&e instanceof Promise;class x{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}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}}let w=(e,t)=>{if(b(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new o.jm(e.common.issues);return this._error=t,this._error}}};function k(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:s}=e;return"invalid_enum_value"===t.code?{message:s??i.defaultError}:void 0===i.data?{message:s??r??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:s??n??i.defaultError}},description:i}}class S{get description(){return this._def.description}_getType(e){return(0,u.FQ)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,u.FQ)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new h,ctx:{common:e.parent.common,data:e.data,parsedType:(0,u.FQ)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(_(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.FQ)(e)},r=this._parseSync({data:e,path:n.path,parent:n});return w(n,r)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.FQ)(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:t});return b(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>b(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.FQ)(e)},r=this._parse({data:e,path:n.path,parent:n});return w(n,await (_(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),s=()=>r.addIssue({code:o.NL.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(s(),!1)):!!i||(s(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new ev({schema:this,typeName:l.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:e=>this["~validate"](e)}}optional(){return ey.create(this,this._def)}nullable(){return eb.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ee.create(this)}promise(){return eg.create(this,this._def)}or(e){return en.create([this,e],this._def)}and(e){return es.create(this,e,this._def)}transform(e){return new ev({...k(this._def),schema:this,typeName:l.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new e_({...k(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:l.ZodDefault})}brand(){return new ek({typeName:l.ZodBranded,type:this,...k(this._def)})}catch(e){return new ex({...k(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:l.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eS.create(this,e)}readonly(){return eE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let E=/^c[^\s-]{8,}
1$/i,O=/^[0-9a-z]+$/,T=/^[0-9A-HJKMNP-TV-Z]{26}$/i,C=/^[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,A=/^[a-z0-9_-]{21}$/i,F=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L=/^[-+]?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)?)??$/,N=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R=/^(?:(?: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])$/,I=/^(?:(?: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])$/,M=/^(([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]))$/,P=/^(([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])$/,D=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,j=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,V="((\\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])))",z=RegExp(`^${V}$`);function $(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}class Z extends S{_parse(e){var t,n,i,s;let a;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.$k.string){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.string,received:t.parsedType}),p}let l=new h;for(let d of this._def.checks)if("min"===d.kind)e.data.length<d.value&&(f(a=this._getOrReturnCtx(e,a),{code:o.NL.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),l.dirty());else if("max"===d.kind)e.data.length>d.value&&(f(a=this._getOrReturnCtx(e,a),{code:o.NL.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),l.dirty());else if("length"===d.kind){let t=e.data.length>d.value,n=e.data.length<d.value;(t||n)&&(a=this._getOrReturnCtx(e,a),t?f(a,{code:o.NL.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}):n&&f(a,{code:o.NL.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}),l.dirty())}else if("email"===d.kind)N.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"email",code:o.NL.invalid_string,message:d.message}),l.dirty());else if("emoji"===d.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"emoji",code:o.NL.invalid_string,message:d.message}),l.dirty());else if("uuid"===d.kind)C.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"uuid",code:o.NL.invalid_string,message:d.message}),l.dirty());else if("nanoid"===d.kind)A.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"nanoid",code:o.NL.invalid_string,message:d.message}),l.dirty());else if("cuid"===d.kind)E.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"cuid",code:o.NL.invalid_string,message:d.message}),l.dirty());else if("cuid2"===d.kind)O.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"cuid2",code:o.NL.invalid_string,message:d.message}),l.dirty());else if("ulid"===d.kind)T.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"ulid",code:o.NL.invalid_string,message:d.message}),l.dirty());else if("url"===d.kind)try{new URL(e.data)}catch{f(a=this._getOrReturnCtx(e,a),{validation:"url",code:o.NL.invalid_string,message:d.message}),l.dirty()}else"regex"===d.kind?(d.regex.lastIndex=0,d.regex.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"regex",code:o.NL.invalid_string,message:d.message}),l.dirty())):"trim"===d.kind?e.data=e.data.trim():"includes"===d.kind?e.data.includes(d.value,d.position)||(f(a=this._getOrReturnCtx(e,a),{code:o.NL.invalid_string,validation:{includes:d.value,position:d.position},message:d.message}),l.dirty()):"toLowerCase"===d.kind?e.data=e.data.toLowerCase():"toUpperCase"===d.kind?e.data=e.data.toUpperCase():"startsWith"===d.kind?e.data.startsWith(d.value)||(f(a=this._getOrReturnCtx(e,a),{code:o.NL.invalid_string,validation:{startsWith:d.value},message:d.message}),l.dirty()):"endsWith"===d.kind?e.data.endsWith(d.value)||(f(a=this._getOrReturnCtx(e,a),{code:o.NL.invalid_string,validation:{endsWith:d.value},message:d.message}),l.dirty()):"datetime"===d.kind?(function(e){let t=`${V}T${$(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)})(d).test(e.data)||(f(a=this._getOrReturnCtx(e,a),{code:o.NL.invalid_string,validation:"datetime",message:d.message}),l.dirty()):"date"===d.kind?z.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{code:o.NL.invalid_string,validation:"date",message:d.message}),l.dirty()):"time"===d.kind?RegExp(`^${$(d)}$`).test(e.data)||(f(a=this._getOrReturnCtx(e,a),{code:o.NL.invalid_string,validation:"time",message:d.message}),l.dirty()):"duration"===d.kind?L.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"duration",code:o.NL.invalid_string,message:d.message}),l.dirty()):"ip"===d.kind?(t=e.data,("v4"===(n=d.version)||!n)&&R.test(t)||("v6"===n||!n)&&M.test(t)||(f(a=this._getOrReturnCtx(e,a),{validation:"ip",code:o.NL.invalid_string,message:d.message}),l.dirty())):"jwt"===d.kind?!function(e,t){if(!F.test(e))return!1;
1try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,d.alg)&&(f(a=this._getOrReturnCtx(e,a),{validation:"jwt",code:o.NL.invalid_string,message:d.message}),l.dirty()):"cidr"===d.kind?(i=e.data,("v4"===(s=d.version)||!s)&&I.test(i)||("v6"===s||!s)&&P.test(i)||(f(a=this._getOrReturnCtx(e,a),{validation:"cidr",code:o.NL.invalid_string,message:d.message}),l.dirty())):"base64"===d.kind?D.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"base64",code:o.NL.invalid_string,message:d.message}),l.dirty()):"base64url"===d.kind?j.test(e.data)||(f(a=this._getOrReturnCtx(e,a),{validation:"base64url",code:o.NL.invalid_string,message:d.message}),l.dirty()):u.D5.assertNever(d);return{status:l.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:o.NL.invalid_string,...a.errToObj(n)})}_addCheck(e){return new Z({...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"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?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"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...a.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...a.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...a.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...a.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...a.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...a.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...a.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...a.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...a.errToObj(t)})}nonempty(e){return this.min(1,a.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Z.create=e=>new Z({checks:[],typeName:l.ZodString,coerce:e?.coerce??!1,...k(e)});class W extends S{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.$k.number){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.number,received:t.parsedType}),p}let n=new h;for(let r of this._def.checks)"int"===r.kind?u.D5.isInteger(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:o.NL.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:o.NL.not_finite,message:r.message}),n.dirty()):u.D5.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,a.toString(t))}gt(e,t){return this.setLimit("min",e,!1,a.toString(t))}lte(e,t){return this.setLimit("max",e,!0,a.toString(t))}lt(e,t){return this.setLimit("max",e,!1,a.toString(t))}setLimit(e,t,n,r){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:a.toString(r)}]})}_addCheck(e){return new W({...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,t){return this._addCheck({kind:"multipleOf",value:e,message:a.toString(t)})}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(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&u.D5.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}W.create=e=>new W({checks:[],typeName:l.ZodNumber,coerce:e?.coerce||!1,...k(e)});class U extends S{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.$k.bigint)return this._getInvalidInput(e);let n=new h;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):u.D5.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,a.toString(t))}gt(e,t){return this.setLimit("min",e,!1,a.toString(t))}lte(e,t){return this.setLimit("max",e,!0,a.toString(t))}lt(e,t){return this.setLimit("max",e,!1,a.toString(t))}setLimit(e,t,n,r){return new U({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:a.toString(r)}]})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}
1positive(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,t){return this._addCheck({kind:"multipleOf",value:e,message:a.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}U.create=e=>new U({checks:[],typeName:l.ZodBigInt,coerce:e?.coerce??!1,...k(e)});class B extends S{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.$k.boolean){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.boolean,received:t.parsedType}),p}return g(e.data)}}B.create=e=>new B({typeName:l.ZodBoolean,coerce:e?.coerce||!1,...k(e)});class H extends S{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.$k.date){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.date,received:t.parsedType}),p}if(Number.isNaN(e.data.getTime()))return f(this._getOrReturnCtx(e),{code:o.NL.invalid_date}),p;let n=new h;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(f(t=this._getOrReturnCtx(e,t),{code:o.NL.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):u.D5.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:a.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:a.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}H.create=e=>new H({checks:[],coerce:e?.coerce||!1,typeName:l.ZodDate,...k(e)});class K extends S{_parse(e){if(this._getType(e)!==u.$k.symbol){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.symbol,received:t.parsedType}),p}return g(e.data)}}K.create=e=>new K({typeName:l.ZodSymbol,...k(e)});class q extends S{_parse(e){if(this._getType(e)!==u.$k.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.undefined,received:t.parsedType}),p}return g(e.data)}}q.create=e=>new q({typeName:l.ZodUndefined,...k(e)});class G extends S{_parse(e){if(this._getType(e)!==u.$k.null){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.null,received:t.parsedType}),p}return g(e.data)}}G.create=e=>new G({typeName:l.ZodNull,...k(e)});class Y extends S{constructor(){super(...arguments),this._any=!0}_parse(e){return g(e.data)}}Y.create=e=>new Y({typeName:l.ZodAny,...k(e)});class J extends S{constructor(){super(...arguments),this._unknown=!0}_parse(e){return g(e.data)}}J.create=e=>new J({typeName:l.ZodUnknown,...k(e)});class Q extends S{_parse(e){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.never,received:t.parsedType}),p}}Q.create=e=>new Q({typeName:l.ZodNever,...k(e)});class X extends S{_parse(e){if(this._getType(e)!==u.$k.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.void,received:t.parsedType}),p}return g(e.data)}}X.create=e=>new X({typeName:l.ZodVoid,...k(e)});class ee extends S{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==u.$k.array)return f(t,{code:o.NL.invalid_type,expected:u.$k.array,received:t.parsedType}),p;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(f(t,{code:e?o.NL.too_big:o.NL.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(f(t,{code:o.NL.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(f(t,{code:o.NL.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new x(t,e,t.path,n)))).then(e=>h.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new x(t,e,t.path,n)));return h.mergeArray(n,i)}
1get element(){return this._def.type}min(e,t){return new ee({...this._def,minLength:{value:e,message:a.toString(t)}})}max(e,t){return new ee({...this._def,maxLength:{value:e,message:a.toString(t)}})}length(e,t){return new ee({...this._def,exactLength:{value:e,message:a.toString(t)}})}nonempty(e){return this.min(1,e)}}ee.create=(e,t)=>new ee({type:e,minLength:null,maxLength:null,exactLength:null,typeName:l.ZodArray,...k(t)});class et extends S{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=u.D5.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.$k.object){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.object,received:t.parsedType}),p}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof Q&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||s.push(e);let a=[];for(let e of i){let t=r[e],i=n.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new x(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Q){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of s)a.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)s.length>0&&(f(n,{code:o.NL.unrecognized_keys,keys:s}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of s){let r=n.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new x(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of a){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>h.mergeObjectSync(t,e)):h.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return a.errToObj,new et({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{let r=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:a.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(e){return new et({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new et({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:l.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new et({...this._def,catchall:e})}pick(e){let t={};for(let n of u.D5.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new et({...this._def,shape:()=>t})}omit(e){let t={};for(let n of u.D5.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new et({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof et){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=ey.create(e(i))}return new et({...t._def,shape:()=>n})}return t instanceof ee?new ee({...t._def,type:e(t.element)}):t instanceof ey?ey.create(e(t.unwrap())):t instanceof eb?eb.create(e(t.unwrap())):t instanceof ea?ea.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};for(let n of u.D5.objectKeys(this.shape)){let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}return new et({...this._def,shape:()=>t})}required(e){let t={};for(let n of u.D5.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ey;)e=e._def.innerType;t[n]=e}return new et({...this._def,shape:()=>t})}keyof(){return eh(u.D5.objectKeys(this.shape))}}et.create=(e,t)=>new et({shape:()=>e,unknownKeys:"strip",catchall:Q.create(),typeName:l.ZodObject,...k(t)}),et.strictCreate=(e,t)=>new et({shape:()=>e,unknownKeys:"strict",catchall:Q.create(),typeName:l.ZodObject,...k(t)}),et.lazycreate=(e,t)=>new et({shape:e,unknownKeys:"strip",catchall:Q.create(),typeName:l.ZodObject,...k(t)});class en extends S{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new o.jm(e.ctx.common.issues));return f(t,{code:o.NL.invalid_union,unionErrors:n}),p});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new o.jm(e));return f(t,{code:o.NL.invalid_union,unionErrors:i}),p}}get options(){return this._def.options}}en.create=(e,t)=>
1new en({options:e,typeName:l.ZodUnion,...k(t)});let er=e=>{if(e instanceof ec)return er(e.schema);if(e instanceof ev)return er(e.innerType());if(e instanceof ef)return[e.value];if(e instanceof ep)return e.options;if(e instanceof em)return u.D5.objectValues(e.enum);if(e instanceof e_)return er(e._def.innerType);if(e instanceof q)return[void 0];else if(e instanceof G)return[null];else if(e instanceof ey)return[void 0,...er(e.unwrap())];else if(e instanceof eb)return[null,...er(e.unwrap())];else if(e instanceof ek)return er(e.unwrap());else if(e instanceof eE)return er(e.unwrap());else if(e instanceof ex)return er(e._def.innerType);else return[]};class ei extends S{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.$k.object)return f(t,{code:o.NL.invalid_type,expected:u.$k.object,received:t.parsedType}),p;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(f(t,{code:o.NL.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=er(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new ei({typeName:l.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...k(n)})}}class es extends S{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(v(e)||v(r))return p;let i=function e(t,n){let r=(0,u.FQ)(t),i=(0,u.FQ)(n);if(t===n)return{valid:!0,data:t};if(r===u.$k.object&&i===u.$k.object){let r=u.D5.objectKeys(n),i=u.D5.objectKeys(t).filter(e=>-1!==r.indexOf(e)),s={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};s[r]=i.data}return{valid:!0,data:s}}if(r===u.$k.array&&i===u.$k.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let s=e(t[i],n[i]);if(!s.valid)return{valid:!1};r.push(s.data)}return{valid:!0,data:r}}return r===u.$k.date&&i===u.$k.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}(e.value,r.value);return i.valid?((y(e)||y(r))&&t.dirty(),{status:t.value,value:i.data}):(f(n,{code:o.NL.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}es.create=(e,t,n)=>new es({left:e,right:t,typeName:l.ZodIntersection,...k(n)});class ea extends S{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.$k.array)return f(n,{code:o.NL.invalid_type,expected:u.$k.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return f(n,{code:o.NL.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(f(n,{code:o.NL.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new x(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>h.mergeArray(t,e)):h.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new ea({...this._def,rest:e})}}ea.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ea({items:e,typeName:l.ZodTuple,rest:null,...k(t)})};class el extends S{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.$k.object)return f(n,{code:o.NL.invalid_type,expected:u.$k.object,received:n.parsedType}),p;let r=[],i=this._def.keyType,s=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new x(n,e,n.path,e)),value:s._parse(new x(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?h.mergeObjectAsync(t,r):h.mergeObjectSync(t,r)}
1get element(){return this._def.valueType}static create(e,t,n){return new el(t instanceof S?{keyType:e,valueType:t,typeName:l.ZodRecord,...k(n)}:{keyType:Z.create(),valueType:e,typeName:l.ZodRecord,...k(t)})}}class eo extends S{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.$k.map)return f(n,{code:o.NL.invalid_type,expected:u.$k.map,received:n.parsedType}),p;let r=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([e,t],s)=>({key:r._parse(new x(n,e,n.path,[s,"key"])),value:i._parse(new x(n,t,n.path,[s,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of s){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return p;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of s){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return p;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}eo.create=(e,t,n)=>new eo({valueType:t,keyType:e,typeName:l.ZodMap,...k(n)});class eu extends S{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.$k.set)return f(n,{code:o.NL.invalid_type,expected:u.$k.set,received:n.parsedType}),p;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(f(n,{code:o.NL.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(f(n,{code:o.NL.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function s(e){let n=new Set;for(let r of e){if("aborted"===r.status)return p;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let a=[...n.data.values()].map((e,t)=>i._parse(new x(n,e,n.path,t)));return n.common.async?Promise.all(a).then(e=>s(e)):s(a)}min(e,t){return new eu({...this._def,minSize:{value:e,message:a.toString(t)}})}max(e,t){return new eu({...this._def,maxSize:{value:e,message:a.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eu.create=(e,t)=>new eu({valueType:e,minSize:null,maxSize:null,typeName:l.ZodSet,...k(t)});class ed extends S{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.$k.function)return f(t,{code:o.NL.invalid_type,expected:u.$k.function,received:t.parsedType}),p;function n(e,n){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d,d].filter(e=>!!e),issueData:{code:o.NL.invalid_arguments,argumentsError:n}})}function r(e,n){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d,d].filter(e=>!!e),issueData:{code:o.NL.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof eg){let e=this;return g(async function(...t){let a=new o.jm([]),l=await e._def.args.parseAsync(t,i).catch(e=>{throw a.addIssue(n(t,e)),a}),u=await Reflect.apply(s,this,l);return await e._def.returns._def.type.parseAsync(u,i).catch(e=>{throw a.addIssue(r(u,e)),a})})}{let e=this;return g(function(...t){let a=e._def.args.safeParse(t,i);if(!a.success)throw new o.jm([n(t,a.error)]);let l=Reflect.apply(s,this,a.data),u=e._def.returns.safeParse(l,i);if(!u.success)throw new o.jm([r(l,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ed({...this._def,args:ea.create(e).rest(J.create())})}returns(e){return new ed({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new ed({args:e||ea.create([]).rest(J.create()),returns:t||J.create(),typeName:l.ZodFunction,...k(n)})}}class ec extends S{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ec.create=(e,t)=>
1new ec({getter:e,typeName:l.ZodLazy,...k(t)});class ef extends S{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return f(t,{received:t.data,code:o.NL.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eh(e,t){return new ep({values:e,typeName:l.ZodEnum,...k(t)})}ef.create=(e,t)=>new ef({value:e,typeName:l.ZodLiteral,...k(t)});class ep extends S{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return f(t,{expected:u.D5.joinValues(n),received:t.parsedType,code:o.NL.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return f(t,{received:t.data,code:o.NL.invalid_enum_value,options:n}),p}return g(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ep.create(e,{...this._def,...t})}exclude(e,t=this._def){return ep.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ep.create=eh;class em extends S{_parse(e){let t=u.D5.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==u.$k.string&&n.parsedType!==u.$k.number){let e=u.D5.objectValues(t);return f(n,{expected:u.D5.joinValues(e),received:n.parsedType,code:o.NL.invalid_type}),p}if(this._cache||(this._cache=new Set(u.D5.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=u.D5.objectValues(t);return f(n,{received:n.data,code:o.NL.invalid_enum_value,options:e}),p}return g(e.data)}get enum(){return this._def.values}}em.create=(e,t)=>new em({values:e,typeName:l.ZodNativeEnum,...k(t)});class eg extends S{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==u.$k.promise&&!1===t.common.async?(f(t,{code:o.NL.invalid_type,expected:u.$k.promise,received:t.parsedType}),p):g((t.parsedType===u.$k.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eg.create=(e,t)=>new eg({type:e,typeName:l.ZodPromise,...k(t)});class ev extends S{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===l.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{f(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return p;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?p:"dirty"===r.status||"dirty"===t.value?m(r.value):r});{if("aborted"===t.value)return p;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?p:"dirty"===r.status||"dirty"===t.value?m(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?p:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?p:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>b(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):p);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!b(e))return p;let s=r.transform(e.value,i);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}}u.D5.assertNever(r)}}
1ev.create=(e,t,n)=>new ev({schema:e,typeName:l.ZodEffects,effect:t,...k(n)}),ev.createWithPreprocess=(e,t,n)=>new ev({schema:t,effect:{type:"preprocess",transform:e},typeName:l.ZodEffects,...k(n)});class ey extends S{_parse(e){return this._getType(e)===u.$k.undefined?g(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ey.create=(e,t)=>new ey({innerType:e,typeName:l.ZodOptional,...k(t)});class eb extends S{_parse(e){return this._getType(e)===u.$k.null?g(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eb.create=(e,t)=>new eb({innerType:e,typeName:l.ZodNullable,...k(t)});class e_ extends S{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===u.$k.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}e_.create=(e,t)=>new e_({innerType:e,typeName:l.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...k(t)});class ex extends S{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return _(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o.jm(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new o.jm(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ex.create=(e,t)=>new ex({innerType:e,typeName:l.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...k(t)});class ew extends S{_parse(e){if(this._getType(e)!==u.$k.nan){let t=this._getOrReturnCtx(e);return f(t,{code:o.NL.invalid_type,expected:u.$k.nan,received:t.parsedType}),p}return{status:"valid",value:e.data}}}ew.create=e=>new ew({typeName:l.ZodNaN,...k(e)}),Symbol("zod_brand");class ek extends S{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class eS extends S{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new eS({in:e,out:t,typeName:l.ZodPipeline})}}class eE extends S{_parse(e){let t=this._def.innerType._parse(e),n=e=>(b(e)&&(e.value=Object.freeze(e.value)),e);return _(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:l.ZodReadonly,...k(t)}),et.lazycreate,(s=l||(l={})).ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly";let eO=Z.create,eT=W.create;ew.create,U.create;let eC=B.create;H.create,K.create,q.create,G.create;let eA=Y.create,eF=J.create;Q.create;let eL=X.create,eN=ee.create,eR=et.create;et.strictCreate;let eI=en.create;ei.create,es.create,ea.create,el.create,eo.create,eu.create;let eM=ed.create;ec.create;let eP=ef.create,eD=ep.create;em.create,eg.create,ev.create,ey.create,eb.create,ev.createWithPreprocess,eS.create;let ej={string:e=>Z.create({...e,coerce:!0}),number:e=>W.create({...e,coerce:!0}),boolean:e=>B.create({...e,coerce:!0}),bigint:e=>U.create({...e,coerce:!0}),date:e=>H.create({...e,coerce:!0})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.