@petnow/ui 2.4.2 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +2 -2
- package/dist/index.es.js +5191 -5122
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +23 -23
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/mobile/checkbox/Checkbox.d.ts +1 -1
- package/dist/src/components/mobile/popup/Popup.d.ts +3 -1
- package/dist/src/components/mobile/popup/Popup.stories.d.ts +1 -0
- package/dist/src/components/mobile/radio/Radio.d.ts +1 -1
- package/package.json +12 -12
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
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,Ye){"use strict";var $D=Object.defineProperty;var LD=(_e,d,Ye)=>d in _e?$D(_e,d,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):_e[d]=Ye;var Z=(_e,d,Ye)=>LD(_e,typeof d!="symbol"?d+"":d,Ye);function _s(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 H=_s(d),fr=_s(Ye);function Jf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var no={exports:{}},pr={};/**
|
|
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
|
|
9
|
+
*/var Os;function Zf(){if(Os)return pr;Os=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={},p=null,h=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(h=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:p,ref:h,props:f,_owner:o.current}}return pr.Fragment=e,pr.jsx=i,pr.jsxs=i,pr}var hr={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,49 +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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var Ps;function ep(){return Ps||(Ps=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"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,v="@@iterator";function g(E){if(E===null||typeof E!="object")return null;var B=m&&E[m]||E[v];return typeof B=="function"?B:null}var y=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function D(E){{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",E,J)}}function w(E,B,J){{var ie=y.ReactDebugCurrentFrame,De=ie.getStackAddendum();De!==""&&(B+="%s",J=J.concat([De]));var Ce=J.map(function(pe){return String(pe)});Ce.unshift("Warning: "+B),Function.prototype.apply.call(console[E],console,Ce)}}var S=!1,x=!1,T=!1,$=!1,C=!1,_;_=Symbol.for("react.module.reference");function P(E){return!!(typeof E=="string"||typeof E=="function"||E===t||E===a||C||E===o||E===u||E===c||$||E===h||S||x||T||typeof E=="object"&&E!==null&&(E.$$typeof===p||E.$$typeof===f||E.$$typeof===i||E.$$typeof===s||E.$$typeof===l||E.$$typeof===_||E.getModuleId!==void 0))}function F(E,B,J){var ie=E.displayName;if(ie)return ie;var De=B.displayName||B.name||"";return De!==""?J+"("+De+")":J}function b(E){return E.displayName||"Context"}function k(E){if(E==null)return null;if(typeof E.tag=="number"&&D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){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 E=="object")switch(E.$$typeof){case s:var B=E;return b(B)+".Consumer";case i:var J=E;return b(J._context)+".Provider";case l:return F(E,E.render,"ForwardRef");case f:var ie=E.displayName||null;return ie!==null?ie:k(E.type)||"Memo";case p:{var De=E,Ce=De._payload,pe=De._init;try{return k(pe(Ce))}catch{return null}}}return null}var L=Object.assign,N=0,I,V,O,Q,M,W,Y;function j(){}j.__reactDisabledLog=!0;function q(){{if(N===0){I=console.log,V=console.info,O=console.warn,Q=console.error,M=console.group,W=console.groupCollapsed,Y=console.groupEnd;var E={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}N++}}function X(){{if(N--,N===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},E,{value:I}),info:L({},E,{value:V}),warn:L({},E,{value:O}),error:L({},E,{value:Q}),group:L({},E,{value:M}),groupCollapsed:L({},E,{value:W}),groupEnd:L({},E,{value:Y})})}N<0&&D("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var R=y.ReactCurrentDispatcher,z;function U(E,B,J){{if(z===void 0)try{throw Error()}catch(De){var ie=De.stack.trim().match(/\n( *(at )?)/);z=ie&&ie[1]||""}return`
|
|
18
|
+
`+z+E}}var oe=!1,ae;{var se=typeof WeakMap=="function"?WeakMap:Map;ae=new se}function G(E,B){if(!E||oe)return"";{var J=ae.get(E);if(J!==void 0)return J}var ie;oe=!0;var De=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ce;Ce=R.current,R.current=null,q();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(at){ie=at}Reflect.construct(E,[],pe)}else{try{pe.call()}catch(at){ie=at}E.call(pe.prototype)}}else{try{throw Error()}catch(at){ie=at}E()}}catch(at){if(at&&ie&&typeof at.stack=="string"){for(var fe=at.stack.split(`
|
|
19
|
+
`),tt=ie.stack.split(`
|
|
20
|
+
`),Re=fe.length-1,Be=tt.length-1;Re>=1&&Be>=0&&fe[Re]!==tt[Be];)Be--;for(;Re>=1&&Be>=0;Re--,Be--)if(fe[Re]!==tt[Be]){if(Re!==1||Be!==1)do if(Re--,Be--,Be<0||fe[Re]!==tt[Be]){var bt=`
|
|
21
|
+
`+fe[Re].replace(" at new "," at ");return E.displayName&&bt.includes("<anonymous>")&&(bt=bt.replace("<anonymous>",E.displayName)),typeof E=="function"&&ae.set(E,bt),bt}while(Re>=1&&Be>=0);break}}}finally{oe=!1,R.current=Ce,X(),Error.prepareStackTrace=De}var dr=E?E.displayName||E.name:"",Yn=dr?U(dr):"";return typeof E=="function"&&ae.set(E,Yn),Yn}function ot(E,B,J){return G(E,!1)}function tn(E){var B=E.prototype;return!!(B&&B.isReactComponent)}function gt(E,B,J){if(E==null)return"";if(typeof E=="function")return G(E,tn(E));if(typeof E=="string")return U(E);switch(E){case u:return U("Suspense");case c:return U("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return ot(E.render);case f:return gt(E.type,B,J);case p:{var ie=E,De=ie._payload,Ce=ie._init;try{return gt(Ce(De),B,J)}catch{}}}return""}var Lt=Object.prototype.hasOwnProperty,eo={},An=y.ReactDebugCurrentFrame;function Rn(E){if(E){var B=E._owner,J=gt(E.type,E._source,B?B.type:null);An.setExtraStackFrame(J)}else An.setExtraStackFrame(null)}function to(E,B,J,ie,De){{var Ce=Function.call.bind(Lt);for(var pe in E)if(Ce(E,pe)){var fe=void 0;try{if(typeof E[pe]!="function"){var tt=Error((ie||"React class")+": "+J+" type `"+pe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[pe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw tt.name="Invariant Violation",tt}fe=E[pe](B,pe,ie,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Re){fe=Re}fe&&!(fe instanceof Error)&&(Rn(De),D("%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 fe),Rn(null)),fe instanceof Error&&!(fe.message in eo)&&(eo[fe.message]=!0,Rn(De),D("Failed %s type: %s",J,fe.message),Rn(null))}}}var xa=Array.isArray;function ur(E){return xa(E)}function Ea(E){{var B=typeof Symbol=="function"&&Symbol.toStringTag,J=B&&E[Symbol.toStringTag]||E.constructor.name||"Object";return J}}function mD(E){try{return Af(E),!1}catch{return!0}}function Af(E){return""+E}function Rf(E){if(mD(E))return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ea(E)),Af(E)}var Yf=y.ReactCurrentOwner,vD={key:!0,ref:!0,__self:!0,__source:!0},jf,Wf;function gD(E){if(Lt.call(E,"ref")){var B=Object.getOwnPropertyDescriptor(E,"ref").get;if(B&&B.isReactWarning)return!1}return E.ref!==void 0}function bD(E){if(Lt.call(E,"key")){var B=Object.getOwnPropertyDescriptor(E,"key").get;if(B&&B.isReactWarning)return!1}return E.key!==void 0}function yD(E,B){typeof E.ref=="string"&&Yf.current}function wD(E,B){{var J=function(){jf||(jf=!0,D("%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(E,"key",{get:J,configurable:!0})}}function xD(E,B){{var J=function(){Wf||(Wf=!0,D("%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(E,"ref",{get:J,configurable:!0})}}var ED=function(E,B,J,ie,De,Ce,pe){var fe={$$typeof:r,type:E,key:B,ref:J,props:pe,_owner:Ce};return fe._store={},Object.defineProperty(fe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(fe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.defineProperty(fe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:De}),Object.freeze&&(Object.freeze(fe.props),Object.freeze(fe)),fe};function DD(E,B,J,ie,De){{var Ce,pe={},fe=null,tt=null;J!==void 0&&(Rf(J),fe=""+J),bD(B)&&(Rf(B.key),fe=""+B.key),gD(B)&&(tt=B.ref,yD(B,De));for(Ce in B)Lt.call(B,Ce)&&!vD.hasOwnProperty(Ce)&&(pe[Ce]=B[Ce]);if(E&&E.defaultProps){var Re=E.defaultProps;for(Ce in Re)pe[Ce]===void 0&&(pe[Ce]=Re[Ce])}if(fe||tt){var Be=typeof E=="function"?E.displayName||E.name||"Unknown":E;fe&&wD(pe,Be),tt&&xD(pe,Be)}return ED(E,fe,tt,De,ie,Yf.current,pe)}}var Ds=y.ReactCurrentOwner,Hf=y.ReactDebugCurrentFrame;function cr(E){if(E){var B=E._owner,J=gt(E.type,E._source,B?B.type:null);Hf.setExtraStackFrame(J)}else Hf.setExtraStackFrame(null)}var Ss;Ss=!1;function ks(E){return typeof E=="object"&&E!==null&&E.$$typeof===r}function Vf(){{if(Ds.current){var E=k(Ds.current.type);if(E)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+E+"`."}return""}}function SD(E){return""}var Bf={};function kD(E){{var B=Vf();if(!B){var J=typeof E=="string"?E:E.displayName||E.name;J&&(B=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+J+">.")}return B}}function zf(E,B){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var J=kD(B);if(Bf[J])return;Bf[J]=!0;var ie="";E&&E._owner&&E._owner!==Ds.current&&(ie=" It was passed a child from "+k(E._owner.type)+"."),cr(E),D('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),cr(null)}}function qf(E,B){{if(typeof E!="object")return;if(ur(E))for(var J=0;J<E.length;J++){var ie=E[J];ks(ie)&&zf(ie,B)}else if(ks(E))E._store&&(E._store.validated=!0);else if(E){var De=g(E);if(typeof De=="function"&&De!==E.entries)for(var Ce=De.call(E),pe;!(pe=Ce.next()).done;)ks(pe.value)&&zf(pe.value,B)}}}function CD(E){{var B=E.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=k(B);to(J,E.props,"prop",ie,E)}else if(B.PropTypes!==void 0&&!Ss){Ss=!0;var De=k(B);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",De||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _D(E){{for(var B=Object.keys(E.props),J=0;J<B.length;J++){var ie=B[J];if(ie!=="children"&&ie!=="key"){cr(E),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ie),cr(null);break}}E.ref!==null&&(cr(E),D("Invalid attribute `ref` supplied to `React.Fragment`."),cr(null))}}var Uf={};function Qf(E,B,J,ie,De,Ce){{var pe=P(E);if(!pe){var fe="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(fe+=" 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 tt=SD();tt?fe+=tt:fe+=Vf();var Re;E===null?Re="null":ur(E)?Re="array":E!==void 0&&E.$$typeof===r?(Re="<"+(k(E.type)||"Unknown")+" />",fe=" Did you accidentally export a JSX literal instead of a component?"):Re=typeof E,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Re,fe)}var Be=DD(E,B,J,De,Ce);if(Be==null)return Be;if(pe){var bt=B.children;if(bt!==void 0)if(ie)if(ur(bt)){for(var dr=0;dr<bt.length;dr++)qf(bt[dr],E);Object.freeze&&Object.freeze(bt)}else D("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 qf(bt,E)}if(Lt.call(B,"key")){var Yn=k(E),at=Object.keys(B).filter(function(ND){return ND!=="key"}),Cs=at.length>0?"{key: someKey, "+at.join(": ..., ")+": ...}":"{key: someKey}";if(!Uf[Yn+Cs]){var ID=at.length>0?"{"+at.join(": ..., ")+": ...}":"{}";D(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,xs,An,wD,An),Ff[An+xs]=!0}}return D===t?mD(Ve):hD(Ve),Ve}}function vD(D,z,ee){return Af(D,z,ee,!0)}function gD(D,z,ee){return Af(D,z,ee,!1)}var bD=gD,yD=vD;fr.Fragment=t,fr.jsx=bD,fr.jsxs=yD}()),fr}var ks;function Vf(){return ks||(ks=1,process.env.NODE_ENV==="production"?eo.exports=Hf():eo.exports=Bf()),eo.exports}var R=Vf();function Cs(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=Cs(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function Qe(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=Cs(n))&&(t&&(t+=" "),t+=r);return t}const ya="-",zf=n=>{const r=Uf(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(ya);return s[0]===""&&s.length!==1&&s.shift(),_s(s,r)||qf(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},_s=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?_s(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(ya);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Os=/^\[(.+)\]$/,qf=n=>{if(Os.test(n)){const r=Os.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},Uf=n=>{const{theme:r,classGroups:e}=n,t={nextPart:new Map,validators:[]};for(const o in e)wa(e[o],t,o,r);return t},wa=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:Ms(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(Qf(o)){wa(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{wa(i,Ms(r,a),e,t)})})},Ms=(n,r)=>{let e=n;return r.split(ya).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},Qf=n=>n.isThemeGetter,Gf=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)}}},xa="!",Ea=":",Kf=Ea.length,Xf=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===Ea){a.push(o.slice(l,m)),l=m+Kf;continue}if(v==="/"){u=m;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const c=a.length===0?o:o.substring(l),f=Jf(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+Ea,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},Jf=n=>n.endsWith(xa)?n.substring(0,n.length-1):n.startsWith(xa)?n.substring(1):n,Zf=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}},ep=n=>({cache:Gf(n.cacheSize),parseClassName:Xf(n),sortModifiers:Zf(n),...zf(n)}),tp=/\s+/,np=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(tp);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,y=t(g?m.substring(0,v):m);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=t(m),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const E=a(h).join(":"),w=p?E+xa:E,S=w+y;if(i.includes(S))continue;i.push(S);const x=o(y,g);for(let T=0;T<x.length;++T){const N=x[T];i.push(w+N)}l=c+(l.length>0?" "+l:l)}return l};function rp(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=Ts(r))&&(t&&(t+=" "),t+=e);return t}const Ts=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=Ts(n[t]))&&(e&&(e+=" "),e+=r);return e};function Ps(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,f)=>f(c),n());return e=ep(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=np(l,e);return o(l,c),c}return function(){return a(rp.apply(null,arguments))}}const ze=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},Is=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ns=/^\((?:(\w[\w-]*):)?(.+)\)$/i,op=/^\d+\/\d+$/,ap=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ip=/\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$/,sp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,up=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rn=n=>op.test(n),ue=n=>!!n&&!Number.isNaN(Number(n)),tn=n=>!!n&&Number.isInteger(Number(n)),Da=n=>n.endsWith("%")&&ue(n.slice(0,-1)),Ft=n=>ap.test(n),cp=()=>!0,dp=n=>ip.test(n)&&!sp.test(n),$s=()=>!1,fp=n=>lp.test(n),pp=n=>up.test(n),hp=n=>!re(n)&&!oe(n),mp=n=>Yn(n,Ys,$s),re=n=>Is.test(n),yn=n=>Yn(n,Ws,dp),Sa=n=>Yn(n,wp,ue),Ls=n=>Yn(n,As,$s),vp=n=>Yn(n,Rs,pp),to=n=>Yn(n,js,fp),oe=n=>Ns.test(n),pr=n=>Wn(n,Ws),gp=n=>Wn(n,xp),Fs=n=>Wn(n,As),bp=n=>Wn(n,Ys),yp=n=>Wn(n,Rs),no=n=>Wn(n,js,!0),Yn=(n,r,e)=>{const t=Is.exec(n);return t?t[1]?r(t[1]):e(t[2]):!1},Wn=(n,r,e=!1)=>{const t=Ns.exec(n);return t?t[1]?r(t[1]):e:!1},As=n=>n==="position"||n==="percentage",Rs=n=>n==="image"||n==="url",Ys=n=>n==="length"||n==="size"||n==="bg-size",Ws=n=>n==="length",wp=n=>n==="number",xp=n=>n==="family-name",js=n=>n==="shadow",Hs=()=>{const n=ze("color"),r=ze("font"),e=ze("text"),t=ze("font-weight"),o=ze("tracking"),a=ze("leading"),i=ze("breakpoint"),s=ze("container"),l=ze("spacing"),u=ze("radius"),c=ze("shadow"),f=ze("inset-shadow"),h=ze("text-shadow"),p=ze("drop-shadow"),m=ze("blur"),v=ze("perspective"),g=ze("aspect"),y=ze("ease"),E=ze("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...S(),oe,re],T=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],_=()=>[oe,re,l],O=()=>[Rn,"full","auto",..._()],M=()=>[tn,"none","subgrid",oe,re],L=()=>["auto",{span:["full",tn,oe,re]},tn,oe,re],b=()=>[tn,"auto",oe,re],k=()=>["auto","min","max","fr",oe,re],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",..._()],V=()=>[Rn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],C=()=>[n,oe,re],q=()=>[...S(),Fs,Ls,{position:[oe,re]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",bp,mp,{size:[oe,re]}],G=()=>[Da,pr,yn],j=()=>["","none","full",u,oe,re],F=()=>["",ue,pr,yn],ne=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[ue,Da,Fs,Ls],B=()=>["","none",m,oe,re],K=()=>["none",ue,oe,re],J=()=>["none",ue,oe,re],Ie=()=>[ue,oe,re],Q=()=>[Rn,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ft],breakpoint:[Ft],color:[cp],container:[Ft],"drop-shadow":[Ft],ease:["in","out","in-out"],font:[hp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ft],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ft],shadow:[Ft],spacing:["px",ue],text:[Ft],"text-shadow":[Ft],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Rn,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:x()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[tn,"auto",oe,re]}],basis:[{basis:[Rn,"full","auto",s,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,Rn,"auto","initial","none",re]}],grow:[{grow:["",ue,oe,re]}],shrink:[{shrink:["",ue,oe,re]}],order:[{order:[tn,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:L()}],"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":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[s,"screen",...V()]}],"min-w":[{"min-w":[s,"screen","none",...V()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",e,pr,yn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,oe,Sa]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Da,re]}],"font-family":[{font:[gp,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,Sa]}],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:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",oe,yn]}],"text-decoration-color":[{decoration:C()}],"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:q()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tn,oe,re],radial:["",oe,re],conic:[tn,oe,re]},yp,vp]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"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:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,oe,re]}],"outline-w":[{outline:["",ue,pr,yn]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",c,no,to]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,no,to]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[ue,yn]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,no,to]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[ue,oe,re]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"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":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"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":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"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":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"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":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"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":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"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":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"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":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"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":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":S()}],"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":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:B()}],brightness:[{brightness:[ue,oe,re]}],contrast:[{contrast:[ue,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",p,no,to]}],"drop-shadow-color":[{"drop-shadow":C()}],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":B()}],"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",y,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":x()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:Ie()}],"skew-x":[{"skew-x":Ie()}],"skew-y":[{"skew-y":Ie()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",...C()]}],"stroke-w":[{stroke:[ue,pr,yn,Sa]}],stroke:[{stroke:["none",...C()]}],"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"]}},Ep=(n,{cacheSize:r,prefix:e,experimentalParseClassName:t,extend:o={},override:a={}})=>(hr(n,"cacheSize",r),hr(n,"prefix",e),hr(n,"experimentalParseClassName",t),ro(n.theme,a.theme),ro(n.classGroups,a.classGroups),ro(n.conflictingClassGroups,a.conflictingClassGroups),ro(n.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),hr(n,"orderSensitiveModifiers",a.orderSensitiveModifiers),oo(n.theme,o.theme),oo(n.classGroups,o.classGroups),oo(n.conflictingClassGroups,o.conflictingClassGroups),oo(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Bs(n,o,"orderSensitiveModifiers"),n),hr=(n,r,e)=>{e!==void 0&&(n[r]=e)},ro=(n,r)=>{if(r)for(const e in r)hr(n,e,r[e])},oo=(n,r)=>{if(r)for(const e in r)Bs(n,r,e)},Bs=(n,r,e)=>{const t=r[e];t!==void 0&&(n[e]=n[e]?n[e].concat(t):t)},Dp=((n,...r)=>typeof n=="function"?Ps(Hs,n,...r):Ps(()=>Ep(Hs(),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 ot(...n){return Dp(Qe(n))}const Sp=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>R.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:ot("petnowRadio size-[3.5vw]",n),onChange:t});var ka={},Ca,Vs;function zs(){if(Vs)return Ca;Vs=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 Ca=n,Ca}var At={},_a,qs;function mr(){if(qs)return _a;qs=1;function n(r){return r&&r.__esModule?r:{default:r}}return _a=n,_a}var ao,Us;function kp(){if(Us)return ao;Us=1;function n(){return ao=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 ao=n,ao}var Oa,Qs;function Cp(){if(Qs)return Oa;Qs=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 Oa=n,Oa}var Ma,Gs;function _p(){if(Gs)return Ma;Gs=1;var n=Cp();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 Ta,Ks;function Op(){if(Ks)return Ta;Ks=1;function n(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}return Ta=n,Ta}var Pa,Xs;function Mp(){if(Xs)return Pa;Xs=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 Pa=r,Pa}var vr,Js;function Tp(){if(Js)return vr;Js=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"?vr=r=function(o){return n(o)}:vr=r=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":n(o)},r(e)}return vr=r,vr}var Ia,Zs;function Pp(){if(Zs)return Ia;Zs=1;function n(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}return Ia=n,Ia}var Na,el;function Ip(){if(el)return Na;el=1;var n=Tp(),r=Pp();function e(t,o){return o&&(n(o)==="object"||typeof o=="function")?o:r(t)}return Na=e,Na}var io,tl;function Np(){if(tl)return io;tl=1;function n(r){return io=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}return io=n,io}var so,nl;function $p(){if(nl)return so;nl=1;function n(r,e){return so=n=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},n(r,e)}return so=n,so}var $a,rl;function Lp(){if(rl)return $a;rl=1;var n=$p();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 $a=r,$a}var lo={exports:{}},uo={exports:{}},be={};/** @license React v16.13.1
|
|
30
|
+
<%s key={someKey} {...props} />`,Cs,Yn,ID,Yn),Uf[Yn+Cs]=!0}}return E===t?_D(Be):CD(Be),Be}}function OD(E,B,J){return Qf(E,B,J,!0)}function PD(E,B,J){return Qf(E,B,J,!1)}var MD=PD,TD=OD;hr.Fragment=t,hr.jsx=MD,hr.jsxs=TD}()),hr}var Ms;function tp(){return Ms||(Ms=1,process.env.NODE_ENV==="production"?no.exports=Zf():no.exports=ep()),no.exports}var A=tp();function Ts(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=Ts(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function Qe(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=Ts(n))&&(t&&(t+=" "),t+=r);return t}const Da="-",np=n=>{const r=op(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(Da);return s[0]===""&&s.length!==1&&s.shift(),Is(s,r)||rp(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},Is=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?Is(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(Da);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ns=/^\[(.+)\]$/,rp=n=>{if(Ns.test(n)){const r=Ns.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},op=n=>{const{theme:r,classGroups:e}=n,t={nextPart:new Map,validators:[]};for(const o in e)Sa(e[o],t,o,r);return t},Sa=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:$s(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(ap(o)){Sa(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{Sa(i,$s(r,a),e,t)})})},$s=(n,r)=>{let e=n;return r.split(Da).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},ap=n=>n.isThemeGetter,ip=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)}}},ka="!",Ca=":",sp=Ca.length,lp=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===Ca){a.push(o.slice(l,m)),l=m+sp;continue}if(v==="/"){u=m;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const c=a.length===0?o:o.substring(l),f=up(c),p=f!==c,h=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:h}};if(r){const o=r+Ca,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},up=n=>n.endsWith(ka)?n.substring(0,n.length-1):n.startsWith(ka)?n.substring(1):n,cp=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}},dp=n=>({cache:ip(n.cacheSize),parseClassName:lp(n),sortModifiers:cp(n),...np(n)}),fp=/\s+/,pp=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(fp);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}=e(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!v,y=t(g?m.substring(0,v):m);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=t(m),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const D=a(p).join(":"),w=h?D+ka:D,S=w+y;if(i.includes(S))continue;i.push(S);const x=o(y,g);for(let T=0;T<x.length;++T){const $=x[T];i.push(w+$)}l=c+(l.length>0?" "+l:l)}return l};function hp(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=Ls(r))&&(t&&(t+=" "),t+=e);return t}const Ls=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=Ls(n[t]))&&(e&&(e+=" "),e+=r);return e};function Fs(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,f)=>f(c),n());return e=dp(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=pp(l,e);return o(l,c),c}return function(){return a(hp.apply(null,arguments))}}const ze=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},As=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mp=/^\d+\/\d+$/,vp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gp=/\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$/,bp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jn=n=>mp.test(n),ue=n=>!!n&&!Number.isNaN(Number(n)),nn=n=>!!n&&Number.isInteger(Number(n)),_a=n=>n.endsWith("%")&&ue(n.slice(0,-1)),Ft=n=>vp.test(n),xp=()=>!0,Ep=n=>gp.test(n)&&!bp.test(n),Ys=()=>!1,Dp=n=>yp.test(n),Sp=n=>wp.test(n),kp=n=>!te(n)&&!ne(n),Cp=n=>Wn(n,Bs,Ys),te=n=>As.test(n),wn=n=>Wn(n,zs,Ep),Oa=n=>Wn(n,Tp,ue),js=n=>Wn(n,Hs,Ys),_p=n=>Wn(n,Vs,Sp),ro=n=>Wn(n,qs,Dp),ne=n=>Rs.test(n),mr=n=>Hn(n,zs),Op=n=>Hn(n,Ip),Ws=n=>Hn(n,Hs),Pp=n=>Hn(n,Bs),Mp=n=>Hn(n,Vs),oo=n=>Hn(n,qs,!0),Wn=(n,r,e)=>{const t=As.exec(n);return t?t[1]?r(t[1]):e(t[2]):!1},Hn=(n,r,e=!1)=>{const t=Rs.exec(n);return t?t[1]?r(t[1]):e:!1},Hs=n=>n==="position"||n==="percentage",Vs=n=>n==="image"||n==="url",Bs=n=>n==="length"||n==="size"||n==="bg-size",zs=n=>n==="length",Tp=n=>n==="number",Ip=n=>n==="family-name",qs=n=>n==="shadow",Us=()=>{const n=ze("color"),r=ze("font"),e=ze("text"),t=ze("font-weight"),o=ze("tracking"),a=ze("leading"),i=ze("breakpoint"),s=ze("container"),l=ze("spacing"),u=ze("radius"),c=ze("shadow"),f=ze("inset-shadow"),p=ze("text-shadow"),h=ze("drop-shadow"),m=ze("blur"),v=ze("perspective"),g=ze("aspect"),y=ze("ease"),D=ze("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...S(),ne,te],T=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],C=()=>[ne,te,l],_=()=>[jn,"full","auto",...C()],P=()=>[nn,"none","subgrid",ne,te],F=()=>["auto",{span:["full",nn,ne,te]},nn,ne,te],b=()=>[nn,"auto",ne,te],k=()=>["auto","min","max","fr",ne,te],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...C()],V=()=>[jn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],O=()=>[n,ne,te],Q=()=>[...S(),Ws,js,{position:[ne,te]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",Pp,Cp,{size:[ne,te]}],Y=()=>[_a,mr,wn],j=()=>["","none","full",u,ne,te],q=()=>["",ue,mr,wn],X=()=>["solid","dashed","dotted","double"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[ue,_a,Ws,js],U=()=>["","none",m,ne,te],oe=()=>["none",ue,ne,te],ae=()=>["none",ue,ne,te],se=()=>[ue,ne,te],G=()=>[jn,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ft],breakpoint:[Ft],color:[xp],container:[Ft],"drop-shadow":[Ft],ease:["in","out","in-out"],font:[kp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ft],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ft],shadow:[Ft],spacing:["px",ue],text:[Ft],"text-shadow":[Ft],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jn,te,ne,g]}],container:["container"],columns:[{columns:[ue,te,ne,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:x()}],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:_()}],"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:[nn,"auto",ne,te]}],basis:[{basis:[jn,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,jn,"auto","initial","none",te]}],grow:[{grow:["",ue,ne,te]}],shrink:[{shrink:["",ue,ne,te]}],order:[{order:[nn,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:F()}],"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":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[s,"screen",...V()]}],"min-w":[{"min-w":[s,"screen","none",...V()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",e,mr,wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,ne,Oa]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_a,te]}],"font-family":[{font:[Op,te,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,ne,te]}],"line-clamp":[{"line-clamp":[ue,"none",ne,Oa]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",ne,wn]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ue,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],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",ne,te]}],"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:M()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nn,ne,te],radial:["",ne,te],conic:[nn,ne,te]},Mp,_p]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,ne,te]}],"outline-w":[{outline:["",ue,mr,wn]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",c,oo,ro]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",f,oo,ro]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ue,wn]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,oo,ro]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ue,ne,te]}],"mix-blend":[{"mix-blend":[...R(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":R()}],"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":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Q()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:U()}],brightness:[{brightness:[ue,ne,te]}],contrast:[{contrast:[ue,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",h,oo,ro]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ue,ne,te]}],"hue-rotate":[{"hue-rotate":[ue,ne,te]}],invert:[{invert:["",ue,ne,te]}],saturate:[{saturate:[ue,ne,te]}],sepia:[{sepia:["",ue,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[ue,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[ue,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",ue,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[ue,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[ue,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,ne,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",ne,te]}],ease:[{ease:["linear","initial",y,ne,te]}],delay:[{delay:[ue,ne,te]}],animate:[{animate:["none",D,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ne,te]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",ne,te]}],"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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",ne,te]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ue,mr,wn,Oa]}],stroke:[{stroke:["none",...O()]}],"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"]}},Np=(n,{cacheSize:r,prefix:e,experimentalParseClassName:t,extend:o={},override:a={}})=>(vr(n,"cacheSize",r),vr(n,"prefix",e),vr(n,"experimentalParseClassName",t),ao(n.theme,a.theme),ao(n.classGroups,a.classGroups),ao(n.conflictingClassGroups,a.conflictingClassGroups),ao(n.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),vr(n,"orderSensitiveModifiers",a.orderSensitiveModifiers),io(n.theme,o.theme),io(n.classGroups,o.classGroups),io(n.conflictingClassGroups,o.conflictingClassGroups),io(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Qs(n,o,"orderSensitiveModifiers"),n),vr=(n,r,e)=>{e!==void 0&&(n[r]=e)},ao=(n,r)=>{if(r)for(const e in r)vr(n,e,r[e])},io=(n,r)=>{if(r)for(const e in r)Qs(n,r,e)},Qs=(n,r,e)=>{const t=r[e];t!==void 0&&(n[e]=n[e]?n[e].concat(t):t)},$p=((n,...r)=>typeof n=="function"?Fs(Us,n,...r):Fs(()=>Np(Us(),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 it(...n){return $p(Qe(n))}const Lp=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>A.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:it("petnowRadio size-[3.5vw]",n),onChange:t});var Pa={},Ma,Gs;function Ks(){if(Gs)return Ma;Gs=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 Ma=n,Ma}var At={},Ta,Xs;function gr(){if(Xs)return Ta;Xs=1;function n(r){return r&&r.__esModule?r:{default:r}}return Ta=n,Ta}var so,Js;function Fp(){if(Js)return so;Js=1;function n(){return so=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 so=n,so}var Ia,Zs;function Ap(){if(Zs)return Ia;Zs=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 Ia=n,Ia}var Na,el;function Rp(){if(el)return Na;el=1;var n=Ap();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 Na=r,Na}var $a,tl;function Yp(){if(tl)return $a;tl=1;function n(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}return $a=n,$a}var La,nl;function jp(){if(nl)return La;nl=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 La=r,La}var br,rl;function Wp(){if(rl)return br;rl=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"?br=r=function(o){return n(o)}:br=r=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":n(o)},r(e)}return br=r,br}var Fa,ol;function Hp(){if(ol)return Fa;ol=1;function n(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}return Fa=n,Fa}var Aa,al;function Vp(){if(al)return Aa;al=1;var n=Wp(),r=Hp();function e(t,o){return o&&(n(o)==="object"||typeof o=="function")?o:r(t)}return Aa=e,Aa}var lo,il;function Bp(){if(il)return lo;il=1;function n(r){return lo=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}return lo=n,lo}var uo,sl;function zp(){if(sl)return uo;sl=1;function n(r,e){return uo=n=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},n(r,e)}return uo=n,uo}var Ra,ll;function qp(){if(ll)return Ra;ll=1;var n=zp();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 Ra=r,Ra}var co={exports:{}},fo={exports:{}},we={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var ul;function Up(){if(ul)return we;ul=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,p=n?Symbol.for("react.suspense_list"):60120,h=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,y=n?Symbol.for("react.responder"):60118,D=n?Symbol.for("react.scope"):60119;function w(x){if(typeof x=="object"&&x!==null){var T=x.$$typeof;switch(T){case r:switch(x=x.type,x){case l:case u:case t:case a:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case c:case m:case h:case i:return x;default:return T}}case e:return T}}}function S(x){return w(x)===u}return we.AsyncMode=l,we.ConcurrentMode=u,we.ContextConsumer=s,we.ContextProvider=i,we.Element=r,we.ForwardRef=c,we.Fragment=t,we.Lazy=m,we.Memo=h,we.Portal=e,we.Profiler=a,we.StrictMode=o,we.Suspense=f,we.isAsyncMode=function(x){return S(x)||w(x)===l},we.isConcurrentMode=S,we.isContextConsumer=function(x){return w(x)===s},we.isContextProvider=function(x){return w(x)===i},we.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},we.isForwardRef=function(x){return w(x)===c},we.isFragment=function(x){return w(x)===t},we.isLazy=function(x){return w(x)===m},we.isMemo=function(x){return w(x)===h},we.isPortal=function(x){return w(x)===e},we.isProfiler=function(x){return w(x)===a},we.isStrictMode=function(x){return w(x)===o},we.isSuspense=function(x){return w(x)===f},we.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===t||x===u||x===a||x===o||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===h||x.$$typeof===i||x.$$typeof===s||x.$$typeof===c||x.$$typeof===g||x.$$typeof===y||x.$$typeof===D||x.$$typeof===v)},we.typeOf=w,we}var xe={};/** @license React v16.13.1
|
|
38
38
|
* react-is.development.js
|
|
39
39
|
*
|
|
40
40
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var
|
|
44
|
+
*/var cl;function Qp(){return cl||(cl=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,p=n?Symbol.for("react.suspense_list"):60120,h=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,y=n?Symbol.for("react.responder"):60118,D=n?Symbol.for("react.scope"):60119;function w(G){return typeof G=="string"||typeof G=="function"||G===t||G===u||G===a||G===o||G===f||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===m||G.$$typeof===h||G.$$typeof===i||G.$$typeof===s||G.$$typeof===c||G.$$typeof===g||G.$$typeof===y||G.$$typeof===D||G.$$typeof===v)}function S(G){if(typeof G=="object"&&G!==null){var ot=G.$$typeof;switch(ot){case r:var tn=G.type;switch(tn){case l:case u:case t:case a:case o:case f:return tn;default:var gt=tn&&tn.$$typeof;switch(gt){case s:case c:case m:case h:case i:return gt;default:return ot}}case e:return ot}}}var x=l,T=u,$=s,C=i,_=r,P=c,F=t,b=m,k=h,L=e,N=a,I=o,V=f,O=!1;function Q(G){return O||(O=!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(G)||S(G)===l}function M(G){return S(G)===u}function W(G){return S(G)===s}function Y(G){return S(G)===i}function j(G){return typeof G=="object"&&G!==null&&G.$$typeof===r}function q(G){return S(G)===c}function X(G){return S(G)===t}function R(G){return S(G)===m}function z(G){return S(G)===h}function U(G){return S(G)===e}function oe(G){return S(G)===a}function ae(G){return S(G)===o}function se(G){return S(G)===f}xe.AsyncMode=x,xe.ConcurrentMode=T,xe.ContextConsumer=$,xe.ContextProvider=C,xe.Element=_,xe.ForwardRef=P,xe.Fragment=F,xe.Lazy=b,xe.Memo=k,xe.Portal=L,xe.Profiler=N,xe.StrictMode=I,xe.Suspense=V,xe.isAsyncMode=Q,xe.isConcurrentMode=M,xe.isContextConsumer=W,xe.isContextProvider=Y,xe.isElement=j,xe.isForwardRef=q,xe.isFragment=X,xe.isLazy=R,xe.isMemo=z,xe.isPortal=U,xe.isProfiler=oe,xe.isStrictMode=ae,xe.isSuspense=se,xe.isValidElementType=w,xe.typeOf=S}()),xe}var dl;function fl(){return dl||(dl=1,process.env.NODE_ENV==="production"?fo.exports=Up():fo.exports=Qp()),fo.exports}/*
|
|
45
45
|
object-assign
|
|
46
46
|
(c) Sindre Sorhus
|
|
47
47
|
@license MIT
|
|
48
|
-
*/var
|
|
49
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Q=Ie(A,J,F,ne,U+"."+J,e);if(Q)return Q}return null}return g(W)}function $(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every($);if(P===null||s(P))return!0;var W=f(P);if(W){var G=W.call(P),j;if(W!==P.entries){for(;!(j=G.next()).done;)if(!$(j.value))return!1}else for(;!(j=G.next()).done;){var F=j.value;if(F&&!$(F[1]))return!1}}else return!1;return!0;default:return!1}}function Y(P,W){return P==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function I(P){var W=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":Y(W,P)?"symbol":W}function V(P){if(typeof P>"u"||P===null)return""+P;var W=I(P);if(W==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return W}function C(P){var W=V(P);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function q(P){return!P.constructor||!P.constructor.name?h:P.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},Wa}var ja,hl;function jp(){if(hl)return ja;hl=1;var n=Aa();function r(){}function e(){}return e.resetWarningCache=r,ja=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},ja}var ml;function Hp(){if(ml)return lo.exports;if(ml=1,process.env.NODE_ENV!=="production"){var n=sl(),r=!0;lo.exports=Wp()(n.isElement,r)}else lo.exports=jp()();return lo.exports}var Ha,vl;function gl(){if(vl)return Ha;vl=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 Ha=r,Ha}var Ba={},gr={},bl;function Bp(){if(bl)return gr;bl=1;var n=mr();Object.defineProperty(gr,"__esModule",{value:!0}),gr.default=void 0;var r=n(d),e=n(gl()),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 gr.default=o,gr}var co={},br={},yl;function wl(){if(yl)return br;yl=1,Object.defineProperty(br,"__esModule",{value:!0}),br.default=void 0;var n={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};return br.default=n,br}var xl;function Vp(){if(xl)return co;xl=1;var n=mr();Object.defineProperty(co,"__esModule",{value:!0}),co.default=t;var r=n(d),e=n(wl());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 co}var yr={},El;function zp(){if(El)return yr;El=1;var n=mr();Object.defineProperty(yr,"__esModule",{value:!0}),yr.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 yr.default=t,yr}var wr={},Dl;function qp(){if(Dl)return wr;Dl=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.default=void 0;function n(e,t){var o=e%t;return o<0?o+t:o}var r=n;return wr.default=r,wr}var Sl;function Up(){return Sl||(Sl=1,function(n){var r=mr();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(Bp()),t=r(Vp()),o=r(wl()),a=r(zp()),i=r(qp())}(Ba)),Ba}var kl;function Qp(){if(kl)return At;kl=1;var n=zs(),r=mr();Object.defineProperty(At,"__esModule",{value:!0}),At.getDomTreeShapes=w,At.findNativeHandler=x,At.default=At.SwipeableViewsContext=void 0;var e=r(kp()),t=r(_p()),o=r(Op()),a=r(Mp()),i=r(Ip()),s=r(Np()),l=r(Lp()),u=n(d),c=r(Hp()),f=r(gl()),h=Up();function p(O,M,L,b){return O.addEventListener(M,L,b),{remove:function(){O.removeEventListener(M,L,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(M){return"translate(".concat(-M,"%, 0)")},"x-reverse":function(M){return"translate(".concat(M,"%, 0)")},y:function(M){return"translate(0, ".concat(-M,"%)")},"y-reverse":function(M){return"translate(0, ".concat(M,"%)")}},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(O,M){var L=M.duration,b=M.easeFunction,k=M.delay;return"".concat(O," ").concat(L," ").concat(b," ").concat(k)}function y(O,M){var L=v.rotationMatrix[M];return{pageX:L.x[0]*O.pageX+L.x[1]*O.pageY,pageY:L.y[0]*O.pageX+L.y[1]*O.pageY}}function E(O){return O.touches=[{pageX:O.pageX,pageY:O.pageY}],O}function w(O,M){for(var L=[];O&&O!==M&&O!==document.body&&!O.hasAttribute("data-swipeable");){var b=window.getComputedStyle(O);b.getPropertyValue("position")==="absolute"||b.getPropertyValue("overflow-x")==="hidden"?L=[]:(O.clientWidth>0&&O.scrollWidth>O.clientWidth||O.clientHeight>0&&O.scrollHeight>O.clientHeight)&&L.push({element:O,scrollWidth:O.scrollWidth,scrollHeight:O.scrollHeight,clientWidth:O.clientWidth,clientHeight:O.clientHeight,scrollLeft:O.scrollLeft,scrollTop:O.scrollTop}),O=O.parentNode}return L}var S=null;function x(O){var M=O.domTreeShapes,L=O.pageX,b=O.startX,k=O.axis;return M.some(function($){var Y=L>=b;(k==="x"||k==="y")&&(Y=!Y);var I=Math.round($[v.scrollPosition[k]]),V=I>0,C=I+$[v.clientLength[k]]<$[v.scrollLength[k]];return Y&&C||!Y&&V?(S=$.element,!0):!1})}var T=u.createContext();At.SwipeableViewsContext=T,process.env.NODE_ENV!=="production"&&(T.displayName="SwipeableViewsContext");var N=function(O){(0,l.default)(M,O);function M(L){var b;return(0,o.default)(this,M),b=(0,i.default)(this,(0,s.default)(M).call(this,L)),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(k){b.rootNode=k},b.setContainerNode=function(k){b.containerNode=k},b.setActiveSlide=function(k){b.activeSlide=k,b.updateHeight()},b.handleSwipeStart=function(k){var $=b.props.axis,Y=y(k.touches[0],$);b.viewLength=b.rootNode.getBoundingClientRect()[v.length[$]],b.startX=Y.pageX,b.lastX=Y.pageX,b.vx=0,b.startY=Y.pageY,b.isSwiping=void 0,b.started=!0;var I=window.getComputedStyle(b.containerNode),V=I.getPropertyValue("-webkit-transform")||I.getPropertyValue("transform");if(V&&V!=="none"){var C=V.split("(")[1].split(")")[0].split(","),q=window.getComputedStyle(b.rootNode),P=y({pageX:parseInt(C[4],10),pageY:parseInt(C[5],10)},$);b.startIndex=-P.pageX/(b.viewLength-parseInt(q.paddingLeft,10)-parseInt(q.paddingRight,10))||0}},b.handleSwipeMove=function(k){if(!b.started){b.handleTouchStart(k);return}if(!(S!==null&&S!==b.rootNode)){var $=b.props,Y=$.axis,I=$.children,V=$.ignoreNativeScroll,C=$.onSwitching,q=$.resistance,P=y(k.touches[0],Y);if(b.isSwiping===void 0){var W=Math.abs(P.pageX-b.startX),G=Math.abs(P.pageY-b.startY),j=W>G&&W>h.constant.UNCERTAINTY_THRESHOLD;if(!q&&(Y==="y"||Y==="y-reverse")&&(b.indexCurrent===0&&b.startX<P.pageX||b.indexCurrent===u.Children.count(b.props.children)-1&&b.startX>P.pageX)){b.isSwiping=!1;return}if(W>G&&k.preventDefault(),j===!0||G>h.constant.UNCERTAINTY_THRESHOLD){b.isSwiping=j,b.startX=P.pageX;return}}if(b.isSwiping===!0){k.preventDefault(),b.vx=b.vx*.5+(P.pageX-b.lastX)*.5,b.lastX=P.pageX;var F=(0,h.computeIndex)({children:I,resistance:q,pageX:P.pageX,startIndex:b.startIndex,startX:b.startX,viewLength:b.viewLength}),ne=F.index,U=F.startX;if(S===null&&!V){var A=w(k.target,b.rootNode),B=x({domTreeShapes:A,startX:b.startX,pageX:P.pageX,axis:Y});if(B)return}U?b.startX=U:S===null&&(S=b.rootNode),b.setIndexCurrent(ne);var K=function(){C&&C(ne,"move")};(b.state.displaySameSlide||!b.state.isDragging)&&b.setState({displaySameSlide:!1,isDragging:!0},K),K()}}},b.handleSwipeEnd=function(){if(S=null,!!b.started&&(b.started=!1,b.isSwiping===!0)){var k=b.state.indexLatest,$=b.indexCurrent,Y=k-$,I;Math.abs(b.vx)>b.props.threshold?b.vx>0?I=Math.floor($):I=Math.ceil($):Math.abs(Y)>b.props.hysteresis?I=Y>0?Math.floor($):Math.ceil($):I=k;var V=u.Children.count(b.props.children)-1;I<0?I=0:I>V&&(I=V),b.setIndexCurrent(I),b.setState({indexLatest:I,isDragging:!1},function(){b.props.onSwitching&&b.props.onSwitching(I,"end"),b.props.onChangeIndex&&I!==k&&b.props.onChangeIndex(I,k,{reason:"swipe"}),$===k&&b.handleTransitionEnd()})}},b.handleTouchStart=function(k){b.props.onTouchStart&&b.props.onTouchStart(k),b.handleSwipeStart(k)},b.handleTouchEnd=function(k){b.props.onTouchEnd&&b.props.onTouchEnd(k),b.handleSwipeEnd(k)},b.handleMouseDown=function(k){b.props.onMouseDown&&b.props.onMouseDown(k),k.persist(),b.handleSwipeStart(E(k))},b.handleMouseUp=function(k){b.props.onMouseUp&&b.props.onMouseUp(k),b.handleSwipeEnd(E(k))},b.handleMouseLeave=function(k){b.props.onMouseLeave&&b.props.onMouseLeave(k),b.started&&b.handleSwipeEnd(E(k))},b.handleMouseMove=function(k){b.props.onMouseMove&&b.props.onMouseMove(k),b.started&&b.handleSwipeMove(E(k))},b.handleScroll=function(k){if(b.props.onScroll&&b.props.onScroll(k),k.target===b.rootNode){if(b.ignoreNextScrollEvents){b.ignoreNextScrollEvents=!1;return}var $=b.state.indexLatest,Y=Math.ceil(k.target.scrollLeft/k.target.clientWidth)+$;b.ignoreNextScrollEvents=!0,k.target.scrollLeft=0,b.props.onChangeIndex&&Y!==$&&b.props.onChangeIndex(Y,$,{reason:"focus"})}},b.updateHeight=function(){if(b.activeSlide!==null){var k=b.activeSlide.children[0];k!==void 0&&k.offsetHeight!==void 0&&b.state.heightLatest!==k.offsetHeight&&b.setState({heightLatest:k.offsetHeight})}},process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(L),b.state={indexLatest:L.index,isDragging:!1,renderOnlyActive:!L.disableLazyLoading,heightLatest:0,displaySameSlide:!0},b.setIndexCurrent(L.index),b}return(0,a.default)(M,[{key:"componentDidMount",value:function(){var b=this;this.transitionListener=p(this.containerNode,"transitionend",function(k){k.target===b.containerNode&&b.handleTransitionEnd()}),this.touchMoveListener=p(this.rootNode,"touchmove",function(k){b.props.disabled||b.handleSwipeMove(k)},{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 k=b.index;typeof k=="number"&&k!==this.props.index&&(process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(b),this.setIndexCurrent(k),this.setState({displaySameSlide:(0,h.getDisplaySameSlide)(this.props,b),indexLatest:k}))}},{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 k=this.props.axis,$=v.transform[k](b*100);this.containerNode.style.WebkitTransform=$,this.containerNode.style.transform=$}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var b=this,k=this.props;k.action;var $=k.animateHeight,Y=k.animateTransitions,I=k.axis,V=k.children,C=k.containerStyle,q=k.disabled;k.disableLazyLoading;var P=k.enableMouseEvents;k.hysteresis,k.ignoreNativeScroll,k.index,k.onChangeIndex,k.onSwitching,k.onTransitionEnd,k.resistance;var W=k.slideStyle,G=k.slideClassName,j=k.springConfig,F=k.style;k.threshold;var ne=(0,t.default)(k,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),U=this.state,A=U.displaySameSlide,B=U.heightLatest,K=U.indexLatest,J=U.isDragging,Ie=U.renderOnlyActive,Q=q?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},nt=!q&&P?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{};process.env.NODE_ENV!=="production"&&(0,f.default)(!$||!C||!C.height,`react-swipeable-view: You are setting animateHeight to true but you are
|
|
48
|
+
*/var Ya,pl;function Gp(){if(pl)return Ya;pl=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 Ya=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 p=0;p<u.length;p++)e.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},Ya}var ja,hl;function Wa(){if(hl)return ja;hl=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ja=n,ja}var Ha,ml;function vl(){return ml||(ml=1,Ha=Function.call.bind(Object.prototype.hasOwnProperty)),Ha}var Va,gl;function Kp(){if(gl)return Va;gl=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var r=Wa(),e={},t=vl();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 p=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 p.name="Invariant Violation",p}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 h=u?u():"";n("Failed "+s+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(e={})},Va=o,Va}var Ba,bl;function Xp(){if(bl)return Ba;bl=1;var n=fl(),r=Gp(),e=Wa(),t=vl(),o=Kp(),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 Ba=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(M){var W=M&&(u&&M[u]||M[c]);if(typeof W=="function")return W}var p="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:D(),arrayOf:w,element:S(),elementType:x(),instanceOf:T,node:P(),objectOf:C,oneOf:$,oneOfType:_,shape:b,exact:k};function m(M,W){return M===W?M!==0||1/M===1/W:M!==M&&W!==W}function v(M,W){this.message=M,this.data=W&&typeof W=="object"?W:{},this.stack=""}v.prototype=Error.prototype;function g(M){if(process.env.NODE_ENV!=="production")var W={},Y=0;function j(X,R,z,U,oe,ae,se){if(U=U||p,ae=ae||z,se!==e){if(l){var G=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 G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ot=U+":"+z;!W[ot]&&Y<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+U+"`. 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."),W[ot]=!0,Y++)}}return R[z]==null?X?R[z]===null?new v("The "+oe+" `"+ae+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new v("The "+oe+" `"+ae+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:M(R,z,U,oe,ae)}var q=j.bind(null,!1);return q.isRequired=j.bind(null,!0),q}function y(M){function W(Y,j,q,X,R,z){var U=Y[j],oe=I(U);if(oe!==M){var ae=V(U);return new v("Invalid "+X+" `"+R+"` of type "+("`"+ae+"` supplied to `"+q+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return g(W)}function D(){return g(i)}function w(M){function W(Y,j,q,X,R){if(typeof M!="function")return new v("Property `"+R+"` of component `"+q+"` has invalid PropType notation inside arrayOf.");var z=Y[j];if(!Array.isArray(z)){var U=I(z);return new v("Invalid "+X+" `"+R+"` of type "+("`"+U+"` supplied to `"+q+"`, expected an array."))}for(var oe=0;oe<z.length;oe++){var ae=M(z,oe,q,X,R+"["+oe+"]",e);if(ae instanceof Error)return ae}return null}return g(W)}function S(){function M(W,Y,j,q,X){var R=W[Y];if(!s(R)){var z=I(R);return new v("Invalid "+q+" `"+X+"` of type "+("`"+z+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return g(M)}function x(){function M(W,Y,j,q,X){var R=W[Y];if(!n.isValidElementType(R)){var z=I(R);return new v("Invalid "+q+" `"+X+"` of type "+("`"+z+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return g(M)}function T(M){function W(Y,j,q,X,R){if(!(Y[j]instanceof M)){var z=M.name||p,U=Q(Y[j]);return new v("Invalid "+X+" `"+R+"` of type "+("`"+U+"` supplied to `"+q+"`, expected ")+("instance of `"+z+"`."))}return null}return g(W)}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 W(Y,j,q,X,R){for(var z=Y[j],U=0;U<M.length;U++)if(m(z,M[U]))return null;var oe=JSON.stringify(M,function(se,G){var ot=V(G);return ot==="symbol"?String(G):G});return new v("Invalid "+X+" `"+R+"` of value `"+String(z)+"` "+("supplied to `"+q+"`, expected one of "+oe+"."))}return g(W)}function C(M){function W(Y,j,q,X,R){if(typeof M!="function")return new v("Property `"+R+"` of component `"+q+"` has invalid PropType notation inside objectOf.");var z=Y[j],U=I(z);if(U!=="object")return new v("Invalid "+X+" `"+R+"` of type "+("`"+U+"` supplied to `"+q+"`, expected an object."));for(var oe in z)if(t(z,oe)){var ae=M(z,oe,q,X,R+"."+oe,e);if(ae instanceof Error)return ae}return null}return g(W)}function _(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 W=0;W<M.length;W++){var Y=M[W];if(typeof Y!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(Y)+" at index "+W+"."),i}function j(q,X,R,z,U){for(var oe=[],ae=0;ae<M.length;ae++){var se=M[ae],G=se(q,X,R,z,U,e);if(G==null)return null;G.data&&t(G.data,"expectedType")&&oe.push(G.data.expectedType)}var ot=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new v("Invalid "+z+" `"+U+"` supplied to "+("`"+R+"`"+ot+"."))}return g(j)}function P(){function M(W,Y,j,q,X){return L(W[Y])?null:new v("Invalid "+q+" `"+X+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return g(M)}function F(M,W,Y,j,q){return new v((M||"React class")+": "+W+" type `"+Y+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+q+"`.")}function b(M){function W(Y,j,q,X,R){var z=Y[j],U=I(z);if(U!=="object")return new v("Invalid "+X+" `"+R+"` of type `"+U+"` "+("supplied to `"+q+"`, expected `object`."));for(var oe in M){var ae=M[oe];if(typeof ae!="function")return F(q,X,R,oe,V(ae));var se=ae(z,oe,q,X,R+"."+oe,e);if(se)return se}return null}return g(W)}function k(M){function W(Y,j,q,X,R){var z=Y[j],U=I(z);if(U!=="object")return new v("Invalid "+X+" `"+R+"` of type `"+U+"` "+("supplied to `"+q+"`, expected `object`."));var oe=r({},Y[j],M);for(var ae in oe){var se=M[ae];if(t(M,ae)&&typeof se!="function")return F(q,X,R,ae,V(se));if(!se)return new v("Invalid "+X+" `"+R+"` key `"+ae+"` supplied to `"+q+"`.\nBad object: "+JSON.stringify(Y[j],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var G=se(z,ae,q,X,R+"."+ae,e);if(G)return G}return null}return g(W)}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 W=f(M);if(W){var Y=W.call(M),j;if(W!==M.entries){for(;!(j=Y.next()).done;)if(!L(j.value))return!1}else for(;!(j=Y.next()).done;){var q=j.value;if(q&&!L(q[1]))return!1}}else return!1;return!0;default:return!1}}function N(M,W){return M==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function I(M){var W=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":N(W,M)?"symbol":W}function V(M){if(typeof M>"u"||M===null)return""+M;var W=I(M);if(W==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return W}function O(M){var W=V(M);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function Q(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Ba}var za,yl;function Jp(){if(yl)return za;yl=1;var n=Wa();function r(){}function e(){}return e.resetWarningCache=r,za=function(){function t(i,s,l,u,c,f){if(f!==n){var p=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 p.name="Invariant Violation",p}}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},za}var wl;function Zp(){if(wl)return co.exports;if(wl=1,process.env.NODE_ENV!=="production"){var n=fl(),r=!0;co.exports=Xp()(n.isElement,r)}else co.exports=Jp()();return co.exports}var qa,xl;function El(){if(xl)return qa;xl=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 qa=r,qa}var Ua={},yr={},Dl;function eh(){if(Dl)return yr;Dl=1;var n=gr();Object.defineProperty(yr,"__esModule",{value:!0}),yr.default=void 0;var r=n(d),e=n(El()),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 yr.default=o,yr}var po={},wr={},Sl;function kl(){if(Sl)return wr;Sl=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.default=void 0;var n={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};return wr.default=n,wr}var Cl;function th(){if(Cl)return po;Cl=1;var n=gr();Object.defineProperty(po,"__esModule",{value:!0}),po.default=t;var r=n(d),e=n(kl());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,p=i+(s-l)/u,h;return c?p<0?p=Math.exp(p*e.default.RESISTANCE_COEF)-1:p>f&&(p=f+1-Math.exp((f-p)*e.default.RESISTANCE_COEF)):p<0?(p=0,h=(p-i)*u+l):p>f&&(p=f,h=(p-i)*u+l),{index:p,startX:h}}return po}var xr={},_l;function nh(){if(_l)return xr;_l=1;var n=gr();Object.defineProperty(xr,"__esModule",{value:!0}),xr.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),p=f[i.index];c===p&&(s=!0)}}return s},t=e;return xr.default=t,xr}var Er={},Ol;function rh(){if(Ol)return Er;Ol=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.default=void 0;function n(e,t){var o=e%t;return o<0?o+t:o}var r=n;return Er.default=r,Er}var Pl;function oh(){return Pl||(Pl=1,function(n){var r=gr();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(eh()),t=r(th()),o=r(kl()),a=r(nh()),i=r(rh())}(Ua)),Ua}var Ml;function ah(){if(Ml)return At;Ml=1;var n=Ks(),r=gr();Object.defineProperty(At,"__esModule",{value:!0}),At.getDomTreeShapes=w,At.findNativeHandler=x,At.default=At.SwipeableViewsContext=void 0;var e=r(Fp()),t=r(Rp()),o=r(Yp()),a=r(jp()),i=r(Vp()),s=r(Bp()),l=r(qp()),u=n(d),c=r(Zp()),f=r(El()),p=oh();function h(_,P,F,b){return _.addEventListener(P,F,b),{remove:function(){_.removeEventListener(P,F,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(P){return"translate(".concat(-P,"%, 0)")},"x-reverse":function(P){return"translate(".concat(P,"%, 0)")},y:function(P){return"translate(0, ".concat(-P,"%)")},"y-reverse":function(P){return"translate(0, ".concat(P,"%)")}},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(_,P){var F=P.duration,b=P.easeFunction,k=P.delay;return"".concat(_," ").concat(F," ").concat(b," ").concat(k)}function y(_,P){var F=v.rotationMatrix[P];return{pageX:F.x[0]*_.pageX+F.x[1]*_.pageY,pageY:F.y[0]*_.pageX+F.y[1]*_.pageY}}function D(_){return _.touches=[{pageX:_.pageX,pageY:_.pageY}],_}function w(_,P){for(var F=[];_&&_!==P&&_!==document.body&&!_.hasAttribute("data-swipeable");){var b=window.getComputedStyle(_);b.getPropertyValue("position")==="absolute"||b.getPropertyValue("overflow-x")==="hidden"?F=[]:(_.clientWidth>0&&_.scrollWidth>_.clientWidth||_.clientHeight>0&&_.scrollHeight>_.clientHeight)&&F.push({element:_,scrollWidth:_.scrollWidth,scrollHeight:_.scrollHeight,clientWidth:_.clientWidth,clientHeight:_.clientHeight,scrollLeft:_.scrollLeft,scrollTop:_.scrollTop}),_=_.parentNode}return F}var S=null;function x(_){var P=_.domTreeShapes,F=_.pageX,b=_.startX,k=_.axis;return P.some(function(L){var N=F>=b;(k==="x"||k==="y")&&(N=!N);var I=Math.round(L[v.scrollPosition[k]]),V=I>0,O=I+L[v.clientLength[k]]<L[v.scrollLength[k]];return N&&O||!N&&V?(S=L.element,!0):!1})}var T=u.createContext();At.SwipeableViewsContext=T,process.env.NODE_ENV!=="production"&&(T.displayName="SwipeableViewsContext");var $=function(_){(0,l.default)(P,_);function P(F){var b;return(0,o.default)(this,P),b=(0,i.default)(this,(0,s.default)(P).call(this,F)),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(k){b.rootNode=k},b.setContainerNode=function(k){b.containerNode=k},b.setActiveSlide=function(k){b.activeSlide=k,b.updateHeight()},b.handleSwipeStart=function(k){var L=b.props.axis,N=y(k.touches[0],L);b.viewLength=b.rootNode.getBoundingClientRect()[v.length[L]],b.startX=N.pageX,b.lastX=N.pageX,b.vx=0,b.startY=N.pageY,b.isSwiping=void 0,b.started=!0;var I=window.getComputedStyle(b.containerNode),V=I.getPropertyValue("-webkit-transform")||I.getPropertyValue("transform");if(V&&V!=="none"){var O=V.split("(")[1].split(")")[0].split(","),Q=window.getComputedStyle(b.rootNode),M=y({pageX:parseInt(O[4],10),pageY:parseInt(O[5],10)},L);b.startIndex=-M.pageX/(b.viewLength-parseInt(Q.paddingLeft,10)-parseInt(Q.paddingRight,10))||0}},b.handleSwipeMove=function(k){if(!b.started){b.handleTouchStart(k);return}if(!(S!==null&&S!==b.rootNode)){var L=b.props,N=L.axis,I=L.children,V=L.ignoreNativeScroll,O=L.onSwitching,Q=L.resistance,M=y(k.touches[0],N);if(b.isSwiping===void 0){var W=Math.abs(M.pageX-b.startX),Y=Math.abs(M.pageY-b.startY),j=W>Y&&W>p.constant.UNCERTAINTY_THRESHOLD;if(!Q&&(N==="y"||N==="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(W>Y&&k.preventDefault(),j===!0||Y>p.constant.UNCERTAINTY_THRESHOLD){b.isSwiping=j,b.startX=M.pageX;return}}if(b.isSwiping===!0){k.preventDefault(),b.vx=b.vx*.5+(M.pageX-b.lastX)*.5,b.lastX=M.pageX;var q=(0,p.computeIndex)({children:I,resistance:Q,pageX:M.pageX,startIndex:b.startIndex,startX:b.startX,viewLength:b.viewLength}),X=q.index,R=q.startX;if(S===null&&!V){var z=w(k.target,b.rootNode),U=x({domTreeShapes:z,startX:b.startX,pageX:M.pageX,axis:N});if(U)return}R?b.startX=R:S===null&&(S=b.rootNode),b.setIndexCurrent(X);var oe=function(){O&&O(X,"move")};(b.state.displaySameSlide||!b.state.isDragging)&&b.setState({displaySameSlide:!1,isDragging:!0},oe),oe()}}},b.handleSwipeEnd=function(){if(S=null,!!b.started&&(b.started=!1,b.isSwiping===!0)){var k=b.state.indexLatest,L=b.indexCurrent,N=k-L,I;Math.abs(b.vx)>b.props.threshold?b.vx>0?I=Math.floor(L):I=Math.ceil(L):Math.abs(N)>b.props.hysteresis?I=N>0?Math.floor(L):Math.ceil(L):I=k;var V=u.Children.count(b.props.children)-1;I<0?I=0:I>V&&(I=V),b.setIndexCurrent(I),b.setState({indexLatest:I,isDragging:!1},function(){b.props.onSwitching&&b.props.onSwitching(I,"end"),b.props.onChangeIndex&&I!==k&&b.props.onChangeIndex(I,k,{reason:"swipe"}),L===k&&b.handleTransitionEnd()})}},b.handleTouchStart=function(k){b.props.onTouchStart&&b.props.onTouchStart(k),b.handleSwipeStart(k)},b.handleTouchEnd=function(k){b.props.onTouchEnd&&b.props.onTouchEnd(k),b.handleSwipeEnd(k)},b.handleMouseDown=function(k){b.props.onMouseDown&&b.props.onMouseDown(k),k.persist(),b.handleSwipeStart(D(k))},b.handleMouseUp=function(k){b.props.onMouseUp&&b.props.onMouseUp(k),b.handleSwipeEnd(D(k))},b.handleMouseLeave=function(k){b.props.onMouseLeave&&b.props.onMouseLeave(k),b.started&&b.handleSwipeEnd(D(k))},b.handleMouseMove=function(k){b.props.onMouseMove&&b.props.onMouseMove(k),b.started&&b.handleSwipeMove(D(k))},b.handleScroll=function(k){if(b.props.onScroll&&b.props.onScroll(k),k.target===b.rootNode){if(b.ignoreNextScrollEvents){b.ignoreNextScrollEvents=!1;return}var L=b.state.indexLatest,N=Math.ceil(k.target.scrollLeft/k.target.clientWidth)+L;b.ignoreNextScrollEvents=!0,k.target.scrollLeft=0,b.props.onChangeIndex&&N!==L&&b.props.onChangeIndex(N,L,{reason:"focus"})}},b.updateHeight=function(){if(b.activeSlide!==null){var k=b.activeSlide.children[0];k!==void 0&&k.offsetHeight!==void 0&&b.state.heightLatest!==k.offsetHeight&&b.setState({heightLatest:k.offsetHeight})}},process.env.NODE_ENV!=="production"&&(0,p.checkIndexBounds)(F),b.state={indexLatest:F.index,isDragging:!1,renderOnlyActive:!F.disableLazyLoading,heightLatest:0,displaySameSlide:!0},b.setIndexCurrent(F.index),b}return(0,a.default)(P,[{key:"componentDidMount",value:function(){var b=this;this.transitionListener=h(this.containerNode,"transitionend",function(k){k.target===b.containerNode&&b.handleTransitionEnd()}),this.touchMoveListener=h(this.rootNode,"touchmove",function(k){b.props.disabled||b.handleSwipeMove(k)},{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 k=b.index;typeof k=="number"&&k!==this.props.index&&(process.env.NODE_ENV!=="production"&&(0,p.checkIndexBounds)(b),this.setIndexCurrent(k),this.setState({displaySameSlide:(0,p.getDisplaySameSlide)(this.props,b),indexLatest:k}))}},{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 k=this.props.axis,L=v.transform[k](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,k=this.props;k.action;var L=k.animateHeight,N=k.animateTransitions,I=k.axis,V=k.children,O=k.containerStyle,Q=k.disabled;k.disableLazyLoading;var M=k.enableMouseEvents;k.hysteresis,k.ignoreNativeScroll,k.index,k.onChangeIndex,k.onSwitching,k.onTransitionEnd,k.resistance;var W=k.slideStyle,Y=k.slideClassName,j=k.springConfig,q=k.style;k.threshold;var X=(0,t.default)(k,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),R=this.state,z=R.displaySameSlide,U=R.heightLatest,oe=R.indexLatest,ae=R.isDragging,se=R.renderOnlyActive,G=Q?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},ot=!Q&&M?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{};process.env.NODE_ENV!=="production"&&(0,f.default)(!L||!O||!O.height,`react-swipeable-view: You are setting animateHeight to true but you are
|
|
50
50
|
also providing a custom height.
|
|
51
51
|
The custom height has a higher priority than the animateHeight property.
|
|
52
|
-
So animateHeight is most likely having no effect at all.`);var
|
|
53
|
-
We are expecting a valid React Element`));var sr,ba=!0;return ga===K&&(ba=!1,$&&(sr=b.setActiveSlide,en.overflowY="hidden")),u.createElement("div",{ref:sr,style:en,className:G,"aria-hidden":ba,"data-swipeable":"true"},Zr)}))))}}]),M}(u.Component);N.displayName="ReactSwipableView",N.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}:{},N.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 _=N;return At.default=_,At}var Cl;function Gp(){return Cl||(Cl=1,function(n){var r=zs();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(Qp())}(ka)),ka}var Kp=Gp();const Xp=jf(Kp),Jp=({className:n,tabList:r,isCuratedcontent:e,unswipeableContent:t,defaultIndex:o=0,onTabChange:a,disabled:i,allowScrollToSection:s=!0})=>{const[l,u]=d.useState(o),c=d.useRef(null),f=m=>{m.current&&window.scrollTo({top:m.current.offsetTop-50,behavior:"smooth"})},h=m=>{u(m),s&&f(c),a==null||a(m)},p=()=>{const v=100/r.length;return{width:`${v}%`,left:`${l*v}%`}};return R.jsxs("div",{ref:c,className:"w-full",children:[R.jsxs("div",{className:ot(n==null?void 0:n.tab,`z-50 mb-[20px] flex w-full flex-col bg-white ${e&&"sticky top-[50px]"}`),children:[R.jsx("div",{className:"flex",children:r.map((m,v)=>R.jsx("div",{className:"flex flex-1 flex-col",children:R.jsx("button",{className:ot(n==null?void 0:n.tabTitle,`cursor-pointer ${l===v?"text-petnow-grey-30 text-label-large":"text-petnow-grey-70 text-body-large disabled:opacity-40"}`),onClick:()=>h(v),disabled:i,children:m.displayName})},m.key))}),R.jsx("div",{className:ot(n==null?void 0:n.underline,`relative h-[2px] w-full ${i?"bg-petnow-grey-70/40":"bg-petnow-grey-70"}`),children:R.jsx("div",{className:ot(n==null?void 0:n.selectedUnderline,"bg-petnow-grey-30 absolute h-[2px] transition-all duration-200"),style:p()})})]}),t,R.jsx(Xp,{index:l,onChangeIndex:m=>{u(m),a==null||a(m)},disabled:i,children:r.map(m=>R.jsx("div",{children:m.content},m.key))})]})},Zp=({className:n,id:r,onChange:e,disabled:t,isChecked:o})=>R.jsxs("label",{className:"relative flex h-min w-min cursor-pointer items-center rounded-full",htmlFor:r,children:[R.jsx("input",{type:"checkbox",disabled:t,className:ot(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)}}),R.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:R.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:R.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"})})})]}),eh=({className:n,text:r,isSelected:e,onClick:t,disabled:o})=>R.jsx("button",{className:ot(n,`keen-slider__slide text-body-medium rounded-full border-1 px-[12px] py-[6px] whitespace-nowrap duration-200 active:brightness-90 ${e?"border-petnow-orange-primary bg-petnow-orange-secondary text-petnow-orange-primary":"border-petnow-grey-90 bg-white disabled:opacity-40"}`),onClick:t,style:{width:"min-content",minWidth:"fit-content"},disabled:o,children:r}),_l=typeof document<"u"?d.useLayoutEffect:()=>{};var Va;const th=(Va=d.useInsertionEffect)!==null&&Va!==void 0?Va:_l;function nh(n){const r=d.useRef(null);return th(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const nn=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},wn=n=>n&&"window"in n&&n.window===n?n:nn(n).defaultView||window;function rh(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function oh(n){return rh(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let ah=!1;function za(){return ah}function Ol(n,r){if(!za())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:oh(e)?e=e.host:e=e.parentNode}return!1}const qa=(n=document)=>{var r;if(!za())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 Ml(n){return za()&&n.target.shadowRoot&&n.composedPath?n.composedPath()[0]:n.target}function fo(n){var r;if(typeof window>"u"||window.navigator==null)return!1;let e=(r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands;return Array.isArray(e)&&e.some(t=>n.test(t.brand))||n.test(window.navigator.userAgent)}function Ua(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 Rt(n){if(process.env.NODE_ENV==="test")return n;let r=null;return()=>(r==null&&(r=n()),r)}const Qa=Rt(function(){return Ua(/^Mac/i)}),ih=Rt(function(){return Ua(/^iPhone/i)}),sh=Rt(function(){return Ua(/^iPad/i)||Qa()&&navigator.maxTouchPoints>1}),lh=Rt(function(){return ih()||sh()});Rt(function(){return Qa()||lh()}),Rt(function(){return fo(/AppleWebKit/i)&&!uh()});const uh=Rt(function(){return fo(/Chrome/i)}),ch=Rt(function(){return fo(/Android/i)});Rt(function(){return fo(/Firefox/i)});function Tl(){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 dh(n){return n.mozInputSource===0&&n.isTrusted?!0:ch()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function Pl(n){let r=n;return r.nativeEvent=n,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function fh(n,r){Object.defineProperty(n,"target",{value:r}),Object.defineProperty(n,"currentTarget",{value:r})}function Il(n){let r=d.useRef({isFocused:!1,observer:null});_l(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=nh(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=Pl(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 ph=!1,xr=null,Ga=new Set,Er=new Map,xn=!1,Ka=!1;const hh={Tab:!0,Escape:!0};function Xa(n,r){for(let e of Ga)e(n,r)}function mh(n){return!(n.metaKey||!Qa()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function po(n){xn=!0,mh(n)&&(xr="keyboard",Xa("keyboard",n))}function lt(n){xr="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(xn=!0,Xa("pointer",n))}function Nl(n){dh(n)&&(xn=!0,xr="virtual")}function $l(n){n.target===window||n.target===document||ph||!n.isTrusted||(!xn&&!Ka&&(xr="virtual",Xa("virtual",n)),xn=!1,Ka=!1)}function Ll(){xn=!1,Ka=!0}function Ja(n){if(typeof window>"u"||typeof document>"u"||Er.get(wn(n)))return;const r=wn(n),e=nn(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){xn=!0,t.apply(this,arguments)},e.addEventListener("keydown",po,!0),e.addEventListener("keyup",po,!0),e.addEventListener("click",Nl,!0),r.addEventListener("focus",$l,!0),r.addEventListener("blur",Ll,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",lt,!0),e.addEventListener("pointermove",lt,!0),e.addEventListener("pointerup",lt,!0)):process.env.NODE_ENV==="test"&&(e.addEventListener("mousedown",lt,!0),e.addEventListener("mousemove",lt,!0),e.addEventListener("mouseup",lt,!0)),r.addEventListener("beforeunload",()=>{Fl(n)},{once:!0}),Er.set(r,{focus:t})}const Fl=(n,r)=>{const e=wn(n),t=nn(n);r&&t.removeEventListener("DOMContentLoaded",r),Er.has(e)&&(e.HTMLElement.prototype.focus=Er.get(e).focus,t.removeEventListener("keydown",po,!0),t.removeEventListener("keyup",po,!0),t.removeEventListener("click",Nl,!0),e.removeEventListener("focus",$l,!0),e.removeEventListener("blur",Ll,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",lt,!0),t.removeEventListener("pointermove",lt,!0),t.removeEventListener("pointerup",lt,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",lt,!0),t.removeEventListener("mousemove",lt,!0),t.removeEventListener("mouseup",lt,!0)),Er.delete(e))};function vh(n){const r=nn(n);let e;return r.readyState!=="loading"?Ja(n):(e=()=>{Ja(n)},r.addEventListener("DOMContentLoaded",e)),()=>Fl(n,e)}typeof document<"u"&&vh();function Al(){return xr!=="pointer"}const gh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function bh(n,r,e){let t=nn(e==null?void 0:e.target);const o=typeof window<"u"?wn(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?wn(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?wn(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?wn(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||t.activeElement instanceof o&&!gh.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(n&&r==="keyboard"&&e instanceof s&&!hh[e.key])}function yh(n,r,e){Ja(),d.useEffect(()=>{let t=(o,a)=>{bh(!!(e!=null&&e.isTextInput),o,a)&&n(Al())};return Ga.add(t),()=>{Ga.delete(t)}},r)}function wh(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=Il(a),s=d.useCallback(l=>{const u=nn(l.target),c=u?qa(u):qa();l.target===l.currentTarget&&c===Ml(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 xh(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=Tl(),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=Il(l),c=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=nn(f.target),p=qa(h);if(!a.current.isFocusWithin&&p===Ml(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&&!Ol(m,v.target)){let g=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});fh(g,m);let y=Pl(g);l(y)}},{capture:!0})}},[t,o,u,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}let ho=!1,mo=0;function Za(){ho=!0,setTimeout(()=>{ho=!1},50)}function Rl(n){n.pointerType==="touch"&&Za()}function Eh(){if(!(typeof document>"u"))return mo===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Rl):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Za)),mo++,()=>{mo--,!(mo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Rl):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Za))}}function ei(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(Eh,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=Tl(),{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 y=v.currentTarget;s.target=y,l(nn(v.target),"pointerover",E=>{s.isHovered&&s.target&&!Ol(s.target,E.target)&&p(E,E.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:y,pointerType:g}),e&&e(!0),i(!0)},p=(v,g)=>{let y=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!y)&&(s.isHovered=!1,u(),t&&t({type:"hoverend",target:y,pointerType:g}),e&&e(!1),i(!1))},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=v=>{ho&&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&&!ho&&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 ti(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||Al()}),[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]);yh(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:e});let{focusProps:f}=wh({isDisabled:t,onFocusChange:c}),{focusWithinProps:h}=xh({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?h:f}}var Dh=Object.defineProperty,Sh=(n,r,e)=>r in n?Dh(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,ni=(n,r,e)=>(Sh(n,typeof r!="symbol"?r+"":r,e),e);let kh=class{constructor(){ni(this,"current",this.detect()),ni(this,"handoffState","pending"),ni(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"}},xt=new kh;function En(n){var r,e;return xt.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 vo(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function ut(){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 vo(()=>{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=ut();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 rn(){let[n]=d.useState(ut);return d.useEffect(()=>()=>n.dispose(),[n]),n}let fe=(n,r)=>{xt.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function Yt(n){let r=d.useRef(n);return fe(()=>{r.current=n},[n]),r}let Z=function(n){let r=Yt(n);return d.useCallback((...e)=>r.current(...e),[r])};function Ch(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 _h(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function Yl({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=rn(),a=Z(()=>{r.current=null,t(!1),o.dispose()}),i=Z(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=En(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",u=>{if(r.current){let c=Ch(u);t(_h(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Oh=d.createContext(void 0);function go(){return d.useContext(Oh)}function ri(...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 on=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(on||{}),an=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(an||{});function Te(){let n=Th();return d.useCallback(r=>Mh({mergeRefs:n,...r}),[n])}function Mh({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??Ph;let l=Wl(r,n);if(a)return bo(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return bo(f,e,t,i,s)}if(u&1){let{unmount:c=!0,...f}=l;return Fe(c?0:1,{0(){return null},1(){return bo({...f,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return bo(l,e,t,i,s)}function bo(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=oi(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(sn(l)).length>0||Object.keys(sn(f)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(sn(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(sn(l)).concat(Object.keys(sn(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(
|
|
52
|
+
So animateHeight is most likely having no effect at all.`);var tn=(0,e.default)({},m.slide,W),gt,Lt;if(ae||!N||z)gt="all 0s ease 0s",Lt="all 0s ease 0s";else if(gt=g("transform",j),Lt=g("-webkit-transform",j),U!==0){var eo=", ".concat(g("height",j));gt+=eo,Lt+=eo}var An={height:null,WebkitFlexDirection:v.flexDirection[I],flexDirection:v.flexDirection[I],WebkitTransition:Lt,transition:gt};if(!se){var Rn=v.transform[I](this.indexCurrent*100);An.WebkitTransform=Rn,An.transform=Rn}return L&&(An.height=U),u.createElement(T.Provider,{value:this.getSwipeableViewsContext()},u.createElement("div",(0,e.default)({ref:this.setRootNode,style:(0,e.default)({},v.root[I],q)},X,G,ot,{onScroll:this.handleScroll}),u.createElement("div",{ref:this.setContainerNode,style:(0,e.default)({},An,m.container,O),className:"react-swipeable-view-container"},u.Children.map(V,function(to,xa){if(se&&xa!==oe)return null;process.env.NODE_ENV!=="production"&&(0,f.default)(u.isValidElement(to),"react-swipeable-view: one of the children provided is invalid: ".concat(to,`.
|
|
53
|
+
We are expecting a valid React Element`));var ur,Ea=!0;return xa===oe&&(Ea=!1,L&&(ur=b.setActiveSlide,tn.overflowY="hidden")),u.createElement("div",{ref:ur,style:tn,className:Y,"aria-hidden":Ea,"data-swipeable":"true"},to)}))))}}]),P}(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 C=$;return At.default=C,At}var Tl;function ih(){return Tl||(Tl=1,function(n){var r=Ks();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(ah())}(Pa)),Pa}var sh=ih();const lh=Jf(sh),uh=({className:n,tabList:r,isCuratedcontent:e,unswipeableContent:t,defaultIndex:o=0,onTabChange:a,disabled:i,allowScrollToSection:s=!0})=>{const[l,u]=d.useState(o),c=d.useRef(null),f=m=>{m.current&&window.scrollTo({top:m.current.offsetTop-50,behavior:"smooth"})},p=m=>{u(m),s&&f(c),a==null||a(m)},h=()=>{const v=100/r.length;return{width:`${v}%`,left:`${l*v}%`}};return A.jsxs("div",{ref:c,className:"w-full",children:[A.jsxs("div",{className:it(n==null?void 0:n.tab,`z-50 mb-[20px] flex w-full flex-col bg-white ${e&&"sticky top-[50px]"}`),children:[A.jsx("div",{className:"flex",children:r.map((m,v)=>A.jsx("div",{className:"flex flex-1 flex-col",children:A.jsx("button",{className:it(n==null?void 0:n.tabTitle,`cursor-pointer ${l===v?"text-petnow-grey-30 text-label-large":"text-petnow-grey-70 text-body-large disabled:opacity-40"}`),onClick:()=>p(v),disabled:i,children:m.displayName})},m.key))}),A.jsx("div",{className:it(n==null?void 0:n.underline,`relative h-[2px] w-full ${i?"bg-petnow-grey-70/40":"bg-petnow-grey-70"}`),children:A.jsx("div",{className:it(n==null?void 0:n.selectedUnderline,"bg-petnow-grey-30 absolute h-[2px] transition-all duration-200"),style:h()})})]}),t,A.jsx(lh,{index:l,onChangeIndex:m=>{u(m),a==null||a(m)},disabled:i,children:r.map(m=>A.jsx("div",{children:m.content},m.key))})]})},ch=({className:n,id:r,onChange:e,disabled:t,isChecked:o})=>A.jsxs("label",{className:"relative flex h-min w-min cursor-pointer items-center rounded-full",htmlFor:r,children:[A.jsx("input",{type:"checkbox",disabled:t,className:it(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==null||e(a.target.checked)}}),A.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:A.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:A.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"})})})]}),dh=({className:n,text:r,isSelected:e,onClick:t,disabled:o})=>A.jsx("button",{className:it(n,`keen-slider__slide text-body-medium rounded-full border-1 px-[12px] py-[6px] whitespace-nowrap duration-200 active:brightness-90 ${e?"border-petnow-orange-primary bg-petnow-orange-secondary text-petnow-orange-primary":"border-petnow-grey-90 bg-white disabled:opacity-40"}`),onClick:t,style:{width:"min-content",minWidth:"fit-content"},disabled:o,children:r}),Il=typeof document<"u"?d.useLayoutEffect:()=>{};var Qa;const fh=(Qa=d.useInsertionEffect)!==null&&Qa!==void 0?Qa:Il;function ph(n){const r=d.useRef(null);return fh(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const rn=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},xn=n=>n&&"window"in n&&n.window===n?n:rn(n).defaultView||window;function hh(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function mh(n){return hh(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let vh=!1;function Ga(){return vh}function Nl(n,r){if(!Ga())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:mh(e)?e=e.host:e=e.parentNode}return!1}const Ka=(n=document)=>{var r;if(!Ga())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 $l(n){return Ga()&&n.target.shadowRoot&&n.composedPath?n.composedPath()[0]:n.target}function ho(n){var r;if(typeof window>"u"||window.navigator==null)return!1;let e=(r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands;return Array.isArray(e)&&e.some(t=>n.test(t.brand))||n.test(window.navigator.userAgent)}function Xa(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 Rt(n){if(process.env.NODE_ENV==="test")return n;let r=null;return()=>(r==null&&(r=n()),r)}const Ja=Rt(function(){return Xa(/^Mac/i)}),gh=Rt(function(){return Xa(/^iPhone/i)}),bh=Rt(function(){return Xa(/^iPad/i)||Ja()&&navigator.maxTouchPoints>1}),yh=Rt(function(){return gh()||bh()});Rt(function(){return Ja()||yh()}),Rt(function(){return ho(/AppleWebKit/i)&&!wh()});const wh=Rt(function(){return ho(/Chrome/i)}),xh=Rt(function(){return ho(/Android/i)});Rt(function(){return ho(/Firefox/i)});function Ll(){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 Eh(n){return n.pointerType===""&&n.isTrusted?!0:xh()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function Fl(n){let r=n;return r.nativeEvent=n,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function Dh(n,r){Object.defineProperty(n,"target",{value:r}),Object.defineProperty(n,"currentTarget",{value:r})}function Al(n){let r=d.useRef({isFocused:!1,observer:null});Il(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=ph(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=Fl(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 Sh=!1,Dr=null,Za=new Set,Sr=new Map,En=!1,ei=!1;const kh={Tab:!0,Escape:!0};function ti(n,r){for(let e of Za)e(n,r)}function Ch(n){return!(n.metaKey||!Ja()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function mo(n){En=!0,Ch(n)&&(Dr="keyboard",ti("keyboard",n))}function ct(n){Dr="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(En=!0,ti("pointer",n))}function Rl(n){Eh(n)&&(En=!0,Dr="virtual")}function Yl(n){n.target===window||n.target===document||Sh||!n.isTrusted||(!En&&!ei&&(Dr="virtual",ti("virtual",n)),En=!1,ei=!1)}function jl(){En=!1,ei=!0}function ni(n){if(typeof window>"u"||typeof document>"u"||Sr.get(xn(n)))return;const r=xn(n),e=rn(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){En=!0,t.apply(this,arguments)},e.addEventListener("keydown",mo,!0),e.addEventListener("keyup",mo,!0),e.addEventListener("click",Rl,!0),r.addEventListener("focus",Yl,!0),r.addEventListener("blur",jl,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",ct,!0),e.addEventListener("pointermove",ct,!0),e.addEventListener("pointerup",ct,!0)):process.env.NODE_ENV==="test"&&(e.addEventListener("mousedown",ct,!0),e.addEventListener("mousemove",ct,!0),e.addEventListener("mouseup",ct,!0)),r.addEventListener("beforeunload",()=>{Wl(n)},{once:!0}),Sr.set(r,{focus:t})}const Wl=(n,r)=>{const e=xn(n),t=rn(n);r&&t.removeEventListener("DOMContentLoaded",r),Sr.has(e)&&(e.HTMLElement.prototype.focus=Sr.get(e).focus,t.removeEventListener("keydown",mo,!0),t.removeEventListener("keyup",mo,!0),t.removeEventListener("click",Rl,!0),e.removeEventListener("focus",Yl,!0),e.removeEventListener("blur",jl,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",ct,!0),t.removeEventListener("pointermove",ct,!0),t.removeEventListener("pointerup",ct,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",ct,!0),t.removeEventListener("mousemove",ct,!0),t.removeEventListener("mouseup",ct,!0)),Sr.delete(e))};function _h(n){const r=rn(n);let e;return r.readyState!=="loading"?ni(n):(e=()=>{ni(n)},r.addEventListener("DOMContentLoaded",e)),()=>Wl(n,e)}typeof document<"u"&&_h();function Hl(){return Dr!=="pointer"}const Oh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ph(n,r,e){let t=rn(e==null?void 0:e.target);const o=typeof window<"u"?xn(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?xn(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?xn(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?xn(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||t.activeElement instanceof o&&!Oh.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(n&&r==="keyboard"&&e instanceof s&&!kh[e.key])}function Mh(n,r,e){ni(),d.useEffect(()=>{let t=(o,a)=>{Ph(!!(e!=null&&e.isTextInput),o,a)&&n(Hl())};return Za.add(t),()=>{Za.delete(t)}},r)}function Th(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=Al(a),s=d.useCallback(l=>{const u=rn(l.target),c=u?Ka(u):Ka();l.target===l.currentTarget&&c===$l(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 Ih(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=Ll(),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=Al(l),c=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const p=rn(f.target),h=Ka(p);if(!a.current.isFocusWithin&&h===$l(f.nativeEvent)){t&&t(f),o&&o(!0),a.current.isFocusWithin=!0,u(f);let m=f.currentTarget;i(p,"focus",v=>{if(a.current.isFocusWithin&&!Nl(m,v.target)){let g=new p.defaultView.FocusEvent("blur",{relatedTarget:v.target});Dh(g,m);let y=Fl(g);l(y)}},{capture:!0})}},[t,o,u,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}let vo=!1,go=0;function ri(){vo=!0,setTimeout(()=>{vo=!1},50)}function Vl(n){n.pointerType==="touch"&&ri()}function Nh(){if(!(typeof document>"u"))return go===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Vl):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",ri)),go++,()=>{go--,!(go>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Vl):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",ri))}}function oi(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(Nh,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=Ll(),{hoverProps:c,triggerHoverEnd:f}=d.useMemo(()=>{let p=(v,g)=>{if(s.pointerType=g,o||g==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let y=v.currentTarget;s.target=y,l(rn(v.target),"pointerover",D=>{s.isHovered&&s.target&&!Nl(s.target,D.target)&&h(D,D.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:y,pointerType:g}),e&&e(!0),i(!0)},h=(v,g)=>{let y=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!y)&&(s.isHovered=!1,u(),t&&t({type:"hoverend",target:y,pointerType:g}),e&&e(!1),i(!1))},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=v=>{vo&&v.pointerType==="mouse"||p(v,v.pointerType)},m.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&h(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(m.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!vo&&p(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&h(v,"mouse")}),{hoverProps:m,triggerHoverEnd:h}},[r,e,t,o,s,l,u]);return d.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}function ai(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||Hl()}),[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(h=>{o.current.isFocused=h,i(h),u()},[u]);Mh(h=>{o.current.isFocusVisible=h,u()},[],{isTextInput:e});let{focusProps:f}=Th({isDisabled:t,onFocusChange:c}),{focusWithinProps:p}=Ih({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?p:f}}var $h=Object.defineProperty,Lh=(n,r,e)=>r in n?$h(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,ii=(n,r,e)=>(Lh(n,typeof r!="symbol"?r+"":r,e),e);let Fh=class{constructor(){ii(this,"current",this.detect()),ii(this,"handoffState","pending"),ii(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"}},Et=new Fh;function Dn(n){var r;return Et.isServer?null:n==null?document:(r=n==null?void 0:n.ownerDocument)!=null?r:document}function bo(n){var r,e;return Et.isServer?null:n==null?document:(e=(r=n==null?void 0:n.getRootNode)==null?void 0:r.call(n))!=null?e:document}function Bl(n){var r,e;return(e=(r=bo(n))==null?void 0:r.activeElement)!=null?e:null}function yo(n){return Bl(n)===n}function wo(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function nt(){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 wo(()=>{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=nt();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 Yt(){let[n]=d.useState(nt);return d.useEffect(()=>()=>n.dispose(),[n]),n}let be=(n,r)=>{Et.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function jt(n){let r=d.useRef(n);return be(()=>{r.current=n},[n]),r}let ee=function(n){let r=jt(n);return d.useCallback((...e)=>r.current(...e),[r])};function Ah(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 Rh(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function zl({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=Yt(),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=Ah(u);t(Rh(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}function Xe(n){return d.useMemo(()=>n,Object.values(n))}let Yh=d.createContext(void 0);function xo(){return d.useContext(Yh)}function si(...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 on=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(on||{}),an=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(an||{});function Te(){let n=Wh();return d.useCallback(r=>jh({mergeRefs:n,...r}),[n])}function jh({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??Hh;let l=ql(r,n);if(a)return Eo(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return Eo(f,e,t,i,s)}if(u&1){let{unmount:c=!0,...f}=l;return Le(c?0:1,{0(){return null},1(){return Eo({...f,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return Eo(l,e,t,i,s)}function Eo(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=li(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 p=!1,h=[];for(let[m,v]of Object.entries(r))typeof v=="boolean"&&(p=!0),v===!0&&h.push(m.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(p){f["data-headlessui-state"]=h.join(" ");for(let m of h)f[`data-${m}`]=""}}if(Cr(a)&&(Object.keys(sn(l)).length>0||Object.keys(sn(f)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1||Bh(c)){if(Object.keys(sn(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(sn(l)).concat(Object.keys(sn(f))).map(p=>` - ${p}`).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(p=>` - ${p}`).join(`
|
|
55
55
|
`)].join(`
|
|
56
|
-
`))}else{let h=c.props,p=h==null?void 0:h.className,m=typeof p=="function"?(...y)=>ri(p(...y),l.className):ri(p,l.className),v=m?{className:m}:{},g=Wl(c.props,sn(oi(l,["ref"])));for(let y in f)y in g&&delete f[y];return d.cloneElement(c,Object.assign({},g,f,u,{ref:o(Ih(c),u.ref)},v))}return d.createElement(a,Object.assign({},oi(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 Ph(...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 Wl(...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 Dr(...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 _e(n){var r;return Object.assign(d.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function sn(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function oi(n,r=[]){let e=Object.assign({},n);for(let t of r)t in e&&delete e[t];return e}function Ih(n){return d.version.split(".")[0]>="19"?n.props.ref:n.ref}function jl(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,Z(u=>(a||o(u),r==null?void 0:r(u)))]}function Hl(n){let[r]=d.useState(n);return r}function Bl(n={},r=null,e=[]){for(let[t,o]of Object.entries(n))zl(e,Vl(r,t),o);return e}function Vl(n,r){return n?n+"["+r+"]":r}function zl(n,r,e){if(Array.isArray(e))for(let[t,o]of e.entries())zl(n,Vl(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,""]):Bl(e,r,n)}function Nh(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 $h="span";var jn=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(jn||{});function Lh(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 Te()({ourProps:a,theirProps:o,slot:{},defaultTag:$h,name:"Hidden"})}let Sr=_e(Lh),Fh=d.createContext(null);function Ah({children:n}){let r=d.useContext(Fh);if(!r)return d.createElement(d.Fragment,null,n);let{target:e}=r;return e?Le.createPortal(d.createElement(d.Fragment,null,n),e):null}function ql({data:n,form:r,disabled:e,onReset:t,overrides:o}){let[a,i]=d.useState(null),s=rn();return d.useEffect(()=>{if(t&&a)return s.addEventListener(a,"reset",t)},[a,r,t]),d.createElement(Ah,null,d.createElement(Rh,{setForm:i,formId:r}),Bl(n).map(([l,u])=>d.createElement(Sr,{features:jn.Hidden,...sn({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:e,name:l,value:u,...o})})))}function Rh({setForm:n,formId:r}){return d.useEffect(()=>{if(r){let e=document.getElementById(r);e&&n(e)}},[n,r]),r?null:d.createElement(Sr,{features:jn.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&n(t)}})}let Yh=d.createContext(void 0);function ai(){return d.useContext(Yh)}function ii(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function Wt(n){return ii(n)&&"tagName"in n}function tt(n){return Wt(n)&&"accessKey"in n}function jt(n){return Wt(n)&&"tabIndex"in n}function Wh(n){return Wt(n)&&"style"in n}function jh(n){return tt(n)&&n.nodeName==="IFRAME"}function yo(n){return tt(n)&&n.nodeName==="INPUT"}function Ul(n){return tt(n)&&n.nodeName==="LABEL"}function Hh(n){return tt(n)&&n.nodeName==="FIELDSET"}function Ql(n){return tt(n)&&n.nodeName==="LEGEND"}function Bh(n){return Wt(n)?n.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Gl(n){let r=n.parentElement,e=null;for(;r&&!Hh(r);)Ql(r)&&(e=r),r=r.parentElement;let t=(r==null?void 0:r.getAttribute("disabled"))==="";return t&&Vh(e)?!1:t}function Vh(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(Ql(r))return!1;r=r.previousElementSibling}return!0}let Kl=Symbol();function zh(n,r=!0){return Object.assign(n,{[Kl]:r})}function We(...n){let r=d.useRef(n);d.useEffect(()=>{r.current=n},[n]);let e=Z(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[Kl]))?void 0:e}let wo=d.createContext(null);wo.displayName="DescriptionContext";function Xl(){let n=d.useContext(wo);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,Xl),r}return n}function Jl(){var n,r;return(r=(n=d.useContext(wo))==null?void 0:n.value)!=null?r:void 0}function qh(){let[n,r]=d.useState([]);return[n.length>0?n.join(" "):void 0,d.useMemo(()=>function(e){let t=Z(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(wo.Provider,{value:o},e.children)},[r])]}let Uh="p";function Qh(n,r){let e=d.useId(),t=go(),{id:o=`headlessui-description-${e}`,...a}=n,i=Xl(),s=We(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 Te()({ourProps:c,theirProps:a,slot:u,defaultTag:Uh,name:i.name||"Description"})}let Gh=_e(Qh),Zl=Object.assign(Gh,{});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 xo=d.createContext(null);xo.displayName="LabelContext";function eu(){let n=d.useContext(xo);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,eu),r}return n}function kr(n){var r,e,t;let o=(e=(r=d.useContext(xo))==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 tu({inherit:n=!1}={}){let r=kr(),[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=Z(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(xo.Provider,{value:s},a.children)},[t])]}let Kh="label";function Xh(n,r){var e;let t=d.useId(),o=eu(),a=ai(),i=go(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((e=o.props)==null?void 0:e.htmlFor),passive:u=!1,...c}=n,f=We(r);fe(()=>o.register(s),[s,o.register]);let h=Z(g=>{let y=g.currentTarget;if(!(g.target!==g.currentTarget&&Bh(g.target))&&(Ul(y)&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),Ul(y))){let E=document.getElementById(y.htmlFor);if(E){let w=E.getAttribute("disabled");if(w==="true"||w==="")return;let S=E.getAttribute("aria-disabled");if(S==="true"||S==="")return;(yo(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),Te()({ourProps:v,theirProps:c,slot:m,defaultTag:l?Kh:"div",name:o.name||"Label"})}let Jh=_e(Xh),Eo=Object.assign(Jh,{}),Zh=d.createContext(()=>{});function em({value:n,children:r}){return d.createElement(Zh.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 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,y=(E,w)=>{for(E=String(E);E.length<w;)E=" "+E;return E};console.info(`%c⏱ ${y(v,5)} /${y(m,5)} ms`,`
|
|
56
|
+
`))}else{let p=c.props,h=p==null?void 0:p.className,m=typeof h=="function"?(...y)=>si(h(...y),l.className):si(h,l.className),v=m?{className:m}:{},g=ql(c.props,sn(li(l,["ref"])));for(let y in f)y in g&&delete f[y];return d.cloneElement(c,Object.assign({},g,f,u,{ref:o(Vh(c),u.ref)},v))}return d.createElement(a,Object.assign({},li(l,["ref"]),!Cr(a)&&u,!Cr(a)&&f),c)}function Wh(){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 Hh(...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 ql(...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 kr(...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 Oe(n){var r;return Object.assign(d.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function sn(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function li(n,r=[]){let e=Object.assign({},n);for(let t of r)t in e&&delete e[t];return e}function Vh(n){return d.version.split(".")[0]>="19"?n.props.ref:n.ref}function Cr(n){return n===d.Fragment||n===Symbol.for("react.fragment")}function Bh(n){return Cr(n.type)}function Ul(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||Ye.flushSync(()=>o(u)),r==null?void 0:r(u)))]}function Ql(n){let[r]=d.useState(n);return r}function Gl(n={},r=null,e=[]){for(let[t,o]of Object.entries(n))Xl(e,Kl(r,t),o);return e}function Kl(n,r){return n?n+"["+r+"]":r}function Xl(n,r,e){if(Array.isArray(e))for(let[t,o]of e.entries())Xl(n,Kl(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,""]):qh(e)&&!d.isValidElement(e)&&Gl(e,r,n)}function zh(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)}}function qh(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}let Uh="span";var Vn=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(Vn||{});function Qh(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 Te()({ourProps:a,theirProps:o,slot:{},defaultTag:Uh,name:"Hidden"})}let _r=Oe(Qh),Gh=d.createContext(null);function Kh({children:n}){let r=d.useContext(Gh);if(!r)return d.createElement(d.Fragment,null,n);let{target:e}=r;return e?Ye.createPortal(d.createElement(d.Fragment,null,n),e):null}function Jl({data:n,form:r,disabled:e,onReset:t,overrides:o}){let[a,i]=d.useState(null),s=Yt();return d.useEffect(()=>{if(t&&a)return s.addEventListener(a,"reset",t)},[a,r,t]),d.createElement(Kh,null,d.createElement(Xh,{setForm:i,formId:r}),Gl(n).map(([l,u])=>d.createElement(_r,{features:Vn.Hidden,...sn({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:e,name:l,value:u,...o})})))}function Xh({setForm:n,formId:r}){return d.useEffect(()=>{if(r){let e=document.getElementById(r);e&&n(e)}},[n,r]),r?null:d.createElement(_r,{features:Vn.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&n(t)}})}let Jh=d.createContext(void 0);function ui(){return d.useContext(Jh)}function Zl(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function Wt(n){return Zl(n)&&"tagName"in n}function rt(n){return Wt(n)&&"accessKey"in n}function Ht(n){return Wt(n)&&"tabIndex"in n}function Zh(n){return Wt(n)&&"style"in n}function em(n){return rt(n)&&n.nodeName==="IFRAME"}function Do(n){return rt(n)&&n.nodeName==="INPUT"}function eu(n){return rt(n)&&n.nodeName==="LABEL"}function tm(n){return rt(n)&&n.nodeName==="FIELDSET"}function tu(n){return rt(n)&&n.nodeName==="LEGEND"}function nm(n){return Wt(n)?n.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function nu(n){let r=n.parentElement,e=null;for(;r&&!tm(r);)tu(r)&&(e=r),r=r.parentElement;let t=(r==null?void 0:r.getAttribute("disabled"))==="";return t&&rm(e)?!1:t}function rm(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(tu(r))return!1;r=r.previousElementSibling}return!0}let ru=Symbol();function om(n,r=!0){return Object.assign(n,{[ru]:r})}function je(...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[ru]))?void 0:e}let So=d.createContext(null);So.displayName="DescriptionContext";function ou(){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,ou),r}return n}function au(){var n,r;return(r=(n=d.useContext(So))==null?void 0:n.value)!=null?r:void 0}function am(){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 im="p";function sm(n,r){let e=d.useId(),t=xo(),{id:o=`headlessui-description-${e}`,...a}=n,i=ou(),s=je(r);be(()=>i.register(o),[o,i.register]);let l=Xe({...i.slot,disabled:t||!1}),u={ref:s,...i.props,id:o};return Te()({ourProps:u,theirProps:a,slot:l,defaultTag:im,name:i.name||"Description"})}let lm=Oe(sm),iu=Object.assign(lm,{});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 ko=d.createContext(null);ko.displayName="LabelContext";function su(){let n=d.useContext(ko);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,su),r}return n}function Or(n){var r,e,t;let o=(e=(r=d.useContext(ko))==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 lu({inherit:n=!1}={}){let r=Or(),[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(ko.Provider,{value:s},a.children)},[t])]}let um="label";function cm(n,r){var e;let t=d.useId(),o=su(),a=ui(),i=xo(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((e=o.props)==null?void 0:e.htmlFor),passive:u=!1,...c}=n,f=je(r);be(()=>o.register(s),[s,o.register]);let p=ee(v=>{let g=v.currentTarget;if(!(v.target!==v.currentTarget&&nm(v.target))&&(eu(g)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),eu(g))){let y=document.getElementById(g.htmlFor);if(y){let D=y.getAttribute("disabled");if(D==="true"||D==="")return;let w=y.getAttribute("aria-disabled");if(w==="true"||w==="")return;(Do(y)&&(y.type==="file"||y.type==="radio"||y.type==="checkbox")||y.role==="radio"||y.role==="checkbox"||y.role==="switch")&&y.click(),y.focus({preventScroll:!0})}}}),h=Xe({...o.slot,disabled:i||!1}),m={ref:f,...o.props,id:s,htmlFor:l,onClick:p};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Te()({ourProps:m,theirProps:c,slot:h,defaultTag:l?um:"div",name:o.name||"Label"})}let dm=Oe(cm),Co=Object.assign(dm,{}),fm=d.createContext(()=>{});function pm({value:n,children:r}){return d.createElement(fm.Provider,{value:n},r)}function Bn(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 h;if(e.key&&((s=e.debug)!=null&&s.call(e))&&(h=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()-h)*100)/100,g=v/16,y=(D,w)=>{for(D=String(D);D.length<w;)D=" "+D;return D};console.info(`%c⏱ ${y(v,5)} /${y(m,5)} ms`,`
|
|
57
57
|
font-size: .6rem;
|
|
58
58
|
font-weight: bold;
|
|
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 nu(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const tm=(n,r)=>Math.abs(n-r)<1.01,nm=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},ru=n=>{const{offsetWidth:r,offsetHeight:e}=n;return{width:r,height:e}},rm=n=>n,om=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},am=(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(ru(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(ru(e))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},ou={passive:!0},au=typeof window>"u"?!0:"onscrollend"in window,im=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=n.options.useScrollendEvent&&au?()=>{}:nm(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,ou);const u=n.options.useScrollendEvent&&au;return u&&e.addEventListener("scrollend",l,ou),()=>{e.removeEventListener("scroll",s),u&&e.removeEventListener("scrollend",l)}},sm=(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"]},lm=(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 um{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,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:rm,rangeExtractor:om,onChange:()=>{},measureElement:sm,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 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,y=h?h.lane:c%this.options.lanes;u[c]={index:c,start:p,size:v,end:g,key:f,lane:y}}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?cm({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 nu(t[iu(0,t.length-1,o=>nu(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()+this.options.scrollMargin-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.scrollToOffset=(e,{align:t="start",behavior:o}={})=>{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}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let a=0;const i=10,s=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(e,u);if(!c){console.warn("Failed to get offset for index:",e);return}const[f,h]=c;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const p=this.getScrollOffset(),m=this.getOffsetForIndex(e,h);if(!m){console.warn("Failed to get offset for index:",e);return}tm(m[0],p)||l(h)})},l=u=>{this.targetWindow&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>s(u))):console.warn(`Failed to scroll to index ${e} after ${i} attempts.`))};s(t)},this.scrollBy=(e,{behavior:t}={})=>{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 iu=(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 cm({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=iu(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 su=typeof document<"u"?H.useLayoutEffect:H.useEffect;function dm(n){const r=H.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?Le.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=H.useState(()=>new um(e));return t.setOptions(e),su(()=>t._didMount(),[]),su(()=>t._willUpdate()),t}function fm(n){return dm({observeElementRect:am,observeElementOffset:im,scrollToFn:lm,...n})}function pm(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 lu(n=pm){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 hm(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function si(n,r=!1){let[e,t]=d.useReducer(()=>({}),{}),o=d.useMemo(()=>hm(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 uu=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 mm=Object.defineProperty,vm=(n,r,e)=>r in n?mm(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,gm=(n,r,e)=>(vm(n,r+"",e),e),cu=(n,r,e)=>{if(!r.has(n))throw TypeError("Cannot "+e)},ct=(n,r,e)=>(cu(n,r,"read from private field"),e?e.call(n):r.get(n)),li=(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)},du=(n,r,e,t)=>(cu(n,r,"write to private field"),r.set(n,e),e),Et,Cr,_r;let ui=class{constructor(r){li(this,Et,{}),li(this,Cr,new uu(()=>new Set)),li(this,_r,new Set),gm(this,"disposables",ut()),du(this,Et,r),xt.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return ct(this,Et)}subscribe(r,e){if(xt.isServer)return()=>{};let t={selector:r,callback:e,current:r(ct(this,Et))};return ct(this,_r).add(t),this.disposables.add(()=>{ct(this,_r).delete(t)})}on(r,e){return xt.isServer?()=>{}:(ct(this,Cr).get(r).add(e),this.disposables.add(()=>{ct(this,Cr).get(r).delete(e)}))}send(r){let e=this.reduce(ct(this,Et),r);if(e!==ct(this,Et)){du(this,Et,e);for(let t of ct(this,_r)){let o=t.selector(ct(this,Et));fu(t.current,o)||(t.current=o,t.callback(o))}for(let t of ct(this,Cr).get(r.type))t(ct(this,Et),r)}}};Et=new WeakMap,Cr=new WeakMap,_r=new WeakMap;function fu(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:ci(n[Symbol.iterator](),r[Symbol.iterator]()):n instanceof Map&&r instanceof Map||n instanceof Set&&r instanceof Set?n.size!==r.size?!1:ci(n.entries(),r.entries()):pu(n)&&pu(r)?ci(Object.entries(n)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function ci(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 pu(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}function di(n){let[r,e]=n(),t=ut();return(...o)=>{r(...o),t.dispose(),t.microTask(e)}}var bm=Object.defineProperty,ym=(n,r,e)=>r in n?bm(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,hu=(n,r,e)=>(ym(n,typeof r!="symbol"?r+"":r,e),e),fi=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(fi||{});let wm={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}}},xm=class Rf extends ui{constructor(){super(...arguments),hu(this,"actions",{push:r=>this.send({type:0,id:r}),pop:r=>this.send({type:1,id:r})}),hu(this,"selectors",{isTop:(r,e)=>r.stack[r.stack.length-1]===e,inStack:(r,e)=>r.stack.includes(e)})}static new(){return new Rf({stack:[]})}reduce(r,e){return Fe(e.type,wm,r,e)}};const Bn=new uu(()=>xm.new());var Do={exports:{}},pi={};/**
|
|
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 uu(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const hm=(n,r)=>Math.abs(n-r)<1.01,mm=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},cu=n=>{const{offsetWidth:r,offsetHeight:e}=n;return{width:r,height:e}},vm=n=>n,gm=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},bm=(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(cu(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(cu(e))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},du={passive:!0},fu=typeof window>"u"?!0:"onscrollend"in window,ym=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=n.options.useScrollendEvent&&fu?()=>{}:mm(t,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:f,isRtl:p}=n.options;o=f?e.scrollLeft*(p&&-1||1):e.scrollTop,a(),r(o,c)},s=i(!0),l=i(!1);l(),e.addEventListener("scroll",s,du);const u=n.options.useScrollendEvent&&fu;return u&&e.addEventListener("scrollend",l,du),()=>{e.removeEventListener("scroll",s),u&&e.removeEventListener("scrollend",l)}},wm=(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"]},xm=(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 Em{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,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:vm,rangeExtractor:gm,onChange:()=>{},measureElement:wm,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=Bn(()=>(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=Bn(()=>[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=Bn(()=>[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),p=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=p?p.end+this.options.gap:t+o,m=s.get(f),v=typeof m=="number"?m:this.options.estimateSize(c),g=h+v,y=p?p.lane:c%this.options.lanes;u[c]={index:c,start:h,size:v,end:g,key:f,lane:y}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Bn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,o,a)=>this.range=e.length>0&&t>0?Dm({measurements:e,outerSize:t,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Bn(()=>{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=Bn(()=>[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 uu(t[pu(0,t.length-1,o=>uu(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()+this.options.scrollMargin-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.scrollToOffset=(e,{align:t="start",behavior:o}={})=>{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}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let a=0;const i=10,s=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(e,u);if(!c){console.warn("Failed to get offset for index:",e);return}const[f,p]=c;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(e,p);if(!m){console.warn("Failed to get offset for index:",e);return}hm(m[0],h)||l(p)})},l=u=>{this.targetWindow&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>s(u))):console.warn(`Failed to scroll to index ${e} after ${i} attempts.`))};s(t)},this.scrollBy=(e,{behavior:t}={})=>{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 pu=(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 Dm({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=pu(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 hu=typeof document<"u"?H.useLayoutEffect:H.useEffect;function Sm(n){const r=H.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?Ye.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=H.useState(()=>new Em(e));return t.setOptions(e),hu(()=>t._didMount(),[]),hu(()=>t._willUpdate()),t}function km(n){return Sm({observeElementRect:bm,observeElementOffset:ym,scrollToFn:xm,...n})}function Cm(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 mu(n=Cm){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 vu(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function ci(n,r,e=!1){let[t,o]=d.useState(()=>vu(r));return be(()=>{if(!r||!n)return;let a=nt();return a.requestAnimationFrame(function i(){a.requestAnimationFrame(i),o(s=>{let l=vu(r);return l.width===s.width&&l.height===s.height?s:l})}),()=>{a.dispose()}},[r,n]),e?{width:`${t.width}px`,height:`${t.height}px`}:t}var di=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(di||{});function gu(n){let r=d.useRef(null),e=ee(o=>{r.current=o.pointerType,!nu(o.currentTarget)&&o.pointerType==="mouse"&&o.button===di.Left&&(o.preventDefault(),n(o))}),t=ee(o=>{r.current!=="mouse"&&(nu(o.currentTarget)||n(o))});return{onPointerDown:e,onClick:t}}let bu=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 _m=Object.defineProperty,Om=(n,r,e)=>r in n?_m(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Pm=(n,r,e)=>(Om(n,r+"",e),e),yu=(n,r,e)=>{if(!r.has(n))throw TypeError("Cannot "+e)},dt=(n,r,e)=>(yu(n,r,"read from private field"),e?e.call(n):r.get(n)),fi=(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)},wu=(n,r,e,t)=>(yu(n,r,"write to private field"),r.set(n,e),e),Dt,Pr,Mr;let pi=class{constructor(r){fi(this,Dt,{}),fi(this,Pr,new bu(()=>new Set)),fi(this,Mr,new Set),Pm(this,"disposables",nt()),wu(this,Dt,r),Et.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return dt(this,Dt)}subscribe(r,e){if(Et.isServer)return()=>{};let t={selector:r,callback:e,current:r(dt(this,Dt))};return dt(this,Mr).add(t),this.disposables.add(()=>{dt(this,Mr).delete(t)})}on(r,e){return Et.isServer?()=>{}:(dt(this,Pr).get(r).add(e),this.disposables.add(()=>{dt(this,Pr).get(r).delete(e)}))}send(r){let e=this.reduce(dt(this,Dt),r);if(e!==dt(this,Dt)){wu(this,Dt,e);for(let t of dt(this,Mr)){let o=t.selector(dt(this,Dt));xu(t.current,o)||(t.current=o,t.callback(o))}for(let t of dt(this,Pr).get(r.type))t(dt(this,Dt),r)}}};Dt=new WeakMap,Pr=new WeakMap,Mr=new WeakMap;function xu(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:hi(n[Symbol.iterator](),r[Symbol.iterator]()):n instanceof Map&&r instanceof Map||n instanceof Set&&r instanceof Set?n.size!==r.size?!1:hi(n.entries(),r.entries()):Eu(n)&&Eu(r)?hi(Object.entries(n)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function hi(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 Eu(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}function mi(n){let[r,e]=n(),t=nt();return(...o)=>{r(...o),t.dispose(),t.microTask(e)}}var Mm=Object.defineProperty,Tm=(n,r,e)=>r in n?Mm(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Du=(n,r,e)=>(Tm(n,typeof r!="symbol"?r+"":r,e),e),vi=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(vi||{});let Im={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}}},Nm=class Gf extends pi{constructor(){super(...arguments),Du(this,"actions",{push:r=>this.send({type:0,id:r}),pop:r=>this.send({type:1,id:r})}),Du(this,"selectors",{isTop:(r,e)=>r.stack[r.stack.length-1]===e,inStack:(r,e)=>r.stack.includes(e)})}static new(){return new Gf({stack:[]})}reduce(r,e){return Le(e.type,Im,r,e)}};const zn=new bu(()=>Nm.new());var _o={exports:{}},gi={};/**
|
|
60
60
|
* @license React
|
|
61
61
|
* use-sync-external-store-with-selector.production.js
|
|
62
62
|
*
|
|
@@ -64,7 +64,7 @@ So animateHeight is most likely having no effect at all.`);var en=(0,e.default)(
|
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the MIT license found in the
|
|
66
66
|
* LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/var
|
|
67
|
+
*/var Su;function $m(){if(Su)return gi;Su=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 gi.useSyncExternalStoreWithSelector=function(l,u,c,f,p){var h=o(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=i(function(){function g(x){if(!y){if(y=!0,D=x,x=f(x),p!==void 0&&m.hasValue){var T=m.value;if(p(T,x))return w=T}return w=x}if(T=w,e(D,x))return T;var $=f(x);return p!==void 0&&p(T,$)?(D=x,T):(D=x,w=$)}var y=!1,D,w,S=c===void 0?null:c;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,c,f,p]);var v=t(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),s(v),v},gi}var bi={};/**
|
|
68
68
|
* @license React
|
|
69
69
|
* use-sync-external-store-with-selector.development.js
|
|
70
70
|
*
|
|
@@ -72,10 +72,10 @@ So animateHeight is most likely having no effect at all.`);var en=(0,e.default)(
|
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the MIT license found in the
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/var vu;function Dm(){return vu||(vu=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;hi.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(x){if(!y){if(y=!0,E=x,x=f(x),h!==void 0&&m.hasValue){var T=m.value;if(h(T,x))return w=T}return w=x}if(T=w,e(E,x))return T;var N=f(x);return h!==void 0&&h(T,N)?(E=x,T):(E=x,w=N)}var y=!1,E,w,S=c===void 0?null:c;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[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())}()),hi}var gu;function Sm(){return gu||(gu=1,process.env.NODE_ENV==="production"?Do.exports=Em():Do.exports=Dm()),Do.exports}var km=Sm();function we(n,r,e=fu){return km.useSyncExternalStoreWithSelector(Z(t=>n.subscribe(Cm,t)),Z(()=>n.state),Z(()=>n.state),Z(r),e)}function Cm(n){return n}function Or(n,r){let e=d.useId(),t=Bn.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 mi=new Map,Mr=new Map;function bu(n){var r;let e=(r=Mr.get(n))!=null?r:0;return Mr.set(n,e+1),e!==0?()=>yu(n):(mi.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>yu(n))}function yu(n){var r;let e=(r=Mr.get(n))!=null?r:1;if(e===1?Mr.delete(n):Mr.set(n,e-1),e!==1)return;let t=mi.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,mi.delete(n))}function vi(n,{allowed:r,disallowed:e}={}){let t=Or(n,"inert-others");fe(()=>{var o,a;if(!t)return;let i=ut();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(bu(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let u=En(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(bu(f));c=c.parentElement}}return i.dispose},[t,r,e])}function gi(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:tt(r)?r:r.current;if(!o)return;let a=ut();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 So=["[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(","),_m=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var bt=(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))(bt||{}),bi=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(bi||{}),Om=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Om||{});function wu(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(So)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function Mm(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(_m)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var yi=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(yi||{});function xu(n,r=0){var e;return n===((e=En(n))==null?void 0:e.body)?!1:Fe(r,{0(){return n.matches(So)},1(){let t=n;for(;t!==null;){if(t.matches(So))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 Ht(n){n==null||n.focus({preventScroll:!0})}let Pm=["textarea","input"].join(",");function Im(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,Pm))!=null?e:!1}function wi(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 Nm(n,r){return Vn(wu(),r,{relativeTo:n})}function Vn(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?wi(n):n:r&64?Mm(n):wu(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&&Im(h)&&h.select(),2}function Eu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $m(){return/Android/gi.test(window.navigator.userAgent)}function xi(){return Eu()||$m()}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 Du(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 Su=30;function Ei(n,r,e){let t=Yt(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!xu(u,yi.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t.current(s,u)},[t,r]),a=d.useRef(null);zn(n,"pointerdown",s=>{var l,u;xi()||(a.current=((u=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:u[0])||s.target)},!0),zn(n,"pointerup",s=>{if(xi()||!a.current)return;let l=a.current;return a.current=null,o(s,()=>l)},!0);let i=d.useRef({x:0,y:0});zn(n,"touchstart",s=>{i.current.x=s.touches[0].clientX,i.current.y=s.touches[0].clientY},!0),zn(n,"touchend",s=>{let l={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=Su||Math.abs(l.y-i.current.y)>=Su))return o(s,()=>jt(s.target)?s.target:null)},!0),Du(n,"blur",s=>o(s,()=>jh(window.document.activeElement)?window.document.activeElement:null),!0)}function Bt(...n){return d.useMemo(()=>En(...n),[...n])}var Lm=(n=>(n[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n))(Lm||{});const Vt={Ignore:{kind:0},Select:n=>({kind:1,target:n}),Close:{kind:2}},Fm=200,ku=5;function Cu(n,{trigger:r,action:e,close:t,select:o}){let a=d.useRef(null),i=d.useRef(null),s=d.useRef(null);zn(n&&r!==null,"pointerdown",l=>{ii(l==null?void 0:l.target)&&r!=null&&r.contains(l.target)&&(i.current=l.x,s.current=l.y,a.current=l.timeStamp)}),zn(n&&r!==null,"pointerup",l=>{var u,c;let f=a.current;if(f===null||(a.current=null,!jt(l.target))||Math.abs(l.x-((u=i.current)!=null?u:l.x))<ku&&Math.abs(l.y-((c=s.current)!=null?c:l.y))<ku)return;let h=e(l);switch(h.kind){case 0:return;case 1:{l.timeStamp-f>Fm&&(o(h.target),t());break}case 2:{t();break}}},{capture:!0})}function Di(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 _u(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Di(n,"blur",e=>{let t=e.target;yo(t)&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),Z(()=>{if(document.activeElement!==n&&yo(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 Ou(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 Am(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function Rm(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 Ym(){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 Wm(){return Eu()?{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=ut();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(jt(s.target))try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);jt(c)&&!t(c)&&(i=c)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(jt(s.target)&&Wh(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(jt(s.target)){if(yo(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 jm(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function Hm(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let Dn=Rm(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:ut(),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:Hm(e)},o=[Wm(),Ym(),jm()];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)}});Dn.subscribe(()=>{let n=Dn.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)&&Dn.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&Dn.dispatch("TEARDOWN",e)}});function Bm(n,r,e=()=>({containers:[]})){let t=Am(Dn),o=r?t.get(r):void 0,a=o?o.count>0:!1;return fe(()=>{if(!(!r||!n))return Dn.dispatch("PUSH",r,e),()=>Dn.dispatch("POP",r,e)},[n,r]),a}function Si(n,r,e=()=>[document.body]){let t=Or(n,"scroll-lock");Bm(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function Mu(n){return[n.screenX,n.screenY]}function Tu(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=Mu(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=Mu(r)}}}function Vm(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 Pu,Iu;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Pu=process==null?void 0:process.env)==null?void 0:Pu.NODE_ENV)==="test"&&typeof((Iu=Element==null?void 0:Element.prototype)==null?void 0:Iu.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 zm=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(zm||{});function ki(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function Ci(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=Vm(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),f=rn();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),qm(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 qm(n,{prepare:r,run:e,done:t,inFlight:o}){let a=ut();return Qm(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(Um(n,t))})}),a.dispose}function Um(n,r){var e,t;let o=ut();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 Qm(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 Gm(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=En(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 Tr(n,r){let e=d.useRef([]),t=Z(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 ko(){return typeof window<"u"}function zt(n){return Nu(n)?(n.nodeName||"").toLowerCase():"#document"}function je(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function qe(n){var r;return(r=(Nu(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Nu(n){return ko()?n instanceof Node||n instanceof je(n).Node:!1}function Oe(n){return ko()?n instanceof Element||n instanceof je(n).Element:!1}function Ge(n){return ko()?n instanceof HTMLElement||n instanceof je(n).HTMLElement:!1}function $u(n){return!ko()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof je(n).ShadowRoot}const Km=new Set(["inline","contents"]);function ln(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=He(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!Km.has(o)}const Xm=new Set(["table","td","th"]);function Lu(n){return Xm.has(zt(n))}const Jm=[":popover-open",":modal"];function Sn(n){return Jm.some(r=>{try{return n.matches(r)}catch{return!1}})}const Zm=["transform","translate","scale","rotate","perspective"],ev=["transform","translate","scale","rotate","perspective","filter"],tv=["paint","layout","strict","content"];function Pr(n){const r=Ir(),e=Oe(n)?He(n):n;return Zm.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)||ev.some(t=>(e.willChange||"").includes(t))||tv.some(t=>(e.contain||"").includes(t))}function Fu(n){let r=at(n);for(;Ge(r)&&!Dt(r);){if(Pr(r))return r;if(Sn(r))return null;r=at(r)}return null}function Ir(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nv=new Set(["html","body","#document"]);function Dt(n){return nv.has(zt(n))}function He(n){return je(n).getComputedStyle(n)}function un(n){return Oe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function at(n){if(zt(n)==="html")return n;const r=n.assignedSlot||n.parentNode||$u(n)&&n.host||qe(n);return $u(r)?r.host:r}function Au(n){const r=at(n);return Dt(r)?n.ownerDocument?n.ownerDocument.body:n.body:Ge(r)&&ln(r)?r:Au(r)}function cn(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=Au(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=je(o);if(a){const s=Nr(i);return r.concat(i,i.visualViewport||[],ln(o)?o:[],s&&e?cn(s):[])}return r.concat(o,cn(o,[],e))}function Nr(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function rv(){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,Ne=Math.max,qt=Math.round,dn=Math.floor,Be=n=>({x:n,y:n}),ov={left:"right",right:"left",bottom:"top",top:"bottom"},av={start:"end",end:"start"};function _i(n,r,e){return Ne(n,dt(r,e))}function St(n,r){return typeof n=="function"?n(r):n}function ft(n){return n.split("-")[0]}function fn(n){return n.split("-")[1]}function Ru(n){return n==="x"?"y":"x"}function Co(n){return n==="y"?"height":"width"}const iv=new Set(["top","bottom"]);function it(n){return iv.has(ft(n))?"y":"x"}function _o(n){return Ru(it(n))}function Yu(n,r,e){e===void 0&&(e=!1);const t=fn(n),o=_o(n),a=Co(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=$r(i)),[i,$r(i)]}function Wu(n){const r=$r(n);return[Oi(n),r,Oi(r)]}function Oi(n){return n.replace(/start|end/g,r=>av[r])}const ju=["left","right"],Hu=["right","left"],sv=["top","bottom"],lv=["bottom","top"];function uv(n,r,e){switch(n){case"top":case"bottom":return e?r?Hu:ju:r?ju:Hu;case"left":case"right":return r?sv:lv;default:return[]}}function Bu(n,r,e,t){const o=fn(n);let a=uv(ft(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(Oi)))),a}function $r(n){return n.replace(/left|right|bottom|top/g,r=>ov[r])}function cv(n){return{top:0,right:0,bottom:0,left:0,...n}}function Mi(n){return typeof n!="number"?cv(n):{top:n,right:n,bottom:n,left:n}}function pn(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 Vu(n,r,e){let{reference:t,floating:o}=n;const a=it(r),i=_o(r),s=Co(i),l=ft(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(fn(r)){case"start":p[i]-=h*(e&&u?-1:1);break;case"end":p[i]+=h*(e&&u?-1:1);break}return p}const dv=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}=Vu(u,t,l),h=t,p={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:y}=s[v],{x:E,y:w,data:S,reset:x}=await y({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],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):x.rects),{x:c,y:f}=Vu(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function Oo(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}=St(r,n),m=Mi(p),g=s[h?f==="floating"?"reference":"floating":f],y=pn(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)),S=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},x=pn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:w,strategy:l}):E);return{top:(y.top-x.top+m.top)/S.y,bottom:(x.bottom-y.bottom+m.bottom)/S.y,left:(y.left-x.left+m.left)/S.x,right:(x.right-y.right+m.right)/S.x}}const fv=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}=St(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=ft(o),E=it(s),w=ft(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(w||!v?[$r(s)]:Wu(s)),T=m!=="none";!h&&T&&x.push(...Bu(s,v,m,S));const N=[s,...x],_=await Oo(r,g),O=[];let M=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&O.push(_[y]),f){const $=Yu(o,i,S);O.push(_[$[0]],_[$[1]])}if(M=[...M,{placement:o,overflows:O}],!O.every($=>$<=0)){var L,b;const $=(((L=a.flip)==null?void 0:L.index)||0)+1,Y=N[$];if(Y&&(!(f==="alignment"?E!==it(Y):!1)||M.every(C=>it(C.placement)===E?C.overflows[0]>0:!0)))return{data:{index:$,overflows:M},reset:{placement:Y}};let I=(b=M.filter(V=>V.overflows[0]<=0).sort((V,C)=>V.overflows[1]-C.overflows[1])[0])==null?void 0:b.placement;if(!I)switch(p){case"bestFit":{var k;const V=(k=M.filter(C=>{if(T){const q=it(C.placement);return q===E||q==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((C,q)=>C[1]-q[1])[0])==null?void 0:k[0];V&&(I=V);break}case"initialPlacement":I=s;break}if(o!==I)return{reset:{placement:I}}}return{}}}},pv=new Set(["left","top"]);async function hv(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=ft(e),s=fn(e),l=it(e)==="y",u=pv.has(i)?-1:1,c=a&&l?-1:1,f=St(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 mv=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 hv(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}}}}},vv=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,y:E}=g;return{x:y,y:E}}},...l}=St(n,r),u={x:e,y:t},c=await Oo(r,l),f=it(ft(o)),h=Ru(f);let p=u[h],m=u[f];if(a){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",E=p+c[g],w=p-c[y];p=_i(E,p,w)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",E=m+c[g],w=m-c[y];m=_i(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}}}}}},gv=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}=St(n,r),c=await Oo(r,u),f=ft(o),h=fn(o),p=it(o)==="y",{width:m,height:v}=a.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,g=h==="end"?"top":"bottom");const E=v-c.top-c.bottom,w=m-c.left-c.right,S=dt(v-c[g],E),x=dt(m-c[y],w),T=!r.middlewareData.shift;let N=S,_=x;if((e=r.middlewareData.shift)!=null&&e.enabled.x&&(_=w),(t=r.middlewareData.shift)!=null&&t.enabled.y&&(N=E),T&&!h){const M=Ne(c.left,0),L=Ne(c.right,0),b=Ne(c.top,0),k=Ne(c.bottom,0);p?_=m-2*(M!==0||L!==0?M+L:Ne(c.left,c.right)):N=v-2*(b!==0||k!==0?b+k:Ne(c.top,c.bottom))}await l({...r,availableWidth:_,availableHeight:N});const O=await i.getDimensions(s.floating);return m!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function zu(n){const r=He(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Ge(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=qt(e)!==a||qt(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function Ti(n){return Oe(n)?n:n.contextElement}function qn(n){const r=Ti(n);if(!Ge(r))return Be(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=zu(r);let i=(a?qt(e.width):e.width)/t,s=(a?qt(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const bv=Be(0);function qu(n){const r=je(n);return!Ir()||!r.visualViewport?bv:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function yv(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==je(n)?!1:r}function kn(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=Ti(n);let i=Be(1);r&&(t?Oe(t)&&(i=qn(t)):i=qn(n));const s=yv(a,e,t)?qu(a):Be(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=je(a),p=t&&Oe(t)?je(t):t;let m=h,v=Nr(m);for(;v&&t&&p!==m;){const g=qn(v),y=v.getBoundingClientRect(),E=He(v),w=y.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,S=y.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=S,m=je(v),v=Nr(m)}}return pn({width:c,height:f,x:l,y:u})}function Mo(n,r){const e=un(n).scrollLeft;return r?r.left+e:kn(qe(n)).left+e}function Uu(n,r){const e=n.getBoundingClientRect(),t=e.left+r.scrollLeft-Mo(n,e),o=e.top+r.scrollTop;return{x:t,y:o}}function wv(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=qe(t),s=r?Sn(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Be(1);const c=Be(0),f=Ge(t);if((f||!f&&!a)&&((zt(t)!=="body"||ln(i))&&(l=un(t)),Ge(t))){const p=kn(t);u=qn(t),c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}const h=i&&!f&&!a?Uu(i,l):Be(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 xv(n){return Array.from(n.getClientRects())}function Ev(n){const r=qe(n),e=un(n),t=n.ownerDocument.body,o=Ne(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Ne(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+Mo(n);const s=-e.scrollTop;return He(t).direction==="rtl"&&(i+=Ne(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}const Qu=25;function Dv(n,r){const e=je(n),t=qe(n),o=e.visualViewport;let a=t.clientWidth,i=t.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const c=Ir();(!c||c&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const u=Mo(t);if(u<=0){const c=t.ownerDocument,f=c.body,h=getComputedStyle(f),p=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(t.clientWidth-f.clientWidth-p);m<=Qu&&(a-=m)}else u<=Qu&&(a+=u);return{width:a,height:i,x:s,y:l}}const Sv=new Set(["absolute","fixed"]);function kv(n,r){const e=kn(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=Ge(n)?qn(n):Be(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 Gu(n,r,e){let t;if(r==="viewport")t=Dv(n,e);else if(r==="document")t=Ev(qe(n));else if(Oe(r))t=kv(r,e);else{const o=qu(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return pn(t)}function Ku(n,r){const e=at(n);return e===r||!Oe(e)||Dt(e)?!1:He(e).position==="fixed"||Ku(e,r)}function Cv(n,r){const e=r.get(n);if(e)return e;let t=cn(n,[],!1).filter(s=>Oe(s)&&zt(s)!=="body"),o=null;const a=He(n).position==="fixed";let i=a?at(n):n;for(;Oe(i)&&!Dt(i);){const s=He(i),l=Pr(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&Sv.has(o.position)||ln(i)&&!l&&Ku(n,i))?t=t.filter(c=>c!==i):o=s,i=at(i)}return r.set(n,t),t}function _v(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?Sn(r)?[]:Cv(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=Gu(r,c,o);return u.top=Ne(f.top,u.top),u.right=dt(f.right,u.right),u.bottom=dt(f.bottom,u.bottom),u.left=Ne(f.left,u.left),u},Gu(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ov(n){const{width:r,height:e}=zu(n);return{width:r,height:e}}function Mv(n,r,e){const t=Ge(r),o=qe(r),a=e==="fixed",i=kn(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Be(0);function u(){l.x=Mo(o)}if(t||!t&&!a)if((zt(r)!=="body"||ln(o))&&(s=un(r)),t){const p=kn(r,!0,a,r);l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}else o&&u();a&&!t&&o&&u();const c=o&&!t&&!a?Uu(o,s):Be(0),f=i.left+s.scrollLeft-l.x-c.x,h=i.top+s.scrollTop-l.y-c.y;return{x:f,y:h,width:i.width,height:i.height}}function Pi(n){return He(n).position==="static"}function Xu(n,r){if(!Ge(n)||He(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return qe(n)===e&&(e=e.ownerDocument.body),e}function Ju(n,r){const e=je(n);if(Sn(n))return e;if(!Ge(n)){let o=at(n);for(;o&&!Dt(o);){if(Oe(o)&&!Pi(o))return o;o=at(o)}return e}let t=Xu(n,r);for(;t&&Lu(t)&&Pi(t);)t=Xu(t,r);return t&&Dt(t)&&Pi(t)&&!Pr(t)?e:t||Fu(n)||e}const Tv=async function(n){const r=this.getOffsetParent||Ju,e=this.getDimensions,t=await e(n.floating);return{reference:Mv(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Pv(n){return He(n).direction==="rtl"}const Iv={convertOffsetParentRelativeRectToViewportRelativeRect:wv,getDocumentElement:qe,getClippingRect:_v,getOffsetParent:Ju,getElementRects:Tv,getClientRects:xv,getDimensions:Ov,getScale:qn,isElement:Oe,isRTL:Pv};function Zu(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function Nv(n,r){let e=null,t;const o=qe(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=dn(f),v=dn(o.clientWidth-(c+h)),g=dn(o.clientHeight-(f+p)),y=dn(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ne(0,dt(1,l))||1};let S=!0;function x(T){const N=T[0].intersectionRatio;if(N!==l){if(!S)return i();N?i(!1,N):t=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Zu(u,n.getBoundingClientRect())&&i(),S=!1}try{e=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(x,w)}e.observe(n)}return i(!0),a}function $v(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=Ti(n),c=o||a?[...u?cn(u):[],...cn(r)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const f=u&&s?Nv(u,e):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[E]=y;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?kn(n):null;l&&g();function g(){const y=kn(n);v&&!Zu(v,y)&&e(),v=y,m=requestAnimationFrame(g)}return e(),()=>{var y;c.forEach(E=>{o&&E.removeEventListener("scroll",e),a&&E.removeEventListener("resize",e)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Ii=Oo,Lv=mv,Fv=vv,Av=fv,Rv=gv,Yv=(n,r,e)=>{const t=new Map,o={platform:Iv,...e},a={...o.platform,_c:t};return dv(n,r,{...o,platform:a})};var Wv=typeof document<"u",jv=function(){},To=Wv?d.useLayoutEffect:jv;function Po(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(!Po(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)&&!Po(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function ec(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function tc(n,r){const e=ec(n);return Math.round(r*e)/e}function Ni(n){const r=H.useRef(n);return To(()=>{r.current=n}),r}function Hv(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]=H.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=H.useState(t);Po(h,t)||p(t);const[m,v]=H.useState(null),[g,y]=H.useState(null),E=H.useCallback(C=>{C!==T.current&&(T.current=C,v(C))},[]),w=H.useCallback(C=>{C!==N.current&&(N.current=C,y(C))},[]),S=a||m,x=i||g,T=H.useRef(null),N=H.useRef(null),_=H.useRef(c),O=l!=null,M=Ni(l),L=Ni(o),b=Ni(u),k=H.useCallback(()=>{if(!T.current||!N.current)return;const C={placement:r,strategy:e,middleware:h};L.current&&(C.platform=L.current),Yv(T.current,N.current,C).then(q=>{const P={...q,isPositioned:b.current!==!1};$.current&&!Po(_.current,P)&&(_.current=P,cr.flushSync(()=>{f(P)}))})},[h,r,e,L,b]);To(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[u]);const $=H.useRef(!1);To(()=>($.current=!0,()=>{$.current=!1}),[]),To(()=>{if(S&&(T.current=S),x&&(N.current=x),S&&x){if(M.current)return M.current(S,x,k);k()}},[S,x,k,M,O]);const Y=H.useMemo(()=>({reference:T,floating:N,setReference:E,setFloating:w}),[E,w]),I=H.useMemo(()=>({reference:S,floating:x}),[S,x]),V=H.useMemo(()=>{const C={position:e,left:0,top:0};if(!I.floating)return C;const q=tc(I.floating,c.x),P=tc(I.floating,c.y);return s?{...C,transform:"translate("+q+"px, "+P+"px)",...ec(I.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:q,top:P}},[e,s,I.floating,c.x,c.y]);return H.useMemo(()=>({...c,update:k,refs:Y,elements:I,floatingStyles:V}),[c,k,Y,I,V])}const nc=(n,r)=>({...Lv(n),options:[n,r]}),Bv=(n,r)=>({...Fv(n),options:[n,r]}),Vv=(n,r)=>({...Av(n),options:[n,r]}),zv=(n,r)=>({...Rv(n),options:[n,r]}),rc={...H},qv=rc.useInsertionEffect||(n=>n());function oc(n){const r=H.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return qv(()=>{r.current=n}),H.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 ac=!1,Uv=0;const ic=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Uv++;function Qv(){const[n,r]=H.useState(()=>ac?ic():void 0);return $i(()=>{n==null&&r(ic())},[]),H.useEffect(()=>{ac=!0},[]),n}const Gv=rc.useId||Qv;let Lr;process.env.NODE_ENV!=="production"&&(Lr=new Set);function Kv(){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 Xv(){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)}}function Jv(){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 Zv=H.createContext(null),eg=H.createContext(null),tg=()=>{var n;return((n=H.useContext(Zv))==null?void 0:n.id)||null},ng=()=>H.useContext(eg),rg="data-floating-ui-focusable";function og(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Gv(),a=H.useRef({}),[i]=H.useState(()=>Jv()),s=tg()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!Oe(p)&&Xv("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]=H.useState(t.reference),c=oc((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=H.useMemo(()=>({setPositionReference:u}),[]),h=H.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return H.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function ag(n){n===void 0&&(n={});const{nodeId:r}=n,e=og({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=H.useState(null),[s,l]=H.useState(null),c=(o==null?void 0:o.domReference)||a,f=H.useRef(null),h=ng();$i(()=>{c&&(f.current=c)},[c]);const p=Hv({...n,elements:{...o,...s&&{reference:s}}}),m=H.useCallback(w=>{const S=Oe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(S),p.refs.setReference(S)},[p.refs]),v=H.useCallback(w=>{(Oe(w)||w===null)&&(f.current=w,i(w)),(Oe(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Oe(w))&&p.refs.setReference(w)},[p.refs]),g=H.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),y=H.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=H.useMemo(()=>({...p,...t,refs:g,elements:y,nodeId:r}),[p,g,y,r,t]);return $i(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(S=>S.id===r);w&&(w.context=E)}),H.useMemo(()=>({...p,context:E,refs:g,elements:y}),[p,g,y,E])}const sc="active",lc="selected";function Li(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[sc]:i,[lc]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1,[rg]:""},...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&&[sc,lc].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 ig(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=H.useCallback(s=>Li(s,n,"reference"),r),a=H.useCallback(s=>Li(s,n,"floating"),e),i=H.useCallback(s=>Li(s,n,"item"),t);return H.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function uc(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const sg=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}=St(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,y=m.clientTop!==0,E=h===m;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||Kv('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...r,...await nc(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-a).fn(r)},S=await Ii(uc(w,m.scrollHeight+v+h.clientTop),c),x=await Ii(w,{...c,elementContext:"reference"}),T=Ne(0,S.top),N=w.y+T,M=(m.scrollHeight>m.clientHeight?L=>L:qt)(Ne(0,m.scrollHeight+(g&&E||y?v*2:0)-T-Ne(0,S.bottom)));if(m.style.maxHeight=M+"px",m.scrollTop=T,o){const L=m.offsetHeight<p.offsetHeight*dt(s,e.current.length)-1||x.top>=-l||x.bottom>=-l;cr.flushSync(()=>o(L))}return t&&(t.current=await Ii(uc({...w,y:N},m.offsetHeight+v+h.clientTop),c)),{y:N}}});function lg(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=oc(s),u=H.useRef(!1),c=H.useRef(null),f=H.useRef(null);H.useEffect(()=>{if(!o)return;function p(v){if(v.ctrlKey||!m||a.current==null)return;const g=v.deltaY,y=a.current.top>=-.5,E=a.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,S=g<0?-1:1,x=g<0?"max":"min";m.scrollHeight<=m.clientHeight||(!y&&g>0||!E&&g<0?(v.preventDefault(),cr.flushSync(()=>{l(T=>T+Math[x](g,w*S))})):/firefox/i.test(rv())&&(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=H.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)&&cr.flushSync(()=>l(v=>v+m))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[t.floating,l,a,i]);return H.useMemo(()=>o?{floating:h}:{},[o,h])}let Un=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Un.displayName="FloatingContext";let Fi=d.createContext(null);Fi.displayName="PlacementContext";function cc(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function dc(){return d.useContext(Un).setReference}function ug(){return d.useContext(Un).getReferenceProps}function fc(){let{getFloatingProps:n,slot:r}=d.useContext(Un);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function pc(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(Fi),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(Un);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let hc=4;function mc({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);cg(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:p=0,inner:m}=dg(e,s),[v,g="center"]=c.split(" ");fe(()=>{u&&a(0)},[u]);let{refs:y,floatingStyles:E,context:w}=ag({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[nc({mainAxis:v==="selection"?0:f,crossAxis:h}),Bv({padding:p}),v!=="selection"&&Vv({padding:p}),v==="selection"&&m?sg({...m,padding:p,overflowRef:i,offset:o,minItemsVisible:hc,referenceOverflowThreshold:p,onFallbackChange(L){var b,k;if(!L)return;let $=w.elements.floating;if(!$)return;let Y=parseFloat(getComputedStyle($).scrollPaddingBottom)||0,I=Math.min(hc,$.childElementCount),V=0,C=0;for(let q of(k=(b=w.elements.floating)==null?void 0:b.childNodes)!=null?k:[])if(tt(q)){let P=q.offsetTop,W=P+q.clientHeight+Y,G=$.scrollTop,j=G+$.clientHeight;if(P>=G&&W<=j)I--;else{C=Math.max(0,Math.min(W,j)-Math.max(P,G)),V=q.clientHeight;break}}I>=1&&a(q=>{let P=V*I-C+Y;return q>=P?q:P})}}):null,zv({padding:p,apply({availableWidth:L,availableHeight:b,elements:k}){Object.assign(k.floating.style,{overflow:"auto",maxWidth:`${L}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${b}px)`})}})].filter(Boolean),whileElementsMounted:$v}),[S=v,x=g]=w.placement.split("-");v==="selection"&&(S="selection");let T=d.useMemo(()=>({anchor:[S,x].filter(Boolean).join(" ")}),[S,x]),N=lg(w,{overflowRef:i,onChange:a}),{getReferenceProps:_,getFloatingProps:O}=ig([N]),M=Z(L=>{l(L),y.setFloating(L)});return H.createElement(Fi.Provider,{value:t},H.createElement(Un.Provider,{value:{setFloating:M,setReference:y.setReference,styles:E,getReferenceProps:_,getFloatingProps:O,slot:T}},n))}function cg(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 dg(n,r){var e,t,o;let a=Ai((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=Ai((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Ai((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function Ai(n,r,e=void 0){let t=rn(),o=Z((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=gc(l,u);return[c,f=>{let h=vc(l);{let p=h.map(m=>window.getComputedStyle(u).getPropertyValue(m));t.requestAnimationFrame(function m(){t.nextFrame(m);let v=!1;for(let[y,E]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(E);if(p[y]!==w){p[y]=w,v=!0;break}}if(!v)return;let g=gc(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 vc(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,...vc(o)]:[t]}return[]}function gc(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 fg({children:n,freeze:r}){let e=Io(r,n);return d.createElement(d.Fragment,null,e)}function Io(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let No=d.createContext(null);No.displayName="OpenClosedContext";var Ue=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(Ue||{});function Qn(){return d.useContext(No)}function Ri({value:n,children:r}){return d.createElement(No.Provider,{value:n},r)}function pg({children:n}){return d.createElement(No.Provider,{value:null},n)}function hg(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let kt=[];hg(()=>{function n(r){if(!jt(r.target)||r.target===document.body||kt[0]===r.target)return;let e=r.target;e=e.closest(So),kt.unshift(e??r.target),kt=kt.filter(t=>t!=null&&t.isConnected),kt.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 mg(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 Gn(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:mg(n)}}var $o=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))($o||{});function Lo(n){let r=Z(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,vo(()=>{e.current&&r()})}),[r])}function vg(){let n=typeof document>"u";return"useSyncExternalStore"in H?(r=>r.useSyncExternalStore)(H)(()=>()=>{},()=>!1,()=>!n):!1}function Fr(){let n=vg(),[r,e]=H.useState(xt.isHandoffComplete);return r&&xt.isHandoffComplete===!1&&e(!1),H.useEffect(()=>{r!==!0&&e(!0)},[r]),H.useEffect(()=>xt.handoff(),[]),n?!1:r}let bc=d.createContext(!1);function gg(){return d.useContext(bc)}function yc(n){return d.createElement(bc.Provider,{value:n.force},n.children)}function bg(n){let r=gg(),e=d.useContext(xc),[t,o]=d.useState(()=>{var a;if(!r&&e!==null)return(a=e.current)!=null?a:null;if(xt.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 wc=d.Fragment,yg=_e(function(n,r){let{ownerDocument:e=null,...t}=n,o=d.useRef(null),a=We(zh(p=>{o.current=p}),r),i=Bt(o),s=e??i,l=bg(s),[u]=d.useState(()=>{var p;return xt.isServer?null:(p=s==null?void 0:s.createElement("div"))!=null?p:null}),c=d.useContext(Yi),f=Fr();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]),Lo(()=>{var p;!l||!u||(ii(u)&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l)))});let h=Te();return f?!l||!u?null:Le.createPortal(h({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:wc,name:"Portal"}),u):null});function wg(n,r){let e=We(r),{enabled:t=!0,ownerDocument:o,...a}=n,i=Te();return t?d.createElement(yg,{...a,ownerDocument:o,ref:e}):i({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:wc,name:"Portal"})}let xg=d.Fragment,xc=d.createContext(null);function Eg(n,r){let{target:e,...t}=n,o={ref:We(r)},a=Te();return d.createElement(xc.Provider,{value:e},a({ourProps:o,theirProps:t,defaultTag:xg,name:"Popover.Group"}))}let Yi=d.createContext(null);function Dg(){let n=d.useContext(Yi),r=d.useRef([]),e=Z(a=>(r.current.push(a),n&&n.register(a),()=>t(a))),t=Z(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(Yi.Provider,{value:o},a)},[o])]}let Sg=_e(wg),Ec=_e(Eg),Wi=Object.assign(Sg,{Group:Ec});var kg=Object.defineProperty,Cg=(n,r,e)=>r in n?kg(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Dc=(n,r,e)=>(Cg(n,typeof r!="symbol"?r+"":r,e),e),de=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(de||{}),st=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(st||{}),Ct=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(Ct||{}),Sc=(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))(Sc||{});function ji(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):wi(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let _g={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:Gn(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=ji(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:Gn(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=ji(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=ji(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}},Og=class Yf extends ui{constructor(r){super(r),Dc(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:(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})}}),Dc(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=Bn.get(null);this.disposables.add(t.on(fi.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 Yf({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 Fe(e.type,_g,r,e)}};const kc=d.createContext(null);function Ar(n){let r=d.useContext(kc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Cc),e}return r}function Cc({id:n,virtual:r=null,__demoMode:e=!1}){let t=d.useMemo(()=>Og.new({id:n,virtual:r,__demoMode:e}),[]);return Lo(()=>t.dispose()),t}let Rr=d.createContext(null);Rr.displayName="ComboboxDataContext";function Kn(n){let r=d.useContext(Rr);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 _c=d.createContext(null);function Mg(n){let r=Ar("VirtualProvider"),e=Kn("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=fm({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===Ct.Pointer),h=we(r,r.selectors.activeOptionIndex);return c.length===0?null:d.createElement(_c.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 Tg=d.Fragment;function Pg(n,r){let e=d.useId(),t=go(),{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:y,...E}=n,w=Hl(a),[S=m?[]:void 0,x]=jl(o,i,w),T=Cc({id:e,virtual:g,__demoMode:p}),N=d.useRef({static:!1,hold:!1}),_=lu(u),O=Z(B=>g?u===null?g.options.indexOf(B):g.options.findIndex(K=>_(K,B)):T.state.options.findIndex(K=>_(K.dataRef.current.value,B))),M=d.useCallback(B=>Fe(k.mode,{[st.Multi]:()=>S.some(K=>_(K,B)),[st.Single]:()=>_(S,B)}),[S]),L=we(T,B=>B.virtual),b=Z(()=>h==null?void 0:h()),k=d.useMemo(()=>({__demoMode:p,immediate:v,optionsPropsRef:N,value:S,defaultValue:w,disabled:f,invalid:c,mode:m?st.Multi:st.Single,virtual:g?L:null,onChange:x,isSelected:M,calculateIndex:O,compare:_,onClose:b}),[S,w,f,c,m,x,M,p,T,g,L,b]);fe(()=>{var B;g&&T.send({type:Sc.UpdateVirtualConfiguration,options:g.options,disabled:(B=g.disabled)!=null?B:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),fe(()=>{T.state.dataRef.current=k},[k]);let[$,Y,I,V]=we(T,B=>[B.comboboxState,B.buttonElement,B.inputElement,B.optionsElement]),C=Bn.get(null),q=we(C,d.useCallback(B=>C.selectors.isTop(B,e),[C,e]));Ei(q,[Y,I,V],()=>T.actions.closeCombobox());let P=we(T,T.selectors.activeOptionIndex),W=we(T,T.selectors.activeOption),G=d.useMemo(()=>({open:$===de.Open,disabled:f,invalid:c,activeIndex:P,activeOption:W,value:S}),[k,f,S,c,W,$]),[j,F]=tu(),ne=r===null?{}:{ref:r},U=d.useCallback(()=>{if(w!==void 0)return x==null?void 0:x(w)},[x,w]),A=Te();return d.createElement(F,{value:j,props:{htmlFor:I==null?void 0:I.id},slot:{open:$===de.Open,disabled:f}},d.createElement(mc,null,d.createElement(Rr.Provider,{value:k},d.createElement(kc.Provider,{value:T},d.createElement(Ri,{value:Fe($,{[de.Open]:Ue.Open,[de.Closed]:Ue.Closed})},l!=null&&d.createElement(ql,{disabled:f,data:S!=null?{[l]:S}:{},form:s,onReset:U}),A({ourProps:ne,theirProps:E,slot:G,defaultTag:Tg,name:"Combobox"}))))))}let Ig="input";function Ng(n,r){var e,t;let o=Ar("Combobox.Input"),a=Kn("Combobox.Input"),i=d.useId(),s=ai(),{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),y=We(g,r,dc(),o.actions.setInputElement),E=Bt(v),[w,S]=we(o,F=>[F.comboboxState,F.isTyping]),x=rn(),T=Z(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:se.Nothing})}),N=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]);Tr(([F,ne],[U,A])=>{if(o.state.isTyping)return;let B=g.current;B&&((A===de.Open&&ne===de.Closed||F!==U)&&(B.value=F),requestAnimationFrame(()=>{if(o.state.isTyping||!B||(E==null?void 0:E.activeElement)!==B)return;let{selectionStart:K,selectionEnd:J}=B;Math.abs((J??0)-(K??0))===0&&K===0&&B.setSelectionRange(B.value.length,B.value.length)}))},[N,w,E,S]),Tr(([F],[ne])=>{if(F===de.Open&&ne===de.Closed){if(o.state.isTyping)return;let U=g.current;if(!U)return;let A=U.value,{selectionStart:B,selectionEnd:K,selectionDirection:J}=U;U.value="",U.value=A,J!==null?U.setSelectionRange(B,K,J):U.setSelectionRange(B,K)}},[w]);let _=d.useRef(!1),O=Z(()=>{_.current=!0}),M=Z(()=>{x.nextFrame(()=>{_.current=!1})}),L=Z(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===st.Single&&o.actions.closeCombobox();break;case he.ArrowDown:return F.preventDefault(),F.stopPropagation(),Fe(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Next}),[de.Closed]:()=>o.actions.openCombobox()});case he.ArrowUp:return F.preventDefault(),F.stopPropagation(),Fe(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Previous}),[de.Closed]:()=>{Le.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===st.Single&&a.value===null&&T(),o.actions.closeCombobox());case he.Tab:if(o.state.comboboxState!==de.Open)return;a.mode===st.Single&&o.state.activationTrigger!==Ct.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),b=Z(F=>{u==null||u(F),a.mode===st.Single&&F.target.value===""&&T(),o.actions.openCombobox()}),k=Z(F=>{var ne,U,A;let B=(ne=F.relatedTarget)!=null?ne:kt.find(K=>K!==F.currentTarget);if(!((U=o.state.optionsElement)!=null&&U.contains(B))&&!((A=o.state.buttonElement)!=null&&A.contains(B))&&o.state.comboboxState===de.Open)return F.preventDefault(),a.mode===st.Single&&a.value===null&&T(),o.actions.closeCombobox()}),$=Z(F=>{var ne,U,A;let B=(ne=F.relatedTarget)!=null?ne:kt.find(K=>K!==F.currentTarget);(U=o.state.buttonElement)!=null&&U.contains(B)||(A=o.state.optionsElement)!=null&&A.contains(B)||a.disabled||a.immediate&&o.state.comboboxState!==de.Open&&x.microTask(()=>{Le.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(Ct.Focus)})}),Y=kr(),I=Jl(),{isFocused:V,focusProps:C}=ti({autoFocus:h}),{isHovered:q,hoverProps:P}=ei({isDisabled:f}),W=we(o,F=>F.optionsElement),G=d.useMemo(()=>({open:w===de.Open,disabled:f,invalid:a.invalid,hover:q,focus:V,autofocus:h}),[a,q,V,h,f,a.invalid]),j=Dr({ref:y,id:l,role:"combobox",type:p,"aria-controls":W==null?void 0:W.id,"aria-expanded":w===de.Open,"aria-activedescendant":we(o,o.selectors.activeDescendantId),"aria-labelledby":Y,"aria-describedby":I,"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:O,onCompositionEnd:M,onKeyDown:L,onChange:b,onFocus:$,onBlur:k},C,P);return Te()({ourProps:j,theirProps:m,slot:G,defaultTag:Ig,name:"Combobox.Input"})}let $g="button";function Lg(n,r){let e=Ar("Combobox.Button"),t=Kn("Combobox.Button"),[o,a]=d.useState(null),i=We(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=_u(p),g=h===de.Open;Cu(g,{trigger:o,action:d.useCallback(b=>{if(o!=null&&o.contains(b.target)||p!=null&&p.contains(b.target))return Vt.Ignore;let k=b.target.closest('[role="option"]:not([data-disabled])');return tt(k)?Vt.Select(k):m!=null&&m.contains(b.target)?Vt.Ignore:Vt.Close},[o,p,m]),close:e.actions.closeCombobox,select:e.actions.selectActiveOption});let y=Z(b=>{switch(b.key){case he.Space:case he.Enter:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&Le.flushSync(()=>e.actions.openCombobox()),v();return;case he.ArrowDown:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Le.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&&(Le.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(),Le.flushSync(()=>e.actions.closeCombobox()),v();return;default:return}}),E=Z(b=>{b.preventDefault(),!Gl(b.currentTarget)&&(b.button===$o.Left&&(e.state.comboboxState===de.Open?e.actions.closeCombobox():e.actions.openCombobox()),v())}),w=kr([l]),{isFocusVisible:S,focusProps:x}=ti({autoFocus:c}),{isHovered:T,hoverProps:N}=ei({isDisabled:u}),{pressed:_,pressProps:O}=Yl({disabled:u}),M=d.useMemo(()=>({open:h===de.Open,active:_||h===de.Open,disabled:u,invalid:t.invalid,value:t.value,hover:T,focus:S}),[t,T,S,_,u,h]),L=Dr({ref:i,id:l,type:Ou(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:y},x,N,O);return Te()({ourProps:L,theirProps:f,slot:M,defaultTag:$g,name:"Combobox.Button"})}let Fg="div",Ag=on.RenderStrategy|on.Static;function Rg(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=Ar("Combobox.Options"),m=Kn("Combobox.Options"),v=cc(l);v&&(u=!0);let[g,y]=pc(v),[E,w]=d.useState(null),S=fc(),x=We(r,v?g:null,p.actions.setOptionsElement,w),[T,N,_,O,M]=we(p,J=>[J.comboboxState,J.inputElement,J.buttonElement,J.optionsElement,J.activationTrigger]),L=Bt(N||_),b=Bt(O),k=Qn(),[$,Y]=Ci(f,E,k!==null?(k&Ue.Open)===Ue.Open:T===de.Open);gi($,N,p.actions.closeCombobox);let I=m.__demoMode?!1:c&&T===de.Open;Si(I,b);let V=m.__demoMode?!1:c&&T===de.Open;vi(V,{allowed:d.useCallback(()=>[N,_,O],[N,_,O])}),fe(()=>{var J;m.optionsPropsRef.current.static=(J=n.static)!=null?J:!1},[m.optionsPropsRef,n.static]),fe(()=>{m.optionsPropsRef.current.hold=s},[m.optionsPropsRef,s]),Gm(T===de.Open,{container:O,accept(J){return J.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:J.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(J){J.setAttribute("role","none")}});let C=kr([_==null?void 0:_.id]),q=d.useMemo(()=>({open:T===de.Open,option:void 0}),[T]),P=Z(()=>{p.actions.setActivationTrigger(Ct.Pointer)}),W=Z(J=>{J.preventDefault(),p.actions.setActivationTrigger(Ct.Pointer)}),G=Dr(v?S():{},{"aria-labelledby":C,role:"listbox","aria-multiselectable":m.mode===st.Multi?!0:void 0,id:i,ref:x,style:{...h.style,...y,"--input-width":si(N,!0).width,"--button-width":si(_,!0).width},onWheel:M===Ct.Pointer?void 0:P,onMouseDown:W,...ki(Y)}),j=$&&T===de.Closed,F=Io(j,(e=m.virtual)==null?void 0:e.options),ne=Io(j,m.value),U=Z(J=>m.compare(ne,J)),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(Rr.Provider,{value:A},d.createElement(Mg,{slot:q},h.children))});let B=Te(),K=d.useMemo(()=>m.mode===st.Multi?m:{...m,isSelected:U},[m,U]);return d.createElement(Wi,{enabled:u?n.static||$:!1,ownerDocument:L},d.createElement(Rr.Provider,{value:K},B({ourProps:G,theirProps:{...h,children:d.createElement(fg,{freeze:j},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,q):h.children)},slot:q,defaultTag:Fg,features:Ag,visible:$,name:"Combobox.Options"})))}let Yg="div";function Wg(n,r){var e,t,o;let a=Kn("Combobox.Option"),i=Ar("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,Y=>[Y.inputElement]),m=_u(p),v=we(i,d.useCallback(Y=>i.selectors.isActive(Y,u,l),[u,l])),g=a.isSelected(u),y=d.useRef(null),E=Yt({disabled:c,value:u,domRef:y,order:f}),w=d.useContext(_c),S=We(r,y,w?w.measureElement:null),x=Z(()=>{i.actions.setIsTyping(!1),i.actions.onChange(u)});fe(()=>i.actions.registerOption(l,E),[E,l]);let T=we(i,d.useCallback(Y=>i.selectors.shouldScrollIntoView(Y,u,l),[u,l]));fe(()=>{if(T)return ut().requestAnimationFrame(()=>{var Y,I;(I=(Y=y.current)==null?void 0:Y.scrollIntoView)==null||I.call(Y,{block:"nearest"})})},[T,y]);let N=Z(Y=>{Y.preventDefault(),Y.button===$o.Left&&(c||(x(),xi()||requestAnimationFrame(()=>m()),a.mode===st.Single&&i.actions.closeCombobox()))}),_=Z(()=>{if(c)return i.actions.goToOption({focus:se.Nothing});let Y=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:Y})}),O=Tu(),M=Z(Y=>O.update(Y)),L=Z(Y=>{if(!O.wasMoved(Y)||c||v&&i.state.activationTrigger===Ct.Pointer)return;let I=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:I},Ct.Pointer)}),b=Z(Y=>{O.wasMoved(Y)&&(c||v&&(a.optionsPropsRef.current.hold||i.state.activationTrigger===Ct.Pointer&&i.actions.goToOption({focus:se.Nothing})))}),k=d.useMemo(()=>({active:v,focus:v,selected:g,disabled:c}),[v,g,c]),$={id:l,ref:S,role:"option",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:N,onFocus:_,onPointerEnter:M,onMouseEnter:M,onPointerMove:L,onMouseMove:L,onPointerLeave:b,onMouseLeave:b};return Te()({ourProps:$,theirProps:h,slot:k,defaultTag:Yg,name:"Combobox.Option"})}let jg=_e(Pg),Hg=_e(Lg),Oc=_e(Ng),Bg=Eo,Mc=_e(Rg),Tc=_e(Wg),Vg=Object.assign(jg,{Input:Oc,Button:Hg,Label:Bg,Options:Mc,Option:Tc});function zg(n,r=typeof document<"u"?document.defaultView:null,e){let t=Or(n,"escape");Di(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===he.Escape&&e(o))})}function qg(){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=Bt(e),o=Z(()=>{var a,i;let s=[];for(let l of n)l!==null&&(Wt(l)?s.push(l):"current"in l&&Wt(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&&Wt(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:Z(a=>o().some(i=>i.contains(a)))}}let Pc=d.createContext(null);function Ic({children:n,node:r}){let[e,t]=d.useState(null),o=Nc(r??e);return d.createElement(Pc.Provider,{value:o},n,o===null&&d.createElement(Sr,{features:jn.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=En(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&Wt(l)&&l!=null&&l.contains(a)){t(l);break}}}}))}function Nc(n=null){var r;return(r=d.useContext(Pc))!=null?r:n}function Hi(){let n=d.useRef(!1);return fe(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Yr=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Yr||{});function Qg(){let n=d.useRef(0);return Du(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function $c(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)Wt(e.current)&&r.add(e.current);return r}let Gg="div";var Cn=(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))(Cn||{});function Kg(n,r){let e=d.useRef(null),t=We(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;Fr()||(s=0);let u=Bt(e);eb(s,{ownerDocument:u});let c=tb(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});nb(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let f=Qg(),h=Z(E=>{if(!tt(e.current))return;let w=e.current;(S=>S())(()=>{Fe(f.current,{[Yr.Forwards]:()=>{Vn(w,bt.First,{skipElements:[E.relatedTarget,a]})},[Yr.Backwards]:()=>{Vn(w,bt.Last,{skipElements:[E.relatedTarget,a]})}})})}),p=Or(!!(s&2),"focus-trap#tab-lock"),m=rn(),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=$c(i);tt(e.current)&&w.add(e.current);let S=E.relatedTarget;jt(S)&&S.dataset.headlessuiFocusGuard!=="true"&&(Lc(w,S)||(v.current?Vn(e.current,Fe(f.current,{[Yr.Forwards]:()=>bt.Next,[Yr.Backwards]:()=>bt.Previous})|bt.WrapAround,{relativeTo:E.target}):jt(E.target)&&Ht(E.target)))}},y=Te();return d.createElement(d.Fragment,null,p&&d.createElement(Sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:jn.Focusable}),y({ourProps:g,theirProps:l,defaultTag:Gg,name:"FocusTrap"}),p&&d.createElement(Sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:jn.Focusable}))}let Xg=_e(Kg),Jg=Object.assign(Xg,{features:Cn});function Zg(n=!0){let r=d.useRef(kt.slice());return Tr(([e],[t])=>{t===!0&&e===!1&&vo(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=kt.slice())},[n,kt,r]),Z(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function eb(n,{ownerDocument:r}){let e=!!(n&8),t=Zg(e);Tr(()=>{e||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&Ht(t())},[e]),Lo(()=>{e&&Ht(t())})}function tb(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=Or(!!(n&1),"focus-trap#initial-focus"),s=Hi();return Tr(()=>{if(n===0)return;if(!i){o!=null&&o.current&&Ht(o.current);return}let l=e.current;l&&vo(()=>{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)Ht(t.current);else{if(n&16){if(Vn(l,bt.First|bt.AutoFocus)!==bi.Error)return}else if(Vn(l,bt.First)!==bi.Error)return;if(o!=null&&o.current&&(Ht(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 nb(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=Hi(),i=!!(n&4);Di(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=$c(t);tt(e.current)&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;tt(c)?Lc(l,c)?(o.current=c,Ht(c)):(s.preventDefault(),s.stopPropagation(),Ht(u)):Ht(o.current)},!0)}function Lc(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function Fc(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:Rc)!==d.Fragment||d.Children.count(n.children)===1}let Fo=d.createContext(null);Fo.displayName="TransitionContext";var rb=(n=>(n.Visible="visible",n.Hidden="hidden",n))(rb||{});function ob(){let n=d.useContext(Fo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function ab(){let n=d.useContext(Ao);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Ao=d.createContext(null);Ao.displayName="NestingContext";function Ro(n){return"children"in n?Ro(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Ac(n,r){let e=Yt(n),t=d.useRef([]),o=Hi(),a=rn(),i=Z((p,m=an.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===p);v!==-1&&(Fe(m,{[an.Unmount](){t.current.splice(v,1)},[an.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!Ro(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=Z(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,an.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),f=Z((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(([y,E])=>E)).then(()=>g())})]),m==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(m)):v(m)}),h=Z((p,m,v)=>{Promise.all(c.current[m].splice(0).map(([g,y])=>y)).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 Rc=d.Fragment,Yc=on.RenderStrategy;function ib(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,[y,E]=d.useState(null),w=d.useRef(null),S=Fc(n),x=We(...S?[w,r,E]:r===null?[]:[r]),T=(e=g.unmount)==null||e?an.Unmount:an.Hidden,{show:N,appear:_,initial:O}=ob(),[M,L]=d.useState(N?"visible":"hidden"),b=ab(),{register:k,unregister:$}=b;fe(()=>k(w),[k,w]),fe(()=>{if(T===an.Hidden&&w.current){if(N&&M!=="visible"){L("visible");return}return Fe(M,{hidden:()=>$(w),visible:()=>k(w)})}},[M,w,k,$,N,T]);let Y=Fr();fe(()=>{if(S&&Y&&M==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,M,Y,S]);let I=O&&!_,V=_&&N&&O,C=d.useRef(!1),q=Ac(()=>{C.current||(L("hidden"),$(w))},b),P=Z(A=>{C.current=!0;let B=A?"enter":"leave";q.onStart(w,B,K=>{K==="enter"?a==null||a():K==="leave"&&(s==null||s())})}),W=Z(A=>{let B=A?"enter":"leave";C.current=!1,q.onStop(w,B,K=>{K==="enter"?i==null||i():K==="leave"&&(l==null||l())}),B==="leave"&&!Ro(q)&&(L("hidden"),$(w))});d.useEffect(()=>{S&&o||(P(N),W(N))},[N,S,o]);let G=!(!o||!S||!Y||I),[,j]=Ci(G,y,N,{start:P,end:W}),F=sn({ref:x,className:((t=ri(g.className,V&&u,V&&c,j.enter&&u,j.enter&&j.closed&&c,j.enter&&!j.closed&&f,j.leave&&p,j.leave&&!j.closed&&m,j.leave&&j.closed&&v,!j.transition&&N&&h))==null?void 0:t.trim())||void 0,...ki(j)}),ne=0;M==="visible"&&(ne|=Ue.Open),M==="hidden"&&(ne|=Ue.Closed),N&&M==="hidden"&&(ne|=Ue.Opening),!N&&M==="visible"&&(ne|=Ue.Closing);let U=Te();return d.createElement(Ao.Provider,{value:q},d.createElement(Ri,{value:ne},U({ourProps:F,theirProps:g,defaultTag:Rc,features:Yc,visible:M==="visible",name:"Transition.Child"})))}function sb(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=Fc(n),l=We(...s?[i,r]:r===null?[]:[r]);Fr();let u=Qn();if(e===void 0&&u!==null&&(e=(u&Ue.Open)===Ue.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=Ac(()=>{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"):!Ro(h)&&i.current!==null&&f("hidden")},[e,h]);let y={unmount:o},E=Z(()=>{var x;p&&m(!1),(x=n.beforeEnter)==null||x.call(n)}),w=Z(()=>{var x;p&&m(!1),(x=n.beforeLeave)==null||x.call(n)}),S=Te();return d.createElement(Ao.Provider,{value:h},d.createElement(Fo.Provider,{value:g},S({ourProps:{...y,as:d.Fragment,children:d.createElement(Wc,{ref:l,...y,...a,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:Yc,visible:c==="visible",name:"Transition"})))}function lb(n,r){let e=d.useContext(Fo)!==null,t=Qn()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement(Bi,{ref:r,...n}):d.createElement(Wc,{ref:r,...n}))}let Bi=_e(sb),Wc=_e(ib),Vi=_e(lb),jc=Object.assign(Bi,{Child:Vi,Root:Bi});var ub=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(ub||{}),cb=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(cb||{});let db={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},zi=d.createContext(null);zi.displayName="DialogContext";function Yo(n){let r=d.useContext(zi);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Yo),e}return r}function fb(n,r){return Fe(r.type,db,n,r)}let Hc=_e(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=Qn();o===void 0&&p!==null&&(o=(p&Ue.Open)===Ue.Open);let m=d.useRef(null),v=We(m,r),g=Bt(m),y=o?0:1,[E,w]=d.useReducer(fb,{titleId:null,descriptionId:null,panelRef:d.createRef()}),S=Z(()=>a(!1)),x=Z(j=>w({type:0,id:j})),T=Fr()?y===0:!1,[N,_]=Dg(),O={get current(){var j;return(j=E.panelRef.current)!=null?j:m.current}},M=Nc(),{resolveContainers:L}=Ug({mainTreeNode:M,portals:N,defaultContainers:[O]}),b=p!==null?(p&Ue.Closing)===Ue.Closing:!1;vi(u||b?!1:T,{allowed:Z(()=>{var j,F;return[(F=(j=m.current)==null?void 0:j.closest("[data-headlessui-portal]"))!=null?F:null]}),disallowed:Z(()=>{var j;return[(j=M==null?void 0:M.closest("body > *:not(#headlessui-portal-root)"))!=null?j:null]})});let k=Bn.get(null);fe(()=>{if(T)return k.actions.push(t),()=>k.actions.pop(t)},[k,t,T]);let $=we(k,d.useCallback(j=>k.selectors.isTop(j,t),[k,t]));Ei($,L,j=>{j.preventDefault(),S()}),zg($,g==null?void 0:g.defaultView,j=>{j.preventDefault(),j.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),S()}),Si(u||b?!1:T,g,L),gi(T,m,S);let[Y,I]=qh(),V=d.useMemo(()=>[{dialogState:y,close:S,setTitleId:x,unmount:c},E],[y,E,S,x,c]),C=d.useMemo(()=>({open:y===0}),[y]),q={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:y===0?!0:void 0,"aria-labelledby":E.titleId,"aria-describedby":Y,unmount:c},P=!qg(),W=Cn.None;T&&!u&&(W|=Cn.RestoreFocus,W|=Cn.TabLock,l&&(W|=Cn.AutoFocus),P&&(W|=Cn.InitialFocus));let G=Te();return d.createElement(pg,null,d.createElement(yc,{force:!0},d.createElement(Wi,null,d.createElement(zi.Provider,{value:V},d.createElement(Ec,{target:m},d.createElement(yc,{force:!1},d.createElement(I,{slot:C},d.createElement(_,null,d.createElement(Jg,{initialFocus:i,initialFocusFallback:m,containers:L,features:W},d.createElement(em,{value:S},G({ourProps:q,theirProps:f,slot:C,defaultTag:pb,features:hb,visible:y===0,name:"Dialog"})))))))))))}),pb="div",hb=on.RenderStrategy|on.Static;function mb(n,r){let{transition:e=!1,open:t,...o}=n,a=Qn(),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(Ic,null,d.createElement(jc,{show:t,transition:e,unmount:o.unmount},d.createElement(Hc,{ref:r,...o}))):d.createElement(Ic,null,d.createElement(Hc,{ref:r,open:t,...o}))}let vb="div";function gb(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Yo("Dialog.Panel"),u=We(r,l.panelRef),c=d.useMemo(()=>({open:i===0}),[i]),f=Z(g=>{g.stopPropagation()}),h={ref:u,id:t,onClick:f},p=o?Vi:d.Fragment,m=o?{unmount:s}:{},v=Te();return d.createElement(p,{...m},v({ourProps:h,theirProps:a,slot:c,defaultTag:vb,name:"Dialog.Panel"}))}let bb="div";function yb(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Yo("Dialog.Backdrop"),i=d.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0},l=e?Vi:d.Fragment,u=e?{unmount:a}:{},c=Te();return d.createElement(l,{...u},c({ourProps:s,theirProps:t,slot:i,defaultTag:bb,name:"Dialog.Backdrop"}))}let wb="h2";function xb(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Yo("Dialog.Title"),s=We(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=d.useMemo(()=>({open:a===0}),[a]),u={ref:s,id:t};return Te()({ourProps:u,theirProps:o,slot:l,defaultTag:wb,name:"Dialog.Title"})}let Eb=_e(mb),Bc=_e(gb);_e(yb);let Vc=_e(xb),Wr=Object.assign(Eb,{Panel:Bc,Title:Vc,Description:Zl});function Db(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 zc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qc(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!tt(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 zc.test(i)&&(i=i.replace(zc,"")),i}function Sb(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():qc(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return qc(n).trim()}function kb(n){let r=d.useRef(""),e=d.useRef("");return Z(()=>{let t=n.current;if(!t)return"";let o=t.innerText;if(r.current===o)return e.current;let a=Sb(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var Cb=Object.defineProperty,_b=(n,r,e)=>r in n?Cb(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Uc=(n,r,e)=>(_b(n,typeof r!="symbol"?r+"":r,e),e),Ke=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Ke||{}),_t=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(_t||{}),Wo=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(Wo||{}),Qc=(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))(Qc||{});function Gc(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=wi(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 Ob={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=Gn(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=Gn(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=Gc(n),u=Gn(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=Gn(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,...Gc(n),pendingShouldSort:!1}:n},Mb=class Wf extends ui{constructor(r){super(r),Uc(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:di(()=>{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:di(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:6,options:e.splice(0)})}]}),goToOption:di(()=>{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})}}),Uc(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=Bn.get(null);this.disposables.add(t.on(fi.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 Wf({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 Fe(e.type,Ob,r,e)}};const Kc=d.createContext(null);function qi(n){let r=d.useContext(Kc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Xc),e}return r}function Xc({id:n,__demoMode:r=!1}){let e=d.useMemo(()=>Mb.new({id:n,__demoMode:r}),[]);return Lo(()=>e.dispose()),e}let jo=d.createContext(null);jo.displayName="ListboxDataContext";function jr(n){let r=d.useContext(jo);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,jr),e}return r}let Tb=d.Fragment;function Pb(n,r){let e=d.useId(),t=go(),{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 y=We(r),E=Hl(a),[w=p?[]:void 0,S]=jl(o,l,E),x=Xc({id:e,__demoMode:m}),T=d.useRef({static:!1,hold:!1}),N=d.useRef(new Map),_=lu(u),O=d.useCallback(G=>Fe(M.mode,{[_t.Multi]:()=>w.some(j=>_(j,G)),[_t.Single]:()=>_(w,G)}),[w]),M=d.useMemo(()=>({value:w,disabled:f,invalid:c,mode:p?_t.Multi:_t.Single,orientation:g,onChange:S,compare:_,isSelected:O,optionsPropsRef:T,listRef:N}),[w,f,c,p,g,S,_,O,T,N]);fe(()=>{x.state.dataRef.current=M},[M]);let L=we(x,G=>G.listboxState),b=Bn.get(null),k=we(b,d.useCallback(G=>b.selectors.isTop(G,e),[b,e])),[$,Y]=we(x,G=>[G.buttonElement,G.optionsElement]);Ei(k,[$,Y],(G,j)=>{x.send({type:Qc.CloseListbox}),xu(j,yi.Loose)||(G.preventDefault(),$==null||$.focus())});let I=d.useMemo(()=>({open:L===Ke.Open,disabled:f,invalid:c,value:w}),[L,f,c,w]),[V,C]=tu({inherit:!0}),q={ref:y},P=d.useCallback(()=>{if(E!==void 0)return S==null?void 0:S(E)},[S,E]),W=Te();return d.createElement(C,{value:V,props:{htmlFor:$==null?void 0:$.id},slot:{open:L===Ke.Open,disabled:f}},d.createElement(mc,null,d.createElement(Kc.Provider,{value:x},d.createElement(jo.Provider,{value:M},d.createElement(Ri,{value:Fe(L,{[Ke.Open]:Ue.Open,[Ke.Closed]:Ue.Closed})},s!=null&&w!=null&&d.createElement(ql,{disabled:f,data:{[s]:w},form:i,onReset:P}),W({ourProps:q,theirProps:v,slot:I,defaultTag:Tb,name:"Listbox"}))))))}let Ib="button";function Nb(n,r){let e=d.useId(),t=ai(),o=jr("Listbox.Button"),a=qi("Listbox.Button"),{id:i=t||`headlessui-listbox-button-${e}`,disabled:s=o.disabled||!1,autoFocus:l=!1,...u}=n,c=We(r,dc(),a.actions.setButtonElement),f=ug(),[h,p,m]=we(a,C=>[C.listboxState,C.buttonElement,C.optionsElement]),v=h===Ke.Open;Cu(v,{trigger:p,action:d.useCallback(C=>{if(p!=null&&p.contains(C.target))return Vt.Ignore;let q=C.target.closest('[role="option"]:not([data-disabled])');return tt(q)?Vt.Select(q):m!=null&&m.contains(C.target)?Vt.Ignore:Vt.Close},[p,m]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let g=Z(C=>{switch(C.key){case he.Enter:Nh(C.currentTarget);break;case he.Space:case he.ArrowDown:C.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.First});break;case he.ArrowUp:C.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.Last});break}}),y=Z(C=>{switch(C.key){case he.Space:C.preventDefault();break}}),E=Z(C=>{var q;if(C.button===$o.Left){if(Gl(C.currentTarget))return C.preventDefault();a.state.listboxState===Ke.Open?(Le.flushSync(()=>a.actions.closeListbox()),(q=a.state.buttonElement)==null||q.focus({preventScroll:!0})):(C.preventDefault(),a.actions.openListbox({focus:se.Nothing}))}}),w=d.useRef(null),S=Z(C=>{w.current=C.pointerType,C.pointerType==="mouse"&&E(C)}),x=Z(C=>{w.current!=="mouse"&&E(C)}),T=Z(C=>C.preventDefault()),N=kr([i]),_=Jl(),{isFocusVisible:O,focusProps:M}=ti({autoFocus:l}),{isHovered:L,hoverProps:b}=ei({isDisabled:s}),{pressed:k,pressProps:$}=Yl({disabled:s}),Y=d.useMemo(()=>({open:h===Ke.Open,active:k||h===Ke.Open,disabled:s,invalid:o.invalid,value:o.value,hover:L,focus:O,autofocus:l}),[h,o.value,s,L,O,k,o.invalid,l]),I=we(a,C=>C.listboxState===Ke.Open),V=Dr(f(),{ref:c,id:i,type:Ou(n,p),"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":I,"aria-labelledby":N,"aria-describedby":_,disabled:s||void 0,autoFocus:l,onKeyDown:g,onKeyUp:y,onKeyPress:T,onPointerDown:S,onClick:x},M,b,$);return Te()({ourProps:V,theirProps:u,slot:Y,defaultTag:Ib,name:"Listbox.Button"})}let Jc=d.createContext(!1),$b="div",Lb=on.RenderStrategy|on.Static;function Fb(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=cc(o),[c,f]=d.useState(null);u&&(a=!0);let h=jr("Listbox.Options"),p=qi("Listbox.Options"),[m,v,g,y]=we(p,A=>[A.listboxState,A.buttonElement,A.optionsElement,A.__demoMode]),E=Bt(v),w=Bt(g),S=Qn(),[x,T]=Ci(s,c,S!==null?(S&Ue.Open)===Ue.Open:m===Ke.Open);gi(x,v,p.actions.closeListbox);let N=y?!1:i&&m===Ke.Open;Si(N,w);let _=y?!1:i&&m===Ke.Open;vi(_,{allowed:d.useCallback(()=>[v,g],[v,g])});let O=m!==Ke.Open,M=Db(O,v)?!1:x,L=x&&m===Ke.Closed,b=Io(L,h.value),k=Z(A=>h.compare(b,A)),$=we(p,A=>{var B;if(u==null||!((B=u==null?void 0:u.to)!=null&&B.includes("selection")))return null;let K=A.options.findIndex(J=>k(J.dataRef.current.value));return K===-1&&(K=0),K}),Y=(()=>{if(u==null)return;if($===null)return{...u,inner:void 0};let A=Array.from(h.listRef.current.values());return{...u,inner:{listRef:{current:A},index:$}}})(),[I,V]=pc(Y),C=fc(),q=We(r,u?I:null,p.actions.setOptionsElement,f),P=rn();d.useEffect(()=>{var A;let B=g;B&&m===Ke.Open&&B!==((A=En(B))==null?void 0:A.activeElement)&&(B==null||B.focus({preventScroll:!0}))},[m,g]);let W=Z(A=>{var B,K;switch(P.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:J}=p.state.options[p.state.activeOptionIndex];p.actions.onChange(J.current.value)}h.mode===_t.Single&&(Le.flushSync(()=>p.actions.closeListbox()),(B=p.state.buttonElement)==null||B.focus({preventScroll:!0}));break;case Fe(h.orientation,{vertical:he.ArrowDown,horizontal:he.ArrowRight}):return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Next});case Fe(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(),Le.flushSync(()=>p.actions.closeListbox()),(K=p.state.buttonElement)==null||K.focus({preventScroll:!0});return;case he.Tab:A.preventDefault(),A.stopPropagation(),Le.flushSync(()=>p.actions.closeListbox()),Nm(p.state.buttonElement,A.shiftKey?bt.Previous:bt.Next);break;default:A.key.length===1&&(p.actions.search(A.key),P.setTimeout(()=>p.actions.clearSearch(),350));break}}),G=we(p,A=>{var B;return(B=A.buttonElement)==null?void 0:B.id}),j=d.useMemo(()=>({open:m===Ke.Open}),[m]),F=Dr(u?C():{},{id:t,ref:q,"aria-activedescendant":we(p,p.selectors.activeDescendantId),"aria-multiselectable":h.mode===_t.Multi?!0:void 0,"aria-labelledby":G,"aria-orientation":h.orientation,onKeyDown:W,role:"listbox",tabIndex:m===Ke.Open?0:void 0,style:{...l.style,...V,"--button-width":si(v,!0).width},...ki(T)}),ne=Te(),U=d.useMemo(()=>h.mode===_t.Multi?h:{...h,isSelected:k},[h,k]);return d.createElement(Wi,{enabled:a?n.static||x:!1,ownerDocument:E},d.createElement(jo.Provider,{value:U},ne({ourProps:F,theirProps:l,slot:j,defaultTag:$b,features:Lb,visible:M,name:"Listbox.Options"})))}let Ab="div";function Rb(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(Jc)===!0,l=jr("Listbox.Option"),u=qi("Listbox.Option"),c=we(u,M=>u.selectors.isActive(M,t)),f=l.isSelected(a),h=d.useRef(null),p=kb(h),m=Yt({disabled:o,value:a,domRef:h,get textValue(){return p()}}),v=We(r,h,M=>{M?l.listRef.current.set(t,M):l.listRef.current.delete(t)}),g=we(u,M=>u.selectors.shouldScrollIntoView(M,t));fe(()=>{if(g)return ut().requestAnimationFrame(()=>{var M,L;(L=(M=h.current)==null?void 0:M.scrollIntoView)==null||L.call(M,{block:"nearest"})})},[g,h]),fe(()=>{if(!s)return u.actions.registerOption(t,m),()=>u.actions.unregisterOption(t)},[m,t,s]);let y=Z(M=>{var L;if(o)return M.preventDefault();u.actions.onChange(a),l.mode===_t.Single&&(Le.flushSync(()=>u.actions.closeListbox()),(L=u.state.buttonElement)==null||L.focus({preventScroll:!0}))}),E=Z(()=>{if(o)return u.actions.goToOption({focus:se.Nothing});u.actions.goToOption({focus:se.Specific,id:t})}),w=Tu(),S=Z(M=>w.update(M)),x=Z(M=>{w.wasMoved(M)&&(o||c&&u.state.activationTrigger===Wo.Pointer||u.actions.goToOption({focus:se.Specific,id:t},Wo.Pointer))}),T=Z(M=>{w.wasMoved(M)&&(o||c&&u.state.activationTrigger===Wo.Pointer&&u.actions.goToOption({focus:se.Nothing}))}),N=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:y,onFocus:E,onPointerEnter:S,onMouseEnter:S,onPointerMove:x,onMouseMove:x,onPointerLeave:T,onMouseLeave:T},O=Te();return!f&&s?null:O({ourProps:_,theirProps:i,slot:N,defaultTag:Ab,name:"Listbox.Option"})}let Yb=d.Fragment;function Wb(n,r){let{options:e,placeholder:t,...o}=n,a={ref:We(r)},i=jr("ListboxSelectedOption"),s=d.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===_t.Multi&&Array.isArray(i.value)&&i.value.length===0,u=Te();return d.createElement(Jc.Provider,{value:!0},u({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:Yb,name:"ListboxSelectedOption"}))}let jb=_e(Pb),Zc=_e(Nb),Hb=Eo,ed=_e(Fb),td=_e(Rb),Bb=_e(Wb),Vb=Object.assign(jb,{Button:Zc,Label:Hb,Options:ed,Option:td,SelectedOption:Bb});const zb=n=>{const{isOpen:r,setIsOpen:e,onClose:t,title:o,image:a,description:i,confirm:s,cancel:l,disableOutsideClick:u,className:c}=n,f=()=>{u||t()};return R.jsx(jc,{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:R.jsxs(Wr,{onClose:f,className:"relative z-50 focus:outline-hidden",children:[R.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),R.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:R.jsxs(Bc,{className:ot(c==null?void 0:c.popup,"ja-break-all flex w-[90vw] max-w-[300px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]"),children:[R.jsxs("div",{className:"flex flex-col gap-[8px]",children:[o&&R.jsx(Vc,{className:ot(c==null?void 0:c.title,"global-break-all text-title-small font-bold text-black"),children:o}),a&&R.jsx("img",{className:c==null?void 0:c.image,src:a.url,alt:a.alt}),i&&i!==""&&R.jsx(Zl,{className:ot(c==null?void 0:c.description,"text-petnow-grey-tertiary text-body-large popup-scrollbar max-h-[314px] overflow-y-auto break-all"),children:i})]}),R.jsxs("div",{className:"flex flex-col gap-[8px]",children:[s&&R.jsx("button",{className:"bg-petnow-orange-primary text-label-medium w-full cursor-pointer rounded-[12px] py-[12px] font-bold text-white transition duration-200 active:brightness-90 sm:hover:brightness-90",onClick:s.onClick,children:s.text}),l&&R.jsx("button",{onClick:()=>e(!1),className:"bg-background-tertiary text-petnow-grey-tertiary text-label-medium w-full cursor-pointer rounded-[12px] py-[12px] font-bold transition duration-200 active:brightness-90 sm:hover:brightness-90",children:l.text})]})]})})]})})},qb=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>R.jsxs("label",{htmlFor:r,className:"relative inline-flex cursor-pointer items-center",children:[R.jsx("input",{type:"checkbox",disabled:o,checked:a,id:r,name:e,className:"peer sr-only",onChange:t}),R.jsx("div",{className:ot(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 nd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},rd=d.createContext&&d.createContext(nd),Ub=["attr","size","title"];function Qb(n,r){if(n==null)return{};var e=Gb(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 Gb(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 Ho(){return Ho=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},Ho.apply(this,arguments)}function od(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 Bo(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?od(Object(e),!0).forEach(function(t){Kb(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):od(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function Kb(n,r,e){return r=Xb(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function Xb(n){var r=Jb(n,"string");return typeof r=="symbol"?r:r+""}function Jb(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 ad(n){return n&&n.map((r,e)=>d.createElement(r.tag,Bo({key:e},r.attr),ad(r.child)))}function Hr(n){return r=>d.createElement(Zb,Ho({attr:Bo({},n.attr)},r),ad(n.child))}function Zb(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=Qb(n,Ub),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",Ho({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:Bo(Bo({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 rd!==void 0?d.createElement(rd.Consumer,null,e=>r(e)):r(nd)}function ey(n){return Hr({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 id(n){return Hr({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 ty=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return R.jsxs(R.Fragment,{children:[R.jsx(ny,{isOpen:o,setIsOpen:a,termImageUrl:t}),R.jsxs("div",{className:"inline-flex items-center",children:[R.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[R.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)}}),R.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:R.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:R.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&&R.jsxs("div",{className:"flex items-center",children:[R.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),R.jsx(ey,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},ny=({isOpen:n,setIsOpen:r,termImageUrl:e})=>R.jsxs(Wr,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[R.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),R.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:R.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:R.jsxs(Wr.Panel,{className:"mx-auto flex max-w-sm flex-col items-center rounded-sm bg-white",children:[R.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:R.jsx(id,{size:20,className:"mr-2",onClick:()=>r(!1)})}),R.jsx("img",{src:e,alt:"약관동의 이미지"})]})})})]});var Ui=function(n,r){return Ui=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])},Ui(n,r)},Xn=function(){return Xn=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},Xn.apply(this,arguments)};function ry(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 Qi,sd="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",oy=(Qi=null,function(n){return n===void 0&&(n=sd),Qi||(Qi=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)}))}),ay=d.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),iy={width:"100%",height:400},sy={scriptUrl:sd,errorMessage:ay,autoClose:!0},ly=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=ry(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new t(Xn(Xn({},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}Ui(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||(oy(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:Xn(Xn({},iy),o)},l&&a)},r.defaultProps=sy,r}(d.Component);const uy=({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:R.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return R.jsxs(R.Fragment,{children:[R.jsx(cy,{isOpen:i,setIsOpen:s,handleComplete:l}),R.jsxs("div",{className:"text-petnow-grey-tertiary",children:[R.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),R.jsxs("div",{className:"relative flex flex-col",children:[R.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()}),R.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)})]})]})]})},cy=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return R.jsx(Wr,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:R.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:R.jsx(Wr.Panel,{children:R.jsxs("div",{children:[R.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>e(!1),children:R.jsx(id,{size:24,onClick:()=>e(!1)})}),R.jsx(ly,{onComplete:t,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})};function dy(n){return Hr({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 fy(n){return Hr({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 py=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return R.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:[R.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:[R.jsxs("p",{className:ot("mr-4 text-lg font-medium md:text-xl",e),children:[R.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?R.jsx(fy,{className:"text-petnow-orange-primary min-w-6",size:24}):R.jsx(dy,{className:"text-petnow-orange-primary min-w-6",size:24})]}),R.jsx("p",{className:ot(`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})]})},ld=6048e5,hy=864e5,Vo=6e4,zo=36e5,my=1e3,ud=Symbol.for("constructDateFrom");function De(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&ud in n?n[ud](r):n instanceof Date?new n.constructor(r):new Date(r)}function ae(n,r){return De(r||n,n)}function yt(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 wt(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 cd(n,r,e){return De(n,+ae(n)+r)}function vy(n,r,e){return cd(n,r*zo)}let gy={};function _n(){return gy}function Ut(n,r){var s,l,u,c;const e=_n(),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 Jn(n,r){return Ut(n,{...r,weekStartsOn:1})}function dd(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=Jn(o),i=De(e,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=Jn(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function qo(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 Qt(n,...r){const e=De.bind(null,r.find(t=>typeof t=="object"));return r.map(e)}function On(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]=Qt(e==null?void 0:e.in,n,r),a=On(t),i=On(o),s=+a-qo(a),l=+i-qo(i);return Math.round((s-l)/hy)}function by(n,r){const e=dd(n,r),t=De(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),Jn(t)}function Gi(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setTime(t.getTime()+r*Vo),t}function Ki(n,r,e){return wt(n,r*3,e)}function yy(n,r,e){return cd(n,r*1e3)}function Uo(n,r,e){return yt(n,r*7,e)}function Gt(n,r,e){return wt(n,r*12,e)}function fd(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 pd(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 wy(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return+On(t)==+On(o)}function Kt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Qo(n){return!(!Kt(n)&&typeof n!="number"||isNaN(+ae(n)))}function Go(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function Mn(n,r){const e=ae(n,r==null?void 0:r.in);return Math.trunc(e.getMonth()/3)+1}function Ko(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=Mn(t)-Mn(o);return a*4+i}function Xo(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return t.getFullYear()-o.getFullYear()}function xy(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r),a=hd(t,o),i=Math.abs(Zn(t,o));t.setDate(t.getDate()-a*i);const s=+(hd(t,o)===-a),l=a*(i-s);return l===0?0:l}function hd(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 md(n,r){const e=ae(n,r==null?void 0:r.in);return e.setHours(23,59,59,999),e}function vd(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 Xi(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 gd(n,r){const e=ae(n,r==null?void 0:r.in);return e.setDate(1),e.setHours(0,0,0,0),e}function bd(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 Ey(n,r){var s,l;const e=_n(),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 Dy={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"}},Sy=(n,r,e)=>{let t;const o=Dy[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 er(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const ky={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Cy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_y={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Oy={date:er({formats:ky,defaultWidth:"full"}),time:er({formats:Cy,defaultWidth:"full"}),dateTime:er({formats:_y,defaultWidth:"full"})},My={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ty=(n,r,e,t)=>My[n];function Ot(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 Py={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ny={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"]},$y={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"]},Ly={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"}},Fy={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"}},Ay={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:Ot({values:Py,defaultWidth:"wide"}),quarter:Ot({values:Iy,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ot({values:Ny,defaultWidth:"wide"}),day:Ot({values:$y,defaultWidth:"wide"}),dayPeriod:Ot({values:Ly,defaultWidth:"wide",formattingValues:Fy,defaultFormattingWidth:"wide"})};function Mt(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)?Yy(s,f=>f.test(i)):Ry(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 Ry(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function Yy(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function yd(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 Wy=/^(\d+)(th|st|nd|rd)?/i,jy=/\d+/i,Hy={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},By={any:[/^b/i,/^(a|c)/i]},Vy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zy={any:[/1/i,/2/i,/3/i,/4/i]},qy={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]},Qy={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},Gy={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]},Ky={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},Xy={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}},Jy={ordinalNumber:yd({matchPattern:Wy,parsePattern:jy,valueCallback:n=>parseInt(n,10)}),era:Mt({matchPatterns:Hy,defaultMatchWidth:"wide",parsePatterns:By,defaultParseWidth:"any"}),quarter:Mt({matchPatterns:Vy,defaultMatchWidth:"wide",parsePatterns:zy,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Mt({matchPatterns:qy,defaultMatchWidth:"wide",parsePatterns:Uy,defaultParseWidth:"any"}),day:Mt({matchPatterns:Qy,defaultMatchWidth:"wide",parsePatterns:Gy,defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:Ky,defaultMatchWidth:"any",parsePatterns:Xy,defaultParseWidth:"any"})},wd={code:"en-US",formatDistance:Sy,formatLong:Oy,formatRelative:Ty,localize:Ay,match:Jy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Zy(n,r){const e=ae(n,r==null?void 0:r.in);return Zn(e,Jo(e))+1}function Ji(n,r){const e=ae(n,r==null?void 0:r.in),t=+Jn(e)-+by(e);return Math.round(t/ld)+1}function Zi(n,r){var c,f,h,p;const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=_n(),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=Ut(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=Ut(l,r);return+e>=+s?t+1:+e>=+u?t:t-1}function ew(n,r){var s,l,u,c;const e=_n(),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=Zi(n,r),a=De((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),Ut(a,r)}function xd(n,r){const e=ae(n,r==null?void 0:r.in),t=+Ut(e,r)-+ew(e,r);return Math.round(t/ld)+1}function Se(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const hn={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)}},tr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ed={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 hn.y(n,r)},Y:function(n,r,e,t){const o=Zi(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=dd(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 hn.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=xd(n,t);return r==="wo"?e.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(n,r,e){const t=Ji(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"}):hn.d(n,r)},D:function(n,r,e){const t=Zy(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=tr.noon:t===0?o=tr.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=tr.evening:t>=12?o=tr.afternoon:t>=4?o=tr.morning:o=tr.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 hn.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):hn.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"}):hn.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):hn.s(n,r)},S:function(n,r){return hn.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return Sd(t);case"XXXX":case"XX":return Tn(t);case"XXXXX":case"XXX":default:return Tn(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return Sd(t);case"xxxx":case"xx":return Tn(t);case"xxxxx":case"xxx":default:return Tn(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Dd(t,":");case"OOOO":default:return"GMT"+Tn(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Dd(t,":");case"zzzz":default:return"GMT"+Tn(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 Dd(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 Sd(n,r){return n%60===0?(n>0?"-":"+")+Se(Math.abs(n)/60,2):Tn(n,r)}function Tn(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 kd=(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"})}},Cd=(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"})}},es={p:Cd,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return kd(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}}",kd(t,r)).replace("{{time}}",Cd(o,r))}},tw=/^D+$/,nw=/^Y+$/,rw=["D","DD","YY","YYYY"];function ow(n){return tw.test(n)}function aw(n){return nw.test(n)}function iw(n,r,e){const t=sw(n,r,e);if(console.warn(t),rw.includes(n))throw new RangeError(t)}function sw(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 lw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cw=/^'([^]*?)'?$/,dw=/''/g,fw=/[a-zA-Z]/;function _d(n,r,e){var c,f,h,p,m,v,g,y;const t=_n(),o=(e==null?void 0:e.locale)??t.locale??wd,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??((y=(g=t.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=ae(n,e==null?void 0:e.in);if(!Qo(s))throw new RangeError("Invalid time value");let l=r.match(uw).map(E=>{const w=E[0];if(w==="p"||w==="P"){const S=es[w];return S(E,o.formatLong)}return E}).join("").match(lw).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const w=E[0];if(w==="'")return{isToken:!1,value:pw(E)};if(Ed[w])return{isToken:!0,value:E};if(w.match(fw))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)&&aw(w)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&ow(w))&&iw(w,r,String(n));const S=Ed[w[0]];return S(s,w,o.localize,u)}).join("")}function pw(n){const r=n.match(cw);return r?r[1].replace(dw,"'"):n}function Od(n,r){return ae(n,r==null?void 0:r.in).getDate()}function hw(n,r){return ae(n,r==null?void 0:r.in).getDay()}function mw(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 vw(){return Object.assign({},_n())}function Xt(n,r){return ae(n,r==null?void 0:r.in).getHours()}function gw(n,r){const e=ae(n,r==null?void 0:r.in).getDay();return e===0?7:e}function Jt(n,r){return ae(n,r==null?void 0:r.in).getMinutes()}function Je(n,r){return ae(n,r==null?void 0:r.in).getMonth()}function mn(n){return ae(n).getSeconds()}function ts(n){return+ae(n)}function le(n,r){return ae(n,r==null?void 0:r.in).getFullYear()}function vn(n,r){return+ae(n)>+ae(r)}function Pn(n,r){return+ae(n)<+ae(r)}function bw(n,r){return+ae(n)==+ae(r)}function yw(n,r){const e=ww(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 ww(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const xw=10;class Md{constructor(){te(this,"subPriority",0)}validate(r,e){return!0}}class Ew extends Md{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 Dw extends Md{constructor(e,t){super();te(this,"priority",xw);te(this,"subPriority",-1);this.context=e||(o=>De(t,o))}set(e,t){return t.timestampIsSet?e:De(e,yw(e,this.context))}}class ge{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new Ew(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class Sw extends ge{constructor(){super(...arguments);te(this,"priority",140);te(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 Ae={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}/},Tt={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 Re(n,r){return n&&{value:r(n.value),rest:n.rest}}function Pe(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*zo+a*Vo+i*my),rest:r.slice(e[0].length)}}function Td(n){return Pe(Ae.anyDigitsSigned,n)}function $e(n,r){switch(n){case 1:return Pe(Ae.singleDigit,r);case 2:return Pe(Ae.twoDigits,r);case 3:return Pe(Ae.threeDigits,r);case 4:return Pe(Ae.fourDigits,r);default:return Pe(new RegExp("^\\d{1,"+n+"}"),r)}}function Zo(n,r){switch(n){case 1:return Pe(Ae.singleDigitSigned,r);case 2:return Pe(Ae.twoDigitsSigned,r);case 3:return Pe(Ae.threeDigitsSigned,r);case 4:return Pe(Ae.fourDigitsSigned,r);default:return Pe(new RegExp("^-?\\d{1,"+n+"}"),r)}}function ns(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 Pd(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 Id(n){return n%400===0||n%4===0&&n%100!==0}class kw extends ge{constructor(){super(...arguments);te(this,"priority",130);te(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 Re($e(4,e),a);case"yo":return Re(o.ordinalNumber(e,{unit:"year"}),a);default:return Re($e(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=Pd(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 Cw extends ge{constructor(){super(...arguments);te(this,"priority",130);te(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 Re($e(4,e),a);case"Yo":return Re(o.ordinalNumber(e,{unit:"year"}),a);default:return Re($e(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=Zi(e,a);if(o.isTwoDigitYear){const l=Pd(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Ut(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),Ut(e,a)}}class _w extends ge{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return Zo(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),Jn(a)}}class Ow extends ge{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return Zo(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Mw extends ge{constructor(){super(...arguments);te(this,"priority",120);te(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 $e(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 Tw extends ge{constructor(){super(...arguments);te(this,"priority",120);te(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 $e(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 Pw extends ge{constructor(){super(...arguments);te(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);te(this,"priority",110)}parse(e,t,o){const a=i=>i-1;switch(t){case"M":return Re(Pe(Ae.month,e),a);case"MM":return Re($e(2,e),a);case"Mo":return Re(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 Iw extends ge{constructor(){super(...arguments);te(this,"priority",110);te(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 Re(Pe(Ae.month,e),a);case"LL":return Re($e(2,e),a);case"Lo":return Re(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 Nw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=xd(t,e)-r;return t.setDate(t.getDate()-o*7),ae(t,e==null?void 0:e.in)}class $w extends ge{constructor(){super(...arguments);te(this,"priority",100);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,o){switch(t){case"w":return Pe(Ae.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return Ut(Nw(e,o,a),a)}}function Lw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Ji(t,e)-r;return t.setDate(t.getDate()-o*7),t}class Fw extends ge{constructor(){super(...arguments);te(this,"priority",100);te(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 Pe(Ae.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return Jn(Lw(e,o))}}const Aw=[31,28,31,30,31,30,31,31,30,31,30,31],Rw=[31,29,31,30,31,30,31,31,30,31,30,31];class Yw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(this,"subPriority",1);te(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"d":return Pe(Ae.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=Id(o),i=e.getMonth();return a?t>=1&&t<=Rw[i]:t>=1&&t<=Aw[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class Ww extends ge{constructor(){super(...arguments);te(this,"priority",90);te(this,"subpriority",1);te(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 Pe(Ae.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}}validate(e,t){const o=e.getFullYear();return Id(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 rs(n,r,e){var f,h,p,m;const t=_n(),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 yt(a,c,e)}class jw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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=rs(e,o,a),e.setHours(0,0,0,0),e}}class Hw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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 Re($e(t.length,e),i);case"eo":return Re(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=rs(e,o,a),e.setHours(0,0,0,0),e}}class Bw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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 Re($e(t.length,e),i);case"co":return Re(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=rs(e,o,a),e.setHours(0,0,0,0),e}}function Vw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=gw(t,e),a=r-o;return yt(t,a,e)}class zw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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 $e(t.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return Re(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 Re(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Re(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Re(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=Vw(e,o),e.setHours(0,0,0,0),e}}class qw extends ge{constructor(){super(...arguments);te(this,"priority",80);te(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(ns(o),0,0,0),e}}class Uw extends ge{constructor(){super(...arguments);te(this,"priority",80);te(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(ns(o),0,0,0),e}}class Qw extends ge{constructor(){super(...arguments);te(this,"priority",80);te(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(ns(o),0,0,0),e}}class Gw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return Pe(Ae.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 Kw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,o){switch(t){case"H":return Pe(Ae.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class Xw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return Pe(Ae.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 Jw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,o){switch(t){case"k":return Pe(Ae.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 Zw extends ge{constructor(){super(...arguments);te(this,"priority",60);te(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return Pe(Ae.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class e0 extends ge{constructor(){super(...arguments);te(this,"priority",50);te(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return Pe(Ae.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class t0 extends ge{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(e,t){const o=a=>Math.trunc(a*Math.pow(10,-t.length+3));return Re($e(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class n0 extends ge{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return Pt(Tt.basicOptionalMinutes,e);case"XX":return Pt(Tt.basic,e);case"XXXX":return Pt(Tt.basicOptionalSeconds,e);case"XXXXX":return Pt(Tt.extendedOptionalSeconds,e);case"XXX":default:return Pt(Tt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-qo(e)-o)}}class r0 extends ge{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return Pt(Tt.basicOptionalMinutes,e);case"xx":return Pt(Tt.basic,e);case"xxxx":return Pt(Tt.basicOptionalSeconds,e);case"xxxxx":return Pt(Tt.extendedOptionalSeconds,e);case"xxx":default:return Pt(Tt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-qo(e)-o)}}class o0 extends ge{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(e){return Td(e)}set(e,t,o){return[De(e,o*1e3),{timestampIsSet:!0}]}}class a0 extends ge{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(e){return Td(e)}set(e,t,o){return[De(e,o),{timestampIsSet:!0}]}}const i0={G:new Sw,y:new kw,Y:new Cw,R:new _w,u:new Ow,Q:new Mw,q:new Tw,M:new Pw,L:new Iw,w:new $w,I:new Fw,d:new Yw,D:new Ww,E:new jw,e:new Hw,c:new Bw,i:new zw,a:new qw,b:new Uw,B:new Qw,h:new Gw,H:new Kw,K:new Xw,k:new Jw,m:new Zw,s:new e0,S:new t0,X:new n0,x:new r0,t:new o0,T:new a0},s0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,l0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u0=/^'([^]*?)'?$/,c0=/''/g,d0=/\S/,f0=/[a-zA-Z]/;function p0(n,r,e,t){var g,y,E,w,S,x,T,N;const o=()=>De((t==null?void 0:t.in)||e,NaN),a=vw(),i=(t==null?void 0:t.locale)??a.locale??wd,s=(t==null?void 0:t.firstWeekContainsDate)??((y=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:y.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)??((x=(S=t==null?void 0:t.locale)==null?void 0:S.options)==null?void 0:x.weekStartsOn)??a.weekStartsOn??((N=(T=a.locale)==null?void 0:T.options)==null?void 0:N.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 Dw(t==null?void 0:t.in,e)],f=r.match(l0).map(_=>{const O=_[0];if(O in es){const M=es[O];return M(_,i.formatLong)}return _}).join("").match(s0),h=[];for(let _ of f){const O=_[0],M=i0[O];if(M){const{incompatibleTokens:L}=M;if(Array.isArray(L)){const k=h.find($=>L.includes($.token)||$.token===O);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${_}\` at the same time`)}else if(M.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);h.push({token:O,fullToken:_});const b=M.run(n,_,i.match,u);if(!b)return o();c.push(b.setter),n=b.rest}else{if(O.match(f0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");if(_==="''"?_="'":O==="'"&&(_=h0(_)),n.indexOf(_)===0)n=n.slice(_.length);else return o()}}if(n.length>0&&d0.test(n))return o();const p=c.map(_=>_.priority).sort((_,O)=>O-_).filter((_,O,M)=>M.indexOf(_)===O).map(_=>c.filter(O=>O.priority===_).sort((O,M)=>M.subPriority-O.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 O=_.set(m,v,u);Array.isArray(O)?(m=O[0],Object.assign(v,O[1])):m=O}return m}function h0(n){return n.match(u0)[1].replace(c0,"'")}function m0(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function v0(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return+Xi(t)==+Xi(o)}function g0(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()}function Br(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 b0(n,r,e){return yt(n,-1,e)}function y0(n,r){const e=()=>De(r==null?void 0:r.in,NaN),o=D0(n);let a;if(o.date){const u=S0(o.date,2);a=k0(u.restDateString,u.year)}if(!a||isNaN(+a))return e();const i=+a;let s=0,l;if(o.time&&(s=C0(o.time),isNaN(s)))return e();if(o.timezone){if(l=_0(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 ea={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},w0=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,x0=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,E0=/^([+-])(\d{2})(?::?(\d{2}))?$/;function D0(n){const r={},e=n.split(ea.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],ea.timeZoneDelimiter.test(r.date)&&(r.date=n.split(ea.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=ea.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function S0(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 k0(n,r){if(r===null)return new Date(NaN);const e=n.match(w0);if(!e)return new Date(NaN);const t=!!e[4],o=Vr(e[1]),a=Vr(e[2])-1,i=Vr(e[3]),s=Vr(e[4]),l=Vr(e[5])-1;if(t)return I0(r,s,l)?O0(r,s,l):new Date(NaN);{const u=new Date(0);return!T0(r,a,i)||!P0(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function Vr(n){return n?parseInt(n):1}function C0(n){const r=n.match(x0);if(!r)return NaN;const e=os(r[1]),t=os(r[2]),o=os(r[3]);return N0(e,t,o)?e*zo+t*Vo+o*1e3:NaN}function os(n){return n&&parseFloat(n.replace(",","."))||0}function _0(n){if(n==="Z")return 0;const r=n.match(E0);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return $0(t,o)?e*(t*zo+o*Vo):NaN}function O0(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 M0=[31,null,31,30,31,30,31,31,30,31,30,31];function Nd(n){return n%400===0||n%4===0&&n%100!==0}function T0(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(M0[r]||(Nd(n)?29:28))}function P0(n,r){return r>=1&&r<=(Nd(n)?366:365)}function I0(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function N0(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function $0(n,r){return r>=0&&r<=59}function pt(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=mw(i);return t.setMonth(r,Math.min(a,s)),t}function ta(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setHours(r),t}function na(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setMinutes(r),t}function nr(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return pt(t,t.getMonth()+a*3)}function ra(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setSeconds(r),t}function It(n,r,e){const t=ae(n,e==null?void 0:e.in);return isNaN(+t)?De(n,NaN):(t.setFullYear(r),t)}function In(n,r,e){return wt(n,-r,e)}function $d(n,r,e){return Ki(n,-1,e)}function Ld(n,r,e){return Uo(n,-1,e)}function rr(n,r,e){return Gt(n,-r,e)}const L0={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}}년"}},F0=(n,r,e)=>{let t;const o=L0[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},A0={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},R0={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Y0={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},W0={date:er({formats:A0,defaultWidth:"full"}),time:er({formats:R0,defaultWidth:"full"}),dateTime:er({formats:Y0,defaultWidth:"full"})},j0={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},H0=(n,r,e,t)=>j0[n],B0={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},V0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},z0={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월"]},q0={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:"밤"}},Q0={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:"밤"}},G0={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:Ot({values:B0,defaultWidth:"wide"}),quarter:Ot({values:V0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ot({values:z0,defaultWidth:"wide"}),day:Ot({values:q0,defaultWidth:"wide"}),dayPeriod:Ot({values:U0,defaultWidth:"wide",formattingValues:Q0,defaultFormattingWidth:"wide"})},K0=/^(\d+)(일|번째)?/i,X0=/\d+/i,J0={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},Z0={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},ex={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},tx={any:[/1/i,/2/i,/3/i,/4/i]},nx={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},rx={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},ox={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},ax={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},ix={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},sx={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},lx={ordinalNumber:yd({matchPattern:K0,parsePattern:X0,valueCallback:n=>parseInt(n,10)}),era:Mt({matchPatterns:J0,defaultMatchWidth:"wide",parsePatterns:Z0,defaultParseWidth:"any"}),quarter:Mt({matchPatterns:ex,defaultMatchWidth:"wide",parsePatterns:tx,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Mt({matchPatterns:nx,defaultMatchWidth:"wide",parsePatterns:rx,defaultParseWidth:"any"}),day:Mt({matchPatterns:ox,defaultMatchWidth:"wide",parsePatterns:ax,defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:ix,defaultMatchWidth:"any",parsePatterns:sx,defaultParseWidth:"any"})},ux={code:"ko",formatDistance:F0,formatLong:W0,formatRelative:H0,localize:G0,match:lx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cx(){return typeof window<"u"}function Fd(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function zr(n){return cx()?n instanceof Element||n instanceof Fd(n).Element:!1}function dx(n){return Fd(n).getComputedStyle(n)}var oa=typeof document<"u"?d.useLayoutEffect:d.useEffect;const fx={...H}.useInsertionEffect||(n=>n());function px(n){const r=H.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return fx(()=>{r.current=n}),H.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)},[])}function Ad(n,r,e){let{reference:t,floating:o}=n;const a=it(r),i=_o(r),s=Co(i),l=ft(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(fn(r)){case"start":p[i]-=h*(e&&u?-1:1);break;case"end":p[i]+=h*(e&&u?-1:1);break}return p}const hx=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}=Ad(u,t,l),h=t,p={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:y}=s[v],{x:E,y:w,data:S,reset:x}=await y({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],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):x.rects),{x:c,y:f}=Ad(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function mx(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}=St(r,n),m=Mi(p),g=s[h?f==="floating"?"reference":"floating":f],y=pn(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)),S=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},x=pn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:w,strategy:l}):E);return{top:(y.top-x.top+m.top)/S.y,bottom:(x.bottom-y.bottom+m.bottom)/S.y,left:(y.left-x.left+m.left)/S.x,right:(x.right-y.right+m.right)/S.x}}const vx=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}=St(n,r)||{};if(u==null)return{};const f=Mi(c),h={x:e,y:t},p=_o(o),m=Co(p),v=await i.getDimensions(u),g=p==="y",y=g?"top":"left",E=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=a.reference[m]+a.reference[p]-h[p]-a.floating[m],x=h[p]-a.reference[p],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=T?T[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(T)))&&(N=s.floating[w]||a.floating[m]);const _=S/2-x/2,O=N/2-v[m]/2-1,M=dt(f[y],O),L=dt(f[E],O),b=M,k=N-v[m]-L,$=N/2-v[m]/2+_,Y=_i(b,$,k),I=!l.arrow&&fn(o)!=null&&$!==Y&&a.reference[m]/2-($<b?M:L)-v[m]/2<0,V=I?$<b?$-b:$-k:0;return{[p]:h[p]+V,data:{[p]:Y,centerOffset:$-Y-V,...I&&{alignmentOffset:V}},reset:I}}}),gx=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}=St(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=ft(o),E=it(s),w=ft(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(w||!v?[$r(s)]:Wu(s)),T=m!=="none";!h&&T&&x.push(...Bu(s,v,m,S));const N=[s,...x],_=await mx(r,g),O=[];let M=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&O.push(_[y]),f){const $=Yu(o,i,S);O.push(_[$[0]],_[$[1]])}if(M=[...M,{placement:o,overflows:O}],!O.every($=>$<=0)){var L,b;const $=(((L=a.flip)==null?void 0:L.index)||0)+1,Y=N[$];if(Y)return{data:{index:$,overflows:M},reset:{placement:Y}};let I=(b=M.filter(V=>V.overflows[0]<=0).sort((V,C)=>V.overflows[1]-C.overflows[1])[0])==null?void 0:b.placement;if(!I)switch(p){case"bestFit":{var k;const V=(k=M.filter(C=>{if(T){const q=it(C.placement);return q===E||q==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((C,q)=>C[1]-q[1])[0])==null?void 0:k[0];V&&(I=V);break}case"initialPlacement":I=s;break}if(o!==I)return{reset:{placement:I}}}return{}}}};async function bx(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=ft(e),s=fn(e),l=it(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,f=St(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 yx=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 bx(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}}}}};function Rd(n){const r=He(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Ge(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=qt(e)!==a||qt(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function as(n){return Oe(n)?n:n.contextElement}function or(n){const r=as(n);if(!Ge(r))return Be(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=Rd(r);let i=(a?qt(e.width):e.width)/t,s=(a?qt(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const wx=Be(0);function Yd(n){const r=je(n);return!Ir()||!r.visualViewport?wx:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function xx(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==je(n)?!1:r}function Nn(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=as(n);let i=Be(1);r&&(t?Oe(t)&&(i=or(t)):i=or(n));const s=xx(a,e,t)?Yd(a):Be(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=je(a),p=t&&Oe(t)?je(t):t;let m=h,v=Nr(m);for(;v&&t&&p!==m;){const g=or(v),y=v.getBoundingClientRect(),E=He(v),w=y.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,S=y.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=S,m=je(v),v=Nr(m)}}return pn({width:c,height:f,x:l,y:u})}function is(n,r){const e=un(n).scrollLeft;return r?r.left+e:Nn(qe(n)).left+e}function Wd(n,r,e){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=t.left+r.scrollLeft-(e?0:is(n,t)),a=t.top+r.scrollTop;return{x:o,y:a}}function Ex(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=qe(t),s=r?Sn(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Be(1);const c=Be(0),f=Ge(t);if((f||!f&&!a)&&((zt(t)!=="body"||ln(i))&&(l=un(t)),Ge(t))){const p=Nn(t);u=or(t),c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}const h=i&&!f&&!a?Wd(i,l,!0):Be(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 Dx(n){return Array.from(n.getClientRects())}function Sx(n){const r=qe(n),e=un(n),t=n.ownerDocument.body,o=Ne(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Ne(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+is(n);const s=-e.scrollTop;return He(t).direction==="rtl"&&(i+=Ne(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function kx(n,r){const e=je(n),t=qe(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=Ir();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function Cx(n,r){const e=Nn(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=Ge(n)?or(n):Be(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 jd(n,r,e){let t;if(r==="viewport")t=kx(n,e);else if(r==="document")t=Sx(qe(n));else if(Oe(r))t=Cx(r,e);else{const o=Yd(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return pn(t)}function Hd(n,r){const e=at(n);return e===r||!Oe(e)||Dt(e)?!1:He(e).position==="fixed"||Hd(e,r)}function _x(n,r){const e=r.get(n);if(e)return e;let t=cn(n,[],!1).filter(s=>Oe(s)&&zt(s)!=="body"),o=null;const a=He(n).position==="fixed";let i=a?at(n):n;for(;Oe(i)&&!Dt(i);){const s=He(i),l=Pr(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ln(i)&&!l&&Hd(n,i))?t=t.filter(c=>c!==i):o=s,i=at(i)}return r.set(n,t),t}function Ox(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?Sn(r)?[]:_x(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=jd(r,c,o);return u.top=Ne(f.top,u.top),u.right=dt(f.right,u.right),u.bottom=dt(f.bottom,u.bottom),u.left=Ne(f.left,u.left),u},jd(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Mx(n){const{width:r,height:e}=Rd(n);return{width:r,height:e}}function Tx(n,r,e){const t=Ge(r),o=qe(r),a=e==="fixed",i=Nn(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Be(0);if(t||!t&&!a)if((zt(r)!=="body"||ln(o))&&(s=un(r)),t){const h=Nn(r,!0,a,r);l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}else o&&(l.x=is(o));const u=o&&!t&&!a?Wd(o,s):Be(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 ss(n){return He(n).position==="static"}function Bd(n,r){if(!Ge(n)||He(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return qe(n)===e&&(e=e.ownerDocument.body),e}function Vd(n,r){const e=je(n);if(Sn(n))return e;if(!Ge(n)){let o=at(n);for(;o&&!Dt(o);){if(Oe(o)&&!ss(o))return o;o=at(o)}return e}let t=Bd(n,r);for(;t&&Lu(t)&&ss(t);)t=Bd(t,r);return t&&Dt(t)&&ss(t)&&!Pr(t)?e:t||Fu(n)||e}const Px=async function(n){const r=this.getOffsetParent||Vd,e=this.getDimensions,t=await e(n.floating);return{reference:Tx(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Ix(n){return He(n).direction==="rtl"}const Nx={convertOffsetParentRelativeRectToViewportRelativeRect:Ex,getDocumentElement:qe,getClippingRect:Ox,getOffsetParent:Vd,getElementRects:Px,getClientRects:Dx,getDimensions:Mx,getScale:or,isElement:Oe,isRTL:Ix};function zd(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function $x(n,r){let e=null,t;const o=qe(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=dn(f),v=dn(o.clientWidth-(c+h)),g=dn(o.clientHeight-(f+p)),y=dn(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ne(0,dt(1,l))||1};let S=!0;function x(T){const N=T[0].intersectionRatio;if(N!==l){if(!S)return i();N?i(!1,N):t=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!zd(u,n.getBoundingClientRect())&&i(),S=!1}try{e=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(x,w)}e.observe(n)}return i(!0),a}function Lx(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=as(n),c=o||a?[...u?cn(u):[],...cn(r)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const f=u&&s?$x(u,e):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[E]=y;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?Nn(n):null;l&&g();function g(){const y=Nn(n);v&&!zd(v,y)&&e(),v=y,m=requestAnimationFrame(g)}return e(),()=>{var y;c.forEach(E=>{o&&E.removeEventListener("scroll",e),a&&E.removeEventListener("resize",e)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Fx=yx,Ax=gx,qd=vx,Rx=(n,r,e)=>{const t=new Map,o={platform:Nx,...e},a={...o.platform,_c:t};return hx(n,r,{...o,platform:a})};var aa=typeof document<"u"?d.useLayoutEffect:d.useEffect;function ia(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(!ia(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)&&!ia(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function Ud(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Qd(n,r){const e=Ud(n);return Math.round(r*e)/e}function ls(n){const r=H.useRef(n);return aa(()=>{r.current=n}),r}function Yx(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]=H.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=H.useState(t);ia(h,t)||p(t);const[m,v]=H.useState(null),[g,y]=H.useState(null),E=H.useCallback(C=>{C!==T.current&&(T.current=C,v(C))},[]),w=H.useCallback(C=>{C!==N.current&&(N.current=C,y(C))},[]),S=a||m,x=i||g,T=H.useRef(null),N=H.useRef(null),_=H.useRef(c),O=l!=null,M=ls(l),L=ls(o),b=ls(u),k=H.useCallback(()=>{if(!T.current||!N.current)return;const C={placement:r,strategy:e,middleware:h};L.current&&(C.platform=L.current),Rx(T.current,N.current,C).then(q=>{const P={...q,isPositioned:b.current!==!1};$.current&&!ia(_.current,P)&&(_.current=P,cr.flushSync(()=>{f(P)}))})},[h,r,e,L,b]);aa(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[u]);const $=H.useRef(!1);aa(()=>($.current=!0,()=>{$.current=!1}),[]),aa(()=>{if(S&&(T.current=S),x&&(N.current=x),S&&x){if(M.current)return M.current(S,x,k);k()}},[S,x,k,M,O]);const Y=H.useMemo(()=>({reference:T,floating:N,setReference:E,setFloating:w}),[E,w]),I=H.useMemo(()=>({reference:S,floating:x}),[S,x]),V=H.useMemo(()=>{const C={position:e,left:0,top:0};if(!I.floating)return C;const q=Qd(I.floating,c.x),P=Qd(I.floating,c.y);return s?{...C,transform:"translate("+q+"px, "+P+"px)",...Ud(I.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:q,top:P}},[e,s,I.floating,c.x,c.y]);return H.useMemo(()=>({...c,update:k,refs:Y,elements:I,floatingStyles:V}),[c,k,Y,I,V])}const Wx=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?qd({element:t.current,padding:o}).fn(e):{}:t?qd({element:t,padding:o}).fn(e):{}}}},jx=(n,r)=>({...Fx(n),options:[n,r]}),Hx=(n,r)=>({...Ax(n),options:[n,r]}),Bx=(n,r)=>({...Wx(n),options:[n,r]}),Vx={...H};let Gd=!1,zx=0;const Kd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zx++;function qx(){const[n,r]=H.useState(()=>Gd?Kd():void 0);return oa(()=>{n==null&&r(Kd())},[]),H.useEffect(()=>{Gd=!0},[]),n}const Xd=Vx.useId||qx;let qr;process.env.NODE_ENV!=="production"&&(qr=new Set);function Ux(){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=qr)!=null&&n.has(o))){var a;(a=qr)==null||a.add(o),console.warn(o)}}function Qx(){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=qr)!=null&&n.has(o))){var a;(a=qr)==null||a.add(o),console.error(o)}}const Gx=H.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||Ux("The `ref` prop is required for `FloatingArrow`."));const y=Xd(),[E,w]=H.useState(!1);if(oa(()=>{if(!o)return;dx(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[S,x]=t.split("-"),T=S==="top"||S==="bottom";let N=f;(T&&i!=null&&i.x||!T&&i!=null&&i.y)&&(N=null);const _=c*2,O=_/2,M=s/2*(u/-8+1),L=l/2*u/4,b=!!p,k=N&&x==="end"?"bottom":"top";let $=N&&x==="end"?"right":"left";N&&E&&($=x==="end"?"left":"right");const Y=(a==null?void 0:a.x)!=null?N||a.x:"",I=(a==null?void 0:a.y)!=null?N||a.y:"",V=p||"M0,0"+(" H"+s)+(" L"+(s-M)+","+(l-L))+(" Q"+s/2+","+l+" "+M+","+(l-L))+" Z",C={top:b?"rotate(180deg)":"",left:b?"rotate(90deg)":"rotate(-90deg)",bottom:b?"":"rotate(180deg)",right:b?"rotate(-90deg)":"rotate(90deg)"}[S];return R.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",[$]:Y,[k]:I,[S]:T||b?"100%":"calc(100% - "+_/2+"px)",transform:[C,m].filter(q=>!!q).join(" "),...v},children:[_>0&&R.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:h,strokeWidth:_+(p?0:1),d:V}),R.jsx("path",{stroke:_&&!p?g.fill:"none",d:V}),R.jsx("clipPath",{id:y,children:R.jsx("rect",{x:-O,y:O*(b?-1:1),width:s+_,height:s})})]})});function Kx(){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 Xx=H.createContext(null),Jx=H.createContext(null),Zx=()=>{var n;return((n=H.useContext(Xx))==null?void 0:n.id)||null},eE=()=>H.useContext(Jx);function tE(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Xd(),a=H.useRef({}),[i]=H.useState(()=>Kx()),s=Zx()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!zr(p)&&Qx("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]=H.useState(t.reference),c=px((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=H.useMemo(()=>({setPositionReference:u}),[]),h=H.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return H.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function nE(n){n===void 0&&(n={});const{nodeId:r}=n,e=tE({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=H.useState(null),[s,l]=H.useState(null),c=(o==null?void 0:o.domReference)||a,f=H.useRef(null),h=eE();oa(()=>{c&&(f.current=c)},[c]);const p=Yx({...n,elements:{...o,...s&&{reference:s}}}),m=H.useCallback(w=>{const S=zr(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(S),p.refs.setReference(S)},[p.refs]),v=H.useCallback(w=>{(zr(w)||w===null)&&(f.current=w,i(w)),(zr(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!zr(w))&&p.refs.setReference(w)},[p.refs]),g=H.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),y=H.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=H.useMemo(()=>({...p,...t,refs:g,elements:y,nodeId:r}),[p,g,y,r,t]);return oa(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(S=>S.id===r);w&&(w.context=E)}),H.useMemo(()=>({...p,context:E,refs:g,elements:y}),[p,g,y,E])}/*!
|
|
75
|
+
*/var ku;function Lm(){return ku||(ku=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;bi.useSyncExternalStoreWithSelector=function(l,u,c,f,p){var h=o(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=i(function(){function g(x){if(!y){if(y=!0,D=x,x=f(x),p!==void 0&&m.hasValue){var T=m.value;if(p(T,x))return w=T}return w=x}if(T=w,e(D,x))return T;var $=f(x);return p!==void 0&&p(T,$)?(D=x,T):(D=x,w=$)}var y=!1,D,w,S=c===void 0?null:c;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,c,f,p]);var v=t(l,h[0],h[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())}()),bi}var Cu;function Fm(){return Cu||(Cu=1,process.env.NODE_ENV==="production"?_o.exports=$m():_o.exports=Lm()),_o.exports}var Am=Fm();function ge(n,r,e=xu){return Am.useSyncExternalStoreWithSelector(ee(t=>n.subscribe(Rm,t)),ee(()=>n.state),ee(()=>n.state),ee(r),e)}function Rm(n){return n}function Tr(n,r){let e=d.useId(),t=zn.get(r),[o,a]=ge(t,d.useCallback(i=>[t.selectors.isTop(i,e),t.selectors.inStack(i,e)],[t,e]));return be(()=>{if(n)return t.actions.push(e),()=>t.actions.pop(e)},[t,n,e]),n?a?o:!0:!1}let yi=new Map,Ir=new Map;function _u(n){var r;let e=(r=Ir.get(n))!=null?r:0;return Ir.set(n,e+1),e!==0?()=>Ou(n):(yi.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Ou(n))}function Ou(n){var r;let e=(r=Ir.get(n))!=null?r:1;if(e===1?Ir.delete(n):Ir.set(n,e-1),e!==1)return;let t=yi.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,yi.delete(n))}function wi(n,{allowed:r,disallowed:e}={}){let t=Tr(n,"inert-others");be(()=>{var o,a;if(!t)return;let i=nt();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(_u(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(p=>f.contains(p))||i.add(_u(f));c=c.parentElement}}return i.dispose},[t,r,e])}function xi(n,r,e){let t=jt(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:rt(r)?r:r.current;if(!o)return;let a=nt();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 Oo=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),Ym=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var yt=(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))(yt||{}),Ei=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Ei||{}),jm=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(jm||{});function Pu(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Oo)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function Wm(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Ym)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var Di=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Di||{});function Mu(n,r=0){var e;return n===((e=Dn(n))==null?void 0:e.body)?!1:Le(r,{0(){return n.matches(Oo)},1(){let t=n;for(;t!==null;){if(t.matches(Oo))return!0;t=t.parentElement}return!1}})}var Hm=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Hm||{});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 Vt(n){n==null||n.focus({preventScroll:!0})}let Vm=["textarea","input"].join(",");function Bm(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,Vm))!=null?e:!1}function Si(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 zm(n,r,e=n===null?document.body:bo(n)){return qn(Pu(e),r,{relativeTo:n})}function qn(n,r,{sorted:e=!0,relativeTo:t=null,skipElements:o=[]}={}){let a=Array.isArray(n)?n.length>0?bo(n[0]):document:bo(n),i=Array.isArray(n)?e?Si(n):n:r&64?Wm(n):Pu(n);o.length>0&&i.length>1&&(i=i.filter(h=>!o.some(m=>m!=null&&"current"in m?(m==null?void 0:m.current)===h:m===h))),t=t??(a==null?void 0: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,p;do{if(c>=f||c+f<=0)return 0;let h=l+c;if(r&16)h=(h+f)%f;else{if(h<0)return 3;if(h>=f)return 1}p=i[h],p==null||p.focus(u),c+=s}while(p!==Bl(p));return r&6&&Bm(p)&&p.select(),2}function Tu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function qm(){return/Android/gi.test(window.navigator.userAgent)}function ki(){return Tu()||qm()}function Un(n,r,e,t){let o=jt(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 Iu(n,r,e,t){let o=jt(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 Nu=30;function Ci(n,r,e){let t=jt(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(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(r);for(let f of c)if(f!==null&&(f.contains(u)||s.composed&&s.composedPath().includes(f)))return;return!Mu(u,Di.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t.current(s,u)},[t,r]),a=d.useRef(null);Un(n,"pointerdown",s=>{var l,u;ki()||(a.current=((u=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:u[0])||s.target)},!0),Un(n,"pointerup",s=>{if(ki()||!a.current)return;let l=a.current;return a.current=null,o(s,()=>l)},!0);let i=d.useRef({x:0,y:0});Un(n,"touchstart",s=>{i.current.x=s.touches[0].clientX,i.current.y=s.touches[0].clientY},!0),Un(n,"touchend",s=>{let l={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=Nu||Math.abs(l.y-i.current.y)>=Nu))return o(s,()=>Ht(s.target)?s.target:null)},!0),Iu(n,"blur",s=>o(s,()=>em(window.document.activeElement)?window.document.activeElement:null),!0)}function Sn(...n){return d.useMemo(()=>Dn(...n),[...n])}var Um=(n=>(n[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n))(Um||{});const Bt={Ignore:{kind:0},Select:n=>({kind:1,target:n}),Close:{kind:2}},Qm=200,$u=5;function Lu(n,{trigger:r,action:e,close:t,select:o}){let a=d.useRef(null),i=d.useRef(null),s=d.useRef(null);Un(n&&r!==null,"pointerdown",l=>{Zl(l==null?void 0:l.target)&&r!=null&&r.contains(l.target)&&(i.current=l.x,s.current=l.y,a.current=l.timeStamp)}),Un(n&&r!==null,"pointerup",l=>{var u,c;let f=a.current;if(f===null||(a.current=null,!Ht(l.target))||Math.abs(l.x-((u=i.current)!=null?u:l.x))<$u&&Math.abs(l.y-((c=s.current)!=null?c:l.y))<$u)return;let p=e(l);switch(p.kind){case 0:return;case 1:{l.timeStamp-f>Qm&&(o(p.target),t());break}case 2:{t();break}}},{capture:!0})}function _i(n,r,e,t){let o=jt(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 Fu(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return _i(n,"blur",e=>{let t=e.target;Do(t)&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),ee(()=>{if(!yo(n)&&Do(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 Au(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 Gm(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function Km(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 Xm(){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 Jm(){return Tu()?{before({doc:n,d:r,meta:e}){function t(o){for(let a of e().containers)for(let i of a())if(i.contains(o))return!0;return!1}r.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let s=nt();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(Ht(s.target))try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);Ht(c)&&!t(c)&&(i=c)}catch{}},!0),r.group(s=>{r.addEventListener(n,"touchstart",l=>{if(s.dispose(),Ht(l.target)&&Zh(l.target))if(t(l.target)){let u=l.target;for(;u.parentElement&&t(u.parentElement);)u=u.parentElement;s.style(u,"overscrollBehavior","contain")}else s.style(l.target,"touchAction","none")})}),r.addEventListener(n,"touchmove",s=>{if(Ht(s.target)){if(Do(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 Zm(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function Ru(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let kn=Km(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:nt(),meta:new Set,computedMeta:{}};return t.count++,t.meta.add(r),t.computedMeta=Ru(t.meta),this.set(n,t),this},POP(n,r){let e=this.get(n);return e&&(e.count--,e.meta.delete(r),e.computedMeta=Ru(e.meta)),this},SCROLL_PREVENT(n){let r={doc:n.doc,d:n.d,meta(){return n.computedMeta}},e=[Jm(),Xm(),Zm()];e.forEach(({before:t})=>t==null?void 0:t(r)),e.forEach(({after:t})=>t==null?void 0:t(r))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});kn.subscribe(()=>{let n=kn.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)&&kn.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&kn.dispatch("TEARDOWN",e)}});function ev(n,r,e=()=>({containers:[]})){let t=Gm(kn),o=r?t.get(r):void 0,a=o?o.count>0:!1;return be(()=>{if(!(!r||!n))return kn.dispatch("PUSH",r,e),()=>kn.dispatch("POP",r,e)},[n,r]),a}function Oi(n,r,e=()=>[document.body]){let t=Tr(n,"scroll-lock");ev(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function Yu(n){return[n.screenX,n.screenY]}function ju(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=Yu(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=Yu(r)}}}function tv(n=0){let[r,e]=d.useState(n),t=d.useCallback(l=>e(l),[]),o=d.useCallback(l=>e(u=>u|l),[]),a=d.useCallback(l=>(r&l)===l,[r]),i=d.useCallback(l=>e(u=>u&~l),[]),s=d.useCallback(l=>e(u=>u^l),[]);return{flags:r,setFlag:t,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var Wu,Hu;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Wu=process==null?void 0:process.env)==null?void 0:Wu.NODE_ENV)==="test"&&typeof((Hu=Element==null?void 0:Element.prototype)==null?void 0:Hu.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 nv=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(nv||{});function Pi(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function Mi(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=tv(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),f=Yt();return be(()=>{var p;if(n){if(e&&a(!0),!r){e&&s(3);return}return(p=t==null?void 0:t.start)==null||p.call(t,e),rv(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 h;c.current&&iv(r)||(u.current=!1,l(7),e||a(!1),(h=t==null?void 0:t.end)==null||h.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 rv(n,{prepare:r,run:e,done:t,inFlight:o}){let a=nt();return av(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(ov(n,t))})}),a.dispose}function ov(n,r){var e,t;let o=nt();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 av(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 iv(n){var r,e;return((e=(r=n.getAnimations)==null?void 0:r.call(n))!=null?e:[]).some(t=>t instanceof CSSTransition&&t.playState!=="finished")}function sv(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]),be(()=>{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 Nr(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 zt(n){return Vu(n)?(n.nodeName||"").toLowerCase():"#document"}function We(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function qe(n){var r;return(r=(Vu(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Vu(n){return Po()?n instanceof Node||n instanceof We(n).Node:!1}function Pe(n){return Po()?n instanceof Element||n instanceof We(n).Element:!1}function Ge(n){return Po()?n instanceof HTMLElement||n instanceof We(n).HTMLElement:!1}function Bu(n){return!Po()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof We(n).ShadowRoot}const lv=new Set(["inline","contents"]);function ln(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=He(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!lv.has(o)}const uv=new Set(["table","td","th"]);function zu(n){return uv.has(zt(n))}const cv=[":popover-open",":modal"];function Cn(n){return cv.some(r=>{try{return n.matches(r)}catch{return!1}})}const dv=["transform","translate","scale","rotate","perspective"],fv=["transform","translate","scale","rotate","perspective","filter"],pv=["paint","layout","strict","content"];function $r(n){const r=Lr(),e=Pe(n)?He(n):n;return dv.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)||fv.some(t=>(e.willChange||"").includes(t))||pv.some(t=>(e.contain||"").includes(t))}function qu(n){let r=st(n);for(;Ge(r)&&!St(r);){if($r(r))return r;if(Cn(r))return null;r=st(r)}return null}function Lr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hv=new Set(["html","body","#document"]);function St(n){return hv.has(zt(n))}function He(n){return We(n).getComputedStyle(n)}function un(n){return Pe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function st(n){if(zt(n)==="html")return n;const r=n.assignedSlot||n.parentNode||Bu(n)&&n.host||qe(n);return Bu(r)?r.host:r}function Uu(n){const r=st(n);return St(r)?n.ownerDocument?n.ownerDocument.body:n.body:Ge(r)&&ln(r)?r:Uu(r)}function cn(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=Uu(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=We(o);if(a){const s=Fr(i);return r.concat(i,i.visualViewport||[],ln(o)?o:[],s&&e?cn(s):[])}return r.concat(o,cn(o,[],e))}function Fr(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function mv(){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 ft=Math.min,Ne=Math.max,qt=Math.round,dn=Math.floor,Ve=n=>({x:n,y:n}),vv={left:"right",right:"left",bottom:"top",top:"bottom"},gv={start:"end",end:"start"};function Ti(n,r,e){return Ne(n,ft(r,e))}function kt(n,r){return typeof n=="function"?n(r):n}function pt(n){return n.split("-")[0]}function fn(n){return n.split("-")[1]}function Qu(n){return n==="x"?"y":"x"}function Mo(n){return n==="y"?"height":"width"}const bv=new Set(["top","bottom"]);function lt(n){return bv.has(pt(n))?"y":"x"}function To(n){return Qu(lt(n))}function Gu(n,r,e){e===void 0&&(e=!1);const t=fn(n),o=To(n),a=Mo(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=Ar(i)),[i,Ar(i)]}function Ku(n){const r=Ar(n);return[Ii(n),r,Ii(r)]}function Ii(n){return n.replace(/start|end/g,r=>gv[r])}const Xu=["left","right"],Ju=["right","left"],yv=["top","bottom"],wv=["bottom","top"];function xv(n,r,e){switch(n){case"top":case"bottom":return e?r?Ju:Xu:r?Xu:Ju;case"left":case"right":return r?yv:wv;default:return[]}}function Zu(n,r,e,t){const o=fn(n);let a=xv(pt(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(Ii)))),a}function Ar(n){return n.replace(/left|right|bottom|top/g,r=>vv[r])}function Ev(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ni(n){return typeof n!="number"?Ev(n):{top:n,right:n,bottom:n,left:n}}function pn(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 ec(n,r,e){let{reference:t,floating:o}=n;const a=lt(r),i=To(r),s=Mo(i),l=pt(r),u=a==="y",c=t.x+t.width/2-o.width/2,f=t.y+t.height/2-o.height/2,p=t[s]/2-o[s]/2;let h;switch(l){case"top":h={x:c,y:t.y-o.height};break;case"bottom":h={x:c,y:t.y+t.height};break;case"right":h={x:t.x+t.width,y:f};break;case"left":h={x:t.x-o.width,y:f};break;default:h={x:t.x,y:t.y}}switch(fn(r)){case"start":h[i]-=p*(e&&u?-1:1);break;case"end":h[i]+=p*(e&&u?-1:1);break}return h}const Dv=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}=ec(u,t,l),p=t,h={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:y}=s[v],{x:D,y:w,data:S,reset:x}=await y({x:c,y:f,initialPlacement:t,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:n,floating:r}});c=D??c,f=w??f,h={...h,[g]:{...h[g],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):x.rects),{x:c,y:f}=ec(u,p,l)),v=-1)}return{x:c,y:f,placement:p,strategy:o,middlewareData:h}};async function Io(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:p=!1,padding:h=0}=kt(r,n),m=Ni(h),g=s[p?f==="floating"?"reference":"floating":f],y=pn(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})),D=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)),S=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},x=pn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:D,offsetParent:w,strategy:l}):D);return{top:(y.top-x.top+m.top)/S.y,bottom:(x.bottom-y.bottom+m.bottom)/S.y,left:(y.left-x.left+m.left)/S.x,right:(x.right-y.right+m.right)/S.x}}const Sv=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:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=kt(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=pt(o),D=lt(s),w=pt(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=p||(w||!v?[Ar(s)]:Ku(s)),T=m!=="none";!p&&T&&x.push(...Zu(s,v,m,S));const $=[s,...x],C=await Io(r,g),_=[];let P=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&_.push(C[y]),f){const L=Gu(o,i,S);_.push(C[L[0]],C[L[1]])}if(P=[...P,{placement:o,overflows:_}],!_.every(L=>L<=0)){var F,b;const L=(((F=a.flip)==null?void 0:F.index)||0)+1,N=$[L];if(N&&(!(f==="alignment"?D!==lt(N):!1)||P.every(O=>lt(O.placement)===D?O.overflows[0]>0:!0)))return{data:{index:L,overflows:P},reset:{placement:N}};let I=(b=P.filter(V=>V.overflows[0]<=0).sort((V,O)=>V.overflows[1]-O.overflows[1])[0])==null?void 0:b.placement;if(!I)switch(h){case"bestFit":{var k;const V=(k=P.filter(O=>{if(T){const Q=lt(O.placement);return Q===D||Q==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(Q=>Q>0).reduce((Q,M)=>Q+M,0)]).sort((O,Q)=>O[1]-Q[1])[0])==null?void 0:k[0];V&&(I=V);break}case"initialPlacement":I=s;break}if(o!==I)return{reset:{placement:I}}}return{}}}},kv=new Set(["left","top"]);async function Cv(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=pt(e),s=fn(e),l=lt(e)==="y",u=kv.has(i)?-1:1,c=a&&l?-1:1,f=kt(r,n);let{mainAxis:p,crossAxis:h,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"&&(h=s==="end"?m*-1:m),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}const _v=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 Cv(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}}}}},Ov=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,y:D}=g;return{x:y,y:D}}},...l}=kt(n,r),u={x:e,y:t},c=await Io(r,l),f=lt(pt(o)),p=Qu(f);let h=u[p],m=u[f];if(a){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",D=h+c[g],w=h-c[y];h=Ti(D,h,w)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",D=m+c[g],w=m-c[y];m=Ti(D,m,w)}const v=s.fn({...r,[p]:h,[f]:m});return{...v,data:{x:v.x-e,y:v.y-t,enabled:{[p]:a,[f]:i}}}}}},Pv=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}=kt(n,r),c=await Io(r,u),f=pt(o),p=fn(o),h=lt(o)==="y",{width:m,height:v}=a.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,g=p==="end"?"top":"bottom");const D=v-c.top-c.bottom,w=m-c.left-c.right,S=ft(v-c[g],D),x=ft(m-c[y],w),T=!r.middlewareData.shift;let $=S,C=x;if((e=r.middlewareData.shift)!=null&&e.enabled.x&&(C=w),(t=r.middlewareData.shift)!=null&&t.enabled.y&&($=D),T&&!p){const P=Ne(c.left,0),F=Ne(c.right,0),b=Ne(c.top,0),k=Ne(c.bottom,0);h?C=m-2*(P!==0||F!==0?P+F:Ne(c.left,c.right)):$=v-2*(b!==0||k!==0?b+k:Ne(c.top,c.bottom))}await l({...r,availableWidth:C,availableHeight:$});const _=await i.getDimensions(s.floating);return m!==_.width||v!==_.height?{reset:{rects:!0}}:{}}}};function tc(n){const r=He(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Ge(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=qt(e)!==a||qt(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function $i(n){return Pe(n)?n:n.contextElement}function Qn(n){const r=$i(n);if(!Ge(r))return Ve(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=tc(r);let i=(a?qt(e.width):e.width)/t,s=(a?qt(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Mv=Ve(0);function nc(n){const r=We(n);return!Lr()||!r.visualViewport?Mv:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Tv(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==We(n)?!1:r}function _n(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=$i(n);let i=Ve(1);r&&(t?Pe(t)&&(i=Qn(t)):i=Qn(n));const s=Tv(a,e,t)?nc(a):Ve(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 p=We(a),h=t&&Pe(t)?We(t):t;let m=p,v=Fr(m);for(;v&&t&&h!==m;){const g=Qn(v),y=v.getBoundingClientRect(),D=He(v),w=y.left+(v.clientLeft+parseFloat(D.paddingLeft))*g.x,S=y.top+(v.clientTop+parseFloat(D.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=S,m=We(v),v=Fr(m)}}return pn({width:c,height:f,x:l,y:u})}function No(n,r){const e=un(n).scrollLeft;return r?r.left+e:_n(qe(n)).left+e}function rc(n,r){const e=n.getBoundingClientRect(),t=e.left+r.scrollLeft-No(n,e),o=e.top+r.scrollTop;return{x:t,y:o}}function Iv(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=qe(t),s=r?Cn(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Ve(1);const c=Ve(0),f=Ge(t);if((f||!f&&!a)&&((zt(t)!=="body"||ln(i))&&(l=un(t)),Ge(t))){const h=_n(t);u=Qn(t),c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}const p=i&&!f&&!a?rc(i,l):Ve(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:e.y*u.y-l.scrollTop*u.y+c.y+p.y}}function Nv(n){return Array.from(n.getClientRects())}function $v(n){const r=qe(n),e=un(n),t=n.ownerDocument.body,o=Ne(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Ne(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+No(n);const s=-e.scrollTop;return He(t).direction==="rtl"&&(i+=Ne(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}const oc=25;function Lv(n,r){const e=We(n),t=qe(n),o=e.visualViewport;let a=t.clientWidth,i=t.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const c=Lr();(!c||c&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const u=No(t);if(u<=0){const c=t.ownerDocument,f=c.body,p=getComputedStyle(f),h=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(t.clientWidth-f.clientWidth-h);m<=oc&&(a-=m)}else u<=oc&&(a+=u);return{width:a,height:i,x:s,y:l}}const Fv=new Set(["absolute","fixed"]);function Av(n,r){const e=_n(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=Ge(n)?Qn(n):Ve(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 ac(n,r,e){let t;if(r==="viewport")t=Lv(n,e);else if(r==="document")t=$v(qe(n));else if(Pe(r))t=Av(r,e);else{const o=nc(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return pn(t)}function ic(n,r){const e=st(n);return e===r||!Pe(e)||St(e)?!1:He(e).position==="fixed"||ic(e,r)}function Rv(n,r){const e=r.get(n);if(e)return e;let t=cn(n,[],!1).filter(s=>Pe(s)&&zt(s)!=="body"),o=null;const a=He(n).position==="fixed";let i=a?st(n):n;for(;Pe(i)&&!St(i);){const s=He(i),l=$r(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&Fv.has(o.position)||ln(i)&&!l&&ic(n,i))?t=t.filter(c=>c!==i):o=s,i=st(i)}return r.set(n,t),t}function Yv(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?Cn(r)?[]:Rv(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=ac(r,c,o);return u.top=Ne(f.top,u.top),u.right=ft(f.right,u.right),u.bottom=ft(f.bottom,u.bottom),u.left=Ne(f.left,u.left),u},ac(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function jv(n){const{width:r,height:e}=tc(n);return{width:r,height:e}}function Wv(n,r,e){const t=Ge(r),o=qe(r),a=e==="fixed",i=_n(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Ve(0);function u(){l.x=No(o)}if(t||!t&&!a)if((zt(r)!=="body"||ln(o))&&(s=un(r)),t){const h=_n(r,!0,a,r);l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}else o&&u();a&&!t&&o&&u();const c=o&&!t&&!a?rc(o,s):Ve(0),f=i.left+s.scrollLeft-l.x-c.x,p=i.top+s.scrollTop-l.y-c.y;return{x:f,y:p,width:i.width,height:i.height}}function Li(n){return He(n).position==="static"}function sc(n,r){if(!Ge(n)||He(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return qe(n)===e&&(e=e.ownerDocument.body),e}function lc(n,r){const e=We(n);if(Cn(n))return e;if(!Ge(n)){let o=st(n);for(;o&&!St(o);){if(Pe(o)&&!Li(o))return o;o=st(o)}return e}let t=sc(n,r);for(;t&&zu(t)&&Li(t);)t=sc(t,r);return t&&St(t)&&Li(t)&&!$r(t)?e:t||qu(n)||e}const Hv=async function(n){const r=this.getOffsetParent||lc,e=this.getDimensions,t=await e(n.floating);return{reference:Wv(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Vv(n){return He(n).direction==="rtl"}const Bv={convertOffsetParentRelativeRectToViewportRelativeRect:Iv,getDocumentElement:qe,getClippingRect:Yv,getOffsetParent:lc,getElementRects:Hv,getClientRects:Nv,getDimensions:jv,getScale:Qn,isElement:Pe,isRTL:Vv};function uc(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function zv(n,r){let e=null,t;const o=qe(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:p,height:h}=u;if(s||r(),!p||!h)return;const m=dn(f),v=dn(o.clientWidth-(c+p)),g=dn(o.clientHeight-(f+h)),y=dn(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ne(0,ft(1,l))||1};let S=!0;function x(T){const $=T[0].intersectionRatio;if($!==l){if(!S)return i();$?i(!1,$):t=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!uc(u,n.getBoundingClientRect())&&i(),S=!1}try{e=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(x,w)}e.observe(n)}return i(!0),a}function qv(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=$i(n),c=o||a?[...u?cn(u):[],...cn(r)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const f=u&&s?zv(u,e):null;let p=-1,h=null;i&&(h=new ResizeObserver(y=>{let[D]=y;D&&D.target===u&&h&&(h.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(r)})),e()}),u&&!l&&h.observe(u),h.observe(r));let m,v=l?_n(n):null;l&&g();function g(){const y=_n(n);v&&!uc(v,y)&&e(),v=y,m=requestAnimationFrame(g)}return e(),()=>{var y;c.forEach(D=>{o&&D.removeEventListener("scroll",e),a&&D.removeEventListener("resize",e)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Fi=Io,Uv=_v,Qv=Ov,Gv=Sv,Kv=Pv,Xv=(n,r,e)=>{const t=new Map,o={platform:Bv,...e},a={...o.platform,_c:t};return Dv(n,r,{...o,platform:a})};var Jv=typeof document<"u",Zv=function(){},$o=Jv?d.useLayoutEffect:Zv;function Lo(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(!Lo(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)&&!Lo(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function cc(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function dc(n,r){const e=cc(n);return Math.round(r*e)/e}function Ai(n){const r=H.useRef(n);return $o(()=>{r.current=n}),r}function eg(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]=H.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[p,h]=H.useState(t);Lo(p,t)||h(t);const[m,v]=H.useState(null),[g,y]=H.useState(null),D=H.useCallback(O=>{O!==T.current&&(T.current=O,v(O))},[]),w=H.useCallback(O=>{O!==$.current&&($.current=O,y(O))},[]),S=a||m,x=i||g,T=H.useRef(null),$=H.useRef(null),C=H.useRef(c),_=l!=null,P=Ai(l),F=Ai(o),b=Ai(u),k=H.useCallback(()=>{if(!T.current||!$.current)return;const O={placement:r,strategy:e,middleware:p};F.current&&(O.platform=F.current),Xv(T.current,$.current,O).then(Q=>{const M={...Q,isPositioned:b.current!==!1};L.current&&!Lo(C.current,M)&&(C.current=M,fr.flushSync(()=>{f(M)}))})},[p,r,e,F,b]);$o(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[u]);const L=H.useRef(!1);$o(()=>(L.current=!0,()=>{L.current=!1}),[]),$o(()=>{if(S&&(T.current=S),x&&($.current=x),S&&x){if(P.current)return P.current(S,x,k);k()}},[S,x,k,P,_]);const N=H.useMemo(()=>({reference:T,floating:$,setReference:D,setFloating:w}),[D,w]),I=H.useMemo(()=>({reference:S,floating:x}),[S,x]),V=H.useMemo(()=>{const O={position:e,left:0,top:0};if(!I.floating)return O;const Q=dc(I.floating,c.x),M=dc(I.floating,c.y);return s?{...O,transform:"translate("+Q+"px, "+M+"px)",...cc(I.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:Q,top:M}},[e,s,I.floating,c.x,c.y]);return H.useMemo(()=>({...c,update:k,refs:N,elements:I,floatingStyles:V}),[c,k,N,I,V])}const fc=(n,r)=>({...Uv(n),options:[n,r]}),tg=(n,r)=>({...Qv(n),options:[n,r]}),ng=(n,r)=>({...Gv(n),options:[n,r]}),rg=(n,r)=>({...Kv(n),options:[n,r]}),pc={...H},og=pc.useInsertionEffect||(n=>n());function hc(n){const r=H.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return og(()=>{r.current=n}),H.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 Ri=typeof document<"u"?d.useLayoutEffect:d.useEffect;let mc=!1,ag=0;const vc=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ag++;function ig(){const[n,r]=H.useState(()=>mc?vc():void 0);return Ri(()=>{n==null&&r(vc())},[]),H.useEffect(()=>{mc=!0},[]),n}const sg=pc.useId||ig;let Rr;process.env.NODE_ENV!=="production"&&(Rr=new Set);function lg(){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=Rr)!=null&&n.has(o))){var a;(a=Rr)==null||a.add(o),console.warn(o)}}function ug(){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=Rr)!=null&&n.has(o))){var a;(a=Rr)==null||a.add(o),console.error(o)}}function cg(){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 dg=H.createContext(null),fg=H.createContext(null),pg=()=>{var n;return((n=H.useContext(dg))==null?void 0:n.id)||null},hg=()=>H.useContext(fg),mg="data-floating-ui-focusable";function vg(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=sg(),a=H.useRef({}),[i]=H.useState(()=>cg()),s=pg()!=null;if(process.env.NODE_ENV!=="production"){const h=t.reference;h&&!Pe(h)&&ug("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]=H.useState(t.reference),c=hc((h,m,v)=>{a.current.openEvent=h?m:void 0,i.emit("openchange",{open:h,event:m,reason:v,nested:s}),e==null||e(h,m,v)}),f=H.useMemo(()=>({setPositionReference:u}),[]),p=H.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return H.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:p,events:i,floatingId:o,refs:f}),[r,c,p,i,o,f])}function gg(n){n===void 0&&(n={});const{nodeId:r}=n,e=vg({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=H.useState(null),[s,l]=H.useState(null),c=(o==null?void 0:o.domReference)||a,f=H.useRef(null),p=hg();Ri(()=>{c&&(f.current=c)},[c]);const h=eg({...n,elements:{...o,...s&&{reference:s}}}),m=H.useCallback(w=>{const S=Pe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(S),h.refs.setReference(S)},[h.refs]),v=H.useCallback(w=>{(Pe(w)||w===null)&&(f.current=w,i(w)),(Pe(h.refs.reference.current)||h.refs.reference.current===null||w!==null&&!Pe(w))&&h.refs.setReference(w)},[h.refs]),g=H.useMemo(()=>({...h.refs,setReference:v,setPositionReference:m,domReference:f}),[h.refs,v,m]),y=H.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),D=H.useMemo(()=>({...h,...t,refs:g,elements:y,nodeId:r}),[h,g,y,r,t]);return Ri(()=>{t.dataRef.current.floatingContext=D;const w=p==null?void 0:p.nodesRef.current.find(S=>S.id===r);w&&(w.context=D)}),H.useMemo(()=>({...h,context:D,refs:g,elements:y}),[h,g,y,D])}const gc="active",bc="selected";function Yi(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[gc]:i,[bc]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1,[mg]:""},...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&&[gc,bc].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 p,h=arguments.length,m=new Array(h),v=0;v<h;v++)m[v]=arguments[v];return(p=t.get(u))==null?void 0:p.map(g=>g(...m)).find(g=>g!==void 0)}}}else i[u]=c}),i),{})}}function bg(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=H.useCallback(s=>Yi(s,n,"reference"),r),a=H.useCallback(s=>Yi(s,n,"floating"),e),i=H.useCallback(s=>Yi(s,n,"item"),t);return H.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function yc(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const yg=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}=kt(n,r),{rects:f,elements:{floating:p}}=r,h=e.current[i],m=(u==null?void 0:u.current)||p,v=p.clientTop||m.clientTop,g=p.clientTop!==0,y=m.clientTop!==0,D=p===m;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||lg('`placement` side must be "bottom" when using the `inner`',"middleware.")),!h)return{};const w={...r,...await fc(-h.offsetTop-p.clientTop-f.reference.height/2-h.offsetHeight/2-a).fn(r)},S=await Fi(yc(w,m.scrollHeight+v+p.clientTop),c),x=await Fi(w,{...c,elementContext:"reference"}),T=Ne(0,S.top),$=w.y+T,P=(m.scrollHeight>m.clientHeight?F=>F:qt)(Ne(0,m.scrollHeight+(g&&D||y?v*2:0)-T-Ne(0,S.bottom)));if(m.style.maxHeight=P+"px",m.scrollTop=T,o){const F=m.offsetHeight<h.offsetHeight*ft(s,e.current.length)-1||x.top>=-l||x.bottom>=-l;fr.flushSync(()=>o(F))}return t&&(t.current=await Fi(yc({...w,y:$},m.offsetHeight+v+p.clientTop),c)),{y:$}}});function wg(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=hc(s),u=H.useRef(!1),c=H.useRef(null),f=H.useRef(null);H.useEffect(()=>{if(!o)return;function h(v){if(v.ctrlKey||!m||a.current==null)return;const g=v.deltaY,y=a.current.top>=-.5,D=a.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,S=g<0?-1:1,x=g<0?"max":"min";m.scrollHeight<=m.clientHeight||(!y&&g>0||!D&&g<0?(v.preventDefault(),fr.flushSync(()=>{l(T=>T+Math[x](g,w*S))})):/firefox/i.test(mv())&&(m.scrollTop+=g))}const m=(i==null?void 0:i.current)||t.floating;if(e&&m)return m.addEventListener("wheel",h),requestAnimationFrame(()=>{c.current=m.scrollTop,a.current!=null&&(f.current={...a.current})}),()=>{c.current=null,f.current=null,m.removeEventListener("wheel",h)}},[o,e,t.floating,a,i,l]);const p=H.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const h=(i==null?void 0:i.current)||t.floating;if(!(!a.current||!h||!u.current)){if(c.current!==null){const m=h.scrollTop-c.current;(a.current.bottom<-.5&&m<-1||a.current.top<-.5&&m>1)&&fr.flushSync(()=>l(v=>v+m))}requestAnimationFrame(()=>{c.current=h.scrollTop})}}}),[t.floating,l,a,i]);return H.useMemo(()=>o?{floating:p}:{},[o,p])}let Gn=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Gn.displayName="FloatingContext";let ji=d.createContext(null);ji.displayName="PlacementContext";function wc(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function xc(){return d.useContext(Gn).setReference}function xg(){return d.useContext(Gn).getReferenceProps}function Ec(){let{getFloatingProps:n,slot:r}=d.useContext(Gn);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function Dc(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(ji),e=d.useMemo(()=>n,[JSON.stringify(n,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);be(()=>{r==null||r(e??null)},[r,e]);let t=d.useContext(Gn);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let Sc=4;function kc({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);Eg(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:f=0,offset:p=0,padding:h=0,inner:m}=Dg(e,s),[v,g="center"]=c.split(" ");be(()=>{u&&a(0)},[u]);let{refs:y,floatingStyles:D,context:w}=gg({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[fc({mainAxis:v==="selection"?0:f,crossAxis:p}),tg({padding:h}),v!=="selection"&&ng({padding:h}),v==="selection"&&m?yg({...m,padding:h,overflowRef:i,offset:o,minItemsVisible:Sc,referenceOverflowThreshold:h,onFallbackChange(F){var b,k;if(!F)return;let L=w.elements.floating;if(!L)return;let N=parseFloat(getComputedStyle(L).scrollPaddingBottom)||0,I=Math.min(Sc,L.childElementCount),V=0,O=0;for(let Q of(k=(b=w.elements.floating)==null?void 0:b.childNodes)!=null?k:[])if(rt(Q)){let M=Q.offsetTop,W=M+Q.clientHeight+N,Y=L.scrollTop,j=Y+L.clientHeight;if(M>=Y&&W<=j)I--;else{O=Math.max(0,Math.min(W,j)-Math.max(M,Y)),V=Q.clientHeight;break}}I>=1&&a(Q=>{let M=V*I-O+N;return Q>=M?Q:M})}}):null,rg({padding:h,apply({availableWidth:F,availableHeight:b,elements:k}){Object.assign(k.floating.style,{overflow:"auto",maxWidth:`${F}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${b}px)`})}})].filter(Boolean),whileElementsMounted:qv}),[S=v,x=g]=w.placement.split("-");v==="selection"&&(S="selection");let T=d.useMemo(()=>({anchor:[S,x].filter(Boolean).join(" ")}),[S,x]),$=wg(w,{overflowRef:i,onChange:a}),{getReferenceProps:C,getFloatingProps:_}=bg([$]),P=ee(F=>{l(F),y.setFloating(F)});return H.createElement(ji.Provider,{value:t},H.createElement(Gn.Provider,{value:{setFloating:P,setReference:y.setReference,styles:D,getReferenceProps:C,getFloatingProps:_,slot:T}},n))}function Eg(n){be(()=>{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 Dg(n,r){var e,t,o;let a=Wi((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=Wi((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Wi((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function Wi(n,r,e=void 0){let t=Yt(),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=_c(l,u);return[c,f=>{let p=Cc(l);{let h=p.map(m=>window.getComputedStyle(u).getPropertyValue(m));t.requestAnimationFrame(function m(){t.nextFrame(m);let v=!1;for(let[y,D]of p.entries()){let w=window.getComputedStyle(u).getPropertyValue(D);if(h[y]!==w){h[y]=w,v=!0;break}}if(!v)return;let g=_c(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 be(()=>{let[l,u]=o(n,r);if(s(l),!!u)return u(s)},[n,r]),i}function Cc(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,...Cc(o)]:[t]}return[]}function _c(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 Sg({children:n,freeze:r},e){let t=Fo(r,n);return d.isValidElement(t)?d.cloneElement(t,{ref:e}):d.createElement(d.Fragment,null,t)}const kg=d.forwardRef(Sg);function Fo(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let Ao=d.createContext(null);Ao.displayName="OpenClosedContext";var Ue=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(Ue||{});function Kn(){return d.useContext(Ao)}function Hi({value:n,children:r}){return d.createElement(Ao.Provider,{value:n},r)}function Cg({children:n}){return d.createElement(Ao.Provider,{value:null},n)}function _g(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let Ct=[];_g(()=>{function n(r){if(!Ht(r.target)||r.target===document.body||Ct[0]===r.target)return;let e=r.target;e=e.closest(Oo),Ct.unshift(e??r.target),Ct=Ct.filter(t=>t!=null&&t.isConnected),Ct.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 Og(n){throw new Error("Unexpected object: "+n)}var ce=(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))(ce||{});function Xn(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:Og(n)}}function Ro(n){let r=ee(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,wo(()=>{e.current&&r()})}),[r])}let Oc=d.createContext(!1);function Pg(){return d.useContext(Oc)}function Pc(n){return d.createElement(Oc.Provider,{value:n.force},n.children)}function Mg(n){let r=Pg(),e=d.useContext(Tc),[t,o]=d.useState(()=>{var a;if(!r&&e!==null)return(a=e.current)!=null?a:null;if(Et.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 Mc=d.Fragment,Tg=Oe(function(n,r){let{ownerDocument:e=null,...t}=n,o=d.useRef(null),a=je(om(p=>{o.current=p}),r),i=Sn(o.current),s=e??i,l=Mg(s),u=d.useContext(Vi),c=Yt(),f=Te();return Ro(()=>{var p;l&&l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l))}),l?Ye.createPortal(d.createElement("div",{"data-headlessui-portal":"",ref:p=>{c.dispose(),u&&p&&c.add(u.register(p))}},f({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:Mc,name:"Portal"})),l):null});function Ig(n,r){let e=je(r),{enabled:t=!0,ownerDocument:o,...a}=n,i=Te();return t?d.createElement(Tg,{...a,ownerDocument:o,ref:e}):i({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:Mc,name:"Portal"})}let Ng=d.Fragment,Tc=d.createContext(null);function $g(n,r){let{target:e,...t}=n,o={ref:je(r)},a=Te();return d.createElement(Tc.Provider,{value:e},a({ourProps:o,theirProps:t,defaultTag:Ng,name:"Popover.Group"}))}let Vi=d.createContext(null);function Lg(){let n=d.useContext(Vi),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(Vi.Provider,{value:o},a)},[o])]}let Fg=Oe(Ig),Ic=Oe($g),Bi=Object.assign(Fg,{Group:Ic});const Ut={Idle:{kind:"Idle"},Tracked:n=>({kind:"Tracked",position:n}),Moved:{kind:"Moved"}};function zi(n){let r=n.getBoundingClientRect();return`${r.x},${r.y}`}function Nc(n,r,e){let t=nt();if(r.kind==="Tracked"){let o=function(){a!==zi(n)&&(t.dispose(),e())},{position:a}=r,i=new ResizeObserver(o);i.observe(n),t.add(()=>i.disconnect()),t.addEventListener(window,"scroll",o,{passive:!0}),t.addEventListener(window,"resize",o)}return()=>t.dispose()}var Ag=Object.defineProperty,Rg=(n,r,e)=>r in n?Ag(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,$c=(n,r,e)=>(Rg(n,typeof r!="symbol"?r+"":r,e),e),de=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(de||{}),ut=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(ut||{}),_t=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(_t||{}),Lc=(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[n.MarkInputAsMoved=12]="MarkInputAsMoved",n))(Lc||{});function qi(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):Si(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Yg={1(n){var r;if((r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===1)return n;let e=n.inputElement?Ut.Tracked(zi(n.inputElement)):n.inputPositionState;return{...n,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:e,__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,inputPositionState:Ut.Idle}}return{...n,comboboxState:0,inputPositionState:Ut.Idle,__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===ce.Specific?r.idx:Xn(r,{resolveItems:()=>u,resolveActiveIndex:()=>{var h,m;return(m=(h=n.activeOptionIndex)!=null?h:u.findIndex(v=>!c(v)))!=null?m:null},resolveDisabled:c,resolveId(){throw new Error("Function not implemented.")}}),p=(o=r.trigger)!=null?o:2;return n.activeOptionIndex===f&&n.activationTrigger===p?n:{...n,activeOptionIndex:f,activationTrigger:p,isTyping:!1,__demoMode:!1}}let i=qi(n);if(i.activeOptionIndex===null){let u=i.options.findIndex(c=>!c.dataRef.current.disabled);u!==-1&&(i.activeOptionIndex=u)}let s=r.focus===ce.Specific?r.idx:Xn(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=qi(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=qi(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},12(n){return n.inputPositionState.kind!=="Tracked"?n:{...n,inputPositionState:Ut.Moved}}},jg=class Kf extends pi{constructor(r){super(r),$c(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:ce.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})}}),$c(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)),didInputMove(e){return e.inputPositionState.kind==="Moved"}});{let e=this.state.id,t=zn.get(null);this.disposables.add(t.on(vi.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))}this.disposables.group(e=>{this.on(1,t=>{t.inputElement&&(e.dispose(),e.add(Nc(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:r,virtual:e=null,__demoMode:t=!1}){var o;return new Kf({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,inputPositionState:Ut.Idle})}reduce(r,e){return Le(e.type,Yg,r,e)}};const Fc=d.createContext(null);function Yr(n){let r=d.useContext(Fc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ac),e}return r}function Ac({id:n,virtual:r=null,__demoMode:e=!1}){let t=d.useMemo(()=>jg.new({id:n,virtual:r,__demoMode:e}),[]);return Ro(()=>t.dispose()),t}let jr=d.createContext(null);jr.displayName="ComboboxDataContext";function Jn(n){let r=d.useContext(jr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Jn),e}return r}let Rc=d.createContext(null);function Wg(n){let r=Yr("VirtualProvider"),e=Jn("VirtualProvider"),{options:t}=e.virtual,o=ge(r,h=>h.optionsElement),[a,i]=d.useMemo(()=>{let h=o;if(!h)return[0,0];let m=window.getComputedStyle(h);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[o]),s=km({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);be(()=>{u(h=>h+1)},[t]);let c=s.getVirtualItems(),f=ge(r,h=>h.activationTrigger===_t.Pointer),p=ge(r,r.selectors.activeOptionIndex);return c.length===0?null:d.createElement(Rc.Provider,{value:s},d.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:h=>{h&&(f||p!==null&&t.length>p&&s.scrollToIndex(p))}},c.map(h=>{var m;return d.createElement(d.Fragment,{key:h.key},d.cloneElement((m=n.children)==null?void 0:m.call(n,{...n.slot,option:t[h.index]}),{key:`${l}-${h.key}`,"data-index":h.index,"aria-setsize":t.length,"aria-posinset":h.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${h.start}px)`,overflowAnchor:"none"}}))})))}let Hg=d.Fragment;function Vg(n,r){let e=d.useId(),t=xo(),{value:o,defaultValue:a,onChange:i,form:s,name:l,by:u,invalid:c=!1,disabled:f=t||!1,onClose:p,__demoMode:h=!1,multiple:m=!1,immediate:v=!1,virtual:g=null,nullable:y,...D}=n,w=Ql(a),[S=m?[]:void 0,x]=Ul(o,i,w),T=Ac({id:e,virtual:g,__demoMode:h}),$=d.useRef({static:!1,hold:!1}),C=mu(u),_=ee(U=>g?u===null?g.options.indexOf(U):g.options.findIndex(oe=>C(oe,U)):T.state.options.findIndex(oe=>C(oe.dataRef.current.value,U))),P=d.useCallback(U=>Le(k.mode,{[ut.Multi]:()=>S.some(oe=>C(oe,U)),[ut.Single]:()=>C(S,U)}),[S]),F=ge(T,U=>U.virtual),b=ee(()=>p==null?void 0:p()),k=d.useMemo(()=>({__demoMode:h,immediate:v,optionsPropsRef:$,value:S,defaultValue:w,disabled:f,invalid:c,mode:m?ut.Multi:ut.Single,virtual:g?F:null,onChange:x,isSelected:P,calculateIndex:_,compare:C,onClose:b}),[h,v,$,S,w,f,c,m,g,F,x,P,_,C,b]);be(()=>{var U;g&&T.send({type:Lc.UpdateVirtualConfiguration,options:g.options,disabled:(U=g.disabled)!=null?U:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),be(()=>{T.state.dataRef.current=k},[k]);let[L,N,I,V]=ge(T,U=>[U.comboboxState,U.buttonElement,U.inputElement,U.optionsElement]),O=zn.get(null),Q=ge(O,d.useCallback(U=>O.selectors.isTop(U,e),[O,e]));Ci(Q,[N,I,V],()=>T.actions.closeCombobox());let M=ge(T,T.selectors.activeOptionIndex),W=ge(T,T.selectors.activeOption),Y=Xe({open:L===de.Open,disabled:f,invalid:c,activeIndex:M,activeOption:W,value:S}),[j,q]=lu(),X=r===null?{}:{ref:r},R=d.useCallback(()=>{if(w!==void 0)return x==null?void 0:x(w)},[x,w]),z=Te();return d.createElement(q,{value:j,props:{htmlFor:I==null?void 0:I.id},slot:{open:L===de.Open,disabled:f}},d.createElement(kc,null,d.createElement(jr.Provider,{value:k},d.createElement(Fc.Provider,{value:T},d.createElement(Hi,{value:Le(L,{[de.Open]:Ue.Open,[de.Closed]:Ue.Closed})},l!=null&&d.createElement(Jl,{disabled:f,data:S!=null?{[l]:S}:{},form:s,onReset:R}),z({ourProps:X,theirProps:D,slot:Y,defaultTag:Hg,name:"Combobox"}))))))}let Bg="input";function zg(n,r){var e,t;let o=Yr("Combobox.Input"),a=Jn("Combobox.Input"),i=d.useId(),s=ui(),{id:l=s||`headlessui-combobox-input-${i}`,onChange:u,displayValue:c,disabled:f=a.disabled||!1,autoFocus:p=!1,type:h="text",...m}=n,v=d.useRef(null),g=je(v,r,xc(),o.actions.setInputElement),[y,D]=ge(o,Y=>[Y.comboboxState,Y.isTyping]),w=Yt(),S=ee(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:ce.Nothing})}),x=d.useMemo(()=>{var Y;return typeof c=="function"&&a.value!==void 0?(Y=c(a.value))!=null?Y:"":typeof a.value=="string"?a.value:""},[a.value,c]);Nr(([Y,j],[q,X])=>{if(o.state.isTyping)return;let R=v.current;R&&((X===de.Open&&j===de.Closed||Y!==q)&&(R.value=Y),requestAnimationFrame(()=>{if(o.state.isTyping||!R||yo(R))return;let{selectionStart:z,selectionEnd:U}=R;Math.abs((U??0)-(z??0))===0&&z===0&&R.setSelectionRange(R.value.length,R.value.length)}))},[x,y,D]),Nr(([Y],[j])=>{if(Y===de.Open&&j===de.Closed){if(o.state.isTyping)return;let q=v.current;if(!q)return;let X=q.value,{selectionStart:R,selectionEnd:z,selectionDirection:U}=q;q.value="",q.value=X,U!==null?q.setSelectionRange(R,z,U):q.setSelectionRange(R,z)}},[y]);let T=d.useRef(!1),$=ee(()=>{T.current=!0}),C=ee(()=>{w.nextFrame(()=>{T.current=!1})}),_=ee(Y=>{switch(o.actions.setIsTyping(!0),Y.key){case he.Enter:if(o.state.comboboxState!==de.Open||T.current)return;if(Y.preventDefault(),Y.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),a.mode===ut.Single&&o.actions.closeCombobox();break;case he.ArrowDown:return Y.preventDefault(),Y.stopPropagation(),Le(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:ce.Next}),[de.Closed]:()=>o.actions.openCombobox()});case he.ArrowUp:return Y.preventDefault(),Y.stopPropagation(),Le(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:ce.Previous}),[de.Closed]:()=>{Ye.flushSync(()=>o.actions.openCombobox()),a.value||o.actions.goToOption({focus:ce.Last})}});case he.Home:if(o.state.comboboxState===de.Closed||Y.shiftKey)break;return Y.preventDefault(),Y.stopPropagation(),o.actions.goToOption({focus:ce.First});case he.PageUp:return Y.preventDefault(),Y.stopPropagation(),o.actions.goToOption({focus:ce.First});case he.End:if(o.state.comboboxState===de.Closed||Y.shiftKey)break;return Y.preventDefault(),Y.stopPropagation(),o.actions.goToOption({focus:ce.Last});case he.PageDown:return Y.preventDefault(),Y.stopPropagation(),o.actions.goToOption({focus:ce.Last});case he.Escape:return o.state.comboboxState!==de.Open?void 0:(Y.preventDefault(),o.state.optionsElement&&!a.optionsPropsRef.current.static&&Y.stopPropagation(),a.mode===ut.Single&&a.value===null&&S(),o.actions.closeCombobox());case he.Tab:if(o.actions.setIsTyping(!1),o.state.comboboxState!==de.Open)return;a.mode===ut.Single&&o.state.activationTrigger!==_t.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),P=ee(Y=>{u==null||u(Y),a.mode===ut.Single&&Y.target.value===""&&S(),o.actions.openCombobox()}),F=ee(Y=>{var j,q,X;let R=(j=Y.relatedTarget)!=null?j:Ct.find(z=>z!==Y.currentTarget);if(!((q=o.state.optionsElement)!=null&&q.contains(R))&&!((X=o.state.buttonElement)!=null&&X.contains(R))&&o.state.comboboxState===de.Open)return Y.preventDefault(),a.mode===ut.Single&&a.value===null&&S(),o.actions.closeCombobox()}),b=ee(Y=>{var j,q,X;let R=(j=Y.relatedTarget)!=null?j:Ct.find(z=>z!==Y.currentTarget);(q=o.state.buttonElement)!=null&&q.contains(R)||(X=o.state.optionsElement)!=null&&X.contains(R)||a.disabled||a.immediate&&o.state.comboboxState!==de.Open&&w.microTask(()=>{Ye.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(_t.Focus)})}),k=Or(),L=au(),{isFocused:N,focusProps:I}=ai({autoFocus:p}),{isHovered:V,hoverProps:O}=oi({isDisabled:f}),Q=ge(o,Y=>Y.optionsElement),M=Xe({open:y===de.Open,disabled:f,invalid:a.invalid,hover:V,focus:N,autofocus:p}),W=kr({ref:g,id:l,role:"combobox",type:h,"aria-controls":Q==null?void 0:Q.id,"aria-expanded":y===de.Open,"aria-activedescendant":ge(o,o.selectors.activeDescendantId),"aria-labelledby":k,"aria-describedby":L,"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:p,onCompositionStart:$,onCompositionEnd:C,onKeyDown:_,onChange:P,onFocus:b,onBlur:F},I,O);return Te()({ourProps:W,theirProps:m,slot:M,defaultTag:Bg,name:"Combobox.Input"})}let qg="button";function Ug(n,r){let e=Yr("Combobox.Button"),t=Jn("Combobox.Button"),[o,a]=d.useState(null),i=je(r,a,e.actions.setButtonElement),s=d.useId(),{id:l=`headlessui-combobox-button-${s}`,disabled:u=t.disabled||!1,autoFocus:c=!1,...f}=n,[p,h,m]=ge(e,b=>[b.comboboxState,b.inputElement,b.optionsElement]),v=Fu(h),g=p===de.Open;Lu(g,{trigger:o,action:d.useCallback(b=>{if(o!=null&&o.contains(b.target)||h!=null&&h.contains(b.target))return Bt.Ignore;let k=b.target.closest('[role="option"]:not([data-disabled])');return rt(k)?Bt.Select(k):m!=null&&m.contains(b.target)?Bt.Ignore:Bt.Close},[o,h,m]),close:e.actions.closeCombobox,select:e.actions.selectActiveOption});let y=ee(b=>{switch(b.key){case he.Space:case he.Enter:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&Ye.flushSync(()=>e.actions.openCombobox()),v();return;case he.ArrowDown:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Ye.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:ce.First})),v();return;case he.ArrowUp:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Ye.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:ce.Last})),v();return;case he.Escape:if(e.state.comboboxState!==de.Open)return;b.preventDefault(),e.state.optionsElement&&!t.optionsPropsRef.current.static&&b.stopPropagation(),Ye.flushSync(()=>e.actions.closeCombobox()),v();return;default:return}}),D=gu(()=>{e.state.comboboxState===de.Open?e.actions.closeCombobox():e.actions.openCombobox(),v()}),w=Or([l]),{isFocusVisible:S,focusProps:x}=ai({autoFocus:c}),{isHovered:T,hoverProps:$}=oi({isDisabled:u}),{pressed:C,pressProps:_}=zl({disabled:u}),P=Xe({open:p===de.Open,active:C||p===de.Open,disabled:u,invalid:t.invalid,value:t.value,hover:T,focus:S}),F=kr({ref:i,id:l,type:Au(n,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":p===de.Open,"aria-labelledby":w,disabled:u||void 0,autoFocus:c,onKeyDown:y},D,x,$,_);return Te()({ourProps:F,theirProps:f,slot:P,defaultTag:qg,name:"Combobox.Button"})}let Qg="div",Gg=on.RenderStrategy|on.Static;function Kg(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,...p}=n,h=Yr("Combobox.Options"),m=Jn("Combobox.Options"),v=wc(l);v&&(u=!0);let[g,y]=Dc(v),[D,w]=d.useState(null),S=Ec(),x=je(r,v?g:null,h.actions.setOptionsElement,w),[T,$,C,_,P]=ge(h,se=>[se.comboboxState,se.inputElement,se.buttonElement,se.optionsElement,se.activationTrigger]),F=Sn($||C),b=Sn(_),k=Kn(),[L,N]=Mi(f,D,k!==null?(k&Ue.Open)===Ue.Open:T===de.Open);xi(L,$,h.actions.closeCombobox);let I=m.__demoMode?!1:c&&T===de.Open;Oi(I,b);let V=m.__demoMode?!1:c&&T===de.Open;wi(V,{allowed:d.useCallback(()=>[$,C,_],[$,C,_])});let O=ge(h,h.selectors.didInputMove)?!1:L;be(()=>{var se;m.optionsPropsRef.current.static=(se=n.static)!=null?se:!1},[m.optionsPropsRef,n.static]),be(()=>{m.optionsPropsRef.current.hold=s},[m.optionsPropsRef,s]),sv(T===de.Open,{container:_,accept(se){return se.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:se.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(se){se.setAttribute("role","none")}});let Q=Or([C==null?void 0:C.id]),M=Xe({open:T===de.Open,option:void 0}),W=ee(()=>{h.actions.setActivationTrigger(_t.Pointer)}),Y=ee(se=>{se.preventDefault(),h.actions.setActivationTrigger(_t.Pointer)}),j=kr(v?S():{},{"aria-labelledby":Q,role:"listbox","aria-multiselectable":m.mode===ut.Multi?!0:void 0,id:i,ref:x,style:{...p.style,...y,"--input-width":ci(L,$,!0).width,"--button-width":ci(L,C,!0).width},onWheel:P===_t.Pointer?void 0:W,onMouseDown:Y,...Pi(N)}),q=L&&T===de.Closed&&!n.static,X=Fo(q,(e=m.virtual)==null?void 0:e.options),R=Fo(q,m.value),z=d.useCallback(se=>m.compare(R,se),[m.compare,R]),U=d.useMemo(()=>{if(!m.virtual)return m;if(X===void 0)throw new Error("Missing `options` in virtual mode");return X!==m.virtual.options?{...m,virtual:{...m.virtual,options:X}}:m},[m,X,(t=m.virtual)==null?void 0:t.options]);m.virtual&&Object.assign(p,{children:d.createElement(jr.Provider,{value:U},d.createElement(Wg,{slot:M},p.children))});let oe=Te(),ae=d.useMemo(()=>m.mode===ut.Multi?m:{...m,isSelected:z},[m,z]);return d.createElement(Bi,{enabled:u?n.static||L:!1,ownerDocument:F},d.createElement(jr.Provider,{value:ae},oe({ourProps:j,theirProps:{...p,children:d.createElement(kg,{freeze:q},typeof p.children=="function"?(o=p.children)==null?void 0:o.call(p,M):p.children)},slot:M,defaultTag:Qg,features:Gg,visible:O,name:"Combobox.Options"})))}let Xg="div";function Jg(n,r){var e,t,o;let a=Jn("Combobox.Option"),i=Yr("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,...p}=n,[h]=ge(i,N=>[N.inputElement]),m=Fu(h),v=ge(i,d.useCallback(N=>i.selectors.isActive(N,u,l),[u,l])),g=a.isSelected(u),y=d.useRef(null),D=jt({disabled:c,value:u,domRef:y,order:f}),w=d.useContext(Rc),S=je(r,y,w?w.measureElement:null),x=ee(()=>{i.actions.setIsTyping(!1),i.actions.onChange(u)});be(()=>i.actions.registerOption(l,D),[D,l]);let T=ge(i,d.useCallback(N=>i.selectors.shouldScrollIntoView(N,u,l),[u,l]));be(()=>{if(T)return nt().requestAnimationFrame(()=>{var N,I;(I=(N=y.current)==null?void 0:N.scrollIntoView)==null||I.call(N,{block:"nearest"})})},[T,y]);let $=ee(N=>{N.preventDefault(),N.button===di.Left&&(c||(x(),ki()||requestAnimationFrame(()=>m()),a.mode===ut.Single&&i.actions.closeCombobox()))}),C=ee(()=>{if(c)return i.actions.goToOption({focus:ce.Nothing});let N=a.calculateIndex(u);i.actions.goToOption({focus:ce.Specific,idx:N})}),_=ju(),P=ee(N=>_.update(N)),F=ee(N=>{if(!_.wasMoved(N)||c||v&&i.state.activationTrigger===_t.Pointer)return;let I=a.calculateIndex(u);i.actions.goToOption({focus:ce.Specific,idx:I},_t.Pointer)}),b=ee(N=>{_.wasMoved(N)&&(c||v&&(a.optionsPropsRef.current.hold||i.state.activationTrigger===_t.Pointer&&i.actions.goToOption({focus:ce.Nothing})))}),k=Xe({active:v,focus:v,selected:g,disabled:c}),L={id:l,ref:S,role:"option",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:$,onFocus:C,onPointerEnter:P,onMouseEnter:P,onPointerMove:F,onMouseMove:F,onPointerLeave:b,onMouseLeave:b};return Te()({ourProps:L,theirProps:p,slot:k,defaultTag:Xg,name:"Combobox.Option"})}let Zg=Oe(Vg),eb=Oe(Ug),Yc=Oe(zg),tb=Co,jc=Oe(Kg),Wc=Oe(Jg),nb=Object.assign(Zg,{Input:Yc,Button:eb,Label:tb,Options:jc,Option:Wc});function rb(n,r=typeof document<"u"?document.defaultView:null,e){let t=Tr(n,"escape");_i(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===he.Escape&&e(o))})}function ob(){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 be(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),e}function ab({defaultContainers:n=[],portals:r,mainTreeNode:e}={}){let t=ee(()=>{var o,a;let i=Dn(e),s=[];for(let l of n)l!==null&&(Wt(l)?s.push(l):"current"in l&&Wt(l.current)&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(o=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?o:[])l!==document.body&&l!==document.head&&Wt(l)&&l.id!=="headlessui-portal-root"&&(e&&(l.contains(e)||l.contains((a=e==null?void 0:e.getRootNode())==null?void 0:a.host))||s.some(u=>l.contains(u))||s.push(l));return s});return{resolveContainers:t,contains:ee(o=>t().some(a=>a.contains(o)))}}let Hc=d.createContext(null);function Vc({children:n,node:r}){let[e,t]=d.useState(null),o=Bc(r??e);return d.createElement(Hc.Provider,{value:o},n,o===null&&d.createElement(_r,{features:Vn.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&&Wt(l)&&l!=null&&l.contains(a)){t(l);break}}}}))}function Bc(n=null){var r;return(r=d.useContext(Hc))!=null?r:n}function ib(){let n=typeof document>"u";return"useSyncExternalStore"in H?(r=>r.useSyncExternalStore)(H)(()=>()=>{},()=>!1,()=>!n):!1}function Yo(){let n=ib(),[r,e]=H.useState(Et.isHandoffComplete);return r&&Et.isHandoffComplete===!1&&e(!1),H.useEffect(()=>{r!==!0&&e(!0)},[r]),H.useEffect(()=>Et.handoff(),[]),n?!1:r}function Ui(){let n=d.useRef(!1);return be(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Wr=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Wr||{});function sb(){let n=d.useRef(0);return Iu(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function zc(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)Wt(e.current)&&r.add(e.current);return r}let lb="div";var On=(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))(On||{});function ub(n,r){let e=d.useRef(null),t=je(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;Yo()||(s=0);let u=Sn(e.current);pb(s,{ownerDocument:u});let c=hb(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});mb(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let f=sb(),p=ee(D=>{if(!rt(e.current))return;let w=e.current;(S=>S())(()=>{Le(f.current,{[Wr.Forwards]:()=>{qn(w,yt.First,{skipElements:[D.relatedTarget,a]})},[Wr.Backwards]:()=>{qn(w,yt.Last,{skipElements:[D.relatedTarget,a]})}})})}),h=Tr(!!(s&2),"focus-trap#tab-lock"),m=Yt(),v=d.useRef(!1),g={ref:t,onKeyDown(D){D.key=="Tab"&&(v.current=!0,m.requestAnimationFrame(()=>{v.current=!1}))},onBlur(D){if(!(s&4))return;let w=zc(i);rt(e.current)&&w.add(e.current);let S=D.relatedTarget;Ht(S)&&S.dataset.headlessuiFocusGuard!=="true"&&(qc(w,S)||(v.current?qn(e.current,Le(f.current,{[Wr.Forwards]:()=>yt.Next,[Wr.Backwards]:()=>yt.Previous})|yt.WrapAround,{relativeTo:D.target}):Ht(D.target)&&Vt(D.target)))}},y=Te();return d.createElement(d.Fragment,null,h&&d.createElement(_r,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Vn.Focusable}),y({ourProps:g,theirProps:l,defaultTag:lb,name:"FocusTrap"}),h&&d.createElement(_r,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Vn.Focusable}))}let cb=Oe(ub),db=Object.assign(cb,{features:On});function fb(n=!0){let r=d.useRef(Ct.slice());return Nr(([e],[t])=>{t===!0&&e===!1&&wo(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=Ct.slice())},[n,Ct,r]),ee(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function pb(n,{ownerDocument:r}){let e=!!(n&8),t=fb(e);Nr(()=>{e||yo(r==null?void 0:r.body)&&Vt(t())},[e]),Ro(()=>{e&&Vt(t())})}function hb(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=Tr(!!(n&1),"focus-trap#initial-focus"),s=Ui();return Nr(()=>{if(n===0)return;if(!i){o!=null&&o.current&&Vt(o.current);return}let l=e.current;l&&wo(()=>{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)Vt(t.current);else{if(n&16){if(qn(l,yt.First|yt.AutoFocus)!==Ei.Error)return}else if(qn(l,yt.First)!==Ei.Error)return;if(o!=null&&o.current&&(Vt(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 mb(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=Ui(),i=!!(n&4);_i(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=zc(t);rt(e.current)&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;rt(c)?qc(l,c)?(o.current=c,Vt(c)):(s.preventDefault(),s.stopPropagation(),Vt(u)):Vt(o.current)},!0)}function qc(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function Uc(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!Cr((r=n.as)!=null?r:Gc)||d.Children.count(n.children)===1}let jo=d.createContext(null);jo.displayName="TransitionContext";var vb=(n=>(n.Visible="visible",n.Hidden="hidden",n))(vb||{});function gb(){let n=d.useContext(jo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function bb(){let n=d.useContext(Wo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Wo=d.createContext(null);Wo.displayName="NestingContext";function Ho(n){return"children"in n?Ho(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Qc(n,r){let e=jt(n),t=d.useRef([]),o=Ui(),a=Yt(),i=ee((h,m=an.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===h);v!==-1&&(Le(m,{[an.Unmount](){t.current.splice(v,1)},[an.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!Ho(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=ee(h=>{let m=t.current.find(({el:v})=>v===h);return m?m.state!=="visible"&&(m.state="visible"):t.current.push({el:h,state:"visible"}),()=>i(h,an.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),f=ee((h,m,v)=>{l.current.splice(0),r&&(r.chains.current[m]=r.chains.current[m].filter(([g])=>g!==h)),r==null||r.chains.current[m].push([h,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[m].push([h,new Promise(g=>{Promise.all(c.current[m].map(([y,D])=>D)).then(()=>g())})]),m==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(m)):v(m)}),p=ee((h,m,v)=>{Promise.all(c.current[m].splice(0).map(([g,y])=>y)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(m))});return d.useMemo(()=>({children:t,register:s,unregister:i,onStart:f,onStop:p,wait:u,chains:c}),[s,i,t,f,p,c,u])}let Gc=d.Fragment,Kc=on.RenderStrategy;function yb(n,r){var e,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:p,leave:h,leaveFrom:m,leaveTo:v,...g}=n,[y,D]=d.useState(null),w=d.useRef(null),S=Uc(n),x=je(...S?[w,r,D]:r===null?[]:[r]),T=(e=g.unmount)==null||e?an.Unmount:an.Hidden,{show:$,appear:C,initial:_}=gb(),[P,F]=d.useState($?"visible":"hidden"),b=bb(),{register:k,unregister:L}=b;be(()=>k(w),[k,w]),be(()=>{if(T===an.Hidden&&w.current){if($&&P!=="visible"){F("visible");return}return Le(P,{hidden:()=>L(w),visible:()=>k(w)})}},[P,w,k,L,$,T]);let N=Yo();be(()=>{if(S&&N&&P==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,P,N,S]);let I=_&&!C,V=C&&$&&_,O=d.useRef(!1),Q=Qc(()=>{O.current||(F("hidden"),L(w))},b),M=ee(z=>{O.current=!0;let U=z?"enter":"leave";Q.onStart(w,U,oe=>{oe==="enter"?a==null||a():oe==="leave"&&(s==null||s())})}),W=ee(z=>{let U=z?"enter":"leave";O.current=!1,Q.onStop(w,U,oe=>{oe==="enter"?i==null||i():oe==="leave"&&(l==null||l())}),U==="leave"&&!Ho(Q)&&(F("hidden"),L(w))});d.useEffect(()=>{S&&o||(M($),W($))},[$,S,o]);let Y=!(!o||!S||!N||I),[,j]=Mi(Y,y,$,{start:M,end:W}),q=sn({ref:x,className:((t=si(g.className,V&&u,V&&c,j.enter&&u,j.enter&&j.closed&&c,j.enter&&!j.closed&&f,j.leave&&h,j.leave&&!j.closed&&m,j.leave&&j.closed&&v,!j.transition&&$&&p))==null?void 0:t.trim())||void 0,...Pi(j)}),X=0;P==="visible"&&(X|=Ue.Open),P==="hidden"&&(X|=Ue.Closed),$&&P==="hidden"&&(X|=Ue.Opening),!$&&P==="visible"&&(X|=Ue.Closing);let R=Te();return d.createElement(Wo.Provider,{value:Q},d.createElement(Hi,{value:X},R({ourProps:q,theirProps:g,defaultTag:Gc,features:Kc,visible:P==="visible",name:"Transition.Child"})))}function wb(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=Uc(n),l=je(...s?[i,r]:r===null?[]:[r]);Yo();let u=Kn();if(e===void 0&&u!==null&&(e=(u&Ue.Open)===Ue.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"),p=Qc(()=>{e||f("hidden")}),[h,m]=d.useState(!0),v=d.useRef([e]);be(()=>{h!==!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:h}),[e,t,h]);be(()=>{e?f("visible"):!Ho(p)&&i.current!==null&&f("hidden")},[e,p]);let y={unmount:o},D=ee(()=>{var x;h&&m(!1),(x=n.beforeEnter)==null||x.call(n)}),w=ee(()=>{var x;h&&m(!1),(x=n.beforeLeave)==null||x.call(n)}),S=Te();return d.createElement(Wo.Provider,{value:p},d.createElement(jo.Provider,{value:g},S({ourProps:{...y,as:d.Fragment,children:d.createElement(Xc,{ref:l,...y,...a,beforeEnter:D,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:Kc,visible:c==="visible",name:"Transition"})))}function xb(n,r){let e=d.useContext(jo)!==null,t=Kn()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement(Qi,{ref:r,...n}):d.createElement(Xc,{ref:r,...n}))}let Qi=Oe(wb),Xc=Oe(yb),Gi=Oe(xb),Jc=Object.assign(Qi,{Child:Gi,Root:Qi});var Eb=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Eb||{}),Db=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(Db||{});let Sb={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},Ki=d.createContext(null);Ki.displayName="DialogContext";function Vo(n){let r=d.useContext(Ki);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Vo),e}return r}function kb(n,r){return Le(r.type,Sb,n,r)}let Zc=Oe(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,p=d.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(p.current||(p.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let h=Kn();o===void 0&&h!==null&&(o=(h&Ue.Open)===Ue.Open);let m=d.useRef(null),v=je(m,r),g=Sn(m.current),y=o?0:1,[D,w]=d.useReducer(kb,{titleId:null,descriptionId:null,panelRef:d.createRef()}),S=ee(()=>a(!1)),x=ee(j=>w({type:0,id:j})),T=Yo()?y===0:!1,[$,C]=Lg(),_={get current(){var j;return(j=D.panelRef.current)!=null?j:m.current}},P=Bc(),{resolveContainers:F}=ab({mainTreeNode:P,portals:$,defaultContainers:[_]}),b=h!==null?(h&Ue.Closing)===Ue.Closing:!1;wi(u||b?!1:T,{allowed:ee(()=>{var j,q;return[(q=(j=m.current)==null?void 0:j.closest("[data-headlessui-portal]"))!=null?q:null]}),disallowed:ee(()=>{var j;return[(j=P==null?void 0:P.closest("body > *:not(#headlessui-portal-root)"))!=null?j:null]})});let k=zn.get(null);be(()=>{if(T)return k.actions.push(t),()=>k.actions.pop(t)},[k,t,T]);let L=ge(k,d.useCallback(j=>k.selectors.isTop(j,t),[k,t]));Ci(L,F,j=>{j.preventDefault(),S()}),rb(L,g==null?void 0:g.defaultView,j=>{j.preventDefault(),j.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),S()}),Oi(u||b?!1:T,g,F),xi(T,m,S);let[N,I]=am(),V=d.useMemo(()=>[{dialogState:y,close:S,setTitleId:x,unmount:c},D],[y,S,x,c,D]),O=Xe({open:y===0}),Q={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:y===0?!0:void 0,"aria-labelledby":D.titleId,"aria-describedby":N,unmount:c},M=!ob(),W=On.None;T&&!u&&(W|=On.RestoreFocus,W|=On.TabLock,l&&(W|=On.AutoFocus),M&&(W|=On.InitialFocus));let Y=Te();return d.createElement(Cg,null,d.createElement(Pc,{force:!0},d.createElement(Bi,null,d.createElement(Ki.Provider,{value:V},d.createElement(Ic,{target:m},d.createElement(Pc,{force:!1},d.createElement(I,{slot:O},d.createElement(C,null,d.createElement(db,{initialFocus:i,initialFocusFallback:m,containers:F,features:W},d.createElement(pm,{value:S},Y({ourProps:Q,theirProps:f,slot:O,defaultTag:Cb,features:_b,visible:y===0,name:"Dialog"})))))))))))}),Cb="div",_b=on.RenderStrategy|on.Static;function Ob(n,r){let{transition:e=!1,open:t,...o}=n,a=Kn(),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(Vc,null,d.createElement(Jc,{show:t,transition:e,unmount:o.unmount},d.createElement(Zc,{ref:r,...o}))):d.createElement(Vc,null,d.createElement(Zc,{ref:r,open:t,...o}))}let Pb="div";function Mb(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Vo("Dialog.Panel"),u=je(r,l.panelRef),c=Xe({open:i===0}),f=ee(g=>{g.stopPropagation()}),p={ref:u,id:t,onClick:f},h=o?Gi:d.Fragment,m=o?{unmount:s}:{},v=Te();return d.createElement(h,{...m},v({ourProps:p,theirProps:a,slot:c,defaultTag:Pb,name:"Dialog.Panel"}))}let Tb="div";function Ib(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Vo("Dialog.Backdrop"),i=Xe({open:o===0}),s={ref:r,"aria-hidden":!0},l=e?Gi:d.Fragment,u=e?{unmount:a}:{},c=Te();return d.createElement(l,{...u},c({ourProps:s,theirProps:t,slot:i,defaultTag:Tb,name:"Dialog.Backdrop"}))}let Nb="h2";function $b(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Vo("Dialog.Title"),s=je(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=Xe({open:a===0}),u={ref:s,id:t};return Te()({ourProps:u,theirProps:o,slot:l,defaultTag:Nb,name:"Dialog.Title"})}let Lb=Oe(Ob),ed=Oe(Mb);Oe(Ib);let td=Oe($b),Hr=Object.assign(Lb,{Panel:ed,Title:td,Description:iu}),nd=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function rd(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!rt(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 nd.test(i)&&(i=i.replace(nd,"")),i}function Fb(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():rd(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return rd(n).trim()}function Ab(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=Fb(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var Rb=Object.defineProperty,Yb=(n,r,e)=>r in n?Rb(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,od=(n,r,e)=>(Yb(n,typeof r!="symbol"?r+"":r,e),e),Ze=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Ze||{}),hn=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(hn||{}),Bo=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(Bo||{}),ad=(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.SelectOption=5]="SelectOption",n[n.RegisterOptions=6]="RegisterOptions",n[n.UnregisterOptions=7]="UnregisterOptions",n[n.SetButtonElement=8]="SetButtonElement",n[n.SetOptionsElement=9]="SetOptionsElement",n[n.SortOptions=10]="SortOptions",n[n.MarkButtonAsMoved=11]="MarkButtonAsMoved",n))(ad||{});function id(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=Si(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 jb={1(n){if(n.dataRef.current.disabled||n.listboxState===1)return n;let r=n.buttonElement?Ut.Tracked(zi(n.buttonElement)):n.buttonPositionState;return{...n,activeOptionIndex:null,pendingFocus:{focus:ce.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:r}},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,frozenValue:!1,pendingFocus:r.focus,listboxState:0,activeOptionIndex:e,__demoMode:!1,buttonPositionState:Ut.Idle}},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===ce.Nothing)return{...s,activeOptionIndex:null};if(r.focus===ce.Specific)return{...s,activeOptionIndex:n.options.findIndex(c=>c.id===r.id)};if(r.focus===ce.Previous){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,p=Xn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});if(p!==null){let h=n.options[p].dataRef.current.domRef;if(((t=f.current)==null?void 0:t.previousElementSibling)===h.current||((o=h.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:p}}}}else if(r.focus===ce.Next){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,p=Xn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});if(p!==null){let h=n.options[p].dataRef.current.domRef;if(((a=f.current)==null?void 0:a.nextElementSibling)===h.current||((i=h.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeOptionIndex:p}}}}let l=id(n),u=Xn(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){return n.dataRef.current.mode===0?{...n,frozenValue:!0}:{...n}},6:(n,r)=>{let e=n.options.concat(r.options),t=n.activeOptionIndex;if(n.pendingFocus.focus!==ce.Nothing&&(t=Xn(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:ce.Nothing},pendingShouldSort:!0}},7:(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}},8:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},9:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element},10:n=>n.pendingShouldSort?{...n,...id(n),pendingShouldSort:!1}:n,11(n){return n.buttonPositionState.kind!=="Tracked"?n:{...n,buttonPositionState:Ut.Moved}}},Wb=class Xf extends pi{constructor(r){super(r),od(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:mi(()=>{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:6,options:e.splice(0)}))]}),unregisterOption:mi(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:mi(()=>{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:()=>{var e;if(this.state.activeOptionIndex!==null){let{dataRef:t}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(t.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(e=this.state.buttonElement)==null||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),od(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},hasFrozenValue(e){return e.frozenValue},shouldScrollIntoView(e,t){return e.__demoMode||e.listboxState!==0||e.activationTrigger===0?!1:this.isActive(e,t)},didButtonMove(e){return e.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=zn.get(null);this.disposables.add(t.on(vi.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))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(Nc(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var o;this.actions.onChange(t.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(o=this.state.buttonElement)==null||o.focus({preventScroll:!0}))})}static new({id:r,__demoMode:e=!1}){return new Xf({id:r,dataRef:{current:{}},listboxState:e?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:ce.Nothing},frozenValue:!1,__demoMode:e,buttonPositionState:Ut.Idle})}reduce(r,e){return Le(e.type,jb,r,e)}};const sd=d.createContext(null);function Xi(n){let r=d.useContext(sd);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,ld),e}return r}function ld({id:n,__demoMode:r=!1}){let e=d.useMemo(()=>Wb.new({id:n,__demoMode:r}),[]);return Ro(()=>e.dispose()),e}let zo=d.createContext(null);zo.displayName="ListboxDataContext";function Vr(n){let r=d.useContext(zo);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Vr),e}return r}let Hb=d.Fragment;function Vb(n,r){let e=d.useId(),t=xo(),{value:o,defaultValue:a,form:i,name:s,onChange:l,by:u,invalid:c=!1,disabled:f=t||!1,horizontal:p=!1,multiple:h=!1,__demoMode:m=!1,...v}=n;const g=p?"horizontal":"vertical";let y=je(r),D=Ql(a),[w=h?[]:void 0,S]=Ul(o,l,D),x=ld({id:e,__demoMode:m}),T=d.useRef({static:!1,hold:!1}),$=d.useRef(new Map),C=mu(u),_=d.useCallback(Y=>Le(P.mode,{[hn.Multi]:()=>w.some(j=>C(j,Y)),[hn.Single]:()=>C(w,Y)}),[w]),P=Xe({value:w,disabled:f,invalid:c,mode:h?hn.Multi:hn.Single,orientation:g,onChange:S,compare:C,isSelected:_,optionsPropsRef:T,listRef:$});be(()=>{x.state.dataRef.current=P},[P]);let F=ge(x,Y=>Y.listboxState),b=zn.get(null),k=ge(b,d.useCallback(Y=>b.selectors.isTop(Y,e),[b,e])),[L,N]=ge(x,Y=>[Y.buttonElement,Y.optionsElement]);Ci(k,[L,N],(Y,j)=>{x.send({type:ad.CloseListbox}),Mu(j,Di.Loose)||(Y.preventDefault(),L==null||L.focus())});let I=Xe({open:F===Ze.Open,disabled:f,invalid:c,value:w}),[V,O]=lu({inherit:!0}),Q={ref:y},M=d.useCallback(()=>{if(D!==void 0)return S==null?void 0:S(D)},[S,D]),W=Te();return d.createElement(O,{value:V,props:{htmlFor:L==null?void 0:L.id},slot:{open:F===Ze.Open,disabled:f}},d.createElement(kc,null,d.createElement(sd.Provider,{value:x},d.createElement(zo.Provider,{value:P},d.createElement(Hi,{value:Le(F,{[Ze.Open]:Ue.Open,[Ze.Closed]:Ue.Closed})},s!=null&&w!=null&&d.createElement(Jl,{disabled:f,data:{[s]:w},form:i,onReset:M}),W({ourProps:Q,theirProps:v,slot:I,defaultTag:Hb,name:"Listbox"}))))))}let Bb="button";function zb(n,r){let e=d.useId(),t=ui(),o=Vr("Listbox.Button"),a=Xi("Listbox.Button"),{id:i=t||`headlessui-listbox-button-${e}`,disabled:s=o.disabled||!1,autoFocus:l=!1,...u}=n,c=je(r,xc(),a.actions.setButtonElement),f=xg(),[p,h,m]=ge(a,N=>[N.listboxState,N.buttonElement,N.optionsElement]),v=p===Ze.Open;Lu(v,{trigger:h,action:d.useCallback(N=>{if(h!=null&&h.contains(N.target))return Bt.Ignore;let I=N.target.closest('[role="option"]:not([data-disabled])');return rt(I)?Bt.Select(I):m!=null&&m.contains(N.target)?Bt.Ignore:Bt.Close},[h,m]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let g=ee(N=>{switch(N.key){case he.Enter:zh(N.currentTarget);break;case he.Space:case he.ArrowDown:N.preventDefault(),a.actions.openListbox({focus:o.value?ce.Nothing:ce.First});break;case he.ArrowUp:N.preventDefault(),a.actions.openListbox({focus:o.value?ce.Nothing:ce.Last});break}}),y=ee(N=>{switch(N.key){case he.Space:N.preventDefault();break}}),D=gu(N=>{var I;a.state.listboxState===Ze.Open?(Ye.flushSync(()=>a.actions.closeListbox()),(I=a.state.buttonElement)==null||I.focus({preventScroll:!0})):(N.preventDefault(),a.actions.openListbox({focus:ce.Nothing}))}),w=ee(N=>N.preventDefault()),S=Or([i]),x=au(),{isFocusVisible:T,focusProps:$}=ai({autoFocus:l}),{isHovered:C,hoverProps:_}=oi({isDisabled:s}),{pressed:P,pressProps:F}=zl({disabled:s}),b=Xe({open:p===Ze.Open,active:P||p===Ze.Open,disabled:s,invalid:o.invalid,value:o.value,hover:C,focus:T,autofocus:l}),k=ge(a,N=>N.listboxState===Ze.Open),L=kr(f(),{ref:c,id:i,type:Au(n,h),"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":k,"aria-labelledby":S,"aria-describedby":x,disabled:s||void 0,autoFocus:l,onKeyDown:g,onKeyUp:y,onKeyPress:w},D,$,_,F);return Te()({ourProps:L,theirProps:u,slot:b,defaultTag:Bb,name:"Listbox.Button"})}let ud=d.createContext(!1),qb="div",Ub=on.RenderStrategy|on.Static;function Qb(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=wc(o),[c,f]=d.useState(null);u&&(a=!0);let p=Vr("Listbox.Options"),h=Xi("Listbox.Options"),[m,v,g,y]=ge(h,R=>[R.listboxState,R.buttonElement,R.optionsElement,R.__demoMode]),D=Sn(v),w=Sn(g),S=Kn(),[x,T]=Mi(s,c,S!==null?(S&Ue.Open)===Ue.Open:m===Ze.Open);xi(x,v,h.actions.closeListbox);let $=y?!1:i&&m===Ze.Open;Oi($,w);let C=y?!1:i&&m===Ze.Open;wi(C,{allowed:d.useCallback(()=>[v,g],[v,g])});let _=ge(h,h.selectors.didButtonMove)?!1:x,P=ge(h,h.selectors.hasFrozenValue)&&!n.static,F=Fo(P,p.value),b=d.useCallback(R=>p.compare(F,R),[p.compare,F]),k=ge(h,R=>{var z;if(u==null||!((z=u==null?void 0:u.to)!=null&&z.includes("selection")))return null;let U=R.options.findIndex(oe=>b(oe.dataRef.current.value));return U===-1&&(U=0),U}),L=(()=>{if(u==null)return;if(k===null)return{...u,inner:void 0};let R=Array.from(p.listRef.current.values());return{...u,inner:{listRef:{current:R},index:k}}})(),[N,I]=Dc(L),V=Ec(),O=je(r,u?N:null,h.actions.setOptionsElement,f),Q=Yt();d.useEffect(()=>{let R=g;R&&m===Ze.Open&&(yo(R)||R==null||R.focus({preventScroll:!0}))},[m,g]);let M=ee(R=>{var z;switch(Q.dispose(),R.key){case he.Space:if(h.state.searchQuery!=="")return R.preventDefault(),R.stopPropagation(),h.actions.search(R.key);case he.Enter:R.preventDefault(),R.stopPropagation(),h.actions.selectActiveOption();break;case Le(p.orientation,{vertical:he.ArrowDown,horizontal:he.ArrowRight}):return R.preventDefault(),R.stopPropagation(),h.actions.goToOption({focus:ce.Next});case Le(p.orientation,{vertical:he.ArrowUp,horizontal:he.ArrowLeft}):return R.preventDefault(),R.stopPropagation(),h.actions.goToOption({focus:ce.Previous});case he.Home:case he.PageUp:return R.preventDefault(),R.stopPropagation(),h.actions.goToOption({focus:ce.First});case he.End:case he.PageDown:return R.preventDefault(),R.stopPropagation(),h.actions.goToOption({focus:ce.Last});case he.Escape:R.preventDefault(),R.stopPropagation(),Ye.flushSync(()=>h.actions.closeListbox()),(z=h.state.buttonElement)==null||z.focus({preventScroll:!0});return;case he.Tab:R.preventDefault(),R.stopPropagation(),Ye.flushSync(()=>h.actions.closeListbox()),zm(h.state.buttonElement,R.shiftKey?yt.Previous:yt.Next);break;default:R.key.length===1&&(h.actions.search(R.key),Q.setTimeout(()=>h.actions.clearSearch(),350));break}}),W=ge(h,R=>{var z;return(z=R.buttonElement)==null?void 0:z.id}),Y=Xe({open:m===Ze.Open}),j=kr(u?V():{},{id:t,ref:O,"aria-activedescendant":ge(h,h.selectors.activeDescendantId),"aria-multiselectable":p.mode===hn.Multi?!0:void 0,"aria-labelledby":W,"aria-orientation":p.orientation,onKeyDown:M,role:"listbox",tabIndex:m===Ze.Open?0:void 0,style:{...l.style,...I,"--button-width":ci(x,v,!0).width},...Pi(T)}),q=Te(),X=d.useMemo(()=>p.mode===hn.Multi?p:{...p,isSelected:b},[p,b]);return d.createElement(Bi,{enabled:a?n.static||x:!1,ownerDocument:D},d.createElement(zo.Provider,{value:X},q({ourProps:j,theirProps:l,slot:Y,defaultTag:qb,features:Ub,visible:_,name:"Listbox.Options"})))}let Gb="div";function Kb(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(ud)===!0,l=Vr("Listbox.Option"),u=Xi("Listbox.Option"),c=ge(u,P=>u.selectors.isActive(P,t)),f=l.isSelected(a),p=d.useRef(null),h=Ab(p),m=jt({disabled:o,value:a,domRef:p,get textValue(){return h()}}),v=je(r,p,P=>{P?l.listRef.current.set(t,P):l.listRef.current.delete(t)}),g=ge(u,P=>u.selectors.shouldScrollIntoView(P,t));be(()=>{if(g)return nt().requestAnimationFrame(()=>{var P,F;(F=(P=p.current)==null?void 0:P.scrollIntoView)==null||F.call(P,{block:"nearest"})})},[g,p]),be(()=>{if(!s)return u.actions.registerOption(t,m),()=>u.actions.unregisterOption(t)},[m,t,s]);let y=ee(P=>{if(o)return P.preventDefault();u.actions.selectOption(a)}),D=ee(()=>{if(o)return u.actions.goToOption({focus:ce.Nothing});u.actions.goToOption({focus:ce.Specific,id:t})}),w=ju(),S=ee(P=>w.update(P)),x=ee(P=>{w.wasMoved(P)&&(o||c&&u.state.activationTrigger===Bo.Pointer||u.actions.goToOption({focus:ce.Specific,id:t},Bo.Pointer))}),T=ee(P=>{w.wasMoved(P)&&(o||c&&u.state.activationTrigger===Bo.Pointer&&u.actions.goToOption({focus:ce.Nothing}))}),$=Xe({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&s}),C=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:y,onFocus:D,onPointerEnter:S,onMouseEnter:S,onPointerMove:x,onMouseMove:x,onPointerLeave:T,onMouseLeave:T},_=Te();return!f&&s?null:_({ourProps:C,theirProps:i,slot:$,defaultTag:Gb,name:"Listbox.Option"})}let Xb=d.Fragment;function Jb(n,r){let{options:e,placeholder:t,...o}=n,a={ref:je(r)},i=Vr("ListboxSelectedOption"),s=Xe({}),l=i.value===void 0||i.value===null||i.mode===hn.Multi&&Array.isArray(i.value)&&i.value.length===0,u=Te();return d.createElement(ud.Provider,{value:!0},u({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:Xb,name:"ListboxSelectedOption"}))}let Zb=Oe(Vb),cd=Oe(zb),ey=Co,dd=Oe(Qb),fd=Oe(Kb),ty=Oe(Jb),ny=Object.assign(Zb,{Button:cd,Label:ey,Options:dd,Option:fd,SelectedOption:ty});const ry=n=>{const{isOpen:r,setIsOpen:e,onClose:t,title:o,image:a,description:i,confirm:s,cancel:l,disableOutsideClick:u,className:c}=n,f=()=>{u||t==null||t()};return A.jsx(Jc,{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:A.jsxs(Hr,{onClose:f,className:"relative z-50 focus:outline-hidden",children:[A.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),A.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:A.jsxs(ed,{className:it(c==null?void 0:c.popup,"ja-break-all flex w-[90vw] max-w-[300px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]"),children:[A.jsxs("div",{className:"flex flex-col gap-[8px]",children:[o&&A.jsx(td,{className:it(c==null?void 0:c.title,"global-break-all text-title-small font-bold text-black"),children:o}),a&&A.jsx("img",{className:c==null?void 0:c.image,src:a.url,alt:a.alt}),i&&i!==""&&A.jsx(iu,{className:it(c==null?void 0:c.description,"text-petnow-grey-tertiary text-body-large popup-scrollbar max-h-[314px] overflow-y-auto break-all"),children:i})]}),A.jsxs("div",{className:"flex flex-col gap-[8px]",children:[s&&A.jsx("button",{className:"bg-petnow-orange-primary text-label-medium disabled:bg-petnow-orange-80 w-full rounded-[12px] py-[12px] font-bold text-white duration-200 enabled:cursor-pointer enabled:active:brightness-90 enabled:sm:hover:brightness-90",onClick:s.onClick,disabled:s.disabled,children:s.text}),l&&A.jsx("button",{onClick:()=>e(!1),className:"text-label-medium bg-background-tertiary text-petnow-grey-secondary disabled:bg-background-secondary w-full rounded-[12px] py-[12px] font-bold duration-200 enabled:cursor-pointer enabled:active:brightness-90 enabled:sm:hover:brightness-90",disabled:l.disabled,children:l.text})]})]})})]})})},oy=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>A.jsxs("label",{htmlFor:r,className:"relative inline-flex cursor-pointer items-center",children:[A.jsx("input",{type:"checkbox",disabled:o,checked:a,id:r,name:e,className:"peer sr-only",onChange:t}),A.jsx("div",{className:it(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 pd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hd=d.createContext&&d.createContext(pd),ay=["attr","size","title"];function iy(n,r){if(n==null)return{};var e=sy(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 sy(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 qo(){return qo=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},qo.apply(this,arguments)}function md(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 Uo(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?md(Object(e),!0).forEach(function(t){ly(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):md(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function ly(n,r,e){return r=uy(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function uy(n){var r=cy(n,"string");return typeof r=="symbol"?r:r+""}function cy(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 vd(n){return n&&n.map((r,e)=>d.createElement(r.tag,Uo({key:e},r.attr),vd(r.child)))}function Br(n){return r=>d.createElement(dy,qo({attr:Uo({},n.attr)},r),vd(n.child))}function dy(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=iy(n,ay),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",qo({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:Uo(Uo({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 hd!==void 0?d.createElement(hd.Consumer,null,e=>r(e)):r(pd)}function fy(n){return Br({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 gd(n){return Br({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 py=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return A.jsxs(A.Fragment,{children:[A.jsx(hy,{isOpen:o,setIsOpen:a,termImageUrl:t}),A.jsxs("div",{className:"inline-flex items-center",children:[A.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[A.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)}}),A.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:A.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:A.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&&A.jsxs("div",{className:"flex items-center",children:[A.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),A.jsx(fy,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},hy=({isOpen:n,setIsOpen:r,termImageUrl:e})=>A.jsxs(Hr,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[A.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),A.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:A.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:A.jsxs(Hr.Panel,{className:"mx-auto flex max-w-sm flex-col items-center rounded-sm bg-white",children:[A.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:A.jsx(gd,{size:20,className:"mr-2",onClick:()=>r(!1)})}),A.jsx("img",{src:e,alt:"약관동의 이미지"})]})})})]});var Ji=function(n,r){return Ji=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])},Ji(n,r)},Zn=function(){return Zn=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},Zn.apply(this,arguments)};function my(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 Zi,bd="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",vy=(Zi=null,function(n){return n===void 0&&(n=bd),Zi||(Zi=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)}))}),gy=d.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),by={width:"100%",height:400},yy={scriptUrl:bd,errorMessage:gy,autoClose:!0},wy=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=my(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new t(Zn(Zn({},f),{oncomplete:function(p){s&&s(p),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}Ji(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||(vy(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:Zn(Zn({},by),o)},l&&a)},r.defaultProps=yy,r}(d.Component);const xy=({label:n,value:r,onFrontChange:e,onBackChange:t,onPostalCodeChange:o,disabled:a})=>{const[i,s]=d.useState(!1),l=f=>{let p=f.address,h="";f.addressType==="R"&&(f.bname!==""&&(h+=f.bname),f.buildingName!==""&&(h+=h!==""?`, ${f.buildingName}`:f.buildingName),p+=h!==""?` (${h})`:""),e(p),o&&o(f.zonecode),s(!1)},u=()=>{s(!0)},c=()=>r.front?r.front:A.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return A.jsxs(A.Fragment,{children:[A.jsx(Ey,{isOpen:i,setIsOpen:s,handleComplete:l}),A.jsxs("div",{className:"text-petnow-grey-tertiary",children:[A.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),A.jsxs("div",{className:"relative flex flex-col",children:[A.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()}),A.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)})]})]})]})},Ey=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return A.jsx(Hr,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:A.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:A.jsx(Hr.Panel,{children:A.jsxs("div",{children:[A.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>e(!1),children:A.jsx(gd,{size:24,onClick:()=>e(!1)})}),A.jsx(wy,{onComplete:t,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})};function Dy(n){return Br({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 Sy(n){return Br({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 ky=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return A.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:[A.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:[A.jsxs("p",{className:it("mr-4 text-lg font-medium md:text-xl",e),children:[A.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?A.jsx(Sy,{className:"text-petnow-orange-primary min-w-6",size:24}):A.jsx(Dy,{className:"text-petnow-orange-primary min-w-6",size:24})]}),A.jsx("p",{className:it(`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})]})},yd=6048e5,Cy=864e5,Qo=6e4,Go=36e5,_y=1e3,wd=Symbol.for("constructDateFrom");function Se(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&wd in n?n[wd](r):n instanceof Date?new n.constructor(r):new Date(r)}function re(n,r){return Se(r||n,n)}function wt(n,r,e){const t=re(n,e==null?void 0:e.in);return isNaN(r)?Se((e==null?void 0:e.in)||n,NaN):(r&&t.setDate(t.getDate()+r),t)}function xt(n,r,e){const t=re(n,e==null?void 0:e.in);if(isNaN(r))return Se(n,NaN);if(!r)return t;const o=t.getDate(),a=Se(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 xd(n,r,e){return Se(n,+re(n)+r)}function Oy(n,r,e){return xd(n,r*Go)}let Py={};function Pn(){return Py}function Qt(n,r){var s,l,u,c;const e=Pn(),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=re(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 er(n,r){return Qt(n,{...r,weekStartsOn:1})}function Ed(n,r){const e=re(n,r==null?void 0:r.in),t=e.getFullYear(),o=Se(e,0);o.setFullYear(t+1,0,4),o.setHours(0,0,0,0);const a=er(o),i=Se(e,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=er(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function Ko(n){const r=re(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 Gt(n,...r){const e=Se.bind(null,r.find(t=>typeof t=="object"));return r.map(e)}function Mn(n,r){const e=re(n,r==null?void 0:r.in);return e.setHours(0,0,0,0),e}function tr(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r),a=Mn(t),i=Mn(o),s=+a-Ko(a),l=+i-Ko(i);return Math.round((s-l)/Cy)}function My(n,r){const e=Ed(n,r),t=Se(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),er(t)}function es(n,r,e){const t=re(n,e==null?void 0:e.in);return t.setTime(t.getTime()+r*Qo),t}function ts(n,r,e){return xt(n,r*3,e)}function Ty(n,r,e){return xd(n,r*1e3)}function Xo(n,r,e){return wt(n,r*7,e)}function Kt(n,r,e){return xt(n,r*12,e)}function Dd(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=Se.bind(null,o));const a=re(o,t);(!e||e<a||isNaN(+a))&&(e=a)}),Se(t,e||NaN)}function Sd(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=Se.bind(null,o));const a=re(o,t);(!e||e>a||isNaN(+a))&&(e=a)}),Se(t,e||NaN)}function Iy(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r);return+Mn(t)==+Mn(o)}function Xt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Jo(n){return!(!Xt(n)&&typeof n!="number"||isNaN(+re(n)))}function Zo(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function Tn(n,r){const e=re(n,r==null?void 0:r.in);return Math.trunc(e.getMonth()/3)+1}function ea(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=Tn(t)-Tn(o);return a*4+i}function ta(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r);return t.getFullYear()-o.getFullYear()}function Ny(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r),a=kd(t,o),i=Math.abs(tr(t,o));t.setDate(t.getDate()-a*i);const s=+(kd(t,o)===-a),l=a*(i-s);return l===0?0:l}function kd(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 Cd(n,r){const e=re(n,r==null?void 0:r.in);return e.setHours(23,59,59,999),e}function _d(n,r){const e=re(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 ns(n,r){const e=re(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 Od(n,r){const e=re(n,r==null?void 0:r.in);return e.setDate(1),e.setHours(0,0,0,0),e}function Pd(n,r){const e=re(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 na(n,r){const e=re(n,r==null?void 0:r.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function $y(n,r){var s,l;const e=Pn(),t=e.weekStartsOn??((l=(s=e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=re(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 Ly={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"}},Fy=(n,r,e)=>{let t;const o=Ly[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 nr(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Ay={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ry={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jy={date:nr({formats:Ay,defaultWidth:"full"}),time:nr({formats:Ry,defaultWidth:"full"}),dateTime:nr({formats:Yy,defaultWidth:"full"})},Wy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hy=(n,r,e,t)=>Wy[n];function Ot(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 Vy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},By={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},zy={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"]},qy={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"]},Uy={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"}},Qy={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"}},Gy={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:Ot({values:Vy,defaultWidth:"wide"}),quarter:Ot({values:By,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ot({values:zy,defaultWidth:"wide"}),day:Ot({values:qy,defaultWidth:"wide"}),dayPeriod:Ot({values:Uy,defaultWidth:"wide",formattingValues:Qy,defaultFormattingWidth:"wide"})};function Pt(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)?Xy(s,f=>f.test(i)):Ky(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 Ky(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function Xy(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function Md(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 Jy=/^(\d+)(th|st|nd|rd)?/i,Zy=/\d+/i,ew={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},tw={any:[/^b/i,/^(a|c)/i]},nw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rw={any:[/1/i,/2/i,/3/i,/4/i]},ow={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},aw={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]},iw={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},sw={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]},lw={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},uw={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}},cw={ordinalNumber:Md({matchPattern:Jy,parsePattern:Zy,valueCallback:n=>parseInt(n,10)}),era:Pt({matchPatterns:ew,defaultMatchWidth:"wide",parsePatterns:tw,defaultParseWidth:"any"}),quarter:Pt({matchPatterns:nw,defaultMatchWidth:"wide",parsePatterns:rw,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Pt({matchPatterns:ow,defaultMatchWidth:"wide",parsePatterns:aw,defaultParseWidth:"any"}),day:Pt({matchPatterns:iw,defaultMatchWidth:"wide",parsePatterns:sw,defaultParseWidth:"any"}),dayPeriod:Pt({matchPatterns:lw,defaultMatchWidth:"any",parsePatterns:uw,defaultParseWidth:"any"})},Td={code:"en-US",formatDistance:Fy,formatLong:jy,formatRelative:Hy,localize:Gy,match:cw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dw(n,r){const e=re(n,r==null?void 0:r.in);return tr(e,na(e))+1}function rs(n,r){const e=re(n,r==null?void 0:r.in),t=+er(e)-+My(e);return Math.round(t/yd)+1}function os(n,r){var c,f,p,h;const e=re(n,r==null?void 0:r.in),t=e.getFullYear(),o=Pn(),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??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=Se((r==null?void 0:r.in)||n,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=Qt(i,r),l=Se((r==null?void 0:r.in)||n,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const u=Qt(l,r);return+e>=+s?t+1:+e>=+u?t:t-1}function fw(n,r){var s,l,u,c;const e=Pn(),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=os(n,r),a=Se((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),Qt(a,r)}function Id(n,r){const e=re(n,r==null?void 0:r.in),t=+Qt(e,r)-+fw(e,r);return Math.round(t/yd)+1}function ke(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const mn={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return ke(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):ke(e+1,2)},d(n,r){return ke(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 ke(n.getHours()%12||12,r.length)},H(n,r){return ke(n.getHours(),r.length)},m(n,r){return ke(n.getMinutes(),r.length)},s(n,r){return ke(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),o=Math.trunc(t*Math.pow(10,e-3));return ke(o,r.length)}},rr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Nd={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 mn.y(n,r)},Y:function(n,r,e,t){const o=os(n,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return ke(i,2)}return r==="Yo"?e.ordinalNumber(a,{unit:"year"}):ke(a,r.length)},R:function(n,r){const e=Ed(n);return ke(e,r.length)},u:function(n,r){const e=n.getFullYear();return ke(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 ke(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 ke(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 mn.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 ke(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"}):ke(o,r.length)},I:function(n,r,e){const t=rs(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):ke(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):mn.d(n,r)},D:function(n,r,e){const t=dw(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):ke(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 ke(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 ke(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 ke(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=rr.noon:t===0?o=rr.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=rr.evening:t>=12?o=rr.afternoon:t>=4?o=rr.morning:o=rr.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 mn.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):mn.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):ke(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):ke(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):mn.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):mn.s(n,r)},S:function(n,r){return mn.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return Ld(t);case"XXXX":case"XX":return In(t);case"XXXXX":case"XXX":default:return In(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return Ld(t);case"xxxx":case"xx":return In(t);case"xxxxx":case"xxx":default:return In(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+$d(t,":");case"OOOO":default:return"GMT"+In(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+$d(t,":");case"zzzz":default:return"GMT"+In(t,":")}},t:function(n,r,e){const t=Math.trunc(+n/1e3);return ke(t,r.length)},T:function(n,r,e){return ke(+n,r.length)}};function $d(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+ke(a,2)}function Ld(n,r){return n%60===0?(n>0?"-":"+")+ke(Math.abs(n)/60,2):In(n,r)}function In(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=ke(Math.trunc(t/60),2),a=ke(t%60,2);return e+o+r+a}const Fd=(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"})}},Ad=(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"})}},as={p:Ad,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return Fd(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}}",Fd(t,r)).replace("{{time}}",Ad(o,r))}},pw=/^D+$/,hw=/^Y+$/,mw=["D","DD","YY","YYYY"];function vw(n){return pw.test(n)}function gw(n){return hw.test(n)}function bw(n,r,e){const t=yw(n,r,e);if(console.warn(t),mw.includes(n))throw new RangeError(t)}function yw(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 ww=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ew=/^'([^]*?)'?$/,Dw=/''/g,Sw=/[a-zA-Z]/;function Rd(n,r,e){var c,f,p,h,m,v,g,y;const t=Pn(),o=(e==null?void 0:e.locale)??t.locale??Td,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??((h=(p=t.locale)==null?void 0:p.options)==null?void 0:h.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??((y=(g=t.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=re(n,e==null?void 0:e.in);if(!Jo(s))throw new RangeError("Invalid time value");let l=r.match(xw).map(D=>{const w=D[0];if(w==="p"||w==="P"){const S=as[w];return S(D,o.formatLong)}return D}).join("").match(ww).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const w=D[0];if(w==="'")return{isToken:!1,value:kw(D)};if(Nd[w])return{isToken:!0,value:D};if(w.match(Sw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:D}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(D=>{if(!D.isToken)return D.value;const w=D.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&gw(w)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&vw(w))&&bw(w,r,String(n));const S=Nd[w[0]];return S(s,w,o.localize,u)}).join("")}function kw(n){const r=n.match(Ew);return r?r[1].replace(Dw,"'"):n}function Yd(n,r){return re(n,r==null?void 0:r.in).getDate()}function Cw(n,r){return re(n,r==null?void 0:r.in).getDay()}function _w(n,r){const e=re(n,r==null?void 0:r.in),t=e.getFullYear(),o=e.getMonth(),a=Se(e,0);return a.setFullYear(t,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Ow(){return Object.assign({},Pn())}function Jt(n,r){return re(n,r==null?void 0:r.in).getHours()}function Pw(n,r){const e=re(n,r==null?void 0:r.in).getDay();return e===0?7:e}function Zt(n,r){return re(n,r==null?void 0:r.in).getMinutes()}function Je(n,r){return re(n,r==null?void 0:r.in).getMonth()}function vn(n){return re(n).getSeconds()}function is(n){return+re(n)}function le(n,r){return re(n,r==null?void 0:r.in).getFullYear()}function gn(n,r){return+re(n)>+re(r)}function Nn(n,r){return+re(n)<+re(r)}function Mw(n,r){return+re(n)==+re(r)}function Tw(n,r){const e=Iw(r)?new r(0):Se(r,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function Iw(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const Nw=10;class jd{constructor(){Z(this,"subPriority",0)}validate(r,e){return!0}}class $w extends jd{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 Lw extends jd{constructor(e,t){super();Z(this,"priority",Nw);Z(this,"subPriority",-1);this.context=e||(o=>Se(t,o))}set(e,t){return t.timestampIsSet?e:Se(e,Tw(e,this.context))}}class ye{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new $w(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class Fw extends ye{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 Fe={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}/},Mt={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 Ie(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function Tt(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*Go+a*Qo+i*_y),rest:r.slice(e[0].length)}}function Wd(n){return Ie(Fe.anyDigitsSigned,n)}function $e(n,r){switch(n){case 1:return Ie(Fe.singleDigit,r);case 2:return Ie(Fe.twoDigits,r);case 3:return Ie(Fe.threeDigits,r);case 4:return Ie(Fe.fourDigits,r);default:return Ie(new RegExp("^\\d{1,"+n+"}"),r)}}function ra(n,r){switch(n){case 1:return Ie(Fe.singleDigitSigned,r);case 2:return Ie(Fe.twoDigitsSigned,r);case 3:return Ie(Fe.threeDigitsSigned,r);case 4:return Ie(Fe.fourDigitsSigned,r);default:return Ie(new RegExp("^-?\\d{1,"+n+"}"),r)}}function ss(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 Hd(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 Vd(n){return n%400===0||n%4===0&&n%100!==0}class Aw extends ye{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($e(4,e),a);case"yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae($e(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=Hd(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 Rw extends ye{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($e(4,e),a);case"Yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae($e(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=os(e,a);if(o.isTwoDigitYear){const l=Hd(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Qt(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),Qt(e,a)}}class Yw extends ye{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 ra(t==="R"?4:t.length,e)}set(e,t,o){const a=Se(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),er(a)}}class jw extends ye{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 ra(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Ww extends ye{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 $e(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 Hw extends ye{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 $e(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 Vw extends ye{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(Ie(Fe.month,e),a);case"MM":return Ae($e(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 Bw extends ye{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(Ie(Fe.month,e),a);case"LL":return Ae($e(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 zw(n,r,e){const t=re(n,e==null?void 0:e.in),o=Id(t,e)-r;return t.setDate(t.getDate()-o*7),re(t,e==null?void 0:e.in)}class qw extends ye{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 Ie(Fe.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return Qt(zw(e,o,a),a)}}function Uw(n,r,e){const t=re(n,e==null?void 0:e.in),o=rs(t,e)-r;return t.setDate(t.getDate()-o*7),t}class Qw extends ye{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 Ie(Fe.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return er(Uw(e,o))}}const Gw=[31,28,31,30,31,30,31,31,30,31,30,31],Kw=[31,29,31,30,31,30,31,31,30,31,30,31];class Xw extends ye{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 Ie(Fe.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=Vd(o),i=e.getMonth();return a?t>=1&&t<=Kw[i]:t>=1&&t<=Gw[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class Jw extends ye{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 Ie(Fe.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}}validate(e,t){const o=e.getFullYear();return Vd(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 ls(n,r,e){var f,p,h,m;const t=Pn(),o=(e==null?void 0:e.weekStartsOn)??((p=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??t.weekStartsOn??((m=(h=t.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??0,a=re(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 wt(a,c,e)}class Zw extends ye{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=ls(e,o,a),e.setHours(0,0,0,0),e}}class e0 extends ye{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($e(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=ls(e,o,a),e.setHours(0,0,0,0),e}}class t0 extends ye{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($e(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=ls(e,o,a),e.setHours(0,0,0,0),e}}function n0(n,r,e){const t=re(n,e==null?void 0:e.in),o=Pw(t,e),a=r-o;return wt(t,a,e)}class r0 extends ye{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 $e(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=n0(e,o),e.setHours(0,0,0,0),e}}class o0 extends ye{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(ss(o),0,0,0),e}}class a0 extends ye{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(ss(o),0,0,0),e}}class i0 extends ye{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(ss(o),0,0,0),e}}class s0 extends ye{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return Ie(Fe.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 l0 extends ye{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 Ie(Fe.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class u0 extends ye{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return Ie(Fe.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 c0 extends ye{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 Ie(Fe.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 d0 extends ye{constructor(){super(...arguments);Z(this,"priority",60);Z(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return Ie(Fe.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class f0 extends ye{constructor(){super(...arguments);Z(this,"priority",50);Z(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return Ie(Fe.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class p0 extends ye{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($e(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class h0 extends ye{constructor(){super(...arguments);Z(this,"priority",10);Z(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return Tt(Mt.basicOptionalMinutes,e);case"XX":return Tt(Mt.basic,e);case"XXXX":return Tt(Mt.basicOptionalSeconds,e);case"XXXXX":return Tt(Mt.extendedOptionalSeconds,e);case"XXX":default:return Tt(Mt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:Se(e,e.getTime()-Ko(e)-o)}}class m0 extends ye{constructor(){super(...arguments);Z(this,"priority",10);Z(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return Tt(Mt.basicOptionalMinutes,e);case"xx":return Tt(Mt.basic,e);case"xxxx":return Tt(Mt.basicOptionalSeconds,e);case"xxxxx":return Tt(Mt.extendedOptionalSeconds,e);case"xxx":default:return Tt(Mt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:Se(e,e.getTime()-Ko(e)-o)}}class v0 extends ye{constructor(){super(...arguments);Z(this,"priority",40);Z(this,"incompatibleTokens","*")}parse(e){return Wd(e)}set(e,t,o){return[Se(e,o*1e3),{timestampIsSet:!0}]}}class g0 extends ye{constructor(){super(...arguments);Z(this,"priority",20);Z(this,"incompatibleTokens","*")}parse(e){return Wd(e)}set(e,t,o){return[Se(e,o),{timestampIsSet:!0}]}}const b0={G:new Fw,y:new Aw,Y:new Rw,R:new Yw,u:new jw,Q:new Ww,q:new Hw,M:new Vw,L:new Bw,w:new qw,I:new Qw,d:new Xw,D:new Jw,E:new Zw,e:new e0,c:new t0,i:new r0,a:new o0,b:new a0,B:new i0,h:new s0,H:new l0,K:new u0,k:new c0,m:new d0,s:new f0,S:new p0,X:new h0,x:new m0,t:new v0,T:new g0},y0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,w0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,x0=/^'([^]*?)'?$/,E0=/''/g,D0=/\S/,S0=/[a-zA-Z]/;function k0(n,r,e,t){var g,y,D,w,S,x,T,$;const o=()=>Se((t==null?void 0:t.in)||e,NaN),a=Ow(),i=(t==null?void 0:t.locale)??a.locale??Td,s=(t==null?void 0:t.firstWeekContainsDate)??((y=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:y.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(D=a.locale)==null?void 0:D.options)==null?void 0:w.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((x=(S=t==null?void 0:t.locale)==null?void 0:S.options)==null?void 0:x.weekStartsOn)??a.weekStartsOn??(($=(T=a.locale)==null?void 0:T.options)==null?void 0:$.weekStartsOn)??0;if(!r)return n?o():re(e,t==null?void 0:t.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:i},c=[new Lw(t==null?void 0:t.in,e)],f=r.match(w0).map(C=>{const _=C[0];if(_ in as){const P=as[_];return P(C,i.formatLong)}return C}).join("").match(y0),p=[];for(let C of f){const _=C[0],P=b0[_];if(P){const{incompatibleTokens:F}=P;if(Array.isArray(F)){const k=p.find(L=>F.includes(L.token)||L.token===_);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${C}\` at the same time`)}else if(P.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${C}\` and any other token at the same time`);p.push({token:_,fullToken:C});const b=P.run(n,C,i.match,u);if(!b)return o();c.push(b.setter),n=b.rest}else{if(_.match(S0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(C==="''"?C="'":_==="'"&&(C=C0(C)),n.indexOf(C)===0)n=n.slice(C.length);else return o()}}if(n.length>0&&D0.test(n))return o();const h=c.map(C=>C.priority).sort((C,_)=>_-C).filter((C,_,P)=>P.indexOf(C)===_).map(C=>c.filter(_=>_.priority===C).sort((_,P)=>P.subPriority-_.subPriority)).map(C=>C[0]);let m=re(e,t==null?void 0:t.in);if(isNaN(+m))return o();const v={};for(const C of h){if(!C.validate(m,u))return o();const _=C.set(m,v,u);Array.isArray(_)?(m=_[0],Object.assign(v,_[1])):m=_}return m}function C0(n){return n.match(x0)[1].replace(E0,"'")}function _0(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function O0(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r);return+ns(t)==+ns(o)}function P0(n,r,e){const[t,o]=Gt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()}function zr(n,r,e){const t=+re(n,e==null?void 0:e.in),[o,a]=[+re(r.start,e==null?void 0:e.in),+re(r.end,e==null?void 0:e.in)].sort((i,s)=>i-s);return t>=o&&t<=a}function M0(n,r,e){return wt(n,-1,e)}function T0(n,r){const e=()=>Se(r==null?void 0:r.in,NaN),o=L0(n);let a;if(o.date){const u=F0(o.date,2);a=A0(u.restDateString,u.year)}if(!a||isNaN(+a))return e();const i=+a;let s=0,l;if(o.time&&(s=R0(o.time),isNaN(s)))return e();if(o.timezone){if(l=Y0(o.timezone),isNaN(l))return e()}else{const u=new Date(i+s),c=re(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 re(i+s+l,r==null?void 0:r.in)}const oa={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},I0=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,N0=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,$0=/^([+-])(\d{2})(?::?(\d{2}))?$/;function L0(n){const r={},e=n.split(oa.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],oa.timeZoneDelimiter.test(r.date)&&(r.date=n.split(oa.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=oa.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function F0(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 A0(n,r){if(r===null)return new Date(NaN);const e=n.match(I0);if(!e)return new Date(NaN);const t=!!e[4],o=qr(e[1]),a=qr(e[2])-1,i=qr(e[3]),s=qr(e[4]),l=qr(e[5])-1;if(t)return B0(r,s,l)?j0(r,s,l):new Date(NaN);{const u=new Date(0);return!H0(r,a,i)||!V0(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function qr(n){return n?parseInt(n):1}function R0(n){const r=n.match(N0);if(!r)return NaN;const e=us(r[1]),t=us(r[2]),o=us(r[3]);return z0(e,t,o)?e*Go+t*Qo+o*1e3:NaN}function us(n){return n&&parseFloat(n.replace(",","."))||0}function Y0(n){if(n==="Z")return 0;const r=n.match($0);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return q0(t,o)?e*(t*Go+o*Qo):NaN}function j0(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 W0=[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 H0(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(W0[r]||(Bd(n)?29:28))}function V0(n,r){return r>=1&&r<=(Bd(n)?366:365)}function B0(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function z0(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function q0(n,r){return r>=0&&r<=59}function ht(n,r,e){const t=re(n,e==null?void 0:e.in),o=t.getFullYear(),a=t.getDate(),i=Se(n,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=_w(i);return t.setMonth(r,Math.min(a,s)),t}function aa(n,r,e){const t=re(n,e==null?void 0:e.in);return t.setHours(r),t}function ia(n,r,e){const t=re(n,e==null?void 0:e.in);return t.setMinutes(r),t}function or(n,r,e){const t=re(n,e==null?void 0:e.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return ht(t,t.getMonth()+a*3)}function sa(n,r,e){const t=re(n,e==null?void 0:e.in);return t.setSeconds(r),t}function It(n,r,e){const t=re(n,e==null?void 0:e.in);return isNaN(+t)?Se(n,NaN):(t.setFullYear(r),t)}function $n(n,r,e){return xt(n,-r,e)}function zd(n,r,e){return ts(n,-1,e)}function qd(n,r,e){return Xo(n,-1,e)}function ar(n,r,e){return Kt(n,-r,e)}const U0={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}}년"}},Q0=(n,r,e)=>{let t;const o=U0[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},G0={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},K0={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},X0={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},J0={date:nr({formats:G0,defaultWidth:"full"}),time:nr({formats:K0,defaultWidth:"full"}),dateTime:nr({formats:X0,defaultWidth:"full"})},Z0={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},ex=(n,r,e,t)=>Z0[n],tx={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},nx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},rx={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월"]},ox={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},ax={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:"밤"}},ix={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:"밤"}},sx={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:Ot({values:tx,defaultWidth:"wide"}),quarter:Ot({values:nx,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ot({values:rx,defaultWidth:"wide"}),day:Ot({values:ox,defaultWidth:"wide"}),dayPeriod:Ot({values:ax,defaultWidth:"wide",formattingValues:ix,defaultFormattingWidth:"wide"})},lx=/^(\d+)(일|번째)?/i,ux=/\d+/i,cx={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},dx={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},fx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},px={any:[/1/i,/2/i,/3/i,/4/i]},hx={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},mx={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},vx={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},gx={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},bx={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},yx={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},wx={ordinalNumber:Md({matchPattern:lx,parsePattern:ux,valueCallback:n=>parseInt(n,10)}),era:Pt({matchPatterns:cx,defaultMatchWidth:"wide",parsePatterns:dx,defaultParseWidth:"any"}),quarter:Pt({matchPatterns:fx,defaultMatchWidth:"wide",parsePatterns:px,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Pt({matchPatterns:hx,defaultMatchWidth:"wide",parsePatterns:mx,defaultParseWidth:"any"}),day:Pt({matchPatterns:vx,defaultMatchWidth:"wide",parsePatterns:gx,defaultParseWidth:"any"}),dayPeriod:Pt({matchPatterns:bx,defaultMatchWidth:"any",parsePatterns:yx,defaultParseWidth:"any"})},xx={code:"ko",formatDistance:Q0,formatLong:J0,formatRelative:ex,localize:sx,match:wx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ex(){return typeof window<"u"}function Ud(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function Ur(n){return Ex()?n instanceof Element||n instanceof Ud(n).Element:!1}function Dx(n){return Ud(n).getComputedStyle(n)}var la=typeof document<"u"?d.useLayoutEffect:d.useEffect;const Sx={...H}.useInsertionEffect||(n=>n());function kx(n){const r=H.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Sx(()=>{r.current=n}),H.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)},[])}function Qd(n,r,e){let{reference:t,floating:o}=n;const a=lt(r),i=To(r),s=Mo(i),l=pt(r),u=a==="y",c=t.x+t.width/2-o.width/2,f=t.y+t.height/2-o.height/2,p=t[s]/2-o[s]/2;let h;switch(l){case"top":h={x:c,y:t.y-o.height};break;case"bottom":h={x:c,y:t.y+t.height};break;case"right":h={x:t.x+t.width,y:f};break;case"left":h={x:t.x-o.width,y:f};break;default:h={x:t.x,y:t.y}}switch(fn(r)){case"start":h[i]-=p*(e&&u?-1:1);break;case"end":h[i]+=p*(e&&u?-1:1);break}return h}const Cx=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}=Qd(u,t,l),p=t,h={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:y}=s[v],{x:D,y:w,data:S,reset:x}=await y({x:c,y:f,initialPlacement:t,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:n,floating:r}});c=D??c,f=w??f,h={...h,[g]:{...h[g],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):x.rects),{x:c,y:f}=Qd(u,p,l)),v=-1)}return{x:c,y:f,placement:p,strategy:o,middlewareData:h}};async function _x(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:p=!1,padding:h=0}=kt(r,n),m=Ni(h),g=s[p?f==="floating"?"reference":"floating":f],y=pn(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})),D=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)),S=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},x=pn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:D,offsetParent:w,strategy:l}):D);return{top:(y.top-x.top+m.top)/S.y,bottom:(x.bottom-y.bottom+m.bottom)/S.y,left:(y.left-x.left+m.left)/S.x,right:(x.right-y.right+m.right)/S.x}}const Ox=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}=kt(n,r)||{};if(u==null)return{};const f=Ni(c),p={x:e,y:t},h=To(o),m=Mo(h),v=await i.getDimensions(u),g=h==="y",y=g?"top":"left",D=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=a.reference[m]+a.reference[h]-p[h]-a.floating[m],x=p[h]-a.reference[h],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 C=S/2-x/2,_=$/2-v[m]/2-1,P=ft(f[y],_),F=ft(f[D],_),b=P,k=$-v[m]-F,L=$/2-v[m]/2+C,N=Ti(b,L,k),I=!l.arrow&&fn(o)!=null&&L!==N&&a.reference[m]/2-(L<b?P:F)-v[m]/2<0,V=I?L<b?L-b:L-k:0;return{[h]:p[h]+V,data:{[h]:N,centerOffset:L-N-V,...I&&{alignmentOffset:V}},reset:I}}}),Px=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:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=kt(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=pt(o),D=lt(s),w=pt(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=p||(w||!v?[Ar(s)]:Ku(s)),T=m!=="none";!p&&T&&x.push(...Zu(s,v,m,S));const $=[s,...x],C=await _x(r,g),_=[];let P=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&_.push(C[y]),f){const L=Gu(o,i,S);_.push(C[L[0]],C[L[1]])}if(P=[...P,{placement:o,overflows:_}],!_.every(L=>L<=0)){var F,b;const L=(((F=a.flip)==null?void 0:F.index)||0)+1,N=$[L];if(N)return{data:{index:L,overflows:P},reset:{placement:N}};let I=(b=P.filter(V=>V.overflows[0]<=0).sort((V,O)=>V.overflows[1]-O.overflows[1])[0])==null?void 0:b.placement;if(!I)switch(h){case"bestFit":{var k;const V=(k=P.filter(O=>{if(T){const Q=lt(O.placement);return Q===D||Q==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(Q=>Q>0).reduce((Q,M)=>Q+M,0)]).sort((O,Q)=>O[1]-Q[1])[0])==null?void 0:k[0];V&&(I=V);break}case"initialPlacement":I=s;break}if(o!==I)return{reset:{placement:I}}}return{}}}};async function Mx(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=pt(e),s=fn(e),l=lt(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,f=kt(r,n);let{mainAxis:p,crossAxis:h,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"&&(h=s==="end"?m*-1:m),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}const Tx=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 Mx(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}}}}};function Gd(n){const r=He(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Ge(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=qt(e)!==a||qt(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function cs(n){return Pe(n)?n:n.contextElement}function ir(n){const r=cs(n);if(!Ge(r))return Ve(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=Gd(r);let i=(a?qt(e.width):e.width)/t,s=(a?qt(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Ix=Ve(0);function Kd(n){const r=We(n);return!Lr()||!r.visualViewport?Ix:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Nx(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==We(n)?!1:r}function Ln(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=cs(n);let i=Ve(1);r&&(t?Pe(t)&&(i=ir(t)):i=ir(n));const s=Nx(a,e,t)?Kd(a):Ve(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 p=We(a),h=t&&Pe(t)?We(t):t;let m=p,v=Fr(m);for(;v&&t&&h!==m;){const g=ir(v),y=v.getBoundingClientRect(),D=He(v),w=y.left+(v.clientLeft+parseFloat(D.paddingLeft))*g.x,S=y.top+(v.clientTop+parseFloat(D.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=S,m=We(v),v=Fr(m)}}return pn({width:c,height:f,x:l,y:u})}function ds(n,r){const e=un(n).scrollLeft;return r?r.left+e:Ln(qe(n)).left+e}function Xd(n,r,e){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=t.left+r.scrollLeft-(e?0:ds(n,t)),a=t.top+r.scrollTop;return{x:o,y:a}}function $x(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=qe(t),s=r?Cn(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Ve(1);const c=Ve(0),f=Ge(t);if((f||!f&&!a)&&((zt(t)!=="body"||ln(i))&&(l=un(t)),Ge(t))){const h=Ln(t);u=ir(t),c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}const p=i&&!f&&!a?Xd(i,l,!0):Ve(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:e.y*u.y-l.scrollTop*u.y+c.y+p.y}}function Lx(n){return Array.from(n.getClientRects())}function Fx(n){const r=qe(n),e=un(n),t=n.ownerDocument.body,o=Ne(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Ne(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+ds(n);const s=-e.scrollTop;return He(t).direction==="rtl"&&(i+=Ne(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Ax(n,r){const e=We(n),t=qe(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=Lr();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function Rx(n,r){const e=Ln(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=Ge(n)?ir(n):Ve(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 Jd(n,r,e){let t;if(r==="viewport")t=Ax(n,e);else if(r==="document")t=Fx(qe(n));else if(Pe(r))t=Rx(r,e);else{const o=Kd(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return pn(t)}function Zd(n,r){const e=st(n);return e===r||!Pe(e)||St(e)?!1:He(e).position==="fixed"||Zd(e,r)}function Yx(n,r){const e=r.get(n);if(e)return e;let t=cn(n,[],!1).filter(s=>Pe(s)&&zt(s)!=="body"),o=null;const a=He(n).position==="fixed";let i=a?st(n):n;for(;Pe(i)&&!St(i);){const s=He(i),l=$r(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ln(i)&&!l&&Zd(n,i))?t=t.filter(c=>c!==i):o=s,i=st(i)}return r.set(n,t),t}function jx(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?Cn(r)?[]:Yx(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=Jd(r,c,o);return u.top=Ne(f.top,u.top),u.right=ft(f.right,u.right),u.bottom=ft(f.bottom,u.bottom),u.left=Ne(f.left,u.left),u},Jd(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Wx(n){const{width:r,height:e}=Gd(n);return{width:r,height:e}}function Hx(n,r,e){const t=Ge(r),o=qe(r),a=e==="fixed",i=Ln(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Ve(0);if(t||!t&&!a)if((zt(r)!=="body"||ln(o))&&(s=un(r)),t){const p=Ln(r,!0,a,r);l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}else o&&(l.x=ds(o));const u=o&&!t&&!a?Xd(o,s):Ve(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 fs(n){return He(n).position==="static"}function ef(n,r){if(!Ge(n)||He(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return qe(n)===e&&(e=e.ownerDocument.body),e}function tf(n,r){const e=We(n);if(Cn(n))return e;if(!Ge(n)){let o=st(n);for(;o&&!St(o);){if(Pe(o)&&!fs(o))return o;o=st(o)}return e}let t=ef(n,r);for(;t&&zu(t)&&fs(t);)t=ef(t,r);return t&&St(t)&&fs(t)&&!$r(t)?e:t||qu(n)||e}const Vx=async function(n){const r=this.getOffsetParent||tf,e=this.getDimensions,t=await e(n.floating);return{reference:Hx(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Bx(n){return He(n).direction==="rtl"}const zx={convertOffsetParentRelativeRectToViewportRelativeRect:$x,getDocumentElement:qe,getClippingRect:jx,getOffsetParent:tf,getElementRects:Vx,getClientRects:Lx,getDimensions:Wx,getScale:ir,isElement:Pe,isRTL:Bx};function nf(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function qx(n,r){let e=null,t;const o=qe(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:p,height:h}=u;if(s||r(),!p||!h)return;const m=dn(f),v=dn(o.clientWidth-(c+p)),g=dn(o.clientHeight-(f+h)),y=dn(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ne(0,ft(1,l))||1};let S=!0;function x(T){const $=T[0].intersectionRatio;if($!==l){if(!S)return i();$?i(!1,$):t=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!nf(u,n.getBoundingClientRect())&&i(),S=!1}try{e=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(x,w)}e.observe(n)}return i(!0),a}function Ux(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=cs(n),c=o||a?[...u?cn(u):[],...cn(r)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const f=u&&s?qx(u,e):null;let p=-1,h=null;i&&(h=new ResizeObserver(y=>{let[D]=y;D&&D.target===u&&h&&(h.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(r)})),e()}),u&&!l&&h.observe(u),h.observe(r));let m,v=l?Ln(n):null;l&&g();function g(){const y=Ln(n);v&&!nf(v,y)&&e(),v=y,m=requestAnimationFrame(g)}return e(),()=>{var y;c.forEach(D=>{o&&D.removeEventListener("scroll",e),a&&D.removeEventListener("resize",e)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Qx=Tx,Gx=Px,rf=Ox,Kx=(n,r,e)=>{const t=new Map,o={platform:zx,...e},a={...o.platform,_c:t};return Cx(n,r,{...o,platform:a})};var ua=typeof document<"u"?d.useLayoutEffect:d.useEffect;function ca(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(!ca(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)&&!ca(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function of(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function af(n,r){const e=of(n);return Math.round(r*e)/e}function ps(n){const r=H.useRef(n);return ua(()=>{r.current=n}),r}function Xx(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]=H.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[p,h]=H.useState(t);ca(p,t)||h(t);const[m,v]=H.useState(null),[g,y]=H.useState(null),D=H.useCallback(O=>{O!==T.current&&(T.current=O,v(O))},[]),w=H.useCallback(O=>{O!==$.current&&($.current=O,y(O))},[]),S=a||m,x=i||g,T=H.useRef(null),$=H.useRef(null),C=H.useRef(c),_=l!=null,P=ps(l),F=ps(o),b=ps(u),k=H.useCallback(()=>{if(!T.current||!$.current)return;const O={placement:r,strategy:e,middleware:p};F.current&&(O.platform=F.current),Kx(T.current,$.current,O).then(Q=>{const M={...Q,isPositioned:b.current!==!1};L.current&&!ca(C.current,M)&&(C.current=M,fr.flushSync(()=>{f(M)}))})},[p,r,e,F,b]);ua(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[u]);const L=H.useRef(!1);ua(()=>(L.current=!0,()=>{L.current=!1}),[]),ua(()=>{if(S&&(T.current=S),x&&($.current=x),S&&x){if(P.current)return P.current(S,x,k);k()}},[S,x,k,P,_]);const N=H.useMemo(()=>({reference:T,floating:$,setReference:D,setFloating:w}),[D,w]),I=H.useMemo(()=>({reference:S,floating:x}),[S,x]),V=H.useMemo(()=>{const O={position:e,left:0,top:0};if(!I.floating)return O;const Q=af(I.floating,c.x),M=af(I.floating,c.y);return s?{...O,transform:"translate("+Q+"px, "+M+"px)",...of(I.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:Q,top:M}},[e,s,I.floating,c.x,c.y]);return H.useMemo(()=>({...c,update:k,refs:N,elements:I,floatingStyles:V}),[c,k,N,I,V])}const Jx=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?rf({element:t.current,padding:o}).fn(e):{}:t?rf({element:t,padding:o}).fn(e):{}}}},Zx=(n,r)=>({...Qx(n),options:[n,r]}),eE=(n,r)=>({...Gx(n),options:[n,r]}),tE=(n,r)=>({...Jx(n),options:[n,r]}),nE={...H};let sf=!1,rE=0;const lf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+rE++;function oE(){const[n,r]=H.useState(()=>sf?lf():void 0);return la(()=>{n==null&&r(lf())},[]),H.useEffect(()=>{sf=!0},[]),n}const uf=nE.useId||oE;let Qr;process.env.NODE_ENV!=="production"&&(Qr=new Set);function aE(){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=Qr)!=null&&n.has(o))){var a;(a=Qr)==null||a.add(o),console.warn(o)}}function iE(){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=Qr)!=null&&n.has(o))){var a;(a=Qr)==null||a.add(o),console.error(o)}}const sE=H.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:p,d:h,style:{transform:m,...v}={},...g}=r;process.env.NODE_ENV!=="production"&&(e||aE("The `ref` prop is required for `FloatingArrow`."));const y=uf(),[D,w]=H.useState(!1);if(la(()=>{if(!o)return;Dx(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[S,x]=t.split("-"),T=S==="top"||S==="bottom";let $=f;(T&&i!=null&&i.x||!T&&i!=null&&i.y)&&($=null);const C=c*2,_=C/2,P=s/2*(u/-8+1),F=l/2*u/4,b=!!h,k=$&&x==="end"?"bottom":"top";let L=$&&x==="end"?"right":"left";$&&D&&(L=x==="end"?"left":"right");const N=(a==null?void 0:a.x)!=null?$||a.x:"",I=(a==null?void 0:a.y)!=null?$||a.y:"",V=h||"M0,0"+(" H"+s)+(" L"+(s-P)+","+(l-F))+(" Q"+s/2+","+l+" "+P+","+(l-F))+" Z",O={top:b?"rotate(180deg)":"",left:b?"rotate(90deg)":"rotate(-90deg)",bottom:b?"":"rotate(180deg)",right:b?"rotate(-90deg)":"rotate(90deg)"}[S];return A.jsxs("svg",{...g,"aria-hidden":!0,ref:e,width:b?s:s+C,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[L]:N,[k]:I,[S]:T||b?"100%":"calc(100% - "+C/2+"px)",transform:[O,m].filter(Q=>!!Q).join(" "),...v},children:[C>0&&A.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:C+(h?0:1),d:V}),A.jsx("path",{stroke:C&&!h?g.fill:"none",d:V}),A.jsx("clipPath",{id:y,children:A.jsx("rect",{x:-_,y:_*(b?-1:1),width:s+C,height:s})})]})});function lE(){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 uE=H.createContext(null),cE=H.createContext(null),dE=()=>{var n;return((n=H.useContext(uE))==null?void 0:n.id)||null},fE=()=>H.useContext(cE);function pE(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=uf(),a=H.useRef({}),[i]=H.useState(()=>lE()),s=dE()!=null;if(process.env.NODE_ENV!=="production"){const h=t.reference;h&&!Ur(h)&&iE("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]=H.useState(t.reference),c=kx((h,m,v)=>{a.current.openEvent=h?m:void 0,i.emit("openchange",{open:h,event:m,reason:v,nested:s}),e==null||e(h,m,v)}),f=H.useMemo(()=>({setPositionReference:u}),[]),p=H.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return H.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:p,events:i,floatingId:o,refs:f}),[r,c,p,i,o,f])}function hE(n){n===void 0&&(n={});const{nodeId:r}=n,e=pE({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=H.useState(null),[s,l]=H.useState(null),c=(o==null?void 0:o.domReference)||a,f=H.useRef(null),p=fE();la(()=>{c&&(f.current=c)},[c]);const h=Xx({...n,elements:{...o,...s&&{reference:s}}}),m=H.useCallback(w=>{const S=Ur(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(S),h.refs.setReference(S)},[h.refs]),v=H.useCallback(w=>{(Ur(w)||w===null)&&(f.current=w,i(w)),(Ur(h.refs.reference.current)||h.refs.reference.current===null||w!==null&&!Ur(w))&&h.refs.setReference(w)},[h.refs]),g=H.useMemo(()=>({...h.refs,setReference:v,setPositionReference:m,domReference:f}),[h.refs,v,m]),y=H.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),D=H.useMemo(()=>({...h,...t,refs:g,elements:y,nodeId:r}),[h,g,y,r,t]);return la(()=>{t.dataRef.current.floatingContext=D;const w=p==null?void 0:p.nodesRef.current.find(S=>S.id===r);w&&(w.context=D)}),H.useMemo(()=>({...h,context:D,refs:g,elements:y}),[h,g,y,D])}/*!
|
|
77
77
|
react-datepicker v8.4.0
|
|
78
78
|
https://github.com/Hacker0x01/react-datepicker
|
|
79
79
|
Released under the MIT License.
|
|
80
|
-
*/var us=function(r,e){return us=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])},us(r,e)};function Xe(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");us(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 Nt(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 rE=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)},oE=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},sa=function(n){var r=n.children,e=n.onClickOutside,t=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=oE(e,i);return d.createElement("div",{className:t,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},X;(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"})(X||(X={}));function Jd(){var n=typeof window<"u"?window:globalThis;return n}var Ur=12;function xe(n){if(n==null)return new Date;var r=typeof n=="string"?y0(n):ae(n);return la(r)?r:new Date}function cs(n,r,e,t,o){o===void 0&&(o=xe());for(var a=ar(e)||ar(fs()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var u=l[s],c=p0(n,u,o,{locale:a});if(la(c)&&(!t||n===Me(c,u,e)))return c}return null}function la(n,r){return Qo(n)&&!Pn(n,new Date("1/1/1800"))}function Me(n,r,e){if(e==="en")return _d(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?ar(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||ar(fs()),_d(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function ht(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&Me(n,o,t)||""}var Zd=" - ";function aE(n,r,e){if(!n)return"";var t=ht(n,e),o=r?ht(r,e):"";return"".concat(t).concat(Zd).concat(o)}function iE(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?ht(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=ht(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function ds(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 ta(na(ra(n,s),a),t)}function sE(n){return Ji(n)}function lE(n,r){return Me(n,"ddd",r)}function ua(n){return On(n)}function gn(n,r,e){var t=ar(r||fs());return Ut(n,{locale:t,weekStartsOn:e})}function Zt(n){return gd(n)}function Qr(n){return Jo(n)}function ef(n){return Xi(n)}function tf(){return On(xe())}function nf(n){return md(n)}function uE(n){return Ey(n)}function cE(n){return vd(n)}function $t(n,r){return n&&r?g0(n,r):!n&&!r}function Ze(n,r){return n&&r?m0(n,r):!n&&!r}function ca(n,r){return n&&r?v0(n,r):!n&&!r}function ve(n,r){return n&&r?wy(n,r):!n&&!r}function $n(n,r){return n&&r?bw(n,r):!n&&!r}function Gr(n,r,e){var t,o=On(r),a=md(e);try{t=Br(n,{start:o,end:a})}catch{t=!1}return t}function fs(){var n=Jd();return n.__localeId__}function ar(n){if(typeof n=="string"){var r=Jd();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function dE(n,r,e){return r(Me(n,"EEEE",e))}function fE(n,r){return Me(n,"EEEEEE",r)}function pE(n,r){return Me(n,"EEE",r)}function ps(n,r){return Me(pt(xe(),n),"LLLL",r)}function rf(n,r){return Me(pt(xe(),n),"LLL",r)}function hE(n,r){return Me(nr(xe(),n),"QQQ",r)}function mt(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 Kr(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 Br(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 Br(n,{start:f,end:h})})||u&&!u(xe(n))||!1}function hs(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 Br(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 of(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Kr(n,{minDate:t?gd(t):void 0,maxDate:o?vd(o):void 0})||(a==null?void 0:a.some(function(l){return Ze(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ze(n,l)})||s&&!s(xe(n))||!1}function da(n,r,e,t){var o=le(n),a=Je(n),i=le(r),s=Je(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 mE(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return Kr(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return Ze(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return Ze(s,n)})||!1}function fa(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Kr(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return ca(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return ca(n,l)})||s&&!s(xe(n))||!1}function pa(n,r,e){if(!r||!e||!Qo(r)||!Qo(e))return!1;var t=le(r),o=le(e);return t<=n&&o>=n}function ha(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 Kr(l,{minDate:t?Jo(t):void 0,maxDate:o?bd(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 ma(n,r,e,t){var o=le(n),a=Mn(n),i=le(r),s=Mn(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 Kr(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 af(n,r){return r.some(function(e){return Xt(e)===Xt(n)&&Jt(e)===Jt(n)&&mn(e)===mn(n)})}function sf(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&af(n,t)||o&&!af(n,o)||a&&!a(n)||!1}function lf(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=ta(o,Xt(n)),o=na(o,Jt(n)),o=ra(o,mn(n));var a=xe();a=ta(a,Xt(e)),a=na(a,Jt(e)),a=ra(a,mn(e));var i=xe();i=ta(i,Xt(t)),i=na(i,Jt(t)),i=ra(i,mn(t));var s;try{s=!Br(o,{start:a,end:i})}catch{s=!1}return s}function uf(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=In(n,1);return t&&Go(t,a)>0||o&&o.every(function(i){return Go(i,a)>0})||!1}function cf(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=wt(n,1);return t&&Go(a,t)>0||o&&o.every(function(i){return Go(a,i)>0})||!1}function vE(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Jo(n),i=$d(a);return t&&Ko(t,i)>0||o&&o.every(function(s){return Ko(s,i)>0})||!1}function gE(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=bd(n),i=Ki(a,1);return t&&Ko(i,t)>0||o&&o.every(function(s){return Ko(i,s)>0})||!1}function df(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=rr(n,1);return t&&Xo(t,a)>0||o&&o.every(function(i){return Xo(i,a)>0})||!1}function bE(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?Ur:o,i=Qr(rr(n,a)),s=bn(i,a).endPeriod,l=t&&le(t);return l&&l>s||!1}function ff(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=Gt(n,1);return t&&Xo(a,t)>0||o&&o.every(function(i){return Xo(a,i)>0})||!1}function yE(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?Ur:o,i=Gt(n,a),s=bn(i,a).startPeriod,l=t&&le(t);return l&&l<s||!1}function pf(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return Zn(o,r)>=0});return pd(t)}else return e?pd(e):r}function hf(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return Zn(o,r)<=0});return fd(t)}else return e?fd(e):r}function mf(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(Kt(i)){var s=Me(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=Me(m,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function wE(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function xE(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(Kt(o)){var i=Me(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&wE(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?Nt(Nt([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function EE(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=vy(l,Xt(u)),l=Gi(l,Jt(u)),l=yy(l,mn(u)));var c=Gi(n,(e+1)*t);vn(l,r)&&Pn(l,c)&&u!=null&&i.push(u)}return i}function vf(n){return n<10?"0".concat(n):"".concat(n)}function bn(n,r){r===void 0&&(r=Ur);var e=Math.ceil(le(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function DE(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 gf(n){var r=n.getSeconds(),e=n.getMilliseconds();return ae(n.getTime()-r*1e3-e)}function SE(n,r){return gf(n).getTime()===gf(r).getTime()}function bf(n){if(!Kt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function yf(n,r){if(!Kt(n)||!Kt(r))throw new Error("Invalid date received");var e=bf(n),t=bf(r);return Pn(e,t)}function wf(n){return n.key===X.Space}var kE=function(n){Xe(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),CE=function(n){Xe(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===X.Space&&(t.preventDefault(),t.key=X.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),mt(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 hs(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return ve(e.props.day,gn(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&ve(t,gn(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=Me(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=Me(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:Gr(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&&(Pn(h,f)||$n(h,f))?Gr(a,h,f):s&&c&&(vn(h,c)||$n(h,c))||l&&c&&!f&&(vn(h,c)||$n(h,c))?Gr(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=hw(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===Je(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(Je(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 Qe("react-datepicker__day",o,"react-datepicker__day--"+lE(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(Me(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=Me(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(Od(e.props.day),e.props.day):Od(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),_E=function(n){Xe(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===X.Space&&(t.preventDefault(),t.key=X.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:Qe(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),OE=function(n){Xe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return mt(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):sE(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),o=yt(t,6),a=new Date(t);a<=o;){if(!e.isDisabled(a))return!1;a=yt(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(_E,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=yt(t,s);return d.createElement(CE,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 gn(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:Qe(e)},this.renderDays())},r}(d.Component),Xr,ME=6,ir={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ms=(Xr={},Xr[ir.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Xr[ir.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Xr[ir.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Xr),va=1;function xf(n,r){return n?ir.FOUR_COLUMNS:r?ir.TWO_COLUMNS:ir.THREE_COLUMNS}var TE=function(n){Xe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=Nt([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=Nt([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return mt(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 hs(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:Ze(pt(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ca(nr(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ze(pt(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ca(nr(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?da(h,f,t,i):l&&c||u&&c&&!f?da(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=pt(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?Ze(u,c):Ze(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=pt(i,t),f=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?Ze(c,f):Ze(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?ma(h,f,t,i):l&&c||u&&c&&!f?ma(c,h,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=yt(t,6);return Ze(t,o)||Ze(a,o)},e.isCurrentMonth=function(t,o){return le(t)===le(xe())&&o===Je(xe())},e.isCurrentQuarter=function(t,o){return le(t)===le(xe())&&o===Mn(xe())},e.isSelectedMonth=function(t,o,a){return Je(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 Mn(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=Je(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=gn(Zt(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(m){return e.props.showWeekPicker?gn(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(m){return e.props.showWeekPicker?gn(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(OE,me({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:Je(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:f,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Uo(s,1);var h=o&&a>=ME,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(Zt(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter(Zt(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=xf(p,m),g=e.getVerticalOffset(v),y=(i=ms[v])===null||i===void 0?void 0:i.grid,E=function(N,_,O){var M,L,b=_,k=O;switch(N){case X.ArrowRight:b=wt(_,va),k=O===11?0:O+va;break;case X.ArrowLeft:b=In(_,va),k=O===0?11:O-va;break;case X.ArrowUp:b=In(_,g),k=!((M=y==null?void 0:y[0])===null||M===void 0)&&M.includes(O)?O+12-g:O-g;break;case X.ArrowDown:b=wt(_,g),k=!((L=y==null?void 0:y[y.length-1])===null||L===void 0)&&L.includes(O)?O-12+g:O+g;break}return{newCalculatedDate:b,newCalculatedMonth:k}},w=function(N,_,O){for(var M=40,L=N,b=!1,k=0,$=E(L,_,O),Y=$.newCalculatedDate,I=$.newCalculatedMonth;!b;){if(k>=M){Y=_,I=O;break}if(f&&Y<f){L=X.ArrowRight;var V=E(L,Y,I);Y=V.newCalculatedDate,I=V.newCalculatedMonth}if(h&&Y>h){L=X.ArrowLeft;var V=E(L,Y,I);Y=V.newCalculatedDate,I=V.newCalculatedMonth}if(mE(Y,e.props)){var V=E(L,Y,I);Y=V.newCalculatedDate,I=V.newCalculatedMonth}else b=!0;k++}return{newCalculatedDate:Y,newCalculatedMonth:I}};if(o===X.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var S=w(o,u,a),x=S.newCalculatedDate,T=S.newCalculatedMonth;switch(o){case X.ArrowRight:case X.ArrowLeft:case X.ArrowUp:case X.ArrowDown:e.handleMonthNavigation(T,x);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=ms[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!==X.Tab&&t.preventDefault(),i||e.handleKeyboardNavigation(t,l,o),s&&s(t)},e.onQuarterClick=function(t,o){var a=nr(e.props.day,o);fa(a,e.props)||e.handleDayClick(ef(a),t)},e.onQuarterMouseEnter=function(t){var o=nr(e.props.day,t);fa(o,e.props)||e.handleDayMouseEnter(ef(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 X.Enter:e.onQuarterClick(t,o),(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,e.props.selected);break;case X.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===4?1:o+1,Ki(e.props.preSelection,1));break;case X.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,$d(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=pt(i,t);return{isDisabled:(o=(s||l||u||c)&&of(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(pt(a,t)):void 0,f=e.getSelection();return Qe("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?da(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=Je(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=Mn(e.props.preSelection),a=fa(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=pt(u,t),h=e.isDisabled(f)||e.isExcluded(f)?l:i;return"".concat(h," ").concat(Me(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)&&fa(nr(a,t),e.props);return Qe("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?ma(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=rf(t,s),c=ps(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=hE(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=ms[xf(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){wf(m)&&(m.preventDefault(),m.key=X.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 Qe("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(Me(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),PE=function(n){Xe(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(sa,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),IE=function(n){Xe(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(PE,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 rf(a,e.props.locale)}:function(a){return ps(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 NE(n,r){for(var e=[],t=Zt(n),o=Zt(r);!vn(t,o);)e.push(xe(t)),t=wt(t,1);return e}var $E=function(n){Xe(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=ts(o),i=$t(t.props.date,o)&&Ze(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"},"✓"):"",Me(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:NE(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=Qe({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(sa,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),LE=function(n){Xe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=Zt(e.props.minDate),o=Zt(e.props.maxDate),a=[];!vn(t,o);){var i=ts(t);a.push(d.createElement("option",{key:i,value:i},Me(t,e.props.dateFormat,e.props.locale))),t=wt(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:ts(Zt(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=Me(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($E,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)&&Ze(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),FE=function(n){Xe(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)&&lf(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&sf(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&SE(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&lf(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&sf(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&&(Xt(t)*3600+Jt(t)*60+mn(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===X.Space&&(t.preventDefault(),t.key=X.Enter),(t.key===X.ArrowUp||t.key===X.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===X.ArrowDown||t.key===X.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===X.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=ua(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,y){return g.getTime()-y.getTime()}),c=60*DE(s),f=c/i,h=0;h<f;h++){var p=Gi(l,h*i);if(o.push(p),u){var m=EE(l,p,h,i,u);o=o.concat(m)}}var v=o.reduce(function(g,y){return y.getTime()<=s.getTime()?y: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(y){g===v&&(e.centerLi=y)},onKeyDown:function(y){e.handleOnKeyDown(y,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},Me(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),Ef=3,AE=function(n){Xe(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=Nt([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return mt(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 hs(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=bn(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(It(xe(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&$t(It(xe(),o),t.props.endDate)},t.isInRange=function(o){return pa(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?pa(o,t.selectingDate(),c):s&&u||l&&u&&!c?pa(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=It(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=It(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=Qr(It(t.props.date,o)),h=(i||s||l||u||c)&&ha(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!ve(f,Qr(t.props.selected))&&ve(f,Qr(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(Qr(It(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!==X.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case X.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 X.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,Gt(t.props.preSelection,1));break;case X.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,rr(t.props.preSelection,1));break;case X.ArrowUp:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var p=bn(c,f).startPeriod,m=Ef,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,rr(t.props.preSelection,m));break}case X.ArrowDown:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var y=bn(c,f).endPeriod,m=Ef,v=a+m;if(v>y){var g=f%m;a<=y&&a>y-g?m=g:m+=g,v=a+m}t.handleYearNavigation(v,Gt(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 Qe("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h==null?void 0:h(It(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||u||c||f)&&ha(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=ha(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=bn(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){wf(g)&&(g.preventDefault(),g.key=X.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 RE(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 YE=function(n){Xe(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:RE(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=Qe({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(sa,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),WE=function(n){Xe(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(YE,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),jE=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],HE=function(n){var r=(n.className||"").split(/\s+/);return jE.some(function(e){return r.indexOf(e)>=0})},BE=function(n){Xe(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;HE(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=pf(t.props),u=hf(t.props),c=xe(),f=s||i||a;return f||(l&&Pn(c,l)?l:u&&vn(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:wt(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:In(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:It(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(!mt(o,t.props))return o;for(var a=Zt(o),i=cE(o),s=xy(i,a),l=null,u=0;u<=s;u++){var c=yt(a,u);if(!mt(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:It(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:pt(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:It(pt(i,Je(o)),le(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=gn(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=yt(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":Me(l,"EEEE",t.props.locale),className:Qe("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?dE(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?pE(o,a):fE(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:rr(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=In(t.state.date,u),f;switch(!0){case t.props.showMonthYearPicker:f=df(t.state.date,t.props);break;case t.props.showYearPicker:f=bE(t.state.date,t.props);break;case t.props.showQuarterYearPicker:f=vE(t.state.date,t.props);break;default:f=uf(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,y=g.previousMonthButtonLabel,E=y===void 0?r.defaultProps.previousMonthButtonLabel:y,w=g.previousYearButtonLabel,S=w===void 0?r.defaultProps.previousYearButtonLabel:w,x=t.props,T=x.previousMonthAriaLabel,N=T===void 0?typeof E=="string"?E:"Previous Month":T,_=x.previousYearAriaLabel,O=_===void 0?typeof S=="string"?S:"Previous Year":_;return d.createElement("button",{type:"button",className:p.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?O:N},d.createElement("span",{className:h.join(" ")},v?S:E))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Gt(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=ff(t.state.date,t.props);break;case t.props.showYearPicker:a=yE(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=gE(t.state.date,t.props);break;default:a=cf(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,y=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:y},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(" ")},Me(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(WE,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(IE,me({},r.defaultProps,t.props,{month:Je(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(LE,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(tf(),o),t.props.setPreSelection&&t.props.setPreSelection(tf())},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=uf(t.state.date,t.props),c=cf(t.state.date,t.props),f=df(t.state.date,t.props),h=ff(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=bn(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?Gt(t.state.date,l):In(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?Gt(u,h):wt(u,h),m="month-".concat(f),v=f<s-1,g=f>0;i.push(d.createElement("div",{key:m,ref:function(y){t.monthContainer=y??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:p,i:f}),d.createElement(TE,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(AE,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(FE,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&&la(o)&&!!t.props.selected,i=a?"".concat(vf(o.getHours()),":").concat(vf(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(kE,me({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=bn(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(ps(Je(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:Ur}},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=!Ze(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||rE;return d.createElement(sa,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:Qe("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),VE=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"}))},Df=function(n){Xe(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 Le.createPortal(this.props.children,this.el)},r}(d.Component),zE="[tabindex], a, button, input, select, textarea",qE=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},Sf=function(n){Xe(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(zE),1,-1).filter(qE)},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 UE(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=nE(me({open:!o,whileElementsMounted:Lx,placement:e.popperPlacement,middleware:Nt([Hx({padding:15}),jx(10),Bx({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 QE=function(n){Xe(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=Qe("react-datepicker-popper",t);v=d.createElement(Sf,{enableTabLoop:u},d.createElement("div",{ref:p.refs.setFloating,style:p.floatingStyles,className:g,"data-placement":p.placement,onKeyDown:c},s,m&&d.createElement(Gx,{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(Df,{portalId:f,portalHost:h},v));var y=Qe("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:p.refs.setReference,className:y},l),v)},r}(d.Component),GE=UE(QE),kf="react-datepicker-ignore-onclickoutside";function KE(n,r){return n&&r?Je(n)!==Je(r)||le(n)!==le(r):n!==r}var vs="Date input not valid.",XE=function(n){Xe(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 la(s)?Nt(Nt([],a,!0),[me(me({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=pf(t.props),s=hf(t.props),l=i&&Pn(a,ua(i))?i:s&&vn(a,nf(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:mf(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:gs},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Kt(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:JE});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,y=(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("-")?Zd:"-",2).map(function(L){return L.trim()}),S=w[0],x=w[1],T=cs(S??"",g,t.props.locale,y),N=cs(x??"",g,t.props.locale,y),_=(m==null?void 0:m.getTime())!==(T==null?void 0:T.getTime()),O=(v==null?void 0:v.getTime())!==(N==null?void 0:N.getTime());if(!_&&!O||T&&mt(T,t.props)||N&&mt(N,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[T,N],f)}else{var M=cs(E,g,t.props.locale,y,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(M||!E)&&t.setSelected(M,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||!yf(o,l))&&t.setOpen(!1)}}},t.setSelected=function(o,a,i,s){var l,u,c=o;if(t.props.showYearPicker){if(c!==null&&ha(le(c),t.props))return}else if(t.props.showMonthYearPicker){if(c!==null&&of(c,t.props))return}else if(c!==null&&mt(c,t.props))return;var f=t.props,h=f.onChange,p=f.selectsRange,m=f.startDate,v=f.endDate,g=f.selectsMultiple,y=f.selectedDates,E=f.minTime,w=f.swapRange;if(!$n(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=ds(c,{hour:Xt(t.props.selected),minute:Jt(t.props.selected),second:mn(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&E&&(c=ds(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 S=!m&&!v,x=m&&!v,T=m&&v;S?h==null||h([c,null],a):x&&(c===null?h==null||h([null,null],a):yf(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(!(y!=null&&y.length))h==null||h([c],a);else{var N=y.some(function(O){return ve(O,c)});if(N){var _=y.filter(function(O){return!ve(O,c)});h==null||h(_,a)}else h==null||h(Nt(Nt([],y,!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=Kt(t.props.minDate),i=Kt(t.props.maxDate),s=!0;if(o){var l=ua(o);if(a&&i)s=Gr(o,t.props.minDate,t.props.maxDate);else if(a){var u=ua(t.props.minDate);s=vn(o,u)||$n(l,u)}else if(i){var c=nf(t.props.maxDate);s=Pn(o,c)||$n(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:ds(s,{hour:Xt(o),minute:Jt(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===X.ArrowDown||f===X.ArrowUp||f===X.Enter)&&((s=t.onInputClick)===null||s===void 0||s.call(t));return}if(t.state.open){if(f===X.ArrowDown||f===X.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===X.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===gs?(t.handleSelect(m,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(m)):t.setOpen(!1)):f===X.Escape?(o.preventDefault(),o.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):f===X.Tab&&t.setOpen(!1),t.inputOk()||(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:vs})}},t.onPortalKeyDown=function(o){var a=o.key;a===X.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,y=f.locale,E=f.calendarStartDay,w=f.adjustDateOnChange,S=f.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var x=o.key,T=o.shiftKey,N=xe(t.state.preSelection),_=function(Y,I){var V=I;switch(Y){case X.ArrowRight:V=v?Uo(I,1):yt(I,1);break;case X.ArrowLeft:V=v?Ld(I):b0(I);break;case X.ArrowUp:V=Ld(I);break;case X.ArrowDown:V=Uo(I,1);break;case X.PageUp:V=T?rr(I,1):In(I,1);break;case X.PageDown:V=T?Gt(I,1):wt(I,1);break;case X.Home:V=gn(I,y,E);break;case X.End:V=uE(I);break}return V},O=function(Y,I){for(var V=40,C=Y,q=!1,P=0,W=_(Y,I);!q;){if(P>=V){W=I;break}h&&W<h&&(C=X.ArrowRight,W=mt(h,t.props)?_(C,W):h),p&&W>p&&(C=X.ArrowLeft,W=mt(p,t.props)?_(C,W):p),mt(W,t.props)?((C===X.PageUp||C===X.Home)&&(C=X.ArrowRight),(C===X.PageDown||C===X.End)&&(C=X.ArrowLeft),W=_(C,W)):q=!0,P++}return W};if(x===X.Enter){o.preventDefault(),t.handleSelect(N,o),!g&&t.setPreSelection(N);return}else if(x===X.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:vs});return}var M=null;switch(x){case X.ArrowLeft:case X.ArrowRight:case X.ArrowUp:case X.ArrowDown:case X.PageUp:case X.PageDown:case X.Home:case X.End:M=O(x,N);break}if(!M){(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:vs});return}if(o.preventDefault(),t.setState({lastPreSelectChange:gs}),w&&t.setSelected(M),t.setPreSelection(M),S){var L=Je(N),b=Je(M),k=le(N),$=le(M);L!==b||k!==$?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===X.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(BE,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:xE(t.modifyHolidays()),outsideClickIgnoreClass:kf,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(ht(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+ht(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(ht(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(ht(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(ht(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(ht(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(ht(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=Qe(t.props.className,(o={},o[kf]=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?aE(t.props.startDate,t.props.endDate,{dateFormat:h,locale:p}):t.props.selectsMultiple?iE((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:h,locale:p}):ht(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=Qe(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:Qe("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:Ur,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&&KE(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:mf(this.props.highlightDates)}),!t.focused&&!$n(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(VE,me({icon:o,className:Qe(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(Sf,{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(Df,me({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(GE,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),JE="input",gs="navigate";const ZE=({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)=>R.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||R.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 R.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[R.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),R.jsx(XE,{disabledKeyboardNavigation:!0,locale:ux,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:R.jsx(l,{}),renderCustomHeader:({date:c,changeYear:f,changeMonth:h,decreaseMonth:p,increaseMonth:m})=>R.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[R.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:R.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),R.jsxs("div",{className:"text-lg",children:[R.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=>R.jsx("option",{value:v,children:v},v))}),R.jsx("span",{className:"mr-2 ml-1",children:"년"}),R.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[Je(c)],onChange:({target:{value:v}})=>h(s.indexOf(v)),children:s.map(v=>R.jsx("option",{value:v,children:v},v))}),R.jsx("span",{className:"mx-1",children:"월"})]}),R.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:R.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&R.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function eD(n){return Hr({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 tD=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>R.jsx("div",{className:"text-petnow-grey-tertiary relative",children:R.jsxs(Vb,{disabled:a,onChange:o,children:[R.jsx(Eo,{className:"text-xl font-bold text-black",children:n}),R.jsxs(Zc,{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?R.jsx("p",{children:e.name}):R.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",R.jsx(eD,{className:"absolute right-4 bottom-5"})]}),R.jsx(ed,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>R.jsx(td,{value:i,as:R.Fragment,children:({focus:s,selected:l})=>R.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))})]})}),nD=({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 R.jsxs("div",{children:[R.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:R.jsxs(Vg,{onChange:m=>{o(m)},disabled:a,children:[R.jsx(Eo,{className:"text-xl font-bold text-black",children:n}),R.jsx(Oc,{"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"}),R.jsx(Mc,{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=>R.jsx(Tc,{value:m,as:d.Fragment,children:({focus:v,selected:g})=>R.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&&R.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})};Ce.AccordionCard=py,Ce.Checkbox=Zp,Ce.Chip=eh,Ce.LabeledAddressInput=uy,Ce.LabeledAutocomplete=nD,Ce.LabeledCheckbox=ty,Ce.LabeledDatepicker=ZE,Ce.LabeledSelect=tD,Ce.Popup=zb,Ce.Radio=Sp,Ce.Tabs=Jp,Ce.Toggle=qb,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})});
|
|
80
|
+
*/var hs=function(r,e){return hs=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])},hs(r,e)};function Ke(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");hs(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 Nt(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 mE=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)},vE=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},da=function(n){var r=n.children,e=n.onClickOutside,t=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=vE(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 cf(){var n=typeof window<"u"?window:globalThis;return n}var Gr=12;function Ee(n){if(n==null)return new Date;var r=typeof n=="string"?T0(n):re(n);return fa(r)?r:new Date}function ms(n,r,e,t,o){o===void 0&&(o=Ee());for(var a=sr(e)||sr(gs()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var u=l[s],c=k0(n,u,o,{locale:a});if(fa(c)&&(!t||n===Me(c,u,e)))return c}return null}function fa(n,r){return Jo(n)&&!Nn(n,new Date("1/1/1800"))}function Me(n,r,e){if(e==="en")return Rd(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?sr(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||sr(gs()),Rd(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function mt(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&Me(n,o,t)||""}var df=" - ";function gE(n,r,e){if(!n)return"";var t=mt(n,e),o=r?mt(r,e):"";return"".concat(t).concat(df).concat(o)}function bE(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?mt(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=mt(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function vs(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 aa(ia(sa(n,s),a),t)}function yE(n){return rs(n)}function wE(n,r){return Me(n,"ddd",r)}function pa(n){return Mn(n)}function bn(n,r,e){var t=sr(r||gs());return Qt(n,{locale:t,weekStartsOn:e})}function en(n){return Od(n)}function Kr(n){return na(n)}function ff(n){return ns(n)}function pf(){return Mn(Ee())}function hf(n){return Cd(n)}function xE(n){return $y(n)}function EE(n){return _d(n)}function $t(n,r){return n&&r?P0(n,r):!n&&!r}function et(n,r){return n&&r?_0(n,r):!n&&!r}function ha(n,r){return n&&r?O0(n,r):!n&&!r}function ve(n,r){return n&&r?Iy(n,r):!n&&!r}function Fn(n,r){return n&&r?Mw(n,r):!n&&!r}function Xr(n,r,e){var t,o=Mn(r),a=Cd(e);try{t=zr(n,{start:o,end:a})}catch{t=!1}return t}function gs(){var n=cf();return n.__localeId__}function sr(n){if(typeof n=="string"){var r=cf();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function DE(n,r,e){return r(Me(n,"EEEE",e))}function SE(n,r){return Me(n,"EEEEEE",r)}function kE(n,r){return Me(n,"EEE",r)}function bs(n,r){return Me(ht(Ee(),n),"LLLL",r)}function mf(n,r){return Me(ht(Ee(),n),"LLL",r)}function CE(n,r){return Me(or(Ee(),n),"QQQ",r)}function vt(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 Jr(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,p=c.end;return zr(n,{start:f,end:p})})||s&&!s.some(function(c){return ve(n,c)})||l&&!l.some(function(c){var f=c.start,p=c.end;return zr(n,{start:f,end:p})})||u&&!u(Ee(n))||!1}function ys(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 zr(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 vf(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Jr(n,{minDate:t?Od(t):void 0,maxDate:o?_d(o):void 0})||(a==null?void 0:a.some(function(l){return et(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return et(n,l)})||s&&!s(Ee(n))||!1}function ma(n,r,e,t){var o=le(n),a=Je(n),i=le(r),s=Je(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 _E(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return Jr(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return et(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return et(s,n)})||!1}function va(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Jr(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return ha(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return ha(n,l)})||s&&!s(Ee(n))||!1}function ga(n,r,e){if(!r||!e||!Jo(r)||!Jo(e))return!1;var t=le(r),o=le(e);return t<=n&&o>=n}function ba(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 Jr(l,{minDate:t?na(t):void 0,maxDate:o?Pd(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(Ee(l))||!1}function ya(n,r,e,t){var o=le(n),a=Tn(n),i=le(r),s=Tn(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 Jr(n,r){var e,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(e=o&&tr(n,o)<0||a&&tr(n,a)>0)!==null&&e!==void 0?e:!1}function gf(n,r){return r.some(function(e){return Jt(e)===Jt(n)&&Zt(e)===Zt(n)&&vn(e)===vn(n)})}function bf(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&gf(n,t)||o&&!gf(n,o)||a&&!a(n)||!1}function yf(n,r){var e=r.minTime,t=r.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var o=Ee();o=aa(o,Jt(n)),o=ia(o,Zt(n)),o=sa(o,vn(n));var a=Ee();a=aa(a,Jt(e)),a=ia(a,Zt(e)),a=sa(a,vn(e));var i=Ee();i=aa(i,Jt(t)),i=ia(i,Zt(t)),i=sa(i,vn(t));var s;try{s=!zr(o,{start:a,end:i})}catch{s=!1}return s}function wf(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=$n(n,1);return t&&Zo(t,a)>0||o&&o.every(function(i){return Zo(i,a)>0})||!1}function xf(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=xt(n,1);return t&&Zo(a,t)>0||o&&o.every(function(i){return Zo(a,i)>0})||!1}function OE(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=na(n),i=zd(a);return t&&ea(t,i)>0||o&&o.every(function(s){return ea(s,i)>0})||!1}function PE(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=Pd(n),i=ts(a,1);return t&&ea(i,t)>0||o&&o.every(function(s){return ea(i,s)>0})||!1}function Ef(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=ar(n,1);return t&&ta(t,a)>0||o&&o.every(function(i){return ta(i,a)>0})||!1}function ME(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?Gr:o,i=Kr(ar(n,a)),s=yn(i,a).endPeriod,l=t&&le(t);return l&&l>s||!1}function Df(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=Kt(n,1);return t&&ta(a,t)>0||o&&o.every(function(i){return ta(a,i)>0})||!1}function TE(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?Gr:o,i=Kt(n,a),s=yn(i,a).startPeriod,l=t&&le(t);return l&&l<s||!1}function Sf(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return tr(o,r)>=0});return Sd(t)}else return e?Sd(e):r}function kf(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return tr(o,r)<=0});return Dd(t)}else return e?Dd(e):r}function Cf(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(Xt(i)){var s=Me(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 p=0,h=f.length;p<h;p++){var m=f[p];if(m){var s=Me(m,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function IE(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function NE(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(Xt(o)){var i=Me(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&IE(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?Nt(Nt([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function $E(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=Oy(l,Jt(u)),l=es(l,Zt(u)),l=Ty(l,vn(u)));var c=es(n,(e+1)*t);gn(l,r)&&Nn(l,c)&&u!=null&&i.push(u)}return i}function _f(n){return n<10?"0".concat(n):"".concat(n)}function yn(n,r){r===void 0&&(r=Gr);var e=Math.ceil(le(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function LE(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 Of(n){var r=n.getSeconds(),e=n.getMilliseconds();return re(n.getTime()-r*1e3-e)}function FE(n,r){return Of(n).getTime()===Of(r).getTime()}function Pf(n){if(!Xt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function Mf(n,r){if(!Xt(n)||!Xt(r))throw new Error("Invalid date received");var e=Pf(n),t=Pf(r);return Nn(e,t)}function Tf(n){return n.key===K.Space}var AE=function(n){Ke(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],p=c[1];u.setHours(Number(f)),u.setMinutes(Number(p))}(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),RE=function(n){Ke(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),vt(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 ys(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return ve(e.props.day,bn(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&ve(t,bn(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=Me(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=Me(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:Xr(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,p=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(i||s||l)||!p||!u&&e.isDisabled()?!1:i&&f&&(Nn(p,f)||Fn(p,f))?Xr(a,p,f):s&&c&&(gn(p,c)||Fn(p,c))||l&&c&&!f&&(gn(p,c)||Fn(p,c))?Xr(a,c,p):!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=Cw(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===Je(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(Je(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(Ee())},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 Qe("react-datepicker__day",o,"react-datepicker__day--"+wE(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(Me(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=Me(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(Yd(e.props.day),e.props.day):Yd(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),YE=function(n){Ke(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:Qe(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),jE=function(n){Ke(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return vt(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 p=!e.isDisabled(f);if(p){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):yE(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),o=wt(t,6),a=new Date(t);a<=o;){if(!e.isDisabled(a))return!1;a=wt(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(YE,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=wt(t,s);return d.createElement(RE,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 bn(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:Qe(e)},this.renderDays())},r}(d.Component),Zr,WE=6,lr={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ws=(Zr={},Zr[lr.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Zr[lr.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Zr[lr.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Zr),wa=1;function If(n,r){return n?lr.FOUR_COLUMNS:r?lr.TWO_COLUMNS:lr.THREE_COLUMNS}var HE=function(n){Ke(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=Nt([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=Nt([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return vt(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 ys(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:et(ht(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ha(or(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:et(ht(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ha(or(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,p=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!p?!1:s&&f?ma(p,f,t,i):l&&c||u&&c&&!f?ma(c,p,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=ht(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?et(u,c):et(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=ht(i,t),f=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?et(c,f):et(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,p=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!p?!1:s&&f?ya(p,f,t,i):l&&c||u&&c&&!f?ya(c,p,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=wt(t,6);return et(t,o)||et(a,o)},e.isCurrentMonth=function(t,o){return le(t)===le(Ee())&&o===Je(Ee())},e.isCurrentQuarter=function(t,o){return le(t)===le(Ee())&&o===Tn(Ee())},e.isSelectedMonth=function(t,o,a){return Je(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 Tn(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=Je(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=bn(en(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(m){return e.props.showWeekPicker?bn(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(m){return e.props.showWeekPicker?bn(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(jE,me({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:Je(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:f,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Xo(s,1);var p=o&&a>=WE,h=!o&&!e.isWeekInMonth(s);if(p||h)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(en(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter(en(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,p=s.maxDate,h=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(u){var v=If(h,m),g=e.getVerticalOffset(v),y=(i=ws[v])===null||i===void 0?void 0:i.grid,D=function($,C,_){var P,F,b=C,k=_;switch($){case K.ArrowRight:b=xt(C,wa),k=_===11?0:_+wa;break;case K.ArrowLeft:b=$n(C,wa),k=_===0?11:_-wa;break;case K.ArrowUp:b=$n(C,g),k=!((P=y==null?void 0:y[0])===null||P===void 0)&&P.includes(_)?_+12-g:_-g;break;case K.ArrowDown:b=xt(C,g),k=!((F=y==null?void 0:y[y.length-1])===null||F===void 0)&&F.includes(_)?_-12+g:_+g;break}return{newCalculatedDate:b,newCalculatedMonth:k}},w=function($,C,_){for(var P=40,F=$,b=!1,k=0,L=D(F,C,_),N=L.newCalculatedDate,I=L.newCalculatedMonth;!b;){if(k>=P){N=C,I=_;break}if(f&&N<f){F=K.ArrowRight;var V=D(F,N,I);N=V.newCalculatedDate,I=V.newCalculatedMonth}if(p&&N>p){F=K.ArrowLeft;var V=D(F,N,I);N=V.newCalculatedDate,I=V.newCalculatedMonth}if(_E(N,e.props)){var V=D(F,N,I);N=V.newCalculatedDate,I=V.newCalculatedMonth}else b=!0;k++}return{newCalculatedDate:N,newCalculatedMonth:I}};if(o===K.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var S=w(o,u,a),x=S.newCalculatedDate,T=S.newCalculatedMonth;switch(o){case K.ArrowRight:case K.ArrowLeft:case K.ArrowUp:case K.ArrowDown:e.handleMonthNavigation(T,x);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=ws[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=or(e.props.day,o);va(a,e.props)||e.handleDayClick(ff(a),t)},e.onQuarterMouseEnter=function(t){var o=or(e.props.day,t);va(o,e.props)||e.handleDayMouseEnter(ff(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,ts(e.props.preSelection,1));break;case K.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,zd(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=ht(i,t);return{isDisabled:(o=(s||l||u||c)&&vf(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(ht(a,t)):void 0,f=e.getSelection();return Qe("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?ma(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=Je(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=Tn(e.props.preSelection),a=va(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=ht(u,t),p=e.isDisabled(f)||e.isExcluded(f)?l:i;return"".concat(p," ").concat(Me(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,p=o.includeDates,h=o.filterDate,m=o.preSelection,v=o.disabledKeyboardNavigation,g=(u||c||f||p||h)&&va(or(a,t),e.props);return Qe("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?ya(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=mf(t,s),c=bs(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=CE(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=ws[If(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(p,h){return d.createElement("div",{ref:e.MONTH_REFS[p],key:h,onClick:function(m){e.onMonthClick(m,p)},onKeyDown:function(m){Tf(m)&&(m.preventDefault(),m.key=K.Enter),e.onMonthKeyDown(m,p)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(p)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(p)}:void 0,tabIndex:Number(e.getTabIndex(p)),className:e.getMonthClassNames(p),"aria-disabled":e.isMonthDisabled(p),role:"option","aria-label":e.getAriaLabel(p),"aria-current":e.isCurrentMonth(s,p)?"date":void 0,"aria-selected":l?e.isSelectedMonth(s,p,l):void 0},e.getMonthContent(p))}))})},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 Qe("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(Me(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),VE=function(n){Ke(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(da,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),BE=function(n){Ke(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(VE,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 mf(a,e.props.locale)}:function(a){return bs(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 zE(n,r){for(var e=[],t=en(n),o=en(r);!gn(t,o);)e.push(Ee(t)),t=xt(t,1);return e}var qE=function(n){Ke(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=is(o),i=$t(t.props.date,o)&&et(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"},"✓"):"",Me(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:zE(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=Qe({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(da,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),UE=function(n){Ke(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=en(e.props.minDate),o=en(e.props.maxDate),a=[];!gn(t,o);){var i=is(t);a.push(d.createElement("option",{key:i,value:i},Me(t,e.props.dateFormat,e.props.locale))),t=xt(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:is(en(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=Me(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(qE,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=Ee(t);$t(e.props.date,o)&&et(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),QE=function(n){Ke(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)&&yf(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&bf(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&FE(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&yf(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&bf(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&&(Jt(t)*3600+Zt(t)*60+vn(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||Ee(),l=pa(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,y){return g.getTime()-y.getTime()}),c=60*LE(s),f=c/i,p=0;p<f;p++){var h=es(l,p*i);if(o.push(h),u){var m=$E(l,h,p,i,u);o=o.concat(m)}}var v=o.reduce(function(g,y){return y.getTime()<=s.getTime()?y: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(y){g===v&&(e.centerLi=y)},onKeyDown:function(y){e.handleOnKeyDown(y,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},Me(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),Nf=3,GE=function(n){Ke(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=Nt([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return vt(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 ys(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,p=c.yearItemNumber;if(!(f===void 0||p===void 0)){var h=yn(f,p).startPeriod;t.isDisabled(a)||t.isExcluded(a)||((s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,a),o-h<0?t.updateFocusOnPaginate(p-(h-o)):o-h>=p?t.updateFocusOnPaginate(Math.abs(p-(o-h))):(u=(l=t.YEAR_REFS[o-h])===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(Ee())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&$t(It(Ee(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&$t(It(Ee(),o),t.props.endDate)},t.isInRange=function(o){return ga(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?ga(o,t.selectingDate(),c):s&&u||l&&u&&!c?ga(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=It(Ee(),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=It(Ee(),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=Kr(It(t.props.date,o)),p=(i||s||l||u||c)&&ba(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!ve(f,Kr(t.props.selected))&&ve(f,Kr(t.props.preSelection))&&!p}},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(Kr(It(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,u=t.props,c=u.date,f=u.yearItemNumber,p=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,Kt(t.props.preSelection,1));break;case K.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,ar(t.props.preSelection,1));break;case K.ArrowUp:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var h=yn(c,f).startPeriod,m=Nf,v=a-m;if(v<h){var g=f%m;a>=h&&a<h+g?m=g:m+=g,v=a-m}t.handleYearNavigation(v,ar(t.props.preSelection,m));break}case K.ArrowDown:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var y=yn(c,f).endPeriod,m=Nf,v=a+m;if(v>y){var g=f%m;a<=y&&a>y-g?m=g:m+=g,v=a+m}t.handleYearNavigation(v,Kt(t.props.preSelection,m));break}}p&&p(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,p=a.yearClassName;return Qe("react-datepicker__year-text","react-datepicker__year-".concat(o),i?p==null?void 0:p(It(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||u||c||f)&&ba(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=ba(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=yn(a,i),c=u.startPeriod,f=u.endPeriod,p=function(v){t.push(d.createElement("div",{ref:h.YEAR_REFS[v-c],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){Tf(g)&&(g.preventDefault(),g.key=K.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(h.getYearTabIndex(v)),className:h.getYearClassNames(v),onMouseEnter:h.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:h.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:h.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:h.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":h.isCurrentYear(v)?"date":void 0},h.getYearContent(v)))},h=this,m=c;m<=f;m++)p(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 KE(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 XE=function(n){Ke(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:KE(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=Qe({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(da,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),JE=function(n){Ke(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(XE,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),ZE=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],eD=function(n){var r=(n.className||"").split(/\s+/);return ZE.some(function(e){return r.indexOf(e)>=0})},tD=function(n){Ke(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;eD(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=Sf(t.props),u=kf(t.props),c=Ee(),f=s||i||a;return f||(l&&Nn(c,l)?l:u&&gn(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:xt(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:$n(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:It(Ee(),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(!vt(o,t.props))return o;for(var a=en(o),i=EE(o),s=Ny(i,a),l=null,u=0;u<=s;u++){var c=wt(a,u);if(!vt(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:It(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:ht(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:It(ht(i,Je(o)),le(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=bn(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=wt(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":Me(l,"EEEE",t.props.locale),className:Qe("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?DE(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?kE(o,a):SE(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:ar(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=$n(t.state.date,u),f;switch(!0){case t.props.showMonthYearPicker:f=Ef(t.state.date,t.props);break;case t.props.showYearPicker:f=ME(t.state.date,t.props);break;case t.props.showQuarterYearPicker:f=OE(t.state.date,t.props);break;default:f=wf(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 p=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],h=["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&&(h.push("react-datepicker__navigation--previous--disabled"),m=void 0);var v=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,g=t.props,y=g.previousMonthButtonLabel,D=y===void 0?r.defaultProps.previousMonthButtonLabel:y,w=g.previousYearButtonLabel,S=w===void 0?r.defaultProps.previousYearButtonLabel:w,x=t.props,T=x.previousMonthAriaLabel,$=T===void 0?typeof D=="string"?D:"Previous Month":T,C=x.previousYearAriaLabel,_=C===void 0?typeof S=="string"?S:"Previous Year":C;return d.createElement("button",{type:"button",className:h.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?_:$},d.createElement("span",{className:p.join(" ")},v?S:D))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Kt(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=Df(t.state.date,t.props);break;case t.props.showYearPicker:a=TE(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=PE(t.state.date,t.props);break;default:a=xf(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,p=f===void 0?r.defaultProps.nextMonthButtonLabel:f,h=c.nextYearButtonLabel,m=h===void 0?r.defaultProps.nextYearButtonLabel:h,v=t.props,g=v.nextMonthAriaLabel,y=g===void 0?typeof p=="string"?p:"Next Month":g,D=v.nextYearAriaLabel,w=D===void 0?typeof m=="string"?m:"Next Year":D;return d.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?w:y},d.createElement("span",{className:s.join(" ")},u?m:p))}}},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(" ")},Me(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(JE,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(BE,me({},r.defaultProps,t.props,{month:Je(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(UE,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(pf(),o),t.props.setPreSelection&&t.props.setPreSelection(pf())},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=wf(t.state.date,t.props),c=xf(t.state.date,t.props),f=Ef(t.state.date,t.props),p=Df(t.state.date,t.props),h=!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:p})),h&&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=yn(a,u),f=c.startPeriod,p=c.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(p):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?Kt(t.state.date,l):$n(t.state.date,l),c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,f=0;f<s;++f){var p=f-c+l,h=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Kt(u,p):xt(u,p),m="month-".concat(f),v=f<s-1,g=f>0;i.push(d.createElement("div",{key:m,ref:function(y){t.monthContainer=y??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:h,i:f}),d.createElement(HE,me({},r.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:h,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(GE,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(QE,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&&fa(o)&&!!t.props.selected,i=a?"".concat(_f(o.getHours()),":").concat(_f(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(AE,me({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=yn(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(bs(Je(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:Gr}},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=!et(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||mE;return d.createElement(da,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:Qe("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),nD=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"}))},$f=function(n){Ke(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 Ye.createPortal(this.props.children,this.el)},r}(d.Component),rD="[tabindex], a, button, input, select, textarea",oD=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},Lf=function(n){Ke(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(rD),1,-1).filter(oD)},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 aD(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=hE(me({open:!o,whileElementsMounted:Ux,placement:e.popperPlacement,middleware:Nt([eE({padding:15}),Zx(10),tE({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 iD=function(n){Ke(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,p=e.portalHost,h=e.popperProps,m=e.showArrow,v=void 0;if(!i){var g=Qe("react-datepicker-popper",t);v=d.createElement(Lf,{enableTabLoop:u},d.createElement("div",{ref:h.refs.setFloating,style:h.floatingStyles,className:g,"data-placement":h.placement,onKeyDown:c},s,m&&d.createElement(sE,{ref:h.arrowRef,context:h.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($f,{portalId:f,portalHost:p},v));var y=Qe("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:h.refs.setReference,className:y},l),v)},r}(d.Component),sD=aD(iD),Ff="react-datepicker-ignore-onclickoutside";function lD(n,r){return n&&r?Je(n)!==Je(r)||le(n)!==le(r):n!==r}var xs="Date input not valid.",uD=function(n){Ke(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:Ee()},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 fa(s)?Nt(Nt([],a,!0),[me(me({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=Sf(t.props),s=kf(t.props),l=i&&Nn(a,pa(i))?i:s&&gn(a,hf(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:Cf(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:Es},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Xt(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:cD});var p=t.props,h=p.selectsRange,m=p.startDate,v=p.endDate,g=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,y=(a=t.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,D=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(h){var w=D.split(g.includes("-")?df:"-",2).map(function(F){return F.trim()}),S=w[0],x=w[1],T=ms(S??"",g,t.props.locale,y),$=ms(x??"",g,t.props.locale,y),C=(m==null?void 0:m.getTime())!==(T==null?void 0:T.getTime()),_=(v==null?void 0:v.getTime())!==($==null?void 0:$.getTime());if(!C&&!_||T&&vt(T,t.props)||$&&vt($,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[T,$],f)}else{var P=ms(D,g,t.props.locale,y,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(P||!D)&&t.setSelected(P,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||!Mf(o,l))&&t.setOpen(!1)}}},t.setSelected=function(o,a,i,s){var l,u,c=o;if(t.props.showYearPicker){if(c!==null&&ba(le(c),t.props))return}else if(t.props.showMonthYearPicker){if(c!==null&&vf(c,t.props))return}else if(c!==null&&vt(c,t.props))return;var f=t.props,p=f.onChange,h=f.selectsRange,m=f.startDate,v=f.endDate,g=f.selectsMultiple,y=f.selectedDates,D=f.minTime,w=f.swapRange;if(!Fn(t.props.selected,c)||t.props.allowSameDay||h||g)if(c!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(c=vs(c,{hour:Jt(t.props.selected),minute:Zt(t.props.selected),second:vn(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&D&&(c=vs(c,{hour:D.getHours(),minute:D.getMinutes(),second:D.getSeconds()})),t.props.inline||t.setState({preSelection:c}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),h){var S=!m&&!v,x=m&&!v,T=m&&v;S?p==null||p([c,null],a):x&&(c===null?p==null||p([null,null],a):Mf(c,m)?w?p==null||p([c,m],a):p==null||p([c,null],a):p==null||p([m,c],a)),T&&(p==null||p([c,null],a))}else if(g){if(c!==null)if(!(y!=null&&y.length))p==null||p([c],a);else{var $=y.some(function(_){return ve(_,c)});if($){var C=y.filter(function(_){return!ve(_,c)});p==null||p(C,a)}else p==null||p(Nt(Nt([],y,!0),[c],!1),a)}}else p==null||p(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=Xt(t.props.minDate),i=Xt(t.props.maxDate),s=!0;if(o){var l=pa(o);if(a&&i)s=Xr(o,t.props.minDate,t.props.maxDate);else if(a){var u=pa(t.props.minDate);s=gn(o,u)||Fn(l,u)}else if(i){var c=hf(t.props.maxDate);s=Nn(o,c)||Fn(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:vs(s,{hour:Jt(o),minute:Zt(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 p=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"]',h=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(p);h instanceof HTMLElement&&h.focus({preventScroll:!0});return}var m=Ee(t.state.preSelection);f===K.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===Es?(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:xs})}},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,p=f.minDate,h=f.maxDate,m=f.disabledKeyboardNavigation,v=f.showWeekPicker,g=f.shouldCloseOnSelect,y=f.locale,D=f.calendarStartDay,w=f.adjustDateOnChange,S=f.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var x=o.key,T=o.shiftKey,$=Ee(t.state.preSelection),C=function(N,I){var V=I;switch(N){case K.ArrowRight:V=v?Xo(I,1):wt(I,1);break;case K.ArrowLeft:V=v?qd(I):M0(I);break;case K.ArrowUp:V=qd(I);break;case K.ArrowDown:V=Xo(I,1);break;case K.PageUp:V=T?ar(I,1):$n(I,1);break;case K.PageDown:V=T?Kt(I,1):xt(I,1);break;case K.Home:V=bn(I,y,D);break;case K.End:V=xE(I);break}return V},_=function(N,I){for(var V=40,O=N,Q=!1,M=0,W=C(N,I);!Q;){if(M>=V){W=I;break}p&&W<p&&(O=K.ArrowRight,W=vt(p,t.props)?C(O,W):p),h&&W>h&&(O=K.ArrowLeft,W=vt(h,t.props)?C(O,W):h),vt(W,t.props)?((O===K.PageUp||O===K.Home)&&(O=K.ArrowRight),(O===K.PageDown||O===K.End)&&(O=K.ArrowLeft),W=C(O,W)):Q=!0,M++}return W};if(x===K.Enter){o.preventDefault(),t.handleSelect($,o),!g&&t.setPreSelection($);return}else if(x===K.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:xs});return}var P=null;switch(x){case K.ArrowLeft:case K.ArrowRight:case K.ArrowUp:case K.ArrowDown:case K.PageUp:case K.PageDown:case K.Home:case K.End:P=_(x,$);break}if(!P){(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:xs});return}if(o.preventDefault(),t.setState({lastPreSelectChange:Es}),w&&t.setSelected(P),t.setPreSelection(P),S){var F=Je($),b=Je(P),k=le($),L=le(P);F!==b||k!==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(tD,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:NE(t.modifyHolidays()),outsideClickIgnoreClass:Ff,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(mt(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+mt(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(mt(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(mt(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(mt(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(mt(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(mt(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=Qe(t.props.className,(o={},o[Ff]=t.state.open,o)),l=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",c=t.props,f=c.dateFormat,p=f===void 0?r.defaultProps.dateFormat:f,h=c.locale,m=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?gE(t.props.startDate,t.props.endDate,{dateFormat:p,locale:h}):t.props.selectsMultiple?bE((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:p,locale:h}):mt(t.props.selected,{dateFormat:p,locale:h});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=Qe(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,p=f===void 0?"":f,h=o.ariaLabelClose,m=h===void 0?"Close":h,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:Qe("react-datepicker__close-icon",p,{"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:Gr,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&&lD(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:Cf(this.props.highlightDates)}),!t.focused&&!Fn(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(nD,me({icon:o,className:Qe(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(Lf,{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($f,me({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(sD,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),cD="input",Es="navigate";const dD=({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},p)=>A.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:p,children:c||A.jsx("p",{className:"text-petnow-grey-primary",children:r})}));l.displayName="CustomInput";function u(c){const f=c.substring(0,4),p=c.substring(5,7),h=c.substring(8,10);return new Date(Number(f),Number(p)-1,Number(h))}return A.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[A.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),A.jsx(uD,{disabledKeyboardNavigation:!0,locale:xx,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:A.jsx(l,{}),renderCustomHeader:({date:c,changeYear:f,changeMonth:p,decreaseMonth:h,increaseMonth:m})=>A.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[A.jsx("button",{onClick:h,disabled:c.getFullYear()<=1990&&c.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:A.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),A.jsxs("div",{className:"text-lg",children:[A.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=>A.jsx("option",{value:v,children:v},v))}),A.jsx("span",{className:"mr-2 ml-1",children:"년"}),A.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[Je(c)],onChange:({target:{value:v}})=>p(s.indexOf(v)),children:s.map(v=>A.jsx("option",{value:v,children:v},v))}),A.jsx("span",{className:"mx-1",children:"월"})]}),A.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:A.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&A.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function fD(n){return Br({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 pD=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>A.jsx("div",{className:"text-petnow-grey-tertiary relative",children:A.jsxs(ny,{disabled:a,onChange:o,children:[A.jsx(Co,{className:"text-xl font-bold text-black",children:n}),A.jsxs(cd,{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?A.jsx("p",{children:e.name}):A.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",A.jsx(fD,{className:"absolute right-4 bottom-5"})]}),A.jsx(dd,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>A.jsx(fd,{value:i,as:A.Fragment,children:({focus:s,selected:l})=>A.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))})]})}),hD=({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)},p=m=>{u(m.target.value)},h=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 A.jsxs("div",{children:[A.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:A.jsxs(nb,{onChange:m=>{m&&o(m)},disabled:a,children:[A.jsx(Co,{className:"text-xl font-bold text-black",children:n}),A.jsx(Yc,{"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?p:f,onKeyDown:m=>{m.key==="Backspace"&&o({name:void 0,value:void 0})},placeholder:r,autoComplete:"off"}),A.jsx(jc,{className:"absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",style:{bottom:-h.length*60},children:h.map(m=>A.jsx(Wc,{value:m,as:d.Fragment,children:({focus:v,selected:g})=>A.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&&A.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})};_e.AccordionCard=ky,_e.Checkbox=ch,_e.Chip=dh,_e.LabeledAddressInput=xy,_e.LabeledAutocomplete=hD,_e.LabeledCheckbox=py,_e.LabeledDatepicker=dD,_e.LabeledSelect=pD,_e.Popup=ry,_e.Radio=Lp,_e.Tabs=uh,_e.Toggle=oy,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|
|
81
81
|
//# sourceMappingURL=index.umd.js.map
|