@petnow/ui 1.7.7 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/index.css +2 -2
  2. package/dist/index.d.ts +12 -10
  3. package/dist/index.es.js +8200 -6282
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/index.umd.js +45 -17
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/src/components/mobile/checkbox/Checkbox.d.ts +9 -0
  8. package/dist/src/components/{checkbox → mobile/checkbox}/Checkbox.stories.d.ts +1 -1
  9. package/dist/src/components/mobile/chip/Chip.d.ts +9 -0
  10. package/dist/src/components/mobile/chip/Chip.stories.d.ts +6 -0
  11. package/dist/src/components/{modal/Modal.d.ts → mobile/popup/Popup.d.ts} +8 -2
  12. package/dist/src/components/{modal/Modal.stories.d.ts → mobile/popup/Popup.stories.d.ts} +3 -4
  13. package/dist/src/components/{radio → mobile/radio}/Radio.d.ts +2 -2
  14. package/dist/src/components/mobile/tab/Tab.d.ts +21 -0
  15. package/dist/src/components/mobile/tab/Tab.stories.d.ts +7 -0
  16. package/dist/src/components/mobile/toggle/Toggle.d.ts +10 -0
  17. package/dist/src/components/mobile/toggle/Toggle.stories.d.ts +6 -0
  18. package/dist/src/components/pc/checkbox/LabeledCheckbox.d.ts +8 -0
  19. package/dist/src/components/pc/checkbox/LabeledCheckbox.stories.d.ts +6 -0
  20. package/dist/src/components/pc/input/LabeledInput.d.ts +15 -0
  21. package/dist/src/components/pc/input/LabeledInput.stories.d.ts +6 -0
  22. package/dist/test/LabeledCheckbox.test.d.ts +1 -0
  23. package/dist/test/LabeledInput.test.d.ts +1 -0
  24. package/dist/test/Toggle.test.d.ts +1 -0
  25. package/package.json +5 -2
  26. package/dist/src/components/button/CtaButton.d.ts +0 -8
  27. package/dist/src/components/button/CtaButton.stories.d.ts +0 -8
  28. package/dist/src/components/checkbox/Checkbox.d.ts +0 -8
  29. package/dist/src/components/tab/Tabs.d.ts +0 -10
  30. package/dist/src/components/tab/Tabs.stories.d.ts +0 -8
  31. /package/dist/src/components/{radio → mobile/radio}/Radio.stories.d.ts +0 -0
  32. /package/dist/src/components/{autocomplete → pc/autocomplete}/LabeledAutocomplete.d.ts +0 -0
  33. /package/dist/src/components/{autocomplete → pc/autocomplete}/LabeledAutocomplete.stories.d.ts +0 -0
  34. /package/dist/src/components/{card → pc/card}/AccordionCard.d.ts +0 -0
  35. /package/dist/src/components/{card → pc/card}/AccordionCard.stories.d.ts +0 -0
  36. /package/dist/src/components/{datepicker → pc/datepicker}/LabeledDatepicker.d.ts +0 -0
  37. /package/dist/src/components/{datepicker → pc/datepicker}/LabeledDatepicker.stories.d.ts +0 -0
  38. /package/dist/src/components/{input → pc/input}/LabeledAddressInput.d.ts +0 -0
  39. /package/dist/src/components/{input → pc/input}/LabeledAddressInput.stories.d.ts +0 -0
  40. /package/dist/src/components/{select → pc/select}/LabeledSelect.d.ts +0 -0
  41. /package/dist/src/components/{select → pc/select}/LabeledSelect.stories.d.ts +0 -0
  42. /package/dist/test/{CtaButton.test.d.ts → Chip.test.d.ts} +0 -0
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ke,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],d):(ke=typeof globalThis<"u"?globalThis:ke||self,d(ke["@petnow/ui"]={},ke.React,ke.ReactDOM))})(this,function(ke,d,Se){"use strict";var Mw=Object.defineProperty;var Pw=(ke,d,Se)=>d in ke?Mw(ke,d,{enumerable:!0,configurable:!0,writable:!0,value:Se}):ke[d]=Se;var B=(ke,d,Se)=>Pw(ke,typeof d!="symbol"?d+"":d,Se);function di(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const F=di(d),vr=di(Se);var gr={exports:{}},$n={};/**
1
+ (function(_e,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],d):(_e=typeof globalThis<"u"?globalThis:_e||self,d(_e["@petnow/ui"]={},_e.React,_e.ReactDOM))})(this,function(_e,d,Ne){"use strict";var iE=Object.defineProperty;var sE=(_e,d,Ne)=>d in _e?iE(_e,d,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):_e[d]=Ne;var Z=(_e,d,Ne)=>sE(_e,typeof d!="symbol"?d+"":d,Ne);function fs(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const V=fs(d),Hr=fs(Ne);function pf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Br={exports:{}},tr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var fi;function kc(){if(fi)return $n;fi=1;var n=d,r=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,u){var c,p={},m=null,f=null;u!==void 0&&(m=""+u),l.key!==void 0&&(m=""+l.key),l.ref!==void 0&&(f=l.ref);for(c in l)t.call(l,c)&&!a.hasOwnProperty(c)&&(p[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)p[c]===void 0&&(p[c]=l[c]);return{$$typeof:r,type:s,key:m,ref:f,props:p,_owner:o.current}}return $n.Fragment=e,$n.jsx=i,$n.jsxs=i,$n}var An={};/**
9
+ */var ps;function hf(){if(ps)return tr;ps=1;var n=d,r=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,u){var c,f={},h=null,p=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(p=l.ref);for(c in l)t.call(l,c)&&!a.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:r,type:s,key:h,ref:p,props:f,_owner:o.current}}return tr.Fragment=e,tr.jsx=i,tr.jsxs=i,tr}var nr={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,22 +14,49 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var pi;function Sc(){return pi||(pi=1,process.env.NODE_ENV!=="production"&&function(){var n=d,r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,v="@@iterator";function g(b){if(b===null||typeof b!="object")return null;var I=h&&b[h]||b[v];return typeof I=="function"?I:null}var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(b){{for(var I=arguments.length,R=new Array(I>1?I-1:0),ee=1;ee<I;ee++)R[ee-1]=arguments[ee];x("error",b,R)}}function x(b,I,R){{var ee=w.ReactDebugCurrentFrame,ve=ee.getStackAddendum();ve!==""&&(I+="%s",R=R.concat([ve]));var xe=R.map(function(ue){return String(ue)});xe.unshift("Warning: "+I),Function.prototype.apply.call(console[b],console,xe)}}var E=!1,k=!1,C=!1,S=!1,D=!1,_;_=Symbol.for("react.module.reference");function O(b){return!!(typeof b=="string"||typeof b=="function"||b===t||b===a||D||b===o||b===u||b===c||S||b===f||E||k||C||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===p||b.$$typeof===i||b.$$typeof===s||b.$$typeof===l||b.$$typeof===_||b.getModuleId!==void 0))}function T(b,I,R){var ee=b.displayName;if(ee)return ee;var ve=I.displayName||I.name||"";return ve!==""?R+"("+ve+")":R}function Y(b){return b.displayName||"Context"}function W(b){if(b==null)return null;if(typeof b.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof b=="function")return b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case t:return"Fragment";case e:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof b=="object")switch(b.$$typeof){case s:var I=b;return Y(I)+".Consumer";case i:var R=b;return Y(R._context)+".Provider";case l:return T(b,b.render,"ForwardRef");case p:var ee=b.displayName||null;return ee!==null?ee:W(b.type)||"Memo";case m:{var ve=b,xe=ve._payload,ue=ve._init;try{return W(ue(xe))}catch{return null}}}return null}var N=Object.assign,L=0,$,z,P,q,X,G,Oe;function te(){}te.__reactDisabledLog=!0;function H(){{if(L===0){$=console.log,z=console.info,P=console.warn,q=console.error,X=console.group,G=console.groupCollapsed,Oe=console.groupEnd;var b={configurable:!0,enumerable:!0,value:te,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}L++}}function we(){{if(L--,L===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},b,{value:$}),info:N({},b,{value:z}),warn:N({},b,{value:P}),error:N({},b,{value:q}),group:N({},b,{value:X}),groupCollapsed:N({},b,{value:G}),groupEnd:N({},b,{value:Oe})})}L<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=w.ReactCurrentDispatcher,A;function J(b,I,R){{if(A===void 0)try{throw Error()}catch(ve){var ee=ve.stack.trim().match(/\n( *(at )?)/);A=ee&&ee[1]||""}return`
18
- `+A+b}}var le=!1,oe;{var hr=typeof WeakMap=="function"?WeakMap:Map;oe=new hr}function cn(b,I){if(!b||le)return"";{var R=oe.get(b);if(R!==void 0)return R}var ee;le=!0;var ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xe;xe=Z.current,Z.current=null,H();try{if(I){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(Tt){ee=Tt}Reflect.construct(b,[],ue)}else{try{ue.call()}catch(Tt){ee=Tt}b.call(ue.prototype)}}else{try{throw Error()}catch(Tt){ee=Tt}b()}}catch(Tt){if(Tt&&ee&&typeof Tt.stack=="string"){for(var ae=Tt.stack.split(`
19
- `),ze=ee.stack.split(`
20
- `),Ie=ae.length-1,$e=ze.length-1;Ie>=1&&$e>=0&&ae[Ie]!==ze[$e];)$e--;for(;Ie>=1&&$e>=0;Ie--,$e--)if(ae[Ie]!==ze[$e]){if(Ie!==1||$e!==1)do if(Ie--,$e--,$e<0||ae[Ie]!==ze[$e]){var Ze=`
21
- `+ae[Ie].replace(" at new "," at ");return b.displayName&&Ze.includes("<anonymous>")&&(Ze=Ze.replace("<anonymous>",b.displayName)),typeof b=="function"&&oe.set(b,Ze),Ze}while(Ie>=1&&$e>=0);break}}}finally{le=!1,Z.current=xe,we(),Error.prepareStackTrace=ve}var Ln=b?b.displayName||b.name:"",Dc=Ln?J(Ln):"";return typeof b=="function"&&oe.set(b,Dc),Dc}function sw(b,I,R){return cn(b,!1)}function lw(b){var I=b.prototype;return!!(I&&I.isReactComponent)}function Do(b,I,R){if(b==null)return"";if(typeof b=="function")return cn(b,lw(b));if(typeof b=="string")return J(b);switch(b){case u:return J("Suspense");case c:return J("SuspenseList")}if(typeof b=="object")switch(b.$$typeof){case l:return sw(b.render);case p:return Do(b.type,I,R);case m:{var ee=b,ve=ee._payload,xe=ee._init;try{return Do(xe(ve),I,R)}catch{}}}return""}var Eo=Object.prototype.hasOwnProperty,uc={},cc=w.ReactDebugCurrentFrame;function ko(b){if(b){var I=b._owner,R=Do(b.type,b._source,I?I.type:null);cc.setExtraStackFrame(R)}else cc.setExtraStackFrame(null)}function uw(b,I,R,ee,ve){{var xe=Function.call.bind(Eo);for(var ue in b)if(xe(b,ue)){var ae=void 0;try{if(typeof b[ue]!="function"){var ze=Error((ee||"React class")+": "+R+" type `"+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[ue]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ze.name="Invariant Violation",ze}ae=b[ue](I,ue,ee,R,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ie){ae=Ie}ae&&!(ae instanceof Error)&&(ko(ve),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ee||"React class",R,ue,typeof ae),ko(null)),ae instanceof Error&&!(ae.message in uc)&&(uc[ae.message]=!0,ko(ve),y("Failed %s type: %s",R,ae.message),ko(null))}}}var cw=Array.isArray;function si(b){return cw(b)}function dw(b){{var I=typeof Symbol=="function"&&Symbol.toStringTag,R=I&&b[Symbol.toStringTag]||b.constructor.name||"Object";return R}}function fw(b){try{return dc(b),!1}catch{return!0}}function dc(b){return""+b}function fc(b){if(fw(b))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dw(b)),dc(b)}var pc=w.ReactCurrentOwner,pw={key:!0,ref:!0,__self:!0,__source:!0},mc,hc;function mw(b){if(Eo.call(b,"ref")){var I=Object.getOwnPropertyDescriptor(b,"ref").get;if(I&&I.isReactWarning)return!1}return b.ref!==void 0}function hw(b){if(Eo.call(b,"key")){var I=Object.getOwnPropertyDescriptor(b,"key").get;if(I&&I.isReactWarning)return!1}return b.key!==void 0}function vw(b,I){typeof b.ref=="string"&&pc.current}function gw(b,I){{var R=function(){mc||(mc=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};R.isReactWarning=!0,Object.defineProperty(b,"key",{get:R,configurable:!0})}}function bw(b,I){{var R=function(){hc||(hc=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};R.isReactWarning=!0,Object.defineProperty(b,"ref",{get:R,configurable:!0})}}var yw=function(b,I,R,ee,ve,xe,ue){var ae={$$typeof:r,type:b,key:I,ref:R,props:ue,_owner:xe};return ae._store={},Object.defineProperty(ae._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ae,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.defineProperty(ae,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ve}),Object.freeze&&(Object.freeze(ae.props),Object.freeze(ae)),ae};function ww(b,I,R,ee,ve){{var xe,ue={},ae=null,ze=null;R!==void 0&&(fc(R),ae=""+R),hw(I)&&(fc(I.key),ae=""+I.key),mw(I)&&(ze=I.ref,vw(I,ve));for(xe in I)Eo.call(I,xe)&&!pw.hasOwnProperty(xe)&&(ue[xe]=I[xe]);if(b&&b.defaultProps){var Ie=b.defaultProps;for(xe in Ie)ue[xe]===void 0&&(ue[xe]=Ie[xe])}if(ae||ze){var $e=typeof b=="function"?b.displayName||b.name||"Unknown":b;ae&&gw(ue,$e),ze&&bw(ue,$e)}return yw(b,ae,ze,ve,ee,pc.current,ue)}}var li=w.ReactCurrentOwner,vc=w.ReactDebugCurrentFrame;function Fn(b){if(b){var I=b._owner,R=Do(b.type,b._source,I?I.type:null);vc.setExtraStackFrame(R)}else vc.setExtraStackFrame(null)}var ui;ui=!1;function ci(b){return typeof b=="object"&&b!==null&&b.$$typeof===r}function gc(){{if(li.current){var b=W(li.current.type);if(b)return`
17
+ */var hs;function mf(){return hs||(hs=1,process.env.NODE_ENV!=="production"&&function(){var n=d,r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,v="@@iterator";function g(y){if(y===null||typeof y!="object")return null;var B=m&&y[m]||y[v];return typeof B=="function"?B:null}var x=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(y){{for(var B=arguments.length,J=new Array(B>1?B-1:0),ie=1;ie<B;ie++)J[ie-1]=arguments[ie];w("error",y,J)}}function w(y,B,J){{var ie=x.ReactDebugCurrentFrame,Ee=ie.getStackAddendum();Ee!==""&&(B+="%s",J=J.concat([Ee]));var ke=J.map(function(pe){return String(pe)});ke.unshift("Warning: "+B),Function.prototype.apply.call(console[y],console,ke)}}var k=!1,D=!1,T=!1,$=!1,_=!1,C;C=Symbol.for("react.module.reference");function O(y){return!!(typeof y=="string"||typeof y=="function"||y===t||y===a||_||y===o||y===u||y===c||$||y===p||k||D||T||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===i||y.$$typeof===s||y.$$typeof===l||y.$$typeof===C||y.getModuleId!==void 0))}function R(y,B,J){var ie=y.displayName;if(ie)return ie;var Ee=B.displayName||B.name||"";return Ee!==""?J+"("+Ee+")":J}function b(y){return y.displayName||"Context"}function S(y){if(y==null)return null;if(typeof y.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case t:return"Fragment";case e:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case s:var B=y;return b(B)+".Consumer";case i:var J=y;return b(J._context)+".Provider";case l:return R(y,y.render,"ForwardRef");case f:var ie=y.displayName||null;return ie!==null?ie:S(y.type)||"Memo";case h:{var Ee=y,ke=Ee._payload,pe=Ee._init;try{return S(pe(ke))}catch{return null}}}return null}var L=Object.assign,P=0,N,z,I,te,M,j,Q;function W(){}W.__reactDisabledLog=!0;function F(){{if(P===0){N=console.log,z=console.info,I=console.warn,te=console.error,M=console.group,j=console.groupCollapsed,Q=console.groupEnd;var y={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:y,log:y,warn:y,error:y,group:y,groupCollapsed:y,groupEnd:y})}P++}}function ne(){{if(P--,P===0){var y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},y,{value:N}),info:L({},y,{value:z}),warn:L({},y,{value:I}),error:L({},y,{value:te}),group:L({},y,{value:M}),groupCollapsed:L({},y,{value:j}),groupEnd:L({},y,{value:Q})})}P<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=x.ReactCurrentDispatcher,A;function H(y,B,J){{if(A===void 0)try{throw Error()}catch(Ee){var ie=Ee.stack.trim().match(/\n( *(at )?)/);A=ie&&ie[1]||""}return`
18
+ `+A+y}}var G=!1,X;{var Pe=typeof WeakMap=="function"?WeakMap:Map;X=new Pe}function U(y,B){if(!y||G)return"";{var J=X.get(y);if(J!==void 0)return J}var ie;G=!0;var Ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ke;ke=q.current,q.current=null,F();try{if(B){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(Je){ie=Je}Reflect.construct(y,[],pe)}else{try{pe.call()}catch(Je){ie=Je}y.call(pe.prototype)}}else{try{throw Error()}catch(Je){ie=Je}y()}}catch(Je){if(Je&&ie&&typeof Je.stack=="string"){for(var ce=Je.stack.split(`
19
+ `),Ge=ie.stack.split(`
20
+ `),Ye=ce.length-1,je=Ge.length-1;Ye>=1&&je>=0&&ce[Ye]!==Ge[je];)je--;for(;Ye>=1&&je>=0;Ye--,je--)if(ce[Ye]!==Ge[je]){if(Ye!==1||je!==1)do if(Ye--,je--,je<0||ce[Ye]!==Ge[je]){var ct=`
21
+ `+ce[Ye].replace(" at new "," at ");return y.displayName&&ct.includes("<anonymous>")&&(ct=ct.replace("<anonymous>",y.displayName)),typeof y=="function"&&X.set(y,ct),ct}while(Ye>=1&&je>=0);break}}}finally{G=!1,q.current=ke,ne(),Error.prepareStackTrace=Ee}var er=y?y.displayName||y.name:"",_n=er?H(er):"";return typeof y=="function"&&X.set(y,_n),_n}function Xe(y,B,J){return U(y,!1)}function zt(y){var B=y.prototype;return!!(B&&B.isReactComponent)}function ut(y,B,J){if(y==null)return"";if(typeof y=="function")return U(y,zt(y));if(typeof y=="string")return H(y);switch(y){case u:return H("Suspense");case c:return H("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case l:return Xe(y.render);case f:return ut(y.type,B,J);case h:{var ie=y,Ee=ie._payload,ke=ie._init;try{return ut(ke(Ee),B,J)}catch{}}}return""}var Ct=Object.prototype.hasOwnProperty,jr={},Sn=x.ReactDebugCurrentFrame;function kn(y){if(y){var B=y._owner,J=ut(y.type,y._source,B?B.type:null);Sn.setExtraStackFrame(J)}else Sn.setExtraStackFrame(null)}function Wr(y,B,J,ie,Ee){{var ke=Function.call.bind(Ct);for(var pe in y)if(ke(y,pe)){var ce=void 0;try{if(typeof y[pe]!="function"){var Ge=Error((ie||"React class")+": "+J+" type `"+pe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[pe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ge.name="Invariant Violation",Ge}ce=y[pe](B,pe,ie,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ye){ce=Ye}ce&&!(ce instanceof Error)&&(kn(Ee),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ie||"React class",J,pe,typeof ce),kn(null)),ce instanceof Error&&!(ce.message in jr)&&(jr[ce.message]=!0,kn(Ee),E("Failed %s type: %s",J,ce.message),kn(null))}}}var ra=Array.isArray;function Jn(y){return ra(y)}function oa(y){{var B=typeof Symbol=="function"&&Symbol.toStringTag,J=B&&y[Symbol.toStringTag]||y.constructor.name||"Object";return J}}function Wx(y){try{return Xd(y),!1}catch{return!0}}function Xd(y){return""+y}function Jd(y){if(Wx(y))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",oa(y)),Xd(y)}var Zd=x.ReactCurrentOwner,Hx={key:!0,ref:!0,__self:!0,__source:!0},ef,tf;function Bx(y){if(Ct.call(y,"ref")){var B=Object.getOwnPropertyDescriptor(y,"ref").get;if(B&&B.isReactWarning)return!1}return y.ref!==void 0}function Vx(y){if(Ct.call(y,"key")){var B=Object.getOwnPropertyDescriptor(y,"key").get;if(B&&B.isReactWarning)return!1}return y.key!==void 0}function zx(y,B){typeof y.ref=="string"&&Zd.current}function qx(y,B){{var J=function(){ef||(ef=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",B))};J.isReactWarning=!0,Object.defineProperty(y,"key",{get:J,configurable:!0})}}function Ux(y,B){{var J=function(){tf||(tf=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",B))};J.isReactWarning=!0,Object.defineProperty(y,"ref",{get:J,configurable:!0})}}var Qx=function(y,B,J,ie,Ee,ke,pe){var ce={$$typeof:r,type:y,key:B,ref:J,props:pe,_owner:ke};return ce._store={},Object.defineProperty(ce._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ce,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.defineProperty(ce,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ee}),Object.freeze&&(Object.freeze(ce.props),Object.freeze(ce)),ce};function Gx(y,B,J,ie,Ee){{var ke,pe={},ce=null,Ge=null;J!==void 0&&(Jd(J),ce=""+J),Vx(B)&&(Jd(B.key),ce=""+B.key),Bx(B)&&(Ge=B.ref,zx(B,Ee));for(ke in B)Ct.call(B,ke)&&!Hx.hasOwnProperty(ke)&&(pe[ke]=B[ke]);if(y&&y.defaultProps){var Ye=y.defaultProps;for(ke in Ye)pe[ke]===void 0&&(pe[ke]=Ye[ke])}if(ce||Ge){var je=typeof y=="function"?y.displayName||y.name||"Unknown":y;ce&&qx(pe,je),Ge&&Ux(pe,je)}return Qx(y,ce,Ge,Ee,ie,Zd.current,pe)}}var ls=x.ReactCurrentOwner,nf=x.ReactDebugCurrentFrame;function Zn(y){if(y){var B=y._owner,J=ut(y.type,y._source,B?B.type:null);nf.setExtraStackFrame(J)}else nf.setExtraStackFrame(null)}var us;us=!1;function cs(y){return typeof y=="object"&&y!==null&&y.$$typeof===r}function rf(){{if(ls.current){var y=S(ls.current.type);if(y)return`
22
22
 
23
- Check the render method of \``+b+"`."}return""}}function xw(b){return""}var bc={};function Dw(b){{var I=gc();if(!I){var R=typeof b=="string"?b:b.displayName||b.name;R&&(I=`
23
+ Check the render method of \``+y+"`."}return""}}function Kx(y){return""}var of={};function Xx(y){{var B=rf();if(!B){var J=typeof y=="string"?y:y.displayName||y.name;J&&(B=`
24
24
 
25
- Check the top-level render call using <`+R+">.")}return I}}function yc(b,I){{if(!b._store||b._store.validated||b.key!=null)return;b._store.validated=!0;var R=Dw(I);if(bc[R])return;bc[R]=!0;var ee="";b&&b._owner&&b._owner!==li.current&&(ee=" It was passed a child from "+W(b._owner.type)+"."),Fn(b),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R,ee),Fn(null)}}function wc(b,I){{if(typeof b!="object")return;if(si(b))for(var R=0;R<b.length;R++){var ee=b[R];ci(ee)&&yc(ee,I)}else if(ci(b))b._store&&(b._store.validated=!0);else if(b){var ve=g(b);if(typeof ve=="function"&&ve!==b.entries)for(var xe=ve.call(b),ue;!(ue=xe.next()).done;)ci(ue.value)&&yc(ue.value,I)}}}function Ew(b){{var I=b.type;if(I==null||typeof I=="string")return;var R;if(typeof I=="function")R=I.propTypes;else if(typeof I=="object"&&(I.$$typeof===l||I.$$typeof===p))R=I.propTypes;else return;if(R){var ee=W(I);uw(R,b.props,"prop",ee,b)}else if(I.PropTypes!==void 0&&!ui){ui=!0;var ve=W(I);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ve||"Unknown")}typeof I.getDefaultProps=="function"&&!I.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kw(b){{for(var I=Object.keys(b.props),R=0;R<I.length;R++){var ee=I[R];if(ee!=="children"&&ee!=="key"){Fn(b),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ee),Fn(null);break}}b.ref!==null&&(Fn(b),y("Invalid attribute `ref` supplied to `React.Fragment`."),Fn(null))}}function xc(b,I,R,ee,ve,xe){{var ue=O(b);if(!ue){var ae="";(b===void 0||typeof b=="object"&&b!==null&&Object.keys(b).length===0)&&(ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ze=xw();ze?ae+=ze:ae+=gc();var Ie;b===null?Ie="null":si(b)?Ie="array":b!==void 0&&b.$$typeof===r?(Ie="<"+(W(b.type)||"Unknown")+" />",ae=" Did you accidentally export a JSX literal instead of a component?"):Ie=typeof b,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ie,ae)}var $e=ww(b,I,R,ve,xe);if($e==null)return $e;if(ue){var Ze=I.children;if(Ze!==void 0)if(ee)if(si(Ze)){for(var Ln=0;Ln<Ze.length;Ln++)wc(Ze[Ln],b);Object.freeze&&Object.freeze(Ze)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else wc(Ze,b)}return b===t?kw($e):Ew($e),$e}}function Sw(b,I,R){return xc(b,I,R,!0)}function Cw(b,I,R){return xc(b,I,R,!1)}var _w=Cw,Ow=Sw;An.Fragment=t,An.jsx=_w,An.jsxs=Ow}()),An}var mi;function Cc(){return mi||(mi=1,process.env.NODE_ENV==="production"?gr.exports=kc():gr.exports=Sc()),gr.exports}var M=Cc();function hi(n){var r,e,t="";if(typeof n=="string"||typeof n=="number")t+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(r=0;r<o;r++)n[r]&&(e=hi(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function We(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=hi(n))&&(t&&(t+=" "),t+=r);return t}const So="-",_c=n=>{const r=Mc(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(So);return s[0]===""&&s.length!==1&&s.shift(),vi(s,r)||Oc(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},vi=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?vi(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(So);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},gi=/^\[(.+)\]$/,Oc=n=>{if(gi.test(n)){const r=gi.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},Mc=n=>{const{theme:r,classGroups:e}=n,t={nextPart:new Map,validators:[]};for(const o in e)Co(e[o],t,o,r);return t},Co=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:bi(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(Pc(o)){Co(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{Co(i,bi(r,a),e,t)})})},bi=(n,r)=>{let e=n;return r.split(So).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},Pc=n=>n.isThemeGetter,Tc=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,e=new Map,t=new Map;const o=(a,i)=>{e.set(a,i),r++,r>n&&(r=0,t=e,e=new Map)};return{get(a){let i=e.get(a);if(i!==void 0)return i;if((i=t.get(a))!==void 0)return o(a,i),i},set(a,i){e.has(a)?e.set(a,i):o(a,i)}}},_o="!",Oo=":",Nc=Oo.length,Ic=n=>{const{prefix:r,experimentalParseClassName:e}=n;let t=o=>{const a=[];let i=0,s=0,l=0,u;for(let h=0;h<o.length;h++){let v=o[h];if(i===0&&s===0){if(v===Oo){a.push(o.slice(l,h)),l=h+Nc;continue}if(v==="/"){u=h;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const c=a.length===0?o:o.substring(l),p=Fc(c),m=p!==c,f=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:f}};if(r){const o=r+Oo,a=t;t=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(e){const o=t;t=a=>e({className:a,parseClassName:o})}return t},Fc=n=>n.endsWith(_o)?n.substring(0,n.length-1):n.startsWith(_o)?n.substring(1):n,Lc=n=>{const r=Object.fromEntries(n.orderSensitiveModifiers.map(t=>[t,!0]));return t=>{if(t.length<=1)return t;const o=[];let a=[];return t.forEach(i=>{i[0]==="["||r[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},$c=n=>({cache:Tc(n.cacheSize),parseClassName:Ic(n),sortModifiers:Lc(n),..._c(n)}),Ac=/\s+/,Yc=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(Ac);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:p,modifiers:m,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:v}=e(c);if(p){l=c+(l.length>0?" "+l:l);continue}let g=!!v,w=t(g?h.substring(0,v):h);if(!w){if(!g){l=c+(l.length>0?" "+l:l);continue}if(w=t(h),!w){l=c+(l.length>0?" "+l:l);continue}g=!1}const y=a(m).join(":"),x=f?y+_o:y,E=x+w;if(i.includes(E))continue;i.push(E);const k=o(w,g);for(let C=0;C<k.length;++C){const S=k[C];i.push(x+S)}l=c+(l.length>0?" "+l:l)}return l};function Wc(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=yi(r))&&(t&&(t+=" "),t+=e);return t}const yi=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=yi(n[t]))&&(e&&(e+=" "),e+=r);return e};function jc(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,p)=>p(c),n());return e=$c(u),t=e.cache.get,o=e.cache.set,a=s,s(l)}function s(l){const u=t(l);if(u)return u;const c=Yc(l,e);return o(l,c),c}return function(){return a(Wc.apply(null,arguments))}}const Ae=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},wi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hc=/^\d+\/\d+$/,Rc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Vc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Uc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dn=n=>Hc.test(n),re=n=>!!n&&!Number.isNaN(Number(n)),Nt=n=>!!n&&Number.isInteger(Number(n)),Mo=n=>n.endsWith("%")&&re(n.slice(0,-1)),gt=n=>Rc.test(n),Qc=()=>!0,Kc=n=>Bc.test(n)&&!Vc.test(n),Di=()=>!1,qc=n=>zc.test(n),Gc=n=>Uc.test(n),Xc=n=>!U(n)&&!Q(n),Jc=n=>fn(n,_i,Di),U=n=>wi.test(n),Ut=n=>fn(n,Oi,Kc),Po=n=>fn(n,rd,re),Ei=n=>fn(n,Si,Di),Zc=n=>fn(n,Ci,Gc),br=n=>fn(n,Mi,qc),Q=n=>xi.test(n),Yn=n=>pn(n,Oi),ed=n=>pn(n,od),ki=n=>pn(n,Si),td=n=>pn(n,_i),nd=n=>pn(n,Ci),yr=n=>pn(n,Mi,!0),fn=(n,r,e)=>{const t=wi.exec(n);return t?t[1]?r(t[1]):e(t[2]):!1},pn=(n,r,e=!1)=>{const t=xi.exec(n);return t?t[1]?r(t[1]):e:!1},Si=n=>n==="position"||n==="percentage",Ci=n=>n==="image"||n==="url",_i=n=>n==="length"||n==="size"||n==="bg-size",Oi=n=>n==="length",rd=n=>n==="number",od=n=>n==="family-name",Mi=n=>n==="shadow",ad=jc(()=>{const n=Ae("color"),r=Ae("font"),e=Ae("text"),t=Ae("font-weight"),o=Ae("tracking"),a=Ae("leading"),i=Ae("breakpoint"),s=Ae("container"),l=Ae("spacing"),u=Ae("radius"),c=Ae("shadow"),p=Ae("inset-shadow"),m=Ae("text-shadow"),f=Ae("drop-shadow"),h=Ae("blur"),v=Ae("perspective"),g=Ae("aspect"),w=Ae("ease"),y=Ae("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...E(),Q,U],C=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],D=()=>[Q,U,l],_=()=>[dn,"full","auto",...D()],O=()=>[Nt,"none","subgrid",Q,U],T=()=>["auto",{span:["full",Nt,Q,U]},Nt,Q,U],Y=()=>[Nt,"auto",Q,U],W=()=>["auto","min","max","fr",Q,U],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...D()],z=()=>[dn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],P=()=>[n,Q,U],q=()=>[...E(),ki,Ei,{position:[Q,U]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",td,Jc,{size:[Q,U]}],Oe=()=>[Mo,Yn,Ut],te=()=>["","none","full",u,Q,U],H=()=>["",re,Yn,Ut],we=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[re,Mo,ki,Ei],J=()=>["","none",h,Q,U],le=()=>["none",re,Q,U],oe=()=>["none",re,Q,U],hr=()=>[re,Q,U],cn=()=>[dn,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gt],breakpoint:[gt],color:[Qc],container:[gt],"drop-shadow":[gt],ease:["in","out","in-out"],font:[Xc],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gt],shadow:[gt],spacing:["px",re],text:[gt],"text-shadow":[gt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dn,U,Q,g]}],container:["container"],columns:[{columns:[re,U,Q,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[Nt,"auto",Q,U]}],basis:[{basis:[dn,"full","auto",s,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,dn,"auto","initial","none",U]}],grow:[{grow:["",re,Q,U]}],shrink:[{shrink:["",re,Q,U]}],order:[{order:[Nt,"first","last","none",Q,U]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...z()]}],h:[{h:["screen",...z()]}],"min-h":[{"min-h":["screen","none",...z()]}],"max-h":[{"max-h":["screen",...z()]}],"font-size":[{text:["base",e,Yn,Ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,Q,Po]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mo,U]}],"font-family":[{font:[ed,U,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,U]}],"line-clamp":[{"line-clamp":[re,"none",Q,Po]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",Q,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Q,Ut]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[re,"auto",Q,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nt,Q,U],radial:["",Q,U],conic:[Nt,Q,U]},nd,Zc]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:Oe()}],"gradient-via-pos":[{via:Oe()}],"gradient-to-pos":[{to:Oe()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,Q,U]}],"outline-w":[{outline:["",re,Yn,Ut]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",c,yr,br]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",p,yr,br]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[re,Ut]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",m,yr,br]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[re,Q,U]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Q,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Q,U]}],filter:[{filter:["","none",Q,U]}],blur:[{blur:J()}],brightness:[{brightness:[re,Q,U]}],contrast:[{contrast:[re,Q,U]}],"drop-shadow":[{"drop-shadow":["","none",f,yr,br]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",re,Q,U]}],"hue-rotate":[{"hue-rotate":[re,Q,U]}],invert:[{invert:["",re,Q,U]}],saturate:[{saturate:[re,Q,U]}],sepia:[{sepia:["",re,Q,U]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,U]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[re,Q,U]}],"backdrop-contrast":[{"backdrop-contrast":[re,Q,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,Q,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,Q,U]}],"backdrop-invert":[{"backdrop-invert":["",re,Q,U]}],"backdrop-opacity":[{"backdrop-opacity":[re,Q,U]}],"backdrop-saturate":[{"backdrop-saturate":[re,Q,U]}],"backdrop-sepia":[{"backdrop-sepia":["",re,Q,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",Q,U]}],ease:[{ease:["linear","initial",w,Q,U]}],delay:[{delay:[re,Q,U]}],animate:[{animate:["none",y,Q,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Q,U]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:hr()}],"skew-x":[{"skew-x":hr()}],"skew-y":[{"skew-y":hr()}],transform:[{transform:[Q,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:cn()}],"translate-x":[{"translate-x":cn()}],"translate-y":[{"translate-y":cn()}],"translate-z":[{"translate-z":cn()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,U]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[re,Yn,Ut,Po]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function wr(...n){return ad(We(n))}const Pi=({className:n,text:r,onClick:e,disabled:t})=>M.jsx("button",{disabled:t,onClick:e,className:wr("bg-petnow-orange-primary disabled:bg-petnow-grey-primary sm:hover:bg-petnow-orange-40 sm:disabled:hover:bg-petnow-grey-primary w-full cursor-pointer rounded-xl py-5 text-2xl font-bold text-white transition-colors duration-200",n),children:r}),Ti=typeof document<"u"?d.useLayoutEffect:()=>{};function id(n){const r=d.useRef(null);return Ti(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const It=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},Qt=n=>n&&"window"in n&&n.window===n?n:It(n).defaultView||window;function sd(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function ld(n){return sd(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let ud=!1;function To(){return ud}function Ni(n,r){if(!To())return r&&n?n.contains(r):!1;if(!n||!r)return!1;let e=r;for(;e!==null;){if(e===n)return!0;e.tagName==="SLOT"&&e.assignedSlot?e=e.assignedSlot.parentNode:ld(e)?e=e.host:e=e.parentNode}return!1}const No=(n=document)=>{var r;if(!To())return n.activeElement;let e=n.activeElement;for(;e&&"shadowRoot"in e&&(!((r=e.shadowRoot)===null||r===void 0)&&r.activeElement);)e=e.shadowRoot.activeElement;return e};function Ii(n){return To()&&n.target.shadowRoot&&n.composedPath?n.composedPath()[0]:n.target}function xr(n){var r;return typeof window>"u"||window.navigator==null?!1:((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands.some(e=>n.test(e.brand)))||n.test(window.navigator.userAgent)}function Io(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function bt(n){if(process.env.NODE_ENV==="test")return n;let r=null;return()=>(r==null&&(r=n()),r)}const Fo=bt(function(){return Io(/^Mac/i)}),cd=bt(function(){return Io(/^iPhone/i)}),dd=bt(function(){return Io(/^iPad/i)||Fo()&&navigator.maxTouchPoints>1}),fd=bt(function(){return cd()||dd()});bt(function(){return Fo()||fd()}),bt(function(){return xr(/AppleWebKit/i)&&!pd()});const pd=bt(function(){return xr(/Chrome/i)}),md=bt(function(){return xr(/Android/i)});bt(function(){return xr(/Firefox/i)});function Fi(){let n=d.useRef(new Map),r=d.useCallback((o,a,i,s)=>{let l=s!=null&&s.once?(...u)=>{n.current.delete(i),i(...u)}:i;n.current.set(i,{type:a,eventTarget:o,fn:l,options:s}),o.addEventListener(a,l,s)},[]),e=d.useCallback((o,a,i,s)=>{var l;let u=((l=n.current.get(i))===null||l===void 0?void 0:l.fn)||i;o.removeEventListener(a,u,s),n.current.delete(i)},[]),t=d.useCallback(()=>{n.current.forEach((o,a)=>{e(o.eventTarget,o.type,a,o.options)})},[e]);return d.useEffect(()=>t,[t]),{addGlobalListener:r,removeGlobalListener:e,removeAllGlobalListeners:t}}function hd(n){return n.mozInputSource===0&&n.isTrusted?!0:md()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function Li(n){let r=n;return r.nativeEvent=n,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function vd(n,r){Object.defineProperty(n,"target",{value:r}),Object.defineProperty(n,"currentTarget",{value:r})}function $i(n){let r=d.useRef({isFocused:!1,observer:null});Ti(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=id(t=>{n==null||n(t)});return d.useCallback(t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){r.current.isFocused=!0;let o=t.target,a=i=>{if(r.current.isFocused=!1,o.disabled){let s=Li(i);e(s)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&o.disabled){var i;(i=r.current.observer)===null||i===void 0||i.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),r.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let gd=!1,Wn=null,Lo=new Set,jn=new Map,Kt=!1,$o=!1;const bd={Tab:!0,Escape:!0};function Ao(n,r){for(let e of Lo)e(n,r)}function yd(n){return!(n.metaKey||!Fo()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function Dr(n){Kt=!0,yd(n)&&(Wn="keyboard",Ao("keyboard",n))}function Ke(n){Wn="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(Kt=!0,Ao("pointer",n))}function Ai(n){hd(n)&&(Kt=!0,Wn="virtual")}function Yi(n){n.target===window||n.target===document||gd||!n.isTrusted||(!Kt&&!$o&&(Wn="virtual",Ao("virtual",n)),Kt=!1,$o=!1)}function Wi(){Kt=!1,$o=!0}function Yo(n){if(typeof window>"u"||jn.get(Qt(n)))return;const r=Qt(n),e=It(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){Kt=!0,t.apply(this,arguments)},e.addEventListener("keydown",Dr,!0),e.addEventListener("keyup",Dr,!0),e.addEventListener("click",Ai,!0),r.addEventListener("focus",Yi,!0),r.addEventListener("blur",Wi,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",Ke,!0),e.addEventListener("pointermove",Ke,!0),e.addEventListener("pointerup",Ke,!0)):process.env.NODE_ENV==="test"&&(e.addEventListener("mousedown",Ke,!0),e.addEventListener("mousemove",Ke,!0),e.addEventListener("mouseup",Ke,!0)),r.addEventListener("beforeunload",()=>{ji(n)},{once:!0}),jn.set(r,{focus:t})}const ji=(n,r)=>{const e=Qt(n),t=It(n);r&&t.removeEventListener("DOMContentLoaded",r),jn.has(e)&&(e.HTMLElement.prototype.focus=jn.get(e).focus,t.removeEventListener("keydown",Dr,!0),t.removeEventListener("keyup",Dr,!0),t.removeEventListener("click",Ai,!0),e.removeEventListener("focus",Yi,!0),e.removeEventListener("blur",Wi,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",Ke,!0),t.removeEventListener("pointermove",Ke,!0),t.removeEventListener("pointerup",Ke,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",Ke,!0),t.removeEventListener("mousemove",Ke,!0),t.removeEventListener("mouseup",Ke,!0)),jn.delete(e))};function wd(n){const r=It(n);let e;return r.readyState!=="loading"?Yo(n):(e=()=>{Yo(n)},r.addEventListener("DOMContentLoaded",e)),()=>ji(n,e)}typeof document<"u"&&wd();function Hi(){return Wn!=="pointer"}const xd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Dd(n,r,e){let t=It(e==null?void 0:e.target);const o=typeof window<"u"?Qt(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Qt(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Qt(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?Qt(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||t.activeElement instanceof o&&!xd.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(n&&r==="keyboard"&&e instanceof s&&!bd[e.key])}function Ed(n,r,e){Yo(),d.useEffect(()=>{let t=(o,a)=>{Dd(!!(e!=null&&e.isTextInput),o,a)&&n(Hi())};return Lo.add(t),()=>{Lo.delete(t)}},r)}function kd(n){let{isDisabled:r,onFocus:e,onBlur:t,onFocusChange:o}=n;const a=d.useCallback(l=>{if(l.target===l.currentTarget)return t&&t(l),o&&o(!1),!0},[t,o]),i=$i(a),s=d.useCallback(l=>{const u=It(l.target),c=u?No(u):No();l.target===l.currentTarget&&c===Ii(l.nativeEvent)&&(e&&e(l),o&&o(!0),i(l))},[o,e,i]);return{focusProps:{onFocus:!r&&(e||o||t)?s:void 0,onBlur:!r&&(t||o)?a:void 0}}}function Sd(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=Fi(),l=d.useCallback(p=>{p.currentTarget.contains(p.target)&&a.current.isFocusWithin&&!p.currentTarget.contains(p.relatedTarget)&&(a.current.isFocusWithin=!1,s(),e&&e(p),o&&o(!1))},[e,o,a,s]),u=$i(l),c=d.useCallback(p=>{if(!p.currentTarget.contains(p.target))return;const m=It(p.target),f=No(m);if(!a.current.isFocusWithin&&f===Ii(p.nativeEvent)){t&&t(p),o&&o(!0),a.current.isFocusWithin=!0,u(p);let h=p.currentTarget;i(m,"focus",v=>{if(a.current.isFocusWithin&&!Ni(h,v.target)){let g=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});vd(g,h);let w=Li(g);l(w)}},{capture:!0})}},[t,o,u,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}let Er=!1,Wo=0;function jo(){Er=!0,setTimeout(()=>{Er=!1},50)}function Ri(n){n.pointerType==="touch"&&jo()}function Cd(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Ri):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",jo),Wo++,()=>{Wo--,!(Wo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ri):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",jo))}}function Ho(n){let{onHoverStart:r,onHoverChange:e,onHoverEnd:t,isDisabled:o}=n,[a,i]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(Cd,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=Fi(),{hoverProps:c,triggerHoverEnd:p}=d.useMemo(()=>{let m=(v,g)=>{if(s.pointerType=g,o||g==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let w=v.currentTarget;s.target=w,l(It(v.target),"pointerover",y=>{s.isHovered&&s.target&&!Ni(s.target,y.target)&&f(y,y.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:w,pointerType:g}),e&&e(!0),i(!0)},f=(v,g)=>{let w=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!w)&&(s.isHovered=!1,u(),t&&t({type:"hoverend",target:w,pointerType:g}),e&&e(!1),i(!1))},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=v=>{Er&&v.pointerType==="mouse"||m(v,v.pointerType)},h.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&f(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(h.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!Er&&m(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&f(v,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[r,e,t,o,s,l,u]);return d.useEffect(()=>{o&&p({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}function Ro(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||Hi()}),[a,i]=d.useState(!1),[s,l]=d.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=d.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=d.useCallback(f=>{o.current.isFocused=f,i(f),u()},[u]);Ed(f=>{o.current.isFocusVisible=f,u()},[],{isTextInput:e});let{focusProps:p}=kd({isDisabled:t,onFocusChange:c}),{focusWithinProps:m}=Sd({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?m:p}}var _d=Object.defineProperty,Od=(n,r,e)=>r in n?_d(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Bo=(n,r,e)=>(Od(n,typeof r!="symbol"?r+"":r,e),e);let Md=class{constructor(){Bo(this,"current",this.detect()),Bo(this,"handoffState","pending"),Bo(this,"currentId",0)}set(r){this.current!==r&&(this.handoffState="pending",this.currentId=0,this.current=r)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},qt=new Md;function Gt(n){var r,e;return qt.isServer?null:n?"ownerDocument"in n?n.ownerDocument:"current"in n?(e=(r=n.current)==null?void 0:r.ownerDocument)!=null?e:document:null:document}function kr(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function et(){let n=[],r={addEventListener(e,t,o,a){return e.addEventListener(t,o,a),r.add(()=>e.removeEventListener(t,o,a))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return kr(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,o){let a=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:o}),this.add(()=>{Object.assign(e.style,{[t]:a})})},group(e){let t=et();return e(t),this.add(()=>t.dispose())},add(e){return n.includes(e)||n.push(e),()=>{let t=n.indexOf(e);if(t>=0)for(let o of n.splice(t,1))o()}},dispose(){for(let e of n.splice(0))e()}};return r}function Ft(){let[n]=d.useState(et);return d.useEffect(()=>()=>n.dispose(),[n]),n}let ce=(n,r)=>{qt.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function yt(n){let r=d.useRef(n);return ce(()=>{r.current=n},[n]),r}let V=function(n){let r=yt(n);return d.useCallback((...e)=>r.current(...e),[r])};function Pd(n){let r=n.width/2,e=n.height/2;return{top:n.clientY-e,right:n.clientX+r,bottom:n.clientY+e,left:n.clientX-r}}function Td(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function Bi({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=Ft(),a=V(()=>{r.current=null,t(!1),o.dispose()}),i=V(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=Gt(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",u=>{if(r.current){let c=Pd(u);t(Td(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Nd=d.createContext(void 0);function Sr(){return d.useContext(Nd)}function Vo(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Fe(n,r,...e){if(n in r){let o=r[n];return typeof o=="function"?o(...e):o}let t=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Fe),t}var Lt=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(Lt||{}),$t=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))($t||{});function Ce(){let n=Fd();return d.useCallback(r=>Id({mergeRefs:n,...r}),[n])}function Id({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??Ld;let l=Vi(r,n);if(a)return Cr(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...p}=l;if(c)return Cr(p,e,t,i,s)}if(u&1){let{unmount:c=!0,...p}=l;return Fe(c?0:1,{0(){return null},1(){return Cr({...p,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return Cr(l,e,t,i,s)}function Cr(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=zo(n,["unmount","static"]),u=n.ref!==void 0?{[s]:n.ref}:{},c=typeof i=="function"?i(r):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(r)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let p={};if(r){let m=!1,f=[];for(let[h,v]of Object.entries(r))typeof v=="boolean"&&(m=!0),v===!0&&f.push(h.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(m){p["data-headlessui-state"]=f.join(" ");for(let h of f)p[`data-${h}`]=""}}if(a===d.Fragment&&(Object.keys(At(l)).length>0||Object.keys(At(p)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(At(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${t} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(At(l)).concat(Object.keys(At(p))).map(m=>` - ${m}`).join(`
26
- `),"","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(m=>` - ${m}`).join(`
25
+ Check the top-level render call using <`+J+">.")}return B}}function af(y,B){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var J=Xx(B);if(of[J])return;of[J]=!0;var ie="";y&&y._owner&&y._owner!==ls.current&&(ie=" It was passed a child from "+S(y._owner.type)+"."),Zn(y),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,ie),Zn(null)}}function sf(y,B){{if(typeof y!="object")return;if(Jn(y))for(var J=0;J<y.length;J++){var ie=y[J];cs(ie)&&af(ie,B)}else if(cs(y))y._store&&(y._store.validated=!0);else if(y){var Ee=g(y);if(typeof Ee=="function"&&Ee!==y.entries)for(var ke=Ee.call(y),pe;!(pe=ke.next()).done;)cs(pe.value)&&af(pe.value,B)}}}function Jx(y){{var B=y.type;if(B==null||typeof B=="string")return;var J;if(typeof B=="function")J=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===l||B.$$typeof===f))J=B.propTypes;else return;if(J){var ie=S(B);Wr(J,y.props,"prop",ie,y)}else if(B.PropTypes!==void 0&&!us){us=!0;var Ee=S(B);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ee||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Zx(y){{for(var B=Object.keys(y.props),J=0;J<B.length;J++){var ie=B[J];if(ie!=="children"&&ie!=="key"){Zn(y),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ie),Zn(null);break}}y.ref!==null&&(Zn(y),E("Invalid attribute `ref` supplied to `React.Fragment`."),Zn(null))}}var lf={};function uf(y,B,J,ie,Ee,ke){{var pe=O(y);if(!pe){var ce="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(ce+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ge=Kx();Ge?ce+=Ge:ce+=rf();var Ye;y===null?Ye="null":Jn(y)?Ye="array":y!==void 0&&y.$$typeof===r?(Ye="<"+(S(y.type)||"Unknown")+" />",ce=" Did you accidentally export a JSX literal instead of a component?"):Ye=typeof y,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ye,ce)}var je=Gx(y,B,J,Ee,ke);if(je==null)return je;if(pe){var ct=B.children;if(ct!==void 0)if(ie)if(Jn(ct)){for(var er=0;er<ct.length;er++)sf(ct[er],y);Object.freeze&&Object.freeze(ct)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else sf(ct,y)}if(Ct.call(B,"key")){var _n=S(y),Je=Object.keys(B).filter(function(aE){return aE!=="key"}),ds=Je.length>0?"{key: someKey, "+Je.join(": ..., ")+": ...}":"{key: someKey}";if(!lf[_n+ds]){var oE=Je.length>0?"{"+Je.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,ds,_n,oE,_n),lf[_n+ds]=!0}}return y===t?Zx(je):Jx(je),je}}function eE(y,B,J){return uf(y,B,J,!0)}function tE(y,B,J){return uf(y,B,J,!1)}var nE=tE,rE=eE;nr.Fragment=t,nr.jsx=nE,nr.jsxs=rE}()),nr}var ms;function vf(){return ms||(ms=1,process.env.NODE_ENV==="production"?Br.exports=hf():Br.exports=mf()),Br.exports}var Y=vf();function vs(n){var r,e,t="";if(typeof n=="string"||typeof n=="number")t+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(r=0;r<o;r++)n[r]&&(e=vs(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function Be(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=vs(n))&&(t&&(t+=" "),t+=r);return t}const aa="-",gf=n=>{const r=yf(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(aa);return s[0]===""&&s.length!==1&&s.shift(),gs(s,r)||bf(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},gs=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?gs(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(aa);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},bs=/^\[(.+)\]$/,bf=n=>{if(bs.test(n)){const r=bs.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},yf=n=>{const{theme:r,classGroups:e}=n,t={nextPart:new Map,validators:[]};for(const o in e)ia(e[o],t,o,r);return t},ia=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:ys(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(wf(o)){ia(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{ia(i,ys(r,a),e,t)})})},ys=(n,r)=>{let e=n;return r.split(aa).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},wf=n=>n.isThemeGetter,xf=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,e=new Map,t=new Map;const o=(a,i)=>{e.set(a,i),r++,r>n&&(r=0,t=e,e=new Map)};return{get(a){let i=e.get(a);if(i!==void 0)return i;if((i=t.get(a))!==void 0)return o(a,i),i},set(a,i){e.has(a)?e.set(a,i):o(a,i)}}},sa="!",la=":",Ef=la.length,Df=n=>{const{prefix:r,experimentalParseClassName:e}=n;let t=o=>{const a=[];let i=0,s=0,l=0,u;for(let m=0;m<o.length;m++){let v=o[m];if(i===0&&s===0){if(v===la){a.push(o.slice(l,m)),l=m+Ef;continue}if(v==="/"){u=m;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const c=a.length===0?o:o.substring(l),f=Sf(c),h=f!==c,p=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}};if(r){const o=r+la,a=t;t=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(e){const o=t;t=a=>e({className:a,parseClassName:o})}return t},Sf=n=>n.endsWith(sa)?n.substring(0,n.length-1):n.startsWith(sa)?n.substring(1):n,kf=n=>{const r=Object.fromEntries(n.orderSensitiveModifiers.map(t=>[t,!0]));return t=>{if(t.length<=1)return t;const o=[];let a=[];return t.forEach(i=>{i[0]==="["||r[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},_f=n=>({cache:xf(n.cacheSize),parseClassName:Df(n),sortModifiers:kf(n),...gf(n)}),Cf=/\s+/,Of=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(Cf);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=e(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!v,x=t(g?m.substring(0,v):m);if(!x){if(!g){l=c+(l.length>0?" "+l:l);continue}if(x=t(m),!x){l=c+(l.length>0?" "+l:l);continue}g=!1}const E=a(h).join(":"),w=p?E+sa:E,k=w+x;if(i.includes(k))continue;i.push(k);const D=o(x,g);for(let T=0;T<D.length;++T){const $=D[T];i.push(w+$)}l=c+(l.length>0?" "+l:l)}return l};function Mf(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=ws(r))&&(t&&(t+=" "),t+=e);return t}const ws=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=ws(n[t]))&&(e&&(e+=" "),e+=r);return e};function xs(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,f)=>f(c),n());return e=_f(u),t=e.cache.get,o=e.cache.set,a=s,s(l)}function s(l){const u=t(l);if(u)return u;const c=Of(l,e);return o(l,c),c}return function(){return a(Mf.apply(null,arguments))}}const We=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},Es=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ds=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tf=/^\d+\/\d+$/,Pf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,If=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Nf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ff=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cn=n=>Tf.test(n),ue=n=>!!n&&!Number.isNaN(Number(n)),qt=n=>!!n&&Number.isInteger(Number(n)),ua=n=>n.endsWith("%")&&ue(n.slice(0,-1)),Ot=n=>Pf.test(n),$f=()=>!0,Af=n=>If.test(n)&&!Nf.test(n),Ss=()=>!1,Yf=n=>Lf.test(n),Rf=n=>Ff.test(n),jf=n=>!re(n)&&!oe(n),Wf=n=>On(n,Ms,Ss),re=n=>Es.test(n),sn=n=>On(n,Ts,Af),ca=n=>On(n,qf,ue),ks=n=>On(n,Cs,Ss),Hf=n=>On(n,Os,Rf),Vr=n=>On(n,Ps,Yf),oe=n=>Ds.test(n),rr=n=>Mn(n,Ts),Bf=n=>Mn(n,Uf),_s=n=>Mn(n,Cs),Vf=n=>Mn(n,Ms),zf=n=>Mn(n,Os),zr=n=>Mn(n,Ps,!0),On=(n,r,e)=>{const t=Es.exec(n);return t?t[1]?r(t[1]):e(t[2]):!1},Mn=(n,r,e=!1)=>{const t=Ds.exec(n);return t?t[1]?r(t[1]):e:!1},Cs=n=>n==="position"||n==="percentage",Os=n=>n==="image"||n==="url",Ms=n=>n==="length"||n==="size"||n==="bg-size",Ts=n=>n==="length",qf=n=>n==="number",Uf=n=>n==="family-name",Ps=n=>n==="shadow",Is=()=>{const n=We("color"),r=We("font"),e=We("text"),t=We("font-weight"),o=We("tracking"),a=We("leading"),i=We("breakpoint"),s=We("container"),l=We("spacing"),u=We("radius"),c=We("shadow"),f=We("inset-shadow"),h=We("text-shadow"),p=We("drop-shadow"),m=We("blur"),v=We("perspective"),g=We("aspect"),x=We("ease"),E=We("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...k(),oe,re],T=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],_=()=>[oe,re,l],C=()=>[Cn,"full","auto",..._()],O=()=>[qt,"none","subgrid",oe,re],R=()=>["auto",{span:["full",qt,oe,re]},qt,oe,re],b=()=>[qt,"auto",oe,re],S=()=>["auto","min","max","fr",oe,re],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",..._()],z=()=>[Cn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],I=()=>[n,oe,re],te=()=>[...k(),_s,ks,{position:[oe,re]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",Vf,Wf,{size:[oe,re]}],Q=()=>[ua,rr,sn],W=()=>["","none","full",u,oe,re],F=()=>["",ue,rr,sn],ne=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[ue,ua,_s,ks],H=()=>["","none",m,oe,re],G=()=>["none",ue,oe,re],X=()=>["none",ue,oe,re],Pe=()=>[ue,oe,re],U=()=>[Cn,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ot],breakpoint:[Ot],color:[$f],container:[Ot],"drop-shadow":[Ot],ease:["in","out","in-out"],font:[jf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ot],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ot],shadow:[Ot],spacing:["px",ue],text:[Ot],"text-shadow":[Ot],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Cn,re,oe,g]}],container:["container"],columns:[{columns:[ue,re,oe,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[qt,"auto",oe,re]}],basis:[{basis:[Cn,"full","auto",s,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,Cn,"auto","initial","none",re]}],grow:[{grow:["",ue,oe,re]}],shrink:[{shrink:["",ue,oe,re]}],order:[{order:[qt,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":S()}],"auto-rows":[{"auto-rows":S()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",e,rr,sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,oe,ca]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ua,re]}],"font-family":[{font:[Bf,re,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,oe,re]}],"line-clamp":[{"line-clamp":[ue,"none",oe,ca]}],leading:[{leading:[a,..._()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",oe,sn]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ue,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qt,oe,re],radial:["",oe,re],conic:[qt,oe,re]},zf,Hf]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,oe,re]}],"outline-w":[{outline:["",ue,rr,sn]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",c,zr,Vr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",f,zr,Vr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ue,sn]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",h,zr,Vr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ue,oe,re]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:H()}],brightness:[{brightness:[ue,oe,re]}],contrast:[{contrast:[ue,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",p,zr,Vr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",ue,oe,re]}],"hue-rotate":[{"hue-rotate":[ue,oe,re]}],invert:[{invert:["",ue,oe,re]}],saturate:[{saturate:[ue,oe,re]}],sepia:[{sepia:["",ue,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[ue,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[ue,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",ue,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[ue,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[ue,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",oe,re]}],ease:[{ease:["linear","initial",x,oe,re]}],delay:[{delay:[ue,oe,re]}],animate:[{animate:["none",E,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,oe,re]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[ue,rr,sn,ca]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qf=(n,{cacheSize:r,prefix:e,experimentalParseClassName:t,extend:o={},override:a={}})=>(or(n,"cacheSize",r),or(n,"prefix",e),or(n,"experimentalParseClassName",t),qr(n.theme,a.theme),qr(n.classGroups,a.classGroups),qr(n.conflictingClassGroups,a.conflictingClassGroups),qr(n.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),or(n,"orderSensitiveModifiers",a.orderSensitiveModifiers),Ur(n.theme,o.theme),Ur(n.classGroups,o.classGroups),Ur(n.conflictingClassGroups,o.conflictingClassGroups),Ur(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Ns(n,o,"orderSensitiveModifiers"),n),or=(n,r,e)=>{e!==void 0&&(n[r]=e)},qr=(n,r)=>{if(r)for(const e in r)or(n,e,r[e])},Ur=(n,r)=>{if(r)for(const e in r)Ns(n,r,e)},Ns=(n,r,e)=>{const t=r[e];t!==void 0&&(n[e]=n[e]?n[e].concat(t):t)},Gf=((n,...r)=>typeof n=="function"?xs(Is,n,...r):xs(()=>Qf(Is(),n),...r))({extend:{classGroups:{"font-style":[{text:["display-large","display-medium","title-large","title-medium","title-small","label-large","label-medium","label-small","body-large","body-medium","body-small","caption-large","caption-medium","caption-small","badge"]}]},conflictingClassGroups:{"font-style":["font-size","font-weight"]}}});function tt(...n){return Gf(Be(n))}const Kf=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>Y.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:tt("petnowRadio size-[3.5vw]",n),onChange:t});var da={},fa,Ls;function Fs(){if(Ls)return fa;Ls=1;function n(r){if(r&&r.__esModule)return r;var e={};if(r!=null){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(r,t):{};o.get||o.set?Object.defineProperty(e,t,o):e[t]=r[t]}}return e.default=r,e}return fa=n,fa}var Mt={},pa,$s;function ar(){if($s)return pa;$s=1;function n(r){return r&&r.__esModule?r:{default:r}}return pa=n,pa}var Qr,As;function Xf(){if(As)return Qr;As=1;function n(){return Qr=n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r},n.apply(this,arguments)}return Qr=n,Qr}var ha,Ys;function Jf(){if(Ys)return ha;Ys=1;function n(r,e){if(r==null)return{};var t={},o=Object.keys(r),a,i;for(i=0;i<o.length;i++)a=o[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}return ha=n,ha}var ma,Rs;function Zf(){if(Rs)return ma;Rs=1;var n=Jf();function r(e,t){if(e==null)return{};var o=n(e,t),a,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)a=s[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}return ma=r,ma}var va,js;function ep(){if(js)return va;js=1;function n(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}return va=n,va}var ga,Ws;function tp(){if(Ws)return ga;Ws=1;function n(e,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function r(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}return ga=r,ga}var ir,Hs;function np(){if(Hs)return ir;Hs=1;function n(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n=function(o){return typeof o}:n=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},n(e)}function r(e){return typeof Symbol=="function"&&n(Symbol.iterator)==="symbol"?ir=r=function(o){return n(o)}:ir=r=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":n(o)},r(e)}return ir=r,ir}var ba,Bs;function rp(){if(Bs)return ba;Bs=1;function n(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}return ba=n,ba}var ya,Vs;function op(){if(Vs)return ya;Vs=1;var n=np(),r=rp();function e(t,o){return o&&(n(o)==="object"||typeof o=="function")?o:r(t)}return ya=e,ya}var Gr,zs;function ap(){if(zs)return Gr;zs=1;function n(r){return Gr=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}return Gr=n,Gr}var Kr,qs;function ip(){if(qs)return Kr;qs=1;function n(r,e){return Kr=n=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},n(r,e)}return Kr=n,Kr}var wa,Us;function sp(){if(Us)return wa;Us=1;var n=ip();function r(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}return wa=r,wa}var Xr={exports:{}},Jr={exports:{}},be={};/** @license React v16.13.1
31
+ * react-is.production.min.js
32
+ *
33
+ * Copyright (c) Facebook, Inc. and its affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */var Qs;function lp(){if(Qs)return be;Qs=1;var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,p=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,E=n?Symbol.for("react.scope"):60119;function w(D){if(typeof D=="object"&&D!==null){var T=D.$$typeof;switch(T){case r:switch(D=D.type,D){case l:case u:case t:case a:case o:case f:return D;default:switch(D=D&&D.$$typeof,D){case s:case c:case m:case p:case i:return D;default:return T}}case e:return T}}}function k(D){return w(D)===u}return be.AsyncMode=l,be.ConcurrentMode=u,be.ContextConsumer=s,be.ContextProvider=i,be.Element=r,be.ForwardRef=c,be.Fragment=t,be.Lazy=m,be.Memo=p,be.Portal=e,be.Profiler=a,be.StrictMode=o,be.Suspense=f,be.isAsyncMode=function(D){return k(D)||w(D)===l},be.isConcurrentMode=k,be.isContextConsumer=function(D){return w(D)===s},be.isContextProvider=function(D){return w(D)===i},be.isElement=function(D){return typeof D=="object"&&D!==null&&D.$$typeof===r},be.isForwardRef=function(D){return w(D)===c},be.isFragment=function(D){return w(D)===t},be.isLazy=function(D){return w(D)===m},be.isMemo=function(D){return w(D)===p},be.isPortal=function(D){return w(D)===e},be.isProfiler=function(D){return w(D)===a},be.isStrictMode=function(D){return w(D)===o},be.isSuspense=function(D){return w(D)===f},be.isValidElementType=function(D){return typeof D=="string"||typeof D=="function"||D===t||D===u||D===a||D===o||D===f||D===h||typeof D=="object"&&D!==null&&(D.$$typeof===m||D.$$typeof===p||D.$$typeof===i||D.$$typeof===s||D.$$typeof===c||D.$$typeof===g||D.$$typeof===x||D.$$typeof===E||D.$$typeof===v)},be.typeOf=w,be}var ye={};/** @license React v16.13.1
38
+ * react-is.development.js
39
+ *
40
+ * Copyright (c) Facebook, Inc. and its affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */var Gs;function up(){return Gs||(Gs=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,p=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,E=n?Symbol.for("react.scope"):60119;function w(U){return typeof U=="string"||typeof U=="function"||U===t||U===u||U===a||U===o||U===f||U===h||typeof U=="object"&&U!==null&&(U.$$typeof===m||U.$$typeof===p||U.$$typeof===i||U.$$typeof===s||U.$$typeof===c||U.$$typeof===g||U.$$typeof===x||U.$$typeof===E||U.$$typeof===v)}function k(U){if(typeof U=="object"&&U!==null){var Xe=U.$$typeof;switch(Xe){case r:var zt=U.type;switch(zt){case l:case u:case t:case a:case o:case f:return zt;default:var ut=zt&&zt.$$typeof;switch(ut){case s:case c:case m:case p:case i:return ut;default:return Xe}}case e:return Xe}}}var D=l,T=u,$=s,_=i,C=r,O=c,R=t,b=m,S=p,L=e,P=a,N=o,z=f,I=!1;function te(U){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(U)||k(U)===l}function M(U){return k(U)===u}function j(U){return k(U)===s}function Q(U){return k(U)===i}function W(U){return typeof U=="object"&&U!==null&&U.$$typeof===r}function F(U){return k(U)===c}function ne(U){return k(U)===t}function q(U){return k(U)===m}function A(U){return k(U)===p}function H(U){return k(U)===e}function G(U){return k(U)===a}function X(U){return k(U)===o}function Pe(U){return k(U)===f}ye.AsyncMode=D,ye.ConcurrentMode=T,ye.ContextConsumer=$,ye.ContextProvider=_,ye.Element=C,ye.ForwardRef=O,ye.Fragment=R,ye.Lazy=b,ye.Memo=S,ye.Portal=L,ye.Profiler=P,ye.StrictMode=N,ye.Suspense=z,ye.isAsyncMode=te,ye.isConcurrentMode=M,ye.isContextConsumer=j,ye.isContextProvider=Q,ye.isElement=W,ye.isForwardRef=F,ye.isFragment=ne,ye.isLazy=q,ye.isMemo=A,ye.isPortal=H,ye.isProfiler=G,ye.isStrictMode=X,ye.isSuspense=Pe,ye.isValidElementType=w,ye.typeOf=k}()),ye}var Ks;function Xs(){return Ks||(Ks=1,process.env.NODE_ENV==="production"?Jr.exports=lp():Jr.exports=up()),Jr.exports}/*
45
+ object-assign
46
+ (c) Sindre Sorhus
47
+ @license MIT
48
+ */var xa,Js;function cp(){if(Js)return xa;Js=1;var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function t(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},s=0;s<10;s++)i["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return xa=o()?Object.assign:function(a,i){for(var s,l=t(a),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)r.call(s,f)&&(l[f]=s[f]);if(n){u=n(s);for(var h=0;h<u.length;h++)e.call(s,u[h])&&(l[u[h]]=s[u[h]])}}return l},xa}var Ea,Zs;function Da(){if(Zs)return Ea;Zs=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ea=n,Ea}var Sa,el;function tl(){return el||(el=1,Sa=Function.call.bind(Object.prototype.hasOwnProperty)),Sa}var ka,nl;function dp(){if(nl)return ka;nl=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var r=Da(),e={},t=tl();n=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(a,i,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(t(a,c)){var f;try{if(typeof a[c]!="function"){var h=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=a[c](i,c,l,s,null,r)}catch(m){f=m}if(f&&!(f instanceof Error)&&n((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in e)){e[f.message]=!0;var p=u?u():"";n("Failed "+s+" type: "+f.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(e={})},ka=o,ka}var _a,rl;function fp(){if(rl)return _a;rl=1;var n=Xs(),r=cp(),e=Da(),t=tl(),o=dp(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return _a=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(M){var j=M&&(u&&M[u]||M[c]);if(typeof j=="function")return j}var h="<<anonymous>>",p={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:E(),arrayOf:w,element:k(),elementType:D(),instanceOf:T,node:O(),objectOf:_,oneOf:$,oneOfType:C,shape:b,exact:S};function m(M,j){return M===j?M!==0||1/M===1/j:M!==M&&j!==j}function v(M,j){this.message=M,this.data=j&&typeof j=="object"?j:{},this.stack=""}v.prototype=Error.prototype;function g(M){if(process.env.NODE_ENV!=="production")var j={},Q=0;function W(ne,q,A,H,G,X,Pe){if(H=H||h,X=X||A,Pe!==e){if(l){var U=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw U.name="Invariant Violation",U}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Xe=H+":"+A;!j[Xe]&&Q<3&&(a("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+H+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),j[Xe]=!0,Q++)}}return q[A]==null?ne?q[A]===null?new v("The "+G+" `"+X+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new v("The "+G+" `"+X+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:M(q,A,H,G,X)}var F=W.bind(null,!1);return F.isRequired=W.bind(null,!0),F}function x(M){function j(Q,W,F,ne,q,A){var H=Q[W],G=N(H);if(G!==M){var X=z(H);return new v("Invalid "+ne+" `"+q+"` of type "+("`"+X+"` supplied to `"+F+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return g(j)}function E(){return g(i)}function w(M){function j(Q,W,F,ne,q){if(typeof M!="function")return new v("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var A=Q[W];if(!Array.isArray(A)){var H=N(A);return new v("Invalid "+ne+" `"+q+"` of type "+("`"+H+"` supplied to `"+F+"`, expected an array."))}for(var G=0;G<A.length;G++){var X=M(A,G,F,ne,q+"["+G+"]",e);if(X instanceof Error)return X}return null}return g(j)}function k(){function M(j,Q,W,F,ne){var q=j[Q];if(!s(q)){var A=N(q);return new v("Invalid "+F+" `"+ne+"` of type "+("`"+A+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return g(M)}function D(){function M(j,Q,W,F,ne){var q=j[Q];if(!n.isValidElementType(q)){var A=N(q);return new v("Invalid "+F+" `"+ne+"` of type "+("`"+A+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return g(M)}function T(M){function j(Q,W,F,ne,q){if(!(Q[W]instanceof M)){var A=M.name||h,H=te(Q[W]);return new v("Invalid "+ne+" `"+q+"` of type "+("`"+H+"` supplied to `"+F+"`, expected ")+("instance of `"+A+"`."))}return null}return g(j)}function $(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function j(Q,W,F,ne,q){for(var A=Q[W],H=0;H<M.length;H++)if(m(A,M[H]))return null;var G=JSON.stringify(M,function(Pe,U){var Xe=z(U);return Xe==="symbol"?String(U):U});return new v("Invalid "+ne+" `"+q+"` of value `"+String(A)+"` "+("supplied to `"+F+"`, expected one of "+G+"."))}return g(j)}function _(M){function j(Q,W,F,ne,q){if(typeof M!="function")return new v("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var A=Q[W],H=N(A);if(H!=="object")return new v("Invalid "+ne+" `"+q+"` of type "+("`"+H+"` supplied to `"+F+"`, expected an object."));for(var G in A)if(t(A,G)){var X=M(A,G,F,ne,q+"."+G,e);if(X instanceof Error)return X}return null}return g(j)}function C(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var j=0;j<M.length;j++){var Q=M[j];if(typeof Q!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(Q)+" at index "+j+"."),i}function W(F,ne,q,A,H){for(var G=[],X=0;X<M.length;X++){var Pe=M[X],U=Pe(F,ne,q,A,H,e);if(U==null)return null;U.data&&t(U.data,"expectedType")&&G.push(U.data.expectedType)}var Xe=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new v("Invalid "+A+" `"+H+"` supplied to "+("`"+q+"`"+Xe+"."))}return g(W)}function O(){function M(j,Q,W,F,ne){return L(j[Q])?null:new v("Invalid "+F+" `"+ne+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return g(M)}function R(M,j,Q,W,F){return new v((M||"React class")+": "+j+" type `"+Q+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function b(M){function j(Q,W,F,ne,q){var A=Q[W],H=N(A);if(H!=="object")return new v("Invalid "+ne+" `"+q+"` of type `"+H+"` "+("supplied to `"+F+"`, expected `object`."));for(var G in M){var X=M[G];if(typeof X!="function")return R(F,ne,q,G,z(X));var Pe=X(A,G,F,ne,q+"."+G,e);if(Pe)return Pe}return null}return g(j)}function S(M){function j(Q,W,F,ne,q){var A=Q[W],H=N(A);if(H!=="object")return new v("Invalid "+ne+" `"+q+"` of type `"+H+"` "+("supplied to `"+F+"`, expected `object`."));var G=r({},Q[W],M);for(var X in G){var Pe=M[X];if(t(M,X)&&typeof Pe!="function")return R(F,ne,q,X,z(Pe));if(!Pe)return new v("Invalid "+ne+" `"+q+"` key `"+X+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(Q[W],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var U=Pe(A,X,F,ne,q+"."+X,e);if(U)return U}return null}return g(j)}function L(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(L);if(M===null||s(M))return!0;var j=f(M);if(j){var Q=j.call(M),W;if(j!==M.entries){for(;!(W=Q.next()).done;)if(!L(W.value))return!1}else for(;!(W=Q.next()).done;){var F=W.value;if(F&&!L(F[1]))return!1}}else return!1;return!0;default:return!1}}function P(M,j){return M==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function N(M){var j=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":P(j,M)?"symbol":j}function z(M){if(typeof M>"u"||M===null)return""+M;var j=N(M);if(j==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return j}function I(M){var j=z(M);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function te(M){return!M.constructor||!M.constructor.name?h:M.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},_a}var Ca,ol;function pp(){if(ol)return Ca;ol=1;var n=Da();function r(){}function e(){}return e.resetWarningCache=r,Ca=function(){function t(i,s,l,u,c,f){if(f!==n){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}t.isRequired=t;function o(){return t}var a={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:o,element:t,elementType:t,instanceOf:o,node:t,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:e,resetWarningCache:r};return a.PropTypes=a,a},Ca}var al;function hp(){if(al)return Xr.exports;if(al=1,process.env.NODE_ENV!=="production"){var n=Xs(),r=!0;Xr.exports=fp()(n.isElement,r)}else Xr.exports=pp()();return Xr.exports}var Oa,il;function sl(){if(il)return Oa;il=1;var n=process.env.NODE_ENV!=="production",r=function(){};if(n){var e=function(o,a){var i=arguments.length;a=new Array(i>1?i-1:0);for(var s=1;s<i;s++)a[s-1]=arguments[s];var l=0,u="Warning: "+o.replace(/%s/g,function(){return a[l++]});typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}};r=function(t,o,a){var i=arguments.length;a=new Array(i>2?i-2:0);for(var s=2;s<i;s++)a[s-2]=arguments[s];if(o===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||e.apply(null,[o].concat(a))}}return Oa=r,Oa}var Ma={},sr={},ll;function mp(){if(ll)return sr;ll=1;var n=ar();Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=void 0;var r=n(d),e=n(sl()),t=function(i){var s=i.index,l=i.children,u=r.default.Children.count(l);process.env.NODE_ENV!=="production"&&(0,e.default)(s>=0&&s<=u,"react-swipeable-view: the new index: ".concat(s," is out of bounds: [0-").concat(u,"]."))},o=t;return sr.default=o,sr}var Zr={},lr={},ul;function cl(){if(ul)return lr;ul=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.default=void 0;var n={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};return lr.default=n,lr}var dl;function vp(){if(dl)return Zr;dl=1;var n=ar();Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=t;var r=n(d),e=n(cl());function t(o){var a=o.children,i=o.startIndex,s=o.startX,l=o.pageX,u=o.viewLength,c=o.resistance,f=r.default.Children.count(a)-1,h=i+(s-l)/u,p;return c?h<0?h=Math.exp(h*e.default.RESISTANCE_COEF)-1:h>f&&(h=f+1-Math.exp((f-h)*e.default.RESISTANCE_COEF)):h<0?(h=0,p=(h-i)*u+l):h>f&&(h=f,p=(h-i)*u+l),{index:h,startX:p}}return Zr}var ur={},fl;function gp(){if(fl)return ur;fl=1;var n=ar();Object.defineProperty(ur,"__esModule",{value:!0}),ur.default=void 0;var r=n(d),e=function(a,i){var s=!1,l=function(m){return m?m.key:"empty"};if(a.children.length&&i.children.length){var u=r.default.Children.map(a.children,l),c=u[a.index];if(c!=null){var f=r.default.Children.map(i.children,l),h=f[i.index];c===h&&(s=!0)}}return s},t=e;return ur.default=t,ur}var cr={},pl;function bp(){if(pl)return cr;pl=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.default=void 0;function n(e,t){var o=e%t;return o<0?o+t:o}var r=n;return cr.default=r,cr}var hl;function yp(){return hl||(hl=1,function(n){var r=ar();Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"checkIndexBounds",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"computeIndex",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(n,"constant",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"getDisplaySameSlide",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"mod",{enumerable:!0,get:function(){return i.default}});var e=r(mp()),t=r(vp()),o=r(cl()),a=r(gp()),i=r(bp())}(Ma)),Ma}var ml;function wp(){if(ml)return Mt;ml=1;var n=Fs(),r=ar();Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.getDomTreeShapes=w,Mt.findNativeHandler=D,Mt.default=Mt.SwipeableViewsContext=void 0;var e=r(Xf()),t=r(Zf()),o=r(ep()),a=r(tp()),i=r(op()),s=r(ap()),l=r(sp()),u=n(d),c=r(hp()),f=r(sl()),h=yp();function p(C,O,R,b){return C.addEventListener(O,R,b),{remove:function(){C.removeEventListener(O,R,b)}}}var m={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},v={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(O){return"translate(".concat(-O,"%, 0)")},"x-reverse":function(O){return"translate(".concat(O,"%, 0)")},y:function(O){return"translate(0, ".concat(-O,"%)")},"y-reverse":function(O){return"translate(0, ".concat(O,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function g(C,O){var R=O.duration,b=O.easeFunction,S=O.delay;return"".concat(C," ").concat(R," ").concat(b," ").concat(S)}function x(C,O){var R=v.rotationMatrix[O];return{pageX:R.x[0]*C.pageX+R.x[1]*C.pageY,pageY:R.y[0]*C.pageX+R.y[1]*C.pageY}}function E(C){return C.touches=[{pageX:C.pageX,pageY:C.pageY}],C}function w(C,O){for(var R=[];C&&C!==O&&C!==document.body&&!C.hasAttribute("data-swipeable");){var b=window.getComputedStyle(C);b.getPropertyValue("position")==="absolute"||b.getPropertyValue("overflow-x")==="hidden"?R=[]:(C.clientWidth>0&&C.scrollWidth>C.clientWidth||C.clientHeight>0&&C.scrollHeight>C.clientHeight)&&R.push({element:C,scrollWidth:C.scrollWidth,scrollHeight:C.scrollHeight,clientWidth:C.clientWidth,clientHeight:C.clientHeight,scrollLeft:C.scrollLeft,scrollTop:C.scrollTop}),C=C.parentNode}return R}var k=null;function D(C){var O=C.domTreeShapes,R=C.pageX,b=C.startX,S=C.axis;return O.some(function(L){var P=R>=b;(S==="x"||S==="y")&&(P=!P);var N=Math.round(L[v.scrollPosition[S]]),z=N>0,I=N+L[v.clientLength[S]]<L[v.scrollLength[S]];return P&&I||!P&&z?(k=L.element,!0):!1})}var T=u.createContext();Mt.SwipeableViewsContext=T,process.env.NODE_ENV!=="production"&&(T.displayName="SwipeableViewsContext");var $=function(C){(0,l.default)(O,C);function O(R){var b;return(0,o.default)(this,O),b=(0,i.default)(this,(0,s.default)(O).call(this,R)),b.rootNode=null,b.containerNode=null,b.ignoreNextScrollEvents=!1,b.viewLength=0,b.startX=0,b.lastX=0,b.vx=0,b.startY=0,b.isSwiping=void 0,b.started=!1,b.startIndex=0,b.transitionListener=null,b.touchMoveListener=null,b.activeSlide=null,b.indexCurrent=null,b.firstRenderTimeout=null,b.setRootNode=function(S){b.rootNode=S},b.setContainerNode=function(S){b.containerNode=S},b.setActiveSlide=function(S){b.activeSlide=S,b.updateHeight()},b.handleSwipeStart=function(S){var L=b.props.axis,P=x(S.touches[0],L);b.viewLength=b.rootNode.getBoundingClientRect()[v.length[L]],b.startX=P.pageX,b.lastX=P.pageX,b.vx=0,b.startY=P.pageY,b.isSwiping=void 0,b.started=!0;var N=window.getComputedStyle(b.containerNode),z=N.getPropertyValue("-webkit-transform")||N.getPropertyValue("transform");if(z&&z!=="none"){var I=z.split("(")[1].split(")")[0].split(","),te=window.getComputedStyle(b.rootNode),M=x({pageX:parseInt(I[4],10),pageY:parseInt(I[5],10)},L);b.startIndex=-M.pageX/(b.viewLength-parseInt(te.paddingLeft,10)-parseInt(te.paddingRight,10))||0}},b.handleSwipeMove=function(S){if(!b.started){b.handleTouchStart(S);return}if(!(k!==null&&k!==b.rootNode)){var L=b.props,P=L.axis,N=L.children,z=L.ignoreNativeScroll,I=L.onSwitching,te=L.resistance,M=x(S.touches[0],P);if(b.isSwiping===void 0){var j=Math.abs(M.pageX-b.startX),Q=Math.abs(M.pageY-b.startY),W=j>Q&&j>h.constant.UNCERTAINTY_THRESHOLD;if(!te&&(P==="y"||P==="y-reverse")&&(b.indexCurrent===0&&b.startX<M.pageX||b.indexCurrent===u.Children.count(b.props.children)-1&&b.startX>M.pageX)){b.isSwiping=!1;return}if(j>Q&&S.preventDefault(),W===!0||Q>h.constant.UNCERTAINTY_THRESHOLD){b.isSwiping=W,b.startX=M.pageX;return}}if(b.isSwiping===!0){S.preventDefault(),b.vx=b.vx*.5+(M.pageX-b.lastX)*.5,b.lastX=M.pageX;var F=(0,h.computeIndex)({children:N,resistance:te,pageX:M.pageX,startIndex:b.startIndex,startX:b.startX,viewLength:b.viewLength}),ne=F.index,q=F.startX;if(k===null&&!z){var A=w(S.target,b.rootNode),H=D({domTreeShapes:A,startX:b.startX,pageX:M.pageX,axis:P});if(H)return}q?b.startX=q:k===null&&(k=b.rootNode),b.setIndexCurrent(ne);var G=function(){I&&I(ne,"move")};(b.state.displaySameSlide||!b.state.isDragging)&&b.setState({displaySameSlide:!1,isDragging:!0},G),G()}}},b.handleSwipeEnd=function(){if(k=null,!!b.started&&(b.started=!1,b.isSwiping===!0)){var S=b.state.indexLatest,L=b.indexCurrent,P=S-L,N;Math.abs(b.vx)>b.props.threshold?b.vx>0?N=Math.floor(L):N=Math.ceil(L):Math.abs(P)>b.props.hysteresis?N=P>0?Math.floor(L):Math.ceil(L):N=S;var z=u.Children.count(b.props.children)-1;N<0?N=0:N>z&&(N=z),b.setIndexCurrent(N),b.setState({indexLatest:N,isDragging:!1},function(){b.props.onSwitching&&b.props.onSwitching(N,"end"),b.props.onChangeIndex&&N!==S&&b.props.onChangeIndex(N,S,{reason:"swipe"}),L===S&&b.handleTransitionEnd()})}},b.handleTouchStart=function(S){b.props.onTouchStart&&b.props.onTouchStart(S),b.handleSwipeStart(S)},b.handleTouchEnd=function(S){b.props.onTouchEnd&&b.props.onTouchEnd(S),b.handleSwipeEnd(S)},b.handleMouseDown=function(S){b.props.onMouseDown&&b.props.onMouseDown(S),S.persist(),b.handleSwipeStart(E(S))},b.handleMouseUp=function(S){b.props.onMouseUp&&b.props.onMouseUp(S),b.handleSwipeEnd(E(S))},b.handleMouseLeave=function(S){b.props.onMouseLeave&&b.props.onMouseLeave(S),b.started&&b.handleSwipeEnd(E(S))},b.handleMouseMove=function(S){b.props.onMouseMove&&b.props.onMouseMove(S),b.started&&b.handleSwipeMove(E(S))},b.handleScroll=function(S){if(b.props.onScroll&&b.props.onScroll(S),S.target===b.rootNode){if(b.ignoreNextScrollEvents){b.ignoreNextScrollEvents=!1;return}var L=b.state.indexLatest,P=Math.ceil(S.target.scrollLeft/S.target.clientWidth)+L;b.ignoreNextScrollEvents=!0,S.target.scrollLeft=0,b.props.onChangeIndex&&P!==L&&b.props.onChangeIndex(P,L,{reason:"focus"})}},b.updateHeight=function(){if(b.activeSlide!==null){var S=b.activeSlide.children[0];S!==void 0&&S.offsetHeight!==void 0&&b.state.heightLatest!==S.offsetHeight&&b.setState({heightLatest:S.offsetHeight})}},process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(R),b.state={indexLatest:R.index,isDragging:!1,renderOnlyActive:!R.disableLazyLoading,heightLatest:0,displaySameSlide:!0},b.setIndexCurrent(R.index),b}return(0,a.default)(O,[{key:"componentDidMount",value:function(){var b=this;this.transitionListener=p(this.containerNode,"transitionend",function(S){S.target===b.containerNode&&b.handleTransitionEnd()}),this.touchMoveListener=p(this.rootNode,"touchmove",function(S){b.props.disabled||b.handleSwipeMove(S)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){b.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(b){var S=b.index;typeof S=="number"&&S!==this.props.index&&(process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(b),this.setIndexCurrent(S),this.setState({displaySameSlide:(0,h.getDisplaySameSlide)(this.props,b),indexLatest:S}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var b=this;return{slideUpdateHeight:function(){b.updateHeight()}}}},{key:"setIndexCurrent",value:function(b){if(!this.props.animateTransitions&&this.indexCurrent!==b&&this.handleTransitionEnd(),this.indexCurrent=b,this.containerNode){var S=this.props.axis,L=v.transform[S](b*100);this.containerNode.style.WebkitTransform=L,this.containerNode.style.transform=L}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var b=this,S=this.props;S.action;var L=S.animateHeight,P=S.animateTransitions,N=S.axis,z=S.children,I=S.containerStyle,te=S.disabled;S.disableLazyLoading;var M=S.enableMouseEvents;S.hysteresis,S.ignoreNativeScroll,S.index,S.onChangeIndex,S.onSwitching,S.onTransitionEnd,S.resistance;var j=S.slideStyle,Q=S.slideClassName,W=S.springConfig,F=S.style;S.threshold;var ne=(0,t.default)(S,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),q=this.state,A=q.displaySameSlide,H=q.heightLatest,G=q.indexLatest,X=q.isDragging,Pe=q.renderOnlyActive,U=te?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},Xe=!te&&M?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{};process.env.NODE_ENV!=="production"&&(0,f.default)(!L||!I||!I.height,`react-swipeable-view: You are setting animateHeight to true but you are
50
+ also providing a custom height.
51
+ The custom height has a higher priority than the animateHeight property.
52
+ So animateHeight is most likely having no effect at all.`);var zt=(0,e.default)({},m.slide,j),ut,Ct;if(X||!P||A)ut="all 0s ease 0s",Ct="all 0s ease 0s";else if(ut=g("transform",W),Ct=g("-webkit-transform",W),H!==0){var jr=", ".concat(g("height",W));ut+=jr,Ct+=jr}var Sn={height:null,WebkitFlexDirection:v.flexDirection[N],flexDirection:v.flexDirection[N],WebkitTransition:Ct,transition:ut};if(!Pe){var kn=v.transform[N](this.indexCurrent*100);Sn.WebkitTransform=kn,Sn.transform=kn}return L&&(Sn.height=H),u.createElement(T.Provider,{value:this.getSwipeableViewsContext()},u.createElement("div",(0,e.default)({ref:this.setRootNode,style:(0,e.default)({},v.root[N],F)},ne,U,Xe,{onScroll:this.handleScroll}),u.createElement("div",{ref:this.setContainerNode,style:(0,e.default)({},Sn,m.container,I),className:"react-swipeable-view-container"},u.Children.map(z,function(Wr,ra){if(Pe&&ra!==G)return null;process.env.NODE_ENV!=="production"&&(0,f.default)(u.isValidElement(Wr),"react-swipeable-view: one of the children provided is invalid: ".concat(Wr,`.
53
+ We are expecting a valid React Element`));var Jn,oa=!0;return ra===G&&(oa=!1,L&&(Jn=b.setActiveSlide,zt.overflowY="hidden")),u.createElement("div",{ref:Jn,style:zt,className:Q,"aria-hidden":oa,"data-swipeable":"true"},Wr)}))))}}]),O}(u.Component);$.displayName="ReactSwipableView",$.propTypes=process.env.NODE_ENV!=="production"?{action:c.default.func,animateHeight:c.default.bool,animateTransitions:c.default.bool,axis:c.default.oneOf(["x","x-reverse","y","y-reverse"]),children:c.default.node.isRequired,containerStyle:c.default.object,disabled:c.default.bool,disableLazyLoading:c.default.bool,enableMouseEvents:c.default.bool,hysteresis:c.default.number,ignoreNativeScroll:c.default.bool,index:c.default.number,onChangeIndex:c.default.func,onMouseDown:c.default.func,onMouseLeave:c.default.func,onMouseMove:c.default.func,onMouseUp:c.default.func,onScroll:c.default.func,onSwitching:c.default.func,onTouchEnd:c.default.func,onTouchMove:c.default.func,onTouchStart:c.default.func,onTransitionEnd:c.default.func,resistance:c.default.bool,slideClassName:c.default.string,slideStyle:c.default.object,springConfig:c.default.shape({delay:c.default.string,duration:c.default.string,easeFunction:c.default.string}),style:c.default.object,threshold:c.default.number}:{},$.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var _=$;return Mt.default=_,Mt}var vl;function xp(){return vl||(vl=1,function(n){var r=Fs();Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"SwipeableViewsContext",{enumerable:!0,get:function(){return e.SwipeableViewsContext}});var e=r(wp())}(da)),da}var Ep=xp();const Dp=pf(Ep),Sp=({className:n,tabList:r,isCuratedcontent:e,unswipeableContent:t,defaultIndex:o=0,onTabChange:a,disabled:i})=>{const[s,l]=d.useState(o),u=d.useRef(null),c=p=>{p.current&&window.scrollTo({top:p.current.offsetTop-50,behavior:"smooth"})},f=p=>{l(p),c(u),a==null||a(p)},h=()=>{const m=100/r.length;return{width:`${m}%`,left:`${s*m}%`}};return Y.jsxs("div",{ref:u,className:"w-full",children:[Y.jsxs("div",{className:tt(n==null?void 0:n.Tab,`z-50 mb-[20px] flex w-full flex-col bg-white ${e&&"sticky top-[50px]"}`),children:[Y.jsx("div",{className:"flex",children:r.map((p,m)=>Y.jsx("div",{className:"flex flex-1 flex-col",children:Y.jsx("button",{className:tt(n==null?void 0:n.tabTitle,`cursor-pointer ${s===m?"text-petnow-grey-30 text-label-large":"text-petnow-grey-70 text-body-large disabled:opacity-40"}`),onClick:()=>f(m),disabled:i,children:p.displayName})},p.key))}),Y.jsx("div",{className:`relative h-[2px] w-full ${i?"bg-petnow-grey-70/40":"bg-petnow-grey-70"}`,children:Y.jsx("div",{className:tt(n==null?void 0:n.underline,"bg-petnow-grey-30 absolute h-[2px] transition-all duration-200"),style:h()})})]}),t,Y.jsx(Dp,{index:s,onChangeIndex:p=>{l(p),a==null||a(p)},disabled:i,children:r.map(p=>Y.jsx("div",{children:p.content},p.key))})]})},kp=({className:n,id:r,onChange:e,disabled:t,isChecked:o})=>Y.jsxs("label",{className:"relative flex h-min w-min cursor-pointer items-center rounded-full",htmlFor:r,children:[Y.jsx("input",{type:"checkbox",disabled:t,className:tt(n,"before:content[''] peer bg-petnow-grey-primary checked:border-petnow-orange-primary checked:bg-petnow-orange-primary checked:before:bg-petnow-orange-primary border-petnow-grey-primary relative size-6 cursor-pointer appearance-none rounded-xl border transition-all before:absolute before:top-2/4 before:left-2/4 before:block before:h-6 before:w-6 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity"),id:r,checked:o,onChange:a=>{e(a.target.checked)}}),Y.jsx("span",{className:"text-petnow-grey-secondary pointer-events-none absolute top-2/4 left-2/4 -translate-x-2/4 -translate-y-2/4 transition peer-checked:text-white",children:Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:Y.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),_p=({className:n,text:r,isSelected:e,onClick:t,disabled:o})=>Y.jsx("button",{className:tt(n,`keen-slider__slide text-body-medium rounded-full border-1 px-[12px] py-[6px] whitespace-nowrap ${e?"border-petnow-orange-primary bg-petnow-orange-secondary text-petnow-orange-primary":"border-petnow-grey-90 disabled:opacity-40"}`),onClick:t,style:{width:"min-content",minWidth:"fit-content"},disabled:o,children:r}),gl=typeof document<"u"?d.useLayoutEffect:()=>{};function Cp(n){const r=d.useRef(null);return gl(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const Ut=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},ln=n=>n&&"window"in n&&n.window===n?n:Ut(n).defaultView||window;function Op(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function Mp(n){return Op(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let Tp=!1;function Ta(){return Tp}function bl(n,r){if(!Ta())return r&&n?n.contains(r):!1;if(!n||!r)return!1;let e=r;for(;e!==null;){if(e===n)return!0;e.tagName==="SLOT"&&e.assignedSlot?e=e.assignedSlot.parentNode:Mp(e)?e=e.host:e=e.parentNode}return!1}const Pa=(n=document)=>{var r;if(!Ta())return n.activeElement;let e=n.activeElement;for(;e&&"shadowRoot"in e&&(!((r=e.shadowRoot)===null||r===void 0)&&r.activeElement);)e=e.shadowRoot.activeElement;return e};function yl(n){return Ta()&&n.target.shadowRoot&&n.composedPath?n.composedPath()[0]:n.target}function eo(n){var r;return typeof window>"u"||window.navigator==null?!1:((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands.some(e=>n.test(e.brand)))||n.test(window.navigator.userAgent)}function Ia(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function Tt(n){if(process.env.NODE_ENV==="test")return n;let r=null;return()=>(r==null&&(r=n()),r)}const Na=Tt(function(){return Ia(/^Mac/i)}),Pp=Tt(function(){return Ia(/^iPhone/i)}),Ip=Tt(function(){return Ia(/^iPad/i)||Na()&&navigator.maxTouchPoints>1}),Np=Tt(function(){return Pp()||Ip()});Tt(function(){return Na()||Np()}),Tt(function(){return eo(/AppleWebKit/i)&&!Lp()});const Lp=Tt(function(){return eo(/Chrome/i)}),Fp=Tt(function(){return eo(/Android/i)});Tt(function(){return eo(/Firefox/i)});function wl(){let n=d.useRef(new Map),r=d.useCallback((o,a,i,s)=>{let l=s!=null&&s.once?(...u)=>{n.current.delete(i),i(...u)}:i;n.current.set(i,{type:a,eventTarget:o,fn:l,options:s}),o.addEventListener(a,l,s)},[]),e=d.useCallback((o,a,i,s)=>{var l;let u=((l=n.current.get(i))===null||l===void 0?void 0:l.fn)||i;o.removeEventListener(a,u,s),n.current.delete(i)},[]),t=d.useCallback(()=>{n.current.forEach((o,a)=>{e(o.eventTarget,o.type,a,o.options)})},[e]);return d.useEffect(()=>t,[t]),{addGlobalListener:r,removeGlobalListener:e,removeAllGlobalListeners:t}}function $p(n){return n.mozInputSource===0&&n.isTrusted?!0:Fp()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function xl(n){let r=n;return r.nativeEvent=n,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function Ap(n,r){Object.defineProperty(n,"target",{value:r}),Object.defineProperty(n,"currentTarget",{value:r})}function El(n){let r=d.useRef({isFocused:!1,observer:null});gl(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=Cp(t=>{n==null||n(t)});return d.useCallback(t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){r.current.isFocused=!0;let o=t.target,a=i=>{if(r.current.isFocused=!1,o.disabled){let s=xl(i);e(s)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&o.disabled){var i;(i=r.current.observer)===null||i===void 0||i.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),r.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let Yp=!1,dr=null,La=new Set,fr=new Map,un=!1,Fa=!1;const Rp={Tab:!0,Escape:!0};function $a(n,r){for(let e of La)e(n,r)}function jp(n){return!(n.metaKey||!Na()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function to(n){un=!0,jp(n)&&(dr="keyboard",$a("keyboard",n))}function nt(n){dr="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(un=!0,$a("pointer",n))}function Dl(n){$p(n)&&(un=!0,dr="virtual")}function Sl(n){n.target===window||n.target===document||Yp||!n.isTrusted||(!un&&!Fa&&(dr="virtual",$a("virtual",n)),un=!1,Fa=!1)}function kl(){un=!1,Fa=!0}function Aa(n){if(typeof window>"u"||fr.get(ln(n)))return;const r=ln(n),e=Ut(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){un=!0,t.apply(this,arguments)},e.addEventListener("keydown",to,!0),e.addEventListener("keyup",to,!0),e.addEventListener("click",Dl,!0),r.addEventListener("focus",Sl,!0),r.addEventListener("blur",kl,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",nt,!0),e.addEventListener("pointermove",nt,!0),e.addEventListener("pointerup",nt,!0)):process.env.NODE_ENV==="test"&&(e.addEventListener("mousedown",nt,!0),e.addEventListener("mousemove",nt,!0),e.addEventListener("mouseup",nt,!0)),r.addEventListener("beforeunload",()=>{_l(n)},{once:!0}),fr.set(r,{focus:t})}const _l=(n,r)=>{const e=ln(n),t=Ut(n);r&&t.removeEventListener("DOMContentLoaded",r),fr.has(e)&&(e.HTMLElement.prototype.focus=fr.get(e).focus,t.removeEventListener("keydown",to,!0),t.removeEventListener("keyup",to,!0),t.removeEventListener("click",Dl,!0),e.removeEventListener("focus",Sl,!0),e.removeEventListener("blur",kl,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",nt,!0),t.removeEventListener("pointermove",nt,!0),t.removeEventListener("pointerup",nt,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",nt,!0),t.removeEventListener("mousemove",nt,!0),t.removeEventListener("mouseup",nt,!0)),fr.delete(e))};function Wp(n){const r=Ut(n);let e;return r.readyState!=="loading"?Aa(n):(e=()=>{Aa(n)},r.addEventListener("DOMContentLoaded",e)),()=>_l(n,e)}typeof document<"u"&&Wp();function Cl(){return dr!=="pointer"}const Hp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Bp(n,r,e){let t=Ut(e==null?void 0:e.target);const o=typeof window<"u"?ln(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?ln(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?ln(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?ln(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||t.activeElement instanceof o&&!Hp.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(n&&r==="keyboard"&&e instanceof s&&!Rp[e.key])}function Vp(n,r,e){Aa(),d.useEffect(()=>{let t=(o,a)=>{Bp(!!(e!=null&&e.isTextInput),o,a)&&n(Cl())};return La.add(t),()=>{La.delete(t)}},r)}function zp(n){let{isDisabled:r,onFocus:e,onBlur:t,onFocusChange:o}=n;const a=d.useCallback(l=>{if(l.target===l.currentTarget)return t&&t(l),o&&o(!1),!0},[t,o]),i=El(a),s=d.useCallback(l=>{const u=Ut(l.target),c=u?Pa(u):Pa();l.target===l.currentTarget&&c===yl(l.nativeEvent)&&(e&&e(l),o&&o(!0),i(l))},[o,e,i]);return{focusProps:{onFocus:!r&&(e||o||t)?s:void 0,onBlur:!r&&(t||o)?a:void 0}}}function qp(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=wl(),l=d.useCallback(f=>{f.currentTarget.contains(f.target)&&a.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(a.current.isFocusWithin=!1,s(),e&&e(f),o&&o(!1))},[e,o,a,s]),u=El(l),c=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=Ut(f.target),p=Pa(h);if(!a.current.isFocusWithin&&p===yl(f.nativeEvent)){t&&t(f),o&&o(!0),a.current.isFocusWithin=!0,u(f);let m=f.currentTarget;i(h,"focus",v=>{if(a.current.isFocusWithin&&!bl(m,v.target)){let g=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});Ap(g,m);let x=xl(g);l(x)}},{capture:!0})}},[t,o,u,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}let no=!1,Ya=0;function Ra(){no=!0,setTimeout(()=>{no=!1},50)}function Ol(n){n.pointerType==="touch"&&Ra()}function Up(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Ol):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ra),Ya++,()=>{Ya--,!(Ya>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ol):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ra))}}function ja(n){let{onHoverStart:r,onHoverChange:e,onHoverEnd:t,isDisabled:o}=n,[a,i]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(Up,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=wl(),{hoverProps:c,triggerHoverEnd:f}=d.useMemo(()=>{let h=(v,g)=>{if(s.pointerType=g,o||g==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let x=v.currentTarget;s.target=x,l(Ut(v.target),"pointerover",E=>{s.isHovered&&s.target&&!bl(s.target,E.target)&&p(E,E.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:x,pointerType:g}),e&&e(!0),i(!0)},p=(v,g)=>{let x=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!x)&&(s.isHovered=!1,u(),t&&t({type:"hoverend",target:x,pointerType:g}),e&&e(!1),i(!1))},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=v=>{no&&v.pointerType==="mouse"||h(v,v.pointerType)},m.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(m.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!no&&h(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,"mouse")}),{hoverProps:m,triggerHoverEnd:p}},[r,e,t,o,s,l,u]);return d.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}function Wa(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||Cl()}),[a,i]=d.useState(!1),[s,l]=d.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=d.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=d.useCallback(p=>{o.current.isFocused=p,i(p),u()},[u]);Vp(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:e});let{focusProps:f}=zp({isDisabled:t,onFocusChange:c}),{focusWithinProps:h}=qp({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?h:f}}var Qp=Object.defineProperty,Gp=(n,r,e)=>r in n?Qp(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Ha=(n,r,e)=>(Gp(n,typeof r!="symbol"?r+"":r,e),e);let Kp=class{constructor(){Ha(this,"current",this.detect()),Ha(this,"handoffState","pending"),Ha(this,"currentId",0)}set(r){this.current!==r&&(this.handoffState="pending",this.currentId=0,this.current=r)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},cn=new Kp;function dn(n){var r,e;return cn.isServer?null:n?"ownerDocument"in n?n.ownerDocument:"current"in n?(e=(r=n.current)==null?void 0:r.ownerDocument)!=null?e:document:null:document}function ro(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function rt(){let n=[],r={addEventListener(e,t,o,a){return e.addEventListener(t,o,a),r.add(()=>e.removeEventListener(t,o,a))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return ro(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,o){let a=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:o}),this.add(()=>{Object.assign(e.style,{[t]:a})})},group(e){let t=rt();return e(t),this.add(()=>t.dispose())},add(e){return n.includes(e)||n.push(e),()=>{let t=n.indexOf(e);if(t>=0)for(let o of n.splice(t,1))o()}},dispose(){for(let e of n.splice(0))e()}};return r}function Qt(){let[n]=d.useState(rt);return d.useEffect(()=>()=>n.dispose(),[n]),n}let fe=(n,r)=>{cn.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function Pt(n){let r=d.useRef(n);return fe(()=>{r.current=n},[n]),r}let ee=function(n){let r=Pt(n);return d.useCallback((...e)=>r.current(...e),[r])};function Xp(n){let r=n.width/2,e=n.height/2;return{top:n.clientY-e,right:n.clientX+r,bottom:n.clientY+e,left:n.clientX-r}}function Jp(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function Ml({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=Qt(),a=ee(()=>{r.current=null,t(!1),o.dispose()}),i=ee(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=dn(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",u=>{if(r.current){let c=Xp(u);t(Jp(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Zp=d.createContext(void 0);function oo(){return d.useContext(Zp)}function Ba(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Le(n,r,...e){if(n in r){let o=r[n];return typeof o=="function"?o(...e):o}let t=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}var Gt=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(Gt||{}),Kt=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(Kt||{});function Me(){let n=th();return d.useCallback(r=>eh({mergeRefs:n,...r}),[n])}function eh({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??nh;let l=Tl(r,n);if(a)return ao(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return ao(f,e,t,i,s)}if(u&1){let{unmount:c=!0,...f}=l;return Le(c?0:1,{0(){return null},1(){return ao({...f,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return ao(l,e,t,i,s)}function ao(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=Va(n,["unmount","static"]),u=n.ref!==void 0?{[s]:n.ref}:{},c=typeof i=="function"?i(r):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(r)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(r){let h=!1,p=[];for(let[m,v]of Object.entries(r))typeof v=="boolean"&&(h=!0),v===!0&&p.push(m.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let m of p)f[`data-${m}`]=""}}if(a===d.Fragment&&(Object.keys(Xt(l)).length>0||Object.keys(Xt(f)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Xt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${t} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Xt(l)).concat(Object.keys(Xt(f))).map(h=>` - ${h}`).join(`
54
+ `),"","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(h=>` - ${h}`).join(`
27
55
  `)].join(`
28
- `))}else{let m=c.props,f=m==null?void 0:m.className,h=typeof f=="function"?(...w)=>Vo(f(...w),l.className):Vo(f,l.className),v=h?{className:h}:{},g=Vi(c.props,At(zo(l,["ref"])));for(let w in p)w in g&&delete p[w];return d.cloneElement(c,Object.assign({},g,p,u,{ref:o($d(c),u.ref)},v))}return d.createElement(a,Object.assign({},zo(l,["ref"]),a!==d.Fragment&&u,a!==d.Fragment&&p),c)}function Fd(){let n=d.useRef([]),r=d.useCallback(e=>{for(let t of n.current)t!=null&&(typeof t=="function"?t(e):t.current=e)},[]);return(...e)=>{if(!e.every(t=>t==null))return n.current=e,r}}function Ld(...n){return n.every(r=>r==null)?void 0:r=>{for(let e of n)e!=null&&(typeof e=="function"?e(r):e.current=r)}}function Vi(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let t of n)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(e[o]!=null||(e[o]=[]),e[o].push(t[o])):r[o]=t[o];if(r.disabled||r["aria-disabled"])for(let t in e)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(t)&&(e[t]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let t in e)Object.assign(r,{[t](o,...a){let i=e[t];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...a)}}});return r}function Hn(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let t of n)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(e[o]!=null||(e[o]=[]),e[o].push(t[o])):r[o]=t[o];for(let t in e)Object.assign(r,{[t](...o){let a=e[t];for(let i of a)i==null||i(...o)}});return r}function De(n){var r;return Object.assign(d.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function At(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function zo(n,r=[]){let e=Object.assign({},n);for(let t of r)t in e&&delete e[t];return e}function $d(n){return d.version.split(".")[0]>="19"?n.props.ref:n.ref}function zi(n,r,e){let[t,o]=d.useState(e),a=n!==void 0,i=d.useRef(a),s=d.useRef(!1),l=d.useRef(!1);return a&&!i.current&&!s.current?(s.current=!0,i.current=a,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.")):!a&&i.current&&!l.current&&(l.current=!0,i.current=a,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.")),[a?n:t,V(u=>(a||o(u),r==null?void 0:r(u)))]}function Ui(n){let[r]=d.useState(n);return r}function Qi(n={},r=null,e=[]){for(let[t,o]of Object.entries(n))qi(e,Ki(r,t),o);return e}function Ki(n,r){return n?n+"["+r+"]":r}function qi(n,r,e){if(Array.isArray(e))for(let[t,o]of e.entries())qi(n,Ki(r,t.toString()),o);else e instanceof Date?n.push([r,e.toISOString()]):typeof e=="boolean"?n.push([r,e?"1":"0"]):typeof e=="string"?n.push([r,e]):typeof e=="number"?n.push([r,`${e}`]):e==null?n.push([r,""]):Qi(e,r,n)}function Ad(n){var r,e;let t=(r=n==null?void 0:n.form)!=null?r:n.closest("form");if(t){for(let o of t.elements)if(o!==n&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(e=t.requestSubmit)==null||e.call(t)}}let Yd="span";var mn=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(mn||{});function Wd(n,r){var e;let{features:t=1,...o}=n,a={ref:r,"aria-hidden":(t&2)===2?!0:(e=o["aria-hidden"])!=null?e:void 0,hidden:(t&4)===4?!0: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",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return Ce()({ourProps:a,theirProps:o,slot:{},defaultTag:Yd,name:"Hidden"})}let Rn=De(Wd),jd=d.createContext(null);function Hd({children:n}){let r=d.useContext(jd);if(!r)return d.createElement(d.Fragment,null,n);let{target:e}=r;return e?Se.createPortal(d.createElement(d.Fragment,null,n),e):null}function Gi({data:n,form:r,disabled:e,onReset:t,overrides:o}){let[a,i]=d.useState(null),s=Ft();return d.useEffect(()=>{if(t&&a)return s.addEventListener(a,"reset",t)},[a,r,t]),d.createElement(Hd,null,d.createElement(Rd,{setForm:i,formId:r}),Qi(n).map(([l,u])=>d.createElement(Rn,{features:mn.Hidden,...At({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:e,name:l,value:u,...o})})))}function Rd({setForm:n,formId:r}){return d.useEffect(()=>{if(r){let e=document.getElementById(r);e&&n(e)}},[n,r]),r?null:d.createElement(Rn,{features:mn.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&n(t)}})}let Bd=d.createContext(void 0);function Uo(){return d.useContext(Bd)}function Xi(n){let r=n.parentElement,e=null;for(;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(e=r),r=r.parentElement;let t=(r==null?void 0:r.getAttribute("disabled"))==="";return t&&Vd(e)?!1:t}function Vd(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(r instanceof HTMLLegendElement)return!1;r=r.previousElementSibling}return!0}let Ji=Symbol();function zd(n,r=!0){return Object.assign(n,{[Ji]:r})}function Le(...n){let r=d.useRef(n);d.useEffect(()=>{r.current=n},[n]);let e=V(t=>{for(let o of r.current)o!=null&&(typeof o=="function"?o(t):o.current=t)});return n.every(t=>t==null||(t==null?void 0:t[Ji]))?void 0:e}let _r=d.createContext(null);_r.displayName="DescriptionContext";function Zi(){let n=d.useContext(_r);if(n===null){let r=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Zi),r}return n}function es(){var n,r;return(r=(n=d.useContext(_r))==null?void 0:n.value)!=null?r:void 0}function Ud(){let[n,r]=d.useState([]);return[n.length>0?n.join(" "):void 0,d.useMemo(()=>function(e){let t=V(a=>(r(i=>[...i,a]),()=>r(i=>{let s=i.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),o=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(_r.Provider,{value:o},e.children)},[r])]}let Qd="p";function Kd(n,r){let e=d.useId(),t=Sr(),{id:o=`headlessui-description-${e}`,...a}=n,i=Zi(),s=Le(r);ce(()=>i.register(o),[o,i.register]);let l=t||!1,u=d.useMemo(()=>({...i.slot,disabled:l}),[i.slot,l]),c={ref:s,...i.props,id:o};return Ce()({ourProps:c,theirProps:a,slot:u,defaultTag:Qd,name:i.name||"Description"})}let qd=De(Kd),ts=Object.assign(qd,{});var de=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(de||{});let Or=d.createContext(null);Or.displayName="LabelContext";function ns(){let n=d.useContext(Or);if(n===null){let r=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,ns),r}return n}function Bn(n){var r,e,t;let o=(e=(r=d.useContext(Or))==null?void 0:r.value)!=null?e:void 0;return((t=n==null?void 0:n.length)!=null?t:0)>0?[o,...n].filter(Boolean).join(" "):o}function rs({inherit:n=!1}={}){let r=Bn(),[e,t]=d.useState([]),o=n?[r,...e].filter(Boolean):e;return[o.length>0?o.join(" "):void 0,d.useMemo(()=>function(a){let i=V(l=>(t(u=>[...u,l]),()=>t(u=>{let c=u.slice(),p=c.indexOf(l);return p!==-1&&c.splice(p,1),c}))),s=d.useMemo(()=>({register:i,slot:a.slot,name:a.name,props:a.props,value:a.value}),[i,a.slot,a.name,a.props,a.value]);return d.createElement(Or.Provider,{value:s},a.children)},[t])]}let Gd="label";function Xd(n,r){var e;let t=d.useId(),o=ns(),a=Uo(),i=Sr(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((e=o.props)==null?void 0:e.htmlFor),passive:u=!1,...c}=n,p=Le(r);ce(()=>o.register(s),[s,o.register]);let m=V(g=>{let w=g.currentTarget;if(w instanceof HTMLLabelElement&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),w instanceof HTMLLabelElement){let y=document.getElementById(w.htmlFor);if(y){let x=y.getAttribute("disabled");if(x==="true"||x==="")return;let E=y.getAttribute("aria-disabled");if(E==="true"||E==="")return;(y instanceof HTMLInputElement&&(y.type==="radio"||y.type==="checkbox")||y.role==="radio"||y.role==="checkbox"||y.role==="switch")&&y.click(),y.focus({preventScroll:!0})}}}),f=i||!1,h=d.useMemo(()=>({...o.slot,disabled:f}),[o.slot,f]),v={ref:p,...o.props,id:s,htmlFor:l,onClick:m};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in c&&delete c.onClick),Ce()({ourProps:v,theirProps:c,slot:h,defaultTag:l?Gd:"div",name:o.name||"Label"})}let Jd=De(Xd),Mr=Object.assign(Jd,{}),Zd=d.createContext(()=>{});function ef({value:n,children:r}){return d.createElement(Zd.Provider,{value:n},r)}function hn(n,r,e){let t=e.initialDeps??[],o;function a(){var i,s,l,u;let c;e.key&&((i=e.debug)!=null&&i.call(e))&&(c=Date.now());const p=n();if(!(p.length!==t.length||p.some((h,v)=>t[v]!==h)))return o;t=p;let f;if(e.key&&((s=e.debug)!=null&&s.call(e))&&(f=Date.now()),o=r(...p),e.key&&((l=e.debug)!=null&&l.call(e))){const h=Math.round((Date.now()-c)*100)/100,v=Math.round((Date.now()-f)*100)/100,g=v/16,w=(y,x)=>{for(y=String(y);y.length<x;)y=" "+y;return y};console.info(`%c⏱ ${w(v,5)} /${w(h,5)} ms`,`
56
+ `))}else{let h=c.props,p=h==null?void 0:h.className,m=typeof p=="function"?(...x)=>Ba(p(...x),l.className):Ba(p,l.className),v=m?{className:m}:{},g=Tl(c.props,Xt(Va(l,["ref"])));for(let x in f)x in g&&delete f[x];return d.cloneElement(c,Object.assign({},g,f,u,{ref:o(rh(c),u.ref)},v))}return d.createElement(a,Object.assign({},Va(l,["ref"]),a!==d.Fragment&&u,a!==d.Fragment&&f),c)}function th(){let n=d.useRef([]),r=d.useCallback(e=>{for(let t of n.current)t!=null&&(typeof t=="function"?t(e):t.current=e)},[]);return(...e)=>{if(!e.every(t=>t==null))return n.current=e,r}}function nh(...n){return n.every(r=>r==null)?void 0:r=>{for(let e of n)e!=null&&(typeof e=="function"?e(r):e.current=r)}}function Tl(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let t of n)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(e[o]!=null||(e[o]=[]),e[o].push(t[o])):r[o]=t[o];if(r.disabled||r["aria-disabled"])for(let t in e)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(t)&&(e[t]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let t in e)Object.assign(r,{[t](o,...a){let i=e[t];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...a)}}});return r}function pr(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let t of n)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(e[o]!=null||(e[o]=[]),e[o].push(t[o])):r[o]=t[o];for(let t in e)Object.assign(r,{[t](...o){let a=e[t];for(let i of a)i==null||i(...o)}});return r}function Ce(n){var r;return Object.assign(d.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function Xt(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function Va(n,r=[]){let e=Object.assign({},n);for(let t of r)t in e&&delete e[t];return e}function rh(n){return d.version.split(".")[0]>="19"?n.props.ref:n.ref}function Pl(n,r,e){let[t,o]=d.useState(e),a=n!==void 0,i=d.useRef(a),s=d.useRef(!1),l=d.useRef(!1);return a&&!i.current&&!s.current?(s.current=!0,i.current=a,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.")):!a&&i.current&&!l.current&&(l.current=!0,i.current=a,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.")),[a?n:t,ee(u=>(a||o(u),r==null?void 0:r(u)))]}function Il(n){let[r]=d.useState(n);return r}function Nl(n={},r=null,e=[]){for(let[t,o]of Object.entries(n))Fl(e,Ll(r,t),o);return e}function Ll(n,r){return n?n+"["+r+"]":r}function Fl(n,r,e){if(Array.isArray(e))for(let[t,o]of e.entries())Fl(n,Ll(r,t.toString()),o);else e instanceof Date?n.push([r,e.toISOString()]):typeof e=="boolean"?n.push([r,e?"1":"0"]):typeof e=="string"?n.push([r,e]):typeof e=="number"?n.push([r,`${e}`]):e==null?n.push([r,""]):Nl(e,r,n)}function oh(n){var r,e;let t=(r=n==null?void 0:n.form)!=null?r:n.closest("form");if(t){for(let o of t.elements)if(o!==n&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(e=t.requestSubmit)==null||e.call(t)}}let ah="span";var Tn=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(Tn||{});function ih(n,r){var e;let{features:t=1,...o}=n,a={ref:r,"aria-hidden":(t&2)===2?!0:(e=o["aria-hidden"])!=null?e:void 0,hidden:(t&4)===4?!0: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",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return Me()({ourProps:a,theirProps:o,slot:{},defaultTag:ah,name:"Hidden"})}let hr=Ce(ih),sh=d.createContext(null);function lh({children:n}){let r=d.useContext(sh);if(!r)return d.createElement(d.Fragment,null,n);let{target:e}=r;return e?Ne.createPortal(d.createElement(d.Fragment,null,n),e):null}function $l({data:n,form:r,disabled:e,onReset:t,overrides:o}){let[a,i]=d.useState(null),s=Qt();return d.useEffect(()=>{if(t&&a)return s.addEventListener(a,"reset",t)},[a,r,t]),d.createElement(lh,null,d.createElement(uh,{setForm:i,formId:r}),Nl(n).map(([l,u])=>d.createElement(hr,{features:Tn.Hidden,...Xt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:e,name:l,value:u,...o})})))}function uh({setForm:n,formId:r}){return d.useEffect(()=>{if(r){let e=document.getElementById(r);e&&n(e)}},[n,r]),r?null:d.createElement(hr,{features:Tn.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&n(t)}})}let ch=d.createContext(void 0);function za(){return d.useContext(ch)}function qa(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function It(n){return qa(n)&&"tagName"in n}function Ke(n){return It(n)&&"accessKey"in n}function Nt(n){return It(n)&&"tabIndex"in n}function dh(n){return It(n)&&"style"in n}function fh(n){return Ke(n)&&n.nodeName==="IFRAME"}function io(n){return Ke(n)&&n.nodeName==="INPUT"}function Al(n){return Ke(n)&&n.nodeName==="LABEL"}function ph(n){return Ke(n)&&n.nodeName==="FIELDSET"}function Yl(n){return Ke(n)&&n.nodeName==="LEGEND"}function hh(n){return It(n)?n.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Rl(n){let r=n.parentElement,e=null;for(;r&&!ph(r);)Yl(r)&&(e=r),r=r.parentElement;let t=(r==null?void 0:r.getAttribute("disabled"))==="";return t&&mh(e)?!1:t}function mh(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(Yl(r))return!1;r=r.previousElementSibling}return!0}let jl=Symbol();function vh(n,r=!0){return Object.assign(n,{[jl]:r})}function Re(...n){let r=d.useRef(n);d.useEffect(()=>{r.current=n},[n]);let e=ee(t=>{for(let o of r.current)o!=null&&(typeof o=="function"?o(t):o.current=t)});return n.every(t=>t==null||(t==null?void 0:t[jl]))?void 0:e}let so=d.createContext(null);so.displayName="DescriptionContext";function Wl(){let n=d.useContext(so);if(n===null){let r=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Wl),r}return n}function Hl(){var n,r;return(r=(n=d.useContext(so))==null?void 0:n.value)!=null?r:void 0}function gh(){let[n,r]=d.useState([]);return[n.length>0?n.join(" "):void 0,d.useMemo(()=>function(e){let t=ee(a=>(r(i=>[...i,a]),()=>r(i=>{let s=i.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),o=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(so.Provider,{value:o},e.children)},[r])]}let bh="p";function yh(n,r){let e=d.useId(),t=oo(),{id:o=`headlessui-description-${e}`,...a}=n,i=Wl(),s=Re(r);fe(()=>i.register(o),[o,i.register]);let l=t||!1,u=d.useMemo(()=>({...i.slot,disabled:l}),[i.slot,l]),c={ref:s,...i.props,id:o};return Me()({ourProps:c,theirProps:a,slot:u,defaultTag:bh,name:i.name||"Description"})}let wh=Ce(yh),Bl=Object.assign(wh,{});var he=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(he||{});let lo=d.createContext(null);lo.displayName="LabelContext";function Vl(){let n=d.useContext(lo);if(n===null){let r=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Vl),r}return n}function mr(n){var r,e,t;let o=(e=(r=d.useContext(lo))==null?void 0:r.value)!=null?e:void 0;return((t=n==null?void 0:n.length)!=null?t:0)>0?[o,...n].filter(Boolean).join(" "):o}function zl({inherit:n=!1}={}){let r=mr(),[e,t]=d.useState([]),o=n?[r,...e].filter(Boolean):e;return[o.length>0?o.join(" "):void 0,d.useMemo(()=>function(a){let i=ee(l=>(t(u=>[...u,l]),()=>t(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,1),c}))),s=d.useMemo(()=>({register:i,slot:a.slot,name:a.name,props:a.props,value:a.value}),[i,a.slot,a.name,a.props,a.value]);return d.createElement(lo.Provider,{value:s},a.children)},[t])]}let xh="label";function Eh(n,r){var e;let t=d.useId(),o=Vl(),a=za(),i=oo(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((e=o.props)==null?void 0:e.htmlFor),passive:u=!1,...c}=n,f=Re(r);fe(()=>o.register(s),[s,o.register]);let h=ee(g=>{let x=g.currentTarget;if(!(g.target!==g.currentTarget&&hh(g.target))&&(Al(x)&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),Al(x))){let E=document.getElementById(x.htmlFor);if(E){let w=E.getAttribute("disabled");if(w==="true"||w==="")return;let k=E.getAttribute("aria-disabled");if(k==="true"||k==="")return;(io(E)&&(E.type==="file"||E.type==="radio"||E.type==="checkbox")||E.role==="radio"||E.role==="checkbox"||E.role==="switch")&&E.click(),E.focus({preventScroll:!0})}}}),p=i||!1,m=d.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),v={ref:f,...o.props,id:s,htmlFor:l,onClick:h};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in c&&delete c.onClick),Me()({ourProps:v,theirProps:c,slot:m,defaultTag:l?xh:"div",name:o.name||"Label"})}let Dh=Ce(Eh),uo=Object.assign(Dh,{}),Sh=d.createContext(()=>{});function kh({value:n,children:r}){return d.createElement(Sh.Provider,{value:n},r)}function Pn(n,r,e){let t=e.initialDeps??[],o;function a(){var i,s,l,u;let c;e.key&&((i=e.debug)!=null&&i.call(e))&&(c=Date.now());const f=n();if(!(f.length!==t.length||f.some((m,v)=>t[v]!==m)))return o;t=f;let p;if(e.key&&((s=e.debug)!=null&&s.call(e))&&(p=Date.now()),o=r(...f),e.key&&((l=e.debug)!=null&&l.call(e))){const m=Math.round((Date.now()-c)*100)/100,v=Math.round((Date.now()-p)*100)/100,g=v/16,x=(E,w)=>{for(E=String(E);E.length<w;)E=" "+E;return E};console.info(`%c⏱ ${x(v,5)} /${x(m,5)} ms`,`
29
57
  font-size: .6rem;
30
58
  font-weight: bold;
31
- color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(u=e==null?void 0:e.onChange)==null||u.call(e,o),o}return a.updateDeps=i=>{t=i},a}function Qo(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const tf=(n,r)=>Math.abs(n-r)<1,nf=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},rf=n=>n,of=n=>{const r=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),t=[];for(let o=r;o<=e;o++)t.push(o);return t},af=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;const o=i=>{const{width:s,height:l}=i;r({width:Math.round(s),height:Math.round(l)})};if(o(e.getBoundingClientRect()),!t.ResizeObserver)return()=>{};const a=new t.ResizeObserver(i=>{const s=()=>{const l=i[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(e.getBoundingClientRect())};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},os={passive:!0},as=typeof window>"u"?!0:"onscrollend"in window,sf=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=n.options.useScrollendEvent&&as?()=>{}:nf(t,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:p,isRtl:m}=n.options;o=p?e.scrollLeft*(m&&-1||1):e.scrollTop,a(),r(o,c)},s=i(!0),l=i(!1);l(),e.addEventListener("scroll",s,os);const u=n.options.useScrollendEvent&&as;return u&&e.addEventListener("scrollend",l,os),()=>{e.removeEventListener("scroll",s),u&&e.removeEventListener("scrollend",l)}},lf=(n,r,e)=>{if(r!=null&&r.borderBoxSize){const t=r.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[e.options.horizontal?"width":"height"])},uf=(n,{adjustments:r=0,behavior:e},t)=>{var o,a;const i=n+r;(a=(o=t.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[t.options.horizontal?"left":"top"]:i,behavior:e})};class cf{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=t())==null||o.disconnect(),e=null},observe:o=>{var a;return(a=t())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=t())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,o])=>{typeof o>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rf,rangeExtractor:of,onChange:()=>{},measureElement:lf,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,o;(o=(t=this.options).onChange)==null||o.call(t,this,e)},this.maybeNotify=hn(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",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(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()}))}},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??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const o=new Map,a=new Map;for(let i=t-1;i>=0;i--){const s=e[i];if(o.has(s.lane))continue;const l=a.get(s.lane);if(l==null||s.end>l.end?a.set(s.lane,s):s.end<l.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=hn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,o,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=hn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<e;c++){const p=a(c),m=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),f=m?m.end+this.options.gap:t+o,h=s.get(p),v=typeof h=="number"?h:this.options.estimateSize(c),g=f+v,w=m?m.lane:c%this.options.lanes;u[c]={index:c,start:f,size:v,end:g,key:p,lane:w}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=hn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,o,a)=>this.range=e.length>0&&t>0?df({measurements:e,outerSize:t,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=hn(()=>{let e=null,t=null;const o=this.calculateRange();return o&&(e=o.startIndex,t=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,o,a,i)=>a===null||i===null?[]:e({startIndex:a,endIndex:i,overscan:t,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,o=e.getAttribute(t);return o?parseInt(o,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const o=this.indexFromElement(e),a=this.measurementsCache[o];if(!a)return;const i=a.key,s=this.elementsCache.get(i);s!==e&&(s&&this.observer.unobserve(s),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(o,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const o=this.measurementsCache[e];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=t-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((t,o)=>{t.isConnected||(this.observer.unobserve(t),this.elementsCache.delete(o))});return}this._measureElement(e,void 0)},this.getVirtualItems=hn(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const o=[];for(let a=0,i=e.length;a<i;a++){const s=e[a],l=t[s];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return Qo(t[is(0,t.length-1,o=>Qo(t[o]).start,e)])},this.getOffsetForAlignment=(e,t,o=0)=>{const a=this.getSize(),i=this.getScrollOffset();t==="auto"&&(t=e>=i+a?"end":"start"),t==="center"?e+=(o-a)/2:t==="end"&&(e-=a);const s=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-a;return Math.max(Math.min(u,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const o=this.measurementsCache[e];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(t==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)t="end";else if(o.start<=i+this.options.scrollPaddingStart)t="start";else return[i,t];const s=t==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,o.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:o})},this.scrollToIndex=(e,{align:t="auto",behavior:o}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(e,t);if(!a)return;const[i,s]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[u]=Qo(this.getOffsetForIndex(e,s));tf(u,this.getScrollOffset())||this.scrollToIndex(e,{align:s,behavior:o})}else this.scrollToIndex(e,{align:s,behavior:o})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let o;if(t.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((e=t[t.length-1])==null?void 0:e.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=t.length-1;for(;i>=0&&a.some(s=>s===null);){const s=t[i];a[s.lane]===null&&(a[s.lane]=s.end),i--}o=Math.max(...a.filter(s=>s!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:o})=>{this.options.scrollToFn(e,{behavior:o,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(r)}}const is=(n,r,e,t)=>{for(;n<=r;){const o=(n+r)/2|0,a=e(o);if(a<t)n=o+1;else if(a>t)r=o-1;else return o}return n>0?n-1:0};function df({measurements:n,outerSize:r,scrollOffset:e,lanes:t}){const o=n.length-1,a=l=>n[l].start;if(n.length<=t)return{startIndex:0,endIndex:o};let i=is(0,o,a,e),s=i;if(t===1)for(;s<o&&n[s].end<e+r;)s++;else if(t>1){const l=Array(t).fill(0);for(;s<o&&l.some(c=>c<e+r);){const c=n[s];l[c.lane]=c.end,s++}const u=Array(t).fill(e+r);for(;i>=0&&u.some(c=>c>=e);){const c=n[i];u[c.lane]=c.start,i--}i=Math.max(0,i-i%t),s=Math.min(o,s+(t-1-s%t))}return{startIndex:i,endIndex:s}}const ss=typeof document<"u"?F.useLayoutEffect:F.useEffect;function ff(n){const r=F.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?Se.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=F.useState(()=>new cf(e));return t.setOptions(e),ss(()=>t._didMount(),[]),ss(()=>t._willUpdate()),t}function pf(n){return ff({observeElementRect:af,observeElementOffset:sf,scrollToFn:uf,...n})}function mf(n,r){return n!==null&&r!==null&&typeof n=="object"&&typeof r=="object"&&"id"in n&&"id"in r?n.id===r.id:n===r}function ls(n=mf){return d.useCallback((r,e)=>{if(typeof n=="string"){let t=n;return(r==null?void 0:r[t])===(e==null?void 0:e[t])}return n(r,e)},[n])}function hf(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function Ko(n,r=!1){let[e,t]=d.useReducer(()=>({}),{}),o=d.useMemo(()=>hf(n),[n,e]);return ce(()=>{if(!n)return;let a=new ResizeObserver(t);return a.observe(n),()=>{a.disconnect()}},[n]),r?{width:`${o.width}px`,height:`${o.height}px`}:o}let us=class extends Map{constructor(r){super(),this.factory=r}get(r){let e=super.get(r);return e===void 0&&(e=this.factory(r),this.set(r,e)),e}};function cs(n,r){let e=n(),t=new Set;return{getSnapshot(){return e},subscribe(o){return t.add(o),()=>t.delete(o)},dispatch(o,...a){let i=r[o].call(e,...a);i&&(e=i,t.forEach(s=>s()))}}}function ds(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}let vf=new us(()=>cs(()=>[],{ADD(n){return this.includes(n)?this:[...this,n]},REMOVE(n){let r=this.indexOf(n);if(r===-1)return this;let e=this.slice();return e.splice(r,1),e}}));function vn(n,r){let e=vf.get(r),t=d.useId(),o=ds(e);if(ce(()=>{if(n)return e.dispatch("ADD",t),()=>e.dispatch("REMOVE",t)},[e,n]),!n)return!1;let a=o.indexOf(t),i=o.length;return a===-1&&(a=i,i+=1),a===i-1}let qo=new Map,Vn=new Map;function fs(n){var r;let e=(r=Vn.get(n))!=null?r:0;return Vn.set(n,e+1),e!==0?()=>ps(n):(qo.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>ps(n))}function ps(n){var r;let e=(r=Vn.get(n))!=null?r:1;if(e===1?Vn.delete(n):Vn.set(n,e-1),e!==1)return;let t=qo.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,qo.delete(n))}function Go(n,{allowed:r,disallowed:e}={}){let t=vn(n,"inert-others");ce(()=>{var o,a;if(!t)return;let i=et();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(fs(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let u=Gt(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let p of c.children)s.some(m=>p.contains(m))||i.add(fs(p));c=c.parentElement}}return i.dispose},[t,r,e])}function Xo(n,r,e){let t=yt(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&e()});d.useEffect(()=>{if(!n)return;let o=r===null?null:r instanceof HTMLElement?r:r.current;if(!o)return;let a=et();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}return()=>a.dispose()},[r,t,n])}let Pr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),gf=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var tt=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(tt||{}),Jo=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Jo||{}),bf=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(bf||{});function ms(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Pr)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function yf(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(gf)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var Zo=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Zo||{});function hs(n,r=0){var e;return n===((e=Gt(n))==null?void 0:e.body)?!1:Fe(r,{0(){return n.matches(Pr)},1(){let t=n;for(;t!==null;){if(t.matches(Pr))return!0;t=t.parentElement}return!1}})}var wf=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(wf||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function wt(n){n==null||n.focus({preventScroll:!0})}let xf=["textarea","input"].join(",");function Df(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,xf))!=null?e:!1}function ea(n,r=e=>e){return n.slice().sort((e,t)=>{let o=r(e),a=r(t);if(o===null||a===null)return 0;let i=o.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ef(n,r){return gn(ms(),r,{relativeTo:n})}function gn(n,r,{sorted:e=!0,relativeTo:t=null,skipElements:o=[]}={}){let a=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,i=Array.isArray(n)?e?ea(n):n:r&64?yf(n):ms(n);o.length>0&&i.length>1&&(i=i.filter(f=>!o.some(h=>h!=null&&"current"in h?(h==null?void 0:h.current)===f:h===f))),t=t??a.activeElement;let s=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,i.indexOf(t))-1;if(r&4)return Math.max(0,i.indexOf(t))+1;if(r&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=r&32?{preventScroll:!0}:{},c=0,p=i.length,m;do{if(c>=p||c+p<=0)return 0;let f=l+c;if(r&16)f=(f+p)%p;else{if(f<0)return 3;if(f>=p)return 1}m=i[f],m==null||m.focus(u),c+=s}while(m!==a.activeElement);return r&6&&Df(m)&&m.select(),2}function vs(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function kf(){return/Android/gi.test(window.navigator.userAgent)}function gs(){return vs()||kf()}function zn(n,r,e,t){let o=yt(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return document.addEventListener(r,a,t),()=>document.removeEventListener(r,a,t)},[n,r,t])}function bs(n,r,e,t){let o=yt(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return window.addEventListener(r,a,t),()=>window.removeEventListener(r,a,t)},[n,r,t])}const ys=30;function ta(n,r,e){let t=vn(n,"outside-click"),o=yt(e),a=d.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let p=function m(f){return typeof f=="function"?m(f()):Array.isArray(f)||f instanceof Set?f:[f]}(r);for(let m of p)if(m!==null&&(m.contains(c)||l.composed&&l.composedPath().includes(m)))return;return!hs(c,Zo.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,r]),i=d.useRef(null);zn(t,"pointerdown",l=>{var u,c;i.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),zn(t,"mousedown",l=>{var u,c;i.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),zn(t,"click",l=>{gs()||i.current&&(a(l,()=>i.current),i.current=null)},!0);let s=d.useRef({x:0,y:0});zn(t,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),zn(t,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-s.current.x)>=ys||Math.abs(u.y-s.current.y)>=ys))return a(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),bs(t,"blur",l=>a(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function xt(...n){return d.useMemo(()=>Gt(...n),[...n])}function na(n,r,e,t){let o=yt(e);d.useEffect(()=>{n=n??window;function a(i){o.current(i)}return n.addEventListener(r,a,t),()=>n.removeEventListener(r,a,t)},[n,r,t])}function ws(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return na(n,"blur",e=>{let t=e.target;t instanceof HTMLInputElement&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),V(()=>{if(document.activeElement!==n&&n instanceof HTMLInputElement&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==r.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:e,selectionEnd:t}=r.current;e!==null&&t!==null&&n.setSelectionRange(e,t)}r.current={value:"",selectionStart:null,selectionEnd:null}}})}function xs(n,r){return d.useMemo(()=>{var e;if(n.type)return n.type;let t=(e=n.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button"||(r==null?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[n.type,n.as,r])}function Sf(){let n;return{before({doc:r}){var e;let t=r.documentElement,o=(e=r.defaultView)!=null?e:window;n=Math.max(0,o.innerWidth-t.clientWidth)},after({doc:r,d:e}){let t=r.documentElement,o=Math.max(0,t.clientWidth-t.offsetWidth),a=Math.max(0,n-o);e.style(t,"paddingRight",`${a}px`)}}}function Cf(){return vs()?{before({doc:n,d:r,meta:e}){function t(o){return e.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let s=et();s.style(n.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(n,"click",s=>{if(s.target instanceof HTMLElement)try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);c&&!t(c)&&(i=c)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(s.target instanceof HTMLElement)if(t(s.target)){let l=s.target;for(;l.parentElement&&t(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(n,"touchmove",s=>{if(s.target instanceof HTMLElement){if(s.target.tagName==="INPUT")return;if(t(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function _f(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function Of(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let Xt=cs(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:et(),meta:new Set};return t.count++,t.meta.add(r),this.set(n,t),this},POP(n,r){let e=this.get(n);return e&&(e.count--,e.meta.delete(r)),this},SCROLL_PREVENT({doc:n,d:r,meta:e}){let t={doc:n,d:r,meta:Of(e)},o=[Cf(),Sf(),_f()];o.forEach(({before:a})=>a==null?void 0:a(t)),o.forEach(({after:a})=>a==null?void 0:a(t))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Xt.subscribe(()=>{let n=Xt.getSnapshot(),r=new Map;for(let[e]of n)r.set(e,e.documentElement.style.overflow);for(let e of n.values()){let t=r.get(e.doc)==="hidden",o=e.count!==0;(o&&!t||!o&&t)&&Xt.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&Xt.dispatch("TEARDOWN",e)}});function Mf(n,r,e=()=>({containers:[]})){let t=ds(Xt),o=r?t.get(r):void 0,a=o?o.count>0:!1;return ce(()=>{if(!(!r||!n))return Xt.dispatch("PUSH",r,e),()=>Xt.dispatch("POP",r,e)},[n,r]),a}function ra(n,r,e=()=>[document.body]){let t=vn(n,"scroll-lock");Mf(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function Ds(n){return[n.screenX,n.screenY]}function Es(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=Ds(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=Ds(r)}}}function Pf(n=0){let[r,e]=d.useState(n),t=d.useCallback(l=>e(l),[r]),o=d.useCallback(l=>e(u=>u|l),[r]),a=d.useCallback(l=>(r&l)===l,[r]),i=d.useCallback(l=>e(u=>u&~l),[e]),s=d.useCallback(l=>e(u=>u^l),[e]);return{flags:r,setFlag:t,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var ks,Ss;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ks=process==null?void 0:process.env)==null?void 0:ks.NODE_ENV)==="test"&&typeof((Ss=Element==null?void 0:Element.prototype)==null?void 0:Ss.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
32
- `)),[]});var Tf=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(Tf||{});function oa(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function aa(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=Pf(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),p=Ft();return ce(()=>{var m;if(n){if(e&&a(!0),!r){e&&s(3);return}return(m=t==null?void 0:t.start)==null||m.call(t,e),Nf(r,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(e?(s(3),l(4)):(s(4),l(2)))},run(){c.current?e?(l(3),s(4)):(l(4),s(3)):e?l(1):s(1)},done(){var f;c.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(u.current=!1,l(7),e||a(!1),(f=t==null?void 0:t.end)==null||f.call(t,e))}})}},[n,e,r,p]),n?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[e,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Nf(n,{prepare:r,run:e,done:t,inFlight:o}){let a=et();return Ff(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(If(n,t))})}),a.dispose}function If(n,r){var e,t;let o=et();if(!n)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(t=(e=n.getAnimations)==null?void 0:e.call(n).filter(s=>s instanceof CSSTransition))!=null?t:[];return i.length===0?(r(),o.dispose):(Promise.allSettled(i.map(s=>s.finished)).then(()=>{a||r()}),o.dispose)}function Ff(n,{inFlight:r,prepare:e}){if(r!=null&&r.current){e();return}let t=n.style.transition;n.style.transition="none",e(),n.offsetHeight,n.style.transition=t}function Lf(n,{container:r,accept:e,walk:t}){let o=d.useRef(e),a=d.useRef(t);d.useEffect(()=>{o.current=e,a.current=t},[e,t]),ce(()=>{if(!r||!n)return;let i=Gt(r);if(!i)return;let s=o.current,l=a.current,u=Object.assign(p=>s(p),{acceptNode:s}),c=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[r,n,o,a])}function Un(n,r){let e=d.useRef([]),t=V(n);d.useEffect(()=>{let o=[...e.current];for(let[a,i]of r.entries())if(e.current[a]!==i){let s=t(r,o);return e.current=r,s}},[t,...r])}function Tr(){return typeof window<"u"}function bn(n){return Cs(n)?(n.nodeName||"").toLowerCase():"#document"}function Ue(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function at(n){var r;return(r=(Cs(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Cs(n){return Tr()?n instanceof Node||n instanceof Ue(n).Node:!1}function Pe(n){return Tr()?n instanceof Element||n instanceof Ue(n).Element:!1}function it(n){return Tr()?n instanceof HTMLElement||n instanceof Ue(n).HTMLElement:!1}function _s(n){return!Tr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ue(n).ShadowRoot}function Qn(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=qe(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!["inline","contents"].includes(o)}function $f(n){return["table","td","th"].includes(bn(n))}function Nr(n){return[":popover-open",":modal"].some(r=>{try{return n.matches(r)}catch{return!1}})}function ia(n){const r=sa(),e=Pe(n)?qe(n):n;return["transform","translate","scale","rotate","perspective"].some(t=>e[t]?e[t]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!r&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!r&&(e.filter?e.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(t=>(e.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(e.contain||"").includes(t))}function Af(n){let r=Yt(n);for(;it(r)&&!yn(r);){if(ia(r))return r;if(Nr(r))return null;r=Yt(r)}return null}function sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function yn(n){return["html","body","#document"].includes(bn(n))}function qe(n){return Ue(n).getComputedStyle(n)}function Ir(n){return Pe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Yt(n){if(bn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||_s(n)&&n.host||at(n);return _s(r)?r.host:r}function Os(n){const r=Yt(n);return yn(r)?n.ownerDocument?n.ownerDocument.body:n.body:it(r)&&Qn(r)?r:Os(r)}function Kn(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=Os(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=Ue(o);if(a){const s=la(i);return r.concat(i,i.visualViewport||[],Qn(o)?o:[],s&&e?Kn(s):[])}return r.concat(o,Kn(o,[],e))}function la(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Yf(){const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(r=>{let{brand:e,version:t}=r;return e+"/"+t}).join(" "):navigator.userAgent}const Dt=Math.min,Re=Math.max,qn=Math.round,Fr=Math.floor,st=n=>({x:n,y:n}),Wf={left:"right",right:"left",bottom:"top",top:"bottom"},jf={start:"end",end:"start"};function ua(n,r,e){return Re(n,Dt(r,e))}function Jt(n,r){return typeof n=="function"?n(r):n}function Wt(n){return n.split("-")[0]}function wn(n){return n.split("-")[1]}function Ms(n){return n==="x"?"y":"x"}function ca(n){return n==="y"?"height":"width"}function Zt(n){return["top","bottom"].includes(Wt(n))?"y":"x"}function da(n){return Ms(Zt(n))}function Hf(n,r,e){e===void 0&&(e=!1);const t=wn(n),o=da(n),a=ca(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=Lr(i)),[i,Lr(i)]}function Rf(n){const r=Lr(n);return[fa(n),r,fa(r)]}function fa(n){return n.replace(/start|end/g,r=>jf[r])}function Bf(n,r,e){const t=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(n){case"top":case"bottom":return e?r?o:t:r?t:o;case"left":case"right":return r?a:i;default:return[]}}function Vf(n,r,e,t){const o=wn(n);let a=Bf(Wt(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(fa)))),a}function Lr(n){return n.replace(/left|right|bottom|top/g,r=>Wf[r])}function zf(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ps(n){return typeof n!="number"?zf(n):{top:n,right:n,bottom:n,left:n}}function $r(n){const{x:r,y:e,width:t,height:o}=n;return{width:t,height:o,top:e,left:r,right:r+t,bottom:e+o,x:r,y:e}}function Ts(n,r,e){let{reference:t,floating:o}=n;const a=Zt(r),i=da(r),s=ca(i),l=Wt(r),u=a==="y",c=t.x+t.width/2-o.width/2,p=t.y+t.height/2-o.height/2,m=t[s]/2-o[s]/2;let f;switch(l){case"top":f={x:c,y:t.y-o.height};break;case"bottom":f={x:c,y:t.y+t.height};break;case"right":f={x:t.x+t.width,y:p};break;case"left":f={x:t.x-o.width,y:p};break;default:f={x:t.x,y:t.y}}switch(wn(r)){case"start":f[i]-=m*(e&&u?-1:1);break;case"end":f[i]+=m*(e&&u?-1:1);break}return f}const Uf=async(n,r,e)=>{const{placement:t="bottom",strategy:o="absolute",middleware:a=[],platform:i}=e,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let u=await i.getElementRects({reference:n,floating:r,strategy:o}),{x:c,y:p}=Ts(u,t,l),m=t,f={},h=0;for(let v=0;v<s.length;v++){const{name:g,fn:w}=s[v],{x:y,y:x,data:E,reset:k}=await w({x:c,y:p,initialPlacement:t,placement:m,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:n,floating:r}});c=y??c,p=x??p,f={...f,[g]:{...f[g],...E}},k&&h<=50&&(h++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):k.rects),{x:c,y:p}=Ts(u,m,l)),v=-1)}return{x:c,y:p,placement:m,strategy:o,middlewareData:f}};async function Ar(n,r){var e;r===void 0&&(r={});const{x:t,y:o,platform:a,rects:i,elements:s,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:m=!1,padding:f=0}=Jt(r,n),h=Ps(f),g=s[m?p==="floating"?"reference":"floating":p],w=$r(await a.getClippingRect({element:(e=await(a.isElement==null?void 0:a.isElement(g)))==null||e?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=p==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),E=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},k=$r(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(w.top-k.top+h.top)/E.y,bottom:(k.bottom-w.bottom+h.bottom)/E.y,left:(w.left-k.left+h.left)/E.x,right:(k.right-w.right+h.right)/E.x}}const Qf=n=>({name:"arrow",options:n,async fn(r){const{x:e,y:t,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:u,padding:c=0}=Jt(n,r)||{};if(u==null)return{};const p=Ps(c),m={x:e,y:t},f=da(o),h=ca(f),v=await i.getDimensions(u),g=f==="y",w=g?"top":"left",y=g?"bottom":"right",x=g?"clientHeight":"clientWidth",E=a.reference[h]+a.reference[f]-m[f]-a.floating[h],k=m[f]-a.reference[f],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=C?C[x]:0;(!S||!await(i.isElement==null?void 0:i.isElement(C)))&&(S=s.floating[x]||a.floating[h]);const D=E/2-k/2,_=S/2-v[h]/2-1,O=Dt(p[w],_),T=Dt(p[y],_),Y=O,W=S-v[h]-T,N=S/2-v[h]/2+D,L=ua(Y,N,W),$=!l.arrow&&wn(o)!=null&&N!==L&&a.reference[h]/2-(N<Y?O:T)-v[h]/2<0,z=$?N<Y?N-Y:N-W:0;return{[f]:m[f]+z,data:{[f]:L,centerOffset:N-L-z,...$&&{alignmentOffset:z}},reset:$}}}),Kf=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var e,t;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=r,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...g}=Jt(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const w=Wt(o),y=Zt(s),x=Wt(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=m||(x||!v?[Lr(s)]:Rf(s)),C=h!=="none";!m&&C&&k.push(...Vf(s,v,h,E));const S=[s,...k],D=await Ar(r,g),_=[];let O=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&_.push(D[w]),p){const N=Hf(o,i,E);_.push(D[N[0]],D[N[1]])}if(O=[...O,{placement:o,overflows:_}],!_.every(N=>N<=0)){var T,Y;const N=(((T=a.flip)==null?void 0:T.index)||0)+1,L=S[N];if(L)return{data:{index:N,overflows:O},reset:{placement:L}};let $=(Y=O.filter(z=>z.overflows[0]<=0).sort((z,P)=>z.overflows[1]-P.overflows[1])[0])==null?void 0:Y.placement;if(!$)switch(f){case"bestFit":{var W;const z=(W=O.filter(P=>{if(C){const q=Zt(P.placement);return q===y||q==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(q=>q>0).reduce((q,X)=>q+X,0)]).sort((P,q)=>P[1]-q[1])[0])==null?void 0:W[0];z&&($=z);break}case"initialPlacement":$=s;break}if(o!==$)return{reset:{placement:$}}}return{}}}};async function qf(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=Wt(e),s=wn(e),l=Zt(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,p=Jt(r,n);let{mainAxis:m,crossAxis:f,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*c,y:m*u}:{x:m*u,y:f*c}}const Gf=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var e,t;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await qf(r,n);return i===((e=s.offset)==null?void 0:e.placement)&&(t=s.arrow)!=null&&t.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Xf=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:e,y:t,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...l}=Jt(n,r),u={x:e,y:t},c=await Ar(r,l),p=Zt(Wt(o)),m=Ms(p);let f=u[m],h=u[p];if(a){const g=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=f+c[g],x=f-c[w];f=ua(y,f,x)}if(i){const g=p==="y"?"top":"left",w=p==="y"?"bottom":"right",y=h+c[g],x=h-c[w];h=ua(y,h,x)}const v=s.fn({...r,[m]:f,[p]:h});return{...v,data:{x:v.x-e,y:v.y-t,enabled:{[m]:a,[p]:i}}}}}},Jf=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var e,t;const{placement:o,rects:a,platform:i,elements:s}=r,{apply:l=()=>{},...u}=Jt(n,r),c=await Ar(r,u),p=Wt(o),m=wn(o),f=Zt(o)==="y",{width:h,height:v}=a.floating;let g,w;p==="top"||p==="bottom"?(g=p,w=m===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=p,g=m==="end"?"top":"bottom");const y=v-c.top-c.bottom,x=h-c.left-c.right,E=Dt(v-c[g],y),k=Dt(h-c[w],x),C=!r.middlewareData.shift;let S=E,D=k;if((e=r.middlewareData.shift)!=null&&e.enabled.x&&(D=x),(t=r.middlewareData.shift)!=null&&t.enabled.y&&(S=y),C&&!m){const O=Re(c.left,0),T=Re(c.right,0),Y=Re(c.top,0),W=Re(c.bottom,0);f?D=h-2*(O!==0||T!==0?O+T:Re(c.left,c.right)):S=v-2*(Y!==0||W!==0?Y+W:Re(c.top,c.bottom))}await l({...r,availableWidth:D,availableHeight:S});const _=await i.getDimensions(s.floating);return h!==_.width||v!==_.height?{reset:{rects:!0}}:{}}}};function Ns(n){const r=qe(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=it(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=qn(e)!==a||qn(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function pa(n){return Pe(n)?n:n.contextElement}function xn(n){const r=pa(n);if(!it(r))return st(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=Ns(r);let i=(a?qn(e.width):e.width)/t,s=(a?qn(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Zf=st(0);function Is(n){const r=Ue(n);return!sa()||!r.visualViewport?Zf:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function ep(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==Ue(n)?!1:r}function en(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=pa(n);let i=st(1);r&&(t?Pe(t)&&(i=xn(t)):i=xn(n));const s=ep(a,e,t)?Is(a):st(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,p=o.height/i.y;if(a){const m=Ue(a),f=t&&Pe(t)?Ue(t):t;let h=m,v=la(h);for(;v&&t&&f!==h;){const g=xn(v),w=v.getBoundingClientRect(),y=qe(v),x=w.left+(v.clientLeft+parseFloat(y.paddingLeft))*g.x,E=w.top+(v.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,p*=g.y,l+=x,u+=E,h=Ue(v),v=la(h)}}return $r({width:c,height:p,x:l,y:u})}function ma(n,r){const e=Ir(n).scrollLeft;return r?r.left+e:en(at(n)).left+e}function Fs(n,r,e){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=t.left+r.scrollLeft-(e?0:ma(n,t)),a=t.top+r.scrollTop;return{x:o,y:a}}function tp(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=at(t),s=r?Nr(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=st(1);const c=st(0),p=it(t);if((p||!p&&!a)&&((bn(t)!=="body"||Qn(i))&&(l=Ir(t)),it(t))){const f=en(t);u=xn(t),c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}const m=i&&!p&&!a?Fs(i,l,!0):st(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+m.x,y:e.y*u.y-l.scrollTop*u.y+c.y+m.y}}function np(n){return Array.from(n.getClientRects())}function rp(n){const r=at(n),e=Ir(n),t=n.ownerDocument.body,o=Re(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Re(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+ma(n);const s=-e.scrollTop;return qe(t).direction==="rtl"&&(i+=Re(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function op(n,r){const e=Ue(n),t=at(n),o=e.visualViewport;let a=t.clientWidth,i=t.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const u=sa();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function ap(n,r){const e=en(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=it(n)?xn(n):st(1),i=n.clientWidth*a.x,s=n.clientHeight*a.y,l=o*a.x,u=t*a.y;return{width:i,height:s,x:l,y:u}}function Ls(n,r,e){let t;if(r==="viewport")t=op(n,e);else if(r==="document")t=rp(at(n));else if(Pe(r))t=ap(r,e);else{const o=Is(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return $r(t)}function $s(n,r){const e=Yt(n);return e===r||!Pe(e)||yn(e)?!1:qe(e).position==="fixed"||$s(e,r)}function ip(n,r){const e=r.get(n);if(e)return e;let t=Kn(n,[],!1).filter(s=>Pe(s)&&bn(s)!=="body"),o=null;const a=qe(n).position==="fixed";let i=a?Yt(n):n;for(;Pe(i)&&!yn(i);){const s=qe(i),l=ia(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Qn(i)&&!l&&$s(n,i))?t=t.filter(c=>c!==i):o=s,i=Yt(i)}return r.set(n,t),t}function sp(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?Nr(r)?[]:ip(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const p=Ls(r,c,o);return u.top=Re(p.top,u.top),u.right=Dt(p.right,u.right),u.bottom=Dt(p.bottom,u.bottom),u.left=Re(p.left,u.left),u},Ls(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lp(n){const{width:r,height:e}=Ns(n);return{width:r,height:e}}function up(n,r,e){const t=it(r),o=at(r),a=e==="fixed",i=en(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=st(0);if(t||!t&&!a)if((bn(r)!=="body"||Qn(o))&&(s=Ir(r)),t){const m=en(r,!0,a,r);l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}else o&&(l.x=ma(o));const u=o&&!t&&!a?Fs(o,s):st(0),c=i.left+s.scrollLeft-l.x-u.x,p=i.top+s.scrollTop-l.y-u.y;return{x:c,y:p,width:i.width,height:i.height}}function ha(n){return qe(n).position==="static"}function As(n,r){if(!it(n)||qe(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return at(n)===e&&(e=e.ownerDocument.body),e}function Ys(n,r){const e=Ue(n);if(Nr(n))return e;if(!it(n)){let o=Yt(n);for(;o&&!yn(o);){if(Pe(o)&&!ha(o))return o;o=Yt(o)}return e}let t=As(n,r);for(;t&&$f(t)&&ha(t);)t=As(t,r);return t&&yn(t)&&ha(t)&&!ia(t)?e:t||Af(n)||e}const cp=async function(n){const r=this.getOffsetParent||Ys,e=this.getDimensions,t=await e(n.floating);return{reference:up(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function dp(n){return qe(n).direction==="rtl"}const fp={convertOffsetParentRelativeRectToViewportRelativeRect:tp,getDocumentElement:at,getClippingRect:sp,getOffsetParent:Ys,getElementRects:cp,getClientRects:np,getDimensions:lp,getScale:xn,isElement:Pe,isRTL:dp};function Ws(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function pp(n,r){let e=null,t;const o=at(n);function a(){var s;clearTimeout(t),(s=e)==null||s.disconnect(),e=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=n.getBoundingClientRect(),{left:c,top:p,width:m,height:f}=u;if(s||r(),!m||!f)return;const h=Fr(p),v=Fr(o.clientWidth-(c+m)),g=Fr(o.clientHeight-(p+f)),w=Fr(c),x={rootMargin:-h+"px "+-v+"px "+-g+"px "+-w+"px",threshold:Re(0,Dt(1,l))||1};let E=!0;function k(C){const S=C[0].intersectionRatio;if(S!==l){if(!E)return i();S?i(!1,S):t=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Ws(u,n.getBoundingClientRect())&&i(),E=!1}try{e=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{e=new IntersectionObserver(k,x)}e.observe(n)}return i(!0),a}function js(n,r,e,t){t===void 0&&(t={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=t,u=pa(n),c=o||a?[...u?Kn(u):[],...Kn(r)]:[];c.forEach(w=>{o&&w.addEventListener("scroll",e,{passive:!0}),a&&w.addEventListener("resize",e)});const p=u&&s?pp(u,e):null;let m=-1,f=null;i&&(f=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&f&&(f.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(r)})),e()}),u&&!l&&f.observe(u),f.observe(r));let h,v=l?en(n):null;l&&g();function g(){const w=en(n);v&&!Ws(v,w)&&e(),v=w,h=requestAnimationFrame(g)}return e(),()=>{var w;c.forEach(y=>{o&&y.removeEventListener("scroll",e),a&&y.removeEventListener("resize",e)}),p==null||p(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const va=Ar,mp=Gf,hp=Xf,vp=Kf,gp=Jf,Hs=Qf,bp=(n,r,e)=>{const t=new Map,o={platform:fp,...e},a={...o.platform,_c:t};return Uf(n,r,{...o,platform:a})};var Yr=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Wr(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let e,t,o;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(e=n.length,e!==r.length)return!1;for(t=e;t--!==0;)if(!Wr(n[t],r[t]))return!1;return!0}if(o=Object.keys(n),e=o.length,e!==Object.keys(r).length)return!1;for(t=e;t--!==0;)if(!{}.hasOwnProperty.call(r,o[t]))return!1;for(t=e;t--!==0;){const a=o[t];if(!(a==="_owner"&&n.$$typeof)&&!Wr(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function Rs(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Bs(n,r){const e=Rs(n);return Math.round(r*e)/e}function ga(n){const r=F.useRef(n);return Yr(()=>{r.current=n}),r}function Vs(n){n===void 0&&(n={});const{placement:r="bottom",strategy:e="absolute",middleware:t=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=n,[c,p]=F.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[m,f]=F.useState(t);Wr(m,t)||f(t);const[h,v]=F.useState(null),[g,w]=F.useState(null),y=F.useCallback(P=>{P!==C.current&&(C.current=P,v(P))},[]),x=F.useCallback(P=>{P!==S.current&&(S.current=P,w(P))},[]),E=a||h,k=i||g,C=F.useRef(null),S=F.useRef(null),D=F.useRef(c),_=l!=null,O=ga(l),T=ga(o),Y=ga(u),W=F.useCallback(()=>{if(!C.current||!S.current)return;const P={placement:r,strategy:e,middleware:m};T.current&&(P.platform=T.current),bp(C.current,S.current,P).then(q=>{const X={...q,isPositioned:Y.current!==!1};N.current&&!Wr(D.current,X)&&(D.current=X,vr.flushSync(()=>{p(X)}))})},[m,r,e,T,Y]);Yr(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[u]);const N=F.useRef(!1);Yr(()=>(N.current=!0,()=>{N.current=!1}),[]),Yr(()=>{if(E&&(C.current=E),k&&(S.current=k),E&&k){if(O.current)return O.current(E,k,W);W()}},[E,k,W,O,_]);const L=F.useMemo(()=>({reference:C,floating:S,setReference:y,setFloating:x}),[y,x]),$=F.useMemo(()=>({reference:E,floating:k}),[E,k]),z=F.useMemo(()=>{const P={position:e,left:0,top:0};if(!$.floating)return P;const q=Bs($.floating,c.x),X=Bs($.floating,c.y);return s?{...P,transform:"translate("+q+"px, "+X+"px)",...Rs($.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:q,top:X}},[e,s,$.floating,c.x,c.y]);return F.useMemo(()=>({...c,update:W,refs:L,elements:$,floatingStyles:z}),[c,W,L,$,z])}const yp=n=>{function r(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:n,fn(e){const{element:t,padding:o}=typeof n=="function"?n(e):n;return t&&r(t)?t.current!=null?Hs({element:t.current,padding:o}).fn(e):{}:t?Hs({element:t,padding:o}).fn(e):{}}}},ba=(n,r)=>({...mp(n),options:[n,r]}),wp=(n,r)=>({...hp(n),options:[n,r]}),zs=(n,r)=>({...vp(n),options:[n,r]}),xp=(n,r)=>({...gp(n),options:[n,r]}),Dp=(n,r)=>({...yp(n),options:[n,r]}),Us={...F},Ep=Us.useInsertionEffect||(n=>n());function Qs(n){const r=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ep(()=>{r.current=n}),F.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}var ya=typeof document<"u"?d.useLayoutEffect:d.useEffect;let Ks=!1,kp=0;const qs=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+kp++;function Sp(){const[n,r]=F.useState(()=>Ks?qs():void 0);return ya(()=>{n==null&&r(qs())},[]),F.useEffect(()=>{Ks=!0},[]),n}const Cp=Us.useId||Sp;let Gn;process.env.NODE_ENV!=="production"&&(Gn=new Set);function _p(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Gn)!=null&&n.has(o))){var a;(a=Gn)==null||a.add(o),console.warn(o)}}function Op(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Gn)!=null&&n.has(o))){var a;(a=Gn)==null||a.add(o),console.error(o)}}function Mp(){const n=new Map;return{emit(r,e){var t;(t=n.get(r))==null||t.forEach(o=>o(e))},on(r,e){n.set(r,[...n.get(r)||[],e])},off(r,e){var t;n.set(r,((t=n.get(r))==null?void 0:t.filter(o=>o!==e))||[])}}}const Pp=F.createContext(null),Tp=F.createContext(null),Np=()=>{var n;return((n=F.useContext(Pp))==null?void 0:n.id)||null},Ip=()=>F.useContext(Tp),Fp="data-floating-ui-focusable";function Lp(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Cp(),a=F.useRef({}),[i]=F.useState(()=>Mp()),s=Np()!=null;if(process.env.NODE_ENV!=="production"){const f=t.reference;f&&!Pe(f)&&Op("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=F.useState(t.reference),c=Qs((f,h,v)=>{a.current.openEvent=f?h:void 0,i.emit("openchange",{open:f,event:h,reason:v,nested:s}),e==null||e(f,h,v)}),p=F.useMemo(()=>({setPositionReference:u}),[]),m=F.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return F.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:m,events:i,floatingId:o,refs:p}),[r,c,m,i,o,p])}function $p(n){n===void 0&&(n={});const{nodeId:r}=n,e=Lp({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=F.useState(null),[s,l]=F.useState(null),c=(o==null?void 0:o.domReference)||a,p=F.useRef(null),m=Ip();ya(()=>{c&&(p.current=c)},[c]);const f=Vs({...n,elements:{...o,...s&&{reference:s}}}),h=F.useCallback(x=>{const E=Pe(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(E),f.refs.setReference(E)},[f.refs]),v=F.useCallback(x=>{(Pe(x)||x===null)&&(p.current=x,i(x)),(Pe(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Pe(x))&&f.refs.setReference(x)},[f.refs]),g=F.useMemo(()=>({...f.refs,setReference:v,setPositionReference:h,domReference:p}),[f.refs,v,h]),w=F.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),y=F.useMemo(()=>({...f,...t,refs:g,elements:w,nodeId:r}),[f,g,w,r,t]);return ya(()=>{t.dataRef.current.floatingContext=y;const x=m==null?void 0:m.nodesRef.current.find(E=>E.id===r);x&&(x.context=y)}),F.useMemo(()=>({...f,context:y,refs:g,elements:w}),[f,g,w,y])}const Gs="active",Xs="selected";function wa(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[Gs]:i,[Xs]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1,[Fp]:""},...a,...r.map(i=>{const s=i?i[e]:null;return typeof s=="function"?n?s(n):null:s}).concat(n).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[u,c]=l;if(!(o&&[Gs,Xs].includes(u)))if(u.indexOf("on")===0){if(t.has(u)||t.set(u,[]),typeof c=="function"){var p;(p=t.get(u))==null||p.push(c),i[u]=function(){for(var m,f=arguments.length,h=new Array(f),v=0;v<f;v++)h[v]=arguments[v];return(m=t.get(u))==null?void 0:m.map(g=>g(...h)).find(g=>g!==void 0)}}}else i[u]=c}),i),{})}}function Ap(n){n===void 0&&(n=[]);const r=n.map(s=>s==null?void 0:s.reference),e=n.map(s=>s==null?void 0:s.floating),t=n.map(s=>s==null?void 0:s.item),o=F.useCallback(s=>wa(s,n,"reference"),r),a=F.useCallback(s=>wa(s,n,"floating"),e),i=F.useCallback(s=>wa(s,n,"item"),t);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function Js(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const Yp=n=>({name:"inner",options:n,async fn(r){const{listRef:e,overflowRef:t,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Jt(n,r),{rects:p,elements:{floating:m}}=r,f=e.current[i],h=(u==null?void 0:u.current)||m,v=m.clientTop||h.clientTop,g=m.clientTop!==0,w=h.clientTop!==0,y=m===h;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||_p('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const x={...r,...await ba(-f.offsetTop-m.clientTop-p.reference.height/2-f.offsetHeight/2-a).fn(r)},E=await va(Js(x,h.scrollHeight+v+m.clientTop),c),k=await va(x,{...c,elementContext:"reference"}),C=Re(0,E.top),S=x.y+C,O=(h.scrollHeight>h.clientHeight?T=>T:qn)(Re(0,h.scrollHeight+(g&&y||w?v*2:0)-C-Re(0,E.bottom)));if(h.style.maxHeight=O+"px",h.scrollTop=C,o){const T=h.offsetHeight<f.offsetHeight*Dt(s,e.current.length)-1||k.top>=-l||k.bottom>=-l;vr.flushSync(()=>o(T))}return t&&(t.current=await va(Js({...x,y:S},h.offsetHeight+v+m.clientTop),c)),{y:S}}});function Wp(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=Qs(s),u=F.useRef(!1),c=F.useRef(null),p=F.useRef(null);F.useEffect(()=>{if(!o)return;function f(v){if(v.ctrlKey||!h||a.current==null)return;const g=v.deltaY,w=a.current.top>=-.5,y=a.current.bottom>=-.5,x=h.scrollHeight-h.clientHeight,E=g<0?-1:1,k=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!w&&g>0||!y&&g<0?(v.preventDefault(),vr.flushSync(()=>{l(C=>C+Math[k](g,x*E))})):/firefox/i.test(Yf())&&(h.scrollTop+=g))}const h=(i==null?void 0:i.current)||t.floating;if(e&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{c.current=h.scrollTop,a.current!=null&&(p.current={...a.current})}),()=>{c.current=null,p.current=null,h.removeEventListener("wheel",f)}},[o,e,t.floating,a,i,l]);const m=F.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const f=(i==null?void 0:i.current)||t.floating;if(!(!a.current||!f||!u.current)){if(c.current!==null){const h=f.scrollTop-c.current;(a.current.bottom<-.5&&h<-1||a.current.top<-.5&&h>1)&&vr.flushSync(()=>l(v=>v+h))}requestAnimationFrame(()=>{c.current=f.scrollTop})}}}),[t.floating,l,a,i]);return F.useMemo(()=>o?{floating:m}:{},[o,m])}let Dn=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Dn.displayName="FloatingContext";let xa=d.createContext(null);xa.displayName="PlacementContext";function Zs(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function el(){return d.useContext(Dn).setReference}function jp(){return d.useContext(Dn).getReferenceProps}function tl(){let{getFloatingProps:n,slot:r}=d.useContext(Dn);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function nl(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(xa),e=d.useMemo(()=>n,[JSON.stringify(n,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);ce(()=>{r==null||r(e??null)},[r,e]);let t=d.useContext(Dn);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let rl=4;function ol({children:n,enabled:r=!0}){let[e,t]=d.useState(null),[o,a]=d.useState(0),i=d.useRef(null),[s,l]=d.useState(null);Hp(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:p=0,offset:m=0,padding:f=0,inner:h}=Rp(e,s),[v,g="center"]=c.split(" ");ce(()=>{u&&a(0)},[u]);let{refs:w,floatingStyles:y,context:x}=$p({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[ba({mainAxis:v==="selection"?0:p,crossAxis:m}),wp({padding:f}),v!=="selection"&&zs({padding:f}),v==="selection"&&h?Yp({...h,padding:f,overflowRef:i,offset:o,minItemsVisible:rl,referenceOverflowThreshold:f,onFallbackChange(T){var Y,W;if(!T)return;let N=x.elements.floating;if(!N)return;let L=parseFloat(getComputedStyle(N).scrollPaddingBottom)||0,$=Math.min(rl,N.childElementCount),z=0,P=0;for(let q of(W=(Y=x.elements.floating)==null?void 0:Y.childNodes)!=null?W:[])if(q instanceof HTMLElement){let X=q.offsetTop,G=X+q.clientHeight+L,Oe=N.scrollTop,te=Oe+N.clientHeight;if(X>=Oe&&G<=te)$--;else{P=Math.max(0,Math.min(G,te)-Math.max(X,Oe)),z=q.clientHeight;break}}$>=1&&a(q=>{let X=z*$-P+L;return q>=X?q:X})}}):null,xp({padding:f,apply({availableWidth:T,availableHeight:Y,elements:W}){Object.assign(W.floating.style,{overflow:"auto",maxWidth:`${T}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${Y}px)`})}})].filter(Boolean),whileElementsMounted:js}),[E=v,k=g]=x.placement.split("-");v==="selection"&&(E="selection");let C=d.useMemo(()=>({anchor:[E,k].filter(Boolean).join(" ")}),[E,k]),S=Wp(x,{overflowRef:i,onChange:a}),{getReferenceProps:D,getFloatingProps:_}=Ap([S]),O=V(T=>{l(T),w.setFloating(T)});return F.createElement(xa.Provider,{value:t},F.createElement(Dn.Provider,{value:{setFloating:O,setReference:w.setReference,styles:y,getReferenceProps:D,getFloatingProps:_,slot:C}},n))}function Hp(n){ce(()=>{if(!n)return;let r=new MutationObserver(()=>{let e=window.getComputedStyle(n).maxHeight,t=parseFloat(e);if(isNaN(t))return;let o=parseInt(e);isNaN(o)||t!==o&&(n.style.maxHeight=`${Math.ceil(t)}px`)});return r.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[n])}function Rp(n,r){var e,t,o;let a=Da((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=Da((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Da((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function Da(n,r,e=void 0){let t=Ft(),o=V((l,u)=>{if(l==null)return[e,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[e,null];let c=il(l,u);return[c,p=>{let m=al(l);{let f=m.map(h=>window.getComputedStyle(u).getPropertyValue(h));t.requestAnimationFrame(function h(){t.nextFrame(h);let v=!1;for(let[w,y]of m.entries()){let x=window.getComputedStyle(u).getPropertyValue(y);if(f[w]!==x){f[w]=x,v=!0;break}}if(!v)return;let g=il(l,u);c!==g&&(p(g),c=g)})}return t.dispose}]}return[e,null]}),a=d.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=d.useState();return ce(()=>{let[l,u]=o(n,r);if(s(l),!!u)return u(s)},[n,r]),i}function al(n){let r=/var\((.*)\)/.exec(n);if(r){let e=r[1].indexOf(",");if(e===-1)return[r[1]];let t=r[1].slice(0,e).trim(),o=r[1].slice(e+1).trim();return o?[t,...al(o)]:[t]}return[]}function il(n,r){let e=document.createElement("div");r.appendChild(e),e.style.setProperty("margin-top","0px","important"),e.style.setProperty("margin-top",n,"important");let t=parseFloat(window.getComputedStyle(e).marginTop)||0;return r.removeChild(e),t}function Bp({children:n,freeze:r}){let e=jr(r,n);return d.createElement(d.Fragment,null,e)}function jr(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let Hr=d.createContext(null);Hr.displayName="OpenClosedContext";var Ye=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(Ye||{});function En(){return d.useContext(Hr)}function Ea({value:n,children:r}){return d.createElement(Hr.Provider,{value:n},r)}function Vp({children:n}){return d.createElement(Hr.Provider,{value:null},n)}var Rr={exports:{}},ka={};/**
59
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(u=e==null?void 0:e.onChange)==null||u.call(e,o),o}return a.updateDeps=i=>{t=i},a}function ql(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const _h=(n,r)=>Math.abs(n-r)<=1,Ch=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},Ul=n=>{const{offsetWidth:r,offsetHeight:e}=n;return{width:r,height:e}},Oh=n=>n,Mh=n=>{const r=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),t=[];for(let o=r;o<=e;o++)t.push(o);return t},Th=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;const o=i=>{const{width:s,height:l}=i;r({width:Math.round(s),height:Math.round(l)})};if(o(Ul(e)),!t.ResizeObserver)return()=>{};const a=new t.ResizeObserver(i=>{const s=()=>{const l=i[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(Ul(e))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},Ql={passive:!0},Gl=typeof window>"u"?!0:"onscrollend"in window,Ph=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=n.options.useScrollendEvent&&Gl?()=>{}:Ch(t,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:f,isRtl:h}=n.options;o=f?e.scrollLeft*(h&&-1||1):e.scrollTop,a(),r(o,c)},s=i(!0),l=i(!1);l(),e.addEventListener("scroll",s,Ql);const u=n.options.useScrollendEvent&&Gl;return u&&e.addEventListener("scrollend",l,Ql),()=>{e.removeEventListener("scroll",s),u&&e.removeEventListener("scrollend",l)}},Ih=(n,r,e)=>{if(r!=null&&r.borderBoxSize){const t=r.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return n[e.options.horizontal?"offsetWidth":"offsetHeight"]},Nh=(n,{adjustments:r=0,behavior:e},t)=>{var o,a;const i=n+r;(a=(o=t.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[t.options.horizontal?"left":"top"]:i,behavior:e})};class Lh{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=t())==null||o.disconnect(),e=null},observe:o=>{var a;return(a=t())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=t())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,o])=>{typeof o>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Oh,rangeExtractor:Mh,onChange:()=>{},measureElement:Ih,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,o;(o=(t=this.options).onChange)==null||o.call(t,this,e)},this.maybeNotify=Pn(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",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(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()}))}},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??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const o=new Map,a=new Map;for(let i=t-1;i>=0;i--){const s=e[i];if(o.has(s.lane))continue;const l=a.get(s.lane);if(l==null||s.end>l.end?a.set(s.lane,s):s.end<l.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=Pn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,o,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=Pn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<e;c++){const f=a(c),h=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),p=h?h.end+this.options.gap:t+o,m=s.get(f),v=typeof m=="number"?m:this.options.estimateSize(c),g=p+v,x=h?h.lane:c%this.options.lanes;u[c]={index:c,start:p,size:v,end:g,key:f,lane:x}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Pn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,o,a)=>this.range=e.length>0&&t>0?Fh({measurements:e,outerSize:t,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Pn(()=>{let e=null,t=null;const o=this.calculateRange();return o&&(e=o.startIndex,t=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,o,a,i)=>a===null||i===null?[]:e({startIndex:a,endIndex:i,overscan:t,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,o=e.getAttribute(t);return o?parseInt(o,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const o=this.indexFromElement(e),a=this.measurementsCache[o];if(!a)return;const i=a.key,s=this.elementsCache.get(i);s!==e&&(s&&this.observer.unobserve(s),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(o,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const o=this.measurementsCache[e];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=t-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((t,o)=>{t.isConnected||(this.observer.unobserve(t),this.elementsCache.delete(o))});return}this._measureElement(e,void 0)},this.getVirtualItems=Pn(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const o=[];for(let a=0,i=e.length;a<i;a++){const s=e[a],l=t[s];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return ql(t[Kl(0,t.length-1,o=>ql(t[o]).start,e)])},this.getOffsetForAlignment=(e,t,o=0)=>{const a=this.getSize(),i=this.getScrollOffset();t==="auto"&&(t=e>=i+a?"end":"start"),t==="center"?e+=(o-a)/2:t==="end"&&(e-=a);const s=this.getTotalSize()-a;return Math.max(Math.min(s,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const o=this.measurementsCache[e];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(t==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)t="end";else if(o.start<=i+this.options.scrollPaddingStart)t="start";else return[i,t];const s=t==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,o.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:o})},this.scrollToIndex=(e,{align:t="auto",behavior:o}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(e,t);if(!a)return;const[i,s]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const u=this.getOffsetForIndex(e,s);if(!u)return;const[c]=u,f=this.getScrollOffset();_h(c,f)||this.scrollToIndex(e,{align:s,behavior:o})}else this.scrollToIndex(e,{align:s,behavior:o})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let o;if(t.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((e=t[t.length-1])==null?void 0:e.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=t.length-1;for(;i>=0&&a.some(s=>s===null);){const s=t[i];a[s.lane]===null&&(a[s.lane]=s.end),i--}o=Math.max(...a.filter(s=>s!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:o})=>{this.options.scrollToFn(e,{behavior:o,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(r)}}const Kl=(n,r,e,t)=>{for(;n<=r;){const o=(n+r)/2|0,a=e(o);if(a<t)n=o+1;else if(a>t)r=o-1;else return o}return n>0?n-1:0};function Fh({measurements:n,outerSize:r,scrollOffset:e,lanes:t}){const o=n.length-1,a=l=>n[l].start;if(n.length<=t)return{startIndex:0,endIndex:o};let i=Kl(0,o,a,e),s=i;if(t===1)for(;s<o&&n[s].end<e+r;)s++;else if(t>1){const l=Array(t).fill(0);for(;s<o&&l.some(c=>c<e+r);){const c=n[s];l[c.lane]=c.end,s++}const u=Array(t).fill(e+r);for(;i>=0&&u.some(c=>c>=e);){const c=n[i];u[c.lane]=c.start,i--}i=Math.max(0,i-i%t),s=Math.min(o,s+(t-1-s%t))}return{startIndex:i,endIndex:s}}const Xl=typeof document<"u"?V.useLayoutEffect:V.useEffect;function $h(n){const r=V.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?Ne.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=V.useState(()=>new Lh(e));return t.setOptions(e),Xl(()=>t._didMount(),[]),Xl(()=>t._willUpdate()),t}function Ah(n){return $h({observeElementRect:Th,observeElementOffset:Ph,scrollToFn:Nh,...n})}function Yh(n,r){return n!==null&&r!==null&&typeof n=="object"&&typeof r=="object"&&"id"in n&&"id"in r?n.id===r.id:n===r}function Jl(n=Yh){return d.useCallback((r,e)=>{if(typeof n=="string"){let t=n;return(r==null?void 0:r[t])===(e==null?void 0:e[t])}return n(r,e)},[n])}function Rh(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function Ua(n,r=!1){let[e,t]=d.useReducer(()=>({}),{}),o=d.useMemo(()=>Rh(n),[n,e]);return fe(()=>{if(!n)return;let a=new ResizeObserver(t);return a.observe(n),()=>{a.disconnect()}},[n]),r?{width:`${o.width}px`,height:`${o.height}px`}:o}let Zl=class extends Map{constructor(r){super(),this.factory=r}get(r){let e=super.get(r);return e===void 0&&(e=this.factory(r),this.set(r,e)),e}};var jh=Object.defineProperty,Wh=(n,r,e)=>r in n?jh(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Hh=(n,r,e)=>(Wh(n,r+"",e),e),eu=(n,r,e)=>{if(!r.has(n))throw TypeError("Cannot "+e)},ot=(n,r,e)=>(eu(n,r,"read from private field"),e?e.call(n):r.get(n)),Qa=(n,r,e)=>{if(r.has(n))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(n):r.set(n,e)},tu=(n,r,e,t)=>(eu(n,r,"write to private field"),r.set(n,e),e),ht,vr,gr;let Ga=class{constructor(r){Qa(this,ht,{}),Qa(this,vr,new Zl(()=>new Set)),Qa(this,gr,new Set),Hh(this,"disposables",rt()),tu(this,ht,r)}dispose(){this.disposables.dispose()}get state(){return ot(this,ht)}subscribe(r,e){let t={selector:r,callback:e,current:r(ot(this,ht))};return ot(this,gr).add(t),this.disposables.add(()=>{ot(this,gr).delete(t)})}on(r,e){return ot(this,vr).get(r).add(e),this.disposables.add(()=>{ot(this,vr).get(r).delete(e)})}send(r){let e=this.reduce(ot(this,ht),r);if(e!==ot(this,ht)){tu(this,ht,e);for(let t of ot(this,gr)){let o=t.selector(ot(this,ht));nu(t.current,o)||(t.current=o,t.callback(o))}for(let t of ot(this,vr).get(r.type))t(ot(this,ht),r)}}};ht=new WeakMap,vr=new WeakMap,gr=new WeakMap;function nu(n,r){return Object.is(n,r)?!0:typeof n!="object"||n===null||typeof r!="object"||r===null?!1:Array.isArray(n)&&Array.isArray(r)?n.length!==r.length?!1:Ka(n[Symbol.iterator](),r[Symbol.iterator]()):n instanceof Map&&r instanceof Map||n instanceof Set&&r instanceof Set?n.size!==r.size?!1:Ka(n.entries(),r.entries()):ru(n)&&ru(r)?Ka(Object.entries(n)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function Ka(n,r){do{let e=n.next(),t=r.next();if(e.done&&t.done)return!0;if(e.done||t.done||!Object.is(e.value,t.value))return!1}while(!0)}function ru(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}function Xa(n){let[r,e]=n(),t=rt();return(...o)=>{r(...o),t.dispose(),t.microTask(e)}}var Bh=Object.defineProperty,Vh=(n,r,e)=>r in n?Bh(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,ou=(n,r,e)=>(Vh(n,typeof r!="symbol"?r+"":r,e),e),Ja=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(Ja||{});let zh={0(n,r){let e=r.id,t=n.stack,o=n.stack.indexOf(e);if(o!==-1){let a=n.stack.slice();return a.splice(o,1),a.push(e),t=a,{...n,stack:t}}return{...n,stack:[...n.stack,e]}},1(n,r){let e=r.id,t=n.stack.indexOf(e);if(t===-1)return n;let o=n.stack.slice();return o.splice(t,1),{...n,stack:o}}},qh=class cf extends Ga{constructor(){super(...arguments),ou(this,"actions",{push:r=>this.send({type:0,id:r}),pop:r=>this.send({type:1,id:r})}),ou(this,"selectors",{isTop:(r,e)=>r.stack[r.stack.length-1]===e,inStack:(r,e)=>r.stack.includes(e)})}static new(){return new cf({stack:[]})}reduce(r,e){return Le(e.type,zh,r,e)}};const In=new Zl(()=>qh.new());var co={exports:{}},Za={};/**
33
60
  * @license React
34
61
  * use-sync-external-store-with-selector.production.js
35
62
  *
@@ -37,7 +64,7 @@ Check the top-level render call using <`+R+">.")}return I}}function yc(b,I){{if(
37
64
  *
38
65
  * This source code is licensed under the MIT license found in the
39
66
  * LICENSE file in the root directory of this source tree.
40
- */var sl;function zp(){if(sl)return ka;sl=1;var n=d;function r(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var e=typeof Object.is=="function"?Object.is:r,t=n.useSyncExternalStore,o=n.useRef,a=n.useEffect,i=n.useMemo,s=n.useDebugValue;return ka.useSyncExternalStoreWithSelector=function(l,u,c,p,m){var f=o(null);if(f.current===null){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=i(function(){function g(k){if(!w){if(w=!0,y=k,k=p(k),m!==void 0&&h.hasValue){var C=h.value;if(m(C,k))return x=C}return x=k}if(C=x,e(y,k))return C;var S=p(k);return m!==void 0&&m(C,S)?(y=k,C):(y=k,x=S)}var w=!1,y,x,E=c===void 0?null:c;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,c,p,m]);var v=t(l,f[0],f[1]);return a(function(){h.hasValue=!0,h.value=v},[v]),s(v),v},ka}var Sa={};/**
67
+ */var au;function Uh(){if(au)return Za;au=1;var n=d;function r(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var e=typeof Object.is=="function"?Object.is:r,t=n.useSyncExternalStore,o=n.useRef,a=n.useEffect,i=n.useMemo,s=n.useDebugValue;return Za.useSyncExternalStoreWithSelector=function(l,u,c,f,h){var p=o(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=i(function(){function g(D){if(!x){if(x=!0,E=D,D=f(D),h!==void 0&&m.hasValue){var T=m.value;if(h(T,D))return w=T}return w=D}if(T=w,e(E,D))return T;var $=f(D);return h!==void 0&&h(T,$)?(E=D,T):(E=D,w=$)}var x=!1,E,w,k=c===void 0?null:c;return[function(){return g(u())},k===null?void 0:function(){return g(k())}]},[u,c,f,h]);var v=t(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),s(v),v},Za}var ei={};/**
41
68
  * @license React
42
69
  * use-sync-external-store-with-selector.development.js
43
70
  *
@@ -45,9 +72,10 @@ Check the top-level render call using <`+R+">.")}return I}}function yc(b,I){{if(
45
72
  *
46
73
  * This source code is licensed under the MIT license found in the
47
74
  * LICENSE file in the root directory of this source tree.
48
- */var ll;function Up(){return ll||(ll=1,process.env.NODE_ENV!=="production"&&function(){function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=d,e=typeof Object.is=="function"?Object.is:n,t=r.useSyncExternalStore,o=r.useRef,a=r.useEffect,i=r.useMemo,s=r.useDebugValue;Sa.useSyncExternalStoreWithSelector=function(l,u,c,p,m){var f=o(null);if(f.current===null){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=i(function(){function g(k){if(!w){if(w=!0,y=k,k=p(k),m!==void 0&&h.hasValue){var C=h.value;if(m(C,k))return x=C}return x=k}if(C=x,e(y,k))return C;var S=p(k);return m!==void 0&&m(C,S)?(y=k,C):(y=k,x=S)}var w=!1,y,x,E=c===void 0?null:c;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,c,p,m]);var v=t(l,f[0],f[1]);return a(function(){h.hasValue=!0,h.value=v},[v]),s(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Sa}var ul;function Qp(){return ul||(ul=1,process.env.NODE_ENV==="production"?Rr.exports=zp():Rr.exports=Up()),Rr.exports}var Kp=Qp(),cl=(n,r,e)=>{if(!r.has(n))throw TypeError("Cannot "+e)},nt=(n,r,e)=>(cl(n,r,"read from private field"),e?e.call(n):r.get(n)),Ca=(n,r,e)=>{if(r.has(n))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(n):r.set(n,e)},dl=(n,r,e,t)=>(cl(n,r,"write to private field"),r.set(n,e),e),Et,Xn,Jn;let fl=class{constructor(r){Ca(this,Et,{}),Ca(this,Xn,new us(()=>new Set)),Ca(this,Jn,new Set),dl(this,Et,r)}get state(){return nt(this,Et)}subscribe(r,e){let t={selector:r,callback:e,current:r(nt(this,Et))};return nt(this,Jn).add(t),()=>{nt(this,Jn).delete(t)}}on(r,e){return nt(this,Xn).get(r).add(e),()=>{nt(this,Xn).get(r).delete(e)}}send(r){dl(this,Et,this.reduce(nt(this,Et),r));for(let e of nt(this,Jn)){let t=e.selector(nt(this,Et));pl(e.current,t)||(e.current=t,e.callback(t))}for(let e of nt(this,Xn).get(r.type))e(nt(this,Et),r)}};Et=new WeakMap,Xn=new WeakMap,Jn=new WeakMap;function pl(n,r){return Object.is(n,r)?!0:typeof n!="object"||n===null||typeof r!="object"||r===null?!1:Array.isArray(n)&&Array.isArray(r)?n.length!==r.length?!1:_a(n[Symbol.iterator](),r[Symbol.iterator]()):n instanceof Map&&r instanceof Map||n instanceof Set&&r instanceof Set?n.size!==r.size?!1:_a(n.entries(),r.entries()):ml(n)&&ml(r)?_a(Object.entries(n)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function _a(n,r){do{let e=n.next(),t=r.next();if(e.done&&t.done)return!0;if(e.done||t.done||!Object.is(e.value,t.value))return!1}while(!0)}function ml(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}function Oa(n){let[r,e]=n(),t=et();return(...o)=>{r(...o),t.dispose(),t.microTask(e)}}function ye(n,r,e=pl){return Kp.useSyncExternalStoreWithSelector(V(t=>n.subscribe(qp,t)),V(()=>n.state),V(()=>n.state),V(r),e)}function qp(n){return n}function Gp(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let lt=[];Gp(()=>{function n(r){if(!(r.target instanceof HTMLElement)||r.target===document.body||lt[0]===r.target)return;let e=r.target;e=e.closest(Pr),lt.unshift(e??r.target),lt=lt.filter(t=>t!=null&&t.isConnected),lt.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Xp(n){throw new Error("Unexpected object: "+n)}var se=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(se||{});function Zn(n,r){let e=r.resolveItems();if(e.length<=0)return null;let t=r.resolveActiveIndex(),o=t??-1;switch(n.focus){case 0:{for(let a=0;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 1:{o===-1&&(o=e.length);for(let a=o-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 2:{for(let a=o+1;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 3:{for(let a=e.length-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 4:{for(let a=0;a<e.length;++a)if(r.resolveId(e[a],a,e)===n.id)return a;return t}case 5:return null;default:Xp(n)}}var Ma=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(Ma||{});function hl(n){let r=V(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,kr(()=>{e.current&&r()})}),[r])}function Jp(){let n=typeof document>"u";return"useSyncExternalStore"in F?(r=>r.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!n):!1}function er(){let n=Jp(),[r,e]=F.useState(qt.isHandoffComplete);return r&&qt.isHandoffComplete===!1&&e(!1),F.useEffect(()=>{r!==!0&&e(!0)},[r]),F.useEffect(()=>qt.handoff(),[]),n?!1:r}let vl=d.createContext(!1);function Zp(){return d.useContext(vl)}function gl(n){return d.createElement(vl.Provider,{value:n.force},n.children)}function em(n){let r=Zp(),e=d.useContext(yl),[t,o]=d.useState(()=>{var a;if(!r&&e!==null)return(a=e.current)!=null?a:null;if(qt.isServer)return null;let i=n==null?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(n===null)return null;let s=n.createElement("div");return s.setAttribute("id","headlessui-portal-root"),n.body.appendChild(s)});return d.useEffect(()=>{t!==null&&(n!=null&&n.body.contains(t)||n==null||n.body.appendChild(t))},[t,n]),d.useEffect(()=>{r||e!==null&&o(e.current)},[e,o,r]),t}let bl=d.Fragment,tm=De(function(n,r){let{ownerDocument:e=null,...t}=n,o=d.useRef(null),a=Le(zd(f=>{o.current=f}),r),i=xt(o),s=e??i,l=em(s),[u]=d.useState(()=>{var f;return qt.isServer?null:(f=s==null?void 0:s.createElement("div"))!=null?f:null}),c=d.useContext(Pa),p=er();ce(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ce(()=>{if(u&&c)return c.register(u)},[c,u]),hl(()=>{var f;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l)))});let m=Ce();return p?!l||!u?null:Se.createPortal(m({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:bl,name:"Portal"}),u):null});function nm(n,r){let e=Le(r),{enabled:t=!0,ownerDocument:o,...a}=n,i=Ce();return t?d.createElement(tm,{...a,ownerDocument:o,ref:e}):i({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:bl,name:"Portal"})}let rm=d.Fragment,yl=d.createContext(null);function om(n,r){let{target:e,...t}=n,o={ref:Le(r)},a=Ce();return d.createElement(yl.Provider,{value:e},a({ourProps:o,theirProps:t,defaultTag:rm,name:"Popover.Group"}))}let Pa=d.createContext(null);function am(){let n=d.useContext(Pa),r=d.useRef([]),e=V(a=>(r.current.push(a),n&&n.register(a),()=>t(a))),t=V(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),n&&n.unregister(a)}),o=d.useMemo(()=>({register:e,unregister:t,portals:r}),[e,t,r]);return[r,d.useMemo(()=>function({children:a}){return d.createElement(Pa.Provider,{value:o},a)},[o])]}let im=De(nm),wl=De(om),Ta=Object.assign(im,{Group:wl});var sm=Object.defineProperty,lm=(n,r,e)=>r in n?sm(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,xl=(n,r,e)=>(lm(n,typeof r!="symbol"?r+"":r,e),e),ie=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(ie||{}),Qe=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(Qe||{}),jt=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(jt||{}),Dl=(n=>(n[n.OpenCombobox=0]="OpenCombobox",n[n.CloseCombobox=1]="CloseCombobox",n[n.GoToOption=2]="GoToOption",n[n.SetTyping=3]="SetTyping",n[n.RegisterOption=4]="RegisterOption",n[n.UnregisterOption=5]="UnregisterOption",n[n.DefaultToFirstOption=6]="DefaultToFirstOption",n[n.SetActivationTrigger=7]="SetActivationTrigger",n[n.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",n[n.SetInputElement=9]="SetInputElement",n[n.SetButtonElement=10]="SetButtonElement",n[n.SetOptionsElement=11]="SetOptionsElement",n))(Dl||{});function Na(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=r(n.options.slice()),o=t.length>0&&t[0].dataRef.current.order!==null?t.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):ea(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let um={1(n){var r;return(r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===1?n:{...n,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(n){var r,e;if((r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===0)return n;if((e=n.dataRef.current)!=null&&e.value){let t=n.dataRef.current.calculateIndex(n.dataRef.current.value);if(t!==-1)return{...n,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...n,comboboxState:0,__demoMode:!1}},3(n,r){return n.isTyping===r.isTyping?n:{...n,isTyping:r.isTyping}},2(n,r){var e,t,o,a;if((e=n.dataRef.current)!=null&&e.disabled||n.optionsElement&&!((t=n.dataRef.current)!=null&&t.optionsPropsRef.current.static)&&n.comboboxState===1)return n;if(n.virtual){let{options:u,disabled:c}=n.virtual,p=r.focus===se.Specific?r.idx:Zn(r,{resolveItems:()=>u,resolveActiveIndex:()=>{var f,h;return(h=(f=n.activeOptionIndex)!=null?f:u.findIndex(v=>!c(v)))!=null?h:null},resolveDisabled:c,resolveId(){throw new Error("Function not implemented.")}}),m=(o=r.trigger)!=null?o:2;return n.activeOptionIndex===p&&n.activationTrigger===m?n:{...n,activeOptionIndex:p,activationTrigger:m,isTyping:!1,__demoMode:!1}}let i=Na(n);if(i.activeOptionIndex===null){let u=i.options.findIndex(c=>!c.dataRef.current.disabled);u!==-1&&(i.activeOptionIndex=u)}let s=r.focus===se.Specific?r.idx:Zn(r,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled}),l=(a=r.trigger)!=null?a:2;return n.activeOptionIndex===s&&n.activationTrigger===l?n:{...n,...i,isTyping:!1,activeOptionIndex:s,activationTrigger:l,__demoMode:!1}},4:(n,r)=>{var e,t,o,a;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:[...n.options,r.payload]};let i=r.payload,s=Na(n,u=>(u.push(i),u));n.activeOptionIndex===null&&(o=(t=n.dataRef.current).isSelected)!=null&&o.call(t,r.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let l={...n,...s,activationTrigger:2};return(a=n.dataRef.current)!=null&&a.__demoMode&&n.dataRef.current.value===void 0&&(l.activeOptionIndex=0),l},5:(n,r)=>{var e;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:n.options.filter(o=>o.id!==r.id)};let t=Na(n,o=>{let a=o.findIndex(i=>i.id===r.id);return a!==-1&&o.splice(a,1),o});return{...n,...t,activationTrigger:2}},6:(n,r)=>n.defaultToFirstOption===r.value?n:{...n,defaultToFirstOption:r.value},7:(n,r)=>n.activationTrigger===r.trigger?n:{...n,activationTrigger:r.trigger},8:(n,r)=>{var e,t;if(n.virtual===null)return{...n,virtual:{options:r.options,disabled:(e=r.disabled)!=null?e:()=>!1}};if(n.virtual.options===r.options&&n.virtual.disabled===r.disabled)return n;let o=n.activeOptionIndex;if(n.activeOptionIndex!==null){let a=r.options.indexOf(n.virtual.options[n.activeOptionIndex]);a!==-1?o=a:o=null}return{...n,activeOptionIndex:o,virtual:{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}}},9:(n,r)=>n.inputElement===r.element?n:{...n,inputElement:r.element},10:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},11:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},cm=class Ec extends fl{constructor(){super(...arguments),xl(this,"actions",{onChange:r=>{let{onChange:e,compare:t,mode:o,value:a}=this.state.dataRef.current;return Fe(o,{0:()=>e==null?void 0:e(r),1:()=>{let i=a.slice(),s=i.findIndex(l=>t(l,r));return s===-1?i.push(r):i.splice(s,1),e==null?void 0:e(i)}})},registerOption:(r,e)=>(this.send({type:4,payload:{id:r,dataRef:e}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(e.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:r})}),goToOption:(r,e)=>(this.send({type:6,value:!1}),this.send({type:2,...r,trigger:e})),setIsTyping:r=>{this.send({type:3,isTyping:r})},closeCombobox:()=>{var r,e;this.send({type:1}),this.send({type:6,value:!1}),(e=(r=this.state.dataRef.current).onClose)==null||e.call(r)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:r=>{this.send({type:7,trigger:r})},selectActiveOption:()=>{let r=this.selectors.activeOptionIndex(this.state);if(r!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[r]);else{let{dataRef:e}=this.state.options[r];this.actions.onChange(e.current.value)}this.actions.goToOption({focus:se.Specific,idx:r})}},setInputElement:r=>{this.send({type:9,element:r})},setButtonElement:r=>{this.send({type:10,element:r})},setOptionsElement:r=>{this.send({type:11,element:r})}}),xl(this,"selectors",{activeDescendantId:r=>{var e,t;let o=this.selectors.activeOptionIndex(r);if(o!==null)return r.virtual?(t=r.options.find(a=>!a.dataRef.current.disabled&&r.dataRef.current.compare(a.dataRef.current.value,r.virtual.options[o])))==null?void 0:t.id:(e=r.options[o])==null?void 0:e.id},activeOptionIndex:r=>{if(r.defaultToFirstOption&&r.activeOptionIndex===null&&(r.virtual?r.virtual.options.length>0:r.options.length>0)){if(r.virtual){let{options:t,disabled:o}=r.virtual,a=t.findIndex(i=>{var s;return!((s=o==null?void 0:o(i))!=null&&s)});if(a!==-1)return a}let e=r.options.findIndex(t=>!t.dataRef.current.disabled);if(e!==-1)return e}return r.activeOptionIndex},activeOption:r=>{var e,t;let o=this.selectors.activeOptionIndex(r);return o===null?null:r.virtual?r.virtual.options[o??0]:(t=(e=r.options[o])==null?void 0:e.dataRef.current.value)!=null?t:null},isActive:(r,e,t)=>{var o;let a=this.selectors.activeOptionIndex(r);return a===null?!1:r.virtual?a===r.dataRef.current.calculateIndex(e):((o=r.options[a])==null?void 0:o.id)===t},shouldScrollIntoView:(r,e,t)=>!(r.virtual||r.__demoMode||r.comboboxState!==0||r.activationTrigger===0||!this.selectors.isActive(r,e,t))})}static new({virtual:r=null,__demoMode:e=!1}={}){var t;return new Ec({dataRef:{current:{}},comboboxState:e?0:1,isTyping:!1,options:[],virtual:r?{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:e})}reduce(r,e){return Fe(e.type,um,r,e)}};const El=d.createContext(null);function tr(n){let r=d.useContext(El);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,kl),e}return r}function kl({virtual:n=null,__demoMode:r=!1}={}){return d.useMemo(()=>cm.new({virtual:n,__demoMode:r}),[])}let nr=d.createContext(null);nr.displayName="ComboboxDataContext";function kn(n){let r=d.useContext(nr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,kn),e}return r}let Sl=d.createContext(null);function dm(n){let r=tr("VirtualProvider"),e=kn("VirtualProvider"),{options:t}=e.virtual,o=ye(r,f=>f.optionsElement),[a,i]=d.useMemo(()=>{let f=o;if(!f)return[0,0];let h=window.getComputedStyle(f);return[parseFloat(h.paddingBlockStart||h.paddingTop),parseFloat(h.paddingBlockEnd||h.paddingBottom)]},[o]),s=pf({enabled:t.length!==0,scrollPaddingStart:a,scrollPaddingEnd:i,count:t.length,estimateSize(){return 40},getScrollElement(){return r.state.optionsElement},overscan:12}),[l,u]=d.useState(0);ce(()=>{u(f=>f+1)},[t]);let c=s.getVirtualItems(),p=ye(r,f=>f.activationTrigger===jt.Pointer),m=ye(r,r.selectors.activeOptionIndex);return c.length===0?null:d.createElement(Sl.Provider,{value:s},d.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:f=>{f&&(p||m!==null&&t.length>m&&s.scrollToIndex(m))}},c.map(f=>{var h;return d.createElement(d.Fragment,{key:f.key},d.cloneElement((h=n.children)==null?void 0:h.call(n,{...n.slot,option:t[f.index]}),{key:`${l}-${f.key}`,"data-index":f.index,"aria-setsize":t.length,"aria-posinset":f.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${f.start}px)`,overflowAnchor:"none"}}))})))}let fm=d.Fragment;function pm(n,r){let e=Sr(),{value:t,defaultValue:o,onChange:a,form:i,name:s,by:l,invalid:u=!1,disabled:c=e||!1,onClose:p,__demoMode:m=!1,multiple:f=!1,immediate:h=!1,virtual:v=null,nullable:g,...w}=n,y=Ui(o),[x=f?[]:void 0,E]=zi(t,a,y),k=kl({virtual:v,__demoMode:m}),C=d.useRef({static:!1,hold:!1}),S=ls(l),D=V(Z=>v?l===null?v.options.indexOf(Z):v.options.findIndex(A=>S(A,Z)):k.state.options.findIndex(A=>S(A.dataRef.current.value,Z))),_=d.useCallback(Z=>Fe(Y.mode,{[Qe.Multi]:()=>x.some(A=>S(A,Z)),[Qe.Single]:()=>S(x,Z)}),[x]),O=ye(k,Z=>Z.virtual),T=V(()=>p==null?void 0:p()),Y=d.useMemo(()=>({__demoMode:m,immediate:h,optionsPropsRef:C,value:x,defaultValue:y,disabled:c,invalid:u,mode:f?Qe.Multi:Qe.Single,virtual:v?O:null,onChange:E,isSelected:_,calculateIndex:D,compare:S,onClose:T}),[x,y,c,u,f,E,_,m,k,v,O,T]);ce(()=>{var Z;v&&k.send({type:Dl.UpdateVirtualConfiguration,options:v.options,disabled:(Z=v.disabled)!=null?Z:null})},[v,v==null?void 0:v.options,v==null?void 0:v.disabled]),ce(()=>{k.state.dataRef.current=Y},[Y]);let[W,N,L,$]=ye(k,Z=>[Z.comboboxState,Z.buttonElement,Z.inputElement,Z.optionsElement]),z=W===ie.Open;ta(z,[N,L,$],()=>k.actions.closeCombobox());let P=ye(k,k.selectors.activeOptionIndex),q=ye(k,k.selectors.activeOption),X=d.useMemo(()=>({open:W===ie.Open,disabled:c,invalid:u,activeIndex:P,activeOption:q,value:x}),[Y,c,x,u,q,W]),[G,Oe]=rs(),te=r===null?{}:{ref:r},H=d.useCallback(()=>{if(y!==void 0)return E==null?void 0:E(y)},[E,y]),we=Ce();return d.createElement(Oe,{value:G,props:{htmlFor:L==null?void 0:L.id},slot:{open:W===ie.Open,disabled:c}},d.createElement(ol,null,d.createElement(nr.Provider,{value:Y},d.createElement(El.Provider,{value:k},d.createElement(Ea,{value:Fe(W,{[ie.Open]:Ye.Open,[ie.Closed]:Ye.Closed})},s!=null&&d.createElement(Gi,{disabled:c,data:x!=null?{[s]:x}:{},form:i,onReset:H}),we({ourProps:te,theirProps:w,slot:X,defaultTag:fm,name:"Combobox"}))))))}let mm="input";function hm(n,r){var e,t;let o=tr("Combobox.Input"),a=kn("Combobox.Input"),i=d.useId(),s=Uo(),{id:l=s||`headlessui-combobox-input-${i}`,onChange:u,displayValue:c,disabled:p=a.disabled||!1,autoFocus:m=!1,type:f="text",...h}=n,[v]=ye(o,H=>[H.inputElement]),g=d.useRef(null),w=Le(g,r,el(),o.actions.setInputElement),y=xt(v),[x,E]=ye(o,H=>[H.comboboxState,H.isTyping]),k=Ft(),C=V(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:se.Nothing})}),S=d.useMemo(()=>{var H;return typeof c=="function"&&a.value!==void 0?(H=c(a.value))!=null?H:"":typeof a.value=="string"?a.value:""},[a.value,c]);Un(([H,we],[Z,A])=>{if(o.state.isTyping)return;let J=g.current;J&&((A===ie.Open&&we===ie.Closed||H!==Z)&&(J.value=H),requestAnimationFrame(()=>{if(o.state.isTyping||!J||(y==null?void 0:y.activeElement)!==J)return;let{selectionStart:le,selectionEnd:oe}=J;Math.abs((oe??0)-(le??0))===0&&le===0&&J.setSelectionRange(J.value.length,J.value.length)}))},[S,x,y,E]),Un(([H],[we])=>{if(H===ie.Open&&we===ie.Closed){if(o.state.isTyping)return;let Z=g.current;if(!Z)return;let A=Z.value,{selectionStart:J,selectionEnd:le,selectionDirection:oe}=Z;Z.value="",Z.value=A,oe!==null?Z.setSelectionRange(J,le,oe):Z.setSelectionRange(J,le)}},[x]);let D=d.useRef(!1),_=V(()=>{D.current=!0}),O=V(()=>{k.nextFrame(()=>{D.current=!1})}),T=V(H=>{switch(o.actions.setIsTyping(!0),H.key){case de.Enter:if(o.state.comboboxState!==ie.Open||D.current)return;if(H.preventDefault(),H.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),a.mode===Qe.Single&&o.actions.closeCombobox();break;case de.ArrowDown:return H.preventDefault(),H.stopPropagation(),Fe(o.state.comboboxState,{[ie.Open]:()=>o.actions.goToOption({focus:se.Next}),[ie.Closed]:()=>o.actions.openCombobox()});case de.ArrowUp:return H.preventDefault(),H.stopPropagation(),Fe(o.state.comboboxState,{[ie.Open]:()=>o.actions.goToOption({focus:se.Previous}),[ie.Closed]:()=>{Se.flushSync(()=>o.actions.openCombobox()),a.value||o.actions.goToOption({focus:se.Last})}});case de.Home:if(H.shiftKey)break;return H.preventDefault(),H.stopPropagation(),o.actions.goToOption({focus:se.First});case de.PageUp:return H.preventDefault(),H.stopPropagation(),o.actions.goToOption({focus:se.First});case de.End:if(H.shiftKey)break;return H.preventDefault(),H.stopPropagation(),o.actions.goToOption({focus:se.Last});case de.PageDown:return H.preventDefault(),H.stopPropagation(),o.actions.goToOption({focus:se.Last});case de.Escape:return o.state.comboboxState!==ie.Open?void 0:(H.preventDefault(),o.state.optionsElement&&!a.optionsPropsRef.current.static&&H.stopPropagation(),a.mode===Qe.Single&&a.value===null&&C(),o.actions.closeCombobox());case de.Tab:if(o.state.comboboxState!==ie.Open)return;a.mode===Qe.Single&&o.state.activationTrigger!==jt.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),Y=V(H=>{u==null||u(H),a.mode===Qe.Single&&H.target.value===""&&C(),o.actions.openCombobox()}),W=V(H=>{var we,Z,A;let J=(we=H.relatedTarget)!=null?we:lt.find(le=>le!==H.currentTarget);if(!((Z=o.state.optionsElement)!=null&&Z.contains(J))&&!((A=o.state.buttonElement)!=null&&A.contains(J))&&o.state.comboboxState===ie.Open)return H.preventDefault(),a.mode===Qe.Single&&a.value===null&&C(),o.actions.closeCombobox()}),N=V(H=>{var we,Z,A;let J=(we=H.relatedTarget)!=null?we:lt.find(le=>le!==H.currentTarget);(Z=o.state.buttonElement)!=null&&Z.contains(J)||(A=o.state.optionsElement)!=null&&A.contains(J)||a.disabled||a.immediate&&o.state.comboboxState!==ie.Open&&k.microTask(()=>{Se.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(jt.Focus)})}),L=Bn(),$=es(),{isFocused:z,focusProps:P}=Ro({autoFocus:m}),{isHovered:q,hoverProps:X}=Ho({isDisabled:p}),G=ye(o,H=>H.optionsElement),Oe=d.useMemo(()=>({open:x===ie.Open,disabled:p,invalid:a.invalid,hover:q,focus:z,autofocus:m}),[a,q,z,m,p,a.invalid]),te=Hn({ref:w,id:l,role:"combobox",type:f,"aria-controls":G==null?void 0:G.id,"aria-expanded":x===ie.Open,"aria-activedescendant":ye(o,o.selectors.activeDescendantId),"aria-labelledby":L,"aria-describedby":$,"aria-autocomplete":"list",defaultValue:(t=(e=n.defaultValue)!=null?e:a.defaultValue!==void 0?c==null?void 0:c(a.defaultValue):null)!=null?t:a.defaultValue,disabled:p||void 0,autoFocus:m,onCompositionStart:_,onCompositionEnd:O,onKeyDown:T,onChange:Y,onFocus:N,onBlur:W},P,X);return Ce()({ourProps:te,theirProps:h,slot:Oe,defaultTag:mm,name:"Combobox.Input"})}let vm="button";function gm(n,r){let e=tr("Combobox.Button"),t=kn("Combobox.Button"),[o,a]=d.useState(null),i=Le(r,a,e.actions.setButtonElement),s=d.useId(),{id:l=`headlessui-combobox-button-${s}`,disabled:u=t.disabled||!1,autoFocus:c=!1,...p}=n,m=ye(e,T=>T.inputElement),f=ws(m),h=V(T=>{switch(T.key){case de.Space:case de.Enter:T.preventDefault(),T.stopPropagation(),e.state.comboboxState===ie.Closed&&Se.flushSync(()=>e.actions.openCombobox()),f();return;case de.ArrowDown:T.preventDefault(),T.stopPropagation(),e.state.comboboxState===ie.Closed&&(Se.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.First})),f();return;case de.ArrowUp:T.preventDefault(),T.stopPropagation(),e.state.comboboxState===ie.Closed&&(Se.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.Last})),f();return;case de.Escape:if(e.state.comboboxState!==ie.Open)return;T.preventDefault(),e.state.optionsElement&&!t.optionsPropsRef.current.static&&T.stopPropagation(),Se.flushSync(()=>e.actions.closeCombobox()),f();return;default:return}}),v=V(T=>{T.preventDefault(),!Xi(T.currentTarget)&&(T.button===Ma.Left&&(e.state.comboboxState===ie.Open?e.actions.closeCombobox():e.actions.openCombobox()),f())}),g=Bn([l]),{isFocusVisible:w,focusProps:y}=Ro({autoFocus:c}),{isHovered:x,hoverProps:E}=Ho({isDisabled:u}),{pressed:k,pressProps:C}=Bi({disabled:u}),[S,D]=ye(e,T=>[T.comboboxState,T.optionsElement]),_=d.useMemo(()=>({open:S===ie.Open,active:k||S===ie.Open,disabled:u,invalid:t.invalid,value:t.value,hover:x,focus:w}),[t,x,w,k,u,S]),O=Hn({ref:i,id:l,type:xs(n,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":D==null?void 0:D.id,"aria-expanded":S===ie.Open,"aria-labelledby":g,disabled:u||void 0,autoFocus:c,onMouseDown:v,onKeyDown:h},y,E,C);return Ce()({ourProps:O,theirProps:p,slot:_,defaultTag:vm,name:"Combobox.Button"})}let bm="div",ym=Lt.RenderStrategy|Lt.Static;function wm(n,r){var e,t,o;let a=d.useId(),{id:i=`headlessui-combobox-options-${a}`,hold:s=!1,anchor:l,portal:u=!1,modal:c=!0,transition:p=!1,...m}=n,f=tr("Combobox.Options"),h=kn("Combobox.Options"),v=Zs(l);v&&(u=!0);let[g,w]=nl(v),[y,x]=d.useState(null),E=tl(),k=Le(r,v?g:null,f.actions.setOptionsElement,x),[C,S,D,_,O]=ye(f,oe=>[oe.comboboxState,oe.inputElement,oe.buttonElement,oe.optionsElement,oe.activationTrigger]),T=xt(S||D),Y=xt(_),W=En(),[N,L]=aa(p,y,W!==null?(W&Ye.Open)===Ye.Open:C===ie.Open);Xo(N,S,f.actions.closeCombobox);let $=h.__demoMode?!1:c&&C===ie.Open;ra($,Y);let z=h.__demoMode?!1:c&&C===ie.Open;Go(z,{allowed:d.useCallback(()=>[S,D,_],[S,D,_])}),ce(()=>{var oe;h.optionsPropsRef.current.static=(oe=n.static)!=null?oe:!1},[h.optionsPropsRef,n.static]),ce(()=>{h.optionsPropsRef.current.hold=s},[h.optionsPropsRef,s]),Lf(C===ie.Open,{container:_,accept(oe){return oe.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:oe.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(oe){oe.setAttribute("role","none")}});let P=Bn([D==null?void 0:D.id]),q=d.useMemo(()=>({open:C===ie.Open,option:void 0}),[C]),X=V(()=>{f.actions.setActivationTrigger(jt.Pointer)}),G=V(oe=>{oe.preventDefault(),f.actions.setActivationTrigger(jt.Pointer)}),Oe=Hn(v?E():{},{"aria-labelledby":P,role:"listbox","aria-multiselectable":h.mode===Qe.Multi?!0:void 0,id:i,ref:k,style:{...m.style,...w,"--input-width":Ko(S,!0).width,"--button-width":Ko(D,!0).width},onWheel:O===jt.Pointer?void 0:X,onMouseDown:G,...oa(L)}),te=N&&C===ie.Closed,H=jr(te,(e=h.virtual)==null?void 0:e.options),we=jr(te,h.value),Z=V(oe=>h.compare(we,oe)),A=d.useMemo(()=>{if(!h.virtual)return h;if(H===void 0)throw new Error("Missing `options` in virtual mode");return H!==h.virtual.options?{...h,virtual:{...h.virtual,options:H}}:h},[h,H,(t=h.virtual)==null?void 0:t.options]);h.virtual&&Object.assign(m,{children:d.createElement(nr.Provider,{value:A},d.createElement(dm,{slot:q},m.children))});let J=Ce(),le=d.useMemo(()=>h.mode===Qe.Multi?h:{...h,isSelected:Z},[h,Z]);return d.createElement(Ta,{enabled:u?n.static||N:!1,ownerDocument:T},d.createElement(nr.Provider,{value:le},J({ourProps:Oe,theirProps:{...m,children:d.createElement(Bp,{freeze:te},typeof m.children=="function"?(o=m.children)==null?void 0:o.call(m,q):m.children)},slot:q,defaultTag:bm,features:ym,visible:N,name:"Combobox.Options"})))}let xm="div";function Dm(n,r){var e,t,o;let a=kn("Combobox.Option"),i=tr("Combobox.Option"),s=d.useId(),{id:l=`headlessui-combobox-option-${s}`,value:u,disabled:c=(o=(t=(e=a.virtual)==null?void 0:e.disabled)==null?void 0:t.call(e,u))!=null?o:!1,order:p=null,...m}=n,[f]=ye(i,L=>[L.inputElement]),h=ws(f),v=ye(i,d.useCallback(L=>i.selectors.isActive(L,u,l),[u,l])),g=a.isSelected(u),w=d.useRef(null),y=yt({disabled:c,value:u,domRef:w,order:p}),x=d.useContext(Sl),E=Le(r,w,x?x.measureElement:null),k=V(()=>{i.actions.setIsTyping(!1),i.actions.onChange(u)});ce(()=>i.actions.registerOption(l,y),[y,l]);let C=ye(i,d.useCallback(L=>i.selectors.shouldScrollIntoView(L,u,l),[u,l]));ce(()=>{if(C)return et().requestAnimationFrame(()=>{var L,$;($=(L=w.current)==null?void 0:L.scrollIntoView)==null||$.call(L,{block:"nearest"})})},[C,w]);let S=V(L=>{L.preventDefault(),L.button===Ma.Left&&(c||(k(),gs()||requestAnimationFrame(()=>h()),a.mode===Qe.Single&&i.actions.closeCombobox()))}),D=V(()=>{if(c)return i.actions.goToOption({focus:se.Nothing});let L=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:L})}),_=Es(),O=V(L=>_.update(L)),T=V(L=>{if(!_.wasMoved(L)||c||v)return;let $=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:$},jt.Pointer)}),Y=V(L=>{_.wasMoved(L)&&(c||v&&(a.optionsPropsRef.current.hold||i.actions.goToOption({focus:se.Nothing})))}),W=d.useMemo(()=>({active:v,focus:v,selected:g,disabled:c}),[v,g,c]),N={id:l,ref:E,role:"option",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:S,onFocus:D,onPointerEnter:O,onMouseEnter:O,onPointerMove:T,onMouseMove:T,onPointerLeave:Y,onMouseLeave:Y};return Ce()({ourProps:N,theirProps:m,slot:W,defaultTag:xm,name:"Combobox.Option"})}let Em=De(pm),km=De(gm),Cl=De(hm),Sm=Mr,_l=De(wm),Ol=De(Dm),Cm=Object.assign(Em,{Input:Cl,Button:km,Label:Sm,Options:_l,Option:Ol});function _m(n,r=typeof document<"u"?document.defaultView:null,e){let t=vn(n,"escape");na(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===de.Escape&&e(o))})}function Om(){var n;let[r]=d.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[e,t]=d.useState((n=r==null?void 0:r.matches)!=null?n:!1);return ce(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),e}function Mm({defaultContainers:n=[],portals:r,mainTreeNode:e}={}){let t=xt(e),o=V(()=>{var a,i;let s=[];for(let l of n)l!==null&&(l instanceof HTMLElement?s.push(l):"current"in l&&l.current instanceof HTMLElement&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=t==null?void 0:t.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(e&&(l.contains(e)||l.contains((i=e==null?void 0:e.getRootNode())==null?void 0:i.host))||s.some(u=>l.contains(u))||s.push(l));return s});return{resolveContainers:o,contains:V(a=>o().some(i=>i.contains(a)))}}let Ml=d.createContext(null);function Pl({children:n,node:r}){let[e,t]=d.useState(null),o=Tl(r??e);return d.createElement(Ml.Provider,{value:o},n,o===null&&d.createElement(Rn,{features:mn.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=Gt(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l!=null&&l.contains(a)){t(l);break}}}}))}function Tl(n=null){var r;return(r=d.useContext(Ml))!=null?r:n}function Ia(){let n=d.useRef(!1);return ce(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var rr=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(rr||{});function Pm(){let n=d.useRef(0);return bs(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function Nl(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)e.current instanceof HTMLElement&&r.add(e.current);return r}let Tm="div";var tn=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(tn||{});function Nm(n,r){let e=d.useRef(null),t=Le(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;er()||(s=0);let u=xt(e);$m(s,{ownerDocument:u});let c=Am(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});Ym(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let p=Pm(),m=V(y=>{let x=e.current;x&&(E=>E())(()=>{Fe(p.current,{[rr.Forwards]:()=>{gn(x,tt.First,{skipElements:[y.relatedTarget,a]})},[rr.Backwards]:()=>{gn(x,tt.Last,{skipElements:[y.relatedTarget,a]})}})})}),f=vn(!!(s&2),"focus-trap#tab-lock"),h=Ft(),v=d.useRef(!1),g={ref:t,onKeyDown(y){y.key=="Tab"&&(v.current=!0,h.requestAnimationFrame(()=>{v.current=!1}))},onBlur(y){if(!(s&4))return;let x=Nl(i);e.current instanceof HTMLElement&&x.add(e.current);let E=y.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(Il(x,E)||(v.current?gn(e.current,Fe(p.current,{[rr.Forwards]:()=>tt.Next,[rr.Backwards]:()=>tt.Previous})|tt.WrapAround,{relativeTo:y.target}):y.target instanceof HTMLElement&&wt(y.target)))}},w=Ce();return d.createElement(d.Fragment,null,f&&d.createElement(Rn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:mn.Focusable}),w({ourProps:g,theirProps:l,defaultTag:Tm,name:"FocusTrap"}),f&&d.createElement(Rn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:mn.Focusable}))}let Im=De(Nm),Fm=Object.assign(Im,{features:tn});function Lm(n=!0){let r=d.useRef(lt.slice());return Un(([e],[t])=>{t===!0&&e===!1&&kr(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=lt.slice())},[n,lt,r]),V(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function $m(n,{ownerDocument:r}){let e=!!(n&8),t=Lm(e);Un(()=>{e||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&wt(t())},[e]),hl(()=>{e&&wt(t())})}function Am(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=vn(!!(n&1),"focus-trap#initial-focus"),s=Ia();return Un(()=>{if(n===0)return;if(!i){o!=null&&o.current&&wt(o.current);return}let l=e.current;l&&kr(()=>{if(!s.current)return;let u=r==null?void 0:r.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===u){a.current=u;return}}else if(l.contains(u)){a.current=u;return}if(t!=null&&t.current)wt(t.current);else{if(n&16){if(gn(l,tt.First|tt.AutoFocus)!==Jo.Error)return}else if(gn(l,tt.First)!==Jo.Error)return;if(o!=null&&o.current&&(wt(o.current),(r==null?void 0:r.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=r==null?void 0:r.activeElement})},[o,i,n]),a}function Ym(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=Ia(),i=!!(n&4);na(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=Nl(t);e.current instanceof HTMLElement&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;c&&c instanceof HTMLElement?Il(l,c)?(o.current=c,wt(c)):(s.preventDefault(),s.stopPropagation(),wt(u)):wt(o.current)},!0)}function Il(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function Fl(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:$l)!==d.Fragment||d.Children.count(n.children)===1}let Br=d.createContext(null);Br.displayName="TransitionContext";var Wm=(n=>(n.Visible="visible",n.Hidden="hidden",n))(Wm||{});function jm(){let n=d.useContext(Br);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function Hm(){let n=d.useContext(Vr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Vr=d.createContext(null);Vr.displayName="NestingContext";function zr(n){return"children"in n?zr(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Ll(n,r){let e=yt(n),t=d.useRef([]),o=Ia(),a=Ft(),i=V((f,h=$t.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===f);v!==-1&&(Fe(h,{[$t.Unmount](){t.current.splice(v,1)},[$t.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!zr(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=V(f=>{let h=t.current.find(({el:v})=>v===f);return h?h.state!=="visible"&&(h.state="visible"):t.current.push({el:f,state:"visible"}),()=>i(f,$t.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),p=V((f,h,v)=>{l.current.splice(0),r&&(r.chains.current[h]=r.chains.current[h].filter(([g])=>g!==f)),r==null||r.chains.current[h].push([f,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[h].push([f,new Promise(g=>{Promise.all(c.current[h].map(([w,y])=>y)).then(()=>g())})]),h==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(h)):v(h)}),m=V((f,h,v)=>{Promise.all(c.current[h].splice(0).map(([g,w])=>w)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(h))});return d.useMemo(()=>({children:t,register:s,unregister:i,onStart:p,onStop:m,wait:u,chains:c}),[s,i,t,p,m,c,u])}let $l=d.Fragment,Al=Lt.RenderStrategy;function Rm(n,r){var e,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:u,enterFrom:c,enterTo:p,entered:m,leave:f,leaveFrom:h,leaveTo:v,...g}=n,[w,y]=d.useState(null),x=d.useRef(null),E=Fl(n),k=Le(...E?[x,r,y]:r===null?[]:[r]),C=(e=g.unmount)==null||e?$t.Unmount:$t.Hidden,{show:S,appear:D,initial:_}=jm(),[O,T]=d.useState(S?"visible":"hidden"),Y=Hm(),{register:W,unregister:N}=Y;ce(()=>W(x),[W,x]),ce(()=>{if(C===$t.Hidden&&x.current){if(S&&O!=="visible"){T("visible");return}return Fe(O,{hidden:()=>N(x),visible:()=>W(x)})}},[O,x,W,N,S,C]);let L=er();ce(()=>{if(E&&L&&O==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,O,L,E]);let $=_&&!D,z=D&&S&&_,P=d.useRef(!1),q=Ll(()=>{P.current||(T("hidden"),N(x))},Y),X=V(A=>{P.current=!0;let J=A?"enter":"leave";q.onStart(x,J,le=>{le==="enter"?a==null||a():le==="leave"&&(s==null||s())})}),G=V(A=>{let J=A?"enter":"leave";P.current=!1,q.onStop(x,J,le=>{le==="enter"?i==null||i():le==="leave"&&(l==null||l())}),J==="leave"&&!zr(q)&&(T("hidden"),N(x))});d.useEffect(()=>{E&&o||(X(S),G(S))},[S,E,o]);let Oe=!(!o||!E||!L||$),[,te]=aa(Oe,w,S,{start:X,end:G}),H=At({ref:k,className:((t=Vo(g.className,z&&u,z&&c,te.enter&&u,te.enter&&te.closed&&c,te.enter&&!te.closed&&p,te.leave&&f,te.leave&&!te.closed&&h,te.leave&&te.closed&&v,!te.transition&&S&&m))==null?void 0:t.trim())||void 0,...oa(te)}),we=0;O==="visible"&&(we|=Ye.Open),O==="hidden"&&(we|=Ye.Closed),S&&O==="hidden"&&(we|=Ye.Opening),!S&&O==="visible"&&(we|=Ye.Closing);let Z=Ce();return d.createElement(Vr.Provider,{value:q},d.createElement(Ea,{value:we},Z({ourProps:H,theirProps:g,defaultTag:$l,features:Al,visible:O==="visible",name:"Transition.Child"})))}function Bm(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=Fl(n),l=Le(...s?[i,r]:r===null?[]:[r]);er();let u=En();if(e===void 0&&u!==null&&(e=(u&Ye.Open)===Ye.Open),e===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,p]=d.useState(e?"visible":"hidden"),m=Ll(()=>{e||p("hidden")}),[f,h]=d.useState(!0),v=d.useRef([e]);ce(()=>{f!==!1&&v.current[v.current.length-1]!==e&&(v.current.push(e),h(!1))},[v,e]);let g=d.useMemo(()=>({show:e,appear:t,initial:f}),[e,t,f]);ce(()=>{e?p("visible"):!zr(m)&&i.current!==null&&p("hidden")},[e,m]);let w={unmount:o},y=V(()=>{var k;f&&h(!1),(k=n.beforeEnter)==null||k.call(n)}),x=V(()=>{var k;f&&h(!1),(k=n.beforeLeave)==null||k.call(n)}),E=Ce();return d.createElement(Vr.Provider,{value:m},d.createElement(Br.Provider,{value:g},E({ourProps:{...w,as:d.Fragment,children:d.createElement(Yl,{ref:l,...w,...a,beforeEnter:y,beforeLeave:x})},theirProps:{},defaultTag:d.Fragment,features:Al,visible:c==="visible",name:"Transition"})))}function Vm(n,r){let e=d.useContext(Br)!==null,t=En()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement(Fa,{ref:r,...n}):d.createElement(Yl,{ref:r,...n}))}let Fa=De(Bm),Yl=De(Rm),La=De(Vm),Wl=Object.assign(Fa,{Child:La,Root:Fa});var zm=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(zm||{}),Um=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(Um||{});let Qm={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},$a=d.createContext(null);$a.displayName="DialogContext";function Ur(n){let r=d.useContext($a);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ur),e}return r}function Km(n,r){return Fe(r.type,Qm,n,r)}let jl=De(function(n,r){let e=d.useId(),{id:t=`headlessui-dialog-${e}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:u=!1,unmount:c=!1,...p}=n,m=d.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(m.current||(m.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=En();o===void 0&&f!==null&&(o=(f&Ye.Open)===Ye.Open);let h=d.useRef(null),v=Le(h,r),g=xt(h),w=o?0:1,[y,x]=d.useReducer(Km,{titleId:null,descriptionId:null,panelRef:d.createRef()}),E=V(()=>a(!1)),k=V(G=>x({type:0,id:G})),C=er()?w===0:!1,[S,D]=am(),_={get current(){var G;return(G=y.panelRef.current)!=null?G:h.current}},O=Tl(),{resolveContainers:T}=Mm({mainTreeNode:O,portals:S,defaultContainers:[_]}),Y=f!==null?(f&Ye.Closing)===Ye.Closing:!1;Go(u||Y?!1:C,{allowed:V(()=>{var G,Oe;return[(Oe=(G=h.current)==null?void 0:G.closest("[data-headlessui-portal]"))!=null?Oe:null]}),disallowed:V(()=>{var G;return[(G=O==null?void 0:O.closest("body > *:not(#headlessui-portal-root)"))!=null?G:null]})}),ta(C,T,G=>{G.preventDefault(),E()}),_m(C,g==null?void 0:g.defaultView,G=>{G.preventDefault(),G.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),ra(u||Y?!1:C,g,T),Xo(C,h,E);let[W,N]=Ud(),L=d.useMemo(()=>[{dialogState:w,close:E,setTitleId:k,unmount:c},y],[w,y,E,k,c]),$=d.useMemo(()=>({open:w===0}),[w]),z={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:w===0?!0:void 0,"aria-labelledby":y.titleId,"aria-describedby":W,unmount:c},P=!Om(),q=tn.None;C&&!u&&(q|=tn.RestoreFocus,q|=tn.TabLock,l&&(q|=tn.AutoFocus),P&&(q|=tn.InitialFocus));let X=Ce();return d.createElement(Vp,null,d.createElement(gl,{force:!0},d.createElement(Ta,null,d.createElement($a.Provider,{value:L},d.createElement(wl,{target:h},d.createElement(gl,{force:!1},d.createElement(N,{slot:$},d.createElement(D,null,d.createElement(Fm,{initialFocus:i,initialFocusFallback:h,containers:T,features:q},d.createElement(ef,{value:E},X({ourProps:z,theirProps:p,slot:$,defaultTag:qm,features:Gm,visible:w===0,name:"Dialog"})))))))))))}),qm="div",Gm=Lt.RenderStrategy|Lt.Static;function Xm(n,r){let{transition:e=!1,open:t,...o}=n,a=En(),i=n.hasOwnProperty("open")||a!==null,s=n.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(t!==void 0||e)&&!o.static?d.createElement(Pl,null,d.createElement(Wl,{show:t,transition:e,unmount:o.unmount},d.createElement(jl,{ref:r,...o}))):d.createElement(Pl,null,d.createElement(jl,{ref:r,open:t,...o}))}let Jm="div";function Zm(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Ur("Dialog.Panel"),u=Le(r,l.panelRef),c=d.useMemo(()=>({open:i===0}),[i]),p=V(g=>{g.stopPropagation()}),m={ref:u,id:t,onClick:p},f=o?La:d.Fragment,h=o?{unmount:s}:{},v=Ce();return d.createElement(f,{...h},v({ourProps:m,theirProps:a,slot:c,defaultTag:Jm,name:"Dialog.Panel"}))}let eh="div";function th(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Ur("Dialog.Backdrop"),i=d.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0},l=e?La:d.Fragment,u=e?{unmount:a}:{},c=Ce();return d.createElement(l,{...u},c({ourProps:s,theirProps:t,slot:i,defaultTag:eh,name:"Dialog.Backdrop"}))}let nh="h2";function rh(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Ur("Dialog.Title"),s=Le(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=d.useMemo(()=>({open:a===0}),[a]),u={ref:s,id:t};return Ce()({ourProps:u,theirProps:o,slot:l,defaultTag:nh,name:"Dialog.Title"})}let oh=De(Xm),Hl=De(Zm);De(th);let Rl=De(rh),or=Object.assign(oh,{Panel:Hl,Title:Rl,Description:ts});function ah(n,r){let e=d.useRef({left:0,top:0});if(ce(()=>{if(!r)return;let o=r.getBoundingClientRect();o&&(e.current=o)},[n,r]),r==null||!n||r===document.activeElement)return!1;let t=r.getBoundingClientRect();return t.top!==e.current.top||t.left!==e.current.left}let Bl=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Vl(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!(o instanceof HTMLElement))return t;let a=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),a=!0;let i=a?(e=o.innerText)!=null?e:"":t;return Bl.test(i)&&(i=i.replace(Bl,"")),i}function ih(n){let r=n.getAttribute("aria-label");if(typeof r=="string")return r.trim();let e=n.getAttribute("aria-labelledby");if(e){let t=e.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():Vl(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return Vl(n).trim()}function sh(n){let r=d.useRef(""),e=d.useRef("");return V(()=>{let t=n.current;if(!t)return"";let o=t.innerText;if(r.current===o)return e.current;let a=ih(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var lh=Object.defineProperty,uh=(n,r,e)=>r in n?lh(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,zl=(n,r,e)=>(uh(n,typeof r!="symbol"?r+"":r,e),e),je=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(je||{}),ut=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(ut||{}),Aa=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(Aa||{}),Ul=(n=>(n[n.OpenListbox=0]="OpenListbox",n[n.CloseListbox=1]="CloseListbox",n[n.GoToOption=2]="GoToOption",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterOptions=5]="RegisterOptions",n[n.UnregisterOptions=6]="UnregisterOptions",n[n.SetButtonElement=7]="SetButtonElement",n[n.SetOptionsElement=8]="SetOptionsElement",n[n.SortOptions=9]="SortOptions",n))(Ul||{});function Ql(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=ea(r(n.options.slice()),a=>a.dataRef.current.domRef.current),o=e?t.indexOf(e):null;return o===-1&&(o=null),{options:t,activeOptionIndex:o}}let ch={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(n){if(n.dataRef.current.disabled||n.listboxState===0)return n;let r=n.activeOptionIndex,{isSelected:e}=n.dataRef.current,t=n.options.findIndex(o=>e(o.dataRef.current.value));return t!==-1&&(r=t),{...n,listboxState:0,activeOptionIndex:r,__demoMode:!1}},2(n,r){var e,t,o,a,i;if(n.dataRef.current.disabled||n.listboxState===1)return n;let s={...n,searchQuery:"",activationTrigger:(e=r.trigger)!=null?e:1,__demoMode:!1};if(r.focus===se.Nothing)return{...s,activeOptionIndex:null};if(r.focus===se.Specific)return{...s,activeOptionIndex:n.options.findIndex(c=>c.id===r.id)};if(r.focus===se.Previous){let c=n.activeOptionIndex;if(c!==null){let p=n.options[c].dataRef.current.domRef,m=Zn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=n.options[m].dataRef.current.domRef;if(((t=p.current)==null?void 0:t.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:m}}}}else if(r.focus===se.Next){let c=n.activeOptionIndex;if(c!==null){let p=n.options[c].dataRef.current.domRef,m=Zn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=n.options[m].dataRef.current.domRef;if(((a=p.current)==null?void 0:a.nextElementSibling)===f.current||((i=f.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeOptionIndex:m}}}}let l=Ql(n),u=Zn(r,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...s,...l,activeOptionIndex:u}},3:(n,r)=>{if(n.dataRef.current.disabled||n.listboxState===1)return n;let e=n.searchQuery!==""?0:1,t=n.searchQuery+r.value.toLowerCase(),o=(n.activeOptionIndex!==null?n.options.slice(n.activeOptionIndex+e).concat(n.options.slice(0,n.activeOptionIndex+e)):n.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(t))}),a=o?n.options.indexOf(o):-1;return a===-1||a===n.activeOptionIndex?{...n,searchQuery:t}:{...n,searchQuery:t,activeOptionIndex:a,activationTrigger:1}},4(n){return n.dataRef.current.disabled||n.listboxState===1||n.searchQuery===""?n:{...n,searchQuery:""}},5:(n,r)=>{let e=n.options.concat(r.options),t=n.activeOptionIndex;if(n.activeOptionIndex===null){let{isSelected:o}=n.dataRef.current;if(o){let a=e.findIndex(i=>o==null?void 0:o(i.dataRef.current.value));a!==-1&&(t=a)}}return{...n,options:e,activeOptionIndex:t,pendingShouldSort:!0}},6:(n,r)=>{let e=n.options,t=[],o=new Set(r.options);for(let[a,i]of e.entries())if(o.has(i.id)&&(t.push(a),o.delete(i.id),o.size===0))break;if(t.length>0){e=e.slice();for(let a of t.reverse())e.splice(a,1)}return{...n,options:e,activationTrigger:1}},7:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},8:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element},9:n=>n.pendingShouldSort?{...n,...Ql(n),pendingShouldSort:!1}:n};class Ya extends fl{constructor(r){super(r),zl(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Fe(a,{0:()=>t==null?void 0:t(e),1:()=>{let s=i.slice(),l=s.findIndex(u=>o(u,e));return l===-1?s.push(e):s.splice(l,1),t==null?void 0:t(s)}})},registerOption:Oa(()=>{let e=[],t=new Set;return[(o,a)=>{t.has(a)||(t.add(a),e.push({id:o,dataRef:a}))},()=>(t.clear(),this.send({type:5,options:e.splice(0)}))]}),unregisterOption:Oa(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:6,options:e.splice(0)})}]}),goToOption:Oa(()=>{let e=null;return[(t,o)=>{e={type:2,...t,trigger:o}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:()=>{this.send({type:0})},selectActiveOption:()=>{if(this.state.activeOptionIndex!==null){let{dataRef:e,id:t}=this.state.options[this.state.activeOptionIndex];this.actions.onChange(e.current.value),this.send({type:2,focus:se.Specific,id:t})}},selectOption:e=>{let t=this.state.options.find(o=>o.id===e);t&&this.actions.onChange(t.dataRef.current.value)},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:7,element:e})},setOptionsElement:e=>{this.send({type:8,element:e})}}),zl(this,"selectors",{activeDescendantId(e){var t;let o=e.activeOptionIndex,a=e.options;return o===null||(t=a[o])==null?void 0:t.id},isActive(e,t){var o;let a=e.activeOptionIndex,i=e.options;return a!==null?((o=i[a])==null?void 0:o.id)===t:!1},shouldScrollIntoView(e,t){return e.__demoMode||e.listboxState!==0||e.activationTrigger===0?!1:this.isActive(e,t)}}),this.on(5,()=>{requestAnimationFrame(()=>{this.send({type:9})})})}static new({__demoMode:r=!1}={}){return new Ya({dataRef:{current:{}},listboxState:r?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,__demoMode:r})}reduce(r,e){return Fe(e.type,ch,r,e)}}const Kl=d.createContext(null);function Wa(n){let r=d.useContext(Kl);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,ql),e}return r}function ql({__demoMode:n=!1}={}){return d.useMemo(()=>Ya.new({__demoMode:n}),[])}let Qr=d.createContext(null);Qr.displayName="ListboxDataContext";function ar(n){let r=d.useContext(Qr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,ar),e}return r}let dh=d.Fragment;function fh(n,r){let e=Sr(),{value:t,defaultValue:o,form:a,name:i,onChange:s,by:l,invalid:u=!1,disabled:c=e||!1,horizontal:p=!1,multiple:m=!1,__demoMode:f=!1,...h}=n;const v=p?"horizontal":"vertical";let g=Le(r),w=Ui(o),[y=m?[]:void 0,x]=zi(t,s,w),E=ql({__demoMode:f}),k=d.useRef({static:!1,hold:!1}),C=d.useRef(new Map),S=ls(l),D=d.useCallback(X=>Fe(_.mode,{[ut.Multi]:()=>y.some(G=>S(G,X)),[ut.Single]:()=>S(y,X)}),[y]),_=d.useMemo(()=>({value:y,disabled:c,invalid:u,mode:m?ut.Multi:ut.Single,orientation:v,onChange:x,compare:S,isSelected:D,optionsPropsRef:k,listRef:C}),[y,c,u,m,v,x,S,D,k,C]);ce(()=>{E.state.dataRef.current=_},[_]);let O=ye(E,X=>X.listboxState),T=O===je.Open,[Y,W]=ye(E,X=>[X.buttonElement,X.optionsElement]);ta(T,[Y,W],(X,G)=>{E.send({type:Ul.CloseListbox}),hs(G,Zo.Loose)||(X.preventDefault(),Y==null||Y.focus())});let N=d.useMemo(()=>({open:O===je.Open,disabled:c,invalid:u,value:y}),[O,c,u,y]),[L,$]=rs({inherit:!0}),z={ref:g},P=d.useCallback(()=>{if(w!==void 0)return x==null?void 0:x(w)},[x,w]),q=Ce();return d.createElement($,{value:L,props:{htmlFor:Y==null?void 0:Y.id},slot:{open:O===je.Open,disabled:c}},d.createElement(ol,null,d.createElement(Kl.Provider,{value:E},d.createElement(Qr.Provider,{value:_},d.createElement(Ea,{value:Fe(O,{[je.Open]:Ye.Open,[je.Closed]:Ye.Closed})},i!=null&&y!=null&&d.createElement(Gi,{disabled:c,data:{[i]:y},form:a,onReset:P}),q({ourProps:z,theirProps:h,slot:N,defaultTag:dh,name:"Listbox"}))))))}let ph="button";function mh(n,r){let e=d.useId(),t=Uo(),o=ar("Listbox.Button"),a=Wa("Listbox.Button"),{id:i=t||`headlessui-listbox-button-${e}`,disabled:s=o.disabled||!1,autoFocus:l=!1,...u}=n,c=Le(r,el(),a.actions.setButtonElement),p=jp(),m=V(N=>{switch(N.key){case de.Enter:Ad(N.currentTarget);break;case de.Space:case de.ArrowDown:N.preventDefault(),Se.flushSync(()=>a.actions.openListbox()),o.value||a.actions.goToOption({focus:se.First});break;case de.ArrowUp:N.preventDefault(),Se.flushSync(()=>a.actions.openListbox()),o.value||a.actions.goToOption({focus:se.Last});break}}),f=V(N=>{switch(N.key){case de.Space:N.preventDefault();break}}),h=V(N=>{var L;if(N.button===0){if(Xi(N.currentTarget))return N.preventDefault();a.state.listboxState===je.Open?(Se.flushSync(()=>a.actions.closeListbox()),(L=a.state.buttonElement)==null||L.focus({preventScroll:!0})):(N.preventDefault(),a.actions.openListbox())}}),v=V(N=>N.preventDefault()),g=Bn([i]),w=es(),{isFocusVisible:y,focusProps:x}=Ro({autoFocus:l}),{isHovered:E,hoverProps:k}=Ho({isDisabled:s}),{pressed:C,pressProps:S}=Bi({disabled:s}),D=ye(a,N=>N.listboxState),_=d.useMemo(()=>({open:D===je.Open,active:C||D===je.Open,disabled:s,invalid:o.invalid,value:o.value,hover:E,focus:y,autofocus:l}),[D,o.value,s,E,y,C,o.invalid,l]),O=ye(a,N=>N.listboxState===je.Open),[T,Y]=ye(a,N=>[N.buttonElement,N.optionsElement]),W=Hn(p(),{ref:c,id:i,type:xs(n,T),"aria-haspopup":"listbox","aria-controls":Y==null?void 0:Y.id,"aria-expanded":O,"aria-labelledby":g,"aria-describedby":w,disabled:s||void 0,autoFocus:l,onKeyDown:m,onKeyUp:f,onKeyPress:v,onMouseDown:h},x,k,S);return Ce()({ourProps:W,theirProps:u,slot:_,defaultTag:ph,name:"Listbox.Button"})}let Gl=d.createContext(!1),hh="div",vh=Lt.RenderStrategy|Lt.Static;function gh(n,r){let e=d.useId(),{id:t=`headlessui-listbox-options-${e}`,anchor:o,portal:a=!1,modal:i=!0,transition:s=!1,...l}=n,u=Zs(o),[c,p]=d.useState(null);u&&(a=!0);let m=ar("Listbox.Options"),f=Wa("Listbox.Options"),[h,v,g,w]=ye(f,A=>[A.listboxState,A.buttonElement,A.optionsElement,A.__demoMode]),y=xt(v),x=xt(g),E=En(),[k,C]=aa(s,c,E!==null?(E&Ye.Open)===Ye.Open:h===je.Open);Xo(k,v,f.actions.closeListbox);let S=w?!1:i&&h===je.Open;ra(S,x);let D=w?!1:i&&h===je.Open;Go(D,{allowed:d.useCallback(()=>[v,g],[v,g])});let _=h!==je.Open,O=ah(_,v)?!1:k,T=k&&h===je.Closed,Y=jr(T,m.value),W=V(A=>m.compare(Y,A)),N=ye(f,A=>{var J;if(u==null||!((J=u==null?void 0:u.to)!=null&&J.includes("selection")))return null;let le=A.options.findIndex(oe=>W(oe.dataRef.current.value));return le===-1&&(le=0),le}),L=(()=>{if(u==null)return;if(N===null)return{...u,inner:void 0};let A=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:A},index:N}}})(),[$,z]=nl(L),P=tl(),q=Le(r,u?$:null,f.actions.setOptionsElement,p),X=Ft();d.useEffect(()=>{var A;let J=g;J&&h===je.Open&&J!==((A=Gt(J))==null?void 0:A.activeElement)&&(J==null||J.focus({preventScroll:!0}))},[h,g]);let G=V(A=>{var J,le;switch(X.dispose(),A.key){case de.Space:if(f.state.searchQuery!=="")return A.preventDefault(),A.stopPropagation(),f.actions.search(A.key);case de.Enter:if(A.preventDefault(),A.stopPropagation(),f.state.activeOptionIndex!==null){let{dataRef:oe}=f.state.options[f.state.activeOptionIndex];f.actions.onChange(oe.current.value)}m.mode===ut.Single&&(Se.flushSync(()=>f.actions.closeListbox()),(J=f.state.buttonElement)==null||J.focus({preventScroll:!0}));break;case Fe(m.orientation,{vertical:de.ArrowDown,horizontal:de.ArrowRight}):return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:se.Next});case Fe(m.orientation,{vertical:de.ArrowUp,horizontal:de.ArrowLeft}):return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:se.Previous});case de.Home:case de.PageUp:return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:se.First});case de.End:case de.PageDown:return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:se.Last});case de.Escape:A.preventDefault(),A.stopPropagation(),Se.flushSync(()=>f.actions.closeListbox()),(le=f.state.buttonElement)==null||le.focus({preventScroll:!0});return;case de.Tab:A.preventDefault(),A.stopPropagation(),Se.flushSync(()=>f.actions.closeListbox()),Ef(f.state.buttonElement,A.shiftKey?tt.Previous:tt.Next);break;default:A.key.length===1&&(f.actions.search(A.key),X.setTimeout(()=>f.actions.clearSearch(),350));break}}),Oe=ye(f,A=>{var J;return(J=A.buttonElement)==null?void 0:J.id}),te=d.useMemo(()=>({open:h===je.Open}),[h]),H=Hn(u?P():{},{id:t,ref:q,"aria-activedescendant":ye(f,f.selectors.activeDescendantId),"aria-multiselectable":m.mode===ut.Multi?!0:void 0,"aria-labelledby":Oe,"aria-orientation":m.orientation,onKeyDown:G,role:"listbox",tabIndex:h===je.Open?0:void 0,style:{...l.style,...z,"--button-width":Ko(v,!0).width},...oa(C)}),we=Ce(),Z=d.useMemo(()=>m.mode===ut.Multi?m:{...m,isSelected:W},[m,W]);return d.createElement(Ta,{enabled:a?n.static||k:!1,ownerDocument:y},d.createElement(Qr.Provider,{value:Z},we({ourProps:H,theirProps:l,slot:te,defaultTag:hh,features:vh,visible:O,name:"Listbox.Options"})))}let bh="div";function yh(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(Gl)===!0,l=ar("Listbox.Option"),u=Wa("Listbox.Option"),c=ye(u,O=>u.selectors.isActive(O,t)),p=l.isSelected(a),m=d.useRef(null),f=sh(m),h=yt({disabled:o,value:a,domRef:m,get textValue(){return f()}}),v=Le(r,m,O=>{O?l.listRef.current.set(t,O):l.listRef.current.delete(t)}),g=ye(u,O=>u.selectors.shouldScrollIntoView(O,t));ce(()=>{if(g)return et().requestAnimationFrame(()=>{var O,T;(T=(O=m.current)==null?void 0:O.scrollIntoView)==null||T.call(O,{block:"nearest"})})},[g,m]),ce(()=>{if(!s)return u.actions.registerOption(t,h),()=>u.actions.unregisterOption(t)},[h,t,s]);let w=V(O=>{var T;if(o)return O.preventDefault();u.actions.onChange(a),l.mode===ut.Single&&(Se.flushSync(()=>u.actions.closeListbox()),(T=u.state.buttonElement)==null||T.focus({preventScroll:!0}))}),y=V(()=>{if(o)return u.actions.goToOption({focus:se.Nothing});u.actions.goToOption({focus:se.Specific,id:t})}),x=Es(),E=V(O=>{x.update(O),!o&&(c||u.actions.goToOption({focus:se.Specific,id:t},Aa.Pointer))}),k=V(O=>{x.wasMoved(O)&&(o||c||u.actions.goToOption({focus:se.Specific,id:t},Aa.Pointer))}),C=V(O=>{x.wasMoved(O)&&(o||c&&u.actions.goToOption({focus:se.Nothing}))}),S=d.useMemo(()=>({active:c,focus:c,selected:p,disabled:o,selectedOption:p&&s}),[c,p,o,s]),D=s?{}:{id:t,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":p,disabled:void 0,onClick:w,onFocus:y,onPointerEnter:E,onMouseEnter:E,onPointerMove:k,onMouseMove:k,onPointerLeave:C,onMouseLeave:C},_=Ce();return!p&&s?null:_({ourProps:D,theirProps:i,slot:S,defaultTag:bh,name:"Listbox.Option"})}let wh=d.Fragment;function xh(n,r){let{options:e,placeholder:t,...o}=n,a={ref:Le(r)},i=ar("ListboxSelectedOption"),s=d.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===ut.Multi&&Array.isArray(i.value)&&i.value.length===0,u=Ce();return d.createElement(Gl.Provider,{value:!0},u({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:wh,name:"ListboxSelectedOption"}))}let Dh=De(fh),Xl=De(mh),Eh=Mr,Jl=De(gh),Zl=De(yh),kh=De(xh),Sh=Object.assign(Dh,{Button:Xl,Label:Eh,Options:Jl,Option:Zl,SelectedOption:kh});var eu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},tu=d.createContext&&d.createContext(eu),Ch=["attr","size","title"];function _h(n,r){if(n==null)return{};var e=Oh(n,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function Oh(n,r){if(n==null)return{};var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){if(r.indexOf(t)>=0)continue;e[t]=n[t]}return e}function Kr(){return Kr=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},Kr.apply(this,arguments)}function nu(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function qr(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?nu(Object(e),!0).forEach(function(t){Mh(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):nu(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function Mh(n,r,e){return r=Ph(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function Ph(n){var r=Th(n,"string");return typeof r=="symbol"?r:r+""}function Th(n,r){if(typeof n!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,r);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function ru(n){return n&&n.map((r,e)=>d.createElement(r.tag,qr({key:e},r.attr),ru(r.child)))}function ir(n){return r=>d.createElement(Nh,Kr({attr:qr({},n.attr)},r),ru(n.child))}function Nh(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=_h(n,Ch),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",Kr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:qr(qr({color:n.color||e.color},e.style),n.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&d.createElement("title",null,a),n.children)};return tu!==void 0?d.createElement(tu.Consumer,null,e=>r(e)):r(eu)}function Ih(n){return ir({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"},child:[]}]})(n)}function ou(n){return ir({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}const Fh=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return M.jsxs(M.Fragment,{children:[M.jsx(Lh,{isOpen:o,setIsOpen:a,termImageUrl:t}),M.jsxs("div",{className:"inline-flex items-center",children:[M.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[M.jsx("input",{type:"checkbox",className:"before:content[''] border-blue-gray-200 before:bg-blue-gray-500 peer bg-petnow-grey-primary checked:border-petnow-orange-primary checked:bg-petnow-orange-primary checked:before:bg-petnow-orange-primary relative size-6 cursor-pointer appearance-none rounded-xl border transition-all before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity",id:r,checked:n,onChange:i=>{e(i.target.checked)}}),M.jsx("span",{className:"text-petnow-grey-secondary pointer-events-none absolute top-2/4 left-2/4 -translate-x-2/4 -translate-y-2/4 transition peer-checked:text-white",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:M.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),r&&M.jsxs("div",{className:"flex items-center",children:[M.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),M.jsx(Ih,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},Lh=({isOpen:n,setIsOpen:r,termImageUrl:e})=>M.jsxs(or,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[M.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),M.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:M.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:M.jsxs(or.Panel,{className:"mx-auto flex max-w-sm flex-col items-center gap-8 rounded-sm bg-white",children:[M.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:M.jsx(ou,{size:20,className:"mr-2",onClick:()=>r(!1)})}),M.jsx("img",{src:e,alt:"약관동의 이미지"}),M.jsx(Pi,{text:"닫기",className:"mb-4 w-[90%] text-base focus:outline-hidden",onClick:()=>r(!1)})]})})})]});var ja=function(n,r){return ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},ja(n,r)},Sn=function(){return Sn=Object.assign||function(n){for(var r,e=1,t=arguments.length;e<t;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},Sn.apply(this,arguments)};function $h(n,r){var e={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0&&(e[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(t=Object.getOwnPropertySymbols(n);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(e[t[o]]=n[t[o]])}return e}var Ha,au="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",Ah=(Ha=null,function(n){return n===void 0&&(n=au),Ha||(Ha=new Promise(function(r,e){var t=document.createElement("script");t.src=n,t.onload=function(){var o;if(!((o=window==null?void 0:window.daum)===null||o===void 0)&&o.Postcode)return r(window.daum.Postcode);e(new Error("Script is loaded successfully, but cannot find Postcode module. Check your scriptURL property."))},t.onerror=function(o){return e(o)},t.id="daum_postcode_script",document.body.appendChild(t)}))}),Yh=d.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),Wh={width:"100%",height:400},jh={scriptUrl:au,errorMessage:Yh,autoClose:!0},Hh=function(n){function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.mounted=!1,e.wrap=d.createRef(),e.state={hasError:!1,completed:!1},e.initiate=function(t){if(e.wrap.current){var o=e.props;o.scriptUrl,o.className,o.style;var a=o.defaultQuery,i=o.autoClose;o.errorMessage;var s=o.onComplete,l=o.onClose,u=o.onResize,c=o.onSearch,p=$h(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new t(Sn(Sn({},p),{oncomplete:function(m){s&&s(m),e.setState({completed:!0})},onsearch:c,onresize:u,onclose:l,width:"100%",height:"100%"})).embed(e.wrap.current,{q:a,autoClose:i})}},e.onError=function(t){console.error(t),e.setState({hasError:!0})},e}return function(e,t){function o(){this.constructor=e}ja(e,t),e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}(r,n),r.prototype.componentDidMount=function(){var e=this.initiate,t=this.onError,o=this.props.scriptUrl;o&&(this.mounted||(Ah(o).then(e).catch(t),this.mounted=!0))},r.prototype.render=function(){var e=this.props,t=e.className,o=e.style,a=e.errorMessage,i=e.autoClose,s=this.state,l=s.hasError,u=s.completed;return i===!0&&u===!0?null:d.createElement("div",{ref:this.wrap,className:t,style:Sn(Sn({},Wh),o)},l&&a)},r.defaultProps=jh,r}(d.Component);const Rh=({label:n,value:r,onFrontChange:e,onBackChange:t,onPostalCodeChange:o,disabled:a})=>{const[i,s]=d.useState(!1),l=p=>{let m=p.address,f="";p.addressType==="R"&&(p.bname!==""&&(f+=p.bname),p.buildingName!==""&&(f+=f!==""?`, ${p.buildingName}`:p.buildingName),m+=f!==""?` (${f})`:""),e(m),o&&o(p.zonecode),s(!1)},u=()=>{s(!0)},c=()=>r.front?r.front:M.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return M.jsxs(M.Fragment,{children:[M.jsx(Bh,{isOpen:i,setIsOpen:s,handleComplete:l}),M.jsxs("div",{className:"text-petnow-grey-tertiary",children:[M.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),M.jsxs("div",{className:"relative flex flex-col",children:[M.jsx("div",{className:`bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full cursor-pointer overflow-hidden rounded-xl p-4 text-base whitespace-nowrap focus:outline-hidden ${a&&"opacity-50"}`,onClick:u,children:c()}),M.jsx("input",{disabled:!r.front||a,value:r.back,type:"text",name:n,id:n,placeholder:"상세 주소를 입력해주세요.",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full rounded-xl p-4 text-base focus:outline-hidden disabled:opacity-50",autoComplete:"off",onChange:p=>t(p.target.value)})]})]})]})},Bh=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return M.jsx(or,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:M.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:M.jsx(or.Panel,{children:M.jsxs("div",{children:[M.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>e(!1),children:M.jsx(ou,{size:24,onClick:()=>e(!1)})}),M.jsx(Hh,{onComplete:t,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})},Vh=n=>{const{isOpen:r,setIsOpen:e}=n;return M.jsx(Wl,{show:r,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsxs(or,{onClose:()=>e(!1),className:"relative z-50 focus:outline-hidden",children:[M.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),M.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:M.jsxs(Hl,{className:"ja-break-all flex w-[90vw] max-w-[300px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]",children:[M.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.title&&M.jsx(Rl,{className:"global-break-all text-[18px] leading-[26px] font-bold text-black",children:n.title}),n.image&&M.jsx("img",{src:n.image.url,alt:n.image.alt}),n.description&&n.description!==""&&M.jsx(ts,{className:"text-petnow-grey-tertiary text-[16px] leading-[24px] break-all",children:n.description})]}),M.jsxs("div",{className:"flex flex-col gap-[8px]",children:[M.jsx("button",{className:"bg-petnow-orange-primary sm:hover:bg-petnow-orange-40 w-full cursor-pointer rounded-[12px] py-[12px] text-[14px] leading-[22px] font-bold text-white transition duration-200",onClick:n.confirm.onClick,children:n.confirm.text}),n.cancel&&M.jsx("button",{onClick:()=>e(!1),className:"bg-background-tertiary sm:hover:bg-petnow-grey-90 text-petnow-grey-tertiary w-full cursor-pointer rounded-[12px] py-[12px] text-[14px] leading-[22px] font-bold transition duration-200",children:n.cancel.text})]})]})})]})})};function zh(n){return ir({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(n)}function Uh(n){return ir({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z"},child:[]}]})(n)}const Qh=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return M.jsxs("div",{className:"my-2.5 flex w-full cursor-pointer flex-col justify-center rounded-xl px-4 pt-8 shadow-[0_2px_8px_0_rgba(0,0,0,0.08)] md:rounded-2xl md:pt-10",onClick:()=>a(i=>!i),children:[M.jsxs("div",{className:"flex w-full items-center justify-between px-2 pb-8 transition-all duration-300 md:px-4 md:pb-10",children:[M.jsxs("p",{className:wr("mr-4 text-lg font-medium md:text-xl",e),children:[M.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?M.jsx(Uh,{className:"text-petnow-orange-primary min-w-6",size:24}):M.jsx(zh,{className:"text-petnow-orange-primary min-w-6",size:24})]}),M.jsx("p",{className:wr(`text-petnow-grey-secondary w-full overflow-hidden px-2 text-base leading-6 whitespace-pre-wrap transition-all duration-300 md:px-4 md:text-lg ${o?"max-h-[24rem] pb-8 sm:max-h-60 md:pb-10":"max-h-0"}`,t),children:r})]})},iu=6048e5,Kh=864e5,Gr=6e4,Xr=36e5,qh=1e3,su=Symbol.for("constructDateFrom");function ge(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&su in n?n[su](r):n instanceof Date?new n.constructor(r):new Date(r)}function K(n,r){return ge(r||n,n)}function rt(n,r,e){const t=K(n,e==null?void 0:e.in);return isNaN(r)?ge((e==null?void 0:e.in)||n,NaN):(r&&t.setDate(t.getDate()+r),t)}function ot(n,r,e){const t=K(n,e==null?void 0:e.in);if(isNaN(r))return ge(n,NaN);if(!r)return t;const o=t.getDate(),a=ge(n,t.getTime());a.setMonth(t.getMonth()+r+1,0);const i=a.getDate();return o>=i?a:(t.setFullYear(a.getFullYear(),a.getMonth(),o),t)}function lu(n,r,e){return ge(n,+K(n)+r)}function Gh(n,r,e){return lu(n,r*Xr)}let Xh={};function nn(){return Xh}function kt(n,r){var s,l,u,c;const e=nn(),t=(r==null?void 0:r.weekStartsOn)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=K(n,r==null?void 0:r.in),a=o.getDay(),i=(a<t?7:0)+a-t;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Cn(n,r){return kt(n,{...r,weekStartsOn:1})}function uu(n,r){const e=K(n,r==null?void 0:r.in),t=e.getFullYear(),o=ge(e,0);o.setFullYear(t+1,0,4),o.setHours(0,0,0,0);const a=Cn(o),i=ge(e,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=Cn(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function Jr(n){const r=K(n),e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),+n-+e}function St(n,...r){const e=ge.bind(null,r.find(t=>typeof t=="object"));return r.map(e)}function rn(n,r){const e=K(n,r==null?void 0:r.in);return e.setHours(0,0,0,0),e}function _n(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r),a=rn(t),i=rn(o),s=+a-Jr(a),l=+i-Jr(i);return Math.round((s-l)/Kh)}function Jh(n,r){const e=uu(n,r),t=ge(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),Cn(t)}function Ra(n,r,e){const t=K(n,e==null?void 0:e.in);return t.setTime(t.getTime()+r*Gr),t}function Ba(n,r,e){return ot(n,r*3,e)}function Zh(n,r,e){return lu(n,r*1e3)}function Zr(n,r,e){return rt(n,r*7,e)}function Ct(n,r,e){return ot(n,r*12,e)}function cu(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=ge.bind(null,o));const a=K(o,t);(!e||e<a||isNaN(+a))&&(e=a)}),ge(t,e||NaN)}function du(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=ge.bind(null,o));const a=K(o,t);(!e||e>a||isNaN(+a))&&(e=a)}),ge(t,e||NaN)}function ev(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r);return+rn(t)==+rn(o)}function _t(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function eo(n){return!(!_t(n)&&typeof n!="number"||isNaN(+K(n)))}function to(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function on(n,r){const e=K(n,r==null?void 0:r.in);return Math.trunc(e.getMonth()/3)+1}function no(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=on(t)-on(o);return a*4+i}function ro(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r);return t.getFullYear()-o.getFullYear()}function tv(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r),a=fu(t,o),i=Math.abs(_n(t,o));t.setDate(t.getDate()-a*i);const s=+(fu(t,o)===-a),l=a*(i-s);return l===0?0:l}function fu(n,r){const e=n.getFullYear()-r.getFullYear()||n.getMonth()-r.getMonth()||n.getDate()-r.getDate()||n.getHours()-r.getHours()||n.getMinutes()-r.getMinutes()||n.getSeconds()-r.getSeconds()||n.getMilliseconds()-r.getMilliseconds();return e<0?-1:e>0?1:e}function pu(n,r){const e=K(n,r==null?void 0:r.in);return e.setHours(23,59,59,999),e}function mu(n,r){const e=K(n,r==null?void 0:r.in),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function Va(n,r){const e=K(n,r==null?void 0:r.in),t=e.getMonth(),o=t-t%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}function hu(n,r){const e=K(n,r==null?void 0:r.in);return e.setDate(1),e.setHours(0,0,0,0),e}function vu(n,r){const e=K(n,r==null?void 0:r.in),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function oo(n,r){const e=K(n,r==null?void 0:r.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function nv(n,r){var s,l;const e=nn(),t=e.weekStartsOn??((l=(s=e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=K(n,r==null?void 0:r.in),a=o.getDay(),i=(a<t?-7:0)+6-(a-t);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const rv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ov=(n,r,e)=>{let t;const o=rv[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+t:t+" ago":t};function On(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const av={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lv={date:On({formats:av,defaultWidth:"full"}),time:On({formats:iv,defaultWidth:"full"}),dateTime:On({formats:sv,defaultWidth:"full"})},uv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cv=(n,r,e,t)=>uv[n];function ct(n){return(r,e)=>{const t=e!=null&&e.context?String(e.context):"standalone";let o;if(t==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):i;o=n.formattingValues[s]||n.formattingValues[i]}else{const i=n.defaultWidth,s=e!=null&&e.width?String(e.width):n.defaultWidth;o=n.values[s]||n.values[i]}const a=n.argumentCallback?n.argumentCallback(r):r;return o[a]}}const dv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mv={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},hv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gv={ordinalNumber:(n,r)=>{const e=Number(n),t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:ct({values:dv,defaultWidth:"wide"}),quarter:ct({values:fv,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ct({values:pv,defaultWidth:"wide"}),day:ct({values:mv,defaultWidth:"wide"}),dayPeriod:ct({values:hv,defaultWidth:"wide",formattingValues:vv,defaultFormattingWidth:"wide"})};function dt(n){return(r,e={})=>{const t=e.width,o=t&&n.matchPatterns[t]||n.matchPatterns[n.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=t&&n.parsePatterns[t]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?yv(s,p=>p.test(i)):bv(s,p=>p.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=r.slice(i.length);return{value:u,rest:c}}}function bv(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function yv(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function gu(n){return(r,e={})=>{const t=r.match(n.matchPattern);if(!t)return null;const o=t[0],a=r.match(n.parsePattern);if(!a)return null;let i=n.valueCallback?n.valueCallback(a[0]):a[0];i=e.valueCallback?e.valueCallback(i):i;const s=r.slice(o.length);return{value:i,rest:s}}}const wv=/^(\d+)(th|st|nd|rd)?/i,xv=/\d+/i,Dv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ev={any:[/^b/i,/^(a|c)/i]},kv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sv={any:[/1/i,/2/i,/3/i,/4/i]},Cv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_v={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ov={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Mv={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Pv={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Tv={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nv={ordinalNumber:gu({matchPattern:wv,parsePattern:xv,valueCallback:n=>parseInt(n,10)}),era:dt({matchPatterns:Dv,defaultMatchWidth:"wide",parsePatterns:Ev,defaultParseWidth:"any"}),quarter:dt({matchPatterns:kv,defaultMatchWidth:"wide",parsePatterns:Sv,defaultParseWidth:"any",valueCallback:n=>n+1}),month:dt({matchPatterns:Cv,defaultMatchWidth:"wide",parsePatterns:_v,defaultParseWidth:"any"}),day:dt({matchPatterns:Ov,defaultMatchWidth:"wide",parsePatterns:Mv,defaultParseWidth:"any"}),dayPeriod:dt({matchPatterns:Pv,defaultMatchWidth:"any",parsePatterns:Tv,defaultParseWidth:"any"})},bu={code:"en-US",formatDistance:ov,formatLong:lv,formatRelative:cv,localize:gv,match:Nv,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Iv(n,r){const e=K(n,r==null?void 0:r.in);return _n(e,oo(e))+1}function za(n,r){const e=K(n,r==null?void 0:r.in),t=+Cn(e)-+Jh(e);return Math.round(t/iu)+1}function Ua(n,r){var c,p,m,f;const e=K(n,r==null?void 0:r.in),t=e.getFullYear(),o=nn(),a=(r==null?void 0:r.firstWeekContainsDate)??((p=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(m=o.locale)==null?void 0:m.options)==null?void 0:f.firstWeekContainsDate)??1,i=ge((r==null?void 0:r.in)||n,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=kt(i,r),l=ge((r==null?void 0:r.in)||n,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const u=kt(l,r);return+e>=+s?t+1:+e>=+u?t:t-1}function Fv(n,r){var s,l,u,c;const e=nn(),t=(r==null?void 0:r.firstWeekContainsDate)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=Ua(n,r),a=ge((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),kt(a,r)}function yu(n,r){const e=K(n,r==null?void 0:r.in),t=+kt(e,r)-+Fv(e,r);return Math.round(t/iu)+1}function be(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const Ht={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return be(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):be(e+1,2)},d(n,r){return be(n.getDate(),r.length)},a(n,r){const e=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,r){return be(n.getHours()%12||12,r.length)},H(n,r){return be(n.getHours(),r.length)},m(n,r){return be(n.getMinutes(),r.length)},s(n,r){return be(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),o=Math.trunc(t*Math.pow(10,e-3));return be(o,r.length)}},Mn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wu={G:function(n,r,e){const t=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return e.era(t,{width:"abbreviated"});case"GGGGG":return e.era(t,{width:"narrow"});case"GGGG":default:return e.era(t,{width:"wide"})}},y:function(n,r,e){if(r==="yo"){const t=n.getFullYear(),o=t>0?t:1-t;return e.ordinalNumber(o,{unit:"year"})}return Ht.y(n,r)},Y:function(n,r,e,t){const o=Ua(n,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return be(i,2)}return r==="Yo"?e.ordinalNumber(a,{unit:"year"}):be(a,r.length)},R:function(n,r){const e=uu(n);return be(e,r.length)},u:function(n,r){const e=n.getFullYear();return be(e,r.length)},Q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(t);case"QQ":return be(t,2);case"Qo":return e.ordinalNumber(t,{unit:"quarter"});case"QQQ":return e.quarter(t,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(t,{width:"wide",context:"formatting"})}},q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(t);case"qq":return be(t,2);case"qo":return e.ordinalNumber(t,{unit:"quarter"});case"qqq":return e.quarter(t,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(t,{width:"wide",context:"standalone"})}},M:function(n,r,e){const t=n.getMonth();switch(r){case"M":case"MM":return Ht.M(n,r);case"Mo":return e.ordinalNumber(t+1,{unit:"month"});case"MMM":return e.month(t,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(t,{width:"wide",context:"formatting"})}},L:function(n,r,e){const t=n.getMonth();switch(r){case"L":return String(t+1);case"LL":return be(t+1,2);case"Lo":return e.ordinalNumber(t+1,{unit:"month"});case"LLL":return e.month(t,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(t,{width:"wide",context:"standalone"})}},w:function(n,r,e,t){const o=yu(n,t);return r==="wo"?e.ordinalNumber(o,{unit:"week"}):be(o,r.length)},I:function(n,r,e){const t=za(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):be(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Ht.d(n,r)},D:function(n,r,e){const t=Iv(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):be(t,r.length)},E:function(n,r,e){const t=n.getDay();switch(r){case"E":case"EE":case"EEE":return e.day(t,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(t,{width:"short",context:"formatting"});case"EEEE":default:return e.day(t,{width:"wide",context:"formatting"})}},e:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return be(a,2);case"eo":return e.ordinalNumber(a,{unit:"day"});case"eee":return e.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(o,{width:"short",context:"formatting"});case"eeee":default:return e.day(o,{width:"wide",context:"formatting"})}},c:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return be(a,r.length);case"co":return e.ordinalNumber(a,{unit:"day"});case"ccc":return e.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(o,{width:"narrow",context:"standalone"});case"cccccc":return e.day(o,{width:"short",context:"standalone"});case"cccc":default:return e.day(o,{width:"wide",context:"standalone"})}},i:function(n,r,e){const t=n.getDay(),o=t===0?7:t;switch(r){case"i":return String(o);case"ii":return be(o,r.length);case"io":return e.ordinalNumber(o,{unit:"day"});case"iii":return e.day(t,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(t,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(t,{width:"short",context:"formatting"});case"iiii":default:return e.day(t,{width:"wide",context:"formatting"})}},a:function(n,r,e){const o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,r,e){const t=n.getHours();let o;switch(t===12?o=Mn.noon:t===0?o=Mn.midnight:o=t/12>=1?"pm":"am",r){case"b":case"bb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,r,e){const t=n.getHours();let o;switch(t>=17?o=Mn.evening:t>=12?o=Mn.afternoon:t>=4?o=Mn.morning:o=Mn.night,r){case"B":case"BB":case"BBB":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,r,e){if(r==="ho"){let t=n.getHours()%12;return t===0&&(t=12),e.ordinalNumber(t,{unit:"hour"})}return Ht.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Ht.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):be(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):be(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ht.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Ht.s(n,r)},S:function(n,r){return Ht.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return Du(t);case"XXXX":case"XX":return an(t);case"XXXXX":case"XXX":default:return an(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return Du(t);case"xxxx":case"xx":return an(t);case"xxxxx":case"xxx":default:return an(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+xu(t,":");case"OOOO":default:return"GMT"+an(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+xu(t,":");case"zzzz":default:return"GMT"+an(t,":")}},t:function(n,r,e){const t=Math.trunc(+n/1e3);return be(t,r.length)},T:function(n,r,e){return be(+n,r.length)}};function xu(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=Math.trunc(t/60),a=t%60;return a===0?e+String(o):e+String(o)+r+be(a,2)}function Du(n,r){return n%60===0?(n>0?"-":"+")+be(Math.abs(n)/60,2):an(n,r)}function an(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=be(Math.trunc(t/60),2),a=be(t%60,2);return e+o+r+a}const Eu=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},ku=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Qa={p:ku,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return Eu(n,r);let a;switch(t){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",Eu(t,r)).replace("{{time}}",ku(o,r))}},Lv=/^D+$/,$v=/^Y+$/,Av=["D","DD","YY","YYYY"];function Yv(n){return Lv.test(n)}function Wv(n){return $v.test(n)}function jv(n,r,e){const t=Hv(n,r,e);if(console.warn(t),Av.includes(n))throw new RangeError(t)}function Hv(n,r,e){const t=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${t} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Rv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vv=/^'([^]*?)'?$/,zv=/''/g,Uv=/[a-zA-Z]/;function Su(n,r,e){var c,p,m,f,h,v,g,w;const t=nn(),o=(e==null?void 0:e.locale)??t.locale??bu,a=(e==null?void 0:e.firstWeekContainsDate)??((p=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:p.firstWeekContainsDate)??t.firstWeekContainsDate??((f=(m=t.locale)==null?void 0:m.options)==null?void 0:f.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((v=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:v.weekStartsOn)??t.weekStartsOn??((w=(g=t.locale)==null?void 0:g.options)==null?void 0:w.weekStartsOn)??0,s=K(n,e==null?void 0:e.in);if(!eo(s))throw new RangeError("Invalid time value");let l=r.match(Bv).map(y=>{const x=y[0];if(x==="p"||x==="P"){const E=Qa[x];return E(y,o.formatLong)}return y}).join("").match(Rv).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const x=y[0];if(x==="'")return{isToken:!1,value:Qv(y)};if(wu[x])return{isToken:!0,value:y};if(x.match(Uv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(y=>{if(!y.isToken)return y.value;const x=y.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Wv(x)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Yv(x))&&jv(x,r,String(n));const E=wu[x[0]];return E(s,x,o.localize,u)}).join("")}function Qv(n){const r=n.match(Vv);return r?r[1].replace(zv,"'"):n}function Cu(n,r){return K(n,r==null?void 0:r.in).getDate()}function Kv(n,r){return K(n,r==null?void 0:r.in).getDay()}function qv(n,r){const e=K(n,r==null?void 0:r.in),t=e.getFullYear(),o=e.getMonth(),a=ge(e,0);return a.setFullYear(t,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Gv(){return Object.assign({},nn())}function Ot(n,r){return K(n,r==null?void 0:r.in).getHours()}function Xv(n,r){const e=K(n,r==null?void 0:r.in).getDay();return e===0?7:e}function Mt(n,r){return K(n,r==null?void 0:r.in).getMinutes()}function Be(n,r){return K(n,r==null?void 0:r.in).getMonth()}function Rt(n){return K(n).getSeconds()}function Ka(n){return+K(n)}function ne(n,r){return K(n,r==null?void 0:r.in).getFullYear()}function Bt(n,r){return+K(n)>+K(r)}function sn(n,r){return+K(n)<+K(r)}function Jv(n,r){return+K(n)==+K(r)}function Zv(n,r){const e=eg(r)?new r(0):ge(r,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function eg(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const tg=10;class _u{constructor(){B(this,"subPriority",0)}validate(r,e){return!0}}class ng extends _u{constructor(r,e,t,o,a){super(),this.value=r,this.validateValue=e,this.setValue=t,this.priority=o,a&&(this.subPriority=a)}validate(r,e){return this.validateValue(r,this.value,e)}set(r,e,t){return this.setValue(r,e,this.value,t)}}class rg extends _u{constructor(e,t){super();B(this,"priority",tg);B(this,"subPriority",-1);this.context=e||(o=>ge(t,o))}set(e,t){return t.timestampIsSet?e:ge(e,Zv(e,this.context))}}class me{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new ng(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class og extends me{constructor(){super(...arguments);B(this,"priority",140);B(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,o){switch(t){case"G":case"GG":case"GGG":return o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"});case"GGGGG":return o.era(e,{width:"narrow"});case"GGGG":default:return o.era(e,{width:"wide"})||o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"})}}set(e,t,o){return t.era=o,e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}const Te={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ft={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ne(n,r){return n&&{value:r(n.value),rest:n.rest}}function _e(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function pt(n,r){const e=r.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:r.slice(1)};const t=e[1]==="+"?1:-1,o=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,i=e[5]?parseInt(e[5],10):0;return{value:t*(o*Xr+a*Gr+i*qh),rest:r.slice(e[0].length)}}function Ou(n){return _e(Te.anyDigitsSigned,n)}function Me(n,r){switch(n){case 1:return _e(Te.singleDigit,r);case 2:return _e(Te.twoDigits,r);case 3:return _e(Te.threeDigits,r);case 4:return _e(Te.fourDigits,r);default:return _e(new RegExp("^\\d{1,"+n+"}"),r)}}function ao(n,r){switch(n){case 1:return _e(Te.singleDigitSigned,r);case 2:return _e(Te.twoDigitsSigned,r);case 3:return _e(Te.threeDigitsSigned,r);case 4:return _e(Te.fourDigitsSigned,r);default:return _e(new RegExp("^-?\\d{1,"+n+"}"),r)}}function qa(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Mu(n,r){const e=r>0,t=e?r:1-r;let o;if(t<=50)o=n||100;else{const a=t+50,i=Math.trunc(a/100)*100,s=n>=a%100;o=n+i-(s?100:0)}return e?o:1-o}function Pu(n){return n%400===0||n%4===0&&n%100!==0}class ag extends me{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return Ne(Me(4,e),a);case"yo":return Ne(o.ordinalNumber(e,{unit:"year"}),a);default:return Ne(Me(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o){const a=e.getFullYear();if(o.isTwoDigitYear){const s=Mu(o.year,a);return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}const i=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class ig extends me{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return Ne(Me(4,e),a);case"Yo":return Ne(o.ordinalNumber(e,{unit:"year"}),a);default:return Ne(Me(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=Ua(e,a);if(o.isTwoDigitYear){const l=Mu(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),kt(e,a)}const s=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(s,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),kt(e,a)}}class sg extends me{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return ao(t==="R"?4:t.length,e)}set(e,t,o){const a=ge(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),Cn(a)}}class lg extends me{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return ao(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class ug extends me{constructor(){super(...arguments);B(this,"priority",120);B(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"Q":case"QQ":return Me(t.length,e);case"Qo":return o.ordinalNumber(e,{unit:"quarter"});case"QQQ":return o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(e,{width:"wide",context:"formatting"})||o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class cg extends me{constructor(){super(...arguments);B(this,"priority",120);B(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"q":case"qq":return Me(t.length,e);case"qo":return o.ordinalNumber(e,{unit:"quarter"});case"qqq":return o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(e,{width:"wide",context:"standalone"})||o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class dg extends me{constructor(){super(...arguments);B(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);B(this,"priority",110)}parse(e,t,o){const a=i=>i-1;switch(t){case"M":return Ne(_e(Te.month,e),a);case"MM":return Ne(Me(2,e),a);case"Mo":return Ne(o.ordinalNumber(e,{unit:"month"}),a);case"MMM":return o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(e,{width:"wide",context:"formatting"})||o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}class fg extends me{constructor(){super(...arguments);B(this,"priority",110);B(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,o){const a=i=>i-1;switch(t){case"L":return Ne(_e(Te.month,e),a);case"LL":return Ne(Me(2,e),a);case"Lo":return Ne(o.ordinalNumber(e,{unit:"month"}),a);case"LLL":return o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(e,{width:"wide",context:"standalone"})||o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}function pg(n,r,e){const t=K(n,e==null?void 0:e.in),o=yu(t,e)-r;return t.setDate(t.getDate()-o*7),K(t,e==null?void 0:e.in)}class mg extends me{constructor(){super(...arguments);B(this,"priority",100);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,o){switch(t){case"w":return _e(Te.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return Me(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return kt(pg(e,o,a),a)}}function hg(n,r,e){const t=K(n,e==null?void 0:e.in),o=za(t,e)-r;return t.setDate(t.getDate()-o*7),t}class vg extends me{constructor(){super(...arguments);B(this,"priority",100);B(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,o){switch(t){case"I":return _e(Te.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return Me(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return Cn(hg(e,o))}}const gg=[31,28,31,30,31,30,31,31,30,31,30,31],bg=[31,29,31,30,31,30,31,31,30,31,30,31];class yg extends me{constructor(){super(...arguments);B(this,"priority",90);B(this,"subPriority",1);B(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"d":return _e(Te.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return Me(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=Pu(o),i=e.getMonth();return a?t>=1&&t<=bg[i]:t>=1&&t<=gg[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class wg extends me{constructor(){super(...arguments);B(this,"priority",90);B(this,"subpriority",1);B(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,o){switch(t){case"D":case"DD":return _e(Te.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return Me(t.length,e)}}validate(e,t){const o=e.getFullYear();return Pu(o)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,o){return e.setMonth(0,o),e.setHours(0,0,0,0),e}}function Ga(n,r,e){var p,m,f,h;const t=nn(),o=(e==null?void 0:e.weekStartsOn)??((m=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??t.weekStartsOn??((h=(f=t.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=K(n,e==null?void 0:e.in),i=a.getDay(),l=(r%7+7)%7,u=7-o,c=r<0||r>6?r-(i+u)%7:(l+u)%7-(i+u)%7;return rt(a,c,e)}class xg extends me{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"E":case"EE":case"EEE":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Ga(e,o,a),e.setHours(0,0,0,0),e}}class Dg extends me{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"e":case"ee":return Ne(Me(t.length,e),i);case"eo":return Ne(o.ordinalNumber(e,{unit:"day"}),i);case"eee":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeeee":return o.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Ga(e,o,a),e.setHours(0,0,0,0),e}}class Eg extends me{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"c":case"cc":return Ne(Me(t.length,e),i);case"co":return Ne(o.ordinalNumber(e,{unit:"day"}),i);case"ccc":return o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"ccccc":return o.day(e,{width:"narrow",context:"standalone"});case"cccccc":return o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(e,{width:"wide",context:"standalone"})||o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Ga(e,o,a),e.setHours(0,0,0,0),e}}function kg(n,r,e){const t=K(n,e==null?void 0:e.in),o=Xv(t,e),a=r-o;return rt(t,a,e)}class Sg extends me{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,o){const a=i=>i===0?7:i;switch(t){case"i":case"ii":return Me(t.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return Ne(o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return Ne(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ne(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ne(o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,t){return t>=1&&t<=7}set(e,t,o){return e=kg(e,o),e.setHours(0,0,0,0),e}}class Cg extends me{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,o){switch(t){case"a":case"aa":case"aaa":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(qa(o),0,0,0),e}}class _g extends me{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,o){switch(t){case"b":case"bb":case"bbb":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(qa(o),0,0,0),e}}class Og extends me{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,o){switch(t){case"B":case"BB":case"BBB":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(qa(o),0,0,0),e}}class Mg extends me{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return _e(Te.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return Me(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,o){const a=e.getHours()>=12;return a&&o<12?e.setHours(o+12,0,0,0):!a&&o===12?e.setHours(0,0,0,0):e.setHours(o,0,0,0),e}}class Pg extends me{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,o){switch(t){case"H":return _e(Te.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return Me(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class Tg extends me{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return _e(Te.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return Me(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.getHours()>=12&&o<12?e.setHours(o+12,0,0,0):e.setHours(o,0,0,0),e}}class Ng extends me{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,o){switch(t){case"k":return _e(Te.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return Me(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,o){const a=o<=24?o%24:o;return e.setHours(a,0,0,0),e}}class Ig extends me{constructor(){super(...arguments);B(this,"priority",60);B(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return _e(Te.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return Me(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class Fg extends me{constructor(){super(...arguments);B(this,"priority",50);B(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return _e(Te.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return Me(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class Lg extends me{constructor(){super(...arguments);B(this,"priority",30);B(this,"incompatibleTokens",["t","T"])}parse(e,t){const o=a=>Math.trunc(a*Math.pow(10,-t.length+3));return Ne(Me(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class $g extends me{constructor(){super(...arguments);B(this,"priority",10);B(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return pt(ft.basicOptionalMinutes,e);case"XX":return pt(ft.basic,e);case"XXXX":return pt(ft.basicOptionalSeconds,e);case"XXXXX":return pt(ft.extendedOptionalSeconds,e);case"XXX":default:return pt(ft.extended,e)}}set(e,t,o){return t.timestampIsSet?e:ge(e,e.getTime()-Jr(e)-o)}}class Ag extends me{constructor(){super(...arguments);B(this,"priority",10);B(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return pt(ft.basicOptionalMinutes,e);case"xx":return pt(ft.basic,e);case"xxxx":return pt(ft.basicOptionalSeconds,e);case"xxxxx":return pt(ft.extendedOptionalSeconds,e);case"xxx":default:return pt(ft.extended,e)}}set(e,t,o){return t.timestampIsSet?e:ge(e,e.getTime()-Jr(e)-o)}}class Yg extends me{constructor(){super(...arguments);B(this,"priority",40);B(this,"incompatibleTokens","*")}parse(e){return Ou(e)}set(e,t,o){return[ge(e,o*1e3),{timestampIsSet:!0}]}}class Wg extends me{constructor(){super(...arguments);B(this,"priority",20);B(this,"incompatibleTokens","*")}parse(e){return Ou(e)}set(e,t,o){return[ge(e,o),{timestampIsSet:!0}]}}const jg={G:new og,y:new ag,Y:new ig,R:new sg,u:new lg,Q:new ug,q:new cg,M:new dg,L:new fg,w:new mg,I:new vg,d:new yg,D:new wg,E:new xg,e:new Dg,c:new Eg,i:new Sg,a:new Cg,b:new _g,B:new Og,h:new Mg,H:new Pg,K:new Tg,k:new Ng,m:new Ig,s:new Fg,S:new Lg,X:new $g,x:new Ag,t:new Yg,T:new Wg},Hg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bg=/^'([^]*?)'?$/,Vg=/''/g,zg=/\S/,Ug=/[a-zA-Z]/;function Qg(n,r,e,t){var g,w,y,x,E,k,C,S;const o=()=>ge((t==null?void 0:t.in)||e,NaN),a=Gv(),i=(t==null?void 0:t.locale)??a.locale??bu,s=(t==null?void 0:t.firstWeekContainsDate)??((w=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:w.firstWeekContainsDate)??a.firstWeekContainsDate??((x=(y=a.locale)==null?void 0:y.options)==null?void 0:x.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((k=(E=t==null?void 0:t.locale)==null?void 0:E.options)==null?void 0:k.weekStartsOn)??a.weekStartsOn??((S=(C=a.locale)==null?void 0:C.options)==null?void 0:S.weekStartsOn)??0;if(!r)return n?o():K(e,t==null?void 0:t.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:i},c=[new rg(t==null?void 0:t.in,e)],p=r.match(Rg).map(D=>{const _=D[0];if(_ in Qa){const O=Qa[_];return O(D,i.formatLong)}return D}).join("").match(Hg),m=[];for(let D of p){const _=D[0],O=jg[_];if(O){const{incompatibleTokens:T}=O;if(Array.isArray(T)){const W=m.find(N=>T.includes(N.token)||N.token===_);if(W)throw new RangeError(`The format string mustn't contain \`${W.fullToken}\` and \`${D}\` at the same time`)}else if(O.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${D}\` and any other token at the same time`);m.push({token:_,fullToken:D});const Y=O.run(n,D,i.match,u);if(!Y)return o();c.push(Y.setter),n=Y.rest}else{if(_.match(Ug))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(D==="''"?D="'":_==="'"&&(D=Kg(D)),n.indexOf(D)===0)n=n.slice(D.length);else return o()}}if(n.length>0&&zg.test(n))return o();const f=c.map(D=>D.priority).sort((D,_)=>_-D).filter((D,_,O)=>O.indexOf(D)===_).map(D=>c.filter(_=>_.priority===D).sort((_,O)=>O.subPriority-_.subPriority)).map(D=>D[0]);let h=K(e,t==null?void 0:t.in);if(isNaN(+h))return o();const v={};for(const D of f){if(!D.validate(h,u))return o();const _=D.set(h,v,u);Array.isArray(_)?(h=_[0],Object.assign(v,_[1])):h=_}return h}function Kg(n){return n.match(Bg)[1].replace(Vg,"'")}function qg(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function Gg(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r);return+Va(t)==+Va(o)}function Xg(n,r,e){const[t,o]=St(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()}function sr(n,r,e){const t=+K(n,e==null?void 0:e.in),[o,a]=[+K(r.start,e==null?void 0:e.in),+K(r.end,e==null?void 0:e.in)].sort((i,s)=>i-s);return t>=o&&t<=a}function Jg(n,r,e){return rt(n,-1,e)}function Zg(n,r){const e=()=>ge(r==null?void 0:r.in,NaN),o=rb(n);let a;if(o.date){const u=ob(o.date,2);a=ab(u.restDateString,u.year)}if(!a||isNaN(+a))return e();const i=+a;let s=0,l;if(o.time&&(s=ib(o.time),isNaN(s)))return e();if(o.timezone){if(l=sb(o.timezone),isNaN(l))return e()}else{const u=new Date(i+s),c=K(0,r==null?void 0:r.in);return c.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),c.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),c}return K(i+s+l,r==null?void 0:r.in)}const io={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},eb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,tb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,nb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function rb(n){const r={},e=n.split(io.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],io.timeZoneDelimiter.test(r.date)&&(r.date=n.split(io.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=io.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function ob(n,r){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),t=n.match(e);if(!t)return{year:NaN,restDateString:""};const o=t[1]?parseInt(t[1]):null,a=t[2]?parseInt(t[2]):null;return{year:a===null?o:a*100,restDateString:n.slice((t[1]||t[2]).length)}}function ab(n,r){if(r===null)return new Date(NaN);const e=n.match(eb);if(!e)return new Date(NaN);const t=!!e[4],o=lr(e[1]),a=lr(e[2])-1,i=lr(e[3]),s=lr(e[4]),l=lr(e[5])-1;if(t)return fb(r,s,l)?lb(r,s,l):new Date(NaN);{const u=new Date(0);return!cb(r,a,i)||!db(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function lr(n){return n?parseInt(n):1}function ib(n){const r=n.match(tb);if(!r)return NaN;const e=Xa(r[1]),t=Xa(r[2]),o=Xa(r[3]);return pb(e,t,o)?e*Xr+t*Gr+o*1e3:NaN}function Xa(n){return n&&parseFloat(n.replace(",","."))||0}function sb(n){if(n==="Z")return 0;const r=n.match(nb);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return mb(t,o)?e*(t*Xr+o*Gr):NaN}function lb(n,r,e){const t=new Date(0);t.setUTCFullYear(n,0,4);const o=t.getUTCDay()||7,a=(r-1)*7+e+1-o;return t.setUTCDate(t.getUTCDate()+a),t}const ub=[31,null,31,30,31,30,31,31,30,31,30,31];function Tu(n){return n%400===0||n%4===0&&n%100!==0}function cb(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(ub[r]||(Tu(n)?29:28))}function db(n,r){return r>=1&&r<=(Tu(n)?366:365)}function fb(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function pb(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function mb(n,r){return r>=0&&r<=59}function Ge(n,r,e){const t=K(n,e==null?void 0:e.in),o=t.getFullYear(),a=t.getDate(),i=ge(n,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=qv(i);return t.setMonth(r,Math.min(a,s)),t}function so(n,r,e){const t=K(n,e==null?void 0:e.in);return t.setHours(r),t}function lo(n,r,e){const t=K(n,e==null?void 0:e.in);return t.setMinutes(r),t}function Pn(n,r,e){const t=K(n,e==null?void 0:e.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return Ge(t,t.getMonth()+a*3)}function uo(n,r,e){const t=K(n,e==null?void 0:e.in);return t.setSeconds(r),t}function mt(n,r,e){const t=K(n,e==null?void 0:e.in);return isNaN(+t)?ge(n,NaN):(t.setFullYear(r),t)}function ln(n,r,e){return ot(n,-r,e)}function Nu(n,r,e){return Ba(n,-1,e)}function Iu(n,r,e){return Zr(n,-1,e)}function Tn(n,r,e){return Ct(n,-r,e)}const hb={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},vb=(n,r,e)=>{let t;const o=hb[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?t+" 후":t+" 전":t},gb={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},bb={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},yb={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},wb={date:On({formats:gb,defaultWidth:"full"}),time:On({formats:bb,defaultWidth:"full"}),dateTime:On({formats:yb,defaultWidth:"full"})},xb={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},Db=(n,r,e,t)=>xb[n],Eb={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},kb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},Sb={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},Cb={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},_b={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Ob={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Mb={ordinalNumber:(n,r)=>{const e=Number(n);switch(String(r==null?void 0:r.unit)){case"minute":case"second":return String(e);case"date":return e+"일";default:return e+"번째"}},era:ct({values:Eb,defaultWidth:"wide"}),quarter:ct({values:kb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ct({values:Sb,defaultWidth:"wide"}),day:ct({values:Cb,defaultWidth:"wide"}),dayPeriod:ct({values:_b,defaultWidth:"wide",formattingValues:Ob,defaultFormattingWidth:"wide"})},Pb=/^(\d+)(일|번째)?/i,Tb=/\d+/i,Nb={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},Ib={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},Fb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},Lb={any:[/1/i,/2/i,/3/i,/4/i]},$b={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},Ab={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},Yb={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},Wb={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},jb={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},Hb={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},Rb={ordinalNumber:gu({matchPattern:Pb,parsePattern:Tb,valueCallback:n=>parseInt(n,10)}),era:dt({matchPatterns:Nb,defaultMatchWidth:"wide",parsePatterns:Ib,defaultParseWidth:"any"}),quarter:dt({matchPatterns:Fb,defaultMatchWidth:"wide",parsePatterns:Lb,defaultParseWidth:"any",valueCallback:n=>n+1}),month:dt({matchPatterns:$b,defaultMatchWidth:"wide",parsePatterns:Ab,defaultParseWidth:"any"}),day:dt({matchPatterns:Yb,defaultMatchWidth:"wide",parsePatterns:Wb,defaultParseWidth:"any"}),dayPeriod:dt({matchPatterns:jb,defaultMatchWidth:"any",parsePatterns:Hb,defaultParseWidth:"any"})},Bb={code:"ko",formatDistance:vb,formatLong:wb,formatRelative:Db,localize:Mb,match:Rb,options:{weekStartsOn:0,firstWeekContainsDate:1}};var co=typeof document<"u"?d.useLayoutEffect:d.useEffect;const Vb={...F}.useInsertionEffect||(n=>n());function zb(n){const r=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Vb(()=>{r.current=n}),F.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}const Ub={...F};let Fu=!1,Qb=0;const Lu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Qb++;function Kb(){const[n,r]=F.useState(()=>Fu?Lu():void 0);return co(()=>{n==null&&r(Lu())},[]),F.useEffect(()=>{Fu=!0},[]),n}const $u=Ub.useId||Kb;let ur;process.env.NODE_ENV!=="production"&&(ur=new Set);function qb(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=ur)!=null&&n.has(o))){var a;(a=ur)==null||a.add(o),console.warn(o)}}function Gb(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=ur)!=null&&n.has(o))){var a;(a=ur)==null||a.add(o),console.error(o)}}const Xb=F.forwardRef(function(r,e){const{context:{placement:t,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:p,stroke:m,d:f,style:{transform:h,...v}={},...g}=r;process.env.NODE_ENV!=="production"&&(e||qb("The `ref` prop is required for `FloatingArrow`."));const w=$u(),[y,x]=F.useState(!1);if(co(()=>{if(!o)return;qe(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[E,k]=t.split("-"),C=E==="top"||E==="bottom";let S=p;(C&&i!=null&&i.x||!C&&i!=null&&i.y)&&(S=null);const D=c*2,_=D/2,O=s/2*(u/-8+1),T=l/2*u/4,Y=!!f,W=S&&k==="end"?"bottom":"top";let N=S&&k==="end"?"right":"left";S&&y&&(N=k==="end"?"left":"right");const L=(a==null?void 0:a.x)!=null?S||a.x:"",$=(a==null?void 0:a.y)!=null?S||a.y:"",z=f||"M0,0"+(" H"+s)+(" L"+(s-O)+","+(l-T))+(" Q"+s/2+","+l+" "+O+","+(l-T))+" Z",P={top:Y?"rotate(180deg)":"",left:Y?"rotate(90deg)":"rotate(-90deg)",bottom:Y?"":"rotate(180deg)",right:Y?"rotate(-90deg)":"rotate(90deg)"}[E];return M.jsxs("svg",{...g,"aria-hidden":!0,ref:e,width:Y?s:s+D,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[N]:L,[W]:$,[E]:C||Y?"100%":"calc(100% - "+D/2+"px)",transform:[P,h].filter(q=>!!q).join(" "),...v},children:[D>0&&M.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:m,strokeWidth:D+(f?0:1),d:z}),M.jsx("path",{stroke:D&&!f?g.fill:"none",d:z}),M.jsx("clipPath",{id:w,children:M.jsx("rect",{x:-_,y:_*(Y?-1:1),width:s+D,height:s})})]})});function Jb(){const n=new Map;return{emit(r,e){var t;(t=n.get(r))==null||t.forEach(o=>o(e))},on(r,e){n.has(r)||n.set(r,new Set),n.get(r).add(e)},off(r,e){var t;(t=n.get(r))==null||t.delete(e)}}}const Zb=F.createContext(null),ey=F.createContext(null),ty=()=>{var n;return((n=F.useContext(Zb))==null?void 0:n.id)||null},ny=()=>F.useContext(ey);function ry(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=$u(),a=F.useRef({}),[i]=F.useState(()=>Jb()),s=ty()!=null;if(process.env.NODE_ENV!=="production"){const f=t.reference;f&&!Pe(f)&&Gb("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=F.useState(t.reference),c=zb((f,h,v)=>{a.current.openEvent=f?h:void 0,i.emit("openchange",{open:f,event:h,reason:v,nested:s}),e==null||e(f,h,v)}),p=F.useMemo(()=>({setPositionReference:u}),[]),m=F.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return F.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:m,events:i,floatingId:o,refs:p}),[r,c,m,i,o,p])}function oy(n){n===void 0&&(n={});const{nodeId:r}=n,e=ry({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=F.useState(null),[s,l]=F.useState(null),c=(o==null?void 0:o.domReference)||a,p=F.useRef(null),m=ny();co(()=>{c&&(p.current=c)},[c]);const f=Vs({...n,elements:{...o,...s&&{reference:s}}}),h=F.useCallback(x=>{const E=Pe(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(E),f.refs.setReference(E)},[f.refs]),v=F.useCallback(x=>{(Pe(x)||x===null)&&(p.current=x,i(x)),(Pe(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Pe(x))&&f.refs.setReference(x)},[f.refs]),g=F.useMemo(()=>({...f.refs,setReference:v,setPositionReference:h,domReference:p}),[f.refs,v,h]),w=F.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),y=F.useMemo(()=>({...f,...t,refs:g,elements:w,nodeId:r}),[f,g,w,r,t]);return co(()=>{t.dataRef.current.floatingContext=y;const x=m==null?void 0:m.nodesRef.current.find(E=>E.id===r);x&&(x.context=y)}),F.useMemo(()=>({...f,context:y,refs:g,elements:w}),[f,g,w,y])}/*!
49
- react-datepicker v8.3.0
75
+ */var iu;function Qh(){return iu||(iu=1,process.env.NODE_ENV!=="production"&&function(){function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=d,e=typeof Object.is=="function"?Object.is:n,t=r.useSyncExternalStore,o=r.useRef,a=r.useEffect,i=r.useMemo,s=r.useDebugValue;ei.useSyncExternalStoreWithSelector=function(l,u,c,f,h){var p=o(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=i(function(){function g(D){if(!x){if(x=!0,E=D,D=f(D),h!==void 0&&m.hasValue){var T=m.value;if(h(T,D))return w=T}return w=D}if(T=w,e(E,D))return T;var $=f(D);return h!==void 0&&h(T,$)?(E=D,T):(E=D,w=$)}var x=!1,E,w,k=c===void 0?null:c;return[function(){return g(u())},k===null?void 0:function(){return g(k())}]},[u,c,f,h]);var v=t(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),s(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ei}var su;function Gh(){return su||(su=1,process.env.NODE_ENV==="production"?co.exports=Uh():co.exports=Qh()),co.exports}var Kh=Gh();function we(n,r,e=nu){return Kh.useSyncExternalStoreWithSelector(ee(t=>n.subscribe(Xh,t)),ee(()=>n.state),ee(()=>n.state),ee(r),e)}function Xh(n){return n}function br(n,r){let e=d.useId(),t=In.get(r),[o,a]=we(t,d.useCallback(i=>[t.selectors.isTop(i,e),t.selectors.inStack(i,e)],[t,e]));return fe(()=>{if(n)return t.actions.push(e),()=>t.actions.pop(e)},[t,n,e]),n?a?o:!0:!1}let ti=new Map,yr=new Map;function lu(n){var r;let e=(r=yr.get(n))!=null?r:0;return yr.set(n,e+1),e!==0?()=>uu(n):(ti.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>uu(n))}function uu(n){var r;let e=(r=yr.get(n))!=null?r:1;if(e===1?yr.delete(n):yr.set(n,e-1),e!==1)return;let t=ti.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,ti.delete(n))}function ni(n,{allowed:r,disallowed:e}={}){let t=br(n,"inert-others");fe(()=>{var o,a;if(!t)return;let i=rt();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(lu(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let u=dn(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)s.some(h=>f.contains(h))||i.add(lu(f));c=c.parentElement}}return i.dispose},[t,r,e])}function ri(n,r,e){let t=Pt(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&e()});d.useEffect(()=>{if(!n)return;let o=r===null?null:Ke(r)?r:r.current;if(!o)return;let a=rt();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}return()=>a.dispose()},[r,t,n])}let fo=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),Jh=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var dt=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(dt||{}),oi=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(oi||{}),Zh=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Zh||{});function cu(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(fo)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function em(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Jh)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var ai=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(ai||{});function du(n,r=0){var e;return n===((e=dn(n))==null?void 0:e.body)?!1:Le(r,{0(){return n.matches(fo)},1(){let t=n;for(;t!==null;){if(t.matches(fo))return!0;t=t.parentElement}return!1}})}var tm=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(tm||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Lt(n){n==null||n.focus({preventScroll:!0})}let nm=["textarea","input"].join(",");function rm(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,nm))!=null?e:!1}function ii(n,r=e=>e){return n.slice().sort((e,t)=>{let o=r(e),a=r(t);if(o===null||a===null)return 0;let i=o.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function om(n,r){return Nn(cu(),r,{relativeTo:n})}function Nn(n,r,{sorted:e=!0,relativeTo:t=null,skipElements:o=[]}={}){let a=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,i=Array.isArray(n)?e?ii(n):n:r&64?em(n):cu(n);o.length>0&&i.length>1&&(i=i.filter(p=>!o.some(m=>m!=null&&"current"in m?(m==null?void 0:m.current)===p:m===p))),t=t??a.activeElement;let s=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,i.indexOf(t))-1;if(r&4)return Math.max(0,i.indexOf(t))+1;if(r&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=r&32?{preventScroll:!0}:{},c=0,f=i.length,h;do{if(c>=f||c+f<=0)return 0;let p=l+c;if(r&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=i[p],h==null||h.focus(u),c+=s}while(h!==a.activeElement);return r&6&&rm(h)&&h.select(),2}function fu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function am(){return/Android/gi.test(window.navigator.userAgent)}function si(){return fu()||am()}function Ln(n,r,e,t){let o=Pt(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return document.addEventListener(r,a,t),()=>document.removeEventListener(r,a,t)},[n,r,t])}function pu(n,r,e,t){let o=Pt(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return window.addEventListener(r,a,t),()=>window.removeEventListener(r,a,t)},[n,r,t])}const hu=30;function li(n,r,e){let t=Pt(e),o=d.useCallback(function(s,l){if(s.defaultPrevented)return;let u=l(s);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]}(r);for(let f of c)if(f!==null&&(f.contains(u)||s.composed&&s.composedPath().includes(f)))return;return!du(u,ai.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t.current(s,u)},[t,r]),a=d.useRef(null);Ln(n,"pointerdown",s=>{var l,u;si()||(a.current=((u=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:u[0])||s.target)},!0),Ln(n,"pointerup",s=>{if(si()||!a.current)return;let l=a.current;return a.current=null,o(s,()=>l)},!0);let i=d.useRef({x:0,y:0});Ln(n,"touchstart",s=>{i.current.x=s.touches[0].clientX,i.current.y=s.touches[0].clientY},!0),Ln(n,"touchend",s=>{let l={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=hu||Math.abs(l.y-i.current.y)>=hu))return o(s,()=>Nt(s.target)?s.target:null)},!0),pu(n,"blur",s=>o(s,()=>fh(window.document.activeElement)?window.document.activeElement:null),!0)}function Ft(...n){return d.useMemo(()=>dn(...n),[...n])}var im=(n=>(n[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n))(im||{});const $t={Ignore:{kind:0},Select:n=>({kind:1,target:n}),Close:{kind:2}},sm=200;function mu(n,{trigger:r,action:e,close:t,select:o}){let a=d.useRef(null);Ln(n&&r!==null,"pointerdown",i=>{qa(i==null?void 0:i.target)&&r!=null&&r.contains(i.target)&&(a.current=new Date)}),Ln(n&&r!==null,"pointerup",i=>{if(a.current===null||!Nt(i.target))return;let s=e(i),l=new Date().getTime()-a.current.getTime();switch(a.current=null,s.kind){case 0:return;case 1:{l>sm&&(o(s.target),t());break}case 2:{t();break}}},{capture:!0})}function ui(n,r,e,t){let o=Pt(e);d.useEffect(()=>{n=n??window;function a(i){o.current(i)}return n.addEventListener(r,a,t),()=>n.removeEventListener(r,a,t)},[n,r,t])}function vu(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return ui(n,"blur",e=>{let t=e.target;io(t)&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),ee(()=>{if(document.activeElement!==n&&io(n)&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==r.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:e,selectionEnd:t}=r.current;e!==null&&t!==null&&n.setSelectionRange(e,t)}r.current={value:"",selectionStart:null,selectionEnd:null}}})}function gu(n,r){return d.useMemo(()=>{var e;if(n.type)return n.type;let t=(e=n.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button"||(r==null?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[n.type,n.as,r])}function lm(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function um(n,r){let e=n(),t=new Set;return{getSnapshot(){return e},subscribe(o){return t.add(o),()=>t.delete(o)},dispatch(o,...a){let i=r[o].call(e,...a);i&&(e=i,t.forEach(s=>s()))}}}function cm(){let n;return{before({doc:r}){var e;let t=r.documentElement,o=(e=r.defaultView)!=null?e:window;n=Math.max(0,o.innerWidth-t.clientWidth)},after({doc:r,d:e}){let t=r.documentElement,o=Math.max(0,t.clientWidth-t.offsetWidth),a=Math.max(0,n-o);e.style(t,"paddingRight",`${a}px`)}}}function dm(){return fu()?{before({doc:n,d:r,meta:e}){function t(o){return e.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let s=rt();s.style(n.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(n,"click",s=>{if(Nt(s.target))try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);Nt(c)&&!t(c)&&(i=c)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(Nt(s.target)&&dh(s.target))if(t(s.target)){let l=s.target;for(;l.parentElement&&t(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(n,"touchmove",s=>{if(Nt(s.target)){if(io(s.target))return;if(t(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function fm(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function pm(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let fn=um(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:rt(),meta:new Set};return t.count++,t.meta.add(r),this.set(n,t),this},POP(n,r){let e=this.get(n);return e&&(e.count--,e.meta.delete(r)),this},SCROLL_PREVENT({doc:n,d:r,meta:e}){let t={doc:n,d:r,meta:pm(e)},o=[dm(),cm(),fm()];o.forEach(({before:a})=>a==null?void 0:a(t)),o.forEach(({after:a})=>a==null?void 0:a(t))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});fn.subscribe(()=>{let n=fn.getSnapshot(),r=new Map;for(let[e]of n)r.set(e,e.documentElement.style.overflow);for(let e of n.values()){let t=r.get(e.doc)==="hidden",o=e.count!==0;(o&&!t||!o&&t)&&fn.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&fn.dispatch("TEARDOWN",e)}});function hm(n,r,e=()=>({containers:[]})){let t=lm(fn),o=r?t.get(r):void 0,a=o?o.count>0:!1;return fe(()=>{if(!(!r||!n))return fn.dispatch("PUSH",r,e),()=>fn.dispatch("POP",r,e)},[n,r]),a}function ci(n,r,e=()=>[document.body]){let t=br(n,"scroll-lock");hm(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function bu(n){return[n.screenX,n.screenY]}function yu(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=bu(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=bu(r)}}}function mm(n=0){let[r,e]=d.useState(n),t=d.useCallback(l=>e(l),[r]),o=d.useCallback(l=>e(u=>u|l),[r]),a=d.useCallback(l=>(r&l)===l,[r]),i=d.useCallback(l=>e(u=>u&~l),[e]),s=d.useCallback(l=>e(u=>u^l),[e]);return{flags:r,setFlag:t,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var wu,xu;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((wu=process==null?void 0:process.env)==null?void 0:wu.NODE_ENV)==="test"&&typeof((xu=Element==null?void 0:Element.prototype)==null?void 0:xu.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
76
+ `)),[]});var vm=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(vm||{});function di(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function fi(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=mm(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),f=Qt();return fe(()=>{var h;if(n){if(e&&a(!0),!r){e&&s(3);return}return(h=t==null?void 0:t.start)==null||h.call(t,e),gm(r,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(e?(s(3),l(4)):(s(4),l(2)))},run(){c.current?e?(l(3),s(4)):(l(4),s(3)):e?l(1):s(1)},done(){var p;c.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(u.current=!1,l(7),e||a(!1),(p=t==null?void 0:t.end)==null||p.call(t,e))}})}},[n,e,r,f]),n?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[e,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function gm(n,{prepare:r,run:e,done:t,inFlight:o}){let a=rt();return ym(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(bm(n,t))})}),a.dispose}function bm(n,r){var e,t;let o=rt();if(!n)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(t=(e=n.getAnimations)==null?void 0:e.call(n).filter(s=>s instanceof CSSTransition))!=null?t:[];return i.length===0?(r(),o.dispose):(Promise.allSettled(i.map(s=>s.finished)).then(()=>{a||r()}),o.dispose)}function ym(n,{inFlight:r,prepare:e}){if(r!=null&&r.current){e();return}let t=n.style.transition;n.style.transition="none",e(),n.offsetHeight,n.style.transition=t}function wm(n,{container:r,accept:e,walk:t}){let o=d.useRef(e),a=d.useRef(t);d.useEffect(()=>{o.current=e,a.current=t},[e,t]),fe(()=>{if(!r||!n)return;let i=dn(r);if(!i)return;let s=o.current,l=a.current,u=Object.assign(f=>s(f),{acceptNode:s}),c=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[r,n,o,a])}function wr(n,r){let e=d.useRef([]),t=ee(n);d.useEffect(()=>{let o=[...e.current];for(let[a,i]of r.entries())if(e.current[a]!==i){let s=t(r,o);return e.current=r,s}},[t,...r])}function po(){return typeof window<"u"}function Fn(n){return Eu(n)?(n.nodeName||"").toLowerCase():"#document"}function Ze(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function mt(n){var r;return(r=(Eu(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Eu(n){return po()?n instanceof Node||n instanceof Ze(n).Node:!1}function Fe(n){return po()?n instanceof Element||n instanceof Ze(n).Element:!1}function vt(n){return po()?n instanceof HTMLElement||n instanceof Ze(n).HTMLElement:!1}function Du(n){return!po()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ze(n).ShadowRoot}function xr(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=at(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!["inline","contents"].includes(o)}function xm(n){return["table","td","th"].includes(Fn(n))}function ho(n){return[":popover-open",":modal"].some(r=>{try{return n.matches(r)}catch{return!1}})}function pi(n){const r=hi(),e=Fe(n)?at(n):n;return["transform","translate","scale","rotate","perspective"].some(t=>e[t]?e[t]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!r&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!r&&(e.filter?e.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(t=>(e.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(e.contain||"").includes(t))}function Em(n){let r=Jt(n);for(;vt(r)&&!$n(r);){if(pi(r))return r;if(ho(r))return null;r=Jt(r)}return null}function hi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $n(n){return["html","body","#document"].includes(Fn(n))}function at(n){return Ze(n).getComputedStyle(n)}function mo(n){return Fe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Jt(n){if(Fn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||Du(n)&&n.host||mt(n);return Du(r)?r.host:r}function Su(n){const r=Jt(n);return $n(r)?n.ownerDocument?n.ownerDocument.body:n.body:vt(r)&&xr(r)?r:Su(r)}function Er(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=Su(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=Ze(o);if(a){const s=mi(i);return r.concat(i,i.visualViewport||[],xr(o)?o:[],s&&e?Er(s):[])}return r.concat(o,Er(o,[],e))}function mi(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Dm(){const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(r=>{let{brand:e,version:t}=r;return e+"/"+t}).join(" "):navigator.userAgent}const At=Math.min,Ue=Math.max,Dr=Math.round,vo=Math.floor,gt=n=>({x:n,y:n}),Sm={left:"right",right:"left",bottom:"top",top:"bottom"},km={start:"end",end:"start"};function vi(n,r,e){return Ue(n,At(r,e))}function pn(n,r){return typeof n=="function"?n(r):n}function Zt(n){return n.split("-")[0]}function An(n){return n.split("-")[1]}function ku(n){return n==="x"?"y":"x"}function gi(n){return n==="y"?"height":"width"}function hn(n){return["top","bottom"].includes(Zt(n))?"y":"x"}function bi(n){return ku(hn(n))}function _m(n,r,e){e===void 0&&(e=!1);const t=An(n),o=bi(n),a=gi(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=go(i)),[i,go(i)]}function Cm(n){const r=go(n);return[yi(n),r,yi(r)]}function yi(n){return n.replace(/start|end/g,r=>km[r])}function Om(n,r,e){const t=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(n){case"top":case"bottom":return e?r?o:t:r?t:o;case"left":case"right":return r?a:i;default:return[]}}function Mm(n,r,e,t){const o=An(n);let a=Om(Zt(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(yi)))),a}function go(n){return n.replace(/left|right|bottom|top/g,r=>Sm[r])}function Tm(n){return{top:0,right:0,bottom:0,left:0,...n}}function _u(n){return typeof n!="number"?Tm(n):{top:n,right:n,bottom:n,left:n}}function bo(n){const{x:r,y:e,width:t,height:o}=n;return{width:t,height:o,top:e,left:r,right:r+t,bottom:e+o,x:r,y:e}}function Cu(n,r,e){let{reference:t,floating:o}=n;const a=hn(r),i=bi(r),s=gi(i),l=Zt(r),u=a==="y",c=t.x+t.width/2-o.width/2,f=t.y+t.height/2-o.height/2,h=t[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:t.y-o.height};break;case"bottom":p={x:c,y:t.y+t.height};break;case"right":p={x:t.x+t.width,y:f};break;case"left":p={x:t.x-o.width,y:f};break;default:p={x:t.x,y:t.y}}switch(An(r)){case"start":p[i]-=h*(e&&u?-1:1);break;case"end":p[i]+=h*(e&&u?-1:1);break}return p}const Pm=async(n,r,e)=>{const{placement:t="bottom",strategy:o="absolute",middleware:a=[],platform:i}=e,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let u=await i.getElementRects({reference:n,floating:r,strategy:o}),{x:c,y:f}=Cu(u,t,l),h=t,p={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:x}=s[v],{x:E,y:w,data:k,reset:D}=await x({x:c,y:f,initialPlacement:t,placement:h,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:n,floating:r}});c=E??c,f=w??f,p={...p,[g]:{...p[g],...k}},D&&m<=50&&(m++,typeof D=="object"&&(D.placement&&(h=D.placement),D.rects&&(u=D.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):D.rects),{x:c,y:f}=Cu(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function yo(n,r){var e;r===void 0&&(r={});const{x:t,y:o,platform:a,rects:i,elements:s,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=pn(r,n),m=_u(p),g=s[h?f==="floating"?"reference":"floating":f],x=bo(await a.getClippingRect({element:(e=await(a.isElement==null?void 0:a.isElement(g)))==null||e?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),E=f==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},D=bo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:w,strategy:l}):E);return{top:(x.top-D.top+m.top)/k.y,bottom:(D.bottom-x.bottom+m.bottom)/k.y,left:(x.left-D.left+m.left)/k.x,right:(D.right-x.right+m.right)/k.x}}const Im=n=>({name:"arrow",options:n,async fn(r){const{x:e,y:t,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:u,padding:c=0}=pn(n,r)||{};if(u==null)return{};const f=_u(c),h={x:e,y:t},p=bi(o),m=gi(p),v=await i.getDimensions(u),g=p==="y",x=g?"top":"left",E=g?"bottom":"right",w=g?"clientHeight":"clientWidth",k=a.reference[m]+a.reference[p]-h[p]-a.floating[m],D=h[p]-a.reference[p],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let $=T?T[w]:0;(!$||!await(i.isElement==null?void 0:i.isElement(T)))&&($=s.floating[w]||a.floating[m]);const _=k/2-D/2,C=$/2-v[m]/2-1,O=At(f[x],C),R=At(f[E],C),b=O,S=$-v[m]-R,L=$/2-v[m]/2+_,P=vi(b,L,S),N=!l.arrow&&An(o)!=null&&L!==P&&a.reference[m]/2-(L<b?O:R)-v[m]/2<0,z=N?L<b?L-b:L-S:0;return{[p]:h[p]+z,data:{[p]:P,centerOffset:L-P-z,...N&&{alignmentOffset:z}},reset:N}}}),Nm=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var e,t;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=r,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=pn(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const x=Zt(o),E=hn(s),w=Zt(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=h||(w||!v?[go(s)]:Cm(s)),T=m!=="none";!h&&T&&D.push(...Mm(s,v,m,k));const $=[s,...D],_=await yo(r,g),C=[];let O=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&C.push(_[x]),f){const L=_m(o,i,k);C.push(_[L[0]],_[L[1]])}if(O=[...O,{placement:o,overflows:C}],!C.every(L=>L<=0)){var R,b;const L=(((R=a.flip)==null?void 0:R.index)||0)+1,P=$[L];if(P)return{data:{index:L,overflows:O},reset:{placement:P}};let N=(b=O.filter(z=>z.overflows[0]<=0).sort((z,I)=>z.overflows[1]-I.overflows[1])[0])==null?void 0:b.placement;if(!N)switch(p){case"bestFit":{var S;const z=(S=O.filter(I=>{if(T){const te=hn(I.placement);return te===E||te==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(te=>te>0).reduce((te,M)=>te+M,0)]).sort((I,te)=>I[1]-te[1])[0])==null?void 0:S[0];z&&(N=z);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function Lm(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=Zt(e),s=An(e),l=hn(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,f=pn(r,n);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const Fm=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var e,t;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await Lm(r,n);return i===((e=s.offset)==null?void 0:e.placement)&&(t=s.arrow)!=null&&t.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},$m=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:e,y:t,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:g=>{let{x,y:E}=g;return{x,y:E}}},...l}=pn(n,r),u={x:e,y:t},c=await yo(r,l),f=hn(Zt(o)),h=ku(f);let p=u[h],m=u[f];if(a){const g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",E=p+c[g],w=p-c[x];p=vi(E,p,w)}if(i){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",E=m+c[g],w=m-c[x];m=vi(E,m,w)}const v=s.fn({...r,[h]:p,[f]:m});return{...v,data:{x:v.x-e,y:v.y-t,enabled:{[h]:a,[f]:i}}}}}},Am=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var e,t;const{placement:o,rects:a,platform:i,elements:s}=r,{apply:l=()=>{},...u}=pn(n,r),c=await yo(r,u),f=Zt(o),h=An(o),p=hn(o)==="y",{width:m,height:v}=a.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(x=f,g=h==="end"?"top":"bottom");const E=v-c.top-c.bottom,w=m-c.left-c.right,k=At(v-c[g],E),D=At(m-c[x],w),T=!r.middlewareData.shift;let $=k,_=D;if((e=r.middlewareData.shift)!=null&&e.enabled.x&&(_=w),(t=r.middlewareData.shift)!=null&&t.enabled.y&&($=E),T&&!h){const O=Ue(c.left,0),R=Ue(c.right,0),b=Ue(c.top,0),S=Ue(c.bottom,0);p?_=m-2*(O!==0||R!==0?O+R:Ue(c.left,c.right)):$=v-2*(b!==0||S!==0?b+S:Ue(c.top,c.bottom))}await l({...r,availableWidth:_,availableHeight:$});const C=await i.getDimensions(s.floating);return m!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}};function Ou(n){const r=at(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=vt(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=Dr(e)!==a||Dr(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function wi(n){return Fe(n)?n:n.contextElement}function Yn(n){const r=wi(n);if(!vt(r))return gt(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=Ou(r);let i=(a?Dr(e.width):e.width)/t,s=(a?Dr(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Ym=gt(0);function Mu(n){const r=Ze(n);return!hi()||!r.visualViewport?Ym:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Rm(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==Ze(n)?!1:r}function mn(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=wi(n);let i=gt(1);r&&(t?Fe(t)&&(i=Yn(t)):i=Yn(n));const s=Rm(a,e,t)?Mu(a):gt(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,f=o.height/i.y;if(a){const h=Ze(a),p=t&&Fe(t)?Ze(t):t;let m=h,v=mi(m);for(;v&&t&&p!==m;){const g=Yn(v),x=v.getBoundingClientRect(),E=at(v),w=x.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,k=x.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=k,m=Ze(v),v=mi(m)}}return bo({width:c,height:f,x:l,y:u})}function xi(n,r){const e=mo(n).scrollLeft;return r?r.left+e:mn(mt(n)).left+e}function Tu(n,r,e){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=t.left+r.scrollLeft-(e?0:xi(n,t)),a=t.top+r.scrollTop;return{x:o,y:a}}function jm(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=mt(t),s=r?ho(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=gt(1);const c=gt(0),f=vt(t);if((f||!f&&!a)&&((Fn(t)!=="body"||xr(i))&&(l=mo(t)),vt(t))){const p=mn(t);u=Yn(t),c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}const h=i&&!f&&!a?Tu(i,l,!0):gt(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:e.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Wm(n){return Array.from(n.getClientRects())}function Hm(n){const r=mt(n),e=mo(n),t=n.ownerDocument.body,o=Ue(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Ue(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+xi(n);const s=-e.scrollTop;return at(t).direction==="rtl"&&(i+=Ue(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Bm(n,r){const e=Ze(n),t=mt(n),o=e.visualViewport;let a=t.clientWidth,i=t.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const u=hi();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function Vm(n,r){const e=mn(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=vt(n)?Yn(n):gt(1),i=n.clientWidth*a.x,s=n.clientHeight*a.y,l=o*a.x,u=t*a.y;return{width:i,height:s,x:l,y:u}}function Pu(n,r,e){let t;if(r==="viewport")t=Bm(n,e);else if(r==="document")t=Hm(mt(n));else if(Fe(r))t=Vm(r,e);else{const o=Mu(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return bo(t)}function Iu(n,r){const e=Jt(n);return e===r||!Fe(e)||$n(e)?!1:at(e).position==="fixed"||Iu(e,r)}function zm(n,r){const e=r.get(n);if(e)return e;let t=Er(n,[],!1).filter(s=>Fe(s)&&Fn(s)!=="body"),o=null;const a=at(n).position==="fixed";let i=a?Jt(n):n;for(;Fe(i)&&!$n(i);){const s=at(i),l=pi(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||xr(i)&&!l&&Iu(n,i))?t=t.filter(c=>c!==i):o=s,i=Jt(i)}return r.set(n,t),t}function qm(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?ho(r)?[]:zm(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=Pu(r,c,o);return u.top=Ue(f.top,u.top),u.right=At(f.right,u.right),u.bottom=At(f.bottom,u.bottom),u.left=Ue(f.left,u.left),u},Pu(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Um(n){const{width:r,height:e}=Ou(n);return{width:r,height:e}}function Qm(n,r,e){const t=vt(r),o=mt(r),a=e==="fixed",i=mn(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=gt(0);if(t||!t&&!a)if((Fn(r)!=="body"||xr(o))&&(s=mo(r)),t){const h=mn(r,!0,a,r);l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}else o&&(l.x=xi(o));const u=o&&!t&&!a?Tu(o,s):gt(0),c=i.left+s.scrollLeft-l.x-u.x,f=i.top+s.scrollTop-l.y-u.y;return{x:c,y:f,width:i.width,height:i.height}}function Ei(n){return at(n).position==="static"}function Nu(n,r){if(!vt(n)||at(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return mt(n)===e&&(e=e.ownerDocument.body),e}function Lu(n,r){const e=Ze(n);if(ho(n))return e;if(!vt(n)){let o=Jt(n);for(;o&&!$n(o);){if(Fe(o)&&!Ei(o))return o;o=Jt(o)}return e}let t=Nu(n,r);for(;t&&xm(t)&&Ei(t);)t=Nu(t,r);return t&&$n(t)&&Ei(t)&&!pi(t)?e:t||Em(n)||e}const Gm=async function(n){const r=this.getOffsetParent||Lu,e=this.getDimensions,t=await e(n.floating);return{reference:Qm(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Km(n){return at(n).direction==="rtl"}const Xm={convertOffsetParentRelativeRectToViewportRelativeRect:jm,getDocumentElement:mt,getClippingRect:qm,getOffsetParent:Lu,getElementRects:Gm,getClientRects:Wm,getDimensions:Um,getScale:Yn,isElement:Fe,isRTL:Km};function Fu(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function Jm(n,r){let e=null,t;const o=mt(n);function a(){var s;clearTimeout(t),(s=e)==null||s.disconnect(),e=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=n.getBoundingClientRect(),{left:c,top:f,width:h,height:p}=u;if(s||r(),!h||!p)return;const m=vo(f),v=vo(o.clientWidth-(c+h)),g=vo(o.clientHeight-(f+p)),x=vo(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-x+"px",threshold:Ue(0,At(1,l))||1};let k=!0;function D(T){const $=T[0].intersectionRatio;if($!==l){if(!k)return i();$?i(!1,$):t=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!Fu(u,n.getBoundingClientRect())&&i(),k=!1}try{e=new IntersectionObserver(D,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(D,w)}e.observe(n)}return i(!0),a}function $u(n,r,e,t){t===void 0&&(t={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=t,u=wi(n),c=o||a?[...u?Er(u):[],...Er(r)]:[];c.forEach(x=>{o&&x.addEventListener("scroll",e,{passive:!0}),a&&x.addEventListener("resize",e)});const f=u&&s?Jm(u,e):null;let h=-1,p=null;i&&(p=new ResizeObserver(x=>{let[E]=x;E&&E.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),e()}),u&&!l&&p.observe(u),p.observe(r));let m,v=l?mn(n):null;l&&g();function g(){const x=mn(n);v&&!Fu(v,x)&&e(),v=x,m=requestAnimationFrame(g)}return e(),()=>{var x;c.forEach(E=>{o&&E.removeEventListener("scroll",e),a&&E.removeEventListener("resize",e)}),f==null||f(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Di=yo,Zm=Fm,ev=$m,tv=Nm,nv=Am,Au=Im,rv=(n,r,e)=>{const t=new Map,o={platform:Xm,...e},a={...o.platform,_c:t};return Pm(n,r,{...o,platform:a})};var wo=typeof document<"u"?d.useLayoutEffect:d.useEffect;function xo(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let e,t,o;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(e=n.length,e!==r.length)return!1;for(t=e;t--!==0;)if(!xo(n[t],r[t]))return!1;return!0}if(o=Object.keys(n),e=o.length,e!==Object.keys(r).length)return!1;for(t=e;t--!==0;)if(!{}.hasOwnProperty.call(r,o[t]))return!1;for(t=e;t--!==0;){const a=o[t];if(!(a==="_owner"&&n.$$typeof)&&!xo(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function Yu(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ru(n,r){const e=Yu(n);return Math.round(r*e)/e}function Si(n){const r=V.useRef(n);return wo(()=>{r.current=n}),r}function ju(n){n===void 0&&(n={});const{placement:r="bottom",strategy:e="absolute",middleware:t=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=n,[c,f]=V.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=V.useState(t);xo(h,t)||p(t);const[m,v]=V.useState(null),[g,x]=V.useState(null),E=V.useCallback(I=>{I!==T.current&&(T.current=I,v(I))},[]),w=V.useCallback(I=>{I!==$.current&&($.current=I,x(I))},[]),k=a||m,D=i||g,T=V.useRef(null),$=V.useRef(null),_=V.useRef(c),C=l!=null,O=Si(l),R=Si(o),b=Si(u),S=V.useCallback(()=>{if(!T.current||!$.current)return;const I={placement:r,strategy:e,middleware:h};R.current&&(I.platform=R.current),rv(T.current,$.current,I).then(te=>{const M={...te,isPositioned:b.current!==!1};L.current&&!xo(_.current,M)&&(_.current=M,Hr.flushSync(()=>{f(M)}))})},[h,r,e,R,b]);wo(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[u]);const L=V.useRef(!1);wo(()=>(L.current=!0,()=>{L.current=!1}),[]),wo(()=>{if(k&&(T.current=k),D&&($.current=D),k&&D){if(O.current)return O.current(k,D,S);S()}},[k,D,S,O,C]);const P=V.useMemo(()=>({reference:T,floating:$,setReference:E,setFloating:w}),[E,w]),N=V.useMemo(()=>({reference:k,floating:D}),[k,D]),z=V.useMemo(()=>{const I={position:e,left:0,top:0};if(!N.floating)return I;const te=Ru(N.floating,c.x),M=Ru(N.floating,c.y);return s?{...I,transform:"translate("+te+"px, "+M+"px)",...Yu(N.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:te,top:M}},[e,s,N.floating,c.x,c.y]);return V.useMemo(()=>({...c,update:S,refs:P,elements:N,floatingStyles:z}),[c,S,P,N,z])}const ov=n=>{function r(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:n,fn(e){const{element:t,padding:o}=typeof n=="function"?n(e):n;return t&&r(t)?t.current!=null?Au({element:t.current,padding:o}).fn(e):{}:t?Au({element:t,padding:o}).fn(e):{}}}},ki=(n,r)=>({...Zm(n),options:[n,r]}),av=(n,r)=>({...ev(n),options:[n,r]}),Wu=(n,r)=>({...tv(n),options:[n,r]}),iv=(n,r)=>({...nv(n),options:[n,r]}),sv=(n,r)=>({...ov(n),options:[n,r]}),Hu={...V},lv=Hu.useInsertionEffect||(n=>n());function Bu(n){const r=V.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return lv(()=>{r.current=n}),V.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}var _i=typeof document<"u"?d.useLayoutEffect:d.useEffect;let Vu=!1,uv=0;const zu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uv++;function cv(){const[n,r]=V.useState(()=>Vu?zu():void 0);return _i(()=>{n==null&&r(zu())},[]),V.useEffect(()=>{Vu=!0},[]),n}const dv=Hu.useId||cv;let Sr;process.env.NODE_ENV!=="production"&&(Sr=new Set);function fv(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Sr)!=null&&n.has(o))){var a;(a=Sr)==null||a.add(o),console.warn(o)}}function pv(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Sr)!=null&&n.has(o))){var a;(a=Sr)==null||a.add(o),console.error(o)}}function hv(){const n=new Map;return{emit(r,e){var t;(t=n.get(r))==null||t.forEach(o=>o(e))},on(r,e){n.set(r,[...n.get(r)||[],e])},off(r,e){var t;n.set(r,((t=n.get(r))==null?void 0:t.filter(o=>o!==e))||[])}}}const mv=V.createContext(null),vv=V.createContext(null),gv=()=>{var n;return((n=V.useContext(mv))==null?void 0:n.id)||null},bv=()=>V.useContext(vv),yv="data-floating-ui-focusable";function wv(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=dv(),a=V.useRef({}),[i]=V.useState(()=>hv()),s=gv()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!Fe(p)&&pv("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=V.useState(t.reference),c=Bu((p,m,v)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:v,nested:s}),e==null||e(p,m,v)}),f=V.useMemo(()=>({setPositionReference:u}),[]),h=V.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return V.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function xv(n){n===void 0&&(n={});const{nodeId:r}=n,e=wv({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=V.useState(null),[s,l]=V.useState(null),c=(o==null?void 0:o.domReference)||a,f=V.useRef(null),h=bv();_i(()=>{c&&(f.current=c)},[c]);const p=ju({...n,elements:{...o,...s&&{reference:s}}}),m=V.useCallback(w=>{const k=Fe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(k),p.refs.setReference(k)},[p.refs]),v=V.useCallback(w=>{(Fe(w)||w===null)&&(f.current=w,i(w)),(Fe(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Fe(w))&&p.refs.setReference(w)},[p.refs]),g=V.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),x=V.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=V.useMemo(()=>({...p,...t,refs:g,elements:x,nodeId:r}),[p,g,x,r,t]);return _i(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(k=>k.id===r);w&&(w.context=E)}),V.useMemo(()=>({...p,context:E,refs:g,elements:x}),[p,g,x,E])}const qu="active",Uu="selected";function Ci(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[qu]:i,[Uu]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1,[yv]:""},...a,...r.map(i=>{const s=i?i[e]:null;return typeof s=="function"?n?s(n):null:s}).concat(n).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[u,c]=l;if(!(o&&[qu,Uu].includes(u)))if(u.indexOf("on")===0){if(t.has(u)||t.set(u,[]),typeof c=="function"){var f;(f=t.get(u))==null||f.push(c),i[u]=function(){for(var h,p=arguments.length,m=new Array(p),v=0;v<p;v++)m[v]=arguments[v];return(h=t.get(u))==null?void 0:h.map(g=>g(...m)).find(g=>g!==void 0)}}}else i[u]=c}),i),{})}}function Ev(n){n===void 0&&(n=[]);const r=n.map(s=>s==null?void 0:s.reference),e=n.map(s=>s==null?void 0:s.floating),t=n.map(s=>s==null?void 0:s.item),o=V.useCallback(s=>Ci(s,n,"reference"),r),a=V.useCallback(s=>Ci(s,n,"floating"),e),i=V.useCallback(s=>Ci(s,n,"item"),t);return V.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function Qu(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const Dv=n=>({name:"inner",options:n,async fn(r){const{listRef:e,overflowRef:t,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=pn(n,r),{rects:f,elements:{floating:h}}=r,p=e.current[i],m=(u==null?void 0:u.current)||h,v=h.clientTop||m.clientTop,g=h.clientTop!==0,x=m.clientTop!==0,E=h===m;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||fv('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...r,...await ki(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-a).fn(r)},k=await Di(Qu(w,m.scrollHeight+v+h.clientTop),c),D=await Di(w,{...c,elementContext:"reference"}),T=Ue(0,k.top),$=w.y+T,O=(m.scrollHeight>m.clientHeight?R=>R:Dr)(Ue(0,m.scrollHeight+(g&&E||x?v*2:0)-T-Ue(0,k.bottom)));if(m.style.maxHeight=O+"px",m.scrollTop=T,o){const R=m.offsetHeight<p.offsetHeight*At(s,e.current.length)-1||D.top>=-l||D.bottom>=-l;Hr.flushSync(()=>o(R))}return t&&(t.current=await Di(Qu({...w,y:$},m.offsetHeight+v+h.clientTop),c)),{y:$}}});function Sv(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=Bu(s),u=V.useRef(!1),c=V.useRef(null),f=V.useRef(null);V.useEffect(()=>{if(!o)return;function p(v){if(v.ctrlKey||!m||a.current==null)return;const g=v.deltaY,x=a.current.top>=-.5,E=a.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,k=g<0?-1:1,D=g<0?"max":"min";m.scrollHeight<=m.clientHeight||(!x&&g>0||!E&&g<0?(v.preventDefault(),Hr.flushSync(()=>{l(T=>T+Math[D](g,w*k))})):/firefox/i.test(Dm())&&(m.scrollTop+=g))}const m=(i==null?void 0:i.current)||t.floating;if(e&&m)return m.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=m.scrollTop,a.current!=null&&(f.current={...a.current})}),()=>{c.current=null,f.current=null,m.removeEventListener("wheel",p)}},[o,e,t.floating,a,i,l]);const h=V.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(i==null?void 0:i.current)||t.floating;if(!(!a.current||!p||!u.current)){if(c.current!==null){const m=p.scrollTop-c.current;(a.current.bottom<-.5&&m<-1||a.current.top<-.5&&m>1)&&Hr.flushSync(()=>l(v=>v+m))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[t.floating,l,a,i]);return V.useMemo(()=>o?{floating:h}:{},[o,h])}let Rn=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Rn.displayName="FloatingContext";let Oi=d.createContext(null);Oi.displayName="PlacementContext";function Gu(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function Ku(){return d.useContext(Rn).setReference}function kv(){return d.useContext(Rn).getReferenceProps}function Xu(){let{getFloatingProps:n,slot:r}=d.useContext(Rn);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function Ju(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(Oi),e=d.useMemo(()=>n,[JSON.stringify(n,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);fe(()=>{r==null||r(e??null)},[r,e]);let t=d.useContext(Rn);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let Zu=4;function ec({children:n,enabled:r=!0}){let[e,t]=d.useState(null),[o,a]=d.useState(0),i=d.useRef(null),[s,l]=d.useState(null);_v(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:p=0,inner:m}=Cv(e,s),[v,g="center"]=c.split(" ");fe(()=>{u&&a(0)},[u]);let{refs:x,floatingStyles:E,context:w}=xv({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[ki({mainAxis:v==="selection"?0:f,crossAxis:h}),av({padding:p}),v!=="selection"&&Wu({padding:p}),v==="selection"&&m?Dv({...m,padding:p,overflowRef:i,offset:o,minItemsVisible:Zu,referenceOverflowThreshold:p,onFallbackChange(R){var b,S;if(!R)return;let L=w.elements.floating;if(!L)return;let P=parseFloat(getComputedStyle(L).scrollPaddingBottom)||0,N=Math.min(Zu,L.childElementCount),z=0,I=0;for(let te of(S=(b=w.elements.floating)==null?void 0:b.childNodes)!=null?S:[])if(Ke(te)){let M=te.offsetTop,j=M+te.clientHeight+P,Q=L.scrollTop,W=Q+L.clientHeight;if(M>=Q&&j<=W)N--;else{I=Math.max(0,Math.min(j,W)-Math.max(M,Q)),z=te.clientHeight;break}}N>=1&&a(te=>{let M=z*N-I+P;return te>=M?te:M})}}):null,iv({padding:p,apply({availableWidth:R,availableHeight:b,elements:S}){Object.assign(S.floating.style,{overflow:"auto",maxWidth:`${R}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${b}px)`})}})].filter(Boolean),whileElementsMounted:$u}),[k=v,D=g]=w.placement.split("-");v==="selection"&&(k="selection");let T=d.useMemo(()=>({anchor:[k,D].filter(Boolean).join(" ")}),[k,D]),$=Sv(w,{overflowRef:i,onChange:a}),{getReferenceProps:_,getFloatingProps:C}=Ev([$]),O=ee(R=>{l(R),x.setFloating(R)});return V.createElement(Oi.Provider,{value:t},V.createElement(Rn.Provider,{value:{setFloating:O,setReference:x.setReference,styles:E,getReferenceProps:_,getFloatingProps:C,slot:T}},n))}function _v(n){fe(()=>{if(!n)return;let r=new MutationObserver(()=>{let e=window.getComputedStyle(n).maxHeight,t=parseFloat(e);if(isNaN(t))return;let o=parseInt(e);isNaN(o)||t!==o&&(n.style.maxHeight=`${Math.ceil(t)}px`)});return r.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[n])}function Cv(n,r){var e,t,o;let a=Mi((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=Mi((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Mi((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function Mi(n,r,e=void 0){let t=Qt(),o=ee((l,u)=>{if(l==null)return[e,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[e,null];let c=nc(l,u);return[c,f=>{let h=tc(l);{let p=h.map(m=>window.getComputedStyle(u).getPropertyValue(m));t.requestAnimationFrame(function m(){t.nextFrame(m);let v=!1;for(let[x,E]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(E);if(p[x]!==w){p[x]=w,v=!0;break}}if(!v)return;let g=nc(l,u);c!==g&&(f(g),c=g)})}return t.dispose}]}return[e,null]}),a=d.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=d.useState();return fe(()=>{let[l,u]=o(n,r);if(s(l),!!u)return u(s)},[n,r]),i}function tc(n){let r=/var\((.*)\)/.exec(n);if(r){let e=r[1].indexOf(",");if(e===-1)return[r[1]];let t=r[1].slice(0,e).trim(),o=r[1].slice(e+1).trim();return o?[t,...tc(o)]:[t]}return[]}function nc(n,r){let e=document.createElement("div");r.appendChild(e),e.style.setProperty("margin-top","0px","important"),e.style.setProperty("margin-top",n,"important");let t=parseFloat(window.getComputedStyle(e).marginTop)||0;return r.removeChild(e),t}function Ov({children:n,freeze:r}){let e=Eo(r,n);return d.createElement(d.Fragment,null,e)}function Eo(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let Do=d.createContext(null);Do.displayName="OpenClosedContext";var He=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(He||{});function jn(){return d.useContext(Do)}function Ti({value:n,children:r}){return d.createElement(Do.Provider,{value:n},r)}function Mv({children:n}){return d.createElement(Do.Provider,{value:null},n)}function Tv(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let bt=[];Tv(()=>{function n(r){if(!Nt(r.target)||r.target===document.body||bt[0]===r.target)return;let e=r.target;e=e.closest(fo),bt.unshift(e??r.target),bt=bt.filter(t=>t!=null&&t.isConnected),bt.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Pv(n){throw new Error("Unexpected object: "+n)}var se=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(se||{});function Wn(n,r){let e=r.resolveItems();if(e.length<=0)return null;let t=r.resolveActiveIndex(),o=t??-1;switch(n.focus){case 0:{for(let a=0;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 1:{o===-1&&(o=e.length);for(let a=o-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 2:{for(let a=o+1;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 3:{for(let a=e.length-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 4:{for(let a=0;a<e.length;++a)if(r.resolveId(e[a],a,e)===n.id)return a;return t}case 5:return null;default:Pv(n)}}var Pi=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(Pi||{});function So(n){let r=ee(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,ro(()=>{e.current&&r()})}),[r])}function Iv(){let n=typeof document>"u";return"useSyncExternalStore"in V?(r=>r.useSyncExternalStore)(V)(()=>()=>{},()=>!1,()=>!n):!1}function kr(){let n=Iv(),[r,e]=V.useState(cn.isHandoffComplete);return r&&cn.isHandoffComplete===!1&&e(!1),V.useEffect(()=>{r!==!0&&e(!0)},[r]),V.useEffect(()=>cn.handoff(),[]),n?!1:r}let rc=d.createContext(!1);function Nv(){return d.useContext(rc)}function oc(n){return d.createElement(rc.Provider,{value:n.force},n.children)}function Lv(n){let r=Nv(),e=d.useContext(ic),[t,o]=d.useState(()=>{var a;if(!r&&e!==null)return(a=e.current)!=null?a:null;if(cn.isServer)return null;let i=n==null?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(n===null)return null;let s=n.createElement("div");return s.setAttribute("id","headlessui-portal-root"),n.body.appendChild(s)});return d.useEffect(()=>{t!==null&&(n!=null&&n.body.contains(t)||n==null||n.body.appendChild(t))},[t,n]),d.useEffect(()=>{r||e!==null&&o(e.current)},[e,o,r]),t}let ac=d.Fragment,Fv=Ce(function(n,r){let{ownerDocument:e=null,...t}=n,o=d.useRef(null),a=Re(vh(p=>{o.current=p}),r),i=Ft(o),s=e??i,l=Lv(s),[u]=d.useState(()=>{var p;return cn.isServer?null:(p=s==null?void 0:s.createElement("div"))!=null?p:null}),c=d.useContext(Ii),f=kr();fe(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),fe(()=>{if(u&&c)return c.register(u)},[c,u]),So(()=>{var p;!l||!u||(qa(u)&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l)))});let h=Me();return f?!l||!u?null:Ne.createPortal(h({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:ac,name:"Portal"}),u):null});function $v(n,r){let e=Re(r),{enabled:t=!0,ownerDocument:o,...a}=n,i=Me();return t?d.createElement(Fv,{...a,ownerDocument:o,ref:e}):i({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:ac,name:"Portal"})}let Av=d.Fragment,ic=d.createContext(null);function Yv(n,r){let{target:e,...t}=n,o={ref:Re(r)},a=Me();return d.createElement(ic.Provider,{value:e},a({ourProps:o,theirProps:t,defaultTag:Av,name:"Popover.Group"}))}let Ii=d.createContext(null);function Rv(){let n=d.useContext(Ii),r=d.useRef([]),e=ee(a=>(r.current.push(a),n&&n.register(a),()=>t(a))),t=ee(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),n&&n.unregister(a)}),o=d.useMemo(()=>({register:e,unregister:t,portals:r}),[e,t,r]);return[r,d.useMemo(()=>function({children:a}){return d.createElement(Ii.Provider,{value:o},a)},[o])]}let jv=Ce($v),sc=Ce(Yv),Ni=Object.assign(jv,{Group:sc});var Wv=Object.defineProperty,Hv=(n,r,e)=>r in n?Wv(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,lc=(n,r,e)=>(Hv(n,typeof r!="symbol"?r+"":r,e),e),de=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(de||{}),et=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(et||{}),en=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(en||{}),uc=(n=>(n[n.OpenCombobox=0]="OpenCombobox",n[n.CloseCombobox=1]="CloseCombobox",n[n.GoToOption=2]="GoToOption",n[n.SetTyping=3]="SetTyping",n[n.RegisterOption=4]="RegisterOption",n[n.UnregisterOption=5]="UnregisterOption",n[n.DefaultToFirstOption=6]="DefaultToFirstOption",n[n.SetActivationTrigger=7]="SetActivationTrigger",n[n.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",n[n.SetInputElement=9]="SetInputElement",n[n.SetButtonElement=10]="SetButtonElement",n[n.SetOptionsElement=11]="SetOptionsElement",n))(uc||{});function Li(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=r(n.options.slice()),o=t.length>0&&t[0].dataRef.current.order!==null?t.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):ii(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Bv={1(n){var r;return(r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===1?n:{...n,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(n){var r,e;if((r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===0)return n;if((e=n.dataRef.current)!=null&&e.value){let t=n.dataRef.current.calculateIndex(n.dataRef.current.value);if(t!==-1)return{...n,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...n,comboboxState:0,__demoMode:!1}},3(n,r){return n.isTyping===r.isTyping?n:{...n,isTyping:r.isTyping}},2(n,r){var e,t,o,a;if((e=n.dataRef.current)!=null&&e.disabled||n.optionsElement&&!((t=n.dataRef.current)!=null&&t.optionsPropsRef.current.static)&&n.comboboxState===1)return n;if(n.virtual){let{options:u,disabled:c}=n.virtual,f=r.focus===se.Specific?r.idx:Wn(r,{resolveItems:()=>u,resolveActiveIndex:()=>{var p,m;return(m=(p=n.activeOptionIndex)!=null?p:u.findIndex(v=>!c(v)))!=null?m:null},resolveDisabled:c,resolveId(){throw new Error("Function not implemented.")}}),h=(o=r.trigger)!=null?o:2;return n.activeOptionIndex===f&&n.activationTrigger===h?n:{...n,activeOptionIndex:f,activationTrigger:h,isTyping:!1,__demoMode:!1}}let i=Li(n);if(i.activeOptionIndex===null){let u=i.options.findIndex(c=>!c.dataRef.current.disabled);u!==-1&&(i.activeOptionIndex=u)}let s=r.focus===se.Specific?r.idx:Wn(r,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled}),l=(a=r.trigger)!=null?a:2;return n.activeOptionIndex===s&&n.activationTrigger===l?n:{...n,...i,isTyping:!1,activeOptionIndex:s,activationTrigger:l,__demoMode:!1}},4:(n,r)=>{var e,t,o,a;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:[...n.options,r.payload]};let i=r.payload,s=Li(n,u=>(u.push(i),u));n.activeOptionIndex===null&&(o=(t=n.dataRef.current).isSelected)!=null&&o.call(t,r.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let l={...n,...s,activationTrigger:2};return(a=n.dataRef.current)!=null&&a.__demoMode&&n.dataRef.current.value===void 0&&(l.activeOptionIndex=0),l},5:(n,r)=>{var e;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:n.options.filter(o=>o.id!==r.id)};let t=Li(n,o=>{let a=o.findIndex(i=>i.id===r.id);return a!==-1&&o.splice(a,1),o});return{...n,...t,activationTrigger:2}},6:(n,r)=>n.defaultToFirstOption===r.value?n:{...n,defaultToFirstOption:r.value},7:(n,r)=>n.activationTrigger===r.trigger?n:{...n,activationTrigger:r.trigger},8:(n,r)=>{var e,t;if(n.virtual===null)return{...n,virtual:{options:r.options,disabled:(e=r.disabled)!=null?e:()=>!1}};if(n.virtual.options===r.options&&n.virtual.disabled===r.disabled)return n;let o=n.activeOptionIndex;if(n.activeOptionIndex!==null){let a=r.options.indexOf(n.virtual.options[n.activeOptionIndex]);a!==-1?o=a:o=null}return{...n,activeOptionIndex:o,virtual:{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}}},9:(n,r)=>n.inputElement===r.element?n:{...n,inputElement:r.element},10:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},11:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},Vv=class df extends Ga{constructor(r){super(r),lc(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Le(a,{0:()=>t==null?void 0:t(e),1:()=>{let s=i.slice(),l=s.findIndex(u=>o(u,e));return l===-1?s.push(e):s.splice(l,1),t==null?void 0:t(s)}})},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}),(t=(e=this.state.dataRef.current).onClose)==null||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(e!==null){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:se.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})}}),lc(this,"selectors",{activeDescendantId:e=>{var t,o;let a=this.selectors.activeOptionIndex(e);if(a!==null)return e.virtual?(o=e.options.find(i=>!i.dataRef.current.disabled&&e.dataRef.current.compare(i.dataRef.current.value,e.virtual.options[a])))==null?void 0:o.id:(t=e.options[a])==null?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&e.activeOptionIndex===null&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:o,disabled:a}=e.virtual,i=o.findIndex(s=>{var l;return!((l=a==null?void 0:a(s))!=null&&l)});if(i!==-1)return i}let t=e.options.findIndex(o=>!o.dataRef.current.disabled);if(t!==-1)return t}return e.activeOptionIndex},activeOption:e=>{var t,o;let a=this.selectors.activeOptionIndex(e);return a===null?null:e.virtual?e.virtual.options[a??0]:(o=(t=e.options[a])==null?void 0:t.dataRef.current.value)!=null?o:null},isActive:(e,t,o)=>{var a;let i=this.selectors.activeOptionIndex(e);return i===null?!1:e.virtual?i===e.dataRef.current.calculateIndex(t):((a=e.options[i])==null?void 0:a.id)===o},shouldScrollIntoView:(e,t,o)=>!(e.virtual||e.__demoMode||e.comboboxState!==0||e.activationTrigger===0||!this.selectors.isActive(e,t,o))});{let e=this.state.id,t=In.get(null);this.disposables.add(t.on(Ja.Push,o=>{!t.selectors.isTop(o,e)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:r,virtual:e=null,__demoMode:t=!1}){var o;return new df({id:r,dataRef:{current:{}},comboboxState:t?0:1,isTyping:!1,options:[],virtual:e?{options:e.options,disabled:(o=e.disabled)!=null?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:t})}reduce(r,e){return Le(e.type,Bv,r,e)}};const cc=d.createContext(null);function _r(n){let r=d.useContext(cc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,dc),e}return r}function dc({id:n,virtual:r=null,__demoMode:e=!1}){let t=d.useMemo(()=>Vv.new({id:n,virtual:r,__demoMode:e}),[]);return So(()=>t.dispose()),t}let Cr=d.createContext(null);Cr.displayName="ComboboxDataContext";function Hn(n){let r=d.useContext(Cr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Hn),e}return r}let fc=d.createContext(null);function zv(n){let r=_r("VirtualProvider"),e=Hn("VirtualProvider"),{options:t}=e.virtual,o=we(r,p=>p.optionsElement),[a,i]=d.useMemo(()=>{let p=o;if(!p)return[0,0];let m=window.getComputedStyle(p);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[o]),s=Ah({enabled:t.length!==0,scrollPaddingStart:a,scrollPaddingEnd:i,count:t.length,estimateSize(){return 40},getScrollElement(){return r.state.optionsElement},overscan:12}),[l,u]=d.useState(0);fe(()=>{u(p=>p+1)},[t]);let c=s.getVirtualItems(),f=we(r,p=>p.activationTrigger===en.Pointer),h=we(r,r.selectors.activeOptionIndex);return c.length===0?null:d.createElement(fc.Provider,{value:s},d.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:p=>{p&&(f||h!==null&&t.length>h&&s.scrollToIndex(h))}},c.map(p=>{var m;return d.createElement(d.Fragment,{key:p.key},d.cloneElement((m=n.children)==null?void 0:m.call(n,{...n.slot,option:t[p.index]}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":t.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let qv=d.Fragment;function Uv(n,r){let e=d.useId(),t=oo(),{value:o,defaultValue:a,onChange:i,form:s,name:l,by:u,invalid:c=!1,disabled:f=t||!1,onClose:h,__demoMode:p=!1,multiple:m=!1,immediate:v=!1,virtual:g=null,nullable:x,...E}=n,w=Il(a),[k=m?[]:void 0,D]=Pl(o,i,w),T=dc({id:e,virtual:g,__demoMode:p}),$=d.useRef({static:!1,hold:!1}),_=Jl(u),C=ee(H=>g?u===null?g.options.indexOf(H):g.options.findIndex(G=>_(G,H)):T.state.options.findIndex(G=>_(G.dataRef.current.value,H))),O=d.useCallback(H=>Le(S.mode,{[et.Multi]:()=>k.some(G=>_(G,H)),[et.Single]:()=>_(k,H)}),[k]),R=we(T,H=>H.virtual),b=ee(()=>h==null?void 0:h()),S=d.useMemo(()=>({__demoMode:p,immediate:v,optionsPropsRef:$,value:k,defaultValue:w,disabled:f,invalid:c,mode:m?et.Multi:et.Single,virtual:g?R:null,onChange:D,isSelected:O,calculateIndex:C,compare:_,onClose:b}),[k,w,f,c,m,D,O,p,T,g,R,b]);fe(()=>{var H;g&&T.send({type:uc.UpdateVirtualConfiguration,options:g.options,disabled:(H=g.disabled)!=null?H:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),fe(()=>{T.state.dataRef.current=S},[S]);let[L,P,N,z]=we(T,H=>[H.comboboxState,H.buttonElement,H.inputElement,H.optionsElement]),I=In.get(null),te=we(I,d.useCallback(H=>I.selectors.isTop(H,e),[I,e]));li(te,[P,N,z],()=>T.actions.closeCombobox());let M=we(T,T.selectors.activeOptionIndex),j=we(T,T.selectors.activeOption),Q=d.useMemo(()=>({open:L===de.Open,disabled:f,invalid:c,activeIndex:M,activeOption:j,value:k}),[S,f,k,c,j,L]),[W,F]=zl(),ne=r===null?{}:{ref:r},q=d.useCallback(()=>{if(w!==void 0)return D==null?void 0:D(w)},[D,w]),A=Me();return d.createElement(F,{value:W,props:{htmlFor:N==null?void 0:N.id},slot:{open:L===de.Open,disabled:f}},d.createElement(ec,null,d.createElement(Cr.Provider,{value:S},d.createElement(cc.Provider,{value:T},d.createElement(Ti,{value:Le(L,{[de.Open]:He.Open,[de.Closed]:He.Closed})},l!=null&&d.createElement($l,{disabled:f,data:k!=null?{[l]:k}:{},form:s,onReset:q}),A({ourProps:ne,theirProps:E,slot:Q,defaultTag:qv,name:"Combobox"}))))))}let Qv="input";function Gv(n,r){var e,t;let o=_r("Combobox.Input"),a=Hn("Combobox.Input"),i=d.useId(),s=za(),{id:l=s||`headlessui-combobox-input-${i}`,onChange:u,displayValue:c,disabled:f=a.disabled||!1,autoFocus:h=!1,type:p="text",...m}=n,[v]=we(o,F=>[F.inputElement]),g=d.useRef(null),x=Re(g,r,Ku(),o.actions.setInputElement),E=Ft(v),[w,k]=we(o,F=>[F.comboboxState,F.isTyping]),D=Qt(),T=ee(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:se.Nothing})}),$=d.useMemo(()=>{var F;return typeof c=="function"&&a.value!==void 0?(F=c(a.value))!=null?F:"":typeof a.value=="string"?a.value:""},[a.value,c]);wr(([F,ne],[q,A])=>{if(o.state.isTyping)return;let H=g.current;H&&((A===de.Open&&ne===de.Closed||F!==q)&&(H.value=F),requestAnimationFrame(()=>{if(o.state.isTyping||!H||(E==null?void 0:E.activeElement)!==H)return;let{selectionStart:G,selectionEnd:X}=H;Math.abs((X??0)-(G??0))===0&&G===0&&H.setSelectionRange(H.value.length,H.value.length)}))},[$,w,E,k]),wr(([F],[ne])=>{if(F===de.Open&&ne===de.Closed){if(o.state.isTyping)return;let q=g.current;if(!q)return;let A=q.value,{selectionStart:H,selectionEnd:G,selectionDirection:X}=q;q.value="",q.value=A,X!==null?q.setSelectionRange(H,G,X):q.setSelectionRange(H,G)}},[w]);let _=d.useRef(!1),C=ee(()=>{_.current=!0}),O=ee(()=>{D.nextFrame(()=>{_.current=!1})}),R=ee(F=>{switch(o.actions.setIsTyping(!0),F.key){case he.Enter:if(o.state.comboboxState!==de.Open||_.current)return;if(F.preventDefault(),F.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),a.mode===et.Single&&o.actions.closeCombobox();break;case he.ArrowDown:return F.preventDefault(),F.stopPropagation(),Le(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Next}),[de.Closed]:()=>o.actions.openCombobox()});case he.ArrowUp:return F.preventDefault(),F.stopPropagation(),Le(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Previous}),[de.Closed]:()=>{Ne.flushSync(()=>o.actions.openCombobox()),a.value||o.actions.goToOption({focus:se.Last})}});case he.Home:if(F.shiftKey)break;return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.First});case he.PageUp:return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.First});case he.End:if(F.shiftKey)break;return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.Last});case he.PageDown:return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.Last});case he.Escape:return o.state.comboboxState!==de.Open?void 0:(F.preventDefault(),o.state.optionsElement&&!a.optionsPropsRef.current.static&&F.stopPropagation(),a.mode===et.Single&&a.value===null&&T(),o.actions.closeCombobox());case he.Tab:if(o.state.comboboxState!==de.Open)return;a.mode===et.Single&&o.state.activationTrigger!==en.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),b=ee(F=>{u==null||u(F),a.mode===et.Single&&F.target.value===""&&T(),o.actions.openCombobox()}),S=ee(F=>{var ne,q,A;let H=(ne=F.relatedTarget)!=null?ne:bt.find(G=>G!==F.currentTarget);if(!((q=o.state.optionsElement)!=null&&q.contains(H))&&!((A=o.state.buttonElement)!=null&&A.contains(H))&&o.state.comboboxState===de.Open)return F.preventDefault(),a.mode===et.Single&&a.value===null&&T(),o.actions.closeCombobox()}),L=ee(F=>{var ne,q,A;let H=(ne=F.relatedTarget)!=null?ne:bt.find(G=>G!==F.currentTarget);(q=o.state.buttonElement)!=null&&q.contains(H)||(A=o.state.optionsElement)!=null&&A.contains(H)||a.disabled||a.immediate&&o.state.comboboxState!==de.Open&&D.microTask(()=>{Ne.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(en.Focus)})}),P=mr(),N=Hl(),{isFocused:z,focusProps:I}=Wa({autoFocus:h}),{isHovered:te,hoverProps:M}=ja({isDisabled:f}),j=we(o,F=>F.optionsElement),Q=d.useMemo(()=>({open:w===de.Open,disabled:f,invalid:a.invalid,hover:te,focus:z,autofocus:h}),[a,te,z,h,f,a.invalid]),W=pr({ref:x,id:l,role:"combobox",type:p,"aria-controls":j==null?void 0:j.id,"aria-expanded":w===de.Open,"aria-activedescendant":we(o,o.selectors.activeDescendantId),"aria-labelledby":P,"aria-describedby":N,"aria-autocomplete":"list",defaultValue:(t=(e=n.defaultValue)!=null?e:a.defaultValue!==void 0?c==null?void 0:c(a.defaultValue):null)!=null?t:a.defaultValue,disabled:f||void 0,autoFocus:h,onCompositionStart:C,onCompositionEnd:O,onKeyDown:R,onChange:b,onFocus:L,onBlur:S},I,M);return Me()({ourProps:W,theirProps:m,slot:Q,defaultTag:Qv,name:"Combobox.Input"})}let Kv="button";function Xv(n,r){let e=_r("Combobox.Button"),t=Hn("Combobox.Button"),[o,a]=d.useState(null),i=Re(r,a,e.actions.setButtonElement),s=d.useId(),{id:l=`headlessui-combobox-button-${s}`,disabled:u=t.disabled||!1,autoFocus:c=!1,...f}=n,[h,p,m]=we(e,b=>[b.comboboxState,b.inputElement,b.optionsElement]),v=vu(p),g=h===de.Open;mu(g,{trigger:o,action:d.useCallback(b=>{if(o!=null&&o.contains(b.target)||p!=null&&p.contains(b.target))return $t.Ignore;let S=b.target.closest('[role="option"]:not([data-disabled])');return Ke(S)?$t.Select(S):m!=null&&m.contains(b.target)?$t.Ignore:$t.Close},[o,p,m]),close:e.actions.closeCombobox,select:e.actions.selectActiveOption});let x=ee(b=>{switch(b.key){case he.Space:case he.Enter:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&Ne.flushSync(()=>e.actions.openCombobox()),v();return;case he.ArrowDown:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Ne.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.First})),v();return;case he.ArrowUp:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Ne.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.Last})),v();return;case he.Escape:if(e.state.comboboxState!==de.Open)return;b.preventDefault(),e.state.optionsElement&&!t.optionsPropsRef.current.static&&b.stopPropagation(),Ne.flushSync(()=>e.actions.closeCombobox()),v();return;default:return}}),E=ee(b=>{b.preventDefault(),!Rl(b.currentTarget)&&(b.button===Pi.Left&&(e.state.comboboxState===de.Open?e.actions.closeCombobox():e.actions.openCombobox()),v())}),w=mr([l]),{isFocusVisible:k,focusProps:D}=Wa({autoFocus:c}),{isHovered:T,hoverProps:$}=ja({isDisabled:u}),{pressed:_,pressProps:C}=Ml({disabled:u}),O=d.useMemo(()=>({open:h===de.Open,active:_||h===de.Open,disabled:u,invalid:t.invalid,value:t.value,hover:T,focus:k}),[t,T,k,_,u,h]),R=pr({ref:i,id:l,type:gu(n,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":h===de.Open,"aria-labelledby":w,disabled:u||void 0,autoFocus:c,onPointerDown:E,onKeyDown:x},D,$,C);return Me()({ourProps:R,theirProps:f,slot:O,defaultTag:Kv,name:"Combobox.Button"})}let Jv="div",Zv=Gt.RenderStrategy|Gt.Static;function eg(n,r){var e,t,o;let a=d.useId(),{id:i=`headlessui-combobox-options-${a}`,hold:s=!1,anchor:l,portal:u=!1,modal:c=!0,transition:f=!1,...h}=n,p=_r("Combobox.Options"),m=Hn("Combobox.Options"),v=Gu(l);v&&(u=!0);let[g,x]=Ju(v),[E,w]=d.useState(null),k=Xu(),D=Re(r,v?g:null,p.actions.setOptionsElement,w),[T,$,_,C,O]=we(p,X=>[X.comboboxState,X.inputElement,X.buttonElement,X.optionsElement,X.activationTrigger]),R=Ft($||_),b=Ft(C),S=jn(),[L,P]=fi(f,E,S!==null?(S&He.Open)===He.Open:T===de.Open);ri(L,$,p.actions.closeCombobox);let N=m.__demoMode?!1:c&&T===de.Open;ci(N,b);let z=m.__demoMode?!1:c&&T===de.Open;ni(z,{allowed:d.useCallback(()=>[$,_,C],[$,_,C])}),fe(()=>{var X;m.optionsPropsRef.current.static=(X=n.static)!=null?X:!1},[m.optionsPropsRef,n.static]),fe(()=>{m.optionsPropsRef.current.hold=s},[m.optionsPropsRef,s]),wm(T===de.Open,{container:C,accept(X){return X.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:X.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(X){X.setAttribute("role","none")}});let I=mr([_==null?void 0:_.id]),te=d.useMemo(()=>({open:T===de.Open,option:void 0}),[T]),M=ee(()=>{p.actions.setActivationTrigger(en.Pointer)}),j=ee(X=>{X.preventDefault(),p.actions.setActivationTrigger(en.Pointer)}),Q=pr(v?k():{},{"aria-labelledby":I,role:"listbox","aria-multiselectable":m.mode===et.Multi?!0:void 0,id:i,ref:D,style:{...h.style,...x,"--input-width":Ua($,!0).width,"--button-width":Ua(_,!0).width},onWheel:O===en.Pointer?void 0:M,onMouseDown:j,...di(P)}),W=L&&T===de.Closed,F=Eo(W,(e=m.virtual)==null?void 0:e.options),ne=Eo(W,m.value),q=ee(X=>m.compare(ne,X)),A=d.useMemo(()=>{if(!m.virtual)return m;if(F===void 0)throw new Error("Missing `options` in virtual mode");return F!==m.virtual.options?{...m,virtual:{...m.virtual,options:F}}:m},[m,F,(t=m.virtual)==null?void 0:t.options]);m.virtual&&Object.assign(h,{children:d.createElement(Cr.Provider,{value:A},d.createElement(zv,{slot:te},h.children))});let H=Me(),G=d.useMemo(()=>m.mode===et.Multi?m:{...m,isSelected:q},[m,q]);return d.createElement(Ni,{enabled:u?n.static||L:!1,ownerDocument:R},d.createElement(Cr.Provider,{value:G},H({ourProps:Q,theirProps:{...h,children:d.createElement(Ov,{freeze:W},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,te):h.children)},slot:te,defaultTag:Jv,features:Zv,visible:L,name:"Combobox.Options"})))}let tg="div";function ng(n,r){var e,t,o;let a=Hn("Combobox.Option"),i=_r("Combobox.Option"),s=d.useId(),{id:l=`headlessui-combobox-option-${s}`,value:u,disabled:c=(o=(t=(e=a.virtual)==null?void 0:e.disabled)==null?void 0:t.call(e,u))!=null?o:!1,order:f=null,...h}=n,[p]=we(i,P=>[P.inputElement]),m=vu(p),v=we(i,d.useCallback(P=>i.selectors.isActive(P,u,l),[u,l])),g=a.isSelected(u),x=d.useRef(null),E=Pt({disabled:c,value:u,domRef:x,order:f}),w=d.useContext(fc),k=Re(r,x,w?w.measureElement:null),D=ee(()=>{i.actions.setIsTyping(!1),i.actions.onChange(u)});fe(()=>i.actions.registerOption(l,E),[E,l]);let T=we(i,d.useCallback(P=>i.selectors.shouldScrollIntoView(P,u,l),[u,l]));fe(()=>{if(T)return rt().requestAnimationFrame(()=>{var P,N;(N=(P=x.current)==null?void 0:P.scrollIntoView)==null||N.call(P,{block:"nearest"})})},[T,x]);let $=ee(P=>{P.preventDefault(),P.button===Pi.Left&&(c||(D(),si()||requestAnimationFrame(()=>m()),a.mode===et.Single&&i.actions.closeCombobox()))}),_=ee(()=>{if(c)return i.actions.goToOption({focus:se.Nothing});let P=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:P})}),C=yu(),O=ee(P=>C.update(P)),R=ee(P=>{if(!C.wasMoved(P)||c||v)return;let N=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:N},en.Pointer)}),b=ee(P=>{C.wasMoved(P)&&(c||v&&(a.optionsPropsRef.current.hold||i.actions.goToOption({focus:se.Nothing})))}),S=d.useMemo(()=>({active:v,focus:v,selected:g,disabled:c}),[v,g,c]),L={id:l,ref:k,role:"option",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:$,onFocus:_,onPointerEnter:O,onMouseEnter:O,onPointerMove:R,onMouseMove:R,onPointerLeave:b,onMouseLeave:b};return Me()({ourProps:L,theirProps:h,slot:S,defaultTag:tg,name:"Combobox.Option"})}let rg=Ce(Uv),og=Ce(Xv),pc=Ce(Gv),ag=uo,hc=Ce(eg),mc=Ce(ng),ig=Object.assign(rg,{Input:pc,Button:og,Label:ag,Options:hc,Option:mc});function sg(n,r=typeof document<"u"?document.defaultView:null,e){let t=br(n,"escape");ui(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===he.Escape&&e(o))})}function lg(){var n;let[r]=d.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[e,t]=d.useState((n=r==null?void 0:r.matches)!=null?n:!1);return fe(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),e}function ug({defaultContainers:n=[],portals:r,mainTreeNode:e}={}){let t=Ft(e),o=ee(()=>{var a,i;let s=[];for(let l of n)l!==null&&(It(l)?s.push(l):"current"in l&&It(l.current)&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=t==null?void 0:t.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&It(l)&&l.id!=="headlessui-portal-root"&&(e&&(l.contains(e)||l.contains((i=e==null?void 0:e.getRootNode())==null?void 0:i.host))||s.some(u=>l.contains(u))||s.push(l));return s});return{resolveContainers:o,contains:ee(a=>o().some(i=>i.contains(a)))}}let vc=d.createContext(null);function gc({children:n,node:r}){let[e,t]=d.useState(null),o=bc(r??e);return d.createElement(vc.Provider,{value:o},n,o===null&&d.createElement(hr,{features:Tn.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=dn(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&It(l)&&l!=null&&l.contains(a)){t(l);break}}}}))}function bc(n=null){var r;return(r=d.useContext(vc))!=null?r:n}function Fi(){let n=d.useRef(!1);return fe(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Or=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Or||{});function cg(){let n=d.useRef(0);return pu(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function yc(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)It(e.current)&&r.add(e.current);return r}let dg="div";var vn=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(vn||{});function fg(n,r){let e=d.useRef(null),t=Re(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;kr()||(s=0);let u=Ft(e);vg(s,{ownerDocument:u});let c=gg(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});bg(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let f=cg(),h=ee(E=>{if(!Ke(e.current))return;let w=e.current;(k=>k())(()=>{Le(f.current,{[Or.Forwards]:()=>{Nn(w,dt.First,{skipElements:[E.relatedTarget,a]})},[Or.Backwards]:()=>{Nn(w,dt.Last,{skipElements:[E.relatedTarget,a]})}})})}),p=br(!!(s&2),"focus-trap#tab-lock"),m=Qt(),v=d.useRef(!1),g={ref:t,onKeyDown(E){E.key=="Tab"&&(v.current=!0,m.requestAnimationFrame(()=>{v.current=!1}))},onBlur(E){if(!(s&4))return;let w=yc(i);Ke(e.current)&&w.add(e.current);let k=E.relatedTarget;Nt(k)&&k.dataset.headlessuiFocusGuard!=="true"&&(wc(w,k)||(v.current?Nn(e.current,Le(f.current,{[Or.Forwards]:()=>dt.Next,[Or.Backwards]:()=>dt.Previous})|dt.WrapAround,{relativeTo:E.target}):Nt(E.target)&&Lt(E.target)))}},x=Me();return d.createElement(d.Fragment,null,p&&d.createElement(hr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Tn.Focusable}),x({ourProps:g,theirProps:l,defaultTag:dg,name:"FocusTrap"}),p&&d.createElement(hr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Tn.Focusable}))}let pg=Ce(fg),hg=Object.assign(pg,{features:vn});function mg(n=!0){let r=d.useRef(bt.slice());return wr(([e],[t])=>{t===!0&&e===!1&&ro(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=bt.slice())},[n,bt,r]),ee(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function vg(n,{ownerDocument:r}){let e=!!(n&8),t=mg(e);wr(()=>{e||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&Lt(t())},[e]),So(()=>{e&&Lt(t())})}function gg(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=br(!!(n&1),"focus-trap#initial-focus"),s=Fi();return wr(()=>{if(n===0)return;if(!i){o!=null&&o.current&&Lt(o.current);return}let l=e.current;l&&ro(()=>{if(!s.current)return;let u=r==null?void 0:r.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===u){a.current=u;return}}else if(l.contains(u)){a.current=u;return}if(t!=null&&t.current)Lt(t.current);else{if(n&16){if(Nn(l,dt.First|dt.AutoFocus)!==oi.Error)return}else if(Nn(l,dt.First)!==oi.Error)return;if(o!=null&&o.current&&(Lt(o.current),(r==null?void 0:r.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=r==null?void 0:r.activeElement})},[o,i,n]),a}function bg(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=Fi(),i=!!(n&4);ui(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=yc(t);Ke(e.current)&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;Ke(c)?wc(l,c)?(o.current=c,Lt(c)):(s.preventDefault(),s.stopPropagation(),Lt(u)):Lt(o.current)},!0)}function wc(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function xc(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:Dc)!==d.Fragment||d.Children.count(n.children)===1}let ko=d.createContext(null);ko.displayName="TransitionContext";var yg=(n=>(n.Visible="visible",n.Hidden="hidden",n))(yg||{});function wg(){let n=d.useContext(ko);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function xg(){let n=d.useContext(_o);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let _o=d.createContext(null);_o.displayName="NestingContext";function Co(n){return"children"in n?Co(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Ec(n,r){let e=Pt(n),t=d.useRef([]),o=Fi(),a=Qt(),i=ee((p,m=Kt.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===p);v!==-1&&(Le(m,{[Kt.Unmount](){t.current.splice(v,1)},[Kt.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!Co(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=ee(p=>{let m=t.current.find(({el:v})=>v===p);return m?m.state!=="visible"&&(m.state="visible"):t.current.push({el:p,state:"visible"}),()=>i(p,Kt.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),f=ee((p,m,v)=>{l.current.splice(0),r&&(r.chains.current[m]=r.chains.current[m].filter(([g])=>g!==p)),r==null||r.chains.current[m].push([p,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[m].push([p,new Promise(g=>{Promise.all(c.current[m].map(([x,E])=>E)).then(()=>g())})]),m==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(m)):v(m)}),h=ee((p,m,v)=>{Promise.all(c.current[m].splice(0).map(([g,x])=>x)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(m))});return d.useMemo(()=>({children:t,register:s,unregister:i,onStart:f,onStop:h,wait:u,chains:c}),[s,i,t,f,h,c,u])}let Dc=d.Fragment,Sc=Gt.RenderStrategy;function Eg(n,r){var e,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:p,leaveFrom:m,leaveTo:v,...g}=n,[x,E]=d.useState(null),w=d.useRef(null),k=xc(n),D=Re(...k?[w,r,E]:r===null?[]:[r]),T=(e=g.unmount)==null||e?Kt.Unmount:Kt.Hidden,{show:$,appear:_,initial:C}=wg(),[O,R]=d.useState($?"visible":"hidden"),b=xg(),{register:S,unregister:L}=b;fe(()=>S(w),[S,w]),fe(()=>{if(T===Kt.Hidden&&w.current){if($&&O!=="visible"){R("visible");return}return Le(O,{hidden:()=>L(w),visible:()=>S(w)})}},[O,w,S,L,$,T]);let P=kr();fe(()=>{if(k&&P&&O==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,O,P,k]);let N=C&&!_,z=_&&$&&C,I=d.useRef(!1),te=Ec(()=>{I.current||(R("hidden"),L(w))},b),M=ee(A=>{I.current=!0;let H=A?"enter":"leave";te.onStart(w,H,G=>{G==="enter"?a==null||a():G==="leave"&&(s==null||s())})}),j=ee(A=>{let H=A?"enter":"leave";I.current=!1,te.onStop(w,H,G=>{G==="enter"?i==null||i():G==="leave"&&(l==null||l())}),H==="leave"&&!Co(te)&&(R("hidden"),L(w))});d.useEffect(()=>{k&&o||(M($),j($))},[$,k,o]);let Q=!(!o||!k||!P||N),[,W]=fi(Q,x,$,{start:M,end:j}),F=Xt({ref:D,className:((t=Ba(g.className,z&&u,z&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&p,W.leave&&!W.closed&&m,W.leave&&W.closed&&v,!W.transition&&$&&h))==null?void 0:t.trim())||void 0,...di(W)}),ne=0;O==="visible"&&(ne|=He.Open),O==="hidden"&&(ne|=He.Closed),$&&O==="hidden"&&(ne|=He.Opening),!$&&O==="visible"&&(ne|=He.Closing);let q=Me();return d.createElement(_o.Provider,{value:te},d.createElement(Ti,{value:ne},q({ourProps:F,theirProps:g,defaultTag:Dc,features:Sc,visible:O==="visible",name:"Transition.Child"})))}function Dg(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=xc(n),l=Re(...s?[i,r]:r===null?[]:[r]);kr();let u=jn();if(e===void 0&&u!==null&&(e=(u&He.Open)===He.Open),e===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=d.useState(e?"visible":"hidden"),h=Ec(()=>{e||f("hidden")}),[p,m]=d.useState(!0),v=d.useRef([e]);fe(()=>{p!==!1&&v.current[v.current.length-1]!==e&&(v.current.push(e),m(!1))},[v,e]);let g=d.useMemo(()=>({show:e,appear:t,initial:p}),[e,t,p]);fe(()=>{e?f("visible"):!Co(h)&&i.current!==null&&f("hidden")},[e,h]);let x={unmount:o},E=ee(()=>{var D;p&&m(!1),(D=n.beforeEnter)==null||D.call(n)}),w=ee(()=>{var D;p&&m(!1),(D=n.beforeLeave)==null||D.call(n)}),k=Me();return d.createElement(_o.Provider,{value:h},d.createElement(ko.Provider,{value:g},k({ourProps:{...x,as:d.Fragment,children:d.createElement(kc,{ref:l,...x,...a,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:Sc,visible:c==="visible",name:"Transition"})))}function Sg(n,r){let e=d.useContext(ko)!==null,t=jn()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement($i,{ref:r,...n}):d.createElement(kc,{ref:r,...n}))}let $i=Ce(Dg),kc=Ce(Eg),Ai=Ce(Sg),_c=Object.assign($i,{Child:Ai,Root:$i});var kg=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(kg||{}),_g=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(_g||{});let Cg={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},Yi=d.createContext(null);Yi.displayName="DialogContext";function Oo(n){let r=d.useContext(Yi);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Oo),e}return r}function Og(n,r){return Le(r.type,Cg,n,r)}let Cc=Ce(function(n,r){let e=d.useId(),{id:t=`headlessui-dialog-${e}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:u=!1,unmount:c=!1,...f}=n,h=d.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(h.current||(h.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=jn();o===void 0&&p!==null&&(o=(p&He.Open)===He.Open);let m=d.useRef(null),v=Re(m,r),g=Ft(m),x=o?0:1,[E,w]=d.useReducer(Og,{titleId:null,descriptionId:null,panelRef:d.createRef()}),k=ee(()=>a(!1)),D=ee(W=>w({type:0,id:W})),T=kr()?x===0:!1,[$,_]=Rv(),C={get current(){var W;return(W=E.panelRef.current)!=null?W:m.current}},O=bc(),{resolveContainers:R}=ug({mainTreeNode:O,portals:$,defaultContainers:[C]}),b=p!==null?(p&He.Closing)===He.Closing:!1;ni(u||b?!1:T,{allowed:ee(()=>{var W,F;return[(F=(W=m.current)==null?void 0:W.closest("[data-headlessui-portal]"))!=null?F:null]}),disallowed:ee(()=>{var W;return[(W=O==null?void 0:O.closest("body > *:not(#headlessui-portal-root)"))!=null?W:null]})});let S=In.get(null);fe(()=>{if(T)return S.actions.push(t),()=>S.actions.pop(t)},[S,t,T]);let L=we(S,d.useCallback(W=>S.selectors.isTop(W,t),[S,t]));li(L,R,W=>{W.preventDefault(),k()}),sg(L,g==null?void 0:g.defaultView,W=>{W.preventDefault(),W.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),ci(u||b?!1:T,g,R),ri(T,m,k);let[P,N]=gh(),z=d.useMemo(()=>[{dialogState:x,close:k,setTitleId:D,unmount:c},E],[x,E,k,D,c]),I=d.useMemo(()=>({open:x===0}),[x]),te={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:x===0?!0:void 0,"aria-labelledby":E.titleId,"aria-describedby":P,unmount:c},M=!lg(),j=vn.None;T&&!u&&(j|=vn.RestoreFocus,j|=vn.TabLock,l&&(j|=vn.AutoFocus),M&&(j|=vn.InitialFocus));let Q=Me();return d.createElement(Mv,null,d.createElement(oc,{force:!0},d.createElement(Ni,null,d.createElement(Yi.Provider,{value:z},d.createElement(sc,{target:m},d.createElement(oc,{force:!1},d.createElement(N,{slot:I},d.createElement(_,null,d.createElement(hg,{initialFocus:i,initialFocusFallback:m,containers:R,features:j},d.createElement(kh,{value:k},Q({ourProps:te,theirProps:f,slot:I,defaultTag:Mg,features:Tg,visible:x===0,name:"Dialog"})))))))))))}),Mg="div",Tg=Gt.RenderStrategy|Gt.Static;function Pg(n,r){let{transition:e=!1,open:t,...o}=n,a=jn(),i=n.hasOwnProperty("open")||a!==null,s=n.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(t!==void 0||e)&&!o.static?d.createElement(gc,null,d.createElement(_c,{show:t,transition:e,unmount:o.unmount},d.createElement(Cc,{ref:r,...o}))):d.createElement(gc,null,d.createElement(Cc,{ref:r,open:t,...o}))}let Ig="div";function Ng(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Oo("Dialog.Panel"),u=Re(r,l.panelRef),c=d.useMemo(()=>({open:i===0}),[i]),f=ee(g=>{g.stopPropagation()}),h={ref:u,id:t,onClick:f},p=o?Ai:d.Fragment,m=o?{unmount:s}:{},v=Me();return d.createElement(p,{...m},v({ourProps:h,theirProps:a,slot:c,defaultTag:Ig,name:"Dialog.Panel"}))}let Lg="div";function Fg(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Oo("Dialog.Backdrop"),i=d.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0},l=e?Ai:d.Fragment,u=e?{unmount:a}:{},c=Me();return d.createElement(l,{...u},c({ourProps:s,theirProps:t,slot:i,defaultTag:Lg,name:"Dialog.Backdrop"}))}let $g="h2";function Ag(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Oo("Dialog.Title"),s=Re(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=d.useMemo(()=>({open:a===0}),[a]),u={ref:s,id:t};return Me()({ourProps:u,theirProps:o,slot:l,defaultTag:$g,name:"Dialog.Title"})}let Yg=Ce(Pg),Oc=Ce(Ng);Ce(Fg);let Mc=Ce(Ag),Mr=Object.assign(Yg,{Panel:Oc,Title:Mc,Description:Bl});function Rg(n,r){let e=d.useRef({left:0,top:0});if(fe(()=>{if(!r)return;let o=r.getBoundingClientRect();o&&(e.current=o)},[n,r]),r==null||!n||r===document.activeElement)return!1;let t=r.getBoundingClientRect();return t.top!==e.current.top||t.left!==e.current.left}let Tc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Pc(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!Ke(o))return t;let a=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),a=!0;let i=a?(e=o.innerText)!=null?e:"":t;return Tc.test(i)&&(i=i.replace(Tc,"")),i}function jg(n){let r=n.getAttribute("aria-label");if(typeof r=="string")return r.trim();let e=n.getAttribute("aria-labelledby");if(e){let t=e.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():Pc(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return Pc(n).trim()}function Wg(n){let r=d.useRef(""),e=d.useRef("");return ee(()=>{let t=n.current;if(!t)return"";let o=t.innerText;if(r.current===o)return e.current;let a=jg(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var Hg=Object.defineProperty,Bg=(n,r,e)=>r in n?Hg(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Ic=(n,r,e)=>(Bg(n,typeof r!="symbol"?r+"":r,e),e),Ve=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Ve||{}),yt=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(yt||{}),Ri=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(Ri||{}),Nc=(n=>(n[n.OpenListbox=0]="OpenListbox",n[n.CloseListbox=1]="CloseListbox",n[n.GoToOption=2]="GoToOption",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterOptions=5]="RegisterOptions",n[n.UnregisterOptions=6]="UnregisterOptions",n[n.SetButtonElement=7]="SetButtonElement",n[n.SetOptionsElement=8]="SetOptionsElement",n[n.SortOptions=9]="SortOptions",n))(Nc||{});function Lc(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=ii(r(n.options.slice()),a=>a.dataRef.current.domRef.current),o=e?t.indexOf(e):null;return o===-1&&(o=null),{options:t,activeOptionIndex:o}}let Vg={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,pendingFocus:{focus:se.Nothing},listboxState:1,__demoMode:!1}},0(n,r){if(n.dataRef.current.disabled||n.listboxState===0)return n;let e=n.activeOptionIndex,{isSelected:t}=n.dataRef.current,o=n.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(e=o),{...n,pendingFocus:r.focus,listboxState:0,activeOptionIndex:e,__demoMode:!1}},2(n,r){var e,t,o,a,i;if(n.dataRef.current.disabled||n.listboxState===1)return n;let s={...n,searchQuery:"",activationTrigger:(e=r.trigger)!=null?e:1,__demoMode:!1};if(r.focus===se.Nothing)return{...s,activeOptionIndex:null};if(r.focus===se.Specific)return{...s,activeOptionIndex:n.options.findIndex(c=>c.id===r.id)};if(r.focus===se.Previous){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,h=Wn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=n.options[h].dataRef.current.domRef;if(((t=f.current)==null?void 0:t.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:h}}}}else if(r.focus===se.Next){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,h=Wn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=n.options[h].dataRef.current.domRef;if(((a=f.current)==null?void 0:a.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeOptionIndex:h}}}}let l=Lc(n),u=Wn(r,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...s,...l,activeOptionIndex:u}},3:(n,r)=>{if(n.dataRef.current.disabled||n.listboxState===1)return n;let e=n.searchQuery!==""?0:1,t=n.searchQuery+r.value.toLowerCase(),o=(n.activeOptionIndex!==null?n.options.slice(n.activeOptionIndex+e).concat(n.options.slice(0,n.activeOptionIndex+e)):n.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(t))}),a=o?n.options.indexOf(o):-1;return a===-1||a===n.activeOptionIndex?{...n,searchQuery:t}:{...n,searchQuery:t,activeOptionIndex:a,activationTrigger:1}},4(n){return n.dataRef.current.disabled||n.listboxState===1||n.searchQuery===""?n:{...n,searchQuery:""}},5:(n,r)=>{let e=n.options.concat(r.options),t=n.activeOptionIndex;if(n.pendingFocus.focus!==se.Nothing&&(t=Wn(n.pendingFocus,{resolveItems:()=>e,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),n.activeOptionIndex===null){let{isSelected:o}=n.dataRef.current;if(o){let a=e.findIndex(i=>o==null?void 0:o(i.dataRef.current.value));a!==-1&&(t=a)}}return{...n,options:e,activeOptionIndex:t,pendingFocus:{focus:se.Nothing},pendingShouldSort:!0}},6:(n,r)=>{let e=n.options,t=[],o=new Set(r.options);for(let[a,i]of e.entries())if(o.has(i.id)&&(t.push(a),o.delete(i.id),o.size===0))break;if(t.length>0){e=e.slice();for(let a of t.reverse())e.splice(a,1)}return{...n,options:e,activationTrigger:1}},7:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},8:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element},9:n=>n.pendingShouldSort?{...n,...Lc(n),pendingShouldSort:!1}:n},zg=class ff extends Ga{constructor(r){super(r),Ic(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Le(a,{0:()=>t==null?void 0:t(e),1:()=>{let s=i.slice(),l=s.findIndex(u=>o(u,e));return l===-1?s.push(e):s.splice(l,1),t==null?void 0:t(s)}})},registerOption:Xa(()=>{let e=[],t=new Set;return[(o,a)=>{t.has(a)||(t.add(a),e.push({id:o,dataRef:a}))},()=>(t.clear(),this.send({type:5,options:e.splice(0)}))]}),unregisterOption:Xa(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:6,options:e.splice(0)})}]}),goToOption:Xa(()=>{let e=null;return[(t,o)=>{e={type:2,...t,trigger:o}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{if(this.state.activeOptionIndex!==null){let{dataRef:e,id:t}=this.state.options[this.state.activeOptionIndex];this.actions.onChange(e.current.value),this.send({type:2,focus:se.Specific,id:t})}},selectOption:e=>{let t=this.state.options.find(o=>o.id===e);t&&this.actions.onChange(t.dataRef.current.value)},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:7,element:e})},setOptionsElement:e=>{this.send({type:8,element:e})}}),Ic(this,"selectors",{activeDescendantId(e){var t;let o=e.activeOptionIndex,a=e.options;return o===null||(t=a[o])==null?void 0:t.id},isActive(e,t){var o;let a=e.activeOptionIndex,i=e.options;return a!==null?((o=i[a])==null?void 0:o.id)===t:!1},shouldScrollIntoView(e,t){return e.__demoMode||e.listboxState!==0||e.activationTrigger===0?!1:this.isActive(e,t)}}),this.on(5,()=>{requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=In.get(null);this.disposables.add(t.on(Ja.Push,o=>{!t.selectors.isTop(o,e)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:r,__demoMode:e=!1}){return new ff({id:r,dataRef:{current:{}},listboxState:e?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:se.Nothing},__demoMode:e})}reduce(r,e){return Le(e.type,Vg,r,e)}};const Fc=d.createContext(null);function ji(n){let r=d.useContext(Fc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,$c),e}return r}function $c({id:n,__demoMode:r=!1}){let e=d.useMemo(()=>zg.new({id:n,__demoMode:r}),[]);return So(()=>e.dispose()),e}let Mo=d.createContext(null);Mo.displayName="ListboxDataContext";function Tr(n){let r=d.useContext(Mo);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Tr),e}return r}let qg=d.Fragment;function Ug(n,r){let e=d.useId(),t=oo(),{value:o,defaultValue:a,form:i,name:s,onChange:l,by:u,invalid:c=!1,disabled:f=t||!1,horizontal:h=!1,multiple:p=!1,__demoMode:m=!1,...v}=n;const g=h?"horizontal":"vertical";let x=Re(r),E=Il(a),[w=p?[]:void 0,k]=Pl(o,l,E),D=$c({id:e,__demoMode:m}),T=d.useRef({static:!1,hold:!1}),$=d.useRef(new Map),_=Jl(u),C=d.useCallback(Q=>Le(O.mode,{[yt.Multi]:()=>w.some(W=>_(W,Q)),[yt.Single]:()=>_(w,Q)}),[w]),O=d.useMemo(()=>({value:w,disabled:f,invalid:c,mode:p?yt.Multi:yt.Single,orientation:g,onChange:k,compare:_,isSelected:C,optionsPropsRef:T,listRef:$}),[w,f,c,p,g,k,_,C,T,$]);fe(()=>{D.state.dataRef.current=O},[O]);let R=we(D,Q=>Q.listboxState),b=In.get(null),S=we(b,d.useCallback(Q=>b.selectors.isTop(Q,e),[b,e])),[L,P]=we(D,Q=>[Q.buttonElement,Q.optionsElement]);li(S,[L,P],(Q,W)=>{D.send({type:Nc.CloseListbox}),du(W,ai.Loose)||(Q.preventDefault(),L==null||L.focus())});let N=d.useMemo(()=>({open:R===Ve.Open,disabled:f,invalid:c,value:w}),[R,f,c,w]),[z,I]=zl({inherit:!0}),te={ref:x},M=d.useCallback(()=>{if(E!==void 0)return k==null?void 0:k(E)},[k,E]),j=Me();return d.createElement(I,{value:z,props:{htmlFor:L==null?void 0:L.id},slot:{open:R===Ve.Open,disabled:f}},d.createElement(ec,null,d.createElement(Fc.Provider,{value:D},d.createElement(Mo.Provider,{value:O},d.createElement(Ti,{value:Le(R,{[Ve.Open]:He.Open,[Ve.Closed]:He.Closed})},s!=null&&w!=null&&d.createElement($l,{disabled:f,data:{[s]:w},form:i,onReset:M}),j({ourProps:te,theirProps:v,slot:N,defaultTag:qg,name:"Listbox"}))))))}let Qg="button";function Gg(n,r){let e=d.useId(),t=za(),o=Tr("Listbox.Button"),a=ji("Listbox.Button"),{id:i=t||`headlessui-listbox-button-${e}`,disabled:s=o.disabled||!1,autoFocus:l=!1,...u}=n,c=Re(r,Ku(),a.actions.setButtonElement),f=kv(),[h,p,m]=we(a,P=>[P.listboxState,P.buttonElement,P.optionsElement]),v=h===Ve.Open;mu(v,{trigger:p,action:d.useCallback(P=>{if(p!=null&&p.contains(P.target))return $t.Ignore;let N=P.target.closest('[role="option"]:not([data-disabled])');return Ke(N)?$t.Select(N):m!=null&&m.contains(P.target)?$t.Ignore:$t.Close},[p,m]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let g=ee(P=>{switch(P.key){case he.Enter:oh(P.currentTarget);break;case he.Space:case he.ArrowDown:P.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.First});break;case he.ArrowUp:P.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.Last});break}}),x=ee(P=>{switch(P.key){case he.Space:P.preventDefault();break}}),E=ee(P=>{var N;if(P.button===0){if(Rl(P.currentTarget))return P.preventDefault();a.state.listboxState===Ve.Open?(Ne.flushSync(()=>a.actions.closeListbox()),(N=a.state.buttonElement)==null||N.focus({preventScroll:!0})):(P.preventDefault(),a.actions.openListbox({focus:se.Nothing}))}}),w=ee(P=>P.preventDefault()),k=mr([i]),D=Hl(),{isFocusVisible:T,focusProps:$}=Wa({autoFocus:l}),{isHovered:_,hoverProps:C}=ja({isDisabled:s}),{pressed:O,pressProps:R}=Ml({disabled:s}),b=d.useMemo(()=>({open:h===Ve.Open,active:O||h===Ve.Open,disabled:s,invalid:o.invalid,value:o.value,hover:_,focus:T,autofocus:l}),[h,o.value,s,_,T,O,o.invalid,l]),S=we(a,P=>P.listboxState===Ve.Open),L=pr(f(),{ref:c,id:i,type:gu(n,p),"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":S,"aria-labelledby":k,"aria-describedby":D,disabled:s||void 0,autoFocus:l,onKeyDown:g,onKeyUp:x,onKeyPress:w,onPointerDown:E},$,C,R);return Me()({ourProps:L,theirProps:u,slot:b,defaultTag:Qg,name:"Listbox.Button"})}let Ac=d.createContext(!1),Kg="div",Xg=Gt.RenderStrategy|Gt.Static;function Jg(n,r){let e=d.useId(),{id:t=`headlessui-listbox-options-${e}`,anchor:o,portal:a=!1,modal:i=!0,transition:s=!1,...l}=n,u=Gu(o),[c,f]=d.useState(null);u&&(a=!0);let h=Tr("Listbox.Options"),p=ji("Listbox.Options"),[m,v,g,x]=we(p,A=>[A.listboxState,A.buttonElement,A.optionsElement,A.__demoMode]),E=Ft(v),w=Ft(g),k=jn(),[D,T]=fi(s,c,k!==null?(k&He.Open)===He.Open:m===Ve.Open);ri(D,v,p.actions.closeListbox);let $=x?!1:i&&m===Ve.Open;ci($,w);let _=x?!1:i&&m===Ve.Open;ni(_,{allowed:d.useCallback(()=>[v,g],[v,g])});let C=m!==Ve.Open,O=Rg(C,v)?!1:D,R=D&&m===Ve.Closed,b=Eo(R,h.value),S=ee(A=>h.compare(b,A)),L=we(p,A=>{var H;if(u==null||!((H=u==null?void 0:u.to)!=null&&H.includes("selection")))return null;let G=A.options.findIndex(X=>S(X.dataRef.current.value));return G===-1&&(G=0),G}),P=(()=>{if(u==null)return;if(L===null)return{...u,inner:void 0};let A=Array.from(h.listRef.current.values());return{...u,inner:{listRef:{current:A},index:L}}})(),[N,z]=Ju(P),I=Xu(),te=Re(r,u?N:null,p.actions.setOptionsElement,f),M=Qt();d.useEffect(()=>{var A;let H=g;H&&m===Ve.Open&&H!==((A=dn(H))==null?void 0:A.activeElement)&&(H==null||H.focus({preventScroll:!0}))},[m,g]);let j=ee(A=>{var H,G;switch(M.dispose(),A.key){case he.Space:if(p.state.searchQuery!=="")return A.preventDefault(),A.stopPropagation(),p.actions.search(A.key);case he.Enter:if(A.preventDefault(),A.stopPropagation(),p.state.activeOptionIndex!==null){let{dataRef:X}=p.state.options[p.state.activeOptionIndex];p.actions.onChange(X.current.value)}h.mode===yt.Single&&(Ne.flushSync(()=>p.actions.closeListbox()),(H=p.state.buttonElement)==null||H.focus({preventScroll:!0}));break;case Le(h.orientation,{vertical:he.ArrowDown,horizontal:he.ArrowRight}):return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Next});case Le(h.orientation,{vertical:he.ArrowUp,horizontal:he.ArrowLeft}):return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Previous});case he.Home:case he.PageUp:return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.First});case he.End:case he.PageDown:return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Last});case he.Escape:A.preventDefault(),A.stopPropagation(),Ne.flushSync(()=>p.actions.closeListbox()),(G=p.state.buttonElement)==null||G.focus({preventScroll:!0});return;case he.Tab:A.preventDefault(),A.stopPropagation(),Ne.flushSync(()=>p.actions.closeListbox()),om(p.state.buttonElement,A.shiftKey?dt.Previous:dt.Next);break;default:A.key.length===1&&(p.actions.search(A.key),M.setTimeout(()=>p.actions.clearSearch(),350));break}}),Q=we(p,A=>{var H;return(H=A.buttonElement)==null?void 0:H.id}),W=d.useMemo(()=>({open:m===Ve.Open}),[m]),F=pr(u?I():{},{id:t,ref:te,"aria-activedescendant":we(p,p.selectors.activeDescendantId),"aria-multiselectable":h.mode===yt.Multi?!0:void 0,"aria-labelledby":Q,"aria-orientation":h.orientation,onKeyDown:j,role:"listbox",tabIndex:m===Ve.Open?0:void 0,style:{...l.style,...z,"--button-width":Ua(v,!0).width},...di(T)}),ne=Me(),q=d.useMemo(()=>h.mode===yt.Multi?h:{...h,isSelected:S},[h,S]);return d.createElement(Ni,{enabled:a?n.static||D:!1,ownerDocument:E},d.createElement(Mo.Provider,{value:q},ne({ourProps:F,theirProps:l,slot:W,defaultTag:Kg,features:Xg,visible:O,name:"Listbox.Options"})))}let Zg="div";function eb(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(Ac)===!0,l=Tr("Listbox.Option"),u=ji("Listbox.Option"),c=we(u,O=>u.selectors.isActive(O,t)),f=l.isSelected(a),h=d.useRef(null),p=Wg(h),m=Pt({disabled:o,value:a,domRef:h,get textValue(){return p()}}),v=Re(r,h,O=>{O?l.listRef.current.set(t,O):l.listRef.current.delete(t)}),g=we(u,O=>u.selectors.shouldScrollIntoView(O,t));fe(()=>{if(g)return rt().requestAnimationFrame(()=>{var O,R;(R=(O=h.current)==null?void 0:O.scrollIntoView)==null||R.call(O,{block:"nearest"})})},[g,h]),fe(()=>{if(!s)return u.actions.registerOption(t,m),()=>u.actions.unregisterOption(t)},[m,t,s]);let x=ee(O=>{var R;if(o)return O.preventDefault();u.actions.onChange(a),l.mode===yt.Single&&(Ne.flushSync(()=>u.actions.closeListbox()),(R=u.state.buttonElement)==null||R.focus({preventScroll:!0}))}),E=ee(()=>{if(o)return u.actions.goToOption({focus:se.Nothing});u.actions.goToOption({focus:se.Specific,id:t})}),w=yu(),k=ee(O=>{w.update(O),!o&&(c||u.actions.goToOption({focus:se.Specific,id:t},Ri.Pointer))}),D=ee(O=>{w.wasMoved(O)&&(o||c||u.actions.goToOption({focus:se.Specific,id:t},Ri.Pointer))}),T=ee(O=>{w.wasMoved(O)&&(o||c&&u.actions.goToOption({focus:se.Nothing}))}),$=d.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&s}),[c,f,o,s]),_=s?{}:{id:t,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:E,onPointerEnter:k,onMouseEnter:k,onPointerMove:D,onMouseMove:D,onPointerLeave:T,onMouseLeave:T},C=Me();return!f&&s?null:C({ourProps:_,theirProps:i,slot:$,defaultTag:Zg,name:"Listbox.Option"})}let tb=d.Fragment;function nb(n,r){let{options:e,placeholder:t,...o}=n,a={ref:Re(r)},i=Tr("ListboxSelectedOption"),s=d.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===yt.Multi&&Array.isArray(i.value)&&i.value.length===0,u=Me();return d.createElement(Ac.Provider,{value:!0},u({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:tb,name:"ListboxSelectedOption"}))}let rb=Ce(Ug),Yc=Ce(Gg),ob=uo,Rc=Ce(Jg),jc=Ce(eb),ab=Ce(nb),ib=Object.assign(rb,{Button:Yc,Label:ob,Options:Rc,Option:jc,SelectedOption:ab});const sb=n=>{const{isOpen:r,setIsOpen:e,title:t,image:o,description:a,confirm:i,cancel:s,className:l}=n;return Y.jsx(_c,{show:r,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Y.jsxs(Mr,{onClose:()=>e(!1),className:"relative z-50 focus:outline-hidden",children:[Y.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),Y.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:Y.jsxs(Oc,{className:tt(l==null?void 0:l.popup,"ja-break-all flex w-[90vw] max-w-[300px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]"),children:[Y.jsxs("div",{className:"flex flex-col gap-[8px]",children:[t&&Y.jsx(Mc,{className:tt(l==null?void 0:l.title,"global-break-all text-[18px] leading-[26px] font-bold text-black"),children:t}),o&&Y.jsx("img",{className:l==null?void 0:l.image,src:o.url,alt:o.alt}),a&&a!==""&&Y.jsx(Bl,{className:tt(l==null?void 0:l.description,"text-petnow-grey-tertiary text-[16px] leading-[24px] break-all"),children:a})]}),Y.jsxs("div",{className:"flex flex-col gap-[8px]",children:[Y.jsx("button",{className:"bg-petnow-orange-primary sm:hover:bg-petnow-orange-40 w-full cursor-pointer rounded-[12px] py-[12px] text-[14px] leading-[22px] font-bold text-white transition duration-200",onClick:i.onClick,children:i.text}),s&&Y.jsx("button",{onClick:()=>e(!1),className:"bg-background-tertiary sm:hover:bg-petnow-grey-90 text-petnow-grey-tertiary w-full cursor-pointer rounded-[12px] py-[12px] text-[14px] leading-[22px] font-bold transition duration-200",children:s.text})]})]})})]})})},lb=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>Y.jsxs("label",{htmlFor:r,className:"relative inline-flex cursor-pointer items-center",children:[Y.jsx("input",{type:"checkbox",disabled:o,checked:a,id:r,name:e,className:"peer sr-only",onChange:t}),Y.jsx("div",{className:tt(n,"bg-petnow-grey-primary peer-checked:bg-petnow-orange-primary h-[32px] w-[52px] rounded-full duration-[250ms] peer-focus:outline-none after:absolute after:start-[2px] after:top-[3px] after:size-[26px] after:rounded-full after:bg-white after:shadow-[0_3px_8px_0_rgba(0,0,0,0.15)] after:transition-all after:duration-[250ms] after:content-[''] peer-checked:after:translate-x-[calc(100%-4px)] peer-checked:after:border-white",o&&"cursor-not-allowed opacity-50")})]});var Wc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hc=d.createContext&&d.createContext(Wc),ub=["attr","size","title"];function cb(n,r){if(n==null)return{};var e=db(n,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function db(n,r){if(n==null)return{};var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){if(r.indexOf(t)>=0)continue;e[t]=n[t]}return e}function To(){return To=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},To.apply(this,arguments)}function Bc(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function Po(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?Bc(Object(e),!0).forEach(function(t){fb(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Bc(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function fb(n,r,e){return r=pb(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function pb(n){var r=hb(n,"string");return typeof r=="symbol"?r:r+""}function hb(n,r){if(typeof n!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,r);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function Vc(n){return n&&n.map((r,e)=>d.createElement(r.tag,Po({key:e},r.attr),Vc(r.child)))}function Pr(n){return r=>d.createElement(mb,To({attr:Po({},n.attr)},r),Vc(n.child))}function mb(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=cb(n,ub),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",To({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:Po(Po({color:n.color||e.color},e.style),n.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&d.createElement("title",null,a),n.children)};return Hc!==void 0?d.createElement(Hc.Consumer,null,e=>r(e)):r(Wc)}function vb(n){return Pr({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"},child:[]}]})(n)}function zc(n){return Pr({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}const gb=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return Y.jsxs(Y.Fragment,{children:[Y.jsx(bb,{isOpen:o,setIsOpen:a,termImageUrl:t}),Y.jsxs("div",{className:"inline-flex items-center",children:[Y.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[Y.jsx("input",{type:"checkbox",className:"before:content[''] border-petnow-grey-primary peer bg-petnow-grey-primary checked:border-petnow-orange-primary checked:bg-petnow-orange-primary checked:before:bg-petnow-orange-primary relative size-6 cursor-pointer appearance-none rounded-xl border transition-all before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity",id:r,checked:n,onChange:i=>{e(i.target.checked)}}),Y.jsx("span",{className:"text-petnow-grey-secondary pointer-events-none absolute top-2/4 left-2/4 -translate-x-2/4 -translate-y-2/4 transition peer-checked:text-white",children:Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:Y.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),r&&Y.jsxs("div",{className:"flex items-center",children:[Y.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),Y.jsx(vb,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},bb=({isOpen:n,setIsOpen:r,termImageUrl:e})=>Y.jsxs(Mr,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[Y.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),Y.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:Y.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:Y.jsxs(Mr.Panel,{className:"mx-auto flex max-w-sm flex-col items-center rounded-sm bg-white",children:[Y.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:Y.jsx(zc,{size:20,className:"mr-2",onClick:()=>r(!1)})}),Y.jsx("img",{src:e,alt:"약관동의 이미지"})]})})})]});var Wi=function(n,r){return Wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},Wi(n,r)},Bn=function(){return Bn=Object.assign||function(n){for(var r,e=1,t=arguments.length;e<t;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},Bn.apply(this,arguments)};function yb(n,r){var e={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0&&(e[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(t=Object.getOwnPropertySymbols(n);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(e[t[o]]=n[t[o]])}return e}var Hi,qc="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",wb=(Hi=null,function(n){return n===void 0&&(n=qc),Hi||(Hi=new Promise(function(r,e){var t=document.createElement("script");t.src=n,t.onload=function(){var o;if(!((o=window==null?void 0:window.daum)===null||o===void 0)&&o.Postcode)return r(window.daum.Postcode);e(new Error("Script is loaded successfully, but cannot find Postcode module. Check your scriptURL property."))},t.onerror=function(o){return e(o)},t.id="daum_postcode_script",document.body.appendChild(t)}))}),xb=d.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),Eb={width:"100%",height:400},Db={scriptUrl:qc,errorMessage:xb,autoClose:!0},Sb=function(n){function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.mounted=!1,e.wrap=d.createRef(),e.state={hasError:!1,completed:!1},e.initiate=function(t){if(e.wrap.current){var o=e.props;o.scriptUrl,o.className,o.style;var a=o.defaultQuery,i=o.autoClose;o.errorMessage;var s=o.onComplete,l=o.onClose,u=o.onResize,c=o.onSearch,f=yb(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new t(Bn(Bn({},f),{oncomplete:function(h){s&&s(h),e.setState({completed:!0})},onsearch:c,onresize:u,onclose:l,width:"100%",height:"100%"})).embed(e.wrap.current,{q:a,autoClose:i})}},e.onError=function(t){console.error(t),e.setState({hasError:!0})},e}return function(e,t){function o(){this.constructor=e}Wi(e,t),e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}(r,n),r.prototype.componentDidMount=function(){var e=this.initiate,t=this.onError,o=this.props.scriptUrl;o&&(this.mounted||(wb(o).then(e).catch(t),this.mounted=!0))},r.prototype.render=function(){var e=this.props,t=e.className,o=e.style,a=e.errorMessage,i=e.autoClose,s=this.state,l=s.hasError,u=s.completed;return i===!0&&u===!0?null:d.createElement("div",{ref:this.wrap,className:t,style:Bn(Bn({},Eb),o)},l&&a)},r.defaultProps=Db,r}(d.Component);const kb=({label:n,value:r,onFrontChange:e,onBackChange:t,onPostalCodeChange:o,disabled:a})=>{const[i,s]=d.useState(!1),l=f=>{let h=f.address,p="";f.addressType==="R"&&(f.bname!==""&&(p+=f.bname),f.buildingName!==""&&(p+=p!==""?`, ${f.buildingName}`:f.buildingName),h+=p!==""?` (${p})`:""),e(h),o&&o(f.zonecode),s(!1)},u=()=>{s(!0)},c=()=>r.front?r.front:Y.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return Y.jsxs(Y.Fragment,{children:[Y.jsx(_b,{isOpen:i,setIsOpen:s,handleComplete:l}),Y.jsxs("div",{className:"text-petnow-grey-tertiary",children:[Y.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),Y.jsxs("div",{className:"relative flex flex-col",children:[Y.jsx("div",{className:`bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full cursor-pointer overflow-hidden rounded-xl p-4 text-base whitespace-nowrap focus:outline-hidden ${a&&"opacity-50"}`,onClick:u,children:c()}),Y.jsx("input",{disabled:!r.front||a,value:r.back,type:"text",name:n,id:n,placeholder:"상세 주소를 입력해주세요.",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full rounded-xl p-4 text-base focus:outline-hidden disabled:opacity-50",autoComplete:"off",onChange:f=>t(f.target.value)})]})]})]})},_b=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return Y.jsx(Mr,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:Y.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:Y.jsx(Mr.Panel,{children:Y.jsxs("div",{children:[Y.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>e(!1),children:Y.jsx(zc,{size:24,onClick:()=>e(!1)})}),Y.jsx(Sb,{onComplete:t,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})};function Cb(n){return Pr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(n)}function Ob(n){return Pr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z"},child:[]}]})(n)}const Mb=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return Y.jsxs("div",{className:"my-2.5 flex w-full cursor-pointer flex-col justify-center rounded-xl px-4 pt-8 shadow-[0_2px_8px_0_rgba(0,0,0,0.08)] md:rounded-2xl md:pt-10",onClick:()=>a(i=>!i),children:[Y.jsxs("div",{className:"flex w-full items-center justify-between px-2 pb-8 transition-all duration-300 md:px-4 md:pb-10",children:[Y.jsxs("p",{className:tt("mr-4 text-lg font-medium md:text-xl",e),children:[Y.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?Y.jsx(Ob,{className:"text-petnow-orange-primary min-w-6",size:24}):Y.jsx(Cb,{className:"text-petnow-orange-primary min-w-6",size:24})]}),Y.jsx("p",{className:tt(`text-petnow-grey-secondary w-full overflow-hidden px-2 text-base leading-6 whitespace-pre-wrap transition-all duration-300 md:px-4 md:text-lg ${o?"max-h-[24rem] pb-8 sm:max-h-60 md:pb-10":"max-h-0"}`,t),children:r})]})},Uc=6048e5,Tb=864e5,Io=6e4,No=36e5,Pb=1e3,Qc=Symbol.for("constructDateFrom");function De(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&Qc in n?n[Qc](r):n instanceof Date?new n.constructor(r):new Date(r)}function ae(n,r){return De(r||n,n)}function ft(n,r,e){const t=ae(n,e==null?void 0:e.in);return isNaN(r)?De((e==null?void 0:e.in)||n,NaN):(r&&t.setDate(t.getDate()+r),t)}function pt(n,r,e){const t=ae(n,e==null?void 0:e.in);if(isNaN(r))return De(n,NaN);if(!r)return t;const o=t.getDate(),a=De(n,t.getTime());a.setMonth(t.getMonth()+r+1,0);const i=a.getDate();return o>=i?a:(t.setFullYear(a.getFullYear(),a.getMonth(),o),t)}function Gc(n,r,e){return De(n,+ae(n)+r)}function Ib(n,r,e){return Gc(n,r*No)}let Nb={};function gn(){return Nb}function Yt(n,r){var s,l,u,c;const e=gn(),t=(r==null?void 0:r.weekStartsOn)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=ae(n,r==null?void 0:r.in),a=o.getDay(),i=(a<t?7:0)+a-t;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Vn(n,r){return Yt(n,{...r,weekStartsOn:1})}function Kc(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=De(e,0);o.setFullYear(t+1,0,4),o.setHours(0,0,0,0);const a=Vn(o),i=De(e,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=Vn(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function Lo(n){const r=ae(n),e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),+n-+e}function Rt(n,...r){const e=De.bind(null,r.find(t=>typeof t=="object"));return r.map(e)}function bn(n,r){const e=ae(n,r==null?void 0:r.in);return e.setHours(0,0,0,0),e}function zn(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=bn(t),i=bn(o),s=+a-Lo(a),l=+i-Lo(i);return Math.round((s-l)/Tb)}function Lb(n,r){const e=Kc(n,r),t=De(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),Vn(t)}function Bi(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setTime(t.getTime()+r*Io),t}function Vi(n,r,e){return pt(n,r*3,e)}function Fb(n,r,e){return Gc(n,r*1e3)}function Fo(n,r,e){return ft(n,r*7,e)}function jt(n,r,e){return pt(n,r*12,e)}function Xc(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=De.bind(null,o));const a=ae(o,t);(!e||e<a||isNaN(+a))&&(e=a)}),De(t,e||NaN)}function Jc(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=De.bind(null,o));const a=ae(o,t);(!e||e>a||isNaN(+a))&&(e=a)}),De(t,e||NaN)}function $b(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return+bn(t)==+bn(o)}function Wt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function $o(n){return!(!Wt(n)&&typeof n!="number"||isNaN(+ae(n)))}function Ao(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function yn(n,r){const e=ae(n,r==null?void 0:r.in);return Math.trunc(e.getMonth()/3)+1}function Yo(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=yn(t)-yn(o);return a*4+i}function Ro(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return t.getFullYear()-o.getFullYear()}function Ab(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=Zc(t,o),i=Math.abs(zn(t,o));t.setDate(t.getDate()-a*i);const s=+(Zc(t,o)===-a),l=a*(i-s);return l===0?0:l}function Zc(n,r){const e=n.getFullYear()-r.getFullYear()||n.getMonth()-r.getMonth()||n.getDate()-r.getDate()||n.getHours()-r.getHours()||n.getMinutes()-r.getMinutes()||n.getSeconds()-r.getSeconds()||n.getMilliseconds()-r.getMilliseconds();return e<0?-1:e>0?1:e}function ed(n,r){const e=ae(n,r==null?void 0:r.in);return e.setHours(23,59,59,999),e}function td(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function zi(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getMonth(),o=t-t%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}function nd(n,r){const e=ae(n,r==null?void 0:r.in);return e.setDate(1),e.setHours(0,0,0,0),e}function rd(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function jo(n,r){const e=ae(n,r==null?void 0:r.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Yb(n,r){var s,l;const e=gn(),t=e.weekStartsOn??((l=(s=e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=ae(n,r==null?void 0:r.in),a=o.getDay(),i=(a<t?-7:0)+6-(a-t);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const Rb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jb=(n,r,e)=>{let t;const o=Rb[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+t:t+" ago":t};function qn(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Wb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Hb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Bb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vb={date:qn({formats:Wb,defaultWidth:"full"}),time:qn({formats:Hb,defaultWidth:"full"}),dateTime:qn({formats:Bb,defaultWidth:"full"})},zb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qb=(n,r,e,t)=>zb[n];function wt(n){return(r,e)=>{const t=e!=null&&e.context?String(e.context):"standalone";let o;if(t==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):i;o=n.formattingValues[s]||n.formattingValues[i]}else{const i=n.defaultWidth,s=e!=null&&e.width?String(e.width):n.defaultWidth;o=n.values[s]||n.values[i]}const a=n.argumentCallback?n.argumentCallback(r):r;return o[a]}}const Ub={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Gb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Kb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Xb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Jb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Zb={ordinalNumber:(n,r)=>{const e=Number(n),t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:wt({values:Ub,defaultWidth:"wide"}),quarter:wt({values:Qb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:Gb,defaultWidth:"wide"}),day:wt({values:Kb,defaultWidth:"wide"}),dayPeriod:wt({values:Xb,defaultWidth:"wide",formattingValues:Jb,defaultFormattingWidth:"wide"})};function xt(n){return(r,e={})=>{const t=e.width,o=t&&n.matchPatterns[t]||n.matchPatterns[n.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=t&&n.parsePatterns[t]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?ty(s,f=>f.test(i)):ey(s,f=>f.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=r.slice(i.length);return{value:u,rest:c}}}function ey(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function ty(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function od(n){return(r,e={})=>{const t=r.match(n.matchPattern);if(!t)return null;const o=t[0],a=r.match(n.parsePattern);if(!a)return null;let i=n.valueCallback?n.valueCallback(a[0]):a[0];i=e.valueCallback?e.valueCallback(i):i;const s=r.slice(o.length);return{value:i,rest:s}}}const ny=/^(\d+)(th|st|nd|rd)?/i,ry=/\d+/i,oy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ay={any:[/^b/i,/^(a|c)/i]},iy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sy={any:[/1/i,/2/i,/3/i,/4/i]},ly={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},dy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},fy={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},py={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hy={ordinalNumber:od({matchPattern:ny,parsePattern:ry,valueCallback:n=>parseInt(n,10)}),era:xt({matchPatterns:oy,defaultMatchWidth:"wide",parsePatterns:ay,defaultParseWidth:"any"}),quarter:xt({matchPatterns:iy,defaultMatchWidth:"wide",parsePatterns:sy,defaultParseWidth:"any",valueCallback:n=>n+1}),month:xt({matchPatterns:ly,defaultMatchWidth:"wide",parsePatterns:uy,defaultParseWidth:"any"}),day:xt({matchPatterns:cy,defaultMatchWidth:"wide",parsePatterns:dy,defaultParseWidth:"any"}),dayPeriod:xt({matchPatterns:fy,defaultMatchWidth:"any",parsePatterns:py,defaultParseWidth:"any"})},ad={code:"en-US",formatDistance:jb,formatLong:Vb,formatRelative:qb,localize:Zb,match:hy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function my(n,r){const e=ae(n,r==null?void 0:r.in);return zn(e,jo(e))+1}function qi(n,r){const e=ae(n,r==null?void 0:r.in),t=+Vn(e)-+Lb(e);return Math.round(t/Uc)+1}function Ui(n,r){var c,f,h,p;const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=gn(),a=(r==null?void 0:r.firstWeekContainsDate)??((f=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=De((r==null?void 0:r.in)||n,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=Yt(i,r),l=De((r==null?void 0:r.in)||n,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const u=Yt(l,r);return+e>=+s?t+1:+e>=+u?t:t-1}function vy(n,r){var s,l,u,c;const e=gn(),t=(r==null?void 0:r.firstWeekContainsDate)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=Ui(n,r),a=De((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),Yt(a,r)}function id(n,r){const e=ae(n,r==null?void 0:r.in),t=+Yt(e,r)-+vy(e,r);return Math.round(t/Uc)+1}function Se(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const tn={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return Se(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):Se(e+1,2)},d(n,r){return Se(n.getDate(),r.length)},a(n,r){const e=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,r){return Se(n.getHours()%12||12,r.length)},H(n,r){return Se(n.getHours(),r.length)},m(n,r){return Se(n.getMinutes(),r.length)},s(n,r){return Se(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),o=Math.trunc(t*Math.pow(10,e-3));return Se(o,r.length)}},Un={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sd={G:function(n,r,e){const t=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return e.era(t,{width:"abbreviated"});case"GGGGG":return e.era(t,{width:"narrow"});case"GGGG":default:return e.era(t,{width:"wide"})}},y:function(n,r,e){if(r==="yo"){const t=n.getFullYear(),o=t>0?t:1-t;return e.ordinalNumber(o,{unit:"year"})}return tn.y(n,r)},Y:function(n,r,e,t){const o=Ui(n,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return Se(i,2)}return r==="Yo"?e.ordinalNumber(a,{unit:"year"}):Se(a,r.length)},R:function(n,r){const e=Kc(n);return Se(e,r.length)},u:function(n,r){const e=n.getFullYear();return Se(e,r.length)},Q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(t);case"QQ":return Se(t,2);case"Qo":return e.ordinalNumber(t,{unit:"quarter"});case"QQQ":return e.quarter(t,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(t,{width:"wide",context:"formatting"})}},q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(t);case"qq":return Se(t,2);case"qo":return e.ordinalNumber(t,{unit:"quarter"});case"qqq":return e.quarter(t,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(t,{width:"wide",context:"standalone"})}},M:function(n,r,e){const t=n.getMonth();switch(r){case"M":case"MM":return tn.M(n,r);case"Mo":return e.ordinalNumber(t+1,{unit:"month"});case"MMM":return e.month(t,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(t,{width:"wide",context:"formatting"})}},L:function(n,r,e){const t=n.getMonth();switch(r){case"L":return String(t+1);case"LL":return Se(t+1,2);case"Lo":return e.ordinalNumber(t+1,{unit:"month"});case"LLL":return e.month(t,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(t,{width:"wide",context:"standalone"})}},w:function(n,r,e,t){const o=id(n,t);return r==="wo"?e.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(n,r,e){const t=qi(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):Se(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):tn.d(n,r)},D:function(n,r,e){const t=my(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):Se(t,r.length)},E:function(n,r,e){const t=n.getDay();switch(r){case"E":case"EE":case"EEE":return e.day(t,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(t,{width:"short",context:"formatting"});case"EEEE":default:return e.day(t,{width:"wide",context:"formatting"})}},e:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return Se(a,2);case"eo":return e.ordinalNumber(a,{unit:"day"});case"eee":return e.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(o,{width:"short",context:"formatting"});case"eeee":default:return e.day(o,{width:"wide",context:"formatting"})}},c:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return Se(a,r.length);case"co":return e.ordinalNumber(a,{unit:"day"});case"ccc":return e.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(o,{width:"narrow",context:"standalone"});case"cccccc":return e.day(o,{width:"short",context:"standalone"});case"cccc":default:return e.day(o,{width:"wide",context:"standalone"})}},i:function(n,r,e){const t=n.getDay(),o=t===0?7:t;switch(r){case"i":return String(o);case"ii":return Se(o,r.length);case"io":return e.ordinalNumber(o,{unit:"day"});case"iii":return e.day(t,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(t,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(t,{width:"short",context:"formatting"});case"iiii":default:return e.day(t,{width:"wide",context:"formatting"})}},a:function(n,r,e){const o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,r,e){const t=n.getHours();let o;switch(t===12?o=Un.noon:t===0?o=Un.midnight:o=t/12>=1?"pm":"am",r){case"b":case"bb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,r,e){const t=n.getHours();let o;switch(t>=17?o=Un.evening:t>=12?o=Un.afternoon:t>=4?o=Un.morning:o=Un.night,r){case"B":case"BB":case"BBB":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,r,e){if(r==="ho"){let t=n.getHours()%12;return t===0&&(t=12),e.ordinalNumber(t,{unit:"hour"})}return tn.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):tn.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):Se(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):Se(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):tn.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):tn.s(n,r)},S:function(n,r){return tn.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return ud(t);case"XXXX":case"XX":return wn(t);case"XXXXX":case"XXX":default:return wn(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return ud(t);case"xxxx":case"xx":return wn(t);case"xxxxx":case"xxx":default:return wn(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ld(t,":");case"OOOO":default:return"GMT"+wn(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ld(t,":");case"zzzz":default:return"GMT"+wn(t,":")}},t:function(n,r,e){const t=Math.trunc(+n/1e3);return Se(t,r.length)},T:function(n,r,e){return Se(+n,r.length)}};function ld(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=Math.trunc(t/60),a=t%60;return a===0?e+String(o):e+String(o)+r+Se(a,2)}function ud(n,r){return n%60===0?(n>0?"-":"+")+Se(Math.abs(n)/60,2):wn(n,r)}function wn(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=Se(Math.trunc(t/60),2),a=Se(t%60,2);return e+o+r+a}const cd=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},dd=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Qi={p:dd,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return cd(n,r);let a;switch(t){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",cd(t,r)).replace("{{time}}",dd(o,r))}},gy=/^D+$/,by=/^Y+$/,yy=["D","DD","YY","YYYY"];function wy(n){return gy.test(n)}function xy(n){return by.test(n)}function Ey(n,r,e){const t=Dy(n,r,e);if(console.warn(t),yy.includes(n))throw new RangeError(t)}function Dy(n,r,e){const t=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${t} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Sy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ky=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_y=/^'([^]*?)'?$/,Cy=/''/g,Oy=/[a-zA-Z]/;function fd(n,r,e){var c,f,h,p,m,v,g,x;const t=gn(),o=(e==null?void 0:e.locale)??t.locale??ad,a=(e==null?void 0:e.firstWeekContainsDate)??((f=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(h=t.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??t.weekStartsOn??((x=(g=t.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??0,s=ae(n,e==null?void 0:e.in);if(!$o(s))throw new RangeError("Invalid time value");let l=r.match(ky).map(E=>{const w=E[0];if(w==="p"||w==="P"){const k=Qi[w];return k(E,o.formatLong)}return E}).join("").match(Sy).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const w=E[0];if(w==="'")return{isToken:!1,value:My(E)};if(sd[w])return{isToken:!0,value:E};if(w.match(Oy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:E}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(E=>{if(!E.isToken)return E.value;const w=E.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&xy(w)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&wy(w))&&Ey(w,r,String(n));const k=sd[w[0]];return k(s,w,o.localize,u)}).join("")}function My(n){const r=n.match(_y);return r?r[1].replace(Cy,"'"):n}function pd(n,r){return ae(n,r==null?void 0:r.in).getDate()}function Ty(n,r){return ae(n,r==null?void 0:r.in).getDay()}function Py(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=e.getMonth(),a=De(e,0);return a.setFullYear(t,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Iy(){return Object.assign({},gn())}function Ht(n,r){return ae(n,r==null?void 0:r.in).getHours()}function Ny(n,r){const e=ae(n,r==null?void 0:r.in).getDay();return e===0?7:e}function Bt(n,r){return ae(n,r==null?void 0:r.in).getMinutes()}function qe(n,r){return ae(n,r==null?void 0:r.in).getMonth()}function nn(n){return ae(n).getSeconds()}function Gi(n){return+ae(n)}function le(n,r){return ae(n,r==null?void 0:r.in).getFullYear()}function rn(n,r){return+ae(n)>+ae(r)}function xn(n,r){return+ae(n)<+ae(r)}function Ly(n,r){return+ae(n)==+ae(r)}function Fy(n,r){const e=$y(r)?new r(0):De(r,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function $y(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const Ay=10;class hd{constructor(){Z(this,"subPriority",0)}validate(r,e){return!0}}class Yy extends hd{constructor(r,e,t,o,a){super(),this.value=r,this.validateValue=e,this.setValue=t,this.priority=o,a&&(this.subPriority=a)}validate(r,e){return this.validateValue(r,this.value,e)}set(r,e,t){return this.setValue(r,e,this.value,t)}}class Ry extends hd{constructor(e,t){super();Z(this,"priority",Ay);Z(this,"subPriority",-1);this.context=e||(o=>De(t,o))}set(e,t){return t.timestampIsSet?e:De(e,Fy(e,this.context))}}class ge{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new Yy(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class jy extends ge{constructor(){super(...arguments);Z(this,"priority",140);Z(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,o){switch(t){case"G":case"GG":case"GGG":return o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"});case"GGGGG":return o.era(e,{width:"narrow"});case"GGGG":default:return o.era(e,{width:"wide"})||o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"})}}set(e,t,o){return t.era=o,e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}const $e={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Et={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ae(n,r){return n&&{value:r(n.value),rest:n.rest}}function Te(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function Dt(n,r){const e=r.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:r.slice(1)};const t=e[1]==="+"?1:-1,o=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,i=e[5]?parseInt(e[5],10):0;return{value:t*(o*No+a*Io+i*Pb),rest:r.slice(e[0].length)}}function md(n){return Te($e.anyDigitsSigned,n)}function Ie(n,r){switch(n){case 1:return Te($e.singleDigit,r);case 2:return Te($e.twoDigits,r);case 3:return Te($e.threeDigits,r);case 4:return Te($e.fourDigits,r);default:return Te(new RegExp("^\\d{1,"+n+"}"),r)}}function Wo(n,r){switch(n){case 1:return Te($e.singleDigitSigned,r);case 2:return Te($e.twoDigitsSigned,r);case 3:return Te($e.threeDigitsSigned,r);case 4:return Te($e.fourDigitsSigned,r);default:return Te(new RegExp("^-?\\d{1,"+n+"}"),r)}}function Ki(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function vd(n,r){const e=r>0,t=e?r:1-r;let o;if(t<=50)o=n||100;else{const a=t+50,i=Math.trunc(a/100)*100,s=n>=a%100;o=n+i-(s?100:0)}return e?o:1-o}function gd(n){return n%400===0||n%4===0&&n%100!==0}class Wy extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return Ae(Ie(4,e),a);case"yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae(Ie(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o){const a=e.getFullYear();if(o.isTwoDigitYear){const s=vd(o.year,a);return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}const i=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class Hy extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return Ae(Ie(4,e),a);case"Yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae(Ie(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=Ui(e,a);if(o.isTwoDigitYear){const l=vd(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Yt(e,a)}const s=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(s,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Yt(e,a)}}class By extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return Wo(t==="R"?4:t.length,e)}set(e,t,o){const a=De(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),Vn(a)}}class Vy extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return Wo(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class zy extends ge{constructor(){super(...arguments);Z(this,"priority",120);Z(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"Q":case"QQ":return Ie(t.length,e);case"Qo":return o.ordinalNumber(e,{unit:"quarter"});case"QQQ":return o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(e,{width:"wide",context:"formatting"})||o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class qy extends ge{constructor(){super(...arguments);Z(this,"priority",120);Z(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"q":case"qq":return Ie(t.length,e);case"qo":return o.ordinalNumber(e,{unit:"quarter"});case"qqq":return o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(e,{width:"wide",context:"standalone"})||o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class Uy extends ge{constructor(){super(...arguments);Z(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Z(this,"priority",110)}parse(e,t,o){const a=i=>i-1;switch(t){case"M":return Ae(Te($e.month,e),a);case"MM":return Ae(Ie(2,e),a);case"Mo":return Ae(o.ordinalNumber(e,{unit:"month"}),a);case"MMM":return o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(e,{width:"wide",context:"formatting"})||o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}class Qy extends ge{constructor(){super(...arguments);Z(this,"priority",110);Z(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,o){const a=i=>i-1;switch(t){case"L":return Ae(Te($e.month,e),a);case"LL":return Ae(Ie(2,e),a);case"Lo":return Ae(o.ordinalNumber(e,{unit:"month"}),a);case"LLL":return o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(e,{width:"wide",context:"standalone"})||o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}function Gy(n,r,e){const t=ae(n,e==null?void 0:e.in),o=id(t,e)-r;return t.setDate(t.getDate()-o*7),ae(t,e==null?void 0:e.in)}class Ky extends ge{constructor(){super(...arguments);Z(this,"priority",100);Z(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,o){switch(t){case"w":return Te($e.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return Ie(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return Yt(Gy(e,o,a),a)}}function Xy(n,r,e){const t=ae(n,e==null?void 0:e.in),o=qi(t,e)-r;return t.setDate(t.getDate()-o*7),t}class Jy extends ge{constructor(){super(...arguments);Z(this,"priority",100);Z(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,o){switch(t){case"I":return Te($e.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return Ie(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return Vn(Xy(e,o))}}const Zy=[31,28,31,30,31,30,31,31,30,31,30,31],ew=[31,29,31,30,31,30,31,31,30,31,30,31];class tw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"subPriority",1);Z(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"d":return Te($e.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return Ie(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=gd(o),i=e.getMonth();return a?t>=1&&t<=ew[i]:t>=1&&t<=Zy[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class nw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"subpriority",1);Z(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,o){switch(t){case"D":case"DD":return Te($e.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return Ie(t.length,e)}}validate(e,t){const o=e.getFullYear();return gd(o)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,o){return e.setMonth(0,o),e.setHours(0,0,0,0),e}}function Xi(n,r,e){var f,h,p,m;const t=gn(),o=(e==null?void 0:e.weekStartsOn)??((h=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((m=(p=t.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,a=ae(n,e==null?void 0:e.in),i=a.getDay(),l=(r%7+7)%7,u=7-o,c=r<0||r>6?r-(i+u)%7:(l+u)%7-(i+u)%7;return ft(a,c,e)}class rw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"E":case"EE":case"EEE":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Xi(e,o,a),e.setHours(0,0,0,0),e}}class ow extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"e":case"ee":return Ae(Ie(t.length,e),i);case"eo":return Ae(o.ordinalNumber(e,{unit:"day"}),i);case"eee":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeeee":return o.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Xi(e,o,a),e.setHours(0,0,0,0),e}}class aw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"c":case"cc":return Ae(Ie(t.length,e),i);case"co":return Ae(o.ordinalNumber(e,{unit:"day"}),i);case"ccc":return o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"ccccc":return o.day(e,{width:"narrow",context:"standalone"});case"cccccc":return o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(e,{width:"wide",context:"standalone"})||o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Xi(e,o,a),e.setHours(0,0,0,0),e}}function iw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Ny(t,e),a=r-o;return ft(t,a,e)}class sw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,o){const a=i=>i===0?7:i;switch(t){case"i":case"ii":return Ie(t.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return Ae(o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return Ae(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ae(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ae(o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,t){return t>=1&&t<=7}set(e,t,o){return e=iw(e,o),e.setHours(0,0,0,0),e}}class lw extends ge{constructor(){super(...arguments);Z(this,"priority",80);Z(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,o){switch(t){case"a":case"aa":case"aaa":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Ki(o),0,0,0),e}}class uw extends ge{constructor(){super(...arguments);Z(this,"priority",80);Z(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,o){switch(t){case"b":case"bb":case"bbb":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Ki(o),0,0,0),e}}class cw extends ge{constructor(){super(...arguments);Z(this,"priority",80);Z(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,o){switch(t){case"B":case"BB":case"BBB":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Ki(o),0,0,0),e}}class dw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return Te($e.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,o){const a=e.getHours()>=12;return a&&o<12?e.setHours(o+12,0,0,0):!a&&o===12?e.setHours(0,0,0,0):e.setHours(o,0,0,0),e}}class fw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,o){switch(t){case"H":return Te($e.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class pw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return Te($e.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.getHours()>=12&&o<12?e.setHours(o+12,0,0,0):e.setHours(o,0,0,0),e}}class hw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,o){switch(t){case"k":return Te($e.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,o){const a=o<=24?o%24:o;return e.setHours(a,0,0,0),e}}class mw extends ge{constructor(){super(...arguments);Z(this,"priority",60);Z(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return Te($e.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return Ie(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class vw extends ge{constructor(){super(...arguments);Z(this,"priority",50);Z(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return Te($e.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return Ie(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class gw extends ge{constructor(){super(...arguments);Z(this,"priority",30);Z(this,"incompatibleTokens",["t","T"])}parse(e,t){const o=a=>Math.trunc(a*Math.pow(10,-t.length+3));return Ae(Ie(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class bw extends ge{constructor(){super(...arguments);Z(this,"priority",10);Z(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return Dt(Et.basicOptionalMinutes,e);case"XX":return Dt(Et.basic,e);case"XXXX":return Dt(Et.basicOptionalSeconds,e);case"XXXXX":return Dt(Et.extendedOptionalSeconds,e);case"XXX":default:return Dt(Et.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-Lo(e)-o)}}class yw extends ge{constructor(){super(...arguments);Z(this,"priority",10);Z(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return Dt(Et.basicOptionalMinutes,e);case"xx":return Dt(Et.basic,e);case"xxxx":return Dt(Et.basicOptionalSeconds,e);case"xxxxx":return Dt(Et.extendedOptionalSeconds,e);case"xxx":default:return Dt(Et.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-Lo(e)-o)}}class ww extends ge{constructor(){super(...arguments);Z(this,"priority",40);Z(this,"incompatibleTokens","*")}parse(e){return md(e)}set(e,t,o){return[De(e,o*1e3),{timestampIsSet:!0}]}}class xw extends ge{constructor(){super(...arguments);Z(this,"priority",20);Z(this,"incompatibleTokens","*")}parse(e){return md(e)}set(e,t,o){return[De(e,o),{timestampIsSet:!0}]}}const Ew={G:new jy,y:new Wy,Y:new Hy,R:new By,u:new Vy,Q:new zy,q:new qy,M:new Uy,L:new Qy,w:new Ky,I:new Jy,d:new tw,D:new nw,E:new rw,e:new ow,c:new aw,i:new sw,a:new lw,b:new uw,B:new cw,h:new dw,H:new fw,K:new pw,k:new hw,m:new mw,s:new vw,S:new gw,X:new bw,x:new yw,t:new ww,T:new xw},Dw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kw=/^'([^]*?)'?$/,_w=/''/g,Cw=/\S/,Ow=/[a-zA-Z]/;function Mw(n,r,e,t){var g,x,E,w,k,D,T,$;const o=()=>De((t==null?void 0:t.in)||e,NaN),a=Iy(),i=(t==null?void 0:t.locale)??a.locale??ad,s=(t==null?void 0:t.firstWeekContainsDate)??((x=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:x.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(E=a.locale)==null?void 0:E.options)==null?void 0:w.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((D=(k=t==null?void 0:t.locale)==null?void 0:k.options)==null?void 0:D.weekStartsOn)??a.weekStartsOn??(($=(T=a.locale)==null?void 0:T.options)==null?void 0:$.weekStartsOn)??0;if(!r)return n?o():ae(e,t==null?void 0:t.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:i},c=[new Ry(t==null?void 0:t.in,e)],f=r.match(Sw).map(_=>{const C=_[0];if(C in Qi){const O=Qi[C];return O(_,i.formatLong)}return _}).join("").match(Dw),h=[];for(let _ of f){const C=_[0],O=Ew[C];if(O){const{incompatibleTokens:R}=O;if(Array.isArray(R)){const S=h.find(L=>R.includes(L.token)||L.token===C);if(S)throw new RangeError(`The format string mustn't contain \`${S.fullToken}\` and \`${_}\` at the same time`)}else if(O.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);h.push({token:C,fullToken:_});const b=O.run(n,_,i.match,u);if(!b)return o();c.push(b.setter),n=b.rest}else{if(C.match(Ow))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");if(_==="''"?_="'":C==="'"&&(_=Tw(_)),n.indexOf(_)===0)n=n.slice(_.length);else return o()}}if(n.length>0&&Cw.test(n))return o();const p=c.map(_=>_.priority).sort((_,C)=>C-_).filter((_,C,O)=>O.indexOf(_)===C).map(_=>c.filter(C=>C.priority===_).sort((C,O)=>O.subPriority-C.subPriority)).map(_=>_[0]);let m=ae(e,t==null?void 0:t.in);if(isNaN(+m))return o();const v={};for(const _ of p){if(!_.validate(m,u))return o();const C=_.set(m,v,u);Array.isArray(C)?(m=C[0],Object.assign(v,C[1])):m=C}return m}function Tw(n){return n.match(kw)[1].replace(_w,"'")}function Pw(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function Iw(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return+zi(t)==+zi(o)}function Nw(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()}function Ir(n,r,e){const t=+ae(n,e==null?void 0:e.in),[o,a]=[+ae(r.start,e==null?void 0:e.in),+ae(r.end,e==null?void 0:e.in)].sort((i,s)=>i-s);return t>=o&&t<=a}function Lw(n,r,e){return ft(n,-1,e)}function Fw(n,r){const e=()=>De(r==null?void 0:r.in,NaN),o=Rw(n);let a;if(o.date){const u=jw(o.date,2);a=Ww(u.restDateString,u.year)}if(!a||isNaN(+a))return e();const i=+a;let s=0,l;if(o.time&&(s=Hw(o.time),isNaN(s)))return e();if(o.timezone){if(l=Bw(o.timezone),isNaN(l))return e()}else{const u=new Date(i+s),c=ae(0,r==null?void 0:r.in);return c.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),c.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),c}return ae(i+s+l,r==null?void 0:r.in)}const Ho={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},$w=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Aw=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yw=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Rw(n){const r={},e=n.split(Ho.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],Ho.timeZoneDelimiter.test(r.date)&&(r.date=n.split(Ho.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=Ho.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function jw(n,r){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),t=n.match(e);if(!t)return{year:NaN,restDateString:""};const o=t[1]?parseInt(t[1]):null,a=t[2]?parseInt(t[2]):null;return{year:a===null?o:a*100,restDateString:n.slice((t[1]||t[2]).length)}}function Ww(n,r){if(r===null)return new Date(NaN);const e=n.match($w);if(!e)return new Date(NaN);const t=!!e[4],o=Nr(e[1]),a=Nr(e[2])-1,i=Nr(e[3]),s=Nr(e[4]),l=Nr(e[5])-1;if(t)return Qw(r,s,l)?Vw(r,s,l):new Date(NaN);{const u=new Date(0);return!qw(r,a,i)||!Uw(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function Nr(n){return n?parseInt(n):1}function Hw(n){const r=n.match(Aw);if(!r)return NaN;const e=Ji(r[1]),t=Ji(r[2]),o=Ji(r[3]);return Gw(e,t,o)?e*No+t*Io+o*1e3:NaN}function Ji(n){return n&&parseFloat(n.replace(",","."))||0}function Bw(n){if(n==="Z")return 0;const r=n.match(Yw);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return Kw(t,o)?e*(t*No+o*Io):NaN}function Vw(n,r,e){const t=new Date(0);t.setUTCFullYear(n,0,4);const o=t.getUTCDay()||7,a=(r-1)*7+e+1-o;return t.setUTCDate(t.getUTCDate()+a),t}const zw=[31,null,31,30,31,30,31,31,30,31,30,31];function bd(n){return n%400===0||n%4===0&&n%100!==0}function qw(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(zw[r]||(bd(n)?29:28))}function Uw(n,r){return r>=1&&r<=(bd(n)?366:365)}function Qw(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function Gw(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function Kw(n,r){return r>=0&&r<=59}function it(n,r,e){const t=ae(n,e==null?void 0:e.in),o=t.getFullYear(),a=t.getDate(),i=De(n,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=Py(i);return t.setMonth(r,Math.min(a,s)),t}function Bo(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setHours(r),t}function Vo(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setMinutes(r),t}function Qn(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return it(t,t.getMonth()+a*3)}function zo(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setSeconds(r),t}function St(n,r,e){const t=ae(n,e==null?void 0:e.in);return isNaN(+t)?De(n,NaN):(t.setFullYear(r),t)}function En(n,r,e){return pt(n,-r,e)}function yd(n,r,e){return Vi(n,-1,e)}function wd(n,r,e){return Fo(n,-1,e)}function Gn(n,r,e){return jt(n,-r,e)}const Xw={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},Jw=(n,r,e)=>{let t;const o=Xw[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?t+" 후":t+" 전":t},Zw={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},e0={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},t0={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},n0={date:qn({formats:Zw,defaultWidth:"full"}),time:qn({formats:e0,defaultWidth:"full"}),dateTime:qn({formats:t0,defaultWidth:"full"})},r0={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},o0=(n,r,e,t)=>r0[n],a0={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},i0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},s0={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},l0={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},u0={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},c0={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},d0={ordinalNumber:(n,r)=>{const e=Number(n);switch(String(r==null?void 0:r.unit)){case"minute":case"second":return String(e);case"date":return e+"일";default:return e+"번째"}},era:wt({values:a0,defaultWidth:"wide"}),quarter:wt({values:i0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:s0,defaultWidth:"wide"}),day:wt({values:l0,defaultWidth:"wide"}),dayPeriod:wt({values:u0,defaultWidth:"wide",formattingValues:c0,defaultFormattingWidth:"wide"})},f0=/^(\d+)(일|번째)?/i,p0=/\d+/i,h0={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},m0={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},v0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},g0={any:[/1/i,/2/i,/3/i,/4/i]},b0={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},y0={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},w0={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},x0={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},E0={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},D0={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},S0={ordinalNumber:od({matchPattern:f0,parsePattern:p0,valueCallback:n=>parseInt(n,10)}),era:xt({matchPatterns:h0,defaultMatchWidth:"wide",parsePatterns:m0,defaultParseWidth:"any"}),quarter:xt({matchPatterns:v0,defaultMatchWidth:"wide",parsePatterns:g0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:xt({matchPatterns:b0,defaultMatchWidth:"wide",parsePatterns:y0,defaultParseWidth:"any"}),day:xt({matchPatterns:w0,defaultMatchWidth:"wide",parsePatterns:x0,defaultParseWidth:"any"}),dayPeriod:xt({matchPatterns:E0,defaultMatchWidth:"any",parsePatterns:D0,defaultParseWidth:"any"})},k0={code:"ko",formatDistance:Jw,formatLong:n0,formatRelative:o0,localize:d0,match:S0,options:{weekStartsOn:0,firstWeekContainsDate:1}};var qo=typeof document<"u"?d.useLayoutEffect:d.useEffect;const _0={...V}.useInsertionEffect||(n=>n());function C0(n){const r=V.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return _0(()=>{r.current=n}),V.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}const O0={...V};let xd=!1,M0=0;const Ed=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+M0++;function T0(){const[n,r]=V.useState(()=>xd?Ed():void 0);return qo(()=>{n==null&&r(Ed())},[]),V.useEffect(()=>{xd=!0},[]),n}const Dd=O0.useId||T0;let Lr;process.env.NODE_ENV!=="production"&&(Lr=new Set);function P0(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Lr)!=null&&n.has(o))){var a;(a=Lr)==null||a.add(o),console.warn(o)}}function I0(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Lr)!=null&&n.has(o))){var a;(a=Lr)==null||a.add(o),console.error(o)}}const N0=V.forwardRef(function(r,e){const{context:{placement:t,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:f,stroke:h,d:p,style:{transform:m,...v}={},...g}=r;process.env.NODE_ENV!=="production"&&(e||P0("The `ref` prop is required for `FloatingArrow`."));const x=Dd(),[E,w]=V.useState(!1);if(qo(()=>{if(!o)return;at(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[k,D]=t.split("-"),T=k==="top"||k==="bottom";let $=f;(T&&i!=null&&i.x||!T&&i!=null&&i.y)&&($=null);const _=c*2,C=_/2,O=s/2*(u/-8+1),R=l/2*u/4,b=!!p,S=$&&D==="end"?"bottom":"top";let L=$&&D==="end"?"right":"left";$&&E&&(L=D==="end"?"left":"right");const P=(a==null?void 0:a.x)!=null?$||a.x:"",N=(a==null?void 0:a.y)!=null?$||a.y:"",z=p||"M0,0"+(" H"+s)+(" L"+(s-O)+","+(l-R))+(" Q"+s/2+","+l+" "+O+","+(l-R))+" Z",I={top:b?"rotate(180deg)":"",left:b?"rotate(90deg)":"rotate(-90deg)",bottom:b?"":"rotate(180deg)",right:b?"rotate(-90deg)":"rotate(90deg)"}[k];return Y.jsxs("svg",{...g,"aria-hidden":!0,ref:e,width:b?s:s+_,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[L]:P,[S]:N,[k]:T||b?"100%":"calc(100% - "+_/2+"px)",transform:[I,m].filter(te=>!!te).join(" "),...v},children:[_>0&&Y.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:h,strokeWidth:_+(p?0:1),d:z}),Y.jsx("path",{stroke:_&&!p?g.fill:"none",d:z}),Y.jsx("clipPath",{id:x,children:Y.jsx("rect",{x:-C,y:C*(b?-1:1),width:s+_,height:s})})]})});function L0(){const n=new Map;return{emit(r,e){var t;(t=n.get(r))==null||t.forEach(o=>o(e))},on(r,e){n.has(r)||n.set(r,new Set),n.get(r).add(e)},off(r,e){var t;(t=n.get(r))==null||t.delete(e)}}}const F0=V.createContext(null),$0=V.createContext(null),A0=()=>{var n;return((n=V.useContext(F0))==null?void 0:n.id)||null},Y0=()=>V.useContext($0);function R0(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Dd(),a=V.useRef({}),[i]=V.useState(()=>L0()),s=A0()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!Fe(p)&&I0("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=V.useState(t.reference),c=C0((p,m,v)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:v,nested:s}),e==null||e(p,m,v)}),f=V.useMemo(()=>({setPositionReference:u}),[]),h=V.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return V.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function j0(n){n===void 0&&(n={});const{nodeId:r}=n,e=R0({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=V.useState(null),[s,l]=V.useState(null),c=(o==null?void 0:o.domReference)||a,f=V.useRef(null),h=Y0();qo(()=>{c&&(f.current=c)},[c]);const p=ju({...n,elements:{...o,...s&&{reference:s}}}),m=V.useCallback(w=>{const k=Fe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(k),p.refs.setReference(k)},[p.refs]),v=V.useCallback(w=>{(Fe(w)||w===null)&&(f.current=w,i(w)),(Fe(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Fe(w))&&p.refs.setReference(w)},[p.refs]),g=V.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),x=V.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=V.useMemo(()=>({...p,...t,refs:g,elements:x,nodeId:r}),[p,g,x,r,t]);return qo(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(k=>k.id===r);w&&(w.context=E)}),V.useMemo(()=>({...p,context:E,refs:g,elements:x}),[p,g,x,E])}/*!
77
+ react-datepicker v8.4.0
50
78
  https://github.com/Hacker0x01/react-datepicker
51
79
  Released under the MIT License.
52
- */var Ja=function(r,e){return Ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])},Ja(r,e)};function He(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Ja(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var fe=function(){return fe=Object.assign||function(e){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fe.apply(this,arguments)};function ht(n,r,e){if(e||arguments.length===2)for(var t=0,o=r.length,a;t<o;t++)(a||!(t in r))&&(a||(a=Array.prototype.slice.call(r,0,t)),a[t]=r[t]);return n.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var ay=function(n){var r=n.showTimeSelectOnly,e=r===void 0?!1:r,t=n.showTime,o=t===void 0?!1:t,a=n.className,i=n.children,s=e?"Choose Time":"Choose Date".concat(o?" and Time":"");return d.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},iy=function(n,r){var e=d.useRef(null),t=d.useRef(n);t.current=n;var o=d.useCallback(function(a){var i,s=a.composed&&a.composedPath&&a.composedPath().find(function(l){return l instanceof Node})||a.target;e.current&&!e.current.contains(s)&&(r&&s instanceof HTMLElement&&s.classList.contains(r)||(i=t.current)===null||i===void 0||i.call(t,a))},[r]);return d.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),e},fo=function(n){var r=n.children,e=n.onClickOutside,t=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=iy(e,i);return d.createElement("div",{className:t,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},j;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(j||(j={}));function Au(){var n=typeof window<"u"?window:globalThis;return n}var cr=12;function he(n){if(n==null)return new Date;var r=typeof n=="string"?Zg(n):K(n);return po(r)?r:new Date}function Za(n,r,e,t,o){o===void 0&&(o=he());for(var a=Nn(e)||Nn(ti()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var u=l[s],c=Qg(n,u,o,{locale:a});if(po(c)&&(!t||n===Ee(c,u,e)))return c}return null}function po(n,r){return eo(n)&&!sn(n,new Date("1/1/1800"))}function Ee(n,r,e){if(e==="en")return Su(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?Nn(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||Nn(ti()),Su(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Xe(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&Ee(n,o,t)||""}function sy(n,r,e){if(!n)return"";var t=Xe(n,e),o=r?Xe(r,e):"";return"".concat(t," - ").concat(o)}function ly(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?Xe(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=Xe(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function ei(n,r){var e=r.hour,t=e===void 0?0:e,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return so(lo(uo(n,s),a),t)}function uy(n){return za(n)}function cy(n,r){return Ee(n,"ddd",r)}function mo(n){return rn(n)}function Vt(n,r,e){var t=Nn(r||ti());return kt(n,{locale:t,weekStartsOn:e})}function Pt(n){return hu(n)}function dr(n){return oo(n)}function Yu(n){return Va(n)}function Wu(){return rn(he())}function ju(n){return pu(n)}function dy(n){return nv(n)}function fy(n){return mu(n)}function vt(n,r){return n&&r?Xg(n,r):!n&&!r}function Ve(n,r){return n&&r?qg(n,r):!n&&!r}function ho(n,r){return n&&r?Gg(n,r):!n&&!r}function pe(n,r){return n&&r?ev(n,r):!n&&!r}function un(n,r){return n&&r?Jv(n,r):!n&&!r}function fr(n,r,e){var t,o=rn(r),a=pu(e);try{t=sr(n,{start:o,end:a})}catch{t=!1}return t}function ti(){var n=Au();return n.__localeId__}function Nn(n){if(typeof n=="string"){var r=Au();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function py(n,r,e){return r(Ee(n,"EEEE",e))}function my(n,r){return Ee(n,"EEEEEE",r)}function hy(n,r){return Ee(n,"EEE",r)}function ni(n,r){return Ee(Ge(he(),n),"LLLL",r)}function Hu(n,r){return Ee(Ge(he(),n),"LLL",r)}function vy(n,r){return Ee(Pn(he(),n),"QQQ",r)}function Je(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.excludeDateIntervals,s=e.includeDates,l=e.includeDateIntervals,u=e.filterDate;return pr(n,{minDate:t,maxDate:o})||a&&a.some(function(c){return c instanceof Date?pe(n,c):pe(n,c.date)})||i&&i.some(function(c){var p=c.start,m=c.end;return sr(n,{start:p,end:m})})||s&&!s.some(function(c){return pe(n,c)})||l&&!l.some(function(c){var p=c.start,m=c.end;return sr(n,{start:p,end:m})})||u&&!u(he(n))||!1}function ri(n,r){var e=r===void 0?{}:r,t=e.excludeDates,o=e.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return sr(n,{start:i,end:s})}):t&&t.some(function(a){var i;return a instanceof Date?pe(n,a):pe(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Ru(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return pr(n,{minDate:t?hu(t):void 0,maxDate:o?mu(o):void 0})||(a==null?void 0:a.some(function(l){return Ve(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ve(n,l)})||s&&!s(he(n))||!1}function vo(n,r,e,t){var o=ne(n),a=Be(n),i=ne(r),s=Be(r),l=ne(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function gy(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return pr(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return Ve(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return Ve(s,n)})||!1}function go(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return pr(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return ho(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return ho(n,l)})||s&&!s(he(n))||!1}function bo(n,r,e){if(!r||!e||!eo(r)||!eo(e))return!1;var t=ne(r),o=ne(e);return t<=n&&o>=n}function yo(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate,l=new Date(n,0,1);return pr(l,{minDate:t?oo(t):void 0,maxDate:o?vu(o):void 0})||(a==null?void 0:a.some(function(u){return vt(l,u instanceof Date?u:u.date)}))||i&&!i.some(function(u){return vt(l,u)})||s&&!s(he(l))||!1}function wo(n,r,e,t){var o=ne(n),a=on(n),i=ne(r),s=on(r),l=ne(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function pr(n,r){var e,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(e=o&&_n(n,o)<0||a&&_n(n,a)>0)!==null&&e!==void 0?e:!1}function Bu(n,r){return r.some(function(e){return Ot(e)===Ot(n)&&Mt(e)===Mt(n)&&Rt(e)===Rt(n)})}function Vu(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&Bu(n,t)||o&&!Bu(n,o)||a&&!a(n)||!1}function zu(n,r){var e=r.minTime,t=r.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var o=he();o=so(o,Ot(n)),o=lo(o,Mt(n)),o=uo(o,Rt(n));var a=he();a=so(a,Ot(e)),a=lo(a,Mt(e)),a=uo(a,Rt(e));var i=he();i=so(i,Ot(t)),i=lo(i,Mt(t)),i=uo(i,Rt(t));var s;try{s=!sr(o,{start:a,end:i})}catch{s=!1}return s}function Uu(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=ln(n,1);return t&&to(t,a)>0||o&&o.every(function(i){return to(i,a)>0})||!1}function Qu(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=ot(n,1);return t&&to(a,t)>0||o&&o.every(function(i){return to(a,i)>0})||!1}function by(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=oo(n),i=Nu(a);return t&&no(t,i)>0||o&&o.every(function(s){return no(s,i)>0})||!1}function yy(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=vu(n),i=Ba(a,1);return t&&no(i,t)>0||o&&o.every(function(s){return no(i,s)>0})||!1}function Ku(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Tn(n,1);return t&&ro(t,a)>0||o&&o.every(function(i){return ro(i,a)>0})||!1}function wy(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?cr:o,i=dr(Tn(n,a)),s=zt(i,a).endPeriod,l=t&&ne(t);return l&&l>s||!1}function qu(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=Ct(n,1);return t&&ro(a,t)>0||o&&o.every(function(i){return ro(a,i)>0})||!1}function xy(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?cr:o,i=Ct(n,a),s=zt(i,a).startPeriod,l=t&&ne(t);return l&&l<s||!1}function Gu(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return _n(o,r)>=0});return du(t)}else return e?du(e):r}function Xu(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return _n(o,r)<=0});return cu(t)}else return e?cu(e):r}function Ju(n,r){var e;n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var t=new Map,o=0,a=n.length;o<a;o++){var i=n[o];if(_t(i)){var s=Ee(i,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(r)||(l.push(r),t.set(s,l))}else if(typeof i=="object"){var u=Object.keys(i),c=(e=u[0])!==null&&e!==void 0?e:"",p=i[c];if(typeof c=="string"&&Array.isArray(p))for(var m=0,f=p.length;m<f;m++){var h=p[m];if(h){var s=Ee(h,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function Dy(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function Ey(n,r){n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--holidays");var e=new Map;return n.forEach(function(t){var o=t.date,a=t.holidayName;if(_t(o)){var i=Ee(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&Dy(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?ht(ht([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function ky(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=Gh(l,Ot(u)),l=Ra(l,Mt(u)),l=Zh(l,Rt(u)));var c=Ra(n,(e+1)*t);Bt(l,r)&&sn(l,c)&&u!=null&&i.push(u)}return i}function Zu(n){return n<10?"0".concat(n):"".concat(n)}function zt(n,r){r===void 0&&(r=cr);var e=Math.ceil(ne(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function Sy(n){var r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),e=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+e-+r)/36e5)}function ec(n){var r=n.getSeconds(),e=n.getMilliseconds();return K(n.getTime()-r*1e3-e)}function Cy(n,r){return ec(n).getTime()===ec(r).getTime()}function tc(n){if(!_t(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function nc(n,r){if(!_t(n)||!_t(r))throw new Error("Invalid date received");var e=tc(n),t=tc(r);return sn(e,t)}function rc(n){return n.key===j.Space}var _y=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;return t.inputRef=d.createRef(),t.onTimeChange=function(o){var a,i;t.setState({time:o});var s=t.props.date,l=s instanceof Date&&!isNaN(+s),u=l?s:new Date;if(o!=null&&o.includes(":")){var c=o.split(":"),p=c[0],m=c[1];u.setHours(Number(p)),u.setMinutes(Number(m))}(i=(a=t.props).onChange)===null||i===void 0||i.call(a,u)},t.renderTimeInput=function(){var o=t.state.time,a=t.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?d.cloneElement(l,{date:i,value:o,onChange:t.onTimeChange}):d.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var u;(u=t.inputRef.current)===null||u===void 0||u.focus()},required:!0,value:o,onChange:function(u){t.onTimeChange(u.target.value||s)}})},t.state={time:t.props.timeString},t}return r.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},r.prototype.render=function(){return d.createElement("div",{className:"react-datepicker__input-time-container"},d.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),d.createElement("div",{className:"react-datepicker-time__input-container"},d.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r}(d.Component),Oy=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.dayEl=d.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===j.Space&&(t.preventDefault(),t.key=j.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isSameDay=function(t){return pe(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var o=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(i){return e.isSameDayOrWeek(i)}):e.isSameDayOrWeek(e.props.selected),a=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!o&&e.isSameDayOrWeek(e.props.preSelection)&&!a},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),Je(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(){return ri(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return pe(e.props.day,Vt(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&pe(t,Vt(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,o=t.day,a=t.highlightDates;if(!a)return!1;var i=Ee(o,"MM.dd.yyyy");return a.get(i)},e.getHolidaysClass=function(){var t,o=e.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=Ee(a,"MM.dd.yyyy");return i.has(s)?[(t=i.get(s))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:fr(o,a,i)},e.isInSelectingRange=function(){var t,o=e.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,u=o.selectsDisabledDaysInRange,c=o.startDate,p=o.endDate,m=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(i||s||l)||!m||!u&&e.isDisabled()?!1:i&&p&&(sn(m,p)||un(m,p))?fr(a,m,p):s&&c&&!p&&(Bt(m,c)||un(m,c))||l&&c&&!p&&(Bt(m,c)||un(m,c))?fr(a,c,m):!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.startDate,s=o.selectsStart,l=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s?pe(a,l):pe(a,i)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,u=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s||l?pe(a,u):pe(a,i)},e.isRangeStart=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:pe(a,o)},e.isRangeEnd=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:pe(i,o)},e.isWeekend=function(){var t=Kv(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===Be(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(Be(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(he())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(o){return e.isSameDayOrWeek(o)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var o=e.props.dayClassName?e.props.dayClassName(t):void 0;return We("react-datepicker__day",o,"react-datepicker__day--"+cy(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,o=t.day,a=t.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=t.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,u=e.isDisabled()||e.isExcluded()?l:i;return"".concat(u," ").concat(Ee(o,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,o=t.day,a=t.holidays,i=a===void 0?new Map:a,s=t.excludeDates,l=Ee(o,"MM.dd.yyyy"),u=[];return i.has(l)&&u.push.apply(u,i.get(l).holidayNames),e.isExcluded()&&u.push(s==null?void 0:s.filter(function(c){return c instanceof Date?pe(c,o):pe(c==null?void 0:c.date,o)}).map(function(c){if(!(c instanceof Date))return c==null?void 0:c.message})),u.join(", ")},e.getTabIndex=function(){var t=e.props.selected,o=e.props.preSelection,a=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&pe(o,t))?0:-1;return a},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(Cu(e.props.day),e.props.day):Cu(e.props.day)},e.render=function(){return d.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&d.createElement("span",{className:"overlay"},e.getTitle()))},e}return r.prototype.componentDidMount=function(){this.handleFocusDay()},r.prototype.componentDidUpdate=function(){this.handleFocusDay()},r.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},r.prototype.isDayActiveElement=function(){var e,t,o;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},r.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},r}(d.Component),My=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.weekNumberEl=d.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===j.Space&&(t.preventDefault(),t.key=j.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!pe(e.props.date,e.props.selected)&&pe(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||pe(e.props.date,e.props.selected)&&pe(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var o=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&pe(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(o=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},r.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},r.prototype.render=function(){var e=this.props,t=e.weekNumber,o=e.isWeekDisabled,a=e.ariaLabelPrefix,i=a===void 0?r.defaultProps.ariaLabelPrefix:a,s=e.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!o,"react-datepicker__week-number--selected":!!s&&pe(this.props.date,this.props.selected)};return d.createElement("div",{ref:this.weekNumberEl,className:We(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),Py=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return Je(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,o){e.props.onDayClick&&e.props.onDayClick(t,o)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,o,a){for(var i,s,l,u=new Date(t),c=0;c<7;c++){var p=new Date(t);p.setDate(p.getDate()+c);var m=!e.isDisabled(p);if(m){u=p;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(u,o,a),e.props.showWeekPicker&&e.handleDayClick(u,a),((i=e.props.shouldCloseOnSelect)!==null&&i!==void 0?i:r.defaultProps.shouldCloseOnSelect)&&((l=(s=e.props).setOpen)===null||l===void 0||l.call(s,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):uy(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),o=rt(t,6),a=new Date(t);a<=o;){if(!e.isDisabled(a))return!1;a=rt(a,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),o=[],a=e.formatWeekNumber(t);if(e.props.showWeekNumber){var i=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,a):void 0;o.push(d.createElement(My,fe({key:"W"},r.defaultProps,e.props,{weekNumber:a,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=rt(t,s);return d.createElement(Oy,fe({},r.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:e.handleDayClick.bind(e,l),onMouseEnter:e.handleDayMouseEnter.bind(e,l)}))}))},e.startOfWeek=function(){return Vt(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!pe(e.startOfWeek(),e.props.selected)&&pe(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":pe(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return d.createElement("div",{className:We(e)},this.renderDays())},r}(d.Component),mr,Ty=6,In={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},oi=(mr={},mr[In.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},mr[In.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},mr[In.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},mr),xo=1;function oc(n,r){return n?In.FOUR_COLUMNS:r?In.TWO_COLUMNS:In.THREE_COLUMNS}var Ny=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=ht([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=ht([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return Je(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(t){return ri(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,o){var a,i;(i=(a=e.props).onDayClick)===null||i===void 0||i.call(a,t,o,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var o,a;(a=(o=e.props).onDayMouseEnter)===null||a===void 0||a.call(o,t)},e.handleMouseLeave=function(){var t,o;(o=(t=e.props).onMouseLeave)===null||o===void 0||o.call(t)},e.isRangeStartMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ve(Ge(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ho(Pn(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ve(Ge(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ho(Pn(a,t),s)},e.isInSelectingRangeMonth=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,p=a.endDate,m=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!m?!1:s&&p?vo(m,p,t,i):l&&c||u&&c&&!p?vo(c,m,t,i):!1},e.isSelectingMonthRangeStart=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.startDate,l=a.selectsStart,u=Ge(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?Ve(u,c):Ve(u,s)},e.isSelectingMonthRangeEnd=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.endDate,l=a.selectsEnd,u=a.selectsRange,c=Ge(i,t),p=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?Ve(c,p):Ve(c,s)},e.isInSelectingRangeQuarter=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,p=a.endDate,m=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!m?!1:s&&p?wo(m,p,t,i):l&&c||u&&c&&!p?wo(c,m,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=rt(t,6);return Ve(t,o)||Ve(a,o)},e.isCurrentMonth=function(t,o){return ne(t)===ne(he())&&o===Be(he())},e.isCurrentQuarter=function(t,o){return ne(t)===ne(he())&&o===on(he())},e.isSelectedMonth=function(t,o,a){return Be(a)===o&&ne(t)===ne(a)},e.isSelectMonthInList=function(t,o,a){return a.some(function(i){return e.isSelectedMonth(t,o,i)})},e.isSelectedQuarter=function(t,o,a){return on(t)===o&&ne(t)===ne(a)},e.renderWeeks=function(){for(var t=[],o=e.props.fixedHeight,a=0,i=!1,s=Vt(Pt(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(h){return e.props.showWeekPicker?Vt(h,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(h){return e.props.showWeekPicker?Vt(h,e.props.locale,e.props.calendarStartDay):e.props.selected},c=e.props.selected?u(e.props.selected):void 0,p=e.props.preSelection?l(e.props.preSelection):void 0;t.push(d.createElement(Py,fe({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:Be(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:p,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Zr(s,1);var m=o&&a>=Ty,f=!o&&!e.isWeekInMonth(s);if(m||f)if(e.props.peekNextMonth)i=!0;else break}return t},e.onMonthClick=function(t,o){var a=e.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||e.handleDayClick(Pt(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter(Pt(i))},e.handleMonthNavigation=function(t,o){var a,i,s,l;(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.MONTH_REFS[t])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},e.handleKeyboardNavigation=function(t,o,a){var i,s=e.props,l=s.selected,u=s.preSelection,c=s.setPreSelection,p=s.minDate,m=s.maxDate,f=s.showFourColumnMonthYearPicker,h=s.showTwoColumnMonthYearPicker;if(u){var v=oc(f,h),g=e.getVerticalOffset(v),w=(i=oi[v])===null||i===void 0?void 0:i.grid,y=function(S,D,_){var O,T,Y=D,W=_;switch(S){case j.ArrowRight:Y=ot(D,xo),W=_===11?0:_+xo;break;case j.ArrowLeft:Y=ln(D,xo),W=_===0?11:_-xo;break;case j.ArrowUp:Y=ln(D,g),W=!((O=w==null?void 0:w[0])===null||O===void 0)&&O.includes(_)?_+12-g:_-g;break;case j.ArrowDown:Y=ot(D,g),W=!((T=w==null?void 0:w[w.length-1])===null||T===void 0)&&T.includes(_)?_-12+g:_+g;break}return{newCalculatedDate:Y,newCalculatedMonth:W}},x=function(S,D,_){for(var O=40,T=S,Y=!1,W=0,N=y(T,D,_),L=N.newCalculatedDate,$=N.newCalculatedMonth;!Y;){if(W>=O){L=D,$=_;break}if(p&&L<p){T=j.ArrowRight;var z=y(T,L,$);L=z.newCalculatedDate,$=z.newCalculatedMonth}if(m&&L>m){T=j.ArrowLeft;var z=y(T,L,$);L=z.newCalculatedDate,$=z.newCalculatedMonth}if(gy(L,e.props)){var z=y(T,L,$);L=z.newCalculatedDate,$=z.newCalculatedMonth}else Y=!0;W++}return{newCalculatedDate:L,newCalculatedMonth:$}};if(o===j.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var E=x(o,u,a),k=E.newCalculatedDate,C=E.newCalculatedMonth;switch(o){case j.ArrowRight:case j.ArrowLeft:case j.ArrowUp:case j.ArrowDown:e.handleMonthNavigation(C,k);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=oi[t])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},e.onMonthKeyDown=function(t,o){var a=e.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=t.key;l!==j.Tab&&t.preventDefault(),i||e.handleKeyboardNavigation(t,l,o),s&&s(t)},e.onQuarterClick=function(t,o){var a=Pn(e.props.day,o);go(a,e.props)||e.handleDayClick(Yu(a),t)},e.onQuarterMouseEnter=function(t){var o=Pn(e.props.day,t);go(o,e.props)||e.handleDayMouseEnter(Yu(o))},e.handleQuarterNavigation=function(t,o){var a,i,s,l;e.isDisabled(o)||e.isExcluded(o)||((i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.QUARTER_REFS[t-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},e.onQuarterKeyDown=function(t,o){var a,i,s=t.key;if(!e.props.disabledKeyboardNavigation)switch(s){case j.Enter:e.onQuarterClick(t,o),(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,e.props.selected);break;case j.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===4?1:o+1,Ba(e.props.preSelection,1));break;case j.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,Nu(e.props.preSelection));break}},e.isMonthDisabledForLabelDate=function(t){var o,a=e.props,i=a.day,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,p=Ge(i,t);return{isDisabled:(o=(s||l||u||c)&&Ru(p,e.props))!==null&&o!==void 0?o:!1,labelDate:p}},e.isMonthDisabled=function(t){var o=e.isMonthDisabledForLabelDate(t).isDisabled;return o},e.getMonthClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,u=o.monthClassName,c=u?u(Ge(a,t)):void 0,p=e.getSelection();return We("react-datepicker__month-text","react-datepicker__month-".concat(t),c,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":p?e.isSelectMonthInList(a,t,p):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&l&&e.isSelectedMonth(a,t,l)&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":i&&s?vo(i,s,t,a):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(a,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=Be(e.props.preSelection),a=e.isMonthDisabledForLabelDate(o).isDisabled,i=t===o&&!(a||e.props.disabledKeyboardNavigation)?"0":"-1";return i},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=on(e.props.preSelection),a=go(e.props.day,e.props),i=t===o&&!(a||e.props.disabledKeyboardNavigation)?"0":"-1";return i},e.getAriaLabel=function(t){var o=e.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,u=o.day,c=o.locale,p=Ge(u,t),m=e.isDisabled(p)||e.isExcluded(p)?l:i;return"".concat(m," ").concat(Ee(p,"MMMM yyyy",c))},e.getQuarterClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,u=o.minDate,c=o.maxDate,p=o.excludeDates,m=o.includeDates,f=o.filterDate,h=o.preSelection,v=o.disabledKeyboardNavigation,g=(u||c||p||m||f)&&go(Pn(a,t),e.props);return We("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":g,"react-datepicker__quarter-text--selected":l?e.isSelectedQuarter(a,t,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!v&&h&&e.isSelectedQuarter(a,t,h)&&!g,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":i&&s?wo(i,s,t,a):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t),"react-datepicker__quarter-text--today":e.isCurrentQuarter(a,t)})},e.getMonthContent=function(t){var o=e.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,u=Hu(t,s),c=ni(t,s);return i?i(t,u,c,l):a?c:u},e.getQuarterContent=function(t){var o,a=e.props,i=a.renderQuarterContent,s=a.locale,l=vy(t,s);return(o=i==null?void 0:i(t,l))!==null&&o!==void 0?o:l},e.renderMonths=function(){var t,o=e.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,u=(t=oi[oc(i,a)])===null||t===void 0?void 0:t.grid;return u==null?void 0:u.map(function(c,p){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:p},c.map(function(m,f){return d.createElement("div",{ref:e.MONTH_REFS[m],key:f,onClick:function(h){e.onMonthClick(h,m)},onKeyDown:function(h){rc(h)&&(h.preventDefault(),h.key=j.Enter),e.onMonthKeyDown(h,m)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(m)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(m)}:void 0,tabIndex:Number(e.getTabIndex(m)),className:e.getMonthClassNames(m),"aria-disabled":e.isMonthDisabled(m),role:"option","aria-label":e.getAriaLabel(m),"aria-current":e.isCurrentMonth(s,m)?"date":void 0,"aria-selected":l?e.isSelectedMonth(s,m,l):void 0},e.getMonthContent(m))}))})},e.renderQuarters=function(){var t=e.props,o=t.day,a=t.selected,i=[1,2,3,4];return d.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return d.createElement("div",{key:l,ref:e.QUARTER_REFS[l],role:"option",onClick:function(u){e.onQuarterClick(u,s)},onKeyDown:function(u){e.onQuarterKeyDown(u,s)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(s)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(s)}:void 0,className:e.getQuarterClassNames(s),"aria-selected":a?e.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(e.getQuarterTabIndex(s)),"aria-current":e.isCurrentQuarter(o,s)?"date":void 0},e.getQuarterContent(s))}))},e.getClassNames=function(){var t=e.props,o=t.selectingDate,a=t.selectsStart,i=t.selectsEnd,s=t.showMonthYearPicker,l=t.showQuarterYearPicker,u=t.showWeekPicker;return We("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":u})},e}return r.prototype.getSelection=function(){var e=this.props,t=e.selected,o=e.selectedDates,a=e.selectsMultiple;if(a)return o;if(t)return[t]},r.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,o=e.showQuarterYearPicker,a=e.day,i=e.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"";return d.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(Ee(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),Iy=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isSelectedMonth=function(t){return e.props.month===t},e.renderOptions=function(){return e.props.monthNames.map(function(t,o){return d.createElement("div",{className:e.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,o),"aria-selected":e.isSelectedMonth(o)?"true":void 0},e.isSelectedMonth(o)?d.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return r.prototype.render=function(){return d.createElement(fo,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),Fy=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(o,a){return d.createElement("option",{key:o,value:a},o)})},e.renderSelectMode=function(t){return d.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(o){return e.onChange(parseInt(o.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,o){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[e.props.month]))},e.renderDropdown=function(t){return d.createElement(Iy,fe({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var o=e.state.dropdownVisible,a=[e.renderReadView(!o,t)];return o&&a.unshift(e.renderDropdown(t)),a},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return Hu(a,e.props.locale)}:function(a){return ni(a,e.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(t);break;case"select":o=this.renderSelectMode(t);break}return d.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r}(d.Component);function Ly(n,r){for(var e=[],t=Pt(n),o=Pt(r);!Bt(t,o);)e.push(he(t)),t=ot(t,1);return e}var $y=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(o){var a=Ka(o),i=vt(t.props.date,o)&&Ve(t.props.date,o);return d.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:t.onChange.bind(t,a),"aria-selected":i?"true":void 0},i?d.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Ee(o,t.props.dateFormat,t.props.locale))})},t.onChange=function(o){return t.props.onChange(o)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:Ly(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=We({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(fo,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),Ay=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=Pt(e.props.minDate),o=Pt(e.props.maxDate),a=[];!Bt(t,o);){var i=Ka(t);a.push(d.createElement("option",{key:i,value:i},Ee(t,e.props.dateFormat,e.props.locale))),t=ot(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:Ka(Pt(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=Ee(e.props.date,e.props.dateFormat,e.props.locale);return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},e.renderDropdown=function(){return d.createElement($y,fe({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown();var o=he(t);vt(e.props.date,o)&&Ve(e.props.date,o)||e.props.onChange(o)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),Yy=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,o,a;e.list&&(e.list.scrollTop=(a=e.centerLi&&r.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((o=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&o!==void 0?o:0):e.list.clientHeight,e.centerLi))!==null&&a!==void 0?a:0)})},e.handleClick=function(t){var o,a;(e.props.minTime||e.props.maxTime)&&zu(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Vu(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&Cy(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&zu(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Vu(t,e.props)},e.liClasses=function(t){var o,a=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&a.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&a.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(Ot(t)*3600+Mt(t)*60+Rt(t))%(((o=e.props.intervals)!==null&&o!==void 0?o:r.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},e.handleOnKeyDown=function(t,o){var a,i;t.key===j.Space&&(t.preventDefault(),t.key=j.Enter),(t.key===j.ArrowUp||t.key===j.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===j.ArrowDown||t.key===j.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===j.Enter&&e.handleClick(o),(i=(a=e.props).handleOnKeyDown)===null||i===void 0||i.call(a,t)},e.renderTimes=function(){for(var t,o=[],a=typeof e.props.format=="string"?e.props.format:"p",i=(t=e.props.intervals)!==null&&t!==void 0?t:r.defaultProps.intervals,s=e.props.selected||e.props.openToDate||he(),l=mo(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,w){return g.getTime()-w.getTime()}),c=60*Sy(s),p=c/i,m=0;m<p;m++){var f=Ra(l,m*i);if(o.push(f),u){var h=ky(l,f,m,i,u);o=o.concat(h)}}var v=o.reduce(function(g,w){return w.getTime()<=s.getTime()?w:g},o[0]);return o.map(function(g){return d.createElement("li",{key:g.valueOf(),onClick:e.handleClick.bind(e,g),className:e.liClasses(g),ref:function(w){g===v&&(e.centerLi=w)},onKeyDown:function(w){e.handleOnKeyDown(w,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},Ee(g,a,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?d.createElement(d.Fragment,null):d.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(e.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},d.createElement("div",{className:"react-datepicker-time__header"},e.props.timeCaption))},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},r.prototype.componentWillUnmount=function(){var e;(e=this.resizeObserver)===null||e===void 0||e.disconnect()},r.prototype.observeDatePickerHeightChanges=function(){var e=this,t=this.props.monthRef;this.updateContainerHeight(),t&&(this.resizeObserver=new ResizeObserver(function(){e.updateContainerHeight()}),this.resizeObserver.observe(t))},r.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},r.prototype.render=function(){var e=this,t,o=this.state.height;return d.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:r.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),d.createElement("div",{className:"react-datepicker__time"},d.createElement("div",{className:"react-datepicker__time-box"},d.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){e.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},r.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},r}(d.Component),ac=3,Wy=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=ht([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return Je(o,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(o){return ri(o,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var o;return(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection},t.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=t.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},t.handleYearClick=function(o,a){t.props.onDayClick&&t.props.onDayClick(o,a)},t.handleYearNavigation=function(o,a){var i,s,l,u,c=t.props,p=c.date,m=c.yearItemNumber;if(!(p===void 0||m===void 0)){var f=zt(p,m).startPeriod;t.isDisabled(a)||t.isExcluded(a)||((s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,a),o-f<0?t.updateFocusOnPaginate(m-(f-o)):o-f>=m?t.updateFocusOnPaginate(Math.abs(m-(o-f))):(u=(l=t.YEAR_REFS[o-f])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())}},t.isSameDay=function(o,a){return pe(o,a)},t.isCurrentYear=function(o){return o===ne(he())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&vt(mt(he(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&vt(mt(he(),o),t.props.endDate)},t.isInRange=function(o){return bo(o,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(o){var a=t.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,u=a.startDate,c=a.endDate;return!(i||s||l)||!t.selectingDate()?!1:i&&c?bo(o,t.selectingDate(),c):s&&u||l&&u&&!c?bo(o,u,t.selectingDate()):!1},t.isSelectingRangeStart=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.startDate,l=i.selectsStart,u=mt(he(),o);return l?vt(u,(a=t.selectingDate())!==null&&a!==void 0?a:null):vt(u,s??null)},t.isSelectingRangeEnd=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.endDate,l=i.selectsEnd,u=i.selectsRange,c=mt(he(),o);return l||u?vt(c,(a=t.selectingDate())!==null&&a!==void 0?a:null):vt(c,s??null)},t.isKeyboardSelected=function(o){if(!(t.props.date===void 0||t.props.selected==null||t.props.preSelection==null)){var a=t.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,u=a.includeDates,c=a.filterDate,p=dr(mt(t.props.date,o)),m=(i||s||l||u||c)&&yo(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!pe(p,dr(t.props.selected))&&pe(p,dr(t.props.preSelection))&&!m}},t.isSelectedYear=function(o){var a=t.props,i=a.selectsMultiple,s=a.selected,l=a.selectedDates;return i?l==null?void 0:l.some(function(u){return o===ne(u)}):!s||o===ne(s)},t.onYearClick=function(o,a){var i=t.props.date;i!==void 0&&t.handleYearClick(dr(mt(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,u=t.props,c=u.date,p=u.yearItemNumber,m=u.handleOnKeyDown;if(l!==j.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case j.Enter:if(t.props.selected==null)break;t.onYearClick(o,a),(s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,t.props.selected);break;case j.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,Ct(t.props.preSelection,1));break;case j.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,Tn(t.props.preSelection,1));break;case j.ArrowUp:{if(c===void 0||p===void 0||t.props.preSelection==null)break;var f=zt(c,p).startPeriod,h=ac,v=a-h;if(v<f){var g=p%h;a>=f&&a<f+g?h=g:h+=g,v=a-h}t.handleYearNavigation(v,Tn(t.props.preSelection,h));break}case j.ArrowDown:{if(c===void 0||p===void 0||t.props.preSelection==null)break;var w=zt(c,p).endPeriod,h=ac,v=a+h;if(v>w){var g=p%h;a<=w&&a>w-g?h=g:h+=g,v=a+h}t.handleYearNavigation(v,Ct(t.props.preSelection,h));break}}m&&m(o)},t.getYearClassNames=function(o){var a=t.props,i=a.date,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,p=a.filterDate,m=a.yearClassName;return We("react-datepicker__year-text","react-datepicker__year-".concat(o),i?m==null?void 0:m(mt(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||u||c||p)&&yo(o,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(o),"react-datepicker__year-text--range-start":t.isRangeStart(o),"react-datepicker__year-text--range-end":t.isRangeEnd(o),"react-datepicker__year-text--in-range":t.isInRange(o),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(o),"react-datepicker__year-text--today":t.isCurrentYear(o)})},t.getYearTabIndex=function(o){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var a=ne(t.props.preSelection),i=yo(o,t.props);return o===a&&!i?"0":"-1"},t.getYearContent=function(o){return t.props.renderYearContent?t.props.renderYearContent(o):o},t}return r.prototype.render=function(){var e=this,t=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,l=o.onYearMouseLeave;if(a===void 0)return null;for(var u=zt(a,i),c=u.startPeriod,p=u.endPeriod,m=function(v){t.push(d.createElement("div",{ref:f.YEAR_REFS[v-c],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){rc(g)&&(g.preventDefault(),g.key=j.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(f.getYearTabIndex(v)),className:f.getYearClassNames(v),onMouseEnter:f.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:f.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:f.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:f.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":f.isCurrentYear(v)?"date":void 0},f.getYearContent(v)))},f=this,h=c;h<=p;h++)m(h);return d.createElement("div",{className:"react-datepicker__year"},d.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},r}(d.Component);function jy(n,r,e,t){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;e&&(s=ne(e)<=i),t&&s&&(s=ne(t)>=i),s&&o.push(i)}return o}var Hy=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;t.renderOptions=function(){var s=t.props.year,l=t.state.yearsList.map(function(p){return d.createElement("div",{className:s===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:t.onChange.bind(t,p),"aria-selected":s===p?"true":void 0},s===p?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),u=t.props.minDate?ne(t.props.minDate):null,c=t.props.maxDate?ne(t.props.maxDate):null;return(!c||!t.state.yearsList.find(function(p){return p===c}))&&l.unshift(d.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!u||!t.state.yearsList.find(function(p){return p===u}))&&l.push(d.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},t.onChange=function(s){t.props.onChange(s)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(s){var l=t.state.yearsList.map(function(u){return u+s});t.setState({yearsList:l})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var o=e.yearDropdownItemNumber,a=e.scrollableYearDropdown,i=o||(a?10:5);return t.state={yearsList:jy(t.props.year,i,t.props.minDate,t.props.maxDate)},t.dropdownRef=d.createRef(),t}return r.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,o=t?t.find(function(a){return a.ariaSelected}):null;e.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},r.prototype.render=function(){var e=We({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(fo,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),Ry=function(n){He(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?ne(e.props.minDate):1900,o=e.props.maxDate?ne(e.props.maxDate):2100,a=[],i=t;i<=o;i++)a.push(d.createElement("option",{key:i,value:i},i));return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(o){return e.toggleDropdown(o)}},d.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return d.createElement(Hy,fe({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,o){var a;(a=e.onSelect)===null||a===void 0||a.call(e,t,o),e.setOpen()},e.onSelect=function(t,o){var a,i;(i=(a=e.props).onSelect)===null||i===void 0||i.call(a,t,o)},e.setOpen=function(){var t,o;(o=(t=e.props).setOpen)===null||o===void 0||o.call(t,!0)},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),By=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Vy=function(n){var r=(n.className||"").split(/\s+/);return By.some(function(e){return r.indexOf(e)>=0})},zy=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;return t.monthContainer=void 0,t.handleClickOutside=function(o){t.props.onClickOutside(o)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(o){var a,i;Vy(o.target)&&((i=(a=t.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},t.getDateInView=function(){var o=t.props,a=o.preSelection,i=o.selected,s=o.openToDate,l=Gu(t.props),u=Xu(t.props),c=he(),p=s||i||a;return p||(l&&sn(c,l)?l:u&&Bt(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:ot(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:ln(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(o,a,i){t.props.onSelect(o,a,i),t.props.setPreSelection&&t.props.setPreSelection(o)},t.handleDayMouseEnter=function(o){t.setState({selectingDate:o}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(o)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(o,a){t.setState({selectingDate:mt(he(),a)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(o,a)},t.handleYearMouseLeave=function(o,a){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(o,a)},t.handleYearChange=function(o){var a,i,s,l;(i=(a=t.props).onYearChange)===null||i===void 0||i.call(a,o),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(o),(l=(s=t.props).setOpen)===null||l===void 0||l.call(s,!0)),t.props.setPreSelection&&t.props.setPreSelection(o)},t.getEnabledPreSelectionDateForMonth=function(o){if(!Je(o,t.props))return o;for(var a=Pt(o),i=fy(o),s=tv(i,a),l=null,u=0;u<=s;u++){var c=rt(a,u);if(!Je(c,t.props)){l=c;break}}return l},t.handleMonthChange=function(o){var a,i,s,l=(a=t.getEnabledPreSelectionDateForMonth(o))!==null&&a!==void 0?a:o;t.handleCustomMonthChange(l),t.props.adjustDateOnChange&&(t.props.onSelect(l),(s=(i=t.props).setOpen)===null||s===void 0||s.call(i,!0)),t.props.setPreSelection&&t.props.setPreSelection(l)},t.handleCustomMonthChange=function(o){var a,i;(i=(a=t.props).onMonthChange)===null||i===void 0||i.call(a,o),t.setState({isRenderAriaLiveMessage:!0})},t.handleMonthYearChange=function(o){t.handleYearChange(o),t.handleMonthChange(o)},t.changeYear=function(o){t.setState(function(a){var i=a.date;return{date:mt(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:Ge(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:mt(Ge(i,Be(o)),ne(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=Vt(o,t.props.locale,t.props.calendarStartDay),i=[];return t.props.showWeekNumbers&&i.push(d.createElement("div",{key:"W",className:"react-datepicker__day-name"},t.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(s){var l=rt(a,s),u=t.formatWeekday(l,t.props.locale),c=t.props.weekDayClassName?t.props.weekDayClassName(l):void 0;return d.createElement("div",{key:s,"aria-label":Ee(l,"EEEE",t.props.locale),className:We("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?py(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?hy(o,a):my(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Tn(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var o,a,i;if(!t.props.renderCustomHeader){var s=(o=t.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=t.props.showPreviousMonths?s-1:0,u=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,c=ln(t.state.date,u),p;switch(!0){case t.props.showMonthYearPicker:p=Ku(t.state.date,t.props);break;case t.props.showYearPicker:p=wy(t.state.date,t.props);break;case t.props.showQuarterYearPicker:p=by(t.state.date,t.props);break;default:p=Uu(c,t.props);break}if(!(!((i=t.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&p||t.props.showTimeSelectOnly)){var m=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],f=["react-datepicker__navigation","react-datepicker__navigation--previous"],h=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(h=t.decreaseYear),p&&t.props.showDisabledMonthNavigation&&(f.push("react-datepicker__navigation--previous--disabled"),h=void 0);var v=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,g=t.props,w=g.previousMonthButtonLabel,y=w===void 0?r.defaultProps.previousMonthButtonLabel:w,x=g.previousYearButtonLabel,E=x===void 0?r.defaultProps.previousYearButtonLabel:x,k=t.props,C=k.previousMonthAriaLabel,S=C===void 0?typeof y=="string"?y:"Previous Month":C,D=k.previousYearAriaLabel,_=D===void 0?typeof E=="string"?E:"Previous Year":D;return d.createElement("button",{type:"button",className:f.join(" "),onClick:h,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?_:S},d.createElement("span",{className:m.join(" ")},v?E:y))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Ct(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var o;if(!t.props.renderCustomHeader){var a;switch(!0){case t.props.showMonthYearPicker:a=qu(t.state.date,t.props);break;case t.props.showYearPicker:a=xy(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=yy(t.state.date,t.props);break;default:a=Qu(t.state.date,t.props);break}if(!(!((o=t.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&a||t.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(l=t.increaseYear),a&&t.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,c=t.props,p=c.nextMonthButtonLabel,m=p===void 0?r.defaultProps.nextMonthButtonLabel:p,f=c.nextYearButtonLabel,h=f===void 0?r.defaultProps.nextYearButtonLabel:f,v=t.props,g=v.nextMonthAriaLabel,w=g===void 0?typeof m=="string"?m:"Next Month":g,y=v.nextYearAriaLabel,x=y===void 0?typeof h=="string"?h:"Next Year":y;return d.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?x:w},d.createElement("span",{className:s.join(" ")},u?h:m))}}},t.renderCurrentMonth=function(o){o===void 0&&(o=t.state.date);var a=["react-datepicker__current-month"];return t.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),d.createElement("h2",{className:a.join(" ")},Ee(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(Ry,fe({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:ne(t.state.date)}))},t.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthDropdown||o))return d.createElement(Fy,fe({},r.defaultProps,t.props,{month:Be(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(Ay,fe({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(Wu(),o),t.props.setPreSelection&&t.props.setPreSelection(Wu())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return d.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return d.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(a),d.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(i!==0),t.renderMonthYearDropdown(i!==0),t.renderYearDropdown(i!==0)),d.createElement("div",{className:"react-datepicker__day-names"},t.header(a)))},t.renderCustomHeader=function(o){var a,i,s=o.monthDate,l=o.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var u=Uu(t.state.date,t.props),c=Qu(t.state.date,t.props),p=Ku(t.state.date,t.props),m=qu(t.state.date,t.props),f=!t.props.showMonthYearPicker&&!t.props.showQuarterYearPicker&&!t.props.showYearPicker;return d.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(i=(a=t.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,fe(fe({},t.state),{customHeaderCount:l,monthDate:s,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:u,nextMonthButtonDisabled:c,prevYearButtonDisabled:p,nextYearButtonDisabled:m})),f&&d.createElement("div",{className:"react-datepicker__day-names"},t.header(s)))},t.renderYearHeader=function(o){var a=o.monthDate,i=t.props,s=i.showYearPicker,l=i.yearItemNumber,u=l===void 0?r.defaultProps.yearItemNumber:l,c=zt(a,u),p=c.startPeriod,m=c.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(p," - ").concat(m):ne(a))},t.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,l={monthDate:a,i:s};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(l);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(l);default:return t.renderDefaultHeader(l)}},t.renderMonths=function(){var o,a;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var i=[],s=(o=t.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=t.props.showPreviousMonths?s-1:0,u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Ct(t.state.date,l):ln(t.state.date,l),c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,p=0;p<s;++p){var m=p-c+l,f=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Ct(u,m):ot(u,m),h="month-".concat(p),v=p<s-1,g=p>0;i.push(d.createElement("div",{key:h,ref:function(w){t.monthContainer=w??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:f,i:p}),d.createElement(Ny,fe({},r.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:f,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:p,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:v,monthShowsDuplicateDaysStart:g}))))}return i}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return d.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),d.createElement(Wy,fe({},r.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return d.createElement(Yy,fe({},r.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var o=t.props.selected?new Date(t.props.selected):void 0,a=o&&po(o)&&!!t.props.selected,i=a?"".concat(Zu(o.getHours()),":").concat(Zu(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(_y,fe({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=zt(t.state.date,(o=t.props.yearItemNumber)!==null&&o!==void 0?o:r.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,l;return t.props.showYearPicker?l="".concat(i," - ").concat(s):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?l=ne(t.state.date):l="".concat(ni(Be(t.state.date),t.props.locale)," ").concat(ne(t.state.date)),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&l)},t.renderChildren=function(){if(t.props.children)return d.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=d.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:cr}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){e.setState({monthContainer:e.monthContainer})}())},r.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&(!pe(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var o=!Ve(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!pe(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var e=this.props.container||ay;return d.createElement(fo,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:We("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},r}(d.Component),Uy=function(n){var r=n.icon,e=n.className,t=e===void 0?"":e,o=n.onClick,a="react-datepicker__calendar-icon";if(typeof r=="string")return d.createElement("i",{className:"".concat(a," ").concat(r," ").concat(t),"aria-hidden":"true",onClick:o});if(d.isValidElement(r)){var i=r;return d.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(a," ").concat(t),onClick:function(s){typeof i.props.onClick=="function"&&i.props.onClick(s),typeof o=="function"&&o(s)}})}return d.createElement("svg",{className:"".concat(a," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},d.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},ic=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return r.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},r.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},r.prototype.render=function(){return Se.createPortal(this.props.children,this.el)},r}(d.Component),Qy="[tabindex], a, button, input, select, textarea",Ky=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},sc=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;return t.getTabChildren=function(){var o;return Array.prototype.slice.call((o=t.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(Qy),1,-1).filter(Ky)},t.handleFocusStart=function(){var o=t.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},t.handleFocusEnd=function(){var o=t.getTabChildren();o&&o.length>1&&o[0].focus()},t.tabLoopRef=d.createRef(),t}return r.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:r.defaultProps.enableTabLoop)?d.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},d.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,d.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r}(d.Component);function qy(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=oy(fe({open:!o,whileElementsMounted:js,placement:e.popperPlacement,middleware:ht([zs({padding:15}),ba(10),Dp({element:a})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),s=fe(fe({},e),{hidePopper:o,popperProps:fe(fe({},i),{arrowRef:a})});return d.createElement(n,fe({},s))};return r}var Gy=function(n){He(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(r,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e=this.props,t=e.className,o=e.wrapperClassName,a=e.hidePopper,i=a===void 0?r.defaultProps.hidePopper:a,s=e.popperComponent,l=e.targetComponent,u=e.enableTabLoop,c=e.popperOnKeyDown,p=e.portalId,m=e.portalHost,f=e.popperProps,h=e.showArrow,v=void 0;if(!i){var g=We("react-datepicker-popper",t);v=d.createElement(sc,{enableTabLoop:u},d.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:g,"data-placement":f.placement,onKeyDown:c},s,h&&d.createElement(Xb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(v=d.createElement(this.props.popperContainer,{},v)),p&&!i&&(v=d.createElement(ic,{portalId:p,portalHost:m},v));var w=We("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:f.refs.setReference,className:w},l),v)},r}(d.Component),Xy=qy(Gy),lc="react-datepicker-ignore-onclickoutside";function Jy(n,r){return n&&r?Be(n)!==Be(r)||ne(n)!==ne(r):n!==r}var ai="Date input not valid.",Zy=function(n){He(r,n);function r(e){var t=n.call(this,e)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:he()},t.modifyHolidays=function(){var o;return(o=t.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return po(s)?ht(ht([],a,!0),[fe(fe({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=Gu(t.props),s=Xu(t.props),l=i&&sn(a,mo(i))?i:s&&Bt(a,ju(s))?s:a;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&o!==void 0?o:l,highlightDates:Ju(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(fe(fe({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(fe(fe({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.setFocus=function(){var o,a;(a=(o=t.input)===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o,{preventScroll:!0})},t.setBlur=function(){var o,a;(a=(o=t.input)===null||o===void 0?void 0:o.blur)===null||a===void 0||a.call(o),t.cancelFocusInput()},t.deferBlur=function(){requestAnimationFrame(function(){t.setBlur()})},t.setOpen=function(o,a){a===void 0&&(a=!1),t.setState({open:o,preSelection:o&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:ii},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return _t(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(o){var a,i,s=t.state.wasHidden,l=s?t.state.open:!0;s&&t.resetHiddenStatus(),t.state.preventFocus||((i=(a=t.props).onFocus)===null||i===void 0||i.call(a,o),l&&!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.handleBlur=function(o){var a,i;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((i=(a=t.props).onBlur)===null||i===void 0||i.call(a,o)),t.state.open&&t.props.open===!1&&t.setOpen(!1),t.setState({focused:!1})},t.handleCalendarClickOutside=function(o){var a,i;t.props.inline||t.setOpen(!1),(i=(a=t.props).onClickOutside)===null||i===void 0||i.call(a,o),t.props.withPortal&&o.preventDefault()},t.handleChange=function(){for(var o,a,i,s,l,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var p=u[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,u),!p||typeof p.isDefaultPrevented!="function"||p.isDefaultPrevented()))){t.setState({inputValue:(p==null?void 0:p.target)instanceof HTMLInputElement?p.target.value:null,lastPreSelectChange:ew});var m=t.props,f=m.selectsRange,h=m.startDate,v=m.endDate,g=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,w=(a=t.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,y=(p==null?void 0:p.target)instanceof HTMLInputElement?p.target.value:"";if(f){var x=y.split("-",2).map(function(T){return T.trim()}),E=x[0],k=x[1],C=Za(E??"",g,t.props.locale,w),S=Za(k??"",g,t.props.locale,w),D=(h==null?void 0:h.getTime())!==(C==null?void 0:C.getTime()),_=(v==null?void 0:v.getTime())!==(S==null?void 0:S.getTime());if(!D&&!_||C&&Je(C,t.props)||S&&Je(S,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[C,S],p)}else{var O=Za(y,g,t.props.locale,w,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(O||!y)&&t.setSelected(O,p,!0)}}},t.handleSelect=function(o,a,i){if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&t.sendFocusBackToInput(),t.props.onChangeRaw&&t.props.onChangeRaw(a),t.setSelected(o,a,!1,i),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect)t.setPreSelection(o);else if(!t.props.inline){t.props.selectsRange||t.setOpen(!1);var s=t.props,l=s.startDate,u=s.endDate;l&&!u&&(t.props.swapRange||!nc(o,l))&&t.setOpen(!1)}},t.setSelected=function(o,a,i,s){var l,u,c=o;if(t.props.showYearPicker){if(c!==null&&yo(ne(c),t.props))return}else if(t.props.showMonthYearPicker){if(c!==null&&Ru(c,t.props))return}else if(c!==null&&Je(c,t.props))return;var p=t.props,m=p.onChange,f=p.selectsRange,h=p.startDate,v=p.endDate,g=p.selectsMultiple,w=p.selectedDates,y=p.minTime,x=p.swapRange;if(!un(t.props.selected,c)||t.props.allowSameDay||f||g)if(c!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(c=ei(c,{hour:Ot(t.props.selected),minute:Mt(t.props.selected),second:Rt(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&y&&(c=ei(c,{hour:y.getHours(),minute:y.getMinutes(),second:y.getSeconds()})),t.props.inline||t.setState({preSelection:c}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),f){var E=!h&&!v,k=h&&!v,C=h&&v;E?m==null||m([c,null],a):k&&(c===null?m==null||m([null,null],a):nc(c,h)?x?m==null||m([c,h],a):m==null||m([c,null],a):m==null||m([h,c],a)),C&&(m==null||m([c,null],a))}else if(g){if(c!==null)if(!(w!=null&&w.length))m==null||m([c],a);else{var S=w.some(function(_){return pe(_,c)});if(S){var D=w.filter(function(_){return!pe(_,c)});m==null||m(D,a)}else m==null||m(ht(ht([],w,!0),[c],!1),a)}}else m==null||m(c,a);i||((u=(l=t.props).onSelect)===null||u===void 0||u.call(l,c,a),t.setState({inputValue:null}))},t.setPreSelection=function(o){var a=_t(t.props.minDate),i=_t(t.props.maxDate),s=!0;if(o){var l=mo(o);if(a&&i)s=fr(o,t.props.minDate,t.props.maxDate);else if(a){var u=mo(t.props.minDate);s=Bt(o,u)||un(l,u)}else if(i){var c=ju(t.props.maxDate);s=sn(o,c)||un(l,c)}}s&&t.setState({preSelection:o})},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(o){var a,i;if(!(t.props.selectsRange||t.props.selectsMultiple)){var s=t.props.selected?t.props.selected:t.getPreSelection(),l=t.props.selected?o:ei(s,{hour:Ot(o),minute:Mt(o)});t.setState({preSelection:l}),(i=(a=t.props).onChange)===null||i===void 0||i.call(a,l),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var o,a;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(a=(o=t.props).onInputClick)===null||a===void 0||a.call(o)},t.onInputKeyDown=function(o){var a,i,s,l,u,c;(i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o);var p=o.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(p===j.ArrowDown||p===j.ArrowUp||p===j.Enter)&&((s=t.onInputClick)===null||s===void 0||s.call(t));return}if(t.state.open){if(p===j.ArrowDown||p===j.ArrowUp){o.preventDefault();var m=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',f=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(m);f instanceof HTMLElement&&f.focus({preventScroll:!0});return}var h=he(t.state.preSelection);p===j.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===ii?(t.handleSelect(h,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(h)):t.setOpen(!1)):p===j.Escape?(o.preventDefault(),o.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):p===j.Tab&&t.setOpen(!1),t.inputOk()||(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:ai})}},t.onPortalKeyDown=function(o){var a=o.key;a===j.Escape&&(o.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(o){var a,i,s,l,u,c,p=t.props,m=p.minDate,f=p.maxDate,h=p.disabledKeyboardNavigation,v=p.showWeekPicker,g=p.shouldCloseOnSelect,w=p.locale,y=p.calendarStartDay,x=p.adjustDateOnChange,E=p.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!h){var k=o.key,C=o.shiftKey,S=he(t.state.preSelection),D=function(L,$){var z=$;switch(L){case j.ArrowRight:z=v?Zr($,1):rt($,1);break;case j.ArrowLeft:z=v?Iu($):Jg($);break;case j.ArrowUp:z=Iu($);break;case j.ArrowDown:z=Zr($,1);break;case j.PageUp:z=C?Tn($,1):ln($,1);break;case j.PageDown:z=C?Ct($,1):ot($,1);break;case j.Home:z=Vt($,w,y);break;case j.End:z=dy($);break}return z},_=function(L,$){for(var z=40,P=L,q=!1,X=0,G=D(L,$);!q;){if(X>=z){G=$;break}m&&G<m&&(P=j.ArrowRight,G=Je(m,t.props)?D(P,G):m),f&&G>f&&(P=j.ArrowLeft,G=Je(f,t.props)?D(P,G):f),Je(G,t.props)?((P===j.PageUp||P===j.Home)&&(P=j.ArrowRight),(P===j.PageDown||P===j.End)&&(P=j.ArrowLeft),G=D(P,G)):q=!0,X++}return G};if(k===j.Enter){o.preventDefault(),t.handleSelect(S,o),!g&&t.setPreSelection(S);return}else if(k===j.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:ai});return}var O=null;switch(k){case j.ArrowLeft:case j.ArrowRight:case j.ArrowUp:case j.ArrowDown:case j.PageUp:case j.PageDown:case j.Home:case j.End:O=_(k,S);break}if(!O){(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:ai});return}if(o.preventDefault(),t.setState({lastPreSelectChange:ii}),x&&t.setSelected(O),t.setPreSelection(O),E){var T=Be(S),Y=Be(O),W=ne(S),N=ne(O);T!==Y||W!==N?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===j.Escape&&(o.preventDefault(),t.sendFocusBackToInput())},t.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),t.sendFocusBackToInput();var a=t.props,i=a.selectsRange,s=a.onChange;i?s==null||s([null,null],o):s==null||s(null,o),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(o){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(o)&&t.setOpen(!1)},t.renderCalendar=function(){var o,a;return!t.props.inline&&!t.isCalendarOpen()?null:d.createElement(zy,fe({showMonthYearDropdown:void 0,ref:function(i){t.calendar=i}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(o=t.props.dateFormatCalendar)!==null&&o!==void 0?o:r.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:Ey(t.modifyHolidays()),outsideClickIgnoreClass:lc,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(a=t.props.dropdownMode)!==null&&a!==void 0?a:r.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var o=t.props,a=o.dateFormat,i=a===void 0?r.defaultProps.dateFormat:a,s=o.locale,l=t.props.showTimeInput||t.props.showTimeSelect,u=l?"PPPPp":"PPPP",c;return t.props.selectsRange?c="Selected start date: ".concat(Xe(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+Xe(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(Xe(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(Xe(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(Xe(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(Xe(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(Xe(t.props.selected,{dateFormat:u,locale:s})),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},t.renderDateInput=function(){var o,a,i,s=We(t.props.className,(o={},o[lc]=t.state.open,o)),l=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",c=t.props,p=c.dateFormat,m=p===void 0?r.defaultProps.dateFormat:p,f=c.locale,h=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?sy(t.props.startDate,t.props.endDate,{dateFormat:m,locale:f}):t.props.selectsMultiple?ly((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:m,locale:f}):Xe(t.props.selected,{dateFormat:m,locale:f});return d.cloneElement(l,(a={},a[u]=function(v){t.input=v},a.value=h,a.onBlur=t.handleBlur,a.onChange=t.handleChange,a.onClick=t.onInputClick,a.onFocus=t.handleFocus,a.onKeyDown=t.onInputKeyDown,a.id=t.props.id,a.name=t.props.name,a.form=t.props.form,a.autoFocus=t.props.autoFocus,a.placeholder=t.props.placeholderText,a.disabled=t.props.disabled,a.autoComplete=t.props.autoComplete,a.className=We(l.props.className,s),a.title=t.props.title,a.readOnly=t.props.readOnly,a.required=t.props.required,a.tabIndex=t.props.tabIndex,a["aria-describedby"]=t.props.ariaDescribedBy,a["aria-invalid"]=t.props.ariaInvalid,a["aria-labelledby"]=t.props.ariaLabelledBy,a["aria-required"]=t.props.ariaRequired,a))},t.renderClearButton=function(){var o=t.props,a=o.isClearable,i=o.disabled,s=o.selected,l=o.startDate,u=o.endDate,c=o.clearButtonTitle,p=o.clearButtonClassName,m=p===void 0?"":p,f=o.ariaLabelClose,h=f===void 0?"Close":f,v=o.selectedDates;return a&&(s!=null||l!=null||u!=null||v!=null&&v.length)?d.createElement("button",{type:"button",className:We("react-datepicker__close-icon",m,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":h,onClick:t.onClearClick,title:c,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(r,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:cr,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.componentDidUpdate=function(e,t){var o,a,i,s;e.inline&&Jy(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Ju(this.props.highlightDates)}),!t.focused&&!un(e.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),t.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},r.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.renderInputContainer=function(){var e=this.props,t=e.showIcon,o=e.icon,a=e.calendarIconClassname,i=e.calendarIconClassName,s=e.toggleCalendarOnIconClick,l=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),d.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&d.createElement(Uy,fe({icon:o,className:We(i,!i&&a,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},r.prototype.render=function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?d.createElement(sc,{enableTabLoop:this.props.enableTabLoop},d.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=d.createElement(ic,fe({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(Xy,fe({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(d.Component),ew="input",ii="navigate";const tw=({label:n,placeholder:r,value:e,onChange:t,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(c,p)=>1990+p),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=d.forwardRef(({value:c,onClick:p},m)=>M.jsx("button",{"aria-label":"inputButton",type:"button",id:n,className:"bg-background-secondary placeholder:text-petnow-grey-primary h-[60px] w-full cursor-pointer rounded-xl p-4 text-left text-xl focus:outline-hidden disabled:opacity-50",onClick:p,ref:m,children:c||M.jsx("p",{className:"text-petnow-grey-primary",children:r})}));l.displayName="CustomInput";function u(c){const p=c.substring(0,4),m=c.substring(5,7),f=c.substring(8,10);return new Date(Number(p),Number(m)-1,Number(f))}return M.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[M.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),M.jsx(Zy,{disabledKeyboardNavigation:!0,locale:Bb,id:n,name:"출생일",placeholderText:r,onChange:c=>c&&t(c),selected:e?u(e):void 0,value:e,dateFormat:"yyyy-MM-dd",autoComplete:"off",maxDate:new Date,customInput:M.jsx(l,{}),renderCustomHeader:({date:c,changeYear:p,changeMonth:m,decreaseMonth:f,increaseMonth:h})=>M.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[M.jsx("button",{onClick:f,disabled:c.getFullYear()<=1990&&c.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:M.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),M.jsxs("div",{className:"text-lg",children:[M.jsx("select",{"aria-label":"yearsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 w-auto cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:ne(c),onChange:({target:{value:v}})=>p(Number(v)),children:i.map(v=>M.jsx("option",{value:v,children:v},v))}),M.jsx("span",{className:"mr-2 ml-1",children:"년"}),M.jsx("select",{"aria-label":"monthsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:s[Be(c)],onChange:({target:{value:v}})=>m(s.indexOf(v)),children:s.map(v=>M.jsx("option",{value:v,children:v},v))}),M.jsx("span",{className:"mx-1",children:"월"})]}),M.jsx("button",{onClick:h,disabled:c.getFullYear()>=new Date().getFullYear()&&c.getMonth()>=new Date().getMonth(),type:"button",className:"react-datepicker__navigation react-datepicker__navigation--next","aria-label":"Next Month",children:M.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&M.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function nw(n){return ir({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},child:[]}]})(n)}const rw=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>M.jsx("div",{className:"text-petnow-grey-tertiary relative",children:M.jsxs(Sh,{disabled:a,onChange:o,children:[M.jsx(Mr,{className:"text-xl font-bold text-black",children:n}),M.jsxs(Xl,{className:"bg-background-secondary placeholder:text-petnow-grey-primary relative mt-4 h-[60px] w-full cursor-pointer rounded-xl p-4 text-start text-xl focus:outline-hidden disabled:opacity-50",children:[e.name?M.jsx("p",{children:e.name}):M.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",M.jsx(nw,{className:"absolute right-4 bottom-5"})]}),M.jsx(Jl,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>M.jsx(Zl,{value:i,as:M.Fragment,children:({focus:s,selected:l})=>M.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${s?"bg-background-tertiary":"bg-background-secondary"} ${l&&"bg-background-tertiary"}`,children:i.name})},i.name))})]})}),ow=({className:n,id:r,name:e,onChange:t,disabled:o,checked:a})=>M.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:wr("petnowRadio size-[3.5vw]",n),onChange:t}),aw=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,u]=d.useState("");let c;const p=h=>{c&&clearTimeout(c),c=setTimeout(async()=>{u(h.target.value)},200)},m=h=>{u(h.target.value)},f=l===""?t.slice(0,4):t.filter(h=>{var v;return(v=h.name)==null?void 0:v.replace(/ /g,"").includes(l.replace(/ /g,""))}).slice(0,4);return M.jsxs("div",{children:[M.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:M.jsxs(Cm,{onChange:h=>{o(h)},disabled:a,children:[M.jsx(Mr,{className:"text-xl font-bold text-black",children:n}),M.jsx(Cl,{"aria-label":"comboboxInput",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 flex w-full items-center justify-between rounded-xl p-4 text-xl focus:outline-hidden disabled:opacity-50",value:e,onChange:s?m:p,onKeyDown:h=>{h.key==="Backspace"&&o({name:void 0,value:void 0})},placeholder:r,autoComplete:"off"}),M.jsx(_l,{className:"absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",style:{bottom:-f.length*60},children:f.map(h=>M.jsx(Ol,{value:h,as:d.Fragment,children:({focus:v,selected:g})=>M.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${v?"bg-background-tertiary":"bg-background-secondary"} ${g&&"bg-background-tertiary"}`,children:h.name})},h.name))})]})}),i&&M.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})},iw=({tabList:n,onTabChange:r})=>{const[e,t]=d.useState(n[0]),o=a=>{if(a<=1||a>4)throw new Error("[@petnow/ui/Tabs] Tab에 들어갈 수 있는 길이는 2~4개입니다.");return a===2?`absolute h-[2px] w-[50%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":"translate-x-[100%]"}`:a===3?`absolute h-[2px] w-[33.3%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(e)===JSON.stringify(n[1])?"translate-x-[100%]":"translate-x-[200%]"}`:`absolute h-[2px] w-[25%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(e)===JSON.stringify(n[1])?"translate-x-[100%]":JSON.stringify(e)===JSON.stringify(n[2])?"translate-x-[200%]":"translate-x-[300%]"}`};return M.jsxs("div",{className:"flex flex-col text-2xl font-bold",children:[M.jsx("div",{className:"flex",children:n.map(a=>M.jsx("div",{className:"flex flex-1 flex-col",children:M.jsx("button",{className:`cursor-pointer py-5 hover:text-black ${JSON.stringify(a)===JSON.stringify(e)?"text-black":"text-petnow-grey-secondary"}`,onClick:()=>{t(a),r(a)},children:a.displayName})},a.key))}),M.jsx("div",{className:"bg-petnow-grey-primary relative h-[2px] w-full",children:M.jsx("div",{className:o(n.length)})})]})};ke.AccordionCard=Qh,ke.Checkbox=Fh,ke.CtaButton=Pi,ke.LabeledAddressInput=Rh,ke.LabeledAutocomplete=aw,ke.LabeledDatepicker=tw,ke.LabeledSelect=rw,ke.Modal=Vh,ke.Radio=ow,ke.Tabs=iw,Object.defineProperty(ke,Symbol.toStringTag,{value:"Module"})});
80
+ */var Zi=function(r,e){return Zi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])},Zi(r,e)};function ze(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Zi(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var me=function(){return me=Object.assign||function(e){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},me.apply(this,arguments)};function kt(n,r,e){if(e||arguments.length===2)for(var t=0,o=r.length,a;t<o;t++)(a||!(t in r))&&(a||(a=Array.prototype.slice.call(r,0,t)),a[t]=r[t]);return n.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var W0=function(n){var r=n.showTimeSelectOnly,e=r===void 0?!1:r,t=n.showTime,o=t===void 0?!1:t,a=n.className,i=n.children,s=e?"Choose Time":"Choose Date".concat(o?" and Time":"");return d.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},H0=function(n,r){var e=d.useRef(null),t=d.useRef(n);t.current=n;var o=d.useCallback(function(a){var i,s=a.composed&&a.composedPath&&a.composedPath().find(function(l){return l instanceof Node})||a.target;e.current&&!e.current.contains(s)&&(r&&s instanceof HTMLElement&&s.classList.contains(r)||(i=t.current)===null||i===void 0||i.call(t,a))},[r]);return d.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),e},Uo=function(n){var r=n.children,e=n.onClickOutside,t=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=H0(e,i);return d.createElement("div",{className:t,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},K;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(K||(K={}));function Sd(){var n=typeof window<"u"?window:globalThis;return n}var Fr=12;function xe(n){if(n==null)return new Date;var r=typeof n=="string"?Fw(n):ae(n);return Qo(r)?r:new Date}function es(n,r,e,t,o){o===void 0&&(o=xe());for(var a=Kn(e)||Kn(ns()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var u=l[s],c=Mw(n,u,o,{locale:a});if(Qo(c)&&(!t||n===Oe(c,u,e)))return c}return null}function Qo(n,r){return $o(n)&&!xn(n,new Date("1/1/1800"))}function Oe(n,r,e){if(e==="en")return fd(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?Kn(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||Kn(ns()),fd(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function st(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&Oe(n,o,t)||""}var kd=" - ";function B0(n,r,e){if(!n)return"";var t=st(n,e),o=r?st(r,e):"";return"".concat(t).concat(kd).concat(o)}function V0(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?st(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=st(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function ts(n,r){var e=r.hour,t=e===void 0?0:e,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return Bo(Vo(zo(n,s),a),t)}function z0(n){return qi(n)}function q0(n,r){return Oe(n,"ddd",r)}function Go(n){return bn(n)}function on(n,r,e){var t=Kn(r||ns());return Yt(n,{locale:t,weekStartsOn:e})}function Vt(n){return nd(n)}function $r(n){return jo(n)}function _d(n){return zi(n)}function Cd(){return bn(xe())}function Od(n){return ed(n)}function U0(n){return Yb(n)}function Q0(n){return td(n)}function _t(n,r){return n&&r?Nw(n,r):!n&&!r}function Qe(n,r){return n&&r?Pw(n,r):!n&&!r}function Ko(n,r){return n&&r?Iw(n,r):!n&&!r}function ve(n,r){return n&&r?$b(n,r):!n&&!r}function Dn(n,r){return n&&r?Ly(n,r):!n&&!r}function Ar(n,r,e){var t,o=bn(r),a=ed(e);try{t=Ir(n,{start:o,end:a})}catch{t=!1}return t}function ns(){var n=Sd();return n.__localeId__}function Kn(n){if(typeof n=="string"){var r=Sd();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function G0(n,r,e){return r(Oe(n,"EEEE",e))}function K0(n,r){return Oe(n,"EEEEEE",r)}function X0(n,r){return Oe(n,"EEE",r)}function rs(n,r){return Oe(it(xe(),n),"LLLL",r)}function Md(n,r){return Oe(it(xe(),n),"LLL",r)}function J0(n,r){return Oe(Qn(xe(),n),"QQQ",r)}function lt(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.excludeDateIntervals,s=e.includeDates,l=e.includeDateIntervals,u=e.filterDate;return Yr(n,{minDate:t,maxDate:o})||a&&a.some(function(c){return c instanceof Date?ve(n,c):ve(n,c.date)})||i&&i.some(function(c){var f=c.start,h=c.end;return Ir(n,{start:f,end:h})})||s&&!s.some(function(c){return ve(n,c)})||l&&!l.some(function(c){var f=c.start,h=c.end;return Ir(n,{start:f,end:h})})||u&&!u(xe(n))||!1}function os(n,r){var e=r===void 0?{}:r,t=e.excludeDates,o=e.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return Ir(n,{start:i,end:s})}):t&&t.some(function(a){var i;return a instanceof Date?ve(n,a):ve(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Td(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Yr(n,{minDate:t?nd(t):void 0,maxDate:o?td(o):void 0})||(a==null?void 0:a.some(function(l){return Qe(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Qe(n,l)})||s&&!s(xe(n))||!1}function Xo(n,r,e,t){var o=le(n),a=qe(n),i=le(r),s=qe(r),l=le(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function Z0(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return Yr(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return Qe(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return Qe(s,n)})||!1}function Jo(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Yr(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return Ko(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ko(n,l)})||s&&!s(xe(n))||!1}function Zo(n,r,e){if(!r||!e||!$o(r)||!$o(e))return!1;var t=le(r),o=le(e);return t<=n&&o>=n}function ea(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate,l=new Date(n,0,1);return Yr(l,{minDate:t?jo(t):void 0,maxDate:o?rd(o):void 0})||(a==null?void 0:a.some(function(u){return _t(l,u instanceof Date?u:u.date)}))||i&&!i.some(function(u){return _t(l,u)})||s&&!s(xe(l))||!1}function ta(n,r,e,t){var o=le(n),a=yn(n),i=le(r),s=yn(r),l=le(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function Yr(n,r){var e,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(e=o&&zn(n,o)<0||a&&zn(n,a)>0)!==null&&e!==void 0?e:!1}function Pd(n,r){return r.some(function(e){return Ht(e)===Ht(n)&&Bt(e)===Bt(n)&&nn(e)===nn(n)})}function Id(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&Pd(n,t)||o&&!Pd(n,o)||a&&!a(n)||!1}function Nd(n,r){var e=r.minTime,t=r.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var o=xe();o=Bo(o,Ht(n)),o=Vo(o,Bt(n)),o=zo(o,nn(n));var a=xe();a=Bo(a,Ht(e)),a=Vo(a,Bt(e)),a=zo(a,nn(e));var i=xe();i=Bo(i,Ht(t)),i=Vo(i,Bt(t)),i=zo(i,nn(t));var s;try{s=!Ir(o,{start:a,end:i})}catch{s=!1}return s}function Ld(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=En(n,1);return t&&Ao(t,a)>0||o&&o.every(function(i){return Ao(i,a)>0})||!1}function Fd(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=pt(n,1);return t&&Ao(a,t)>0||o&&o.every(function(i){return Ao(a,i)>0})||!1}function ex(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=jo(n),i=yd(a);return t&&Yo(t,i)>0||o&&o.every(function(s){return Yo(s,i)>0})||!1}function tx(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=rd(n),i=Vi(a,1);return t&&Yo(i,t)>0||o&&o.every(function(s){return Yo(i,s)>0})||!1}function $d(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Gn(n,1);return t&&Ro(t,a)>0||o&&o.every(function(i){return Ro(i,a)>0})||!1}function nx(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?Fr:o,i=$r(Gn(n,a)),s=an(i,a).endPeriod,l=t&&le(t);return l&&l>s||!1}function Ad(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=jt(n,1);return t&&Ro(a,t)>0||o&&o.every(function(i){return Ro(a,i)>0})||!1}function rx(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?Fr:o,i=jt(n,a),s=an(i,a).startPeriod,l=t&&le(t);return l&&l<s||!1}function Yd(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return zn(o,r)>=0});return Jc(t)}else return e?Jc(e):r}function Rd(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return zn(o,r)<=0});return Xc(t)}else return e?Xc(e):r}function jd(n,r){var e;n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var t=new Map,o=0,a=n.length;o<a;o++){var i=n[o];if(Wt(i)){var s=Oe(i,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(r)||(l.push(r),t.set(s,l))}else if(typeof i=="object"){var u=Object.keys(i),c=(e=u[0])!==null&&e!==void 0?e:"",f=i[c];if(typeof c=="string"&&Array.isArray(f))for(var h=0,p=f.length;h<p;h++){var m=f[h];if(m){var s=Oe(m,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function ox(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function ax(n,r){n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--holidays");var e=new Map;return n.forEach(function(t){var o=t.date,a=t.holidayName;if(Wt(o)){var i=Oe(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&ox(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?kt(kt([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function ix(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=Ib(l,Ht(u)),l=Bi(l,Bt(u)),l=Fb(l,nn(u)));var c=Bi(n,(e+1)*t);rn(l,r)&&xn(l,c)&&u!=null&&i.push(u)}return i}function Wd(n){return n<10?"0".concat(n):"".concat(n)}function an(n,r){r===void 0&&(r=Fr);var e=Math.ceil(le(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function sx(n){var r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),e=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+e-+r)/36e5)}function Hd(n){var r=n.getSeconds(),e=n.getMilliseconds();return ae(n.getTime()-r*1e3-e)}function lx(n,r){return Hd(n).getTime()===Hd(r).getTime()}function Bd(n){if(!Wt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function Vd(n,r){if(!Wt(n)||!Wt(r))throw new Error("Invalid date received");var e=Bd(n),t=Bd(r);return xn(e,t)}function zd(n){return n.key===K.Space}var ux=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.inputRef=d.createRef(),t.onTimeChange=function(o){var a,i;t.setState({time:o});var s=t.props.date,l=s instanceof Date&&!isNaN(+s),u=l?s:new Date;if(o!=null&&o.includes(":")){var c=o.split(":"),f=c[0],h=c[1];u.setHours(Number(f)),u.setMinutes(Number(h))}(i=(a=t.props).onChange)===null||i===void 0||i.call(a,u)},t.renderTimeInput=function(){var o=t.state.time,a=t.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?d.cloneElement(l,{date:i,value:o,onChange:t.onTimeChange}):d.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var u;(u=t.inputRef.current)===null||u===void 0||u.focus()},required:!0,value:o,onChange:function(u){t.onTimeChange(u.target.value||s)}})},t.state={time:t.props.timeString},t}return r.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},r.prototype.render=function(){return d.createElement("div",{className:"react-datepicker__input-time-container"},d.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),d.createElement("div",{className:"react-datepicker-time__input-container"},d.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r}(d.Component),cx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.dayEl=d.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===K.Space&&(t.preventDefault(),t.key=K.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isSameDay=function(t){return ve(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var o=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(i){return e.isSameDayOrWeek(i)}):e.isSameDayOrWeek(e.props.selected),a=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!o&&e.isSameDayOrWeek(e.props.preSelection)&&!a},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),lt(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(){return os(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return ve(e.props.day,on(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&ve(t,on(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,o=t.day,a=t.highlightDates;if(!a)return!1;var i=Oe(o,"MM.dd.yyyy");return a.get(i)},e.getHolidaysClass=function(){var t,o=e.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=Oe(a,"MM.dd.yyyy");return i.has(s)?[(t=i.get(s))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:Ar(o,a,i)},e.isInSelectingRange=function(){var t,o=e.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,u=o.selectsDisabledDaysInRange,c=o.startDate,f=o.endDate,h=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(i||s||l)||!h||!u&&e.isDisabled()?!1:i&&f&&(xn(h,f)||Dn(h,f))?Ar(a,h,f):s&&c&&(rn(h,c)||Dn(h,c))||l&&c&&!f&&(rn(h,c)||Dn(h,c))?Ar(a,c,h):!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.startDate,s=o.selectsStart,l=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s?ve(a,l):ve(a,i)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,u=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s||l?ve(a,u):ve(a,i)},e.isRangeStart=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ve(a,o)},e.isRangeEnd=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ve(i,o)},e.isWeekend=function(){var t=Ty(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===qe(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(qe(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(xe())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(o){return e.isSameDayOrWeek(o)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var o=e.props.dayClassName?e.props.dayClassName(t):void 0;return Be("react-datepicker__day",o,"react-datepicker__day--"+q0(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,o=t.day,a=t.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=t.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,u=e.isDisabled()||e.isExcluded()?l:i;return"".concat(u," ").concat(Oe(o,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,o=t.day,a=t.holidays,i=a===void 0?new Map:a,s=t.excludeDates,l=Oe(o,"MM.dd.yyyy"),u=[];return i.has(l)&&u.push.apply(u,i.get(l).holidayNames),e.isExcluded()&&u.push(s==null?void 0:s.filter(function(c){return c instanceof Date?ve(c,o):ve(c==null?void 0:c.date,o)}).map(function(c){if(!(c instanceof Date))return c==null?void 0:c.message})),u.join(", ")},e.getTabIndex=function(){var t=e.props.selected,o=e.props.preSelection,a=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&ve(o,t))?0:-1;return a},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(pd(e.props.day),e.props.day):pd(e.props.day)},e.render=function(){return d.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&d.createElement("span",{className:"overlay"},e.getTitle()))},e}return r.prototype.componentDidMount=function(){this.handleFocusDay()},r.prototype.componentDidUpdate=function(){this.handleFocusDay()},r.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},r.prototype.isDayActiveElement=function(){var e,t,o;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},r.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},r}(d.Component),dx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.weekNumberEl=d.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===K.Space&&(t.preventDefault(),t.key=K.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ve(e.props.date,e.props.selected)&&ve(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||ve(e.props.date,e.props.selected)&&ve(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var o=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&ve(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(o=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},r.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},r.prototype.render=function(){var e=this.props,t=e.weekNumber,o=e.isWeekDisabled,a=e.ariaLabelPrefix,i=a===void 0?r.defaultProps.ariaLabelPrefix:a,s=e.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!o,"react-datepicker__week-number--selected":!!s&&ve(this.props.date,this.props.selected)};return d.createElement("div",{ref:this.weekNumberEl,className:Be(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),fx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return lt(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,o){e.props.onDayClick&&e.props.onDayClick(t,o)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,o,a){for(var i,s,l,u=new Date(t),c=0;c<7;c++){var f=new Date(t);f.setDate(f.getDate()+c);var h=!e.isDisabled(f);if(h){u=f;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(u,o,a),e.props.showWeekPicker&&e.handleDayClick(u,a),((i=e.props.shouldCloseOnSelect)!==null&&i!==void 0?i:r.defaultProps.shouldCloseOnSelect)&&((l=(s=e.props).setOpen)===null||l===void 0||l.call(s,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):z0(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),o=ft(t,6),a=new Date(t);a<=o;){if(!e.isDisabled(a))return!1;a=ft(a,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),o=[],a=e.formatWeekNumber(t);if(e.props.showWeekNumber){var i=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,a):void 0;o.push(d.createElement(dx,me({key:"W"},r.defaultProps,e.props,{weekNumber:a,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=ft(t,s);return d.createElement(cx,me({},r.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:e.handleDayClick.bind(e,l),onMouseEnter:e.handleDayMouseEnter.bind(e,l)}))}))},e.startOfWeek=function(){return on(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ve(e.startOfWeek(),e.props.selected)&&ve(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":ve(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return d.createElement("div",{className:Be(e)},this.renderDays())},r}(d.Component),Rr,px=6,Xn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},as=(Rr={},Rr[Xn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Rr[Xn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Rr[Xn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Rr),na=1;function qd(n,r){return n?Xn.FOUR_COLUMNS:r?Xn.TWO_COLUMNS:Xn.THREE_COLUMNS}var hx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=kt([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=kt([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return lt(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(t){return os(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,o){var a,i;(i=(a=e.props).onDayClick)===null||i===void 0||i.call(a,t,o,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var o,a;(a=(o=e.props).onDayMouseEnter)===null||a===void 0||a.call(o,t)},e.handleMouseLeave=function(){var t,o;(o=(t=e.props).onMouseLeave)===null||o===void 0||o.call(t)},e.isRangeStartMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Qe(it(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ko(Qn(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Qe(it(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ko(Qn(a,t),s)},e.isInSelectingRangeMonth=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,f=a.endDate,h=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!h?!1:s&&f?Xo(h,f,t,i):l&&c||u&&c&&!f?Xo(c,h,t,i):!1},e.isSelectingMonthRangeStart=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.startDate,l=a.selectsStart,u=it(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?Qe(u,c):Qe(u,s)},e.isSelectingMonthRangeEnd=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.endDate,l=a.selectsEnd,u=a.selectsRange,c=it(i,t),f=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?Qe(c,f):Qe(c,s)},e.isInSelectingRangeQuarter=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,f=a.endDate,h=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!h?!1:s&&f?ta(h,f,t,i):l&&c||u&&c&&!f?ta(c,h,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=ft(t,6);return Qe(t,o)||Qe(a,o)},e.isCurrentMonth=function(t,o){return le(t)===le(xe())&&o===qe(xe())},e.isCurrentQuarter=function(t,o){return le(t)===le(xe())&&o===yn(xe())},e.isSelectedMonth=function(t,o,a){return qe(a)===o&&le(t)===le(a)},e.isSelectMonthInList=function(t,o,a){return a.some(function(i){return e.isSelectedMonth(t,o,i)})},e.isSelectedQuarter=function(t,o,a){return yn(t)===o&&le(t)===le(a)},e.isMonthSelected=function(){var t=e.props,o=t.day,a=t.selected,i=t.selectedDates,s=t.selectsMultiple,l=qe(o);return s?i==null?void 0:i.some(function(u){return e.isSelectedMonth(o,l,u)}):!!a&&e.isSelectedMonth(o,l,a)},e.renderWeeks=function(){for(var t=[],o=e.props.fixedHeight,a=0,i=!1,s=on(Vt(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(m){return e.props.showWeekPicker?on(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(m){return e.props.showWeekPicker?on(m,e.props.locale,e.props.calendarStartDay):e.props.selected},c=e.props.selected?u(e.props.selected):void 0,f=e.props.preSelection?l(e.props.preSelection):void 0;t.push(d.createElement(fx,me({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:qe(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:f,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Fo(s,1);var h=o&&a>=px,p=!o&&!e.isWeekInMonth(s);if(h||p)if(e.props.peekNextMonth)i=!0;else break}return t},e.onMonthClick=function(t,o){var a=e.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||e.handleDayClick(Vt(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter(Vt(i))},e.handleMonthNavigation=function(t,o){var a,i,s,l;(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.MONTH_REFS[t])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},e.handleKeyboardNavigation=function(t,o,a){var i,s=e.props,l=s.selected,u=s.preSelection,c=s.setPreSelection,f=s.minDate,h=s.maxDate,p=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(u){var v=qd(p,m),g=e.getVerticalOffset(v),x=(i=as[v])===null||i===void 0?void 0:i.grid,E=function($,_,C){var O,R,b=_,S=C;switch($){case K.ArrowRight:b=pt(_,na),S=C===11?0:C+na;break;case K.ArrowLeft:b=En(_,na),S=C===0?11:C-na;break;case K.ArrowUp:b=En(_,g),S=!((O=x==null?void 0:x[0])===null||O===void 0)&&O.includes(C)?C+12-g:C-g;break;case K.ArrowDown:b=pt(_,g),S=!((R=x==null?void 0:x[x.length-1])===null||R===void 0)&&R.includes(C)?C-12+g:C+g;break}return{newCalculatedDate:b,newCalculatedMonth:S}},w=function($,_,C){for(var O=40,R=$,b=!1,S=0,L=E(R,_,C),P=L.newCalculatedDate,N=L.newCalculatedMonth;!b;){if(S>=O){P=_,N=C;break}if(f&&P<f){R=K.ArrowRight;var z=E(R,P,N);P=z.newCalculatedDate,N=z.newCalculatedMonth}if(h&&P>h){R=K.ArrowLeft;var z=E(R,P,N);P=z.newCalculatedDate,N=z.newCalculatedMonth}if(Z0(P,e.props)){var z=E(R,P,N);P=z.newCalculatedDate,N=z.newCalculatedMonth}else b=!0;S++}return{newCalculatedDate:P,newCalculatedMonth:N}};if(o===K.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var k=w(o,u,a),D=k.newCalculatedDate,T=k.newCalculatedMonth;switch(o){case K.ArrowRight:case K.ArrowLeft:case K.ArrowUp:case K.ArrowDown:e.handleMonthNavigation(T,D);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=as[t])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},e.onMonthKeyDown=function(t,o){var a=e.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=t.key;l!==K.Tab&&t.preventDefault(),i||e.handleKeyboardNavigation(t,l,o),s&&s(t)},e.onQuarterClick=function(t,o){var a=Qn(e.props.day,o);Jo(a,e.props)||e.handleDayClick(_d(a),t)},e.onQuarterMouseEnter=function(t){var o=Qn(e.props.day,t);Jo(o,e.props)||e.handleDayMouseEnter(_d(o))},e.handleQuarterNavigation=function(t,o){var a,i,s,l;e.isDisabled(o)||e.isExcluded(o)||((i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.QUARTER_REFS[t-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},e.onQuarterKeyDown=function(t,o){var a,i,s=t.key;if(!e.props.disabledKeyboardNavigation)switch(s){case K.Enter:e.onQuarterClick(t,o),(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,e.props.selected);break;case K.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===4?1:o+1,Vi(e.props.preSelection,1));break;case K.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,yd(e.props.preSelection));break}},e.isMonthDisabledForLabelDate=function(t){var o,a=e.props,i=a.day,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,f=it(i,t);return{isDisabled:(o=(s||l||u||c)&&Td(f,e.props))!==null&&o!==void 0?o:!1,labelDate:f}},e.isMonthDisabled=function(t){var o=e.isMonthDisabledForLabelDate(t).isDisabled;return o},e.getMonthClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,u=o.monthClassName,c=u?u(it(a,t)):void 0,f=e.getSelection();return Be("react-datepicker__month-text","react-datepicker__month-".concat(t),c,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":f?e.isSelectMonthInList(a,t,f):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&l&&e.isSelectedMonth(a,t,l)&&!e.isMonthSelected()&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":i&&s?Xo(i,s,t,a):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(a,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=qe(e.props.preSelection),a=e.isMonthDisabledForLabelDate(o).isDisabled,i=t===o&&!(a||e.props.disabledKeyboardNavigation)?"0":"-1";return i},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=yn(e.props.preSelection),a=Jo(e.props.day,e.props),i=t===o&&!(a||e.props.disabledKeyboardNavigation)?"0":"-1";return i},e.getAriaLabel=function(t){var o=e.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,u=o.day,c=o.locale,f=it(u,t),h=e.isDisabled(f)||e.isExcluded(f)?l:i;return"".concat(h," ").concat(Oe(f,"MMMM yyyy",c))},e.getQuarterClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,u=o.minDate,c=o.maxDate,f=o.excludeDates,h=o.includeDates,p=o.filterDate,m=o.preSelection,v=o.disabledKeyboardNavigation,g=(u||c||f||h||p)&&Jo(Qn(a,t),e.props);return Be("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":g,"react-datepicker__quarter-text--selected":l?e.isSelectedQuarter(a,t,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!v&&m&&e.isSelectedQuarter(a,t,m)&&!g,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":i&&s?ta(i,s,t,a):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t),"react-datepicker__quarter-text--today":e.isCurrentQuarter(a,t)})},e.getMonthContent=function(t){var o=e.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,u=Md(t,s),c=rs(t,s);return i?i(t,u,c,l):a?c:u},e.getQuarterContent=function(t){var o,a=e.props,i=a.renderQuarterContent,s=a.locale,l=J0(t,s);return(o=i==null?void 0:i(t,l))!==null&&o!==void 0?o:l},e.renderMonths=function(){var t,o=e.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,u=(t=as[qd(i,a)])===null||t===void 0?void 0:t.grid;return u==null?void 0:u.map(function(c,f){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:f},c.map(function(h,p){return d.createElement("div",{ref:e.MONTH_REFS[h],key:p,onClick:function(m){e.onMonthClick(m,h)},onKeyDown:function(m){zd(m)&&(m.preventDefault(),m.key=K.Enter),e.onMonthKeyDown(m,h)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(h)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(h)}:void 0,tabIndex:Number(e.getTabIndex(h)),className:e.getMonthClassNames(h),"aria-disabled":e.isMonthDisabled(h),role:"option","aria-label":e.getAriaLabel(h),"aria-current":e.isCurrentMonth(s,h)?"date":void 0,"aria-selected":l?e.isSelectedMonth(s,h,l):void 0},e.getMonthContent(h))}))})},e.renderQuarters=function(){var t=e.props,o=t.day,a=t.selected,i=[1,2,3,4];return d.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return d.createElement("div",{key:l,ref:e.QUARTER_REFS[l],role:"option",onClick:function(u){e.onQuarterClick(u,s)},onKeyDown:function(u){e.onQuarterKeyDown(u,s)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(s)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(s)}:void 0,className:e.getQuarterClassNames(s),"aria-selected":a?e.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(e.getQuarterTabIndex(s)),"aria-current":e.isCurrentQuarter(o,s)?"date":void 0},e.getQuarterContent(s))}))},e.getClassNames=function(){var t=e.props,o=t.selectingDate,a=t.selectsStart,i=t.selectsEnd,s=t.showMonthYearPicker,l=t.showQuarterYearPicker,u=t.showWeekPicker;return Be("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":u})},e}return r.prototype.getSelection=function(){var e=this.props,t=e.selected,o=e.selectedDates,a=e.selectsMultiple;if(a)return o;if(t)return[t]},r.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,o=e.showQuarterYearPicker,a=e.day,i=e.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"";return d.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(Oe(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),mx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isSelectedMonth=function(t){return e.props.month===t},e.renderOptions=function(){return e.props.monthNames.map(function(t,o){return d.createElement("div",{className:e.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,o),"aria-selected":e.isSelectedMonth(o)?"true":void 0},e.isSelectedMonth(o)?d.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return r.prototype.render=function(){return d.createElement(Uo,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),vx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(o,a){return d.createElement("option",{key:o,value:a},o)})},e.renderSelectMode=function(t){return d.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(o){return e.onChange(parseInt(o.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,o){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[e.props.month]))},e.renderDropdown=function(t){return d.createElement(mx,me({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var o=e.state.dropdownVisible,a=[e.renderReadView(!o,t)];return o&&a.unshift(e.renderDropdown(t)),a},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return Md(a,e.props.locale)}:function(a){return rs(a,e.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(t);break;case"select":o=this.renderSelectMode(t);break}return d.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r}(d.Component);function gx(n,r){for(var e=[],t=Vt(n),o=Vt(r);!rn(t,o);)e.push(xe(t)),t=pt(t,1);return e}var bx=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(o){var a=Gi(o),i=_t(t.props.date,o)&&Qe(t.props.date,o);return d.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:t.onChange.bind(t,a),"aria-selected":i?"true":void 0},i?d.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Oe(o,t.props.dateFormat,t.props.locale))})},t.onChange=function(o){return t.props.onChange(o)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:gx(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=Be({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(Uo,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),yx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=Vt(e.props.minDate),o=Vt(e.props.maxDate),a=[];!rn(t,o);){var i=Gi(t);a.push(d.createElement("option",{key:i,value:i},Oe(t,e.props.dateFormat,e.props.locale))),t=pt(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:Gi(Vt(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=Oe(e.props.date,e.props.dateFormat,e.props.locale);return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},e.renderDropdown=function(){return d.createElement(bx,me({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown();var o=xe(t);_t(e.props.date,o)&&Qe(e.props.date,o)||e.props.onChange(o)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),wx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,o,a;e.list&&(e.list.scrollTop=(a=e.centerLi&&r.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((o=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&o!==void 0?o:0):e.list.clientHeight,e.centerLi))!==null&&a!==void 0?a:0)})},e.handleClick=function(t){var o,a;(e.props.minTime||e.props.maxTime)&&Nd(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Id(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&lx(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&Nd(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Id(t,e.props)},e.liClasses=function(t){var o,a=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&a.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&a.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(Ht(t)*3600+Bt(t)*60+nn(t))%(((o=e.props.intervals)!==null&&o!==void 0?o:r.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},e.handleOnKeyDown=function(t,o){var a,i;t.key===K.Space&&(t.preventDefault(),t.key=K.Enter),(t.key===K.ArrowUp||t.key===K.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===K.ArrowDown||t.key===K.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===K.Enter&&e.handleClick(o),(i=(a=e.props).handleOnKeyDown)===null||i===void 0||i.call(a,t)},e.renderTimes=function(){for(var t,o=[],a=typeof e.props.format=="string"?e.props.format:"p",i=(t=e.props.intervals)!==null&&t!==void 0?t:r.defaultProps.intervals,s=e.props.selected||e.props.openToDate||xe(),l=Go(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,x){return g.getTime()-x.getTime()}),c=60*sx(s),f=c/i,h=0;h<f;h++){var p=Bi(l,h*i);if(o.push(p),u){var m=ix(l,p,h,i,u);o=o.concat(m)}}var v=o.reduce(function(g,x){return x.getTime()<=s.getTime()?x:g},o[0]);return o.map(function(g){return d.createElement("li",{key:g.valueOf(),onClick:e.handleClick.bind(e,g),className:e.liClasses(g),ref:function(x){g===v&&(e.centerLi=x)},onKeyDown:function(x){e.handleOnKeyDown(x,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},Oe(g,a,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?d.createElement(d.Fragment,null):d.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(e.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},d.createElement("div",{className:"react-datepicker-time__header"},e.props.timeCaption))},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},r.prototype.componentWillUnmount=function(){var e;(e=this.resizeObserver)===null||e===void 0||e.disconnect()},r.prototype.observeDatePickerHeightChanges=function(){var e=this,t=this.props.monthRef;this.updateContainerHeight(),t&&(this.resizeObserver=new ResizeObserver(function(){e.updateContainerHeight()}),this.resizeObserver.observe(t))},r.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},r.prototype.render=function(){var e=this,t,o=this.state.height;return d.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:r.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),d.createElement("div",{className:"react-datepicker__time"},d.createElement("div",{className:"react-datepicker__time-box"},d.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){e.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},r.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},r}(d.Component),Ud=3,xx=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=kt([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return lt(o,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(o){return os(o,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var o;return(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection},t.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=t.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},t.handleYearClick=function(o,a){t.props.onDayClick&&t.props.onDayClick(o,a)},t.handleYearNavigation=function(o,a){var i,s,l,u,c=t.props,f=c.date,h=c.yearItemNumber;if(!(f===void 0||h===void 0)){var p=an(f,h).startPeriod;t.isDisabled(a)||t.isExcluded(a)||((s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,a),o-p<0?t.updateFocusOnPaginate(h-(p-o)):o-p>=h?t.updateFocusOnPaginate(Math.abs(h-(o-p))):(u=(l=t.YEAR_REFS[o-p])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())}},t.isSameDay=function(o,a){return ve(o,a)},t.isCurrentYear=function(o){return o===le(xe())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&_t(St(xe(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&_t(St(xe(),o),t.props.endDate)},t.isInRange=function(o){return Zo(o,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(o){var a=t.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,u=a.startDate,c=a.endDate;return!(i||s||l)||!t.selectingDate()?!1:i&&c?Zo(o,t.selectingDate(),c):s&&u||l&&u&&!c?Zo(o,u,t.selectingDate()):!1},t.isSelectingRangeStart=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.startDate,l=i.selectsStart,u=St(xe(),o);return l?_t(u,(a=t.selectingDate())!==null&&a!==void 0?a:null):_t(u,s??null)},t.isSelectingRangeEnd=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.endDate,l=i.selectsEnd,u=i.selectsRange,c=St(xe(),o);return l||u?_t(c,(a=t.selectingDate())!==null&&a!==void 0?a:null):_t(c,s??null)},t.isKeyboardSelected=function(o){if(!(t.props.date===void 0||t.props.selected==null||t.props.preSelection==null)){var a=t.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,u=a.includeDates,c=a.filterDate,f=$r(St(t.props.date,o)),h=(i||s||l||u||c)&&ea(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!ve(f,$r(t.props.selected))&&ve(f,$r(t.props.preSelection))&&!h}},t.isSelectedYear=function(o){var a=t.props,i=a.selectsMultiple,s=a.selected,l=a.selectedDates;return i?l==null?void 0:l.some(function(u){return o===le(u)}):!!s&&o===le(s)},t.onYearClick=function(o,a){var i=t.props.date;i!==void 0&&t.handleYearClick($r(St(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,u=t.props,c=u.date,f=u.yearItemNumber,h=u.handleOnKeyDown;if(l!==K.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case K.Enter:if(t.props.selected==null)break;t.onYearClick(o,a),(s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,t.props.selected);break;case K.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,jt(t.props.preSelection,1));break;case K.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,Gn(t.props.preSelection,1));break;case K.ArrowUp:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var p=an(c,f).startPeriod,m=Ud,v=a-m;if(v<p){var g=f%m;a>=p&&a<p+g?m=g:m+=g,v=a-m}t.handleYearNavigation(v,Gn(t.props.preSelection,m));break}case K.ArrowDown:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var x=an(c,f).endPeriod,m=Ud,v=a+m;if(v>x){var g=f%m;a<=x&&a>x-g?m=g:m+=g,v=a+m}t.handleYearNavigation(v,jt(t.props.preSelection,m));break}}h&&h(o)},t.getYearClassNames=function(o){var a=t.props,i=a.date,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,f=a.filterDate,h=a.yearClassName;return Be("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h==null?void 0:h(St(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||u||c||f)&&ea(o,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(o),"react-datepicker__year-text--range-start":t.isRangeStart(o),"react-datepicker__year-text--range-end":t.isRangeEnd(o),"react-datepicker__year-text--in-range":t.isInRange(o),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(o),"react-datepicker__year-text--today":t.isCurrentYear(o)})},t.getYearTabIndex=function(o){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var a=le(t.props.preSelection),i=ea(o,t.props);return o===a&&!i?"0":"-1"},t.getYearContent=function(o){return t.props.renderYearContent?t.props.renderYearContent(o):o},t}return r.prototype.render=function(){var e=this,t=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,l=o.onYearMouseLeave;if(a===void 0)return null;for(var u=an(a,i),c=u.startPeriod,f=u.endPeriod,h=function(v){t.push(d.createElement("div",{ref:p.YEAR_REFS[v-c],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){zd(g)&&(g.preventDefault(),g.key=K.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(p.getYearTabIndex(v)),className:p.getYearClassNames(v),onMouseEnter:p.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:p.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:p.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":p.isCurrentYear(v)?"date":void 0},p.getYearContent(v)))},p=this,m=c;m<=f;m++)h(m);return d.createElement("div",{className:"react-datepicker__year"},d.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},r}(d.Component);function Ex(n,r,e,t){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;e&&(s=le(e)<=i),t&&s&&(s=le(t)>=i),s&&o.push(i)}return o}var Dx=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;t.renderOptions=function(){var s=t.props.year,l=t.state.yearsList.map(function(f){return d.createElement("div",{className:s===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:t.onChange.bind(t,f),"aria-selected":s===f?"true":void 0},s===f?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),u=t.props.minDate?le(t.props.minDate):null,c=t.props.maxDate?le(t.props.maxDate):null;return(!c||!t.state.yearsList.find(function(f){return f===c}))&&l.unshift(d.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!u||!t.state.yearsList.find(function(f){return f===u}))&&l.push(d.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},t.onChange=function(s){t.props.onChange(s)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(s){var l=t.state.yearsList.map(function(u){return u+s});t.setState({yearsList:l})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var o=e.yearDropdownItemNumber,a=e.scrollableYearDropdown,i=o||(a?10:5);return t.state={yearsList:Ex(t.props.year,i,t.props.minDate,t.props.maxDate)},t.dropdownRef=d.createRef(),t}return r.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,o=t?t.find(function(a){return a.ariaSelected}):null;e.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},r.prototype.render=function(){var e=Be({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(Uo,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),Sx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?le(e.props.minDate):1900,o=e.props.maxDate?le(e.props.maxDate):2100,a=[],i=t;i<=o;i++)a.push(d.createElement("option",{key:i,value:i},i));return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(o){return e.toggleDropdown(o)}},d.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return d.createElement(Dx,me({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,o){var a;(a=e.onSelect)===null||a===void 0||a.call(e,t,o),e.setOpen()},e.onSelect=function(t,o){var a,i;(i=(a=e.props).onSelect)===null||i===void 0||i.call(a,t,o)},e.setOpen=function(){var t,o;(o=(t=e.props).setOpen)===null||o===void 0||o.call(t,!0)},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),kx=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],_x=function(n){var r=(n.className||"").split(/\s+/);return kx.some(function(e){return r.indexOf(e)>=0})},Cx=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.monthContainer=void 0,t.handleClickOutside=function(o){t.props.onClickOutside(o)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(o){var a,i;_x(o.target)&&((i=(a=t.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},t.getDateInView=function(){var o=t.props,a=o.preSelection,i=o.selected,s=o.openToDate,l=Yd(t.props),u=Rd(t.props),c=xe(),f=s||i||a;return f||(l&&xn(c,l)?l:u&&rn(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:pt(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:En(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(o,a,i){t.props.onSelect(o,a,i),t.props.setPreSelection&&t.props.setPreSelection(o)},t.handleDayMouseEnter=function(o){t.setState({selectingDate:o}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(o)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(o,a){t.setState({selectingDate:St(xe(),a)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(o,a)},t.handleYearMouseLeave=function(o,a){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(o,a)},t.handleYearChange=function(o){var a,i,s,l;(i=(a=t.props).onYearChange)===null||i===void 0||i.call(a,o),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(o),(l=(s=t.props).setOpen)===null||l===void 0||l.call(s,!0)),t.props.setPreSelection&&t.props.setPreSelection(o)},t.getEnabledPreSelectionDateForMonth=function(o){if(!lt(o,t.props))return o;for(var a=Vt(o),i=Q0(o),s=Ab(i,a),l=null,u=0;u<=s;u++){var c=ft(a,u);if(!lt(c,t.props)){l=c;break}}return l},t.handleMonthChange=function(o){var a,i,s,l=(a=t.getEnabledPreSelectionDateForMonth(o))!==null&&a!==void 0?a:o;t.handleCustomMonthChange(l),t.props.adjustDateOnChange&&(t.props.onSelect(l),(s=(i=t.props).setOpen)===null||s===void 0||s.call(i,!0)),t.props.setPreSelection&&t.props.setPreSelection(l)},t.handleCustomMonthChange=function(o){var a,i;(i=(a=t.props).onMonthChange)===null||i===void 0||i.call(a,o),t.setState({isRenderAriaLiveMessage:!0})},t.handleMonthYearChange=function(o){t.handleYearChange(o),t.handleMonthChange(o)},t.changeYear=function(o){t.setState(function(a){var i=a.date;return{date:St(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:it(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:St(it(i,qe(o)),le(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=on(o,t.props.locale,t.props.calendarStartDay),i=[];return t.props.showWeekNumbers&&i.push(d.createElement("div",{key:"W",className:"react-datepicker__day-name"},t.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(s){var l=ft(a,s),u=t.formatWeekday(l,t.props.locale),c=t.props.weekDayClassName?t.props.weekDayClassName(l):void 0;return d.createElement("div",{key:s,"aria-label":Oe(l,"EEEE",t.props.locale),className:Be("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?G0(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?X0(o,a):K0(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Gn(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var o,a,i;if(!t.props.renderCustomHeader){var s=(o=t.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=t.props.showPreviousMonths?s-1:0,u=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,c=En(t.state.date,u),f;switch(!0){case t.props.showMonthYearPicker:f=$d(t.state.date,t.props);break;case t.props.showYearPicker:f=nx(t.state.date,t.props);break;case t.props.showQuarterYearPicker:f=ex(t.state.date,t.props);break;default:f=Ld(c,t.props);break}if(!(!((i=t.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&f||t.props.showTimeSelectOnly)){var h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],p=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(m=t.decreaseYear),f&&t.props.showDisabledMonthNavigation&&(p.push("react-datepicker__navigation--previous--disabled"),m=void 0);var v=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,g=t.props,x=g.previousMonthButtonLabel,E=x===void 0?r.defaultProps.previousMonthButtonLabel:x,w=g.previousYearButtonLabel,k=w===void 0?r.defaultProps.previousYearButtonLabel:w,D=t.props,T=D.previousMonthAriaLabel,$=T===void 0?typeof E=="string"?E:"Previous Month":T,_=D.previousYearAriaLabel,C=_===void 0?typeof k=="string"?k:"Previous Year":_;return d.createElement("button",{type:"button",className:p.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?C:$},d.createElement("span",{className:h.join(" ")},v?k:E))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:jt(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var o;if(!t.props.renderCustomHeader){var a;switch(!0){case t.props.showMonthYearPicker:a=Ad(t.state.date,t.props);break;case t.props.showYearPicker:a=rx(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=tx(t.state.date,t.props);break;default:a=Fd(t.state.date,t.props);break}if(!(!((o=t.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&a||t.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(l=t.increaseYear),a&&t.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,c=t.props,f=c.nextMonthButtonLabel,h=f===void 0?r.defaultProps.nextMonthButtonLabel:f,p=c.nextYearButtonLabel,m=p===void 0?r.defaultProps.nextYearButtonLabel:p,v=t.props,g=v.nextMonthAriaLabel,x=g===void 0?typeof h=="string"?h:"Next Month":g,E=v.nextYearAriaLabel,w=E===void 0?typeof m=="string"?m:"Next Year":E;return d.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?w:x},d.createElement("span",{className:s.join(" ")},u?m:h))}}},t.renderCurrentMonth=function(o){o===void 0&&(o=t.state.date);var a=["react-datepicker__current-month"];return t.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),d.createElement("h2",{className:a.join(" ")},Oe(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(Sx,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:le(t.state.date)}))},t.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthDropdown||o))return d.createElement(vx,me({},r.defaultProps,t.props,{month:qe(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(yx,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(Cd(),o),t.props.setPreSelection&&t.props.setPreSelection(Cd())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return d.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return d.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(a),d.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(i!==0),t.renderMonthYearDropdown(i!==0),t.renderYearDropdown(i!==0)),d.createElement("div",{className:"react-datepicker__day-names"},t.header(a)))},t.renderCustomHeader=function(o){var a,i,s=o.monthDate,l=o.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var u=Ld(t.state.date,t.props),c=Fd(t.state.date,t.props),f=$d(t.state.date,t.props),h=Ad(t.state.date,t.props),p=!t.props.showMonthYearPicker&&!t.props.showQuarterYearPicker&&!t.props.showYearPicker;return d.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(i=(a=t.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,me(me({},t.state),{customHeaderCount:l,monthDate:s,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:u,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),p&&d.createElement("div",{className:"react-datepicker__day-names"},t.header(s)))},t.renderYearHeader=function(o){var a=o.monthDate,i=t.props,s=i.showYearPicker,l=i.yearItemNumber,u=l===void 0?r.defaultProps.yearItemNumber:l,c=an(a,u),f=c.startPeriod,h=c.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(h):le(a))},t.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,l={monthDate:a,i:s};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(l);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(l);default:return t.renderDefaultHeader(l)}},t.renderMonths=function(){var o,a;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var i=[],s=(o=t.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=t.props.showPreviousMonths?s-1:0,u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?jt(t.state.date,l):En(t.state.date,l),c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,f=0;f<s;++f){var h=f-c+l,p=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?jt(u,h):pt(u,h),m="month-".concat(f),v=f<s-1,g=f>0;i.push(d.createElement("div",{key:m,ref:function(x){t.monthContainer=x??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:p,i:f}),d.createElement(hx,me({},r.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:p,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:f,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:v,monthShowsDuplicateDaysStart:g}))))}return i}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return d.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),d.createElement(xx,me({},r.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return d.createElement(wx,me({},r.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var o=t.props.selected?new Date(t.props.selected):void 0,a=o&&Qo(o)&&!!t.props.selected,i=a?"".concat(Wd(o.getHours()),":").concat(Wd(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(ux,me({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=an(t.state.date,(o=t.props.yearItemNumber)!==null&&o!==void 0?o:r.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,l;return t.props.showYearPicker?l="".concat(i," - ").concat(s):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?l=le(t.state.date):l="".concat(rs(qe(t.state.date),t.props.locale)," ").concat(le(t.state.date)),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&l)},t.renderChildren=function(){if(t.props.children)return d.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=d.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Fr}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){e.setState({monthContainer:e.monthContainer})}())},r.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&(!ve(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var o=!Qe(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!ve(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var e=this.props.container||W0;return d.createElement(Uo,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:Be("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},r}(d.Component),Ox=function(n){var r=n.icon,e=n.className,t=e===void 0?"":e,o=n.onClick,a="react-datepicker__calendar-icon";if(typeof r=="string")return d.createElement("i",{className:"".concat(a," ").concat(r," ").concat(t),"aria-hidden":"true",onClick:o});if(d.isValidElement(r)){var i=r;return d.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(a," ").concat(t),onClick:function(s){typeof i.props.onClick=="function"&&i.props.onClick(s),typeof o=="function"&&o(s)}})}return d.createElement("svg",{className:"".concat(a," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},d.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Qd=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return r.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},r.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},r.prototype.render=function(){return Ne.createPortal(this.props.children,this.el)},r}(d.Component),Mx="[tabindex], a, button, input, select, textarea",Tx=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},Gd=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.getTabChildren=function(){var o;return Array.prototype.slice.call((o=t.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(Mx),1,-1).filter(Tx)},t.handleFocusStart=function(){var o=t.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},t.handleFocusEnd=function(){var o=t.getTabChildren();o&&o.length>1&&o[0].focus()},t.tabLoopRef=d.createRef(),t}return r.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:r.defaultProps.enableTabLoop)?d.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},d.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,d.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r}(d.Component);function Px(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=j0(me({open:!o,whileElementsMounted:$u,placement:e.popperPlacement,middleware:kt([Wu({padding:15}),ki(10),sv({element:a})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),s=me(me({},e),{hidePopper:o,popperProps:me(me({},i),{arrowRef:a})});return d.createElement(n,me({},s))};return r}var Ix=function(n){ze(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(r,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e=this.props,t=e.className,o=e.wrapperClassName,a=e.hidePopper,i=a===void 0?r.defaultProps.hidePopper:a,s=e.popperComponent,l=e.targetComponent,u=e.enableTabLoop,c=e.popperOnKeyDown,f=e.portalId,h=e.portalHost,p=e.popperProps,m=e.showArrow,v=void 0;if(!i){var g=Be("react-datepicker-popper",t);v=d.createElement(Gd,{enableTabLoop:u},d.createElement("div",{ref:p.refs.setFloating,style:p.floatingStyles,className:g,"data-placement":p.placement,onKeyDown:c},s,m&&d.createElement(N0,{ref:p.arrowRef,context:p.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(v=d.createElement(this.props.popperContainer,{},v)),f&&!i&&(v=d.createElement(Qd,{portalId:f,portalHost:h},v));var x=Be("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:p.refs.setReference,className:x},l),v)},r}(d.Component),Nx=Px(Ix),Kd="react-datepicker-ignore-onclickoutside";function Lx(n,r){return n&&r?qe(n)!==qe(r)||le(n)!==le(r):n!==r}var is="Date input not valid.",Fx=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:xe()},t.modifyHolidays=function(){var o;return(o=t.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return Qo(s)?kt(kt([],a,!0),[me(me({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=Yd(t.props),s=Rd(t.props),l=i&&xn(a,Go(i))?i:s&&rn(a,Od(s))?s:a;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&o!==void 0?o:l,highlightDates:jd(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(me(me({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(me(me({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.setFocus=function(){var o,a;(a=(o=t.input)===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o,{preventScroll:!0})},t.setBlur=function(){var o,a;(a=(o=t.input)===null||o===void 0?void 0:o.blur)===null||a===void 0||a.call(o),t.cancelFocusInput()},t.deferBlur=function(){requestAnimationFrame(function(){t.setBlur()})},t.setOpen=function(o,a){a===void 0&&(a=!1),t.setState({open:o,preSelection:o&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:ss},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Wt(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(o){var a,i,s=t.state.wasHidden,l=s?t.state.open:!0;s&&t.resetHiddenStatus(),t.state.preventFocus||((i=(a=t.props).onFocus)===null||i===void 0||i.call(a,o),l&&!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.handleBlur=function(o){var a,i;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((i=(a=t.props).onBlur)===null||i===void 0||i.call(a,o)),t.state.open&&t.props.open===!1&&t.setOpen(!1),t.setState({focused:!1})},t.handleCalendarClickOutside=function(o){var a,i;t.props.inline||t.setOpen(!1),(i=(a=t.props).onClickOutside)===null||i===void 0||i.call(a,o),t.props.withPortal&&o.preventDefault()},t.handleChange=function(){for(var o,a,i,s,l,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var f=u[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,u),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){t.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:$x});var h=t.props,p=h.selectsRange,m=h.startDate,v=h.endDate,g=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,x=(a=t.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,E=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(p){var w=E.split(g.includes("-")?kd:"-",2).map(function(R){return R.trim()}),k=w[0],D=w[1],T=es(k??"",g,t.props.locale,x),$=es(D??"",g,t.props.locale,x),_=(m==null?void 0:m.getTime())!==(T==null?void 0:T.getTime()),C=(v==null?void 0:v.getTime())!==($==null?void 0:$.getTime());if(!_&&!C||T&&lt(T,t.props)||$&&lt($,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[T,$],f)}else{var O=es(E,g,t.props.locale,x,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(O||!E)&&t.setSelected(O,f,!0)}}},t.handleSelect=function(o,a,i){if(!t.props.readOnly){if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&t.sendFocusBackToInput(),t.props.onChangeRaw&&t.props.onChangeRaw(a),t.setSelected(o,a,!1,i),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect)t.setPreSelection(o);else if(!t.props.inline){t.props.selectsRange||t.setOpen(!1);var s=t.props,l=s.startDate,u=s.endDate;l&&!u&&(t.props.swapRange||!Vd(o,l))&&t.setOpen(!1)}}},t.setSelected=function(o,a,i,s){var l,u,c=o;if(t.props.showYearPicker){if(c!==null&&ea(le(c),t.props))return}else if(t.props.showMonthYearPicker){if(c!==null&&Td(c,t.props))return}else if(c!==null&&lt(c,t.props))return;var f=t.props,h=f.onChange,p=f.selectsRange,m=f.startDate,v=f.endDate,g=f.selectsMultiple,x=f.selectedDates,E=f.minTime,w=f.swapRange;if(!Dn(t.props.selected,c)||t.props.allowSameDay||p||g)if(c!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(c=ts(c,{hour:Ht(t.props.selected),minute:Bt(t.props.selected),second:nn(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&E&&(c=ts(c,{hour:E.getHours(),minute:E.getMinutes(),second:E.getSeconds()})),t.props.inline||t.setState({preSelection:c}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),p){var k=!m&&!v,D=m&&!v,T=m&&v;k?h==null||h([c,null],a):D&&(c===null?h==null||h([null,null],a):Vd(c,m)?w?h==null||h([c,m],a):h==null||h([c,null],a):h==null||h([m,c],a)),T&&(h==null||h([c,null],a))}else if(g){if(c!==null)if(!(x!=null&&x.length))h==null||h([c],a);else{var $=x.some(function(C){return ve(C,c)});if($){var _=x.filter(function(C){return!ve(C,c)});h==null||h(_,a)}else h==null||h(kt(kt([],x,!0),[c],!1),a)}}else h==null||h(c,a);i||((u=(l=t.props).onSelect)===null||u===void 0||u.call(l,c,a),t.setState({inputValue:null}))},t.setPreSelection=function(o){if(!t.props.readOnly){var a=Wt(t.props.minDate),i=Wt(t.props.maxDate),s=!0;if(o){var l=Go(o);if(a&&i)s=Ar(o,t.props.minDate,t.props.maxDate);else if(a){var u=Go(t.props.minDate);s=rn(o,u)||Dn(l,u)}else if(i){var c=Od(t.props.maxDate);s=xn(o,c)||Dn(l,c)}}s&&t.setState({preSelection:o})}},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(o){var a,i;if(!(t.props.selectsRange||t.props.selectsMultiple)){var s=t.props.selected?t.props.selected:t.getPreSelection(),l=t.props.selected?o:ts(s,{hour:Ht(o),minute:Bt(o)});t.setState({preSelection:l}),(i=(a=t.props).onChange)===null||i===void 0||i.call(a,l),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var o,a;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(a=(o=t.props).onInputClick)===null||a===void 0||a.call(o)},t.onInputKeyDown=function(o){var a,i,s,l,u,c;(i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o);var f=o.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(f===K.ArrowDown||f===K.ArrowUp||f===K.Enter)&&((s=t.onInputClick)===null||s===void 0||s.call(t));return}if(t.state.open){if(f===K.ArrowDown||f===K.ArrowUp){o.preventDefault();var h=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',p=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(h);p instanceof HTMLElement&&p.focus({preventScroll:!0});return}var m=xe(t.state.preSelection);f===K.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===ss?(t.handleSelect(m,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(m)):t.setOpen(!1)):f===K.Escape?(o.preventDefault(),o.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):f===K.Tab&&t.setOpen(!1),t.inputOk()||(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:is})}},t.onPortalKeyDown=function(o){var a=o.key;a===K.Escape&&(o.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(o){var a,i,s,l,u,c,f=t.props,h=f.minDate,p=f.maxDate,m=f.disabledKeyboardNavigation,v=f.showWeekPicker,g=f.shouldCloseOnSelect,x=f.locale,E=f.calendarStartDay,w=f.adjustDateOnChange,k=f.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var D=o.key,T=o.shiftKey,$=xe(t.state.preSelection),_=function(P,N){var z=N;switch(P){case K.ArrowRight:z=v?Fo(N,1):ft(N,1);break;case K.ArrowLeft:z=v?wd(N):Lw(N);break;case K.ArrowUp:z=wd(N);break;case K.ArrowDown:z=Fo(N,1);break;case K.PageUp:z=T?Gn(N,1):En(N,1);break;case K.PageDown:z=T?jt(N,1):pt(N,1);break;case K.Home:z=on(N,x,E);break;case K.End:z=U0(N);break}return z},C=function(P,N){for(var z=40,I=P,te=!1,M=0,j=_(P,N);!te;){if(M>=z){j=N;break}h&&j<h&&(I=K.ArrowRight,j=lt(h,t.props)?_(I,j):h),p&&j>p&&(I=K.ArrowLeft,j=lt(p,t.props)?_(I,j):p),lt(j,t.props)?((I===K.PageUp||I===K.Home)&&(I=K.ArrowRight),(I===K.PageDown||I===K.End)&&(I=K.ArrowLeft),j=_(I,j)):te=!0,M++}return j};if(D===K.Enter){o.preventDefault(),t.handleSelect($,o),!g&&t.setPreSelection($);return}else if(D===K.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:is});return}var O=null;switch(D){case K.ArrowLeft:case K.ArrowRight:case K.ArrowUp:case K.ArrowDown:case K.PageUp:case K.PageDown:case K.Home:case K.End:O=C(D,$);break}if(!O){(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:is});return}if(o.preventDefault(),t.setState({lastPreSelectChange:ss}),w&&t.setSelected(O),t.setPreSelection(O),k){var R=qe($),b=qe(O),S=le($),L=le(O);R!==b||S!==L?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===K.Escape&&(o.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1))},t.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),t.sendFocusBackToInput();var a=t.props,i=a.selectsRange,s=a.onChange;i?s==null||s([null,null],o):s==null||s(null,o),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(o){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(o)&&t.setOpen(!1)},t.renderCalendar=function(){var o,a;return!t.props.inline&&!t.isCalendarOpen()?null:d.createElement(Cx,me({showMonthYearDropdown:void 0,ref:function(i){t.calendar=i}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(o=t.props.dateFormatCalendar)!==null&&o!==void 0?o:r.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:ax(t.modifyHolidays()),outsideClickIgnoreClass:Kd,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(a=t.props.dropdownMode)!==null&&a!==void 0?a:r.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var o=t.props,a=o.dateFormat,i=a===void 0?r.defaultProps.dateFormat:a,s=o.locale,l=t.props.showTimeInput||t.props.showTimeSelect,u=l?"PPPPp":"PPPP",c;return t.props.selectsRange?c="Selected start date: ".concat(st(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+st(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(st(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(st(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(st(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(st(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(st(t.props.selected,{dateFormat:u,locale:s})),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},t.renderDateInput=function(){var o,a,i,s=Be(t.props.className,(o={},o[Kd]=t.state.open,o)),l=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",c=t.props,f=c.dateFormat,h=f===void 0?r.defaultProps.dateFormat:f,p=c.locale,m=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?B0(t.props.startDate,t.props.endDate,{dateFormat:h,locale:p}):t.props.selectsMultiple?V0((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:h,locale:p}):st(t.props.selected,{dateFormat:h,locale:p});return d.cloneElement(l,(a={},a[u]=function(v){t.input=v},a.value=m,a.onBlur=t.handleBlur,a.onChange=t.handleChange,a.onClick=t.onInputClick,a.onFocus=t.handleFocus,a.onKeyDown=t.onInputKeyDown,a.id=t.props.id,a.name=t.props.name,a.form=t.props.form,a.autoFocus=t.props.autoFocus,a.placeholder=t.props.placeholderText,a.disabled=t.props.disabled,a.autoComplete=t.props.autoComplete,a.className=Be(l.props.className,s),a.title=t.props.title,a.readOnly=t.props.readOnly,a.required=t.props.required,a.tabIndex=t.props.tabIndex,a["aria-describedby"]=t.props.ariaDescribedBy,a["aria-invalid"]=t.props.ariaInvalid,a["aria-labelledby"]=t.props.ariaLabelledBy,a["aria-required"]=t.props.ariaRequired,a))},t.renderClearButton=function(){var o=t.props,a=o.isClearable,i=o.disabled,s=o.selected,l=o.startDate,u=o.endDate,c=o.clearButtonTitle,f=o.clearButtonClassName,h=f===void 0?"":f,p=o.ariaLabelClose,m=p===void 0?"Close":p,v=o.selectedDates,g=o.readOnly;return a&&!g&&(s!=null||l!=null||u!=null||v!=null&&v.length)?d.createElement("button",{type:"button",className:Be("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,onClick:t.onClearClick,title:c,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(r,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Fr,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.componentDidUpdate=function(e,t){var o,a,i,s;e.inline&&Lx(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:jd(this.props.highlightDates)}),!t.focused&&!Dn(e.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),t.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},r.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.renderInputContainer=function(){var e=this.props,t=e.showIcon,o=e.icon,a=e.calendarIconClassname,i=e.calendarIconClassName,s=e.toggleCalendarOnIconClick,l=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),d.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&d.createElement(Ox,me({icon:o,className:Be(i,!i&&a,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},r.prototype.render=function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?d.createElement(Gd,{enableTabLoop:this.props.enableTabLoop},d.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=d.createElement(Qd,me({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(Nx,me({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(d.Component),$x="input",ss="navigate";const Ax=({label:n,placeholder:r,value:e,onChange:t,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(c,f)=>1990+f),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=d.forwardRef(({value:c,onClick:f},h)=>Y.jsx("button",{"aria-label":"inputButton",type:"button",id:n,className:"bg-background-secondary placeholder:text-petnow-grey-primary h-[60px] w-full cursor-pointer rounded-xl p-4 text-left text-xl focus:outline-hidden disabled:opacity-50",onClick:f,ref:h,children:c||Y.jsx("p",{className:"text-petnow-grey-primary",children:r})}));l.displayName="CustomInput";function u(c){const f=c.substring(0,4),h=c.substring(5,7),p=c.substring(8,10);return new Date(Number(f),Number(h)-1,Number(p))}return Y.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[Y.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),Y.jsx(Fx,{disabledKeyboardNavigation:!0,locale:k0,id:n,name:"출생일",placeholderText:r,onChange:c=>c&&t(c),selected:e?u(e):void 0,value:e,dateFormat:"yyyy-MM-dd",autoComplete:"off",maxDate:new Date,customInput:Y.jsx(l,{}),renderCustomHeader:({date:c,changeYear:f,changeMonth:h,decreaseMonth:p,increaseMonth:m})=>Y.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[Y.jsx("button",{onClick:p,disabled:c.getFullYear()<=1990&&c.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:Y.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),Y.jsxs("div",{className:"text-lg",children:[Y.jsx("select",{"aria-label":"yearsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 w-auto cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:le(c),onChange:({target:{value:v}})=>f(Number(v)),children:i.map(v=>Y.jsx("option",{value:v,children:v},v))}),Y.jsx("span",{className:"mr-2 ml-1",children:"년"}),Y.jsx("select",{"aria-label":"monthsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:s[qe(c)],onChange:({target:{value:v}})=>h(s.indexOf(v)),children:s.map(v=>Y.jsx("option",{value:v,children:v},v))}),Y.jsx("span",{className:"mx-1",children:"월"})]}),Y.jsx("button",{onClick:m,disabled:c.getFullYear()>=new Date().getFullYear()&&c.getMonth()>=new Date().getMonth(),type:"button",className:"react-datepicker__navigation react-datepicker__navigation--next","aria-label":"Next Month",children:Y.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&Y.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function Yx(n){return Pr({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},child:[]}]})(n)}const Rx=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>Y.jsx("div",{className:"text-petnow-grey-tertiary relative",children:Y.jsxs(ib,{disabled:a,onChange:o,children:[Y.jsx(uo,{className:"text-xl font-bold text-black",children:n}),Y.jsxs(Yc,{className:"bg-background-secondary placeholder:text-petnow-grey-primary relative mt-4 h-[60px] w-full cursor-pointer rounded-xl p-4 text-start text-xl focus:outline-hidden disabled:opacity-50",children:[e.name?Y.jsx("p",{children:e.name}):Y.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",Y.jsx(Yx,{className:"absolute right-4 bottom-5"})]}),Y.jsx(Rc,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>Y.jsx(jc,{value:i,as:Y.Fragment,children:({focus:s,selected:l})=>Y.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${s?"bg-background-tertiary":"bg-background-secondary"} ${l&&"bg-background-tertiary"}`,children:i.name})},i.name))})]})}),jx=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,u]=d.useState("");let c;const f=m=>{c&&clearTimeout(c),c=setTimeout(async()=>{u(m.target.value)},200)},h=m=>{u(m.target.value)},p=l===""?t.slice(0,4):t.filter(m=>{var v;return(v=m.name)==null?void 0:v.replace(/ /g,"").includes(l.replace(/ /g,""))}).slice(0,4);return Y.jsxs("div",{children:[Y.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:Y.jsxs(ig,{onChange:m=>{o(m)},disabled:a,children:[Y.jsx(uo,{className:"text-xl font-bold text-black",children:n}),Y.jsx(pc,{"aria-label":"comboboxInput",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 flex w-full items-center justify-between rounded-xl p-4 text-xl focus:outline-hidden disabled:opacity-50",value:e,onChange:s?h:f,onKeyDown:m=>{m.key==="Backspace"&&o({name:void 0,value:void 0})},placeholder:r,autoComplete:"off"}),Y.jsx(hc,{className:"absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",style:{bottom:-p.length*60},children:p.map(m=>Y.jsx(mc,{value:m,as:d.Fragment,children:({focus:v,selected:g})=>Y.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${v?"bg-background-tertiary":"bg-background-secondary"} ${g&&"bg-background-tertiary"}`,children:m.name})},m.name))})]})}),i&&Y.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})};_e.AccordionCard=Mb,_e.Checkbox=kp,_e.Chip=_p,_e.LabeledAddressInput=kb,_e.LabeledAutocomplete=jx,_e.LabeledCheckbox=gb,_e.LabeledDatepicker=Ax,_e.LabeledSelect=Rx,_e.Popup=sb,_e.Radio=Kf,_e.Tab=Sp,_e.Toggle=lb,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
53
81
  //# sourceMappingURL=index.umd.js.map