beesoft-components 0.4.3 → 0.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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(le,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(le=typeof globalThis<"u"?globalThis:le||self,p(le.BeeSoftComponents={},le.React,le.ReactDOM))})(this,function(le,p,He){"use strict";var mp=Object.defineProperty;var vp=(le,p,He)=>p in le?mp(le,p,{enumerable:!0,configurable:!0,writable:!0,value:He}):le[p]=He;var Y=(le,p,He)=>(vp(le,typeof p!="symbol"?p+"":p,He),He);function Do(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Nt=Do(p);function et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sr={exports:{}},_t={};/**
1
+ (function(le,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(le=typeof globalThis<"u"?globalThis:le||self,p(le.BeeSoftComponents={},le.React,le.ReactDOM))})(this,function(le,p,Ue){"use strict";var mp=Object.defineProperty;var vp=(le,p,Ue)=>p in le?mp(le,p,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):le[p]=Ue;var U=(le,p,Ue)=>(vp(le,typeof p!="symbol"?p+"":p,Ue),Ue);function Do(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Nt=Do(p);function et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sr={exports:{}},_t={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -14,38 +14,38 @@
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 mn;function Io(){return mn||(mn=1,process.env.NODE_ENV!=="production"&&function(){var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),x=Symbol.iterator,D="@@iterator";function P(c){if(c===null||typeof c!="object")return null;var w=x&&c[x]||c[D];return typeof w=="function"?w:null}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z(c){{for(var w=arguments.length,I=new Array(w>1?w-1:0),K=1;K<w;K++)I[K-1]=arguments[K];Z("error",c,I)}}function Z(c,w,I){{var K=_.ReactDebugCurrentFrame,ve=K.getStackAddendum();ve!==""&&(w+="%s",I=I.concat([ve]));var Te=I.map(function(ce){return String(ce)});Te.unshift("Warning: "+w),Function.prototype.apply.call(console[c],console,Te)}}var W=!1,g=!1,$=!1,J=!1,te=!1,B;B=Symbol.for("react.module.reference");function oe(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===i||te||c===a||c===l||c===f||J||c===T||W||g||$||typeof c=="object"&&c!==null&&(c.$$typeof===b||c.$$typeof===h||c.$$typeof===o||c.$$typeof===s||c.$$typeof===u||c.$$typeof===B||c.getModuleId!==void 0))}function re(c,w,I){var K=c.displayName;if(K)return K;var ve=w.displayName||w.name||"";return ve!==""?I+"("+ve+")":I}function G(c){return c.displayName||"Context"}function y(c){if(c==null)return null;if(typeof c.tag=="number"&&z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var w=c;return G(w)+".Consumer";case o:var I=c;return G(I._context)+".Provider";case u:return re(c,c.render,"ForwardRef");case h:var K=c.displayName||null;return K!==null?K:y(c.type)||"Memo";case b:{var ve=c,Te=ve._payload,ce=ve._init;try{return y(ce(Te))}catch{return null}}}return null}var U=Object.assign,q=0,F,ne,L,he,v,E,H;function d(){}d.__reactDisabledLog=!0;function S(){{if(q===0){F=console.log,ne=console.info,L=console.warn,he=console.error,v=console.group,E=console.groupCollapsed,H=console.groupEnd;var c={configurable:!0,enumerable:!0,value:d,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}q++}}function O(){{if(q--,q===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},c,{value:F}),info:U({},c,{value:ne}),warn:U({},c,{value:L}),error:U({},c,{value:he}),group:U({},c,{value:v}),groupCollapsed:U({},c,{value:E}),groupEnd:U({},c,{value:H})})}q<0&&z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var M=_.ReactCurrentDispatcher,A;function j(c,w,I){{if(A===void 0)try{throw Error()}catch(ve){var K=ve.stack.trim().match(/\n( *(at )?)/);A=K&&K[1]||""}return`
18
- `+A+c}}var k=!1,V;{var Ee=typeof WeakMap=="function"?WeakMap:Map;V=new Ee}function C(c,w){if(!c||k)return"";{var I=V.get(c);if(I!==void 0)return I}var K;k=!0;var ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Te;Te=M.current,M.current=null,S();try{if(w){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(Je){K=Je}Reflect.construct(c,[],ce)}else{try{ce.call()}catch(Je){K=Je}c.call(ce.prototype)}}else{try{throw Error()}catch(Je){K=Je}c()}}catch(Je){if(Je&&K&&typeof Je.stack=="string"){for(var ie=Je.stack.split(`
19
- `),Le=K.stack.split(`
17
+ */var mn;function Io(){return mn||(mn=1,process.env.NODE_ENV!=="production"&&function(){var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),x=Symbol.iterator,D="@@iterator";function P(c){if(c===null||typeof c!="object")return null;var w=x&&c[x]||c[D];return typeof w=="function"?w:null}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z(c){{for(var w=arguments.length,I=new Array(w>1?w-1:0),Q=1;Q<w;Q++)I[Q-1]=arguments[Q];K("error",c,I)}}function K(c,w,I){{var Q=_.ReactDebugCurrentFrame,ve=Q.getStackAddendum();ve!==""&&(w+="%s",I=I.concat([ve]));var Te=I.map(function(ce){return String(ce)});Te.unshift("Warning: "+w),Function.prototype.apply.call(console[c],console,Te)}}var W=!1,y=!1,$=!1,X=!1,ee=!1,B;B=Symbol.for("react.module.reference");function oe(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===i||ee||c===a||c===l||c===f||X||c===T||W||y||$||typeof c=="object"&&c!==null&&(c.$$typeof===b||c.$$typeof===h||c.$$typeof===o||c.$$typeof===s||c.$$typeof===u||c.$$typeof===B||c.getModuleId!==void 0))}function te(c,w,I){var Q=c.displayName;if(Q)return Q;var ve=w.displayName||w.name||"";return ve!==""?I+"("+ve+")":I}function ae(c){return c.displayName||"Context"}function g(c){if(c==null)return null;if(typeof c.tag=="number"&&z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var w=c;return ae(w)+".Consumer";case o:var I=c;return ae(I._context)+".Provider";case u:return te(c,c.render,"ForwardRef");case h:var Q=c.displayName||null;return Q!==null?Q:g(c.type)||"Memo";case b:{var ve=c,Te=ve._payload,ce=ve._init;try{return g(ce(Te))}catch{return null}}}return null}var Y=Object.assign,q=0,F,re,L,he,v,E,H;function d(){}d.__reactDisabledLog=!0;function S(){{if(q===0){F=console.log,re=console.info,L=console.warn,he=console.error,v=console.group,E=console.groupCollapsed,H=console.groupEnd;var c={configurable:!0,enumerable:!0,value:d,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}q++}}function O(){{if(q--,q===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},c,{value:F}),info:Y({},c,{value:re}),warn:Y({},c,{value:L}),error:Y({},c,{value:he}),group:Y({},c,{value:v}),groupCollapsed:Y({},c,{value:E}),groupEnd:Y({},c,{value:H})})}q<0&&z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var M=_.ReactCurrentDispatcher,A;function j(c,w,I){{if(A===void 0)try{throw Error()}catch(ve){var Q=ve.stack.trim().match(/\n( *(at )?)/);A=Q&&Q[1]||""}return`
18
+ `+A+c}}var k=!1,V;{var Ee=typeof WeakMap=="function"?WeakMap:Map;V=new Ee}function C(c,w){if(!c||k)return"";{var I=V.get(c);if(I!==void 0)return I}var Q;k=!0;var ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Te;Te=M.current,M.current=null,S();try{if(w){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(Je){Q=Je}Reflect.construct(c,[],ce)}else{try{ce.call()}catch(Je){Q=Je}c.call(ce.prototype)}}else{try{throw Error()}catch(Je){Q=Je}c()}}catch(Je){if(Je&&Q&&typeof Je.stack=="string"){for(var ie=Je.stack.split(`
19
+ `),Le=Q.stack.split(`
20
20
  `),Me=ie.length-1,je=Le.length-1;Me>=1&&je>=0&&ie[Me]!==Le[je];)je--;for(;Me>=1&&je>=0;Me--,je--)if(ie[Me]!==Le[je]){if(Me!==1||je!==1)do if(Me--,je--,je<0||ie[Me]!==Le[je]){var $e=`
21
- `+ie[Me].replace(" at new "," at ");return c.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",c.displayName)),typeof c=="function"&&V.set(c,$e),$e}while(Me>=1&&je>=0);break}}}finally{k=!1,M.current=Te,O(),Error.prepareStackTrace=ve}var It=c?c.displayName||c.name:"",Co=It?j(It):"";return typeof c=="function"&&V.set(c,Co),Co}function ke(c,w,I){return C(c,!1)}function Ae(c){var w=c.prototype;return!!(w&&w.isReactComponent)}function Fe(c,w,I){if(c==null)return"";if(typeof c=="function")return C(c,Ae(c));if(typeof c=="string")return j(c);switch(c){case l:return j("Suspense");case f:return j("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return ke(c.render);case h:return Fe(c.type,w,I);case b:{var K=c,ve=K._payload,Te=K._init;try{return Fe(Te(ve),w,I)}catch{}}}return""}var ft=Object.prototype.hasOwnProperty,vr={},dt=_.ReactDebugCurrentFrame;function Xe(c){if(c){var w=c._owner,I=Fe(c.type,c._source,w?w.type:null);dt.setExtraStackFrame(I)}else dt.setExtraStackFrame(null)}function ln(c,w,I,K,ve){{var Te=Function.call.bind(ft);for(var ce in c)if(Te(c,ce)){var ie=void 0;try{if(typeof c[ce]!="function"){var Le=Error((K||"React class")+": "+I+" type `"+ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Le.name="Invariant Violation",Le}ie=c[ce](w,ce,K,I,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ie=Me}ie&&!(ie instanceof Error)&&(Xe(ve),z("%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).",K||"React class",I,ce,typeof ie),Xe(null)),ie instanceof Error&&!(ie.message in vr)&&(vr[ie.message]=!0,Xe(ve),z("Failed %s type: %s",I,ie.message),Xe(null))}}}var ht=Array.isArray;function Et(c){return ht(c)}function fn(c){{var w=typeof Symbol=="function"&&Symbol.toStringTag,I=w&&c[Symbol.toStringTag]||c.constructor.name||"Object";return I}}function bo(c){try{return gr(c),!1}catch{return!0}}function gr(c){return""+c}function St(c){if(bo(c))return z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",fn(c)),gr(c)}var Q=_.ReactCurrentOwner,be={key:!0,ref:!0,__self:!0,__source:!0},Ye,zt,Ct;Ct={};function yr(c){if(ft.call(c,"ref")){var w=Object.getOwnPropertyDescriptor(c,"ref").get;if(w&&w.isReactWarning)return!1}return c.ref!==void 0}function br(c){if(ft.call(c,"key")){var w=Object.getOwnPropertyDescriptor(c,"key").get;if(w&&w.isReactWarning)return!1}return c.key!==void 0}function wr(c,w){if(typeof c.ref=="string"&&Q.current&&w&&Q.current.stateNode!==w){var I=y(Q.current.type);Ct[I]||(z('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',y(Q.current.type),c.ref),Ct[I]=!0)}}function Tr(c,w){{var I=function(){Ye||(Ye=!0,z("%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)",w))};I.isReactWarning=!0,Object.defineProperty(c,"key",{get:I,configurable:!0})}}function xr(c,w){{var I=function(){zt||(zt=!0,z("%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)",w))};I.isReactWarning=!0,Object.defineProperty(c,"ref",{get:I,configurable:!0})}}var Pr=function(c,w,I,K,ve,Te,ce){var ie={$$typeof:t,type:c,key:w,ref:I,props:ce,_owner:Te};return ie._store={},Object.defineProperty(ie._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ie,"_self",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.defineProperty(ie,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ve}),Object.freeze&&(Object.freeze(ie.props),Object.freeze(ie)),ie};function Er(c,w,I,K,ve){{var Te,ce={},ie=null,Le=null;I!==void 0&&(St(I),ie=""+I),br(w)&&(St(w.key),ie=""+w.key),yr(w)&&(Le=w.ref,wr(w,ve));for(Te in w)ft.call(w,Te)&&!be.hasOwnProperty(Te)&&(ce[Te]=w[Te]);if(c&&c.defaultProps){var Me=c.defaultProps;for(Te in Me)ce[Te]===void 0&&(ce[Te]=Me[Te])}if(ie||Le){var je=typeof c=="function"?c.displayName||c.name||"Unknown":c;ie&&Tr(ce,je),Le&&xr(ce,je)}return Pr(c,ie,Le,ve,K,Q.current,ce)}}var Dt=_.ReactCurrentOwner,wo=_.ReactDebugCurrentFrame;function Ot(c){if(c){var w=c._owner,I=Fe(c.type,c._source,w?w.type:null);wo.setExtraStackFrame(I)}else wo.setExtraStackFrame(null)}var dn;dn=!1;function hn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function To(){{if(Dt.current){var c=y(Dt.current.type);if(c)return`
21
+ `+ie[Me].replace(" at new "," at ");return c.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",c.displayName)),typeof c=="function"&&V.set(c,$e),$e}while(Me>=1&&je>=0);break}}}finally{k=!1,M.current=Te,O(),Error.prepareStackTrace=ve}var It=c?c.displayName||c.name:"",Co=It?j(It):"";return typeof c=="function"&&V.set(c,Co),Co}function ke(c,w,I){return C(c,!1)}function Ae(c){var w=c.prototype;return!!(w&&w.isReactComponent)}function Fe(c,w,I){if(c==null)return"";if(typeof c=="function")return C(c,Ae(c));if(typeof c=="string")return j(c);switch(c){case l:return j("Suspense");case f:return j("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return ke(c.render);case h:return Fe(c.type,w,I);case b:{var Q=c,ve=Q._payload,Te=Q._init;try{return Fe(Te(ve),w,I)}catch{}}}return""}var ft=Object.prototype.hasOwnProperty,vr={},dt=_.ReactDebugCurrentFrame;function Xe(c){if(c){var w=c._owner,I=Fe(c.type,c._source,w?w.type:null);dt.setExtraStackFrame(I)}else dt.setExtraStackFrame(null)}function ln(c,w,I,Q,ve){{var Te=Function.call.bind(ft);for(var ce in c)if(Te(c,ce)){var ie=void 0;try{if(typeof c[ce]!="function"){var Le=Error((Q||"React class")+": "+I+" type `"+ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Le.name="Invariant Violation",Le}ie=c[ce](w,ce,Q,I,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ie=Me}ie&&!(ie instanceof Error)&&(Xe(ve),z("%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).",Q||"React class",I,ce,typeof ie),Xe(null)),ie instanceof Error&&!(ie.message in vr)&&(vr[ie.message]=!0,Xe(ve),z("Failed %s type: %s",I,ie.message),Xe(null))}}}var ht=Array.isArray;function Et(c){return ht(c)}function fn(c){{var w=typeof Symbol=="function"&&Symbol.toStringTag,I=w&&c[Symbol.toStringTag]||c.constructor.name||"Object";return I}}function bo(c){try{return gr(c),!1}catch{return!0}}function gr(c){return""+c}function St(c){if(bo(c))return z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",fn(c)),gr(c)}var G=_.ReactCurrentOwner,be={key:!0,ref:!0,__self:!0,__source:!0},Ye,zt,Ct;Ct={};function yr(c){if(ft.call(c,"ref")){var w=Object.getOwnPropertyDescriptor(c,"ref").get;if(w&&w.isReactWarning)return!1}return c.ref!==void 0}function br(c){if(ft.call(c,"key")){var w=Object.getOwnPropertyDescriptor(c,"key").get;if(w&&w.isReactWarning)return!1}return c.key!==void 0}function wr(c,w){if(typeof c.ref=="string"&&G.current&&w&&G.current.stateNode!==w){var I=g(G.current.type);Ct[I]||(z('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',g(G.current.type),c.ref),Ct[I]=!0)}}function Tr(c,w){{var I=function(){Ye||(Ye=!0,z("%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)",w))};I.isReactWarning=!0,Object.defineProperty(c,"key",{get:I,configurable:!0})}}function xr(c,w){{var I=function(){zt||(zt=!0,z("%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)",w))};I.isReactWarning=!0,Object.defineProperty(c,"ref",{get:I,configurable:!0})}}var Pr=function(c,w,I,Q,ve,Te,ce){var ie={$$typeof:t,type:c,key:w,ref:I,props:ce,_owner:Te};return ie._store={},Object.defineProperty(ie._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ie,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.defineProperty(ie,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ve}),Object.freeze&&(Object.freeze(ie.props),Object.freeze(ie)),ie};function Er(c,w,I,Q,ve){{var Te,ce={},ie=null,Le=null;I!==void 0&&(St(I),ie=""+I),br(w)&&(St(w.key),ie=""+w.key),yr(w)&&(Le=w.ref,wr(w,ve));for(Te in w)ft.call(w,Te)&&!be.hasOwnProperty(Te)&&(ce[Te]=w[Te]);if(c&&c.defaultProps){var Me=c.defaultProps;for(Te in Me)ce[Te]===void 0&&(ce[Te]=Me[Te])}if(ie||Le){var je=typeof c=="function"?c.displayName||c.name||"Unknown":c;ie&&Tr(ce,je),Le&&xr(ce,je)}return Pr(c,ie,Le,ve,Q,G.current,ce)}}var Dt=_.ReactCurrentOwner,wo=_.ReactDebugCurrentFrame;function Ot(c){if(c){var w=c._owner,I=Fe(c.type,c._source,w?w.type:null);wo.setExtraStackFrame(I)}else wo.setExtraStackFrame(null)}var dn;dn=!1;function hn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function To(){{if(Dt.current){var c=g(Dt.current.type);if(c)return`
22
22
 
23
23
  Check the render method of \``+c+"`."}return""}}function sp(c){{if(c!==void 0){var w=c.fileName.replace(/^.*[\\\/]/,""),I=c.lineNumber;return`
24
24
 
25
25
  Check your code at `+w+":"+I+"."}return""}}var xo={};function up(c){{var w=To();if(!w){var I=typeof c=="string"?c:c.displayName||c.name;I&&(w=`
26
26
 
27
- Check the top-level render call using <`+I+">.")}return w}}function Po(c,w){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var I=up(w);if(xo[I])return;xo[I]=!0;var K="";c&&c._owner&&c._owner!==Dt.current&&(K=" It was passed a child from "+y(c._owner.type)+"."),Ot(c),z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',I,K),Ot(null)}}function Eo(c,w){{if(typeof c!="object")return;if(Et(c))for(var I=0;I<c.length;I++){var K=c[I];hn(K)&&Po(K,w)}else if(hn(c))c._store&&(c._store.validated=!0);else if(c){var ve=P(c);if(typeof ve=="function"&&ve!==c.entries)for(var Te=ve.call(c),ce;!(ce=Te.next()).done;)hn(ce.value)&&Po(ce.value,w)}}}function cp(c){{var w=c.type;if(w==null||typeof w=="string")return;var I;if(typeof w=="function")I=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===u||w.$$typeof===h))I=w.propTypes;else return;if(I){var K=y(w);ln(I,c.props,"prop",K,c)}else if(w.PropTypes!==void 0&&!dn){dn=!0;var ve=y(w);z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ve||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lp(c){{for(var w=Object.keys(c.props),I=0;I<w.length;I++){var K=w[I];if(K!=="children"&&K!=="key"){Ot(c),z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",K),Ot(null);break}}c.ref!==null&&(Ot(c),z("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function So(c,w,I,K,ve,Te){{var ce=oe(c);if(!ce){var ie="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(ie+=" 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 Le=sp(ve);Le?ie+=Le:ie+=To();var Me;c===null?Me="null":Et(c)?Me="array":c!==void 0&&c.$$typeof===t?(Me="<"+(y(c.type)||"Unknown")+" />",ie=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof c,z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ie)}var je=Er(c,w,I,ve,Te);if(je==null)return je;if(ce){var $e=w.children;if($e!==void 0)if(K)if(Et($e)){for(var It=0;It<$e.length;It++)Eo($e[It],c);Object.freeze&&Object.freeze($e)}else z("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 Eo($e,c)}return c===n?lp(je):cp(je),je}}function fp(c,w,I){return So(c,w,I,!0)}function dp(c,w,I){return So(c,w,I,!1)}var hp=dp,pp=fp;Mt.Fragment=n,Mt.jsx=hp,Mt.jsxs=pp}()),Mt}process.env.NODE_ENV==="production"?Sr.exports=Oo():Sr.exports=Io();var m=Sr.exports,vn={exports:{}};/*!
27
+ Check the top-level render call using <`+I+">.")}return w}}function Po(c,w){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var I=up(w);if(xo[I])return;xo[I]=!0;var Q="";c&&c._owner&&c._owner!==Dt.current&&(Q=" It was passed a child from "+g(c._owner.type)+"."),Ot(c),z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',I,Q),Ot(null)}}function Eo(c,w){{if(typeof c!="object")return;if(Et(c))for(var I=0;I<c.length;I++){var Q=c[I];hn(Q)&&Po(Q,w)}else if(hn(c))c._store&&(c._store.validated=!0);else if(c){var ve=P(c);if(typeof ve=="function"&&ve!==c.entries)for(var Te=ve.call(c),ce;!(ce=Te.next()).done;)hn(ce.value)&&Po(ce.value,w)}}}function cp(c){{var w=c.type;if(w==null||typeof w=="string")return;var I;if(typeof w=="function")I=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===u||w.$$typeof===h))I=w.propTypes;else return;if(I){var Q=g(w);ln(I,c.props,"prop",Q,c)}else if(w.PropTypes!==void 0&&!dn){dn=!0;var ve=g(w);z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ve||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lp(c){{for(var w=Object.keys(c.props),I=0;I<w.length;I++){var Q=w[I];if(Q!=="children"&&Q!=="key"){Ot(c),z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),Ot(null);break}}c.ref!==null&&(Ot(c),z("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function So(c,w,I,Q,ve,Te){{var ce=oe(c);if(!ce){var ie="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(ie+=" 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 Le=sp(ve);Le?ie+=Le:ie+=To();var Me;c===null?Me="null":Et(c)?Me="array":c!==void 0&&c.$$typeof===t?(Me="<"+(g(c.type)||"Unknown")+" />",ie=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof c,z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ie)}var je=Er(c,w,I,ve,Te);if(je==null)return je;if(ce){var $e=w.children;if($e!==void 0)if(Q)if(Et($e)){for(var It=0;It<$e.length;It++)Eo($e[It],c);Object.freeze&&Object.freeze($e)}else z("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 Eo($e,c)}return c===n?lp(je):cp(je),je}}function fp(c,w,I){return So(c,w,I,!0)}function dp(c,w,I){return So(c,w,I,!1)}var hp=dp,pp=fp;Mt.Fragment=n,Mt.jsx=hp,Mt.jsxs=pp}()),Mt}process.env.NODE_ENV==="production"?Sr.exports=Oo():Sr.exports=Io();var m=Sr.exports,vn={exports:{}};/*!
28
28
  Copyright (c) 2018 Jed Watson.
29
29
  Licensed under the MIT License (MIT), see
30
30
  http://jedwatson.github.io/classnames
31
- */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var o=typeof i;if(o==="string"||o==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=r.apply(null,i);s&&n.push(s)}}else if(o==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(vn);var No=vn.exports;const Ge=et(No),_o=(e,t)=>{const r=p.useRef(null),{buttonType:n,type:a="button",disabled:i=!1,form:o,fullWidth:s=!1,onClick:u,className:l,children:f}=e,h=()=>{u==null||u()},b=()=>{var x;(x=r.current)==null||x.click()};p.useImperativeHandle(t,()=>({click:b}));const T=Ge("max-sm:bsc-p-4 md:bsc-p-2 dark:bsc-bg-mono-light-1 dark:hover:bsc-bg-mono-light-2 dark:bsc-text-mono-dark-1",{"bsc-w-full":s,"bsc-bg-gray-3 bsc-text-gray-2":i,"bsc-bg-primary-1 bsc-text-white hover:bsc-bg-primary-2":n==="primary","bsc-bg-info bsc-text-white":n==="info","bsc-bg-success bsc-text-white":n==="success","bsc-bg-warning bsc-text-white":n==="warning","bsc-bg-error bsc-text-white":n==="error"},l);return m.jsx("button",{ref:r,type:a,onClick:h,disabled:i,form:o,className:T,children:f})},We=p.forwardRef(_o);var Mo=typeof global=="object"&&global&&global.Object===Object&&global;const gn=Mo;var jo=typeof self=="object"&&self&&self.Object===Object&&self,ko=gn||jo||Function("return this")();const Ue=ko;var Ro=Ue.Symbol;const pt=Ro;var yn=Object.prototype,Lo=yn.hasOwnProperty,Ao=yn.toString,jt=pt?pt.toStringTag:void 0;function Fo(e){var t=Lo.call(e,jt),r=e[jt];try{e[jt]=void 0;var n=!0}catch{}var a=Ao.call(e);return n&&(t?e[jt]=r:delete e[jt]),a}var Yo=Object.prototype,$o=Yo.toString;function Uo(e){return $o.call(e)}var Ho="[object Null]",Wo="[object Undefined]",bn=pt?pt.toStringTag:void 0;function mt(e){return e==null?e===void 0?Wo:Ho:bn&&bn in Object(e)?Fo(e):Uo(e)}function vt(e){return e!=null&&typeof e=="object"}var Vo="[object Symbol]";function zo(e){return typeof e=="symbol"||vt(e)&&mt(e)==Vo}var Bo=Array.isArray;const Cr=Bo;var qo=/\s/;function Go(e){for(var t=e.length;t--&&qo.test(e.charAt(t)););return t}var Qo=/^\s+/;function Ko(e){return e&&e.slice(0,Go(e)+1).replace(Qo,"")}function Qe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var wn=0/0,Zo=/^[-+]0x[0-9a-f]+$/i,Xo=/^0b[01]+$/i,Jo=/^0o[0-7]+$/i,ei=parseInt;function Tn(e){if(typeof e=="number")return e;if(zo(e))return wn;if(Qe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Qe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ko(e);var r=Xo.test(e);return r||Jo.test(e)?ei(e.slice(2),r?2:8):Zo.test(e)?wn:+e}var ti="[object AsyncFunction]",ri="[object Function]",ni="[object GeneratorFunction]",ai="[object Proxy]";function xn(e){if(!Qe(e))return!1;var t=mt(e);return t==ri||t==ni||t==ti||t==ai}var oi=Ue["__core-js_shared__"];const Dr=oi;var Pn=function(){var e=/[^.]+$/.exec(Dr&&Dr.keys&&Dr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ii(e){return!!Pn&&Pn in e}var si=Function.prototype,ui=si.toString;function nt(e){if(e!=null){try{return ui.call(e)}catch{}try{return e+""}catch{}}return""}var ci=/[\\^$.*+?()[\]{}|]/g,li=/^\[object .+?Constructor\]$/,fi=Function.prototype,di=Object.prototype,hi=fi.toString,pi=di.hasOwnProperty,mi=RegExp("^"+hi.call(pi).replace(ci,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vi(e){if(!Qe(e)||ii(e))return!1;var t=xn(e)?mi:li;return t.test(nt(e))}function gi(e,t){return e==null?void 0:e[t]}function at(e,t){var r=gi(e,t);return vi(r)?r:void 0}var yi=at(Ue,"WeakMap");const Or=yi;var En=Object.create,bi=function(){function e(){}return function(t){if(!Qe(t))return{};if(En)return En(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const wi=bi;function Ti(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var xi=function(){try{var e=at(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Sn=xi;function Pi(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Ei=9007199254740991,Si=/^(?:0|[1-9]\d*)$/;function Ci(e,t){var r=typeof e;return t=t??Ei,!!t&&(r=="number"||r!="symbol"&&Si.test(e))&&e>-1&&e%1==0&&e<t}function Cn(e,t,r){t=="__proto__"&&Sn?Sn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Dn(e,t){return e===t||e!==e&&t!==t}var Di=Object.prototype,Oi=Di.hasOwnProperty;function On(e,t,r){var n=e[t];(!(Oi.call(e,t)&&Dn(n,r))||r===void 0&&!(t in e))&&Cn(e,t,r)}function Bt(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),a?Cn(r,s,u):On(r,s,u)}return r}var Ii=9007199254740991;function In(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ii}function Nn(e){return e!=null&&In(e.length)&&!xn(e)}var Ni=Object.prototype;function Ir(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ni;return e===r}function _i(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Mi="[object Arguments]";function _n(e){return vt(e)&&mt(e)==Mi}var Mn=Object.prototype,ji=Mn.hasOwnProperty,ki=Mn.propertyIsEnumerable,Ri=_n(function(){return arguments}())?_n:function(e){return vt(e)&&ji.call(e,"callee")&&!ki.call(e,"callee")};const Li=Ri;function Ai(){return!1}var jn=typeof le=="object"&&le&&!le.nodeType&&le,kn=jn&&typeof module=="object"&&module&&!module.nodeType&&module,Fi=kn&&kn.exports===jn,Rn=Fi?Ue.Buffer:void 0,Yi=Rn?Rn.isBuffer:void 0,$i=Yi||Ai;const Ln=$i;var Ui="[object Arguments]",Hi="[object Array]",Wi="[object Boolean]",Vi="[object Date]",zi="[object Error]",Bi="[object Function]",qi="[object Map]",Gi="[object Number]",Qi="[object Object]",Ki="[object RegExp]",Zi="[object Set]",Xi="[object String]",Ji="[object WeakMap]",es="[object ArrayBuffer]",ts="[object DataView]",rs="[object Float32Array]",ns="[object Float64Array]",as="[object Int8Array]",os="[object Int16Array]",is="[object Int32Array]",ss="[object Uint8Array]",us="[object Uint8ClampedArray]",cs="[object Uint16Array]",ls="[object Uint32Array]",Pe={};Pe[rs]=Pe[ns]=Pe[as]=Pe[os]=Pe[is]=Pe[ss]=Pe[us]=Pe[cs]=Pe[ls]=!0,Pe[Ui]=Pe[Hi]=Pe[es]=Pe[Wi]=Pe[ts]=Pe[Vi]=Pe[zi]=Pe[Bi]=Pe[qi]=Pe[Gi]=Pe[Qi]=Pe[Ki]=Pe[Zi]=Pe[Xi]=Pe[Ji]=!1;function fs(e){return vt(e)&&In(e.length)&&!!Pe[mt(e)]}function Nr(e){return function(t){return e(t)}}var An=typeof le=="object"&&le&&!le.nodeType&&le,kt=An&&typeof module=="object"&&module&&!module.nodeType&&module,ds=kt&&kt.exports===An,_r=ds&&gn.process,hs=function(){try{var e=kt&&kt.require&&kt.require("util").types;return e||_r&&_r.binding&&_r.binding("util")}catch{}}();const gt=hs;var Fn=gt&&gt.isTypedArray,ps=Fn?Nr(Fn):fs;const ms=ps;var vs=Object.prototype,gs=vs.hasOwnProperty;function Yn(e,t){var r=Cr(e),n=!r&&Li(e),a=!r&&!n&&Ln(e),i=!r&&!n&&!a&&ms(e),o=r||n||a||i,s=o?_i(e.length,String):[],u=s.length;for(var l in e)(t||gs.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ci(l,u)))&&s.push(l);return s}function $n(e,t){return function(r){return e(t(r))}}var ys=$n(Object.keys,Object);const bs=ys;var ws=Object.prototype,Ts=ws.hasOwnProperty;function xs(e){if(!Ir(e))return bs(e);var t=[];for(var r in Object(e))Ts.call(e,r)&&r!="constructor"&&t.push(r);return t}function Mr(e){return Nn(e)?Yn(e):xs(e)}function Ps(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Es=Object.prototype,Ss=Es.hasOwnProperty;function Cs(e){if(!Qe(e))return Ps(e);var t=Ir(e),r=[];for(var n in e)n=="constructor"&&(t||!Ss.call(e,n))||r.push(n);return r}function jr(e){return Nn(e)?Yn(e,!0):Cs(e)}var Ds=at(Object,"create");const Rt=Ds;function Os(){this.__data__=Rt?Rt(null):{},this.size=0}function Is(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ns="__lodash_hash_undefined__",_s=Object.prototype,Ms=_s.hasOwnProperty;function js(e){var t=this.__data__;if(Rt){var r=t[e];return r===Ns?void 0:r}return Ms.call(t,e)?t[e]:void 0}var ks=Object.prototype,Rs=ks.hasOwnProperty;function Ls(e){var t=this.__data__;return Rt?t[e]!==void 0:Rs.call(t,e)}var As="__lodash_hash_undefined__";function Fs(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Rt&&t===void 0?As:t,this}function ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ot.prototype.clear=Os,ot.prototype.delete=Is,ot.prototype.get=js,ot.prototype.has=Ls,ot.prototype.set=Fs;function Ys(){this.__data__=[],this.size=0}function qt(e,t){for(var r=e.length;r--;)if(Dn(e[r][0],t))return r;return-1}var $s=Array.prototype,Us=$s.splice;function Hs(e){var t=this.__data__,r=qt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Us.call(t,r,1),--this.size,!0}function Ws(e){var t=this.__data__,r=qt(t,e);return r<0?void 0:t[r][1]}function Vs(e){return qt(this.__data__,e)>-1}function zs(e,t){var r=this.__data__,n=qt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ke(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ke.prototype.clear=Ys,Ke.prototype.delete=Hs,Ke.prototype.get=Ws,Ke.prototype.has=Vs,Ke.prototype.set=zs;var Bs=at(Ue,"Map");const Lt=Bs;function qs(){this.size=0,this.__data__={hash:new ot,map:new(Lt||Ke),string:new ot}}function Gs(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gt(e,t){var r=e.__data__;return Gs(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Qs(e){var t=Gt(this,e).delete(e);return this.size-=t?1:0,t}function Ks(e){return Gt(this,e).get(e)}function Zs(e){return Gt(this,e).has(e)}function Xs(e,t){var r=Gt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yt.prototype.clear=qs,yt.prototype.delete=Qs,yt.prototype.get=Ks,yt.prototype.has=Zs,yt.prototype.set=Xs;function Un(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Js=$n(Object.getPrototypeOf,Object);const Hn=Js;function eu(){this.__data__=new Ke,this.size=0}function tu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function ru(e){return this.__data__.get(e)}function nu(e){return this.__data__.has(e)}var au=200;function ou(e,t){var r=this.__data__;if(r instanceof Ke){var n=r.__data__;if(!Lt||n.length<au-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new yt(n)}return r.set(e,t),this.size=r.size,this}function bt(e){var t=this.__data__=new Ke(e);this.size=t.size}bt.prototype.clear=eu,bt.prototype.delete=tu,bt.prototype.get=ru,bt.prototype.has=nu,bt.prototype.set=ou;function iu(e,t){return e&&Bt(t,Mr(t),e)}function su(e,t){return e&&Bt(t,jr(t),e)}var Wn=typeof le=="object"&&le&&!le.nodeType&&le,Vn=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,uu=Vn&&Vn.exports===Wn,zn=uu?Ue.Buffer:void 0,Bn=zn?zn.allocUnsafe:void 0;function cu(e,t){if(t)return e.slice();var r=e.length,n=Bn?Bn(r):new e.constructor(r);return e.copy(n),n}function lu(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function qn(){return[]}var fu=Object.prototype,du=fu.propertyIsEnumerable,Gn=Object.getOwnPropertySymbols,hu=Gn?function(e){return e==null?[]:(e=Object(e),lu(Gn(e),function(t){return du.call(e,t)}))}:qn;const kr=hu;function pu(e,t){return Bt(e,kr(e),t)}var mu=Object.getOwnPropertySymbols,vu=mu?function(e){for(var t=[];e;)Un(t,kr(e)),e=Hn(e);return t}:qn;const Qn=vu;function gu(e,t){return Bt(e,Qn(e),t)}function Kn(e,t,r){var n=t(e);return Cr(e)?n:Un(n,r(e))}function yu(e){return Kn(e,Mr,kr)}function bu(e){return Kn(e,jr,Qn)}var wu=at(Ue,"DataView");const Rr=wu;var Tu=at(Ue,"Promise");const Lr=Tu;var xu=at(Ue,"Set");const Ar=xu;var Zn="[object Map]",Pu="[object Object]",Xn="[object Promise]",Jn="[object Set]",ea="[object WeakMap]",ta="[object DataView]",Eu=nt(Rr),Su=nt(Lt),Cu=nt(Lr),Du=nt(Ar),Ou=nt(Or),it=mt;(Rr&&it(new Rr(new ArrayBuffer(1)))!=ta||Lt&&it(new Lt)!=Zn||Lr&&it(Lr.resolve())!=Xn||Ar&&it(new Ar)!=Jn||Or&&it(new Or)!=ea)&&(it=function(e){var t=mt(e),r=t==Pu?e.constructor:void 0,n=r?nt(r):"";if(n)switch(n){case Eu:return ta;case Su:return Zn;case Cu:return Xn;case Du:return Jn;case Ou:return ea}return t});const Fr=it;var Iu=Object.prototype,Nu=Iu.hasOwnProperty;function _u(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Nu.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Mu=Ue.Uint8Array;const ra=Mu;function Yr(e){var t=new e.constructor(e.byteLength);return new ra(t).set(new ra(e)),t}function ju(e,t){var r=t?Yr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var ku=/\w*$/;function Ru(e){var t=new e.constructor(e.source,ku.exec(e));return t.lastIndex=e.lastIndex,t}var na=pt?pt.prototype:void 0,aa=na?na.valueOf:void 0;function Lu(e){return aa?Object(aa.call(e)):{}}function Au(e,t){var r=t?Yr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Fu="[object Boolean]",Yu="[object Date]",$u="[object Map]",Uu="[object Number]",Hu="[object RegExp]",Wu="[object Set]",Vu="[object String]",zu="[object Symbol]",Bu="[object ArrayBuffer]",qu="[object DataView]",Gu="[object Float32Array]",Qu="[object Float64Array]",Ku="[object Int8Array]",Zu="[object Int16Array]",Xu="[object Int32Array]",Ju="[object Uint8Array]",ec="[object Uint8ClampedArray]",tc="[object Uint16Array]",rc="[object Uint32Array]";function nc(e,t,r){var n=e.constructor;switch(t){case Bu:return Yr(e);case Fu:case Yu:return new n(+e);case qu:return ju(e,r);case Gu:case Qu:case Ku:case Zu:case Xu:case Ju:case ec:case tc:case rc:return Au(e,r);case $u:return new n;case Uu:case Vu:return new n(e);case Hu:return Ru(e);case Wu:return new n;case zu:return Lu(e)}}function ac(e){return typeof e.constructor=="function"&&!Ir(e)?wi(Hn(e)):{}}var oc="[object Map]";function ic(e){return vt(e)&&Fr(e)==oc}var oa=gt&&gt.isMap,sc=oa?Nr(oa):ic;const uc=sc;var cc="[object Set]";function lc(e){return vt(e)&&Fr(e)==cc}var ia=gt&&gt.isSet,fc=ia?Nr(ia):lc;const dc=fc;var hc=1,pc=2,mc=4,sa="[object Arguments]",vc="[object Array]",gc="[object Boolean]",yc="[object Date]",bc="[object Error]",ua="[object Function]",wc="[object GeneratorFunction]",Tc="[object Map]",xc="[object Number]",ca="[object Object]",Pc="[object RegExp]",Ec="[object Set]",Sc="[object String]",Cc="[object Symbol]",Dc="[object WeakMap]",Oc="[object ArrayBuffer]",Ic="[object DataView]",Nc="[object Float32Array]",_c="[object Float64Array]",Mc="[object Int8Array]",jc="[object Int16Array]",kc="[object Int32Array]",Rc="[object Uint8Array]",Lc="[object Uint8ClampedArray]",Ac="[object Uint16Array]",Fc="[object Uint32Array]",xe={};xe[sa]=xe[vc]=xe[Oc]=xe[Ic]=xe[gc]=xe[yc]=xe[Nc]=xe[_c]=xe[Mc]=xe[jc]=xe[kc]=xe[Tc]=xe[xc]=xe[ca]=xe[Pc]=xe[Ec]=xe[Sc]=xe[Cc]=xe[Rc]=xe[Lc]=xe[Ac]=xe[Fc]=!0,xe[bc]=xe[ua]=xe[Dc]=!1;function Qt(e,t,r,n,a,i){var o,s=t&hc,u=t&pc,l=t&mc;if(r&&(o=a?r(e,n,a,i):r(e)),o!==void 0)return o;if(!Qe(e))return e;var f=Cr(e);if(f){if(o=_u(e),!s)return Ti(e,o)}else{var h=Fr(e),b=h==ua||h==wc;if(Ln(e))return cu(e,s);if(h==ca||h==sa||b&&!a){if(o=u||b?{}:ac(e),!s)return u?gu(e,su(o,e)):pu(e,iu(o,e))}else{if(!xe[h])return a?e:{};o=nc(e,h,s)}}i||(i=new bt);var T=i.get(e);if(T)return T;i.set(e,o),dc(e)?e.forEach(function(P){o.add(Qt(P,t,r,P,e,i))}):uc(e)&&e.forEach(function(P,_){o.set(_,Qt(P,t,r,_,e,i))});var x=l?u?bu:yu:u?jr:Mr,D=f?void 0:x(e);return Pi(D||e,function(P,_){D&&(_=P,P=e[_]),On(o,_,Qt(P,t,r,_,e,i))}),o}var Yc=1,$c=4;function Uc(e){return Qt(e,Yc|$c)}var Hc=function(){return Ue.Date.now()};const $r=Hc;var Wc="Expected a function",Vc=Math.max,zc=Math.min;function At(e,t,r){var n,a,i,o,s,u,l=0,f=!1,h=!1,b=!0;if(typeof e!="function")throw new TypeError(Wc);t=Tn(t)||0,Qe(r)&&(f=!!r.leading,h="maxWait"in r,i=h?Vc(Tn(r.maxWait)||0,t):i,b="trailing"in r?!!r.trailing:b);function T($){var J=n,te=a;return n=a=void 0,l=$,o=e.apply(te,J),o}function x($){return l=$,s=setTimeout(_,t),f?T($):o}function D($){var J=$-u,te=$-l,B=t-J;return h?zc(B,i-te):B}function P($){var J=$-u,te=$-l;return u===void 0||J>=t||J<0||h&&te>=i}function _(){var $=$r();if(P($))return z($);s=setTimeout(_,D($))}function z($){return s=void 0,b&&n?T($):(n=a=void 0,o)}function Z(){s!==void 0&&clearTimeout(s),l=0,n=u=a=s=void 0}function W(){return s===void 0?o:z($r())}function g(){var $=$r(),J=P($);if(n=arguments,a=this,u=$,J){if(s===void 0)return x(u);if(h)return clearTimeout(s),s=setTimeout(_,t),T(u)}return s===void 0&&(s=setTimeout(_,t)),o}return g.cancel=Z,g.flush=W,g}var Bc="Expected a function";function qc(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(Bc);return Qe(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),At(e,t,{leading:n,maxWait:t,trailing:a})}const Gc=(e,t)=>{const{value:r,readOnly:n=!1,debounceTime:a=800,fillContainer:i=!0,leftElement:o,rightElement:s,className:u,leftElementClassName:l,rightElementClassName:f,isSingleLine:h=!0,allowSingleLineScroll:b=!1,inputMode:T,placeholder:x,onFocus:D,onBlur:P,onInput:_,onInnerTextChange:z,onInnerHTMLChange:Z,onElementCreate:W,onLeftElementClick:g,onRightElementClick:$}=e,J=p.useRef("bsc-flex-grow focus:bsc-outline-none"),te=p.useRef("bsc-text-gray-4"),B=p.useRef(),oe=p.useCallback(d=>{const S=d.target,O=S.innerHTML;S.className=`${J.current}`,x&&O===x&&(S.innerHTML=""),D==null||D(d)},[x,D]),re=p.useCallback(d=>{const S=d.target.innerHTML;if(x&&S===""){const O=d.target;O.innerHTML=x,O.className=`${J.current} ${te.current}`}P==null||P(d)},[x,P]),G=p.useCallback(d=>{var S,O;(S=B.current)==null||S.removeEventListener("focus",oe),(O=B.current)==null||O.removeEventListener("blur",re),x&&d&&d!==document.activeElement&&d.innerHTML===""&&(d.innerHTML=x,d.className=`${J.current} ${te.current}`),d.addEventListener("focus",oe),d.addEventListener("blur",re),B.current=d},[x]),y=p.useCallback(d=>{W==null||W(d)},[W]),U=d=>{g==null||g(d)},q=d=>{$==null||$(d)},F=At(d=>{_==null||_(d),z==null||z(d.target.innerText),Z==null||Z(d.target.innerHTML)},a),ne=p.useCallback(d=>{B.current&&(B.current.innerText=d)},[]),L=p.useCallback(d=>{B.current&&(B.current.innerHTML=d)},[]),he=p.useCallback(()=>{var d;(d=B.current)==null||d.focus()},[]);p.useImperativeHandle(t,()=>({inputElement:B.current,setInnerText:ne,setInnerHTML:L,focus:he}));const v=Ge({"bsc-w-full ":i},"bsc-flex bsc-flex-row bsc-items-center bsc-shadow-sm bsc-border bsc-border-solid bsc-border-gray-3 dark:bsc-border-white dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bsc-rounded-md bsc-p-2",{"bsc-overflow-x-auto bsc-overflow-y-hidden bsc-whitespace-pre":h&&b,"bsc-overflow-hidden bsc-whitespace-pre":h&&!b},u),E=Ge("bsc-flex-shrink",{"bsc-mr-2":o},l),H=Ge("bsc-flex-shrink",{"bsc-ml-2":s},f);return m.jsxs("div",{className:v,ref:d=>d&&y(d),children:[o&&m.jsx("div",{className:E,onClick:U,children:o}),m.jsx("div",{ref:d=>d&&G(d),className:J.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:T,onInput:F,children:r}),s&&m.jsx("div",{className:H,onClick:q,children:s})]})},Kt=p.forwardRef(Gc);function tt(e){"@babel/helpers - typeof";return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(e)}function Oe(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ae(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function pe(e){ae(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||tt(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Zt(e,t){ae(2,arguments);var r=pe(e),n=Oe(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function st(e,t){ae(2,arguments);var r=pe(e),n=Oe(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function Qc(e,t){ae(2,arguments);var r=pe(e).getTime(),n=Oe(t);return new Date(r+n)}var Kc={};function Ft(){return Kc}function Zc(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function la(e){ae(1,arguments);var t=pe(e);return t.setHours(0,0,0,0),t}function Xt(e,t){ae(2,arguments);var r=Oe(t);return st(e,r*12)}var Ur=6e4,Hr=36e5,Xc=1e3;function fa(e,t){ae(2,arguments);var r=la(e),n=la(t);return r.getTime()===n.getTime()}function Jc(e){ae(1,arguments);var t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function el(e,t){var r;ae(1,arguments);var n=e||{},a=pe(n.start),i=pe(n.end),o=i.getTime();if(!(a.getTime()<=o))throw new RangeError("Invalid interval");var s=[],u=a;u.setHours(0,0,0,0);var l=Number((r=t==null?void 0:t.step)!==null&&r!==void 0?r:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=o;)s.push(pe(u)),u.setDate(u.getDate()+l),u.setHours(0,0,0,0);return s}function da(e){ae(1,arguments);var t=pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function tl(e){ae(1,arguments);var t=e||{},r=pe(t.start),n=pe(t.end),a=n.getTime();if(!(r.getTime()<=a))throw new RangeError("Invalid interval");var i=[],o=r;for(o.setHours(0,0,0,0),o.setMonth(0,1);o.getTime()<=a;)i.push(pe(o)),o.setFullYear(o.getFullYear()+1);return i}function rl(e,t){ae(2,arguments);var r=Oe(t);return Qc(e,-r)}function wt(e){ae(1,arguments);var t=1,r=pe(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function nl(e){ae(1,arguments);var t=pe(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=wt(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=wt(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function al(e){ae(1,arguments);var t=nl(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=wt(r);return n}var ol=6048e5;function il(e){ae(1,arguments);var t=pe(e),r=wt(t).getTime()-al(t).getTime();return Math.round(r/ol)+1}function ut(e,t){var r,n,a,i,o,s,u,l;ae(1,arguments);var f=Ft(),h=Oe((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:f.weekStartsOn)!==null&&n!==void 0?n:(u=f.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var b=pe(e),T=b.getUTCDay(),x=(T<h?7:0)+T-h;return b.setUTCDate(b.getUTCDate()-x),b.setUTCHours(0,0,0,0),b}function ha(e,t){var r,n,a,i,o,s,u,l;ae(1,arguments);var f=pe(e),h=f.getUTCFullYear(),b=Ft(),T=Oe((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:b.firstWeekContainsDate)!==null&&n!==void 0?n:(u=b.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(h+1,0,T),x.setUTCHours(0,0,0,0);var D=ut(x,t),P=new Date(0);P.setUTCFullYear(h,0,T),P.setUTCHours(0,0,0,0);var _=ut(P,t);return f.getTime()>=D.getTime()?h+1:f.getTime()>=_.getTime()?h:h-1}function sl(e,t){var r,n,a,i,o,s,u,l;ae(1,arguments);var f=Ft(),h=Oe((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:f.firstWeekContainsDate)!==null&&n!==void 0?n:(u=f.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),b=ha(e,t),T=new Date(0);T.setUTCFullYear(b,0,h),T.setUTCHours(0,0,0,0);var x=ut(T,t);return x}var ul=6048e5;function cl(e,t){ae(1,arguments);var r=pe(e),n=ut(r,t).getTime()-sl(r,t).getTime();return Math.round(n/ul)+1}var pa=function(t,r){switch(t){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"})}},ma=function(t,r){switch(t){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"})}},ll=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return pa(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",pa(a,r)).replace("{{time}}",ma(i,r))},fl={p:ma,P:ll};const va=fl;var dl=["D","DD"],hl=["YY","YYYY"];function pl(e){return dl.indexOf(e)!==-1}function ml(e){return hl.indexOf(e)!==-1}function ga(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vl={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"}},gl=function(t,r,n){var a,i=vl[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};const yl=gl;function Wr(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var bl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xl={date:Wr({formats:bl,defaultWidth:"full"}),time:Wr({formats:wl,defaultWidth:"full"}),dateTime:Wr({formats:Tl,defaultWidth:"full"})};const Pl=xl;var El={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Sl=function(t,r,n,a){return El[t]};const Cl=Sl;function Yt(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,u=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[u]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return a[l]}}var Dl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ol={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Il={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"]},Nl={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"]},_l={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"}},Ml={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"}},jl=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kl={ordinalNumber:jl,era:Yt({values:Dl,defaultWidth:"wide"}),quarter:Yt({values:Ol,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Yt({values:Il,defaultWidth:"wide"}),day:Yt({values:Nl,defaultWidth:"wide"}),dayPeriod:Yt({values:_l,defaultWidth:"wide",formattingValues:Ml,defaultFormattingWidth:"wide"})};const Rl=kl;function $t(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?Al(s,function(h){return h.test(o)}):Ll(s,function(h){return h.test(o)}),l;l=e.valueCallback?e.valueCallback(u):u,l=r.valueCallback?r.valueCallback(l):l;var f=t.slice(o.length);return{value:l,rest:f}}}function Ll(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function Al(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function Fl(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var Yl=/^(\d+)(th|st|nd|rd)?/i,$l=/\d+/i,Ul={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},Hl={any:[/^b/i,/^(a|c)/i]},Wl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vl={any:[/1/i,/2/i,/3/i,/4/i]},zl={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},Bl={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]},ql={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},Gl={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]},Ql={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},Kl={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}},Zl={ordinalNumber:Fl({matchPattern:Yl,parsePattern:$l,valueCallback:function(t){return parseInt(t,10)}}),era:$t({matchPatterns:Ul,defaultMatchWidth:"wide",parsePatterns:Hl,defaultParseWidth:"any"}),quarter:$t({matchPatterns:Wl,defaultMatchWidth:"wide",parsePatterns:Vl,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$t({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Bl,defaultParseWidth:"any"}),day:$t({matchPatterns:ql,defaultMatchWidth:"wide",parsePatterns:Gl,defaultParseWidth:"any"}),dayPeriod:$t({matchPatterns:Ql,defaultMatchWidth:"any",parsePatterns:Kl,defaultParseWidth:"any"})},Xl={code:"en-US",formatDistance:yl,formatLong:Pl,formatRelative:Cl,localize:Rl,match:Zl,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Jl=Xl;function ef(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Vr(e){ae(1,arguments);var t=pe(e),r=t.getDay();return r}function ya(e){ae(1,arguments);var t=pe(e),r=t.getFullYear(),n=t.getMonth(),a=new Date(0);return a.setFullYear(r,n+1,0),a.setHours(0,0,0,0),a.getDate()}function tf(e){ae(1,arguments);var t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function rf(e,t){ae(2,arguments);var r=pe(e),n=pe(t);return r.getTime()<n.getTime()}function ba(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nf(e,t){if(e){if(typeof e=="string")return ba(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ba(e,t)}}function wa(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=nf(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return i=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function R(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jt(e,t){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jt(e,t)}function fe(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jt(e,t)}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},er(e)}function af(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function of(e,t){if(t&&(tt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function de(e){var t=af();return function(){var n=er(e),a;if(t){var i=er(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return of(this,a)}}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(e,t){if(tt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ta(e){var t=sf(e,"string");return tt(t)==="symbol"?t:String(t)}function xa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ta(n.key),n)}}function ue(e,t,r){return t&&xa(e.prototype,t),r&&xa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t,r){return t=Ta(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var uf=10,Pa=function(){function e(){se(this,e),N(this,"priority",void 0),N(this,"subPriority",0)}return ue(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),cf=function(e){fe(r,e);var t=de(r);function r(n,a,i,o,s){var u;return se(this,r),u=t.call(this),u.value=n,u.validateValue=a,u.setValue=i,u.priority=o,s&&(u.subPriority=s),u}return ue(r,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,o){return this.setValue(a,i,this.value,o)}}]),r}(Pa),lf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",uf),N(R(n),"subPriority",-1),n}return ue(r,[{key:"set",value:function(a,i){if(i.timestampIsSet)return a;var o=new Date(0);return o.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),o.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),o}}]),r}(Pa),me=function(){function e(){se(this,e),N(this,"incompatibleTokens",void 0),N(this,"priority",void 0),N(this,"subPriority",void 0)}return ue(e,[{key:"run",value:function(r,n,a,i){var o=this.parse(r,n,a,i);return o?{setter:new cf(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(r,n,a){return!0}}]),e}(),ff=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",140),N(R(n),"incompatibleTokens",["R","u","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"G":case"GG":case"GGG":return o.era(a,{width:"abbreviated"})||o.era(a,{width:"narrow"});case"GGGGG":return o.era(a,{width:"narrow"});case"GGGG":default:return o.era(a,{width:"wide"})||o.era(a,{width:"abbreviated"})||o.era(a,{width:"narrow"})}}},{key:"set",value:function(a,i,o){return i.era=o,a.setUTCFullYear(o,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),Ie={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}/},Ve={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ne(e,t){return e&&{value:t(e.value),rest:e.rest}}function Se(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function ze(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,a=r[2]?parseInt(r[2],10):0,i=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(a*Hr+i*Ur+o*Xc),rest:t.slice(r[0].length)}}function Ea(e){return Se(Ie.anyDigitsSigned,e)}function Ce(e,t){switch(e){case 1:return Se(Ie.singleDigit,t);case 2:return Se(Ie.twoDigits,t);case 3:return Se(Ie.threeDigits,t);case 4:return Se(Ie.fourDigits,t);default:return Se(new RegExp("^\\d{1,"+e+"}"),t)}}function tr(e,t){switch(e){case 1:return Se(Ie.singleDigitSigned,t);case 2:return Se(Ie.twoDigitsSigned,t);case 3:return Se(Ie.threeDigitsSigned,t);case 4:return Se(Ie.fourDigitsSigned,t);default:return Se(new RegExp("^-?\\d{1,"+e+"}"),t)}}function zr(e){switch(e){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 Sa(e,t){var r=t>0,n=r?t:1-t,a;if(n<=50)a=e||100;else{var i=n+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return r?a:1-a}function Ca(e){return e%400===0||e%4===0&&e%100!==0}var df=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return Ne(Ce(4,a),s);case"yo":return Ne(o.ordinalNumber(a,{unit:"year"}),s);default:return Ne(Ce(i.length,a),s)}}},{key:"validate",value:function(a,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var u=Sa(o.year,s);return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}var l=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),hf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return Ne(Ce(4,a),s);case"Yo":return Ne(o.ordinalNumber(a,{unit:"year"}),s);default:return Ne(Ce(i.length,a),s)}}},{key:"validate",value:function(a,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(a,i,o,s){var u=ha(a,s);if(o.isTwoDigitYear){var l=Sa(o.year,u);return a.setUTCFullYear(l,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),ut(a,s)}var f=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(f,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),ut(a,s)}}]),r}(me),pf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i){return tr(i==="R"?4:i.length,a)}},{key:"set",value:function(a,i,o){var s=new Date(0);return s.setUTCFullYear(o,0,4),s.setUTCHours(0,0,0,0),wt(s)}}]),r}(me),mf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i){return tr(i==="u"?4:i.length,a)}},{key:"set",value:function(a,i,o){return a.setUTCFullYear(o,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),vf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",120),N(R(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"Q":case"QQ":return Ce(i.length,a);case"Qo":return o.ordinalNumber(a,{unit:"quarter"});case"QQQ":return o.quarter(a,{width:"abbreviated",context:"formatting"})||o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(a,{width:"wide",context:"formatting"})||o.quarter(a,{width:"abbreviated",context:"formatting"})||o.quarter(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),gf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",120),N(R(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"q":case"qq":return Ce(i.length,a);case"qo":return o.ordinalNumber(a,{unit:"quarter"});case"qqq":return o.quarter(a,{width:"abbreviated",context:"standalone"})||o.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(a,{width:"wide",context:"standalone"})||o.quarter(a,{width:"abbreviated",context:"standalone"})||o.quarter(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,i){return i>=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),yf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),N(R(n),"priority",110),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return l-1};switch(i){case"M":return Ne(Se(Ie.month,a),s);case"MM":return Ne(Ce(2,a),s);case"Mo":return Ne(o.ordinalNumber(a,{unit:"month"}),s);case"MMM":return o.month(a,{width:"abbreviated",context:"formatting"})||o.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(a,{width:"wide",context:"formatting"})||o.month(a,{width:"abbreviated",context:"formatting"})||o.month(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),bf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",110),N(R(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return l-1};switch(i){case"L":return Ne(Se(Ie.month,a),s);case"LL":return Ne(Ce(2,a),s);case"Lo":return Ne(o.ordinalNumber(a,{unit:"month"}),s);case"LLL":return o.month(a,{width:"abbreviated",context:"standalone"})||o.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(a,{width:"wide",context:"standalone"})||o.month(a,{width:"abbreviated",context:"standalone"})||o.month(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(me);function wf(e,t,r){ae(2,arguments);var n=pe(e),a=Oe(t),i=cl(n,r)-a;return n.setUTCDate(n.getUTCDate()-i*7),n}var Tf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",100),N(R(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"w":return Se(Ie.week,a);case"wo":return o.ordinalNumber(a,{unit:"week"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=53}},{key:"set",value:function(a,i,o,s){return ut(wf(a,o,s),s)}}]),r}(me);function xf(e,t){ae(2,arguments);var r=pe(e),n=Oe(t),a=il(r)-n;return r.setUTCDate(r.getUTCDate()-a*7),r}var Pf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",100),N(R(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"I":return Se(Ie.week,a);case"Io":return o.ordinalNumber(a,{unit:"week"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=53}},{key:"set",value:function(a,i,o){return wt(xf(a,o))}}]),r}(me),Ef=[31,28,31,30,31,30,31,31,30,31,30,31],Sf=[31,29,31,30,31,30,31,31,30,31,30,31],Cf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"subPriority",1),N(R(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"d":return Se(Ie.date,a);case"do":return o.ordinalNumber(a,{unit:"date"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){var o=a.getUTCFullYear(),s=Ca(o),u=a.getUTCMonth();return s?i>=1&&i<=Sf[u]:i>=1&&i<=Ef[u]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),r}(me),Df=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"subpriority",1),N(R(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"D":case"DD":return Se(Ie.dayOfYear,a);case"Do":return o.ordinalNumber(a,{unit:"date"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){var o=a.getUTCFullYear(),s=Ca(o);return s?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),r}(me);function Br(e,t,r){var n,a,i,o,s,u,l,f;ae(2,arguments);var h=Ft(),b=Oe((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:h.weekStartsOn)!==null&&a!==void 0?a:(l=h.locale)===null||l===void 0||(f=l.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&n!==void 0?n:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var T=pe(e),x=Oe(t),D=T.getUTCDay(),P=x%7,_=(P+7)%7,z=(_<b?7:0)+x-D;return T.setUTCDate(T.getUTCDate()+z),T}var Of=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"E":case"EE":case"EEE":return o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Br(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me),If=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o,s){var u=function(f){var h=Math.floor((f-1)/7)*7;return(f+s.weekStartsOn+6)%7+h};switch(i){case"e":case"ee":return Ne(Ce(i.length,a),u);case"eo":return Ne(o.ordinalNumber(a,{unit:"day"}),u);case"eee":return o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"eeeee":return o.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Br(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me),Nf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o,s){var u=function(f){var h=Math.floor((f-1)/7)*7;return(f+s.weekStartsOn+6)%7+h};switch(i){case"c":case"cc":return Ne(Ce(i.length,a),u);case"co":return Ne(o.ordinalNumber(a,{unit:"day"}),u);case"ccc":return o.day(a,{width:"abbreviated",context:"standalone"})||o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"});case"ccccc":return o.day(a,{width:"narrow",context:"standalone"});case"cccccc":return o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(a,{width:"wide",context:"standalone"})||o.day(a,{width:"abbreviated",context:"standalone"})||o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Br(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me);function _f(e,t){ae(2,arguments);var r=Oe(t);r%7===0&&(r=r-7);var n=1,a=pe(e),i=a.getUTCDay(),o=r%7,s=(o+7)%7,u=(s<n?7:0)+r-i;return a.setUTCDate(a.getUTCDate()+u),a}var Mf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return l===0?7:l};switch(i){case"i":case"ii":return Ce(i.length,a);case"io":return o.ordinalNumber(a,{unit:"day"});case"iii":return Ne(o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ne(o.day(a,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ne(o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ne(o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(a,i){return i>=1&&i<=7}},{key:"set",value:function(a,i,o){return a=_f(a,o),a.setUTCHours(0,0,0,0),a}}]),r}(me),jf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",80),N(R(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"a":case"aa":case"aaa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,i,o){return a.setUTCHours(zr(o),0,0,0),a}}]),r}(me),kf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",80),N(R(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"b":case"bb":case"bbb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,i,o){return a.setUTCHours(zr(o),0,0,0),a}}]),r}(me),Rf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",80),N(R(n),"incompatibleTokens",["a","b","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"B":case"BB":case"BBB":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,i,o){return a.setUTCHours(zr(o),0,0,0),a}}]),r}(me),Lf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["H","K","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"h":return Se(Ie.hour12h,a);case"ho":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(me),Af=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"H":return Se(Ie.hour23h,a);case"Ho":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),r}(me),Ff=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["h","H","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"K":return Se(Ie.hour11h,a);case"Ko":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(me),Yf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"k":return Se(Ie.hour24h,a);case"ko":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),r}(me),$f=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",60),N(R(n),"incompatibleTokens",["t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"m":return Se(Ie.minute,a);case"mo":return o.ordinalNumber(a,{unit:"minute"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),r}(me),Uf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",50),N(R(n),"incompatibleTokens",["t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"s":return Se(Ie.second,a);case"so":return o.ordinalNumber(a,{unit:"second"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),r}(me),Hf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",30),N(R(n),"incompatibleTokens",["t","T"]),n}return ue(r,[{key:"parse",value:function(a,i){var o=function(u){return Math.floor(u*Math.pow(10,-i.length+3))};return Ne(Ce(i.length,a),o)}},{key:"set",value:function(a,i,o){return a.setUTCMilliseconds(o),a}}]),r}(me),Wf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",10),N(R(n),"incompatibleTokens",["t","T","x"]),n}return ue(r,[{key:"parse",value:function(a,i){switch(i){case"X":return ze(Ve.basicOptionalMinutes,a);case"XX":return ze(Ve.basic,a);case"XXXX":return ze(Ve.basicOptionalSeconds,a);case"XXXXX":return ze(Ve.extendedOptionalSeconds,a);case"XXX":default:return ze(Ve.extended,a)}}},{key:"set",value:function(a,i,o){return i.timestampIsSet?a:new Date(a.getTime()-o)}}]),r}(me),Vf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",10),N(R(n),"incompatibleTokens",["t","T","X"]),n}return ue(r,[{key:"parse",value:function(a,i){switch(i){case"x":return ze(Ve.basicOptionalMinutes,a);case"xx":return ze(Ve.basic,a);case"xxxx":return ze(Ve.basicOptionalSeconds,a);case"xxxxx":return ze(Ve.extendedOptionalSeconds,a);case"xxx":default:return ze(Ve.extended,a)}}},{key:"set",value:function(a,i,o){return i.timestampIsSet?a:new Date(a.getTime()-o)}}]),r}(me),zf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",40),N(R(n),"incompatibleTokens","*"),n}return ue(r,[{key:"parse",value:function(a){return Ea(a)}},{key:"set",value:function(a,i,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),r}(me),Bf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",20),N(R(n),"incompatibleTokens","*"),n}return ue(r,[{key:"parse",value:function(a){return Ea(a)}},{key:"set",value:function(a,i,o){return[new Date(o),{timestampIsSet:!0}]}}]),r}(me),qf={G:new ff,y:new df,Y:new hf,R:new pf,u:new mf,Q:new vf,q:new gf,M:new yf,L:new bf,w:new Tf,I:new Pf,d:new Cf,D:new Df,E:new Of,e:new If,c:new Nf,i:new Mf,a:new jf,b:new kf,B:new Rf,h:new Lf,H:new Af,K:new Ff,k:new Yf,m:new $f,s:new Uf,S:new Hf,X:new Wf,x:new Vf,t:new zf,T:new Bf},Gf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kf=/^'([^]*?)'?$/,Zf=/''/g,Xf=/\S/,Jf=/[a-zA-Z]/;function Be(e,t,r,n){var a,i,o,s,u,l,f,h,b,T,x,D,P,_,z,Z,W,g;ae(3,arguments);var $=String(e),J=String(t),te=Ft(),B=(a=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:te.locale)!==null&&a!==void 0?a:Jl;if(!B.match)throw new RangeError("locale must contain match property");var oe=Oe((o=(s=(u=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(f=n.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&u!==void 0?u:te.firstWeekContainsDate)!==null&&s!==void 0?s:(b=te.locale)===null||b===void 0||(T=b.options)===null||T===void 0?void 0:T.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(oe>=1&&oe<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var re=Oe((x=(D=(P=(_=n==null?void 0:n.weekStartsOn)!==null&&_!==void 0?_:n==null||(z=n.locale)===null||z===void 0||(Z=z.options)===null||Z===void 0?void 0:Z.weekStartsOn)!==null&&P!==void 0?P:te.weekStartsOn)!==null&&D!==void 0?D:(W=te.locale)===null||W===void 0||(g=W.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&x!==void 0?x:0);if(!(re>=0&&re<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(J==="")return $===""?pe(r):new Date(NaN);var G={firstWeekContainsDate:oe,weekStartsOn:re,locale:B},y=[new lf],U=J.match(Qf).map(function(j){var k=j[0];if(k in va){var V=va[k];return V(j,B.formatLong)}return j}).join("").match(Gf),q=[],F=wa(U),ne;try{var L=function(){var k=ne.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&ml(k)&&ga(k,J,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&pl(k)&&ga(k,J,e);var V=k[0],Ee=qf[V];if(Ee){var C=Ee.incompatibleTokens;if(Array.isArray(C)){var ke=q.find(function(Fe){return C.includes(Fe.token)||Fe.token===V});if(ke)throw new RangeError("The format string mustn't contain `".concat(ke.fullToken,"` and `").concat(k,"` at the same time"))}else if(Ee.incompatibleTokens==="*"&&q.length>0)throw new RangeError("The format string mustn't contain `".concat(k,"` and any other token at the same time"));q.push({token:V,fullToken:k});var Ae=Ee.run($,k,B.match,G);if(!Ae)return{v:new Date(NaN)};y.push(Ae.setter),$=Ae.rest}else{if(V.match(Jf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");if(k==="''"?k="'":V==="'"&&(k=ed(k)),$.indexOf(k)===0)$=$.slice(k.length);else return{v:new Date(NaN)}}};for(F.s();!(ne=F.n()).done;){var he=L();if(tt(he)==="object")return he.v}}catch(j){F.e(j)}finally{F.f()}if($.length>0&&Xf.test($))return new Date(NaN);var v=y.map(function(j){return j.priority}).sort(function(j,k){return k-j}).filter(function(j,k,V){return V.indexOf(j)===k}).map(function(j){return y.filter(function(k){return k.priority===j}).sort(function(k,V){return V.subPriority-k.subPriority})}).map(function(j){return j[0]}),E=pe(r);if(isNaN(E.getTime()))return new Date(NaN);var H=rl(E,Zc(E)),d={},S=wa(v),O;try{for(S.s();!(O=S.n()).done;){var M=O.value;if(!M.validate(H,G))return new Date(NaN);var A=M.set(H,d,G);Array.isArray(A)?(H=A[0],ef(d,A[1])):H=A}}catch(j){S.e(j)}finally{S.f()}return H}function ed(e){return e.match(Kf)[1].replace(Zf,"'")}function td(e){return ae(1,arguments),fa(e,Date.now())}function rd(e,t){ae(2,arguments);var r=Oe(t);return Zt(e,-r)}function nd(e,t){ae(2,arguments);var r=t-Vr(e);return r<=0&&(r+=7),Zt(e,r)}function ad(e,t){var r;ae(1,arguments);var n=Oe((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=ud(e),i;if(a.date){var o=cd(a.date,n);i=ld(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),u=0,l;if(a.time&&(u=fd(a.time),isNaN(u)))return new Date(NaN);if(a.timezone){if(l=dd(a.timezone),isNaN(l))return new Date(NaN)}else{var f=new Date(s+u),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(s+u+l)}var rr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},od=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,id=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ud(e){var t={},r=e.split(rr.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],rr.timeZoneDelimiter.test(t.date)&&(t.date=e.split(rr.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var a=rr.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function cd(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function ld(e,t){if(t===null)return new Date(NaN);var r=e.match(od);if(!r)return new Date(NaN);var n=!!r[4],a=Ut(r[1]),i=Ut(r[2])-1,o=Ut(r[3]),s=Ut(r[4]),u=Ut(r[5])-1;if(n)return gd(t,s,u)?hd(t,s,u):new Date(NaN);var l=new Date(0);return!md(t,i,o)||!vd(t,a)?new Date(NaN):(l.setUTCFullYear(t,i,Math.max(a,o)),l)}function Ut(e){return e?parseInt(e):1}function fd(e){var t=e.match(id);if(!t)return NaN;var r=qr(t[1]),n=qr(t[2]),a=qr(t[3]);return yd(r,n,a)?r*Hr+n*Ur+a*1e3:NaN}function qr(e){return e&&parseFloat(e.replace(",","."))||0}function dd(e){if(e==="Z")return 0;var t=e.match(sd);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return bd(n,a)?r*(n*Hr+a*Ur):NaN}function hd(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}var pd=[31,null,31,30,31,30,31,31,30,31,30,31];function Da(e){return e%400===0||e%4===0&&e%100!==0}function md(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(pd[t]||(Da(e)?29:28))}function vd(e,t){return t>=1&&t<=(Da(e)?366:365)}function gd(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function yd(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function bd(e,t){return t>=0&&t<=59}function wd(e,t){ae(2,arguments);var r=pe(e),n=Oe(t),a=r.getFullYear(),i=r.getDate(),o=new Date(0);o.setFullYear(a,n,15),o.setHours(0,0,0,0);var s=ya(o);return r.setMonth(n,Math.min(i,s)),r}function Td(e,t){ae(2,arguments);var r=pe(e),n=Oe(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function Oa(e,t){ae(2,arguments);var r=Oe(t);return st(e,-r)}function Ia(e,t){ae(2,arguments);var r=Oe(t);return Xt(e,-r)}function Na(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function xd(e,t,r){const n=[];for(let a=e;a<=t;a++)n.push(r?r(a):a);return n}function Pd(e,t){const r=e.target;return r?!t.isSameNode(r)&&!t.contains(r):!1}function Ed(e,t){return e.isSameNode(t)||e.contains(t)}function Sd(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let a=0,i=r.length;a<i;a++){const[o,s]=r[a];if(typeof s=="string"&&s.indexOf(",")>-1){if(!s.split(",").map(l=>l.trim()).includes(n[o]))return!1}else if(n[o]!==s)return!1}return!0}function Cd(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let a=0,i=r.length;a<i;a++){const[o,s]=r[a];if(typeof s=="string"&&s.indexOf(",")>-1){if(s.split(",").map(l=>l.trim()).includes(n[o]))return!0}else if(n[o]===s)return!0}return!1}function _a(e,t,r=!1){return r&&Sd(e,t)||!r&&Cd(e,t)?e:e.parentElement?_a(e.parentElement,t):e}function Ma(e,t){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let a=0,i=r.length;a<i;a++){const o=getComputedStyle(r[a]);o[e]&&t(o[e])&&n.push(o[e])}return n}function yp(e){return e}function Dd(e){const t=document.documentElement;Object.keys(e).forEach(r=>{t.style.setProperty(r,e[r])})}function Od(e){return{"--theme-bsc-primary-1":e.primary1,"--theme-bsc-primary-2":e.primary2,"--theme-bsc-primary-3":e.primary3,"--theme-bsc-primary-4":e.primary4,"--theme-bsc-primary-5":e.primary5,"--theme-bsc-gray-1":e.gray1||"#303030","--theme-bsc-gray-2":e.gray2||"#5f5f5f","--theme-bsc-gray-3":e.gray3||"#8f8f8f","--theme-bsc-gray-4":e.gray4||"#bebebe","--theme-bsc-gray-5":e.gray5||"#eeeeee","--theme-bsc-mono-dark-1":e.monoDark1||"#222222","--theme-bsc-mono-dark-2":e.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":e.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":e.monoLight1||"#fefefe","--theme-bsc-mono-light-2":e.monoLight2||"#eeeeee","--theme-bsc-mono-light-3":e.monoLight3||"#cccccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}const Gr=({template:e,props:t,children:r})=>e(t,r);var Id=p;function Nd(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var nr=Nd(Id),_d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Md=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},ja=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Md(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return nr.default.createElement("svg",_d({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),nr.default.createElement("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))},jd=nr.default.memo?nr.default.memo(ja):ja,kd=jd;const Rd=et(kd);var Ld=p;function Ad(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ar=Ad(Ld),Fd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yd=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},ka=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Yd(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return ar.default.createElement("svg",Fd({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),ar.default.createElement("path",{d:"M13.172 12l-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414z"}))},$d=ar.default.memo?ar.default.memo(ka):ka,Ud=$d;const Hd=et(Ud);var Wd=p;function Vd(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var or=Vd(Wd),zd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bd=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Ra=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Bd(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return or.default.createElement("svg",zd({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),or.default.createElement("path",{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}))},qd=or.default.memo?or.default.memo(Ra):Ra,Gd=qd;const La=et(Gd);var Qd=p;function Kd(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ir=Kd(Qd),Zd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xd=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Aa=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Xd(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return ir.default.createElement("svg",Zd({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),ir.default.createElement("path",{d:"M17 3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2v2h6V1h2v2zm3 8H4v8h16v-8zm-5-6H9v2H7V5H4v4h16V5h-3v2h-2V5zm-9 8h2v2H6v-2zm5 0h2v2h-2v-2zm5 0h2v2h-2v-2z"}))},Jd=ir.default.memo?ir.default.memo(Aa):Aa,eh=Jd;const Fa=et(eh);var th=p;function rh(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var sr=rh(th),nh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ah=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Ya=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=ah(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return sr.default.createElement("svg",nh({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),sr.default.createElement("path",{d:"M12 10.828l-4.95 4.95-1.414-1.414L12 8l6.364 6.364-1.414 1.414z"}))},oh=sr.default.memo?sr.default.memo(Ya):Ya,ih=oh;const Qr=et(ih);var sh=p;function uh(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ur=uh(sh),ch=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lh=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},$a=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=lh(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return ur.default.createElement("svg",ch({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),ur.default.createElement("path",{d:"M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z"}))},fh=ur.default.memo?ur.default.memo($a):$a,dh=fh;const Kr=et(dh);function Ua(e,t,r){const n=i=>{const o=i.target,s=e.style.display!=="hidden";e&&s&&!Ed(e,o)&&!a(r,o)&&t(!1),t(!0)},a=(i,o)=>{if(!i)return!1;for(let s=0,u=i.length;s<u;s++)if(i[s].isSameNode(o)||i[s].contains(o))return!0;return!1};return document.addEventListener("mousedown",n),n}function Ha(e){document.removeEventListener("mousedown",e)}function hh(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function ph(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jt(e,t)}var Zr={exports:{}},cr={exports:{}},ge={};/** @license React v16.13.1
31
+ */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var o=typeof i;if(o==="string"||o==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=r.apply(null,i);s&&n.push(s)}}else if(o==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(vn);var No=vn.exports;const Ge=et(No),_o=(e,t)=>{const r=p.useRef(null),{buttonType:n,type:a="button",disabled:i=!1,form:o,fullWidth:s=!1,onClick:u,className:l,children:f}=e,h=()=>{u==null||u()},b=()=>{var x;(x=r.current)==null||x.click()};p.useImperativeHandle(t,()=>({click:b}));const T=Ge("max-sm:bsc-p-4 md:bsc-p-2 dark:bsc-bg-mono-light-1 dark:hover:bsc-bg-mono-light-2 dark:bsc-text-mono-dark-1",{"bsc-w-full":s,"bsc-bg-gray-3 bsc-text-gray-2":i,"bsc-bg-primary-1 bsc-text-white hover:bsc-bg-primary-2":n==="primary","bsc-bg-info bsc-text-white":n==="info","bsc-bg-success bsc-text-white":n==="success","bsc-bg-warning bsc-text-white":n==="warning","bsc-bg-error bsc-text-white":n==="error"},l);return m.jsx("button",{ref:r,type:a,onClick:h,disabled:i,form:o,className:T,children:f})},We=p.forwardRef(_o);var Mo=typeof global=="object"&&global&&global.Object===Object&&global;const gn=Mo;var jo=typeof self=="object"&&self&&self.Object===Object&&self,ko=gn||jo||Function("return this")();const He=ko;var Ro=He.Symbol;const pt=Ro;var yn=Object.prototype,Lo=yn.hasOwnProperty,Ao=yn.toString,jt=pt?pt.toStringTag:void 0;function Fo(e){var t=Lo.call(e,jt),r=e[jt];try{e[jt]=void 0;var n=!0}catch{}var a=Ao.call(e);return n&&(t?e[jt]=r:delete e[jt]),a}var Yo=Object.prototype,$o=Yo.toString;function Uo(e){return $o.call(e)}var Ho="[object Null]",Wo="[object Undefined]",bn=pt?pt.toStringTag:void 0;function mt(e){return e==null?e===void 0?Wo:Ho:bn&&bn in Object(e)?Fo(e):Uo(e)}function vt(e){return e!=null&&typeof e=="object"}var Vo="[object Symbol]";function zo(e){return typeof e=="symbol"||vt(e)&&mt(e)==Vo}var Bo=Array.isArray;const Cr=Bo;var qo=/\s/;function Go(e){for(var t=e.length;t--&&qo.test(e.charAt(t)););return t}var Qo=/^\s+/;function Ko(e){return e&&e.slice(0,Go(e)+1).replace(Qo,"")}function Qe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var wn=0/0,Zo=/^[-+]0x[0-9a-f]+$/i,Xo=/^0b[01]+$/i,Jo=/^0o[0-7]+$/i,ei=parseInt;function Tn(e){if(typeof e=="number")return e;if(zo(e))return wn;if(Qe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Qe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ko(e);var r=Xo.test(e);return r||Jo.test(e)?ei(e.slice(2),r?2:8):Zo.test(e)?wn:+e}var ti="[object AsyncFunction]",ri="[object Function]",ni="[object GeneratorFunction]",ai="[object Proxy]";function xn(e){if(!Qe(e))return!1;var t=mt(e);return t==ri||t==ni||t==ti||t==ai}var oi=He["__core-js_shared__"];const Dr=oi;var Pn=function(){var e=/[^.]+$/.exec(Dr&&Dr.keys&&Dr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ii(e){return!!Pn&&Pn in e}var si=Function.prototype,ui=si.toString;function nt(e){if(e!=null){try{return ui.call(e)}catch{}try{return e+""}catch{}}return""}var ci=/[\\^$.*+?()[\]{}|]/g,li=/^\[object .+?Constructor\]$/,fi=Function.prototype,di=Object.prototype,hi=fi.toString,pi=di.hasOwnProperty,mi=RegExp("^"+hi.call(pi).replace(ci,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vi(e){if(!Qe(e)||ii(e))return!1;var t=xn(e)?mi:li;return t.test(nt(e))}function gi(e,t){return e==null?void 0:e[t]}function at(e,t){var r=gi(e,t);return vi(r)?r:void 0}var yi=at(He,"WeakMap");const Or=yi;var En=Object.create,bi=function(){function e(){}return function(t){if(!Qe(t))return{};if(En)return En(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const wi=bi;function Ti(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var xi=function(){try{var e=at(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Sn=xi;function Pi(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Ei=9007199254740991,Si=/^(?:0|[1-9]\d*)$/;function Ci(e,t){var r=typeof e;return t=t??Ei,!!t&&(r=="number"||r!="symbol"&&Si.test(e))&&e>-1&&e%1==0&&e<t}function Cn(e,t,r){t=="__proto__"&&Sn?Sn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Dn(e,t){return e===t||e!==e&&t!==t}var Di=Object.prototype,Oi=Di.hasOwnProperty;function On(e,t,r){var n=e[t];(!(Oi.call(e,t)&&Dn(n,r))||r===void 0&&!(t in e))&&Cn(e,t,r)}function Bt(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),a?Cn(r,s,u):On(r,s,u)}return r}var Ii=9007199254740991;function In(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ii}function Nn(e){return e!=null&&In(e.length)&&!xn(e)}var Ni=Object.prototype;function Ir(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ni;return e===r}function _i(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Mi="[object Arguments]";function _n(e){return vt(e)&&mt(e)==Mi}var Mn=Object.prototype,ji=Mn.hasOwnProperty,ki=Mn.propertyIsEnumerable,Ri=_n(function(){return arguments}())?_n:function(e){return vt(e)&&ji.call(e,"callee")&&!ki.call(e,"callee")};const Li=Ri;function Ai(){return!1}var jn=typeof le=="object"&&le&&!le.nodeType&&le,kn=jn&&typeof module=="object"&&module&&!module.nodeType&&module,Fi=kn&&kn.exports===jn,Rn=Fi?He.Buffer:void 0,Yi=Rn?Rn.isBuffer:void 0,$i=Yi||Ai;const Ln=$i;var Ui="[object Arguments]",Hi="[object Array]",Wi="[object Boolean]",Vi="[object Date]",zi="[object Error]",Bi="[object Function]",qi="[object Map]",Gi="[object Number]",Qi="[object Object]",Ki="[object RegExp]",Zi="[object Set]",Xi="[object String]",Ji="[object WeakMap]",es="[object ArrayBuffer]",ts="[object DataView]",rs="[object Float32Array]",ns="[object Float64Array]",as="[object Int8Array]",os="[object Int16Array]",is="[object Int32Array]",ss="[object Uint8Array]",us="[object Uint8ClampedArray]",cs="[object Uint16Array]",ls="[object Uint32Array]",Pe={};Pe[rs]=Pe[ns]=Pe[as]=Pe[os]=Pe[is]=Pe[ss]=Pe[us]=Pe[cs]=Pe[ls]=!0,Pe[Ui]=Pe[Hi]=Pe[es]=Pe[Wi]=Pe[ts]=Pe[Vi]=Pe[zi]=Pe[Bi]=Pe[qi]=Pe[Gi]=Pe[Qi]=Pe[Ki]=Pe[Zi]=Pe[Xi]=Pe[Ji]=!1;function fs(e){return vt(e)&&In(e.length)&&!!Pe[mt(e)]}function Nr(e){return function(t){return e(t)}}var An=typeof le=="object"&&le&&!le.nodeType&&le,kt=An&&typeof module=="object"&&module&&!module.nodeType&&module,ds=kt&&kt.exports===An,_r=ds&&gn.process,hs=function(){try{var e=kt&&kt.require&&kt.require("util").types;return e||_r&&_r.binding&&_r.binding("util")}catch{}}();const gt=hs;var Fn=gt&&gt.isTypedArray,ps=Fn?Nr(Fn):fs;const ms=ps;var vs=Object.prototype,gs=vs.hasOwnProperty;function Yn(e,t){var r=Cr(e),n=!r&&Li(e),a=!r&&!n&&Ln(e),i=!r&&!n&&!a&&ms(e),o=r||n||a||i,s=o?_i(e.length,String):[],u=s.length;for(var l in e)(t||gs.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ci(l,u)))&&s.push(l);return s}function $n(e,t){return function(r){return e(t(r))}}var ys=$n(Object.keys,Object);const bs=ys;var ws=Object.prototype,Ts=ws.hasOwnProperty;function xs(e){if(!Ir(e))return bs(e);var t=[];for(var r in Object(e))Ts.call(e,r)&&r!="constructor"&&t.push(r);return t}function Mr(e){return Nn(e)?Yn(e):xs(e)}function Ps(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Es=Object.prototype,Ss=Es.hasOwnProperty;function Cs(e){if(!Qe(e))return Ps(e);var t=Ir(e),r=[];for(var n in e)n=="constructor"&&(t||!Ss.call(e,n))||r.push(n);return r}function jr(e){return Nn(e)?Yn(e,!0):Cs(e)}var Ds=at(Object,"create");const Rt=Ds;function Os(){this.__data__=Rt?Rt(null):{},this.size=0}function Is(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ns="__lodash_hash_undefined__",_s=Object.prototype,Ms=_s.hasOwnProperty;function js(e){var t=this.__data__;if(Rt){var r=t[e];return r===Ns?void 0:r}return Ms.call(t,e)?t[e]:void 0}var ks=Object.prototype,Rs=ks.hasOwnProperty;function Ls(e){var t=this.__data__;return Rt?t[e]!==void 0:Rs.call(t,e)}var As="__lodash_hash_undefined__";function Fs(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Rt&&t===void 0?As:t,this}function ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ot.prototype.clear=Os,ot.prototype.delete=Is,ot.prototype.get=js,ot.prototype.has=Ls,ot.prototype.set=Fs;function Ys(){this.__data__=[],this.size=0}function qt(e,t){for(var r=e.length;r--;)if(Dn(e[r][0],t))return r;return-1}var $s=Array.prototype,Us=$s.splice;function Hs(e){var t=this.__data__,r=qt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Us.call(t,r,1),--this.size,!0}function Ws(e){var t=this.__data__,r=qt(t,e);return r<0?void 0:t[r][1]}function Vs(e){return qt(this.__data__,e)>-1}function zs(e,t){var r=this.__data__,n=qt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ke(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ke.prototype.clear=Ys,Ke.prototype.delete=Hs,Ke.prototype.get=Ws,Ke.prototype.has=Vs,Ke.prototype.set=zs;var Bs=at(He,"Map");const Lt=Bs;function qs(){this.size=0,this.__data__={hash:new ot,map:new(Lt||Ke),string:new ot}}function Gs(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gt(e,t){var r=e.__data__;return Gs(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Qs(e){var t=Gt(this,e).delete(e);return this.size-=t?1:0,t}function Ks(e){return Gt(this,e).get(e)}function Zs(e){return Gt(this,e).has(e)}function Xs(e,t){var r=Gt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yt.prototype.clear=qs,yt.prototype.delete=Qs,yt.prototype.get=Ks,yt.prototype.has=Zs,yt.prototype.set=Xs;function Un(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Js=$n(Object.getPrototypeOf,Object);const Hn=Js;function eu(){this.__data__=new Ke,this.size=0}function tu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function ru(e){return this.__data__.get(e)}function nu(e){return this.__data__.has(e)}var au=200;function ou(e,t){var r=this.__data__;if(r instanceof Ke){var n=r.__data__;if(!Lt||n.length<au-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new yt(n)}return r.set(e,t),this.size=r.size,this}function bt(e){var t=this.__data__=new Ke(e);this.size=t.size}bt.prototype.clear=eu,bt.prototype.delete=tu,bt.prototype.get=ru,bt.prototype.has=nu,bt.prototype.set=ou;function iu(e,t){return e&&Bt(t,Mr(t),e)}function su(e,t){return e&&Bt(t,jr(t),e)}var Wn=typeof le=="object"&&le&&!le.nodeType&&le,Vn=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,uu=Vn&&Vn.exports===Wn,zn=uu?He.Buffer:void 0,Bn=zn?zn.allocUnsafe:void 0;function cu(e,t){if(t)return e.slice();var r=e.length,n=Bn?Bn(r):new e.constructor(r);return e.copy(n),n}function lu(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function qn(){return[]}var fu=Object.prototype,du=fu.propertyIsEnumerable,Gn=Object.getOwnPropertySymbols,hu=Gn?function(e){return e==null?[]:(e=Object(e),lu(Gn(e),function(t){return du.call(e,t)}))}:qn;const kr=hu;function pu(e,t){return Bt(e,kr(e),t)}var mu=Object.getOwnPropertySymbols,vu=mu?function(e){for(var t=[];e;)Un(t,kr(e)),e=Hn(e);return t}:qn;const Qn=vu;function gu(e,t){return Bt(e,Qn(e),t)}function Kn(e,t,r){var n=t(e);return Cr(e)?n:Un(n,r(e))}function yu(e){return Kn(e,Mr,kr)}function bu(e){return Kn(e,jr,Qn)}var wu=at(He,"DataView");const Rr=wu;var Tu=at(He,"Promise");const Lr=Tu;var xu=at(He,"Set");const Ar=xu;var Zn="[object Map]",Pu="[object Object]",Xn="[object Promise]",Jn="[object Set]",ea="[object WeakMap]",ta="[object DataView]",Eu=nt(Rr),Su=nt(Lt),Cu=nt(Lr),Du=nt(Ar),Ou=nt(Or),it=mt;(Rr&&it(new Rr(new ArrayBuffer(1)))!=ta||Lt&&it(new Lt)!=Zn||Lr&&it(Lr.resolve())!=Xn||Ar&&it(new Ar)!=Jn||Or&&it(new Or)!=ea)&&(it=function(e){var t=mt(e),r=t==Pu?e.constructor:void 0,n=r?nt(r):"";if(n)switch(n){case Eu:return ta;case Su:return Zn;case Cu:return Xn;case Du:return Jn;case Ou:return ea}return t});const Fr=it;var Iu=Object.prototype,Nu=Iu.hasOwnProperty;function _u(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Nu.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Mu=He.Uint8Array;const ra=Mu;function Yr(e){var t=new e.constructor(e.byteLength);return new ra(t).set(new ra(e)),t}function ju(e,t){var r=t?Yr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var ku=/\w*$/;function Ru(e){var t=new e.constructor(e.source,ku.exec(e));return t.lastIndex=e.lastIndex,t}var na=pt?pt.prototype:void 0,aa=na?na.valueOf:void 0;function Lu(e){return aa?Object(aa.call(e)):{}}function Au(e,t){var r=t?Yr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Fu="[object Boolean]",Yu="[object Date]",$u="[object Map]",Uu="[object Number]",Hu="[object RegExp]",Wu="[object Set]",Vu="[object String]",zu="[object Symbol]",Bu="[object ArrayBuffer]",qu="[object DataView]",Gu="[object Float32Array]",Qu="[object Float64Array]",Ku="[object Int8Array]",Zu="[object Int16Array]",Xu="[object Int32Array]",Ju="[object Uint8Array]",ec="[object Uint8ClampedArray]",tc="[object Uint16Array]",rc="[object Uint32Array]";function nc(e,t,r){var n=e.constructor;switch(t){case Bu:return Yr(e);case Fu:case Yu:return new n(+e);case qu:return ju(e,r);case Gu:case Qu:case Ku:case Zu:case Xu:case Ju:case ec:case tc:case rc:return Au(e,r);case $u:return new n;case Uu:case Vu:return new n(e);case Hu:return Ru(e);case Wu:return new n;case zu:return Lu(e)}}function ac(e){return typeof e.constructor=="function"&&!Ir(e)?wi(Hn(e)):{}}var oc="[object Map]";function ic(e){return vt(e)&&Fr(e)==oc}var oa=gt&&gt.isMap,sc=oa?Nr(oa):ic;const uc=sc;var cc="[object Set]";function lc(e){return vt(e)&&Fr(e)==cc}var ia=gt&&gt.isSet,fc=ia?Nr(ia):lc;const dc=fc;var hc=1,pc=2,mc=4,sa="[object Arguments]",vc="[object Array]",gc="[object Boolean]",yc="[object Date]",bc="[object Error]",ua="[object Function]",wc="[object GeneratorFunction]",Tc="[object Map]",xc="[object Number]",ca="[object Object]",Pc="[object RegExp]",Ec="[object Set]",Sc="[object String]",Cc="[object Symbol]",Dc="[object WeakMap]",Oc="[object ArrayBuffer]",Ic="[object DataView]",Nc="[object Float32Array]",_c="[object Float64Array]",Mc="[object Int8Array]",jc="[object Int16Array]",kc="[object Int32Array]",Rc="[object Uint8Array]",Lc="[object Uint8ClampedArray]",Ac="[object Uint16Array]",Fc="[object Uint32Array]",xe={};xe[sa]=xe[vc]=xe[Oc]=xe[Ic]=xe[gc]=xe[yc]=xe[Nc]=xe[_c]=xe[Mc]=xe[jc]=xe[kc]=xe[Tc]=xe[xc]=xe[ca]=xe[Pc]=xe[Ec]=xe[Sc]=xe[Cc]=xe[Rc]=xe[Lc]=xe[Ac]=xe[Fc]=!0,xe[bc]=xe[ua]=xe[Dc]=!1;function Qt(e,t,r,n,a,i){var o,s=t&hc,u=t&pc,l=t&mc;if(r&&(o=a?r(e,n,a,i):r(e)),o!==void 0)return o;if(!Qe(e))return e;var f=Cr(e);if(f){if(o=_u(e),!s)return Ti(e,o)}else{var h=Fr(e),b=h==ua||h==wc;if(Ln(e))return cu(e,s);if(h==ca||h==sa||b&&!a){if(o=u||b?{}:ac(e),!s)return u?gu(e,su(o,e)):pu(e,iu(o,e))}else{if(!xe[h])return a?e:{};o=nc(e,h,s)}}i||(i=new bt);var T=i.get(e);if(T)return T;i.set(e,o),dc(e)?e.forEach(function(P){o.add(Qt(P,t,r,P,e,i))}):uc(e)&&e.forEach(function(P,_){o.set(_,Qt(P,t,r,_,e,i))});var x=l?u?bu:yu:u?jr:Mr,D=f?void 0:x(e);return Pi(D||e,function(P,_){D&&(_=P,P=e[_]),On(o,_,Qt(P,t,r,_,e,i))}),o}var Yc=1,$c=4;function Uc(e){return Qt(e,Yc|$c)}var Hc=function(){return He.Date.now()};const $r=Hc;var Wc="Expected a function",Vc=Math.max,zc=Math.min;function At(e,t,r){var n,a,i,o,s,u,l=0,f=!1,h=!1,b=!0;if(typeof e!="function")throw new TypeError(Wc);t=Tn(t)||0,Qe(r)&&(f=!!r.leading,h="maxWait"in r,i=h?Vc(Tn(r.maxWait)||0,t):i,b="trailing"in r?!!r.trailing:b);function T($){var X=n,ee=a;return n=a=void 0,l=$,o=e.apply(ee,X),o}function x($){return l=$,s=setTimeout(_,t),f?T($):o}function D($){var X=$-u,ee=$-l,B=t-X;return h?zc(B,i-ee):B}function P($){var X=$-u,ee=$-l;return u===void 0||X>=t||X<0||h&&ee>=i}function _(){var $=$r();if(P($))return z($);s=setTimeout(_,D($))}function z($){return s=void 0,b&&n?T($):(n=a=void 0,o)}function K(){s!==void 0&&clearTimeout(s),l=0,n=u=a=s=void 0}function W(){return s===void 0?o:z($r())}function y(){var $=$r(),X=P($);if(n=arguments,a=this,u=$,X){if(s===void 0)return x(u);if(h)return clearTimeout(s),s=setTimeout(_,t),T(u)}return s===void 0&&(s=setTimeout(_,t)),o}return y.cancel=K,y.flush=W,y}var Bc="Expected a function";function qc(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(Bc);return Qe(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),At(e,t,{leading:n,maxWait:t,trailing:a})}const Gc=(e,t)=>{const{value:r,readOnly:n=!1,debounceTime:a=800,fillContainer:i=!0,leftElement:o,rightElement:s,className:u,leftElementClassName:l,rightElementClassName:f,isSingleLine:h=!0,allowSingleLineScroll:b=!1,inputMode:T,placeholder:x,onFocus:D,onBlur:P,onInput:_,onInnerTextChange:z,onInnerHTMLChange:K,onElementCreate:W,onLeftElementClick:y,onRightElementClick:$}=e,X=p.useRef("bsc-flex-grow focus:bsc-outline-none"),ee=p.useRef("bsc-text-gray-4"),B=p.useRef(),oe=p.useCallback(d=>{const S=d.target,O=S.innerHTML;S.className=`${X.current}`,x&&O===x&&(S.innerHTML=""),D==null||D(d)},[x,D]),te=p.useCallback(d=>{const S=d.target.innerHTML;if(x&&S===""){const O=d.target;O.innerHTML=x,O.className=`${X.current} ${ee.current}`}P==null||P(d)},[x,P]),ae=p.useCallback(d=>{var S,O;(S=B.current)==null||S.removeEventListener("focus",oe),(O=B.current)==null||O.removeEventListener("blur",te),x&&d&&d!==document.activeElement&&d.innerHTML===""&&(d.innerHTML=x,d.className=`${X.current} ${ee.current}`),d.addEventListener("focus",oe),d.addEventListener("blur",te),B.current=d},[x]),g=p.useCallback(d=>{W==null||W(d)},[W]),Y=d=>{y==null||y(d)},q=d=>{$==null||$(d)},F=At(d=>{_==null||_(d),z==null||z(d.target.innerText),K==null||K(d.target.innerHTML)},a),re=p.useCallback(d=>{B.current&&(B.current.innerText=d)},[]),L=p.useCallback(d=>{B.current&&(B.current.innerHTML=d)},[]),he=p.useCallback(()=>{var d;(d=B.current)==null||d.focus()},[]);p.useImperativeHandle(t,()=>({inputElement:B.current,setInnerText:re,setInnerHTML:L,focus:he}));const v=Ge({"bsc-w-full ":i},"bsc-flex bsc-flex-row bsc-items-center bsc-shadow-sm bsc-border bsc-border-solid bsc-border-gray-3 dark:bsc-border-white dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bsc-rounded-md bsc-p-2",{"bsc-overflow-x-auto bsc-overflow-y-hidden bsc-whitespace-pre":h&&b,"bsc-overflow-hidden bsc-whitespace-pre":h&&!b},u),E=Ge("bsc-flex-shrink",{"bsc-mr-2":o},l),H=Ge("bsc-flex-shrink",{"bsc-ml-2":s},f);return m.jsxs("div",{className:v,ref:d=>d&&g(d),children:[o&&m.jsx("div",{className:E,onClick:Y,children:o}),m.jsx("div",{ref:d=>d&&ae(d),className:X.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:T,onInput:F,children:r}),s&&m.jsx("div",{className:H,onClick:q,children:s})]})},Kt=p.forwardRef(Gc);function tt(e){"@babel/helpers - typeof";return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(e)}function Oe(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ne(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function pe(e){ne(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||tt(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Zt(e,t){ne(2,arguments);var r=pe(e),n=Oe(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function st(e,t){ne(2,arguments);var r=pe(e),n=Oe(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function Qc(e,t){ne(2,arguments);var r=pe(e).getTime(),n=Oe(t);return new Date(r+n)}var Kc={};function Ft(){return Kc}function Zc(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function la(e){ne(1,arguments);var t=pe(e);return t.setHours(0,0,0,0),t}function Xt(e,t){ne(2,arguments);var r=Oe(t);return st(e,r*12)}var Ur=6e4,Hr=36e5,Xc=1e3;function fa(e,t){ne(2,arguments);var r=la(e),n=la(t);return r.getTime()===n.getTime()}function Jc(e){ne(1,arguments);var t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function el(e,t){var r;ne(1,arguments);var n=e||{},a=pe(n.start),i=pe(n.end),o=i.getTime();if(!(a.getTime()<=o))throw new RangeError("Invalid interval");var s=[],u=a;u.setHours(0,0,0,0);var l=Number((r=t==null?void 0:t.step)!==null&&r!==void 0?r:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=o;)s.push(pe(u)),u.setDate(u.getDate()+l),u.setHours(0,0,0,0);return s}function da(e){ne(1,arguments);var t=pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function tl(e){ne(1,arguments);var t=e||{},r=pe(t.start),n=pe(t.end),a=n.getTime();if(!(r.getTime()<=a))throw new RangeError("Invalid interval");var i=[],o=r;for(o.setHours(0,0,0,0),o.setMonth(0,1);o.getTime()<=a;)i.push(pe(o)),o.setFullYear(o.getFullYear()+1);return i}function rl(e,t){ne(2,arguments);var r=Oe(t);return Qc(e,-r)}function wt(e){ne(1,arguments);var t=1,r=pe(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function nl(e){ne(1,arguments);var t=pe(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=wt(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=wt(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function al(e){ne(1,arguments);var t=nl(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=wt(r);return n}var ol=6048e5;function il(e){ne(1,arguments);var t=pe(e),r=wt(t).getTime()-al(t).getTime();return Math.round(r/ol)+1}function ut(e,t){var r,n,a,i,o,s,u,l;ne(1,arguments);var f=Ft(),h=Oe((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:f.weekStartsOn)!==null&&n!==void 0?n:(u=f.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var b=pe(e),T=b.getUTCDay(),x=(T<h?7:0)+T-h;return b.setUTCDate(b.getUTCDate()-x),b.setUTCHours(0,0,0,0),b}function ha(e,t){var r,n,a,i,o,s,u,l;ne(1,arguments);var f=pe(e),h=f.getUTCFullYear(),b=Ft(),T=Oe((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:b.firstWeekContainsDate)!==null&&n!==void 0?n:(u=b.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(h+1,0,T),x.setUTCHours(0,0,0,0);var D=ut(x,t),P=new Date(0);P.setUTCFullYear(h,0,T),P.setUTCHours(0,0,0,0);var _=ut(P,t);return f.getTime()>=D.getTime()?h+1:f.getTime()>=_.getTime()?h:h-1}function sl(e,t){var r,n,a,i,o,s,u,l;ne(1,arguments);var f=Ft(),h=Oe((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:f.firstWeekContainsDate)!==null&&n!==void 0?n:(u=f.locale)===null||u===void 0||(l=u.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),b=ha(e,t),T=new Date(0);T.setUTCFullYear(b,0,h),T.setUTCHours(0,0,0,0);var x=ut(T,t);return x}var ul=6048e5;function cl(e,t){ne(1,arguments);var r=pe(e),n=ut(r,t).getTime()-sl(r,t).getTime();return Math.round(n/ul)+1}var pa=function(t,r){switch(t){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"})}},ma=function(t,r){switch(t){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"})}},ll=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return pa(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",pa(a,r)).replace("{{time}}",ma(i,r))},fl={p:ma,P:ll};const va=fl;var dl=["D","DD"],hl=["YY","YYYY"];function pl(e){return dl.indexOf(e)!==-1}function ml(e){return hl.indexOf(e)!==-1}function ga(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vl={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"}},gl=function(t,r,n){var a,i=vl[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};const yl=gl;function Wr(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var bl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xl={date:Wr({formats:bl,defaultWidth:"full"}),time:Wr({formats:wl,defaultWidth:"full"}),dateTime:Wr({formats:Tl,defaultWidth:"full"})};const Pl=xl;var El={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Sl=function(t,r,n,a){return El[t]};const Cl=Sl;function Yt(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,u=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[u]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return a[l]}}var Dl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ol={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Il={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"]},Nl={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"]},_l={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"}},Ml={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"}},jl=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kl={ordinalNumber:jl,era:Yt({values:Dl,defaultWidth:"wide"}),quarter:Yt({values:Ol,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Yt({values:Il,defaultWidth:"wide"}),day:Yt({values:Nl,defaultWidth:"wide"}),dayPeriod:Yt({values:_l,defaultWidth:"wide",formattingValues:Ml,defaultFormattingWidth:"wide"})};const Rl=kl;function $t(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?Al(s,function(h){return h.test(o)}):Ll(s,function(h){return h.test(o)}),l;l=e.valueCallback?e.valueCallback(u):u,l=r.valueCallback?r.valueCallback(l):l;var f=t.slice(o.length);return{value:l,rest:f}}}function Ll(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function Al(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function Fl(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var Yl=/^(\d+)(th|st|nd|rd)?/i,$l=/\d+/i,Ul={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},Hl={any:[/^b/i,/^(a|c)/i]},Wl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vl={any:[/1/i,/2/i,/3/i,/4/i]},zl={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},Bl={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]},ql={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},Gl={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]},Ql={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},Kl={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}},Zl={ordinalNumber:Fl({matchPattern:Yl,parsePattern:$l,valueCallback:function(t){return parseInt(t,10)}}),era:$t({matchPatterns:Ul,defaultMatchWidth:"wide",parsePatterns:Hl,defaultParseWidth:"any"}),quarter:$t({matchPatterns:Wl,defaultMatchWidth:"wide",parsePatterns:Vl,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$t({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Bl,defaultParseWidth:"any"}),day:$t({matchPatterns:ql,defaultMatchWidth:"wide",parsePatterns:Gl,defaultParseWidth:"any"}),dayPeriod:$t({matchPatterns:Ql,defaultMatchWidth:"any",parsePatterns:Kl,defaultParseWidth:"any"})},Xl={code:"en-US",formatDistance:yl,formatLong:Pl,formatRelative:Cl,localize:Rl,match:Zl,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Jl=Xl;function ef(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Vr(e){ne(1,arguments);var t=pe(e),r=t.getDay();return r}function ya(e){ne(1,arguments);var t=pe(e),r=t.getFullYear(),n=t.getMonth(),a=new Date(0);return a.setFullYear(r,n+1,0),a.setHours(0,0,0,0),a.getDate()}function tf(e){ne(1,arguments);var t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function rf(e,t){ne(2,arguments);var r=pe(e),n=pe(t);return r.getTime()<n.getTime()}function ba(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nf(e,t){if(e){if(typeof e=="string")return ba(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ba(e,t)}}function wa(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=nf(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return i=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function R(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jt(e,t){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jt(e,t)}function fe(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jt(e,t)}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},er(e)}function af(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function of(e,t){if(t&&(tt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function de(e){var t=af();return function(){var n=er(e),a;if(t){var i=er(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return of(this,a)}}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(e,t){if(tt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ta(e){var t=sf(e,"string");return tt(t)==="symbol"?t:String(t)}function xa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ta(n.key),n)}}function ue(e,t,r){return t&&xa(e.prototype,t),r&&xa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t,r){return t=Ta(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var uf=10,Pa=function(){function e(){se(this,e),N(this,"priority",void 0),N(this,"subPriority",0)}return ue(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),cf=function(e){fe(r,e);var t=de(r);function r(n,a,i,o,s){var u;return se(this,r),u=t.call(this),u.value=n,u.validateValue=a,u.setValue=i,u.priority=o,s&&(u.subPriority=s),u}return ue(r,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,o){return this.setValue(a,i,this.value,o)}}]),r}(Pa),lf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",uf),N(R(n),"subPriority",-1),n}return ue(r,[{key:"set",value:function(a,i){if(i.timestampIsSet)return a;var o=new Date(0);return o.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),o.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),o}}]),r}(Pa),me=function(){function e(){se(this,e),N(this,"incompatibleTokens",void 0),N(this,"priority",void 0),N(this,"subPriority",void 0)}return ue(e,[{key:"run",value:function(r,n,a,i){var o=this.parse(r,n,a,i);return o?{setter:new cf(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(r,n,a){return!0}}]),e}(),ff=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",140),N(R(n),"incompatibleTokens",["R","u","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"G":case"GG":case"GGG":return o.era(a,{width:"abbreviated"})||o.era(a,{width:"narrow"});case"GGGGG":return o.era(a,{width:"narrow"});case"GGGG":default:return o.era(a,{width:"wide"})||o.era(a,{width:"abbreviated"})||o.era(a,{width:"narrow"})}}},{key:"set",value:function(a,i,o){return i.era=o,a.setUTCFullYear(o,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),Ie={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}/},Ve={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ne(e,t){return e&&{value:t(e.value),rest:e.rest}}function Se(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function ze(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,a=r[2]?parseInt(r[2],10):0,i=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(a*Hr+i*Ur+o*Xc),rest:t.slice(r[0].length)}}function Ea(e){return Se(Ie.anyDigitsSigned,e)}function Ce(e,t){switch(e){case 1:return Se(Ie.singleDigit,t);case 2:return Se(Ie.twoDigits,t);case 3:return Se(Ie.threeDigits,t);case 4:return Se(Ie.fourDigits,t);default:return Se(new RegExp("^\\d{1,"+e+"}"),t)}}function tr(e,t){switch(e){case 1:return Se(Ie.singleDigitSigned,t);case 2:return Se(Ie.twoDigitsSigned,t);case 3:return Se(Ie.threeDigitsSigned,t);case 4:return Se(Ie.fourDigitsSigned,t);default:return Se(new RegExp("^-?\\d{1,"+e+"}"),t)}}function zr(e){switch(e){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 Sa(e,t){var r=t>0,n=r?t:1-t,a;if(n<=50)a=e||100;else{var i=n+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return r?a:1-a}function Ca(e){return e%400===0||e%4===0&&e%100!==0}var df=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return Ne(Ce(4,a),s);case"yo":return Ne(o.ordinalNumber(a,{unit:"year"}),s);default:return Ne(Ce(i.length,a),s)}}},{key:"validate",value:function(a,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var u=Sa(o.year,s);return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}var l=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),hf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return Ne(Ce(4,a),s);case"Yo":return Ne(o.ordinalNumber(a,{unit:"year"}),s);default:return Ne(Ce(i.length,a),s)}}},{key:"validate",value:function(a,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(a,i,o,s){var u=ha(a,s);if(o.isTwoDigitYear){var l=Sa(o.year,u);return a.setUTCFullYear(l,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),ut(a,s)}var f=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(f,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),ut(a,s)}}]),r}(me),pf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i){return tr(i==="R"?4:i.length,a)}},{key:"set",value:function(a,i,o){var s=new Date(0);return s.setUTCFullYear(o,0,4),s.setUTCHours(0,0,0,0),wt(s)}}]),r}(me),mf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",130),N(R(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i){return tr(i==="u"?4:i.length,a)}},{key:"set",value:function(a,i,o){return a.setUTCFullYear(o,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),vf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",120),N(R(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"Q":case"QQ":return Ce(i.length,a);case"Qo":return o.ordinalNumber(a,{unit:"quarter"});case"QQQ":return o.quarter(a,{width:"abbreviated",context:"formatting"})||o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(a,{width:"wide",context:"formatting"})||o.quarter(a,{width:"abbreviated",context:"formatting"})||o.quarter(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),gf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",120),N(R(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"q":case"qq":return Ce(i.length,a);case"qo":return o.ordinalNumber(a,{unit:"quarter"});case"qqq":return o.quarter(a,{width:"abbreviated",context:"standalone"})||o.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(a,{width:"wide",context:"standalone"})||o.quarter(a,{width:"abbreviated",context:"standalone"})||o.quarter(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,i){return i>=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),yf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),N(R(n),"priority",110),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return l-1};switch(i){case"M":return Ne(Se(Ie.month,a),s);case"MM":return Ne(Ce(2,a),s);case"Mo":return Ne(o.ordinalNumber(a,{unit:"month"}),s);case"MMM":return o.month(a,{width:"abbreviated",context:"formatting"})||o.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(a,{width:"wide",context:"formatting"})||o.month(a,{width:"abbreviated",context:"formatting"})||o.month(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),bf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",110),N(R(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return l-1};switch(i){case"L":return Ne(Se(Ie.month,a),s);case"LL":return Ne(Ce(2,a),s);case"Lo":return Ne(o.ordinalNumber(a,{unit:"month"}),s);case"LLL":return o.month(a,{width:"abbreviated",context:"standalone"})||o.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(a,{width:"wide",context:"standalone"})||o.month(a,{width:"abbreviated",context:"standalone"})||o.month(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(me);function wf(e,t,r){ne(2,arguments);var n=pe(e),a=Oe(t),i=cl(n,r)-a;return n.setUTCDate(n.getUTCDate()-i*7),n}var Tf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",100),N(R(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"w":return Se(Ie.week,a);case"wo":return o.ordinalNumber(a,{unit:"week"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=53}},{key:"set",value:function(a,i,o,s){return ut(wf(a,o,s),s)}}]),r}(me);function xf(e,t){ne(2,arguments);var r=pe(e),n=Oe(t),a=il(r)-n;return r.setUTCDate(r.getUTCDate()-a*7),r}var Pf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",100),N(R(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"I":return Se(Ie.week,a);case"Io":return o.ordinalNumber(a,{unit:"week"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=53}},{key:"set",value:function(a,i,o){return wt(xf(a,o))}}]),r}(me),Ef=[31,28,31,30,31,30,31,31,30,31,30,31],Sf=[31,29,31,30,31,30,31,31,30,31,30,31],Cf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"subPriority",1),N(R(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"d":return Se(Ie.date,a);case"do":return o.ordinalNumber(a,{unit:"date"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){var o=a.getUTCFullYear(),s=Ca(o),u=a.getUTCMonth();return s?i>=1&&i<=Sf[u]:i>=1&&i<=Ef[u]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),r}(me),Df=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"subpriority",1),N(R(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"D":case"DD":return Se(Ie.dayOfYear,a);case"Do":return o.ordinalNumber(a,{unit:"date"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){var o=a.getUTCFullYear(),s=Ca(o);return s?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),r}(me);function Br(e,t,r){var n,a,i,o,s,u,l,f;ne(2,arguments);var h=Ft(),b=Oe((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:h.weekStartsOn)!==null&&a!==void 0?a:(l=h.locale)===null||l===void 0||(f=l.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&n!==void 0?n:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var T=pe(e),x=Oe(t),D=T.getUTCDay(),P=x%7,_=(P+7)%7,z=(_<b?7:0)+x-D;return T.setUTCDate(T.getUTCDate()+z),T}var Of=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"E":case"EE":case"EEE":return o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Br(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me),If=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o,s){var u=function(f){var h=Math.floor((f-1)/7)*7;return(f+s.weekStartsOn+6)%7+h};switch(i){case"e":case"ee":return Ne(Ce(i.length,a),u);case"eo":return Ne(o.ordinalNumber(a,{unit:"day"}),u);case"eee":return o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"eeeee":return o.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Br(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me),Nf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o,s){var u=function(f){var h=Math.floor((f-1)/7)*7;return(f+s.weekStartsOn+6)%7+h};switch(i){case"c":case"cc":return Ne(Ce(i.length,a),u);case"co":return Ne(o.ordinalNumber(a,{unit:"day"}),u);case"ccc":return o.day(a,{width:"abbreviated",context:"standalone"})||o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"});case"ccccc":return o.day(a,{width:"narrow",context:"standalone"});case"cccccc":return o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(a,{width:"wide",context:"standalone"})||o.day(a,{width:"abbreviated",context:"standalone"})||o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,i){return i>=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=Br(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me);function _f(e,t){ne(2,arguments);var r=Oe(t);r%7===0&&(r=r-7);var n=1,a=pe(e),i=a.getUTCDay(),o=r%7,s=(o+7)%7,u=(s<n?7:0)+r-i;return a.setUTCDate(a.getUTCDate()+u),a}var Mf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",90),N(R(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){var s=function(l){return l===0?7:l};switch(i){case"i":case"ii":return Ce(i.length,a);case"io":return o.ordinalNumber(a,{unit:"day"});case"iii":return Ne(o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ne(o.day(a,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ne(o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ne(o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(a,i){return i>=1&&i<=7}},{key:"set",value:function(a,i,o){return a=_f(a,o),a.setUTCHours(0,0,0,0),a}}]),r}(me),jf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",80),N(R(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"a":case"aa":case"aaa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,i,o){return a.setUTCHours(zr(o),0,0,0),a}}]),r}(me),kf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",80),N(R(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"b":case"bb":case"bbb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,i,o){return a.setUTCHours(zr(o),0,0,0),a}}]),r}(me),Rf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",80),N(R(n),"incompatibleTokens",["a","b","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"B":case"BB":case"BBB":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,i,o){return a.setUTCHours(zr(o),0,0,0),a}}]),r}(me),Lf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["H","K","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"h":return Se(Ie.hour12h,a);case"ho":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(me),Af=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"H":return Se(Ie.hour23h,a);case"Ho":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),r}(me),Ff=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["h","H","k","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"K":return Se(Ie.hour11h,a);case"Ko":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(me),Yf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",70),N(R(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"k":return Se(Ie.hour24h,a);case"ko":return o.ordinalNumber(a,{unit:"hour"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),r}(me),$f=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",60),N(R(n),"incompatibleTokens",["t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"m":return Se(Ie.minute,a);case"mo":return o.ordinalNumber(a,{unit:"minute"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),r}(me),Uf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",50),N(R(n),"incompatibleTokens",["t","T"]),n}return ue(r,[{key:"parse",value:function(a,i,o){switch(i){case"s":return Se(Ie.second,a);case"so":return o.ordinalNumber(a,{unit:"second"});default:return Ce(i.length,a)}}},{key:"validate",value:function(a,i){return i>=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),r}(me),Hf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",30),N(R(n),"incompatibleTokens",["t","T"]),n}return ue(r,[{key:"parse",value:function(a,i){var o=function(u){return Math.floor(u*Math.pow(10,-i.length+3))};return Ne(Ce(i.length,a),o)}},{key:"set",value:function(a,i,o){return a.setUTCMilliseconds(o),a}}]),r}(me),Wf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",10),N(R(n),"incompatibleTokens",["t","T","x"]),n}return ue(r,[{key:"parse",value:function(a,i){switch(i){case"X":return ze(Ve.basicOptionalMinutes,a);case"XX":return ze(Ve.basic,a);case"XXXX":return ze(Ve.basicOptionalSeconds,a);case"XXXXX":return ze(Ve.extendedOptionalSeconds,a);case"XXX":default:return ze(Ve.extended,a)}}},{key:"set",value:function(a,i,o){return i.timestampIsSet?a:new Date(a.getTime()-o)}}]),r}(me),Vf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",10),N(R(n),"incompatibleTokens",["t","T","X"]),n}return ue(r,[{key:"parse",value:function(a,i){switch(i){case"x":return ze(Ve.basicOptionalMinutes,a);case"xx":return ze(Ve.basic,a);case"xxxx":return ze(Ve.basicOptionalSeconds,a);case"xxxxx":return ze(Ve.extendedOptionalSeconds,a);case"xxx":default:return ze(Ve.extended,a)}}},{key:"set",value:function(a,i,o){return i.timestampIsSet?a:new Date(a.getTime()-o)}}]),r}(me),zf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",40),N(R(n),"incompatibleTokens","*"),n}return ue(r,[{key:"parse",value:function(a){return Ea(a)}},{key:"set",value:function(a,i,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),r}(me),Bf=function(e){fe(r,e);var t=de(r);function r(){var n;se(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=t.call.apply(t,[this].concat(i)),N(R(n),"priority",20),N(R(n),"incompatibleTokens","*"),n}return ue(r,[{key:"parse",value:function(a){return Ea(a)}},{key:"set",value:function(a,i,o){return[new Date(o),{timestampIsSet:!0}]}}]),r}(me),qf={G:new ff,y:new df,Y:new hf,R:new pf,u:new mf,Q:new vf,q:new gf,M:new yf,L:new bf,w:new Tf,I:new Pf,d:new Cf,D:new Df,E:new Of,e:new If,c:new Nf,i:new Mf,a:new jf,b:new kf,B:new Rf,h:new Lf,H:new Af,K:new Ff,k:new Yf,m:new $f,s:new Uf,S:new Hf,X:new Wf,x:new Vf,t:new zf,T:new Bf},Gf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kf=/^'([^]*?)'?$/,Zf=/''/g,Xf=/\S/,Jf=/[a-zA-Z]/;function Be(e,t,r,n){var a,i,o,s,u,l,f,h,b,T,x,D,P,_,z,K,W,y;ne(3,arguments);var $=String(e),X=String(t),ee=Ft(),B=(a=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:ee.locale)!==null&&a!==void 0?a:Jl;if(!B.match)throw new RangeError("locale must contain match property");var oe=Oe((o=(s=(u=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(f=n.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&u!==void 0?u:ee.firstWeekContainsDate)!==null&&s!==void 0?s:(b=ee.locale)===null||b===void 0||(T=b.options)===null||T===void 0?void 0:T.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(oe>=1&&oe<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var te=Oe((x=(D=(P=(_=n==null?void 0:n.weekStartsOn)!==null&&_!==void 0?_:n==null||(z=n.locale)===null||z===void 0||(K=z.options)===null||K===void 0?void 0:K.weekStartsOn)!==null&&P!==void 0?P:ee.weekStartsOn)!==null&&D!==void 0?D:(W=ee.locale)===null||W===void 0||(y=W.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&x!==void 0?x:0);if(!(te>=0&&te<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(X==="")return $===""?pe(r):new Date(NaN);var ae={firstWeekContainsDate:oe,weekStartsOn:te,locale:B},g=[new lf],Y=X.match(Qf).map(function(j){var k=j[0];if(k in va){var V=va[k];return V(j,B.formatLong)}return j}).join("").match(Gf),q=[],F=wa(Y),re;try{var L=function(){var k=re.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&ml(k)&&ga(k,X,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&pl(k)&&ga(k,X,e);var V=k[0],Ee=qf[V];if(Ee){var C=Ee.incompatibleTokens;if(Array.isArray(C)){var ke=q.find(function(Fe){return C.includes(Fe.token)||Fe.token===V});if(ke)throw new RangeError("The format string mustn't contain `".concat(ke.fullToken,"` and `").concat(k,"` at the same time"))}else if(Ee.incompatibleTokens==="*"&&q.length>0)throw new RangeError("The format string mustn't contain `".concat(k,"` and any other token at the same time"));q.push({token:V,fullToken:k});var Ae=Ee.run($,k,B.match,ae);if(!Ae)return{v:new Date(NaN)};g.push(Ae.setter),$=Ae.rest}else{if(V.match(Jf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");if(k==="''"?k="'":V==="'"&&(k=ed(k)),$.indexOf(k)===0)$=$.slice(k.length);else return{v:new Date(NaN)}}};for(F.s();!(re=F.n()).done;){var he=L();if(tt(he)==="object")return he.v}}catch(j){F.e(j)}finally{F.f()}if($.length>0&&Xf.test($))return new Date(NaN);var v=g.map(function(j){return j.priority}).sort(function(j,k){return k-j}).filter(function(j,k,V){return V.indexOf(j)===k}).map(function(j){return g.filter(function(k){return k.priority===j}).sort(function(k,V){return V.subPriority-k.subPriority})}).map(function(j){return j[0]}),E=pe(r);if(isNaN(E.getTime()))return new Date(NaN);var H=rl(E,Zc(E)),d={},S=wa(v),O;try{for(S.s();!(O=S.n()).done;){var M=O.value;if(!M.validate(H,ae))return new Date(NaN);var A=M.set(H,d,ae);Array.isArray(A)?(H=A[0],ef(d,A[1])):H=A}}catch(j){S.e(j)}finally{S.f()}return H}function ed(e){return e.match(Kf)[1].replace(Zf,"'")}function td(e){return ne(1,arguments),fa(e,Date.now())}function rd(e,t){ne(2,arguments);var r=Oe(t);return Zt(e,-r)}function nd(e,t){ne(2,arguments);var r=t-Vr(e);return r<=0&&(r+=7),Zt(e,r)}function ad(e,t){var r;ne(1,arguments);var n=Oe((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=ud(e),i;if(a.date){var o=cd(a.date,n);i=ld(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),u=0,l;if(a.time&&(u=fd(a.time),isNaN(u)))return new Date(NaN);if(a.timezone){if(l=dd(a.timezone),isNaN(l))return new Date(NaN)}else{var f=new Date(s+u),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(s+u+l)}var rr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},od=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,id=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ud(e){var t={},r=e.split(rr.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],rr.timeZoneDelimiter.test(t.date)&&(t.date=e.split(rr.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var a=rr.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function cd(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function ld(e,t){if(t===null)return new Date(NaN);var r=e.match(od);if(!r)return new Date(NaN);var n=!!r[4],a=Ut(r[1]),i=Ut(r[2])-1,o=Ut(r[3]),s=Ut(r[4]),u=Ut(r[5])-1;if(n)return gd(t,s,u)?hd(t,s,u):new Date(NaN);var l=new Date(0);return!md(t,i,o)||!vd(t,a)?new Date(NaN):(l.setUTCFullYear(t,i,Math.max(a,o)),l)}function Ut(e){return e?parseInt(e):1}function fd(e){var t=e.match(id);if(!t)return NaN;var r=qr(t[1]),n=qr(t[2]),a=qr(t[3]);return yd(r,n,a)?r*Hr+n*Ur+a*1e3:NaN}function qr(e){return e&&parseFloat(e.replace(",","."))||0}function dd(e){if(e==="Z")return 0;var t=e.match(sd);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return bd(n,a)?r*(n*Hr+a*Ur):NaN}function hd(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}var pd=[31,null,31,30,31,30,31,31,30,31,30,31];function Da(e){return e%400===0||e%4===0&&e%100!==0}function md(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(pd[t]||(Da(e)?29:28))}function vd(e,t){return t>=1&&t<=(Da(e)?366:365)}function gd(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function yd(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function bd(e,t){return t>=0&&t<=59}function wd(e,t){ne(2,arguments);var r=pe(e),n=Oe(t),a=r.getFullYear(),i=r.getDate(),o=new Date(0);o.setFullYear(a,n,15),o.setHours(0,0,0,0);var s=ya(o);return r.setMonth(n,Math.min(i,s)),r}function Td(e,t){ne(2,arguments);var r=pe(e),n=Oe(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function Oa(e,t){ne(2,arguments);var r=Oe(t);return st(e,-r)}function Ia(e,t){ne(2,arguments);var r=Oe(t);return Xt(e,-r)}function Na(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function xd(e,t,r){const n=[];for(let a=e;a<=t;a++)n.push(r?r(a):a);return n}function Pd(e,t){const r=e.target;return r?!t.isSameNode(r)&&!t.contains(r):!1}function Ed(e,t){return e.isSameNode(t)||e.contains(t)}function Sd(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let a=0,i=r.length;a<i;a++){const[o,s]=r[a];if(typeof s=="string"&&s.indexOf(",")>-1){if(!s.split(",").map(l=>l.trim()).includes(n[o]))return!1}else if(n[o]!==s)return!1}return!0}function Cd(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let a=0,i=r.length;a<i;a++){const[o,s]=r[a];if(typeof s=="string"&&s.indexOf(",")>-1){if(s.split(",").map(l=>l.trim()).includes(n[o]))return!0}else if(n[o]===s)return!0}return!1}function _a(e,t,r=!1){return r&&Sd(e,t)||!r&&Cd(e,t)?e:e.parentElement?_a(e.parentElement,t):e}function Ma(e,t){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let a=0,i=r.length;a<i;a++){const o=getComputedStyle(r[a]);o[e]&&t(o[e])&&n.push(o[e])}return n}function yp(e){return e}function Dd(e){const t=document.documentElement;Object.keys(e).forEach(r=>{t.style.setProperty(r,e[r])})}function Od(e){return{"--theme-bsc-primary-1":e.primary1,"--theme-bsc-primary-2":e.primary2,"--theme-bsc-primary-3":e.primary3,"--theme-bsc-primary-4":e.primary4,"--theme-bsc-primary-5":e.primary5,"--theme-bsc-gray-1":e.gray1||"#303030","--theme-bsc-gray-2":e.gray2||"#5f5f5f","--theme-bsc-gray-3":e.gray3||"#8f8f8f","--theme-bsc-gray-4":e.gray4||"#bebebe","--theme-bsc-gray-5":e.gray5||"#eeeeee","--theme-bsc-mono-dark-1":e.monoDark1||"#222222","--theme-bsc-mono-dark-2":e.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":e.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":e.monoLight1||"#fefefe","--theme-bsc-mono-light-2":e.monoLight2||"#eeeeee","--theme-bsc-mono-light-3":e.monoLight3||"#cccccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}const Gr=({template:e,props:t,children:r})=>e(t,r);var Id=p;function Nd(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var nr=Nd(Id),_d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Md=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},ja=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Md(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return nr.default.createElement("svg",_d({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),nr.default.createElement("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))},jd=nr.default.memo?nr.default.memo(ja):ja,kd=jd;const Rd=et(kd);var Ld=p;function Ad(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ar=Ad(Ld),Fd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yd=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},ka=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Yd(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return ar.default.createElement("svg",Fd({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),ar.default.createElement("path",{d:"M13.172 12l-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414z"}))},$d=ar.default.memo?ar.default.memo(ka):ka,Ud=$d;const Hd=et(Ud);var Wd=p;function Vd(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var or=Vd(Wd),zd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bd=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Ra=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Bd(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return or.default.createElement("svg",zd({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),or.default.createElement("path",{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}))},qd=or.default.memo?or.default.memo(Ra):Ra,Gd=qd;const La=et(Gd);var Qd=p;function Kd(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ir=Kd(Qd),Zd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xd=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Aa=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=Xd(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return ir.default.createElement("svg",Zd({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),ir.default.createElement("path",{d:"M17 3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2v2h6V1h2v2zm3 8H4v8h16v-8zm-5-6H9v2H7V5H4v4h16V5h-3v2h-2V5zm-9 8h2v2H6v-2zm5 0h2v2h-2v-2zm5 0h2v2h-2v-2z"}))},Jd=ir.default.memo?ir.default.memo(Aa):Aa,eh=Jd;const Fa=et(eh);var th=p;function rh(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var sr=rh(th),nh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ah=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Ya=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=ah(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return sr.default.createElement("svg",nh({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),sr.default.createElement("path",{d:"M12 10.828l-4.95 4.95-1.414-1.414L12 8l6.364 6.364-1.414 1.414z"}))},oh=sr.default.memo?sr.default.memo(Ya):Ya,ih=oh;const Qr=et(ih);var sh=p;function uh(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ur=uh(sh),ch=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lh=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},$a=function(t){var r=t.color,n=r===void 0?"currentColor":r,a=t.size,i=a===void 0?24:a;t.children;var o=lh(t,["color","size","children"]),s="remixicon-icon "+(o.className||"");return ur.default.createElement("svg",ch({},o,{className:s,width:i,height:i,fill:n,viewBox:"0 0 24 24"}),ur.default.createElement("path",{d:"M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z"}))},fh=ur.default.memo?ur.default.memo($a):$a,dh=fh;const Kr=et(dh);function Ua(e,t,r){const n=i=>{const o=i.target,s=e.style.display!=="hidden";e&&s&&!Ed(e,o)&&!a(r,o)&&t(!1),t(!0)},a=(i,o)=>{if(!i)return!1;for(let s=0,u=i.length;s<u;s++)if(i[s].isSameNode(o)||i[s].contains(o))return!0;return!1};return document.addEventListener("mousedown",n),n}function Ha(e){document.removeEventListener("mousedown",e)}function hh(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function ph(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jt(e,t)}var Zr={exports:{}},cr={exports:{}},ge={};/** @license React v16.13.1
33
33
  * react-is.production.min.js
34
34
  *
35
35
  * Copyright (c) Facebook, Inc. and its affiliates.
36
36
  *
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
- */var Wa;function mh(){if(Wa)return ge;Wa=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,D=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function Z(g){if(typeof g=="object"&&g!==null){var $=g.$$typeof;switch($){case t:switch(g=g.type,g){case u:case l:case n:case i:case a:case h:return g;default:switch(g=g&&g.$$typeof,g){case s:case f:case x:case T:case o:return g;default:return $}}case r:return $}}}function W(g){return Z(g)===l}return ge.AsyncMode=u,ge.ConcurrentMode=l,ge.ContextConsumer=s,ge.ContextProvider=o,ge.Element=t,ge.ForwardRef=f,ge.Fragment=n,ge.Lazy=x,ge.Memo=T,ge.Portal=r,ge.Profiler=i,ge.StrictMode=a,ge.Suspense=h,ge.isAsyncMode=function(g){return W(g)||Z(g)===u},ge.isConcurrentMode=W,ge.isContextConsumer=function(g){return Z(g)===s},ge.isContextProvider=function(g){return Z(g)===o},ge.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},ge.isForwardRef=function(g){return Z(g)===f},ge.isFragment=function(g){return Z(g)===n},ge.isLazy=function(g){return Z(g)===x},ge.isMemo=function(g){return Z(g)===T},ge.isPortal=function(g){return Z(g)===r},ge.isProfiler=function(g){return Z(g)===i},ge.isStrictMode=function(g){return Z(g)===a},ge.isSuspense=function(g){return Z(g)===h},ge.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===l||g===i||g===a||g===h||g===b||typeof g=="object"&&g!==null&&(g.$$typeof===x||g.$$typeof===T||g.$$typeof===o||g.$$typeof===s||g.$$typeof===f||g.$$typeof===P||g.$$typeof===_||g.$$typeof===z||g.$$typeof===D)},ge.typeOf=Z,ge}var ye={};/** @license React v16.13.1
39
+ */var Wa;function mh(){if(Wa)return ge;Wa=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,D=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function K(y){if(typeof y=="object"&&y!==null){var $=y.$$typeof;switch($){case t:switch(y=y.type,y){case u:case l:case n:case i:case a:case h:return y;default:switch(y=y&&y.$$typeof,y){case s:case f:case x:case T:case o:return y;default:return $}}case r:return $}}}function W(y){return K(y)===l}return ge.AsyncMode=u,ge.ConcurrentMode=l,ge.ContextConsumer=s,ge.ContextProvider=o,ge.Element=t,ge.ForwardRef=f,ge.Fragment=n,ge.Lazy=x,ge.Memo=T,ge.Portal=r,ge.Profiler=i,ge.StrictMode=a,ge.Suspense=h,ge.isAsyncMode=function(y){return W(y)||K(y)===u},ge.isConcurrentMode=W,ge.isContextConsumer=function(y){return K(y)===s},ge.isContextProvider=function(y){return K(y)===o},ge.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},ge.isForwardRef=function(y){return K(y)===f},ge.isFragment=function(y){return K(y)===n},ge.isLazy=function(y){return K(y)===x},ge.isMemo=function(y){return K(y)===T},ge.isPortal=function(y){return K(y)===r},ge.isProfiler=function(y){return K(y)===i},ge.isStrictMode=function(y){return K(y)===a},ge.isSuspense=function(y){return K(y)===h},ge.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===l||y===i||y===a||y===h||y===b||typeof y=="object"&&y!==null&&(y.$$typeof===x||y.$$typeof===T||y.$$typeof===o||y.$$typeof===s||y.$$typeof===f||y.$$typeof===P||y.$$typeof===_||y.$$typeof===z||y.$$typeof===D)},ge.typeOf=K,ge}var ye={};/** @license React v16.13.1
40
40
  * react-is.development.js
41
41
  *
42
42
  * Copyright (c) Facebook, Inc. and its affiliates.
43
43
  *
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */var Va;function vh(){return Va||(Va=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,D=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function Z(C){return typeof C=="string"||typeof C=="function"||C===n||C===l||C===i||C===a||C===h||C===b||typeof C=="object"&&C!==null&&(C.$$typeof===x||C.$$typeof===T||C.$$typeof===o||C.$$typeof===s||C.$$typeof===f||C.$$typeof===P||C.$$typeof===_||C.$$typeof===z||C.$$typeof===D)}function W(C){if(typeof C=="object"&&C!==null){var ke=C.$$typeof;switch(ke){case t:var Ae=C.type;switch(Ae){case u:case l:case n:case i:case a:case h:return Ae;default:var Fe=Ae&&Ae.$$typeof;switch(Fe){case s:case f:case x:case T:case o:return Fe;default:return ke}}case r:return ke}}}var g=u,$=l,J=s,te=o,B=t,oe=f,re=n,G=x,y=T,U=r,q=i,F=a,ne=h,L=!1;function he(C){return L||(L=!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.")),v(C)||W(C)===u}function v(C){return W(C)===l}function E(C){return W(C)===s}function H(C){return W(C)===o}function d(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function S(C){return W(C)===f}function O(C){return W(C)===n}function M(C){return W(C)===x}function A(C){return W(C)===T}function j(C){return W(C)===r}function k(C){return W(C)===i}function V(C){return W(C)===a}function Ee(C){return W(C)===h}ye.AsyncMode=g,ye.ConcurrentMode=$,ye.ContextConsumer=J,ye.ContextProvider=te,ye.Element=B,ye.ForwardRef=oe,ye.Fragment=re,ye.Lazy=G,ye.Memo=y,ye.Portal=U,ye.Profiler=q,ye.StrictMode=F,ye.Suspense=ne,ye.isAsyncMode=he,ye.isConcurrentMode=v,ye.isContextConsumer=E,ye.isContextProvider=H,ye.isElement=d,ye.isForwardRef=S,ye.isFragment=O,ye.isLazy=M,ye.isMemo=A,ye.isPortal=j,ye.isProfiler=k,ye.isStrictMode=V,ye.isSuspense=Ee,ye.isValidElementType=Z,ye.typeOf=W}()),ye}var za;function Ba(){return za||(za=1,process.env.NODE_ENV==="production"?cr.exports=mh():cr.exports=vh()),cr.exports}/*
46
+ */var Va;function vh(){return Va||(Va=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,D=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function K(C){return typeof C=="string"||typeof C=="function"||C===n||C===l||C===i||C===a||C===h||C===b||typeof C=="object"&&C!==null&&(C.$$typeof===x||C.$$typeof===T||C.$$typeof===o||C.$$typeof===s||C.$$typeof===f||C.$$typeof===P||C.$$typeof===_||C.$$typeof===z||C.$$typeof===D)}function W(C){if(typeof C=="object"&&C!==null){var ke=C.$$typeof;switch(ke){case t:var Ae=C.type;switch(Ae){case u:case l:case n:case i:case a:case h:return Ae;default:var Fe=Ae&&Ae.$$typeof;switch(Fe){case s:case f:case x:case T:case o:return Fe;default:return ke}}case r:return ke}}}var y=u,$=l,X=s,ee=o,B=t,oe=f,te=n,ae=x,g=T,Y=r,q=i,F=a,re=h,L=!1;function he(C){return L||(L=!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.")),v(C)||W(C)===u}function v(C){return W(C)===l}function E(C){return W(C)===s}function H(C){return W(C)===o}function d(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function S(C){return W(C)===f}function O(C){return W(C)===n}function M(C){return W(C)===x}function A(C){return W(C)===T}function j(C){return W(C)===r}function k(C){return W(C)===i}function V(C){return W(C)===a}function Ee(C){return W(C)===h}ye.AsyncMode=y,ye.ConcurrentMode=$,ye.ContextConsumer=X,ye.ContextProvider=ee,ye.Element=B,ye.ForwardRef=oe,ye.Fragment=te,ye.Lazy=ae,ye.Memo=g,ye.Portal=Y,ye.Profiler=q,ye.StrictMode=F,ye.Suspense=re,ye.isAsyncMode=he,ye.isConcurrentMode=v,ye.isContextConsumer=E,ye.isContextProvider=H,ye.isElement=d,ye.isForwardRef=S,ye.isFragment=O,ye.isLazy=M,ye.isMemo=A,ye.isPortal=j,ye.isProfiler=k,ye.isStrictMode=V,ye.isSuspense=Ee,ye.isValidElementType=K,ye.typeOf=W}()),ye}var za;function Ba(){return za||(za=1,process.env.NODE_ENV==="production"?cr.exports=mh():cr.exports=vh()),cr.exports}/*
47
47
  object-assign
48
48
  (c) Sindre Sorhus
49
49
  @license MIT
50
- */var Xr,qa;function gh(){if(qa)return Xr;qa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xr=a()?Object.assign:function(i,o){for(var s,u=n(i),l,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)t.call(s,h)&&(u[h]=s[h]);if(e){l=e(s);for(var b=0;b<l.length;b++)r.call(s,l[b])&&(u[l[b]]=s[l[b]])}}return u},Xr}var Jr,Ga;function en(){if(Ga)return Jr;Ga=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jr=e,Jr}var tn,Qa;function Ka(){return Qa||(Qa=1,tn=Function.call.bind(Object.prototype.hasOwnProperty)),tn}var rn,Za;function yh(){if(Za)return rn;Za=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=en(),r={},n=Ka();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var f in i)if(n(i,f)){var h;try{if(typeof i[f]!="function"){var b=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}h=i[f](o,f,u,s,null,t)}catch(x){h=x}if(h&&!(h instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var T=l?l():"";e("Failed "+s+" type: "+h.message+(T??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},rn=a,rn}var nn,Xa;function bh(){if(Xa)return nn;Xa=1;var e=Ba(),t=gh(),r=en(),n=Ka(),a=yh(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return nn=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(v){var E=v&&(l&&v[l]||v[f]);if(typeof E=="function")return E}var b="<<anonymous>>",T={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:z(),arrayOf:Z,element:W(),elementType:g(),instanceOf:$,node:oe(),objectOf:te,oneOf:J,oneOfType:B,shape:G,exact:y};function x(v,E){return v===E?v!==0||1/v===1/E:v!==v&&E!==E}function D(v,E){this.message=v,this.data=E&&typeof E=="object"?E:{},this.stack=""}D.prototype=Error.prototype;function P(v){if(process.env.NODE_ENV!=="production")var E={},H=0;function d(O,M,A,j,k,V,Ee){if(j=j||b,V=V||A,Ee!==r){if(u){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=j+":"+A;!E[ke]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+j+"`. 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."),E[ke]=!0,H++)}}return M[A]==null?O?M[A]===null?new D("The "+k+" `"+V+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new D("The "+k+" `"+V+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:v(M,A,j,k,V)}var S=d.bind(null,!1);return S.isRequired=d.bind(null,!0),S}function _(v){function E(H,d,S,O,M,A){var j=H[d],k=F(j);if(k!==v){var V=ne(j);return new D("Invalid "+O+" `"+M+"` of type "+("`"+V+"` supplied to `"+S+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return P(E)}function z(){return P(o)}function Z(v){function E(H,d,S,O,M){if(typeof v!="function")return new D("Property `"+M+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var A=H[d];if(!Array.isArray(A)){var j=F(A);return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected an array."))}for(var k=0;k<A.length;k++){var V=v(A,k,S,O,M+"["+k+"]",r);if(V instanceof Error)return V}return null}return P(E)}function W(){function v(E,H,d,S,O){var M=E[H];if(!s(M)){var A=F(M);return new D("Invalid "+S+" `"+O+"` of type "+("`"+A+"` supplied to `"+d+"`, expected a single ReactElement."))}return null}return P(v)}function g(){function v(E,H,d,S,O){var M=E[H];if(!e.isValidElementType(M)){var A=F(M);return new D("Invalid "+S+" `"+O+"` of type "+("`"+A+"` supplied to `"+d+"`, expected a single ReactElement type."))}return null}return P(v)}function $(v){function E(H,d,S,O,M){if(!(H[d]instanceof v)){var A=v.name||b,j=he(H[d]);return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected ")+("instance of `"+A+"`."))}return null}return P(E)}function J(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function E(H,d,S,O,M){for(var A=H[d],j=0;j<v.length;j++)if(x(A,v[j]))return null;var k=JSON.stringify(v,function(Ee,C){var ke=ne(C);return ke==="symbol"?String(C):C});return new D("Invalid "+O+" `"+M+"` of value `"+String(A)+"` "+("supplied to `"+S+"`, expected one of "+k+"."))}return P(E)}function te(v){function E(H,d,S,O,M){if(typeof v!="function")return new D("Property `"+M+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected an object."));for(var k in A)if(n(A,k)){var V=v(A,k,S,O,M+"."+k,r);if(V instanceof Error)return V}return null}return P(E)}function B(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var E=0;E<v.length;E++){var H=v[E];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+L(H)+" at index "+E+"."),o}function d(S,O,M,A,j){for(var k=[],V=0;V<v.length;V++){var Ee=v[V],C=Ee(S,O,M,A,j,r);if(C==null)return null;C.data&&n(C.data,"expectedType")&&k.push(C.data.expectedType)}var ke=k.length>0?", expected one of type ["+k.join(", ")+"]":"";return new D("Invalid "+A+" `"+j+"` supplied to "+("`"+M+"`"+ke+"."))}return P(d)}function oe(){function v(E,H,d,S,O){return U(E[H])?null:new D("Invalid "+S+" `"+O+"` supplied to "+("`"+d+"`, expected a ReactNode."))}return P(v)}function re(v,E,H,d,S){return new D((v||"React class")+": "+E+" type `"+H+"."+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+S+"`.")}function G(v){function E(H,d,S,O,M){var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type `"+j+"` "+("supplied to `"+S+"`, expected `object`."));for(var k in v){var V=v[k];if(typeof V!="function")return re(S,O,M,k,ne(V));var Ee=V(A,k,S,O,M+"."+k,r);if(Ee)return Ee}return null}return P(E)}function y(v){function E(H,d,S,O,M){var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type `"+j+"` "+("supplied to `"+S+"`, expected `object`."));var k=t({},H[d],v);for(var V in k){var Ee=v[V];if(n(v,V)&&typeof Ee!="function")return re(S,O,M,V,ne(Ee));if(!Ee)return new D("Invalid "+O+" `"+M+"` key `"+V+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(H[d],null," ")+`
51
- Valid keys: `+JSON.stringify(Object.keys(v),null," "));var C=Ee(A,V,S,O,M+"."+V,r);if(C)return C}return null}return P(E)}function U(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(U);if(v===null||s(v))return!0;var E=h(v);if(E){var H=E.call(v),d;if(E!==v.entries){for(;!(d=H.next()).done;)if(!U(d.value))return!1}else for(;!(d=H.next()).done;){var S=d.value;if(S&&!U(S[1]))return!1}}else return!1;return!0;default:return!1}}function q(v,E){return v==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function F(v){var E=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":q(E,v)?"symbol":E}function ne(v){if(typeof v>"u"||v===null)return""+v;var E=F(v);if(E==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return E}function L(v){var E=ne(v);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function he(v){return!v.constructor||!v.constructor.name?b:v.constructor.name}return T.checkPropTypes=a,T.resetWarningCache=a.resetWarningCache,T.PropTypes=T,T},nn}var an,Ja;function wh(){if(Ja)return an;Ja=1;var e=en();function t(){}function r(){}return r.resetWarningCache=t,an=function(){function n(o,s,u,l,f,h){if(h!==e){var b=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 b.name="Invariant Violation",b}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},an}if(process.env.NODE_ENV!=="production"){var Th=Ba(),xh=!0;Zr.exports=bh()(Th.isElement,xh)}else Zr.exports=wh()();var Ph=Zr.exports;const ee=et(Ph),eo={disabled:!1};var Eh=process.env.NODE_ENV!=="production"?ee.oneOfType([ee.number,ee.shape({enter:ee.number,exit:ee.number,appear:ee.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ee.oneOfType([ee.string,ee.shape({enter:ee.string,exit:ee.string,active:ee.string}),ee.shape({enter:ee.string,enterDone:ee.string,enterActive:ee.string,exit:ee.string,exitDone:ee.string,exitActive:ee.string})]);const to=p.createContext(null);var Sh=function(t){return t.scrollTop},Ht="unmounted",ct="exited",lt="entering",Tt="entered",on="exiting",Ze=function(e){ph(t,e);function t(n,a){var i;i=e.call(this,n,a)||this;var o=a,s=o&&!o.isMounting?n.enter:n.appear,u;return i.appearStatus=null,n.in?s?(u=ct,i.appearStatus=lt):u=Tt:n.unmountOnExit||n.mountOnEnter?u=Ht:u=ct,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Ht?{status:ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var i=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==lt&&o!==Tt&&(i=lt):(o===lt||o===Tt)&&(i=on)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,i,o,s;return i=o=s=a,a!=null&&typeof a!="number"&&(i=a.exit,o=a.enter,s=a.appear!==void 0?a.appear:o),{exit:i,enter:o,appear:s}},r.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===lt){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:He.findDOMNode(this);o&&Sh(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ct&&this.setState({status:Ht})},r.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,u=this.props.nodeRef?[s]:[He.findDOMNode(this),s],l=u[0],f=u[1],h=this.getTimeouts(),b=s?h.appear:h.enter;if(!a&&!o||eo.disabled){this.safeSetState({status:Tt},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:lt},function(){i.props.onEntering(l,f),i.onTransitionEnd(b,function(){i.safeSetState({status:Tt},function(){i.props.onEntered(l,f)})})})},r.performExit=function(){var a=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:He.findDOMNode(this);if(!i||eo.disabled){this.safeSetState({status:ct},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:on},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:ct},function(){a.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},r.setNextCallback=function(a){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,a(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(a,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:He.findDOMNode(this),s=a==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=u[0],f=u[1];this.props.addEndListener(l,f)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===Ht)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=hh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(to.Provider,{value:null},typeof o=="function"?o(a,s):p.cloneElement(p.Children.only(o),s))},t}(p.Component);Ze.contextType=to,Ze.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ee.shape({current:typeof Element>"u"?ee.any:function(e,t,r,n,a,i){var o=e[t];return ee.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,r,n,a,i)}}),children:ee.oneOfType([ee.func.isRequired,ee.element.isRequired]).isRequired,in:ee.bool,mountOnEnter:ee.bool,unmountOnExit:ee.bool,appear:ee.bool,enter:ee.bool,exit:ee.bool,timeout:function(t){var r=Eh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return r.apply(void 0,[t].concat(a))},addEndListener:ee.func,onEnter:ee.func,onEntering:ee.func,onEntered:ee.func,onExit:ee.func,onExiting:ee.func,onExited:ee.func}:{};function xt(){}Ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xt,onEntering:xt,onEntered:xt,onExit:xt,onExiting:xt,onExited:xt},Ze.UNMOUNTED=Ht,Ze.EXITED=ct,Ze.ENTERING=lt,Ze.ENTERED=Tt,Ze.EXITING=on;const Ch=Ze,ro=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:a="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",unmountOnExit:o=!1,onEntering:s,onEntered:u,onExit:l,onExited:f,children:h})=>{const b=r||{transition:`opacity ${t}ms ${a}`,opacity:0},T=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${i}`,opacity:0},exited:{transition:`opacity ${t}ms ${i}`,opacity:0},unmounted:{}};return m.jsx(Ch,{in:e,timeout:t,onEntering:s,onEntered:u,onExit:l,onExited:f,unmountOnExit:o,children:x=>h({state:x,defaultStyle:b,transitionStyles:T})})};function no(e){return e.target?e.target:e}const ao=({visible:e,target:t,unmountWhenHidden:r=!1,transitionDuration:n=400,showTransitionOptions:a="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:o="DONE",shown:s,hidden:u,isClickedWithin:l,children:f})=>{const[h,b]=p.useState(-1),[T,x]=p.useState(-1),[D,P]=p.useState(e),_=p.useRef(100),z=p.useRef(101),Z=p.useRef(),W=p.useRef(),g=p.useRef();p.useEffect(()=>{t&&(Z.current=no(t));const G=Ma("zIndex",y=>y==="auto"||y==="-1"?!1:parseInt(y)>100).map(y=>parseInt(y,10));G.length>0&&(_.current=Math.max(...G)+1,z.current=Math.max(...G)+2),P(e)},[e,t]);const $=G=>{W.current=G},J=()=>{x(_.current),b(z.current)},te=()=>{if(!W.current)return;s==null||s();let G;Z.current&&(G=[Z.current]);const y=U=>{U?l==null||l():P(!1)};g.current=Ua(W.current,y,G)},B=()=>{g.current&&Ha(g.current)},oe=()=>{x(-1),b(-1),u==null||u()},re={entering:{opacity:.5},entered:{opacity:.5}};return m.jsx(ro,{start:D,timeout:n,showTransitionOptions:a,hideTransitionOptions:i,onEntering:J,onEntered:te,onExit:B,onExited:oe,unmountOnExit:r,children:({state:G,defaultStyle:y,transitionStyles:U})=>m.jsxs("div",{ref:q=>q&&$(q),children:[m.jsx("div",{className:"bsc-fixed bsc-left-0 bsc-top-0 bsc-h-full bsc-w-full bsc-bg-mono-dark-1",style:{zIndex:T,...U[G],...re[G]}}),m.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc-fixed bsc-bottom-0 bsc-left-0 bsc-w-full bsc-bg-white dark:bsc-border-t dark:bsc-border-solid dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1",style:{zIndex:h,...y,...U[G]},children:[m.jsx("div",{className:"bsc-w-full",children:f}),m.jsx(m.Fragment,{children:m.jsx(We,{buttonType:"primary",fullWidth:!0,onClick:()=>P(!1),className:"bsc-text-xs bsc-font-bold",children:o})})]})]})})};var oo=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(oo||{}),io=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(io||{});class _e{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let a=0,i=0;const o=window.scrollY;switch(r){case 2:a=n.top+n.height+o,i=n.left;break;case 0:a=n.top+o,i=n.left;break;case 3:a=n.top+n.height+o,i=n.left+n.width;break;case 1:a=n.top+o,i=n.left+n.width}return{top:a,left:i}}static positionElementToTarget(t,r,n=0,a=2){let{left:i,top:o}=_e.positionToTarget(r,a);const s=t.getBoundingClientRect();switch(n){case 0:break;case 1:i=i-s.width;break;case 2:o=o-s.height;break;case 3:o=o-s.height,i=i-s.width;break}return{top:o,left:i}}static canPositionElementOnScreen(t,r){const n=_e.getScreenDimensions(),a=t.getBoundingClientRect(),i=_e.positionElementToTarget(t,r,0,2);if(i.left+a.width<n.width&&i.top+a.height<n.height||_e.positionElementToTarget(t,r,1,3).left>=0&&i.top+a.height<n.height)return!0;const s=_e.positionElementToTarget(t,r,2,0);if(s.left+a.width<n.width&&s.top>=0)return!0;const u=_e.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static positionElementToTargetOnScreen(t,r,n=0,a=2){const{left:i,top:o}=_e.positionElementToTarget(t,r,n,a),s=t.getBoundingClientRect(),u=_e.determineOffScreenLocation(s);if(u){if(n===0&&a===2){if(u.right&&!u.bottom)return _e.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return _e.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return _e.positionElementToTarget(t,r,3,1)}else if(n===1&&a===3){if(u.left&&!u.bottom)return _e.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return _e.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return _e.positionElementToTarget(t,r,2,0)}}return{top:o,left:i}}static determineOffScreenLocation(t){const r=_e.getScreenDimensions(),n={left:t.left<0,top:t.top<0,right:t.left+t.width>r.width,bottom:t.top+t.height>r.height};return n.left||n.top||n.right||n.bottom?n:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const so=({visible:e,target:t,targetPosition:r=oo.BottomLeft,elementAlignment:n=io.TopLeft,shouldTargetCloseOverlay:a=!0,shouldMatchTargetWidth:i=!1,shouldScrollCloseOverlay:o=!1,shouldCheckZIndex:s=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:l=!1,transitionDuration:f=400,showTransitionOptions:h="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:b="linear",shown:T,hidden:x,isClickedWithin:D,markupCreated:P,children:_})=>{const[z,Z]=p.useState(-1),[W,g]=p.useState(e),[$,J]=p.useState(!1),te=p.useRef(!1),B=p.useRef(100),oe=p.useRef({left:0,top:0,width:0}),re=p.useRef(),G=p.useRef(),y=p.useRef(),U=p.useRef(),q=p.useRef(),F=p.useRef();p.useEffect(()=>(u===!0&&(F.current=new ResizeObserver(ne)),()=>{var O,M;u===!0&&(G.current&&((O=F.current)==null||O.unobserve(G.current)),(M=F.current)==null||M.disconnect())}),[u]),p.useEffect(()=>{if(t&&(re.current=no(t),o&&(y.current=_a(re.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"}),y.current.tagName.toLowerCase()==="html"&&(y.current=document))),s){const O=Ma("zIndex",M=>parseInt(M)>=100).map(M=>parseInt(M));O.length>0&&(B.current=Math.max(...O)+1)}e!==void 0&&g(e)},[t,e,o,s]);const ne=O=>{if(G.current){const M=_e.getScreenDimensions(),A=O[O.length-1].target,j=A.getBoundingClientRect(),k=_e.determineOffScreenLocation(j);if(k){if(re.current&&_e.canPositionElementOnScreen(A,re.current)){const V=_e.positionElementToTargetOnScreen(G.current,re.current,n,r);oe.current={...oe.current,...V}}else k.right?oe.current.left=M.width-j.width:k.left&&(oe.current.left=0),k.bottom?oe.current.top=M.height-j.height:k.top&&(oe.current.top=0);L()}}},L=At(()=>{te.current=!te.current,J(te.current)},20),he=()=>{Z(B.current)},v=()=>{if(!G.current)return;T==null||T();let O;!a&&re.current&&(O=[re.current]);const M=A=>{A?D==null||D():g(!1)};U.current=Ua(G.current,M,O),o&&(q.current=qc(A=>G.current&&Pd(A,G.current)&&g(!1),100,{leading:!0}),y.current&&y.current.addEventListener("scroll",q.current))},E=()=>{y.current&&q.current&&(y.current.removeEventListener("scroll",q.current),q.current=void 0),U.current&&Ha(U.current)},H=()=>{Z(-1),x==null||x()},d=O=>{var M,A;if(G.current=O,P==null||P(O),re.current){const j=_e.positionElementToTarget(G.current,re.current,n,r);oe.current={...j,width:re.current.offsetWidth}}u===!0&&((M=F.current)==null||M.unobserve(G.current),(A=F.current)==null||A.observe(G.current))},S=p.useMemo(()=>{const O={top:`${oe.current.top}px`,left:`${oe.current.left}px`,zIndex:z};return i&&(O.width=`${oe.current.width}px`),O},[$,z,i]);return m.jsx(ro,{start:W,timeout:f,showTransitionOptions:h,hideTransitionOptions:b,onEntering:he,onEntered:v,onExit:E,onExited:H,unmountOnExit:l,children:({state:O,defaultStyle:M,transitionStyles:A})=>m.jsx("div",{className:"bsc-fixed bsc-bg-white dark:bsc-bg-mono-dark-1 bsc-border bsc-border-solid dark:bsc-text-mono-light-1 dark:bsc-border-mono-light-1 bsc-shadow",style:{...S,...M,...A[O]},ref:j=>j&&d(j),children:_})})};let lr;const Dh=new Uint8Array(16);function Oh(){if(!lr&&(lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lr(Dh)}const Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Ih(e,t=0){return Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]}const uo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Nh(e,t,r){if(uo.randomUUID&&!t&&!e)return uo.randomUUID();e=e||{};const n=e.random||(e.rng||Oh)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let a=0;a<16;++a)t[r+a]=n[a];return t}return Ih(n)}class fr{static create(t){const r=[];let n=0;for(let a=0,i=t.formatParts.length;a<i;a++){const o=t.formatParts[a],s=n,u=s+o.characterCount;r.push({startPosition:s,endPosition:u,...o}),n=u}return r}}class _h{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatPartList");Y(this,"inputSlotCollection");Y(this,"currentPartIndex",0);Y(this,"currentCursorPosition",0);Y(this,"inputElement");Y(this,"inputSelection",null);Y(this,"inputRange");Y(this,"textNode");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}getCursorPosition(){return this.currentCursorPosition}getCurrentPartIndex(){return this.currentPartIndex}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){this.createInputRangeSelection(),this.inputRange&&this.textNode&&(this.inputRange.setStart(this.textNode,t),this.inputRange.setEnd(this.textNode,r||t),this.currentCursorPosition=r||t,this.setPartIndexByCursorPosition())}findCursorPosition(){var r,n;const t=(r=window.getSelection())==null?void 0:r.getRangeAt(0);if(this.inputElement&&t){const a=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const l=document.createRange();return l.selectNodeContents(u),l.compareBoundaryPoints(Range.END_TO_END,t)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i=0;for(;a.nextNode();)i+=((n=a.currentNode.textContent)==null?void 0:n.length)||0;t.startContainer.nodeType===Node.TEXT_NODE&&(i+=t.startOffset);const o=this.inputSlotCollection.getLastSlotWithData(),s=o.startPosition+o.partText.length;this.setCursorSelection(i>s?s:i)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.currentCursorPosition>0){const t=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(t>=r.startPosition&&t<=r.endPosition)this.setCursorSelection(t);else for(let n=this.currentPartIndex-1;n>=0;n--)r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition&&(r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t))}}moveCursorRight(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r){const n=this.currentCursorPosition+1;let a=this.formatPartList[this.currentPartIndex];if(n>=a.startPosition&&n<=a.endPosition)this.setCursorSelection(n);else for(let i=this.currentPartIndex+1,o=this.formatPartList.length;i<o;i++)a=this.formatPartList[i],n>=a.startPosition&&n<=a.endPosition&&(a.isSeparator?this.setCursorSelection(this.formatPartList[i+1].startPosition):this.setCursorSelection(n))}}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}createInputRangeSelection(){var t,r;this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),(t=this.inputSelection)==null||t.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),(r=this.inputSelection)==null||r.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class Mh{static create(t){const r=[];for(let n=0,a=t.length;n<a;n++){const i=t[n];i.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...i})}return r}}class jh{constructor(t){Y(this,"inputSlots");this.inputSlots=Mh.create(fr.create(t))}clearAllSlots(){for(let t=0,r=this.inputSlots.length;t<r;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(r=>r.partIndex===t)}getFirstSlot(){return this.inputSlots[0]}getNextSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(n=>!n.isComplete);let r=t;for(let n=t+1,a=this.inputSlots.length;n<a;n++)this.inputSlots[n].partText.length>0&&(r=n);return this.inputSlots[r>-1?r:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class Pt{static getInstance(){return this.instance||(this.instance=new kh),this.instance}}Y(Pt,"instance");class kh{constructor(){Y(this,"navigatorInstances");Y(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new _h(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new jh(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class sn{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatPartList");Y(this,"inputSlotCollection");Y(this,"inputElement");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,a=this.formatPartList.length;n<a;n++){const i=this.formatPartList[n];if(i.isSeparator)t+=i.inputText;else{const o=this.inputSlotCollection.getSlot(n);o&&(t+=o.partText+((r=o.inputText)==null?void 0:r.repeat(o.characterCount-o.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var qe=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(qe||{});class co{constructor(){Y(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);Y(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End"]);Y(this,"editingKeys",["Backspace","Delete"]);Y(this,"ignoreKeys",["Shift","Alt","Control","Fn","Meta"])}isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class Rh{constructor(t){Y(this,"_currentIndex",0);Y(this,"index",0);Y(this,"formatParts");this.formatParts=fr.create(t)}get currentIndex(){return this._currentIndex}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class lo{constructor(t,r){Y(this,"instanceCollection");Y(this,"inputSlotCollection");Y(this,"formatNavigator");Y(this,"keyTypeChecker");Y(this,"formatRenderer");Y(this,"formatPartList");this.format=t,this.instanceCollection=Pt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r),this.formatPartList=new Rh(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const a=this.formatPartList.next();if(a&&!a.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const i=this.formatPartList.currentIndex,o=this.formatPartList.next();if(o&&o.inputText){const s=t.indexOf(o.inputText,r),u=this.inputSlotCollection.getSlot(i);if(u&&s>-1){const l=s-r>u.characterCount?r+u.characterCount:s;u.partText=t.substring(r,l),this.processSlotRules(u),r=s+o.characterCount}}}else{const i=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);i&&(i.partText=t.substring(r,r+i.characterCount),this.processSlotRules(i))}}}processEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),a=n-r.startPosition,i=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,a-1)+r.partText.substring(a),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const s=this.inputSlotCollection.getPreviousSlot(r.partIndex);s&&(s.partText=s.partText.substring(0,s.partText.length-1),i&&this.shiftFormatParts(s),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(s.startPosition+s.partText.length),this.processSlotRules(s,!0))}break}case"Delete":r.partText=r.partText.substring(0,a)+r.partText.substring(a+1),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const a=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+a,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,a=r.characterCount,i=r.partText;if(r.valueType===qe.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const o=r.maximumValue,s=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,l=parseInt(this.createNewValue(r,n));if(o&&l>o)if(s){u&&(r.partText=r.partText.padStart(a,"0")),r.isComplete=!0;const f=this.inputSlotCollection.getNextSlot(r.partIndex);f&&!f.isComplete&&(f.partText=n),this.formatRenderer.render(),f&&this.formatNavigator.setCursorPosition(f.isComplete?f.startPosition:f.startPosition+1)}else return;else i.length+1===a?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):i.length+1<a&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else i.length+1===a?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,t))}createNewValue(t,r){const n=t.partText,a=this.formatNavigator.getCursorPosition();if(a>=t.startPosition+t.partText.length)return n+r;{const i=a-t.startPosition;return n.substring(0,i)+r+n.substring(i)}}processSlotRules(t,r=!1){const n=t.characterCount,a=t.allCharactersRequired||!1;if(t.valueType===qe.Numeric){const i=t.minimumValue,o=t.maximumValue;if(a)t.isComplete=t.partText.length===n;else if(i!==void 0&&o!==void 0){const s=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=i&&u<=o,t.isComplete&&s&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else a?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class Lh{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatNavigator");Y(this,"ruleProcessor");Y(this,"keyTypeChecker");Y(this,"formatRenderer");this.format=t,this.instanceCollection=Pt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new lo(t,r),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n}=t;switch(r){case"ArrowLeft":n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class Ah{constructor(t,r=""){Y(this,"instanceId");Y(this,"instanceCollection");Y(this,"keyProcessor");Y(this,"formatNavigator");Y(this,"formatRenderer");Y(this,"inputSlotCollection");Y(this,"inputRuleProcessor");Y(this,"previousOutputValue","");Y(this,"inputElementSet",!1);Y(this,"isInputFocused",!1);Y(this,"inputElement");Y(this,"onFormatChange");this.inputValue=r,this.instanceId=Nh(),this.instanceCollection=Pt.getInstance(),this.keyProcessor=new Lh(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new sn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new lo(t,this.instanceId)}inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),setTimeout(()=>{var r;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML)}))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){t.key!=="Tab"&&(t.preventDefault(),t.stopPropagation(),this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange())))}dispose(){this.instanceCollection.removeInstances(this.instanceId)}}const Fh=(e,t)=>{const{value:r="",format:n,readOnly:a=!1,debounceTime:i=800,fillContainer:o=!0,leftElement:s,rightElement:u,className:l,leftElementClassName:f,rightElementClassName:h,isSingleLine:b=!1,allowSingleLineScroll:T=!1,isInputValid:x,onChange:D,onFocus:P,onBlur:_,onElementCreate:z,onLeftElementClick:Z,onRightElementClick:W}=e,[g,$]=p.useState(!0),J=p.useRef(),te=p.useRef(),B=p.useRef();p.useEffect(()=>()=>{var L;(L=B.current)==null||L.dispose()},[]),p.useEffect(()=>{var L;(L=B.current)==null||L.inputValuePassed(r)},[r]),p.useEffect(()=>{var L,he,v;(L=B.current)==null||L.dispose(),n&&(B.current=new Ah(n,r),te.current&&((he=B.current)==null||he.inputElementCreated(te.current)),(v=B.current)==null||v.registerFormatChangeEvent(oe))},[n]);const oe=p.useCallback(L=>{x?x(L)?($(!0),D==null||D(L)):$(!1):D==null||D(L)},[D]),re=p.useCallback(L=>{var he;(he=B.current)==null||he.inputFocused(),P==null||P(L)},[P]),G=p.useCallback(L=>{var he;(he=B.current)==null||he.inputBlurred(),_==null||_(L)},[_]),y=p.useCallback(()=>{var L;(L=B.current)==null||L.mouseUpHandler()},[]),U=p.useCallback(L=>{var he;(he=B.current)==null||he.keyDownHandler(L)},[]),q=p.useCallback(L=>{var he,v,E,H,d,S,O,M,A;(v=(he=J.current)==null?void 0:he.inputElement)==null||v.removeEventListener("keydown",U),(H=(E=J.current)==null?void 0:E.inputElement)==null||H.removeEventListener("mouseup",y),J.current=L,(S=(d=J.current)==null?void 0:d.inputElement)==null||S.addEventListener("keydown",U),(M=(O=J.current)==null?void 0:O.inputElement)==null||M.addEventListener("mouseup",y),te.current=(A=J.current)==null?void 0:A.inputElement},[]),F=p.useCallback(()=>{var L;(L=J.current)==null||L.focus()},[]);p.useImperativeHandle(t,()=>({focus:F}));const ne=Ge(l,{"!bsc-border-error":!g});return m.jsx(Kt,{ref:L=>L&&q(L),readOnly:a,debounceTime:i,fillContainer:o,leftElement:s,rightElement:u,className:ne,leftElementClassName:f,rightElementClassName:h,isSingleLine:b,allowSingleLineScroll:T,onFocus:re,onBlur:G,onElementCreate:z,onLeftElementClick:Z,onRightElementClick:W})},fo=p.forwardRef(Fh),un=p.createContext(void 0);function ho(e,t,r=!0){var b,T;const n=ya(e),a=da(e),i=tf(e);let o=Vr(a)-(((b=t.options)==null?void 0:b.weekStartsOn)||0);o=o===-1?6:o;const s=Vr(i)-(((T=t.options)==null?void 0:T.weekStartsOn)||0),u=el({start:a,end:i}),l=n+o>35?6:5,f=po(l,7,{dayValue:null,isCurrent:!0});let h=1;for(let x=0,D=l;x<D;x++){for(let P=x>0?0:o;P<7;P++){const _=u[h-1];if(_.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[x][P].dayValue=_,++h>n)break}if(h>n)break}if(o>0&&r)for(let x=0;x<o;x++)f[0][x].dayValue=rd(a,o-x),f[0][x].isCurrent=!1;if(s>-1&&r)for(let x=6;x>s;x--)f[l-1][x].dayValue=Zt(i,x-s),f[l-1][x].isCurrent=!1;return f}function po(e,t,r){const n=[];for(let a=0,i=e;a<i;a++){const o=[];for(let s=0,u=t;s<u;s++){const l=Yh(r)?r:{...r};o.push(l)}n.push(o)}return n}function Yh(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function $h(e){var n;const t=nd(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let a=0;a<7;a++)r.push(Zt(t,a).toLocaleDateString(e.code,{weekday:"short"}));return r}function Uh(e){const t=new Date(Date.UTC(2020,0,1)),r=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let n=0;for(let a=0;a<3;a++)for(let i=0;i<4;i++)r[a][i]={monthNumber:n,monthName:st(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function Hh(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const a=tl({start:r,end:Xt(r,9)}),i=po(3,4,"");let o=0;for(let s=0;s<3;s++)for(let u=0;u<4&&(i[s][u]=a[o++].toLocaleDateString(t.code,{year:"numeric"}),o!==a.length);u++);return i}function Wh(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function Vh(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function mo(e){return(await import(`/node_modules/date-fns/locale/${zh(e)}`)).default}function zh(e){const[t,r]=e.split("-");switch(t){case"af":return"af";case"ar":switch(r){case"DZ":return"ar-DZ";case"EG":return"ar-EG";case"MA":return"ar-MA";case"SA":return"ar-SA";case"TN":return"ar-TN";default:return"ar"}case"az":return"az";case"be":switch(r){case"tarask":return"be-tarask";default:return"be"}case"bg":return"bg";case"bn":return"bn";case"bs":return"bs";case"ca":return"ca";case"cs":return"cs";case"cy":return"cy";case"da":return"da";case"de":switch(r){case"AT":return"de-AT";default:return"de"}case"el":return"el";case"en":switch(r){case"AU":return"en-AU";case"CA":return"en-CA";case"GB":return"en-GB";case"IE":return"en-IE";case"IN":return"en-IN";case"NZ":return"en-NZ";case"US":return"en-US";default:return"en-ZA"}case"eo":return"eo";case"es":return"es";case"et":return"et";case"eu":return"eu";case"fa":return"fa-IR";case"fi":return"fi";case"fr":switch(r){case"CA":return"fr-CA";case"CH":return"fr-CH";default:return"fr"}case"fy":return"fy";case"gd":return"gd";case"gl":return"gl";case"gu":return"gu";case"he":return"he";case"hi":return"hi";case"hr":return"hr";case"ht":return"ht";case"hu":return"hu";case"hy":return"hy";case"id":return"id";case"is":return"is";case"it":switch(r){case"CH":return"it-CH";default:return"it"}case"ja":switch(r){case"Hira":return"ja-Hira";default:return"ja"}case"ka":return"ka";case"kk":return"kk";case"km":return"km";case"kn":return"kn";case"ko":return"ko";case"lb":return"lb";case"lt":return"lt";case"lv":return"lv";case"mk":return"mk";case"mn":return"mn";case"ms":return"ms";case"mt":return"mt";case"nb":return"nb";case"nl":switch(r){case"BE":return"nl-BE";default:return"nl"}case"nn":return"nn";case"oc":return"oc";case"pl":return"pl";case"pt":switch(r){case"BR":return"pt-BR";default:return"pt"}case"ro":return"ro";case"ru":return"ru";case"sk":return"sk";case"sl":return"sl";case"sq":return"sq";case"sr":switch(r){case"Latn":return"sr-Latn";default:return"sr"}case"sv":return"sv";case"ta":return"ta";case"te":return"te";case"th":return"th";case"tr":return"tr";case"ug":return"ug";case"uk":return"uk";case"uz":switch(r){case"Cyrl":return"uz-Cyrl";default:return"uz"}case"vi":return"vi";case"zh":switch(r){case"CN":return"zh-CN";case"HK":return"zh-HK";default:return"zh-TW"}default:return"en-AU"}}function Wt(e,t){const r=ad(e);if(isNaN(r.valueOf())){let n=Be(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=Be(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function vo(e,t){const r=e.split("-");if(r.length!==2)return;const n=Wt(r[0].trim(),t);if(!n)return;const a=Wt(r[1].trim(),t);if(a)return[n,a]}var we=(e=>(e[e.DateTime=0]="DateTime",e[e.DateOnly=1]="DateOnly",e[e.TimeOnly=2]="TimeOnly",e[e.DateRange=3]="DateRange",e))(we||{}),Vt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Vt||{}),dr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(dr||{}),De=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(De||{}),rt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(rt||{}),hr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(hr||{}),X=(e=>(e[e.DaySelector=0]="DaySelector",e[e.MonthSelector=1]="MonthSelector",e[e.YearSelector=2]="YearSelector",e[e.TimeSelector=3]="TimeSelector",e[e.DateRangeSelector=4]="DateRangeSelector",e[e.SetViewDate=5]="SetViewDate",e[e.SetSelectedDate=6]="SetSelectedDate",e[e.SetSelectedDateRange=7]="SetSelectedDateRange",e[e.SetSelectedStartDate=8]="SetSelectedStartDate",e[e.SetSelectedEndDate=9]="SetSelectedEndDate",e[e.SetTimeFormat=10]="SetTimeFormat",e[e.ClearDates=11]="ClearDates",e[e.InitializeDates=12]="InitializeDates",e))(X||{});const Bh=(e,t)=>{switch(t.type){case 0:return{...e,currentSelector:0,currentViewDate:t.viewDate||e.currentViewDate};case 1:return{...e,currentSelector:1,currentViewDate:t.viewDate||e.currentViewDate};case 2:return{...e,currentSelector:2};case 3:return{...e,currentSelector:3};case 4:return{...e,currentSelector:4,currentViewDate:t.viewDate||e.currentViewDate};case 5:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 6:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 7:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 8:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 9:return{...e,selectedEndDate:t.selectedEndDate};case 10:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 11:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 12:const r={...e,currentViewDate:qh(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...r,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...r,selectedDate:t.initialDate};default:return{...e,currentSelector:0}}};function qh(e){return e?Array.isArray(e)?e[0]:e:new Date}const pr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a=rt.Normal,locale:i,onDateSelected:o,selectableDate:s,isValidDate:u,dispatcher:l})=>{var q;const[f,h]=p.useState(!1),[b,T]=p.useState(),[x,D]=p.useState(),[P,_]=p.useState(),[z,Z]=p.useState(),W=p.useRef(),g=p.useRef(),$=p.useContext(un),J=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),te=async()=>i||await mo(Na());p.useEffect(()=>{te().then(F=>{W.current=F,g.current=$h(W.current),h(!0)}).catch(F=>console.error(F))},[]),p.useEffect(()=>{e&&W.current&&_(ho(e,W.current,a===rt.Normal))},[e,f]),p.useEffect(()=>{Z(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{T(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),D(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{W.current&&i&&(W.current=i,_(ho(e,W.current,a===rt.Normal)))},[i]);const B=F=>{if(a===rt.Normal)l==null||l({type:X.SetSelectedDate,selectedDate:F,viewDate:F}),o==null||o(F);else{if(!o)throw new Error("Range selection mode requires onDateSelected to be set");!r||rf(F,r)?o(F):r&&!n?o(F,{setEndDate:!0}):r&&n&&o(F)}},oe=F=>(z==null?void 0:z.toLocaleDateString())===F.toLocaleDateString(),re=F=>{if(b&&x){const ne=F.getTime();return ne>=b&&ne<=x}return!1},G={viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a,locale:i,weekDays:g.current,monthMatrix:P,selectableDate:s,isValidDate:u,onDateClicked:B,isSelectedDate:oe,isInSelectedDateRange:re},U=J||((F,ne)=>m.jsx("div",{className:"bsc-w-full bc-dt-calendar",children:ne}));return m.jsx(Gr,{props:G,template:U,children:m.jsxs("div",{className:"bsc-grid bsc-grid-cols-7 bsc-gap-3 bc-dt-day-row bsc-min-w-[329px]",children:[(q=g.current)==null?void 0:q.map((F,ne)=>m.jsx("div",{className:"bsc-text-center bsc-font-bold bc-dt-day-cell",children:F},ne)),P==null?void 0:P.map((F,ne)=>F.map((L,he)=>{var H,d;const v=L.dayValue!==null&&(s===void 0||s(L.dayValue)),E=Ge("bsc-text-center bsc-py-1",{"bsc-text-gray-3":!L.isCurrent,"bsc-bg-primary-3 dark:bsc-bg-mono-light-1 dark:bsc-text-mono-dark-1":L&&L.dayValue&&(z&&oe(L.dayValue)||b&&!x&&fa(b,L.dayValue)||b&&x&&re(L.dayValue)),"bsc-cursor-pointer":v,"bsc-text-error bsc-cursor-not-allowed":!v,"bsc-bg-primary-5 dark:bsc-bg-mono-light-3 dark:bsc-text-mono-dark-1":L.dayValue&&td(L.dayValue)&&!(oe(L.dayValue)||re(L.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:E,onClick:()=>L&&L.dayValue&&v&&(u===void 0||u(L.dayValue))&&B(L.dayValue),children:(d=L.dayValue)==null?void 0:d.getDate().toLocaleString((H=W.current)==null?void 0:H.code)},ne.toString()+he.toString())}))]})})},mr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a})=>{const o=p.useContext(un).dateScrollerTemplate,s={title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a},l=o||((f,h)=>m.jsx("div",{className:"bc-dt-scroller bsc-flex bsc-w-full bsc-flex-row bsc-items-center bsc-px-2 bsc-py-1",children:h}));return m.jsxs(Gr,{props:s,template:l,children:[m.jsx("div",{className:"bc-dt-scroller-left bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:n,children:m.jsx(Rd,{size:24})})}),m.jsx("div",{className:"bc-dt-scroller-title bsc-flex-grow bsc-cursor-pointer bsc-text-center",onClick:r,children:e}),m.jsx("div",{className:"bc-dt-scroller-right bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:a,children:m.jsx(Hd,{size:24})})})]})},Gh=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:a,isValidDate:i,onChange:o,dispatcher:s})=>{const u=()=>{t&&s({type:X.SetViewDate,viewDate:Oa(t,1)})},l=()=>{t&&s({type:X.SetViewDate,viewDate:st(t,1)})},f=()=>{s({type:X.MonthSelector})},h=()=>{s({type:X.TimeSelector})},b=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bsc-p-2 bc-dt-day-selector",children:[m.jsx(mr,{title:b(),scrollerType:Vt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:l}),m.jsx(pr,{viewDate:t,selectedDate:e,locale:r,selectableDate:a,isValidDate:i,onDateSelected:o,dispatcher:s}),n&&m.jsx("div",{className:"bsc-w-full bsc-flex bsc-flex-row bsc-p-2 bsc-justify-center bc-dt-time-value-wrapper",children:m.jsx("div",{className:"bsc-p-2 bsc-cursor-pointer hover:bsc-bg-gray-4 dark:hover:bsc-bg-mono-light-2 dark:hover:bsc-text-mono-dark-2 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bc-dt-time-value",onClick:h,children:(e==null?void 0:e.toLocaleTimeString(r.code))||Wh(r)})})]})},Qh=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const a=p.useRef(Uh(t)),i=()=>{const f=Ia(e,1);n({type:X.SetViewDate,viewDate:f})},o=()=>{const f=Xt(e,1);n({type:X.SetViewDate,viewDate:f})},s=f=>{n({type:r!==we.DateRange?X.DaySelector:X.DateRangeSelector,viewDate:wd(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),l=()=>{n({type:X.YearSelector})};return m.jsxs("div",{className:"bsc-p-2 bc-dt-month-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:u(),scrollerType:Vt.Month,onTitleClicked:l,onMovePrevious:i,onMoveNext:o}),m.jsx("div",{className:"bsc-w-full bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-month-grid",children:a.current.map((f,h)=>f.map((b,T)=>m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-month-cell",onClick:()=>s(b.monthNumber),children:b.monthName},h.toString()+T.toString())))})]})};function Kh(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((i,o)=>i!==n[o]))return!0;const a=Object.keys(e);return Object.keys(t).some((i,o)=>i!==a[o])}function Zh(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function go(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Zh,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const a=window.matchMedia(e[n]);return r.mediaQueries[n]=a,r.matches[n]=a.matches,r},{mediaQueries:{},matches:{}})}function Xh(e,t){function r(n,a){return n[a]=e.mediaQueries[a].matches,n}switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(r,{}),mediaQueries:e.mediaQueries};case"setQueries":return go(t.queries)}}function Jh(e){const t=Nt.useRef(e),[r,n]=Nt.useReducer(Xh,e,go);Nt.useEffect(()=>{Kh(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function a(){return n({type:"updateMatches"})}function i(u){const l=a;return typeof u.addListener<"u"?u.addListener(l):u.addEventListener("change",l),l}Nt.useEffect(()=>{const u=Object.values(r.mediaQueries),l=u.map(i);function f(h,b){typeof h.addListener<"u"?h.removeListener(l[b]):h.removeEventListener("change",l[b])}return()=>{u.forEach(f)}},[r.mediaQueries]);const{matches:o}=r,s=Nt.useMemo(()=>Object.values(o),[o]);return{matches:o,matchesAny:s.some(Boolean),matchesAll:s.length>0&&s.every(Boolean)}}function yo(e){return Jh(ep(e)).matchesAll}const cn={};function ep(e){return cn[e]===void 0&&(cn[e]={default:e}),cn[e]}const tp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:a,dispatcher:i})=>{const o=yo("not all and (min-width: 640px)"),s=st(e,1),u=(T,x)=>{!x||!x.setEndDate?i({type:X.SetSelectedStartDate,selectedStartDate:T}):(i({type:X.SetSelectedEndDate,selectedEndDate:T}),t&&(a==null||a([t,T])))},l=()=>{i({type:X.MonthSelector})},f=()=>o?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${s.toLocaleDateString(n.code,{month:"long"})} ${s.toLocaleDateString(n.code,{year:"numeric"})}`,h=()=>{e&&i({type:X.SetViewDate,viewDate:Oa(e,1)})},b=()=>{e&&i({type:X.SetViewDate,viewDate:st(e,1)})};return m.jsxs("div",{className:"bsc-flex bsc-flex-col bc-dt-range-selector",children:[m.jsx("div",{className:"bsc-flex-shrink bc-dt-range-scroller-wrapper",children:m.jsx(mr,{title:f(),scrollerType:Vt.Range,onTitleClicked:l,onMovePrevious:h,onMoveNext:b})}),m.jsx("div",{className:"bsc-flex-grow",children:o?m.jsx("div",{className:"bsc-py-1 bsc-px-2 bc-dt-range-calendar",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}):m.jsxs("div",{className:"bsc-flex bsc-flex-row bsc-py-1 bsc-px-2 bc-dt-range-wrapper",children:[m.jsx("div",{className:"bsc-border-r bsc-border-solid bsc-border-gray-3 bsc-pr-4 bc-dt-range-calendar-1",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}),m.jsx("div",{className:"bsc-pl-4 bc-dt-range-calendar-2",children:m.jsx(pr,{viewDate:s,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})})]})})]})},rp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=De.TwelveHour,timeConstraints:a,onChange:i,dispatcher:o})=>{const s=p.useRef(n===De.TwelveHour?11:23),u=p.useRef(n===De.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),l=p.useRef(xd(0,59,y=>y.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),h=p.useRef(Uc(e)),b=y=>y>11?y-12:y,[T,x]=p.useState(b(e.getHours())),[D,P]=p.useState(e.getMinutes()),[_,z]=p.useState(e.getHours()<=12?0:1),Z=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const y=e.getHours(),U=e.getMinutes();if(y!==T&&x(n===De.TwelveHour?b(y):y),U!==D&&P(U),n===De.TwelveHour){const q=y<=11?0:1;q!==_&&z(q)}},[e]);const W=()=>{var q;const y=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,U=T<s.current?T+y:0;x(U),B(U,D,_)},g=()=>{var q;const y=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,U=T>0?T-y:s.current;x(U),B(U,D,_)},$=()=>{var q,F,ne;const y=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,U=D+y<(((F=a==null?void 0:a.minutes)==null?void 0:F.max)||59)?D+y:((ne=a==null?void 0:a.minutes)==null?void 0:ne.min)||0;P(U),B(T,U,_)},J=()=>{var q,F,ne;const y=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,U=D-y>=(((F=a==null?void 0:a.minutes)==null?void 0:F.min)||0)?D-y:(((ne=a==null?void 0:a.minutes)==null?void 0:ne.max)||60)-y;P(U),B(T,U,_)},te=()=>{const y=_===0?1:0;z(y),B(T,D,y)},B=(y,U,q)=>{const F=n===De.TwelveHour&&q===1?y+12:y;h.current.setHours(F,U),o({type:X.SetSelectedDate,selectedDate:h.current,viewDate:h.current}),i==null||i(h.current)},oe=()=>{o({type:X.DaySelector})},re=Ge("bsc-w-full bsc-grid bsc-grid-rows-3 bsc-gap-4 bc-dt-time-grid",{"bsc-grid-cols-4":n===De.TwelveHour,"bsc-grid-cols-3":n===De.TwentyFourHour}),G=Ge("bsc-text-center bsc-cursor-pointer hover:bsc-bg-gray-4 dark:bsc-text-mono-light-1 dark:hover:bsc-bg-mono-light-1 dark:hover:bsc-text-mono-dark-1 bc-dt-time-date-value",{"bsc-col-span-4":n===De.TwelveHour,"bsc-col-span-3":n===De.TwentyFourHour});return m.jsx("div",{className:"bc-dt-time-selector bsc-flex bsc-flex-row bsc-justify-center bsc-p-2",style:{minWidth:n===De.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:re,children:[t&&m.jsx("div",{className:G,onClick:oe,children:Z.current}),m.jsx("div",{className:"bc-dt-time-hour-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:W,children:m.jsx(Qr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bc-dt-time-minute-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:$,children:m.jsx(Qr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:te,children:m.jsx(Qr,{})})}),m.jsx("div",{className:"bc-dt-time-hour-value bsc-text-center",children:u.current[T]}),m.jsx("div",{className:"bc-dt-time-separator bsc-text-center",children:":"}),m.jsx("div",{className:"bc-dt-time-minute-value bsc-text-center",children:l.current[D]}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-value bsc-text-center",children:f.current[_]}),m.jsx("div",{className:"bc-dt-time-hour-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:g,children:m.jsx(Kr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bc-dt-time-minute-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:J,children:m.jsx(Kr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:te,children:m.jsx(Kr,{})})})]})})},np=({viewDate:e,locale:t,dispatcher:r})=>{const n=Hh(e,t),a=()=>{const u=Ia(e,10);r({type:X.SetViewDate,viewDate:u})},i=()=>{const u=Xt(e,10);r({type:X.SetViewDate,viewDate:u})},o=u=>{const l=parseInt(u);r({type:X.MonthSelector,viewDate:Td(e,l)})},s=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return m.jsxs("div",{className:"bc-dt-year-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:s(),scrollerType:Vt.Year,onMovePrevious:a,onMoveNext:i}),m.jsx("div",{className:"bsc-w-full bc-dt-year-wrapper",children:m.jsx("div",{className:"bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-year-grid",children:n.map((u,l)=>u.map((f,h)=>f.length>0?m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-year-cell",onClick:()=>o(f),children:f},l.toString()+h.toString()):m.jsx("div",{},l.toString()+h.toString())))})})]})};class ap{constructor(t,r){Y(this,"dateFormat");Y(this,"timeFormat");Y(this,"use24HourTime");Y(this,"monthPart");Y(this,"dayPart");Y(this,"yearPart");Y(this,"twelveHourPart");Y(this,"twentyFourHourPart");Y(this,"minutePart");Y(this,"meridianPart");this.dateSelection=t;const n=2023,a=12,i=20,s=new Date(n,a-1,i).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=s.replace(`${n}`,"YYYY").replace(`${a}`,"MM").replace(`${i}`,"DD");const u=new Date,l=18,f=24,h=37,b=317;u.setHours(l,f,h,b);const T=u.toLocaleTimeString(r);this.use24HourTime=T.startsWith("18"),this.timeFormat=T.replace(`${this.use24HourTime?l:"6"}`,"HH").replace(`${f}`,"MM").replace(`${h}`,"SS").replace(`${b}`,"LLL"),this.createDateParts()}get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case we.DateOnly:return this.createDateFormat(t);case we.TimeOnly:return this.createTimeFormat(t);case we.DateRange:return this.createDateRangeFormat(t);case we.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const r=[];this.dateFormat.startsWith("MM")?r.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?r.push(...this.createDayMonthYearFormatParts()):r.push(...this.createYearMonthDayFormatParts());const n={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...r,n,...r),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(r),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),r=t.indexOf("DD"),n=t.substring(0,r);t=t.replace(n,"").replace("DD","");const a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,a,this.dayPart,i,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,a,this.monthPart,i,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,a,this.monthPart,i,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,a,this.minutePart,i,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,a,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:qe.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:qe.Text,possibleValues:["AM","PM"]}}}const op=(e,t)=>{var i;const[r,n]=p.useState(),a=p.useRef();return p.useEffect(()=>{t&&!r&&(a.current=new ap(e,t),n(a.current.createInputFormat()))},[t]),[r,(i=a.current)==null?void 0:i.is24HourTime]},ip=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:a=!1,allowClear:i=!1,locale:o,className:s,dateSelection:u=we.DateTime,dateFormat:l,timeConstraints:f,icon:h,iconPosition:b=hr.Right,inputElement:T,selectableDate:x,isValidDate:D,onChange:P,calendarTemplate:_,dateScrollerTemplate:z,inputTemplate:Z})=>{const[W,g]=p.useState(!1),[$,J]=p.useState(),[te,B]=p.useState(),oe=p.useRef(),re=p.useRef(!1),G=p.useRef(o||Na()),y=p.useRef(),U=p.useRef(),q=p.useRef(),[F,ne]=op(u,$),L=yo("not all and (min-width: 640px)"),he=p.useRef({calendarTemplate:_,dateScrollerTemplate:z});p.useEffect(()=>{G.current&&v(G.current)},[G]),p.useEffect(()=>{o&&v(o)},[o]),p.useEffect(()=>{if(e){const Q=E();S({type:X.InitializeDates,initialDate:Q})}else S({type:X.ClearDates})},[e,y.current]),p.useEffect(()=>{ne&&S({type:X.SetTimeFormat,timeFormat:ne?De.TwentyFourHour:De.TwelveHour})},[ne]),p.useEffect(()=>{T&&(U.current=T)},[T]);const v=Q=>{mo(Q).then(be=>{J(be.code),y.current=be;const Ye=E();S(e||n?{type:X.InitializeDates,initialDate:Array.isArray(Ye)?Ye[0]:Ye}:{type:X.SetViewDate,viewDate:Array.isArray(Ye)?Ye[0]:Ye})}).catch(be=>console.error(be))},E=()=>{const Q=new Date;return Q.setHours(0,0,0,0),e?typeof e=="string"?u!==we.DateRange?Wt(e,y.current):vo(e,y.current):e:Q},H={currentSelector:u===we.TimeOnly?X.TimeSelector:u===we.DateTime||u===we.DateOnly?X.DaySelector:X.DateRangeSelector,currentViewDate:new Date,timeFormat:De.TwelveHour,dateInitialized:!1},[d,S]=p.useReducer(Bh,H),O=()=>{Fe(),g(!0)},M=p.useMemo(()=>At(()=>{g(!1)},250),[]),A=p.useMemo(()=>At(()=>{M.cancel()},5),[M]),j=Q=>{const be=Q.target.innerText;Ee(be)},k=Q=>{if(Q){const be=Wt(Q,y.current);return be?D?D(be):!0:!1}else return!0},V=Q=>{Ee(Q||"")},Ee=Q=>{const be=u!==we.DateRange?Wt(Q,y.current):vo(Q,y.current);be?(Array.isArray(be)?(Vh(be[0],da(d.currentViewDate),Jc(st(d.currentViewDate,1)))||S({type:X.SetViewDate,viewDate:be[0]}),S({type:X.SetSelectedDateRange,selectedStartDate:be[0],selectedEndDate:be[1]})):S({type:X.SetSelectedDate,selectedDate:be,viewDate:be}),P==null||P(be)):Q===""&&(S({type:X.ClearDates}),P==null||P())},C=()=>{Fe(),g(!W)},ke=()=>{S({type:X.ClearDates}),g(!1),P==null||P()},Ae=(Q,be)=>{(!U.current||oe.current!==be)&&(U.current=Q,oe.current=be,re.current=!0)},Fe=()=>{(!q.current||re.current)&&U.current&&(q.current=U.current,B(U.current),re.current=!1)},ft=()=>{g(!1),S({type:u===we.TimeOnly?X.TimeSelector:u===we.DateTime||u===we.DateOnly?X.DaySelector:X.DateRangeSelector})},vr=()=>{switch(l){case dr.Short:return"short";case dr.Medium:return"medium";case dr.Long:return"long";default:return}},dt=()=>{var be,Ye,zt,Ct,yr,br,wr,Tr,xr,Pr,Er,Dt;const Q=vr();switch(u){case we.DateTime:return d.selectedDate?Q?d.selectedDate.toLocaleString((be=y.current)==null?void 0:be.code,{dateStyle:Q,timeStyle:Q}):d.selectedDate.toLocaleString((Ye=y.current)==null?void 0:Ye.code):"";case we.DateOnly:return d.selectedDate?Q?d.selectedDate.toLocaleDateString((zt=y.current)==null?void 0:zt.code,{dateStyle:Q}):d.selectedDate.toLocaleDateString((Ct=y.current)==null?void 0:Ct.code):"";case we.TimeOnly:return d.selectedDate?Q?d.selectedDate.toLocaleTimeString((yr=y.current)==null?void 0:yr.code,{timeStyle:Q,hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):d.selectedDate.toLocaleTimeString((br=y.current)==null?void 0:br.code,{hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return d.selectedStartDate&&d.selectedEndDate?Q?`${d.selectedStartDate.toLocaleDateString((wr=y.current)==null?void 0:wr.code,{dateStyle:Q})} - ${d.selectedEndDate.toLocaleDateString((Tr=y.current)==null?void 0:Tr.code,{dateStyle:Q})}`:`${d.selectedStartDate.toLocaleDateString((xr=y.current)==null?void 0:xr.code)} - ${d.selectedEndDate.toLocaleDateString((Pr=y.current)==null?void 0:Pr.code)}`:"";default:return d.selectedDate?Q?d.selectedDate.toLocaleString((Er=y.current)==null?void 0:Er.code,{dateStyle:Q,timeStyle:Q}):d.selectedDate.toLocaleString((Dt=y.current)==null?void 0:Dt.code):""}},Xe=u===we.DateTime||u===we.DateOnly||u===we.DateRange,ln=u===we.DateTime||u===we.TimeOnly,ht=b===hr.None?{}:b===hr.Right?{rightElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})}),m.jsx("div",{className:"bsc-ml-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})})]}),rightElementClassName:"bsc-justify-center"}:{leftElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[m.jsx("div",{className:"bsc-mr-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})}),i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})})]}),leftElementClassName:"bsc-justify-center"},Et=()=>m.jsxs(m.Fragment,{children:[d.currentSelector===X.DaySelector&&Xe&&d.dateInitialized&&y.current&&m.jsx(Gh,{selectedDate:d.selectedDate,viewDate:d.currentViewDate,locale:y.current,showTimeSelector:u===we.DateTime,selectableDate:x,isValidDate:D,dispatcher:S,onChange:P}),d.currentSelector===X.MonthSelector&&Xe&&d.dateInitialized&&y.current&&m.jsx(Qh,{viewDate:d.currentViewDate,locale:y.current,dateSelection:u,dispatcher:S}),d.currentSelector===X.YearSelector&&Xe&&d.dateInitialized&&y.current&&m.jsx(np,{viewDate:d.currentViewDate,locale:y.current,dispatcher:S}),d.currentSelector===X.TimeSelector&&ln&&d.dateInitialized&&y.current&&m.jsx(rp,{viewDate:d.currentViewDate,showDateSelector:u===we.DateTime,locale:y.current,timeFormat:d.timeFormat,timeConstraints:f,onChange:P,dispatcher:S}),d.currentSelector===X.DateRangeSelector&&Xe&&d.dateInitialized&&y.current&&m.jsx(tp,{viewDate:d.currentViewDate,selectedStartDate:d.selectedStartDate,selectedEndDate:d.selectedEndDate,locale:y.current,onChange:P,dispatcher:S})]}),fn={label:r,readOnly:t,allowClear:i,getValue:dt,onFocus:O,onInput:j,iconPosition:b,iconElement:ht.rightElement||ht.leftElement},gr=Z||((Q,be)=>m.jsx(m.Fragment,{children:be})),St=Ge("bsc-text-left",{"bsc-bg-gray-2":t,"bsc-bg-white":!t},"dark:bsc-bg-mono-dark-1 bc-dt-input",s);return m.jsx(un.Provider,{value:he.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx("label",{className:"bc-dt-label dark:bsc-text-mono-light-1",children:r}),L?m.jsxs(m.Fragment,{children:[m.jsx(Kt,{value:dt(),readOnly:t,inputMode:"none",className:St,onFocus:O,onElementCreate:Q=>Ae(Q,!1),...ht}),m.jsx(ao,{visible:W,target:te,hidden:ft,unmountWhenHidden:!0,children:Et()})]}):m.jsxs(m.Fragment,{children:[m.jsx(Gr,{props:fn,template:gr,children:a===!1?m.jsx(Kt,{value:dt(),readOnly:t,className:St,onFocus:O,onBlur:M,onInput:j,onElementCreate:Q=>Ae(Q,!1),...ht}):m.jsx(fo,{value:dt(),readOnly:t,className:St,format:F,isInputValid:k,onFocus:O,onBlur:M,onChange:V,onElementCreate:Q=>Ae(Q,!0),...ht})}),m.jsx(so,{visible:W,target:te,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:ft,isClickedWithin:A,unmountWhenHidden:!0,children:Et()})]})]})})},wp="";le.Button=We,le.ContentEditableInput=Kt,le.DateTime=ip,le.FormattedInput=fo,le.MobileOverlayPanel=ao,le.OverlayPanel=so,le.applyBeeSoftTheme=Dd,le.createBeeSoftTheme=Od,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
50
+ */var Xr,qa;function gh(){if(qa)return Xr;qa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xr=a()?Object.assign:function(i,o){for(var s,u=n(i),l,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)t.call(s,h)&&(u[h]=s[h]);if(e){l=e(s);for(var b=0;b<l.length;b++)r.call(s,l[b])&&(u[l[b]]=s[l[b]])}}return u},Xr}var Jr,Ga;function en(){if(Ga)return Jr;Ga=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jr=e,Jr}var tn,Qa;function Ka(){return Qa||(Qa=1,tn=Function.call.bind(Object.prototype.hasOwnProperty)),tn}var rn,Za;function yh(){if(Za)return rn;Za=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=en(),r={},n=Ka();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var f in i)if(n(i,f)){var h;try{if(typeof i[f]!="function"){var b=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}h=i[f](o,f,u,s,null,t)}catch(x){h=x}if(h&&!(h instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var T=l?l():"";e("Failed "+s+" type: "+h.message+(T??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},rn=a,rn}var nn,Xa;function bh(){if(Xa)return nn;Xa=1;var e=Ba(),t=gh(),r=en(),n=Ka(),a=yh(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return nn=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(v){var E=v&&(l&&v[l]||v[f]);if(typeof E=="function")return E}var b="<<anonymous>>",T={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:z(),arrayOf:K,element:W(),elementType:y(),instanceOf:$,node:oe(),objectOf:ee,oneOf:X,oneOfType:B,shape:ae,exact:g};function x(v,E){return v===E?v!==0||1/v===1/E:v!==v&&E!==E}function D(v,E){this.message=v,this.data=E&&typeof E=="object"?E:{},this.stack=""}D.prototype=Error.prototype;function P(v){if(process.env.NODE_ENV!=="production")var E={},H=0;function d(O,M,A,j,k,V,Ee){if(j=j||b,V=V||A,Ee!==r){if(u){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=j+":"+A;!E[ke]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+j+"`. 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."),E[ke]=!0,H++)}}return M[A]==null?O?M[A]===null?new D("The "+k+" `"+V+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new D("The "+k+" `"+V+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:v(M,A,j,k,V)}var S=d.bind(null,!1);return S.isRequired=d.bind(null,!0),S}function _(v){function E(H,d,S,O,M,A){var j=H[d],k=F(j);if(k!==v){var V=re(j);return new D("Invalid "+O+" `"+M+"` of type "+("`"+V+"` supplied to `"+S+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return P(E)}function z(){return P(o)}function K(v){function E(H,d,S,O,M){if(typeof v!="function")return new D("Property `"+M+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var A=H[d];if(!Array.isArray(A)){var j=F(A);return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected an array."))}for(var k=0;k<A.length;k++){var V=v(A,k,S,O,M+"["+k+"]",r);if(V instanceof Error)return V}return null}return P(E)}function W(){function v(E,H,d,S,O){var M=E[H];if(!s(M)){var A=F(M);return new D("Invalid "+S+" `"+O+"` of type "+("`"+A+"` supplied to `"+d+"`, expected a single ReactElement."))}return null}return P(v)}function y(){function v(E,H,d,S,O){var M=E[H];if(!e.isValidElementType(M)){var A=F(M);return new D("Invalid "+S+" `"+O+"` of type "+("`"+A+"` supplied to `"+d+"`, expected a single ReactElement type."))}return null}return P(v)}function $(v){function E(H,d,S,O,M){if(!(H[d]instanceof v)){var A=v.name||b,j=he(H[d]);return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected ")+("instance of `"+A+"`."))}return null}return P(E)}function X(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function E(H,d,S,O,M){for(var A=H[d],j=0;j<v.length;j++)if(x(A,v[j]))return null;var k=JSON.stringify(v,function(Ee,C){var ke=re(C);return ke==="symbol"?String(C):C});return new D("Invalid "+O+" `"+M+"` of value `"+String(A)+"` "+("supplied to `"+S+"`, expected one of "+k+"."))}return P(E)}function ee(v){function E(H,d,S,O,M){if(typeof v!="function")return new D("Property `"+M+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected an object."));for(var k in A)if(n(A,k)){var V=v(A,k,S,O,M+"."+k,r);if(V instanceof Error)return V}return null}return P(E)}function B(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var E=0;E<v.length;E++){var H=v[E];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+L(H)+" at index "+E+"."),o}function d(S,O,M,A,j){for(var k=[],V=0;V<v.length;V++){var Ee=v[V],C=Ee(S,O,M,A,j,r);if(C==null)return null;C.data&&n(C.data,"expectedType")&&k.push(C.data.expectedType)}var ke=k.length>0?", expected one of type ["+k.join(", ")+"]":"";return new D("Invalid "+A+" `"+j+"` supplied to "+("`"+M+"`"+ke+"."))}return P(d)}function oe(){function v(E,H,d,S,O){return Y(E[H])?null:new D("Invalid "+S+" `"+O+"` supplied to "+("`"+d+"`, expected a ReactNode."))}return P(v)}function te(v,E,H,d,S){return new D((v||"React class")+": "+E+" type `"+H+"."+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+S+"`.")}function ae(v){function E(H,d,S,O,M){var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type `"+j+"` "+("supplied to `"+S+"`, expected `object`."));for(var k in v){var V=v[k];if(typeof V!="function")return te(S,O,M,k,re(V));var Ee=V(A,k,S,O,M+"."+k,r);if(Ee)return Ee}return null}return P(E)}function g(v){function E(H,d,S,O,M){var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type `"+j+"` "+("supplied to `"+S+"`, expected `object`."));var k=t({},H[d],v);for(var V in k){var Ee=v[V];if(n(v,V)&&typeof Ee!="function")return te(S,O,M,V,re(Ee));if(!Ee)return new D("Invalid "+O+" `"+M+"` key `"+V+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(H[d],null," ")+`
51
+ Valid keys: `+JSON.stringify(Object.keys(v),null," "));var C=Ee(A,V,S,O,M+"."+V,r);if(C)return C}return null}return P(E)}function Y(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(Y);if(v===null||s(v))return!0;var E=h(v);if(E){var H=E.call(v),d;if(E!==v.entries){for(;!(d=H.next()).done;)if(!Y(d.value))return!1}else for(;!(d=H.next()).done;){var S=d.value;if(S&&!Y(S[1]))return!1}}else return!1;return!0;default:return!1}}function q(v,E){return v==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function F(v){var E=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":q(E,v)?"symbol":E}function re(v){if(typeof v>"u"||v===null)return""+v;var E=F(v);if(E==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return E}function L(v){var E=re(v);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function he(v){return!v.constructor||!v.constructor.name?b:v.constructor.name}return T.checkPropTypes=a,T.resetWarningCache=a.resetWarningCache,T.PropTypes=T,T},nn}var an,Ja;function wh(){if(Ja)return an;Ja=1;var e=en();function t(){}function r(){}return r.resetWarningCache=t,an=function(){function n(o,s,u,l,f,h){if(h!==e){var b=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 b.name="Invariant Violation",b}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},an}if(process.env.NODE_ENV!=="production"){var Th=Ba(),xh=!0;Zr.exports=bh()(Th.isElement,xh)}else Zr.exports=wh()();var Ph=Zr.exports;const J=et(Ph),eo={disabled:!1};var Eh=process.env.NODE_ENV!=="production"?J.oneOfType([J.number,J.shape({enter:J.number,exit:J.number,appear:J.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&J.oneOfType([J.string,J.shape({enter:J.string,exit:J.string,active:J.string}),J.shape({enter:J.string,enterDone:J.string,enterActive:J.string,exit:J.string,exitDone:J.string,exitActive:J.string})]);const to=p.createContext(null);var Sh=function(t){return t.scrollTop},Ht="unmounted",ct="exited",lt="entering",Tt="entered",on="exiting",Ze=function(e){ph(t,e);function t(n,a){var i;i=e.call(this,n,a)||this;var o=a,s=o&&!o.isMounting?n.enter:n.appear,u;return i.appearStatus=null,n.in?s?(u=ct,i.appearStatus=lt):u=Tt:n.unmountOnExit||n.mountOnEnter?u=Ht:u=ct,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Ht?{status:ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var i=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==lt&&o!==Tt&&(i=lt):(o===lt||o===Tt)&&(i=on)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,i,o,s;return i=o=s=a,a!=null&&typeof a!="number"&&(i=a.exit,o=a.enter,s=a.appear!==void 0?a.appear:o),{exit:i,enter:o,appear:s}},r.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===lt){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this);o&&Sh(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ct&&this.setState({status:Ht})},r.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,u=this.props.nodeRef?[s]:[Ue.findDOMNode(this),s],l=u[0],f=u[1],h=this.getTimeouts(),b=s?h.appear:h.enter;if(!a&&!o||eo.disabled){this.safeSetState({status:Tt},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:lt},function(){i.props.onEntering(l,f),i.onTransitionEnd(b,function(){i.safeSetState({status:Tt},function(){i.props.onEntered(l,f)})})})},r.performExit=function(){var a=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Ue.findDOMNode(this);if(!i||eo.disabled){this.safeSetState({status:ct},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:on},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:ct},function(){a.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},r.setNextCallback=function(a){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,a(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(a,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this),s=a==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=u[0],f=u[1];this.props.addEndListener(l,f)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===Ht)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=hh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(to.Provider,{value:null},typeof o=="function"?o(a,s):p.cloneElement(p.Children.only(o),s))},t}(p.Component);Ze.contextType=to,Ze.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:J.shape({current:typeof Element>"u"?J.any:function(e,t,r,n,a,i){var o=e[t];return J.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,r,n,a,i)}}),children:J.oneOfType([J.func.isRequired,J.element.isRequired]).isRequired,in:J.bool,mountOnEnter:J.bool,unmountOnExit:J.bool,appear:J.bool,enter:J.bool,exit:J.bool,timeout:function(t){var r=Eh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return r.apply(void 0,[t].concat(a))},addEndListener:J.func,onEnter:J.func,onEntering:J.func,onEntered:J.func,onExit:J.func,onExiting:J.func,onExited:J.func}:{};function xt(){}Ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xt,onEntering:xt,onEntered:xt,onExit:xt,onExiting:xt,onExited:xt},Ze.UNMOUNTED=Ht,Ze.EXITED=ct,Ze.ENTERING=lt,Ze.ENTERED=Tt,Ze.EXITING=on;const Ch=Ze,ro=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:a="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",unmountOnExit:o=!1,onEntering:s,onEntered:u,onExit:l,onExited:f,children:h})=>{const b=r||{transition:`opacity ${t}ms ${a}`,opacity:0},T=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${i}`,opacity:0},exited:{transition:`opacity ${t}ms ${i}`,opacity:0},unmounted:{}};return m.jsx(Ch,{in:e,timeout:t,onEntering:s,onEntered:u,onExit:l,onExited:f,unmountOnExit:o,children:x=>h({state:x,defaultStyle:b,transitionStyles:T})})};function no(e){return e.target?e.target:e}const ao=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:a=400,showTransitionOptions:i="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",approveText:s="DONE",shown:u,hidden:l,isClickedWithin:f,children:h})=>{const[b,T]=p.useState(-1),[x,D]=p.useState(-1),[P,_]=p.useState(e),z=p.useRef(100),K=p.useRef(101),W=p.useRef(),y=p.useRef(),$=p.useRef();p.useEffect(()=>{t&&(W.current=no(t));const g=Ma("zIndex",Y=>Y==="auto"||Y==="-1"?!1:parseInt(Y)>100).map(Y=>parseInt(Y,10));g.length>0&&(z.current=Math.max(...g)+1,K.current=Math.max(...g)+2),_(e)},[e,t]);const X=g=>{y.current=g},ee=()=>{D(z.current),T(K.current)},B=()=>{if(!y.current)return;u==null||u();let g;W.current&&(g=[W.current]);const Y=q=>{q?f==null||f():_(!1)};$.current=Ua(y.current,Y,g)},oe=()=>{$.current&&Ha($.current)},te=()=>{D(-1),T(-1),l==null||l()},ae={entering:{opacity:.5},entered:{opacity:.5}};return Ue.createPortal(m.jsx(ro,{start:P,timeout:a,showTransitionOptions:i,hideTransitionOptions:o,onEntering:ee,onEntered:B,onExit:oe,onExited:te,unmountOnExit:n,children:({state:g,defaultStyle:Y,transitionStyles:q})=>m.jsxs("div",{ref:F=>F&&X(F),children:[m.jsx("div",{className:"bsc-fixed bsc-left-0 bsc-top-0 bsc-h-full bsc-w-full bsc-bg-mono-dark-1",style:{zIndex:x,...q[g],...ae[g]}}),m.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc-fixed bsc-bottom-0 bsc-left-0 bsc-w-full bsc-bg-white dark:bsc-border-t dark:bsc-border-solid dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1",style:{zIndex:b,...Y,...q[g]},children:[m.jsx("div",{className:"bsc-w-full",children:h}),m.jsx(m.Fragment,{children:m.jsx(We,{buttonType:"primary",fullWidth:!0,onClick:()=>_(!1),className:"bsc-text-xs bsc-font-bold",children:s})})]})]})}),r)};var oo=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(oo||{}),io=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(io||{});class _e{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let a=0,i=0;const o=window.scrollY;switch(r){case 2:a=n.top+n.height+o,i=n.left;break;case 0:a=n.top+o,i=n.left;break;case 3:a=n.top+n.height+o,i=n.left+n.width;break;case 1:a=n.top+o,i=n.left+n.width}return{top:a,left:i}}static positionElementToTarget(t,r,n=0,a=2){let{left:i,top:o}=_e.positionToTarget(r,a);const s=t.getBoundingClientRect();switch(n){case 0:break;case 1:i=i-s.width;break;case 2:o=o-s.height;break;case 3:o=o-s.height,i=i-s.width;break}return{top:o,left:i}}static canPositionElementOnScreen(t,r){const n=_e.getScreenDimensions(),a=t.getBoundingClientRect(),i=_e.positionElementToTarget(t,r,0,2);if(i.left+a.width<n.width&&i.top+a.height<n.height||_e.positionElementToTarget(t,r,1,3).left>=0&&i.top+a.height<n.height)return!0;const s=_e.positionElementToTarget(t,r,2,0);if(s.left+a.width<n.width&&s.top>=0)return!0;const u=_e.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static positionElementToTargetOnScreen(t,r,n=0,a=2){const{left:i,top:o}=_e.positionElementToTarget(t,r,n,a),s=t.getBoundingClientRect(),u=_e.determineOffScreenLocation(s);if(u){if(n===0&&a===2){if(u.right&&!u.bottom)return _e.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return _e.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return _e.positionElementToTarget(t,r,3,1)}else if(n===1&&a===3){if(u.left&&!u.bottom)return _e.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return _e.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return _e.positionElementToTarget(t,r,2,0)}}return{top:o,left:i}}static determineOffScreenLocation(t){const r=_e.getScreenDimensions(),n={left:t.left<0,top:t.top<0,right:t.left+t.width>r.width,bottom:t.top+t.height>r.height};return n.left||n.top||n.right||n.bottom?n:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const so=({visible:e,target:t,targetPosition:r=oo.BottomLeft,elementAlignment:n=io.TopLeft,shouldTargetCloseOverlay:a=!0,shouldMatchTargetWidth:i=!1,shouldScrollCloseOverlay:o=!1,shouldCheckZIndex:s=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:l=!1,transitionDuration:f=400,showTransitionOptions:h="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:b="linear",shown:T,hidden:x,isClickedWithin:D,markupCreated:P,children:_})=>{const[z,K]=p.useState(-1),[W,y]=p.useState(e),[$,X]=p.useState(!1),ee=p.useRef(!1),B=p.useRef(100),oe=p.useRef({left:0,top:0,width:0}),te=p.useRef(),ae=p.useRef(),g=p.useRef(),Y=p.useRef(),q=p.useRef(),F=p.useRef();p.useEffect(()=>(u===!0&&(F.current=new ResizeObserver(re)),()=>{var O,M;u===!0&&(ae.current&&((O=F.current)==null||O.unobserve(ae.current)),(M=F.current)==null||M.disconnect())}),[u]),p.useEffect(()=>{if(t&&(te.current=no(t),o&&(g.current=_a(te.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"}),g.current.tagName.toLowerCase()==="html"&&(g.current=document))),s){const O=Ma("zIndex",M=>parseInt(M)>=100).map(M=>parseInt(M));O.length>0&&(B.current=Math.max(...O)+1)}e!==void 0&&y(e)},[t,e,o,s]);const re=O=>{if(ae.current){const M=_e.getScreenDimensions(),A=O[O.length-1].target,j=A.getBoundingClientRect(),k=_e.determineOffScreenLocation(j);if(k){if(te.current&&_e.canPositionElementOnScreen(A,te.current)){const V=_e.positionElementToTargetOnScreen(ae.current,te.current,n,r);oe.current={...oe.current,...V}}else k.right?oe.current.left=M.width-j.width:k.left&&(oe.current.left=0),k.bottom?oe.current.top=M.height-j.height:k.top&&(oe.current.top=0);L()}}},L=At(()=>{ee.current=!ee.current,X(ee.current)},20),he=()=>{K(B.current)},v=()=>{if(!ae.current)return;T==null||T();let O;!a&&te.current&&(O=[te.current]);const M=A=>{A?D==null||D():y(!1)};Y.current=Ua(ae.current,M,O),o&&(q.current=qc(A=>ae.current&&Pd(A,ae.current)&&y(!1),100,{leading:!0}),g.current&&g.current.addEventListener("scroll",q.current))},E=()=>{g.current&&q.current&&(g.current.removeEventListener("scroll",q.current),q.current=void 0),Y.current&&Ha(Y.current)},H=()=>{K(-1),x==null||x()},d=O=>{var M,A;if(ae.current=O,P==null||P(O),te.current){const j=_e.positionElementToTarget(ae.current,te.current,n,r);oe.current={...j,width:te.current.offsetWidth}}u===!0&&((M=F.current)==null||M.unobserve(ae.current),(A=F.current)==null||A.observe(ae.current))},S=p.useMemo(()=>{const O={top:`${oe.current.top}px`,left:`${oe.current.left}px`,zIndex:z};return i&&(O.width=`${oe.current.width}px`),O},[$,z,i]);return m.jsx(ro,{start:W,timeout:f,showTransitionOptions:h,hideTransitionOptions:b,onEntering:he,onEntered:v,onExit:E,onExited:H,unmountOnExit:l,children:({state:O,defaultStyle:M,transitionStyles:A})=>m.jsx("div",{className:"bsc-fixed bsc-border bsc-border-solid bsc-bg-white bsc-shadow dark:bsc-border-mono-light-1 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1",style:{...S,...M,...A[O]},ref:j=>j&&d(j),children:_})})};let lr;const Dh=new Uint8Array(16);function Oh(){if(!lr&&(lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lr(Dh)}const Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Ih(e,t=0){return Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]}const uo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Nh(e,t,r){if(uo.randomUUID&&!t&&!e)return uo.randomUUID();e=e||{};const n=e.random||(e.rng||Oh)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let a=0;a<16;++a)t[r+a]=n[a];return t}return Ih(n)}class fr{static create(t){const r=[];let n=0;for(let a=0,i=t.formatParts.length;a<i;a++){const o=t.formatParts[a],s=n,u=s+o.characterCount;r.push({startPosition:s,endPosition:u,...o}),n=u}return r}}class _h{constructor(t,r){U(this,"instanceCollection");U(this,"formatPartList");U(this,"inputSlotCollection");U(this,"currentPartIndex",0);U(this,"currentCursorPosition",0);U(this,"inputElement");U(this,"inputSelection",null);U(this,"inputRange");U(this,"textNode");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}getCursorPosition(){return this.currentCursorPosition}getCurrentPartIndex(){return this.currentPartIndex}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){this.createInputRangeSelection(),this.inputRange&&this.textNode&&(this.inputRange.setStart(this.textNode,t),this.inputRange.setEnd(this.textNode,r||t),this.currentCursorPosition=r||t,this.setPartIndexByCursorPosition())}findCursorPosition(){var r,n;const t=(r=window.getSelection())==null?void 0:r.getRangeAt(0);if(this.inputElement&&t){const a=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const l=document.createRange();return l.selectNodeContents(u),l.compareBoundaryPoints(Range.END_TO_END,t)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i=0;for(;a.nextNode();)i+=((n=a.currentNode.textContent)==null?void 0:n.length)||0;t.startContainer.nodeType===Node.TEXT_NODE&&(i+=t.startOffset);const o=this.inputSlotCollection.getLastSlotWithData(),s=o.startPosition+o.partText.length;this.setCursorSelection(i>s?s:i)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.currentCursorPosition>0){const t=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(t>=r.startPosition&&t<=r.endPosition)this.setCursorSelection(t);else for(let n=this.currentPartIndex-1;n>=0;n--)r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition&&(r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t))}}moveCursorRight(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r){const n=this.currentCursorPosition+1;let a=this.formatPartList[this.currentPartIndex];if(n>=a.startPosition&&n<=a.endPosition)this.setCursorSelection(n);else for(let i=this.currentPartIndex+1,o=this.formatPartList.length;i<o;i++)a=this.formatPartList[i],n>=a.startPosition&&n<=a.endPosition&&(a.isSeparator?this.setCursorSelection(this.formatPartList[i+1].startPosition):this.setCursorSelection(n))}}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}createInputRangeSelection(){var t,r;this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),(t=this.inputSelection)==null||t.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),(r=this.inputSelection)==null||r.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class Mh{static create(t){const r=[];for(let n=0,a=t.length;n<a;n++){const i=t[n];i.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...i})}return r}}class jh{constructor(t){U(this,"inputSlots");this.inputSlots=Mh.create(fr.create(t))}clearAllSlots(){for(let t=0,r=this.inputSlots.length;t<r;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(r=>r.partIndex===t)}getFirstSlot(){return this.inputSlots[0]}getNextSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(n=>!n.isComplete);let r=t;for(let n=t+1,a=this.inputSlots.length;n<a;n++)this.inputSlots[n].partText.length>0&&(r=n);return this.inputSlots[r>-1?r:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class Pt{static getInstance(){return this.instance||(this.instance=new kh),this.instance}}U(Pt,"instance");class kh{constructor(){U(this,"navigatorInstances");U(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new _h(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new jh(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class sn{constructor(t,r){U(this,"instanceCollection");U(this,"formatPartList");U(this,"inputSlotCollection");U(this,"inputElement");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,a=this.formatPartList.length;n<a;n++){const i=this.formatPartList[n];if(i.isSeparator)t+=i.inputText;else{const o=this.inputSlotCollection.getSlot(n);o&&(t+=o.partText+((r=o.inputText)==null?void 0:r.repeat(o.characterCount-o.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var qe=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(qe||{});class co{constructor(){U(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);U(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End"]);U(this,"editingKeys",["Backspace","Delete"]);U(this,"ignoreKeys",["Shift","Alt","Control","Fn","Meta"])}isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class Rh{constructor(t){U(this,"_currentIndex",0);U(this,"index",0);U(this,"formatParts");this.formatParts=fr.create(t)}get currentIndex(){return this._currentIndex}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class lo{constructor(t,r){U(this,"instanceCollection");U(this,"inputSlotCollection");U(this,"formatNavigator");U(this,"keyTypeChecker");U(this,"formatRenderer");U(this,"formatPartList");this.format=t,this.instanceCollection=Pt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r),this.formatPartList=new Rh(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const a=this.formatPartList.next();if(a&&!a.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const i=this.formatPartList.currentIndex,o=this.formatPartList.next();if(o&&o.inputText){const s=t.indexOf(o.inputText,r),u=this.inputSlotCollection.getSlot(i);if(u&&s>-1){const l=s-r>u.characterCount?r+u.characterCount:s;u.partText=t.substring(r,l),this.processSlotRules(u),r=s+o.characterCount}}}else{const i=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);i&&(i.partText=t.substring(r,r+i.characterCount),this.processSlotRules(i))}}}processEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),a=n-r.startPosition,i=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,a-1)+r.partText.substring(a),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const s=this.inputSlotCollection.getPreviousSlot(r.partIndex);s&&(s.partText=s.partText.substring(0,s.partText.length-1),i&&this.shiftFormatParts(s),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(s.startPosition+s.partText.length),this.processSlotRules(s,!0))}break}case"Delete":r.partText=r.partText.substring(0,a)+r.partText.substring(a+1),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const a=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+a,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,a=r.characterCount,i=r.partText;if(r.valueType===qe.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const o=r.maximumValue,s=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,l=parseInt(this.createNewValue(r,n));if(o&&l>o)if(s){u&&(r.partText=r.partText.padStart(a,"0")),r.isComplete=!0;const f=this.inputSlotCollection.getNextSlot(r.partIndex);f&&!f.isComplete&&(f.partText=n),this.formatRenderer.render(),f&&this.formatNavigator.setCursorPosition(f.isComplete?f.startPosition:f.startPosition+1)}else return;else i.length+1===a?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):i.length+1<a&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else i.length+1===a?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,t))}createNewValue(t,r){const n=t.partText,a=this.formatNavigator.getCursorPosition();if(a>=t.startPosition+t.partText.length)return n+r;{const i=a-t.startPosition;return n.substring(0,i)+r+n.substring(i)}}processSlotRules(t,r=!1){const n=t.characterCount,a=t.allCharactersRequired||!1;if(t.valueType===qe.Numeric){const i=t.minimumValue,o=t.maximumValue;if(a)t.isComplete=t.partText.length===n;else if(i!==void 0&&o!==void 0){const s=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=i&&u<=o,t.isComplete&&s&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else a?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class Lh{constructor(t,r){U(this,"instanceCollection");U(this,"formatNavigator");U(this,"ruleProcessor");U(this,"keyTypeChecker");U(this,"formatRenderer");this.format=t,this.instanceCollection=Pt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new lo(t,r),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n}=t;switch(r){case"ArrowLeft":n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class Ah{constructor(t,r=""){U(this,"instanceId");U(this,"instanceCollection");U(this,"keyProcessor");U(this,"formatNavigator");U(this,"formatRenderer");U(this,"inputSlotCollection");U(this,"inputRuleProcessor");U(this,"previousOutputValue","");U(this,"inputElementSet",!1);U(this,"isInputFocused",!1);U(this,"inputElement");U(this,"onFormatChange");this.inputValue=r,this.instanceId=Nh(),this.instanceCollection=Pt.getInstance(),this.keyProcessor=new Lh(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new sn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new lo(t,this.instanceId)}inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),setTimeout(()=>{var r;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML)}))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){t.key!=="Tab"&&(t.preventDefault(),t.stopPropagation(),this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange())))}dispose(){this.instanceCollection.removeInstances(this.instanceId)}}const Fh=(e,t)=>{const{value:r="",format:n,readOnly:a=!1,debounceTime:i=800,fillContainer:o=!0,leftElement:s,rightElement:u,className:l,leftElementClassName:f,rightElementClassName:h,isSingleLine:b=!1,allowSingleLineScroll:T=!1,isInputValid:x,onChange:D,onFocus:P,onBlur:_,onElementCreate:z,onLeftElementClick:K,onRightElementClick:W}=e,[y,$]=p.useState(!0),X=p.useRef(),ee=p.useRef(),B=p.useRef();p.useEffect(()=>()=>{var L;(L=B.current)==null||L.dispose()},[]),p.useEffect(()=>{var L;(L=B.current)==null||L.inputValuePassed(r)},[r]),p.useEffect(()=>{var L,he,v;(L=B.current)==null||L.dispose(),n&&(B.current=new Ah(n,r),ee.current&&((he=B.current)==null||he.inputElementCreated(ee.current)),(v=B.current)==null||v.registerFormatChangeEvent(oe))},[n]);const oe=p.useCallback(L=>{x?x(L)?($(!0),D==null||D(L)):$(!1):D==null||D(L)},[D]),te=p.useCallback(L=>{var he;(he=B.current)==null||he.inputFocused(),P==null||P(L)},[P]),ae=p.useCallback(L=>{var he;(he=B.current)==null||he.inputBlurred(),_==null||_(L)},[_]),g=p.useCallback(()=>{var L;(L=B.current)==null||L.mouseUpHandler()},[]),Y=p.useCallback(L=>{var he;(he=B.current)==null||he.keyDownHandler(L)},[]),q=p.useCallback(L=>{var he,v,E,H,d,S,O,M,A;(v=(he=X.current)==null?void 0:he.inputElement)==null||v.removeEventListener("keydown",Y),(H=(E=X.current)==null?void 0:E.inputElement)==null||H.removeEventListener("mouseup",g),X.current=L,(S=(d=X.current)==null?void 0:d.inputElement)==null||S.addEventListener("keydown",Y),(M=(O=X.current)==null?void 0:O.inputElement)==null||M.addEventListener("mouseup",g),ee.current=(A=X.current)==null?void 0:A.inputElement},[]),F=p.useCallback(()=>{var L;(L=X.current)==null||L.focus()},[]);p.useImperativeHandle(t,()=>({focus:F}));const re=Ge(l,{"!bsc-border-error":!y});return m.jsx(Kt,{ref:L=>L&&q(L),readOnly:a,debounceTime:i,fillContainer:o,leftElement:s,rightElement:u,className:re,leftElementClassName:f,rightElementClassName:h,isSingleLine:b,allowSingleLineScroll:T,onFocus:te,onBlur:ae,onElementCreate:z,onLeftElementClick:K,onRightElementClick:W})},fo=p.forwardRef(Fh),un=p.createContext(void 0);function ho(e,t,r=!0){var b,T;const n=ya(e),a=da(e),i=tf(e);let o=Vr(a)-(((b=t.options)==null?void 0:b.weekStartsOn)||0);o=o===-1?6:o;const s=Vr(i)-(((T=t.options)==null?void 0:T.weekStartsOn)||0),u=el({start:a,end:i}),l=n+o>35?6:5,f=po(l,7,{dayValue:null,isCurrent:!0});let h=1;for(let x=0,D=l;x<D;x++){for(let P=x>0?0:o;P<7;P++){const _=u[h-1];if(_.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[x][P].dayValue=_,++h>n)break}if(h>n)break}if(o>0&&r)for(let x=0;x<o;x++)f[0][x].dayValue=rd(a,o-x),f[0][x].isCurrent=!1;if(s>-1&&r)for(let x=6;x>s;x--)f[l-1][x].dayValue=Zt(i,x-s),f[l-1][x].isCurrent=!1;return f}function po(e,t,r){const n=[];for(let a=0,i=e;a<i;a++){const o=[];for(let s=0,u=t;s<u;s++){const l=Yh(r)?r:{...r};o.push(l)}n.push(o)}return n}function Yh(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function $h(e){var n;const t=nd(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let a=0;a<7;a++)r.push(Zt(t,a).toLocaleDateString(e.code,{weekday:"short"}));return r}function Uh(e){const t=new Date(Date.UTC(2020,0,1)),r=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let n=0;for(let a=0;a<3;a++)for(let i=0;i<4;i++)r[a][i]={monthNumber:n,monthName:st(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function Hh(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const a=tl({start:r,end:Xt(r,9)}),i=po(3,4,"");let o=0;for(let s=0;s<3;s++)for(let u=0;u<4&&(i[s][u]=a[o++].toLocaleDateString(t.code,{year:"numeric"}),o!==a.length);u++);return i}function Wh(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function Vh(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function mo(e){return(await import(`/node_modules/date-fns/locale/${zh(e)}`)).default}function zh(e){const[t,r]=e.split("-");switch(t){case"af":return"af";case"ar":switch(r){case"DZ":return"ar-DZ";case"EG":return"ar-EG";case"MA":return"ar-MA";case"SA":return"ar-SA";case"TN":return"ar-TN";default:return"ar"}case"az":return"az";case"be":switch(r){case"tarask":return"be-tarask";default:return"be"}case"bg":return"bg";case"bn":return"bn";case"bs":return"bs";case"ca":return"ca";case"cs":return"cs";case"cy":return"cy";case"da":return"da";case"de":switch(r){case"AT":return"de-AT";default:return"de"}case"el":return"el";case"en":switch(r){case"AU":return"en-AU";case"CA":return"en-CA";case"GB":return"en-GB";case"IE":return"en-IE";case"IN":return"en-IN";case"NZ":return"en-NZ";case"US":return"en-US";default:return"en-ZA"}case"eo":return"eo";case"es":return"es";case"et":return"et";case"eu":return"eu";case"fa":return"fa-IR";case"fi":return"fi";case"fr":switch(r){case"CA":return"fr-CA";case"CH":return"fr-CH";default:return"fr"}case"fy":return"fy";case"gd":return"gd";case"gl":return"gl";case"gu":return"gu";case"he":return"he";case"hi":return"hi";case"hr":return"hr";case"ht":return"ht";case"hu":return"hu";case"hy":return"hy";case"id":return"id";case"is":return"is";case"it":switch(r){case"CH":return"it-CH";default:return"it"}case"ja":switch(r){case"Hira":return"ja-Hira";default:return"ja"}case"ka":return"ka";case"kk":return"kk";case"km":return"km";case"kn":return"kn";case"ko":return"ko";case"lb":return"lb";case"lt":return"lt";case"lv":return"lv";case"mk":return"mk";case"mn":return"mn";case"ms":return"ms";case"mt":return"mt";case"nb":return"nb";case"nl":switch(r){case"BE":return"nl-BE";default:return"nl"}case"nn":return"nn";case"oc":return"oc";case"pl":return"pl";case"pt":switch(r){case"BR":return"pt-BR";default:return"pt"}case"ro":return"ro";case"ru":return"ru";case"sk":return"sk";case"sl":return"sl";case"sq":return"sq";case"sr":switch(r){case"Latn":return"sr-Latn";default:return"sr"}case"sv":return"sv";case"ta":return"ta";case"te":return"te";case"th":return"th";case"tr":return"tr";case"ug":return"ug";case"uk":return"uk";case"uz":switch(r){case"Cyrl":return"uz-Cyrl";default:return"uz"}case"vi":return"vi";case"zh":switch(r){case"CN":return"zh-CN";case"HK":return"zh-HK";default:return"zh-TW"}default:return"en-AU"}}function Wt(e,t){const r=ad(e);if(isNaN(r.valueOf())){let n=Be(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=Be(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function vo(e,t){const r=e.split("-");if(r.length!==2)return;const n=Wt(r[0].trim(),t);if(!n)return;const a=Wt(r[1].trim(),t);if(a)return[n,a]}var we=(e=>(e[e.DateTime=0]="DateTime",e[e.DateOnly=1]="DateOnly",e[e.TimeOnly=2]="TimeOnly",e[e.DateRange=3]="DateRange",e))(we||{}),Vt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Vt||{}),dr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(dr||{}),De=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(De||{}),rt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(rt||{}),hr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(hr||{}),Z=(e=>(e[e.DaySelector=0]="DaySelector",e[e.MonthSelector=1]="MonthSelector",e[e.YearSelector=2]="YearSelector",e[e.TimeSelector=3]="TimeSelector",e[e.DateRangeSelector=4]="DateRangeSelector",e[e.SetViewDate=5]="SetViewDate",e[e.SetSelectedDate=6]="SetSelectedDate",e[e.SetSelectedDateRange=7]="SetSelectedDateRange",e[e.SetSelectedStartDate=8]="SetSelectedStartDate",e[e.SetSelectedEndDate=9]="SetSelectedEndDate",e[e.SetTimeFormat=10]="SetTimeFormat",e[e.ClearDates=11]="ClearDates",e[e.InitializeDates=12]="InitializeDates",e))(Z||{});const Bh=(e,t)=>{switch(t.type){case 0:return{...e,currentSelector:0,currentViewDate:t.viewDate||e.currentViewDate};case 1:return{...e,currentSelector:1,currentViewDate:t.viewDate||e.currentViewDate};case 2:return{...e,currentSelector:2};case 3:return{...e,currentSelector:3};case 4:return{...e,currentSelector:4,currentViewDate:t.viewDate||e.currentViewDate};case 5:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 6:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 7:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 8:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 9:return{...e,selectedEndDate:t.selectedEndDate};case 10:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 11:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 12:const r={...e,currentViewDate:qh(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...r,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...r,selectedDate:t.initialDate};default:return{...e,currentSelector:0}}};function qh(e){return e?Array.isArray(e)?e[0]:e:new Date}const pr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a=rt.Normal,locale:i,onDateSelected:o,selectableDate:s,isValidDate:u,dispatcher:l})=>{var q;const[f,h]=p.useState(!1),[b,T]=p.useState(),[x,D]=p.useState(),[P,_]=p.useState(),[z,K]=p.useState(),W=p.useRef(),y=p.useRef(),$=p.useContext(un),X=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),ee=async()=>i||await mo(Na());p.useEffect(()=>{ee().then(F=>{W.current=F,y.current=$h(W.current),h(!0)}).catch(F=>console.error(F))},[]),p.useEffect(()=>{e&&W.current&&_(ho(e,W.current,a===rt.Normal))},[e,f]),p.useEffect(()=>{K(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{T(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),D(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{W.current&&i&&(W.current=i,_(ho(e,W.current,a===rt.Normal)))},[i]);const B=F=>{if(a===rt.Normal)l==null||l({type:Z.SetSelectedDate,selectedDate:F,viewDate:F}),o==null||o(F);else{if(!o)throw new Error("Range selection mode requires onDateSelected to be set");!r||rf(F,r)?o(F):r&&!n?o(F,{setEndDate:!0}):r&&n&&o(F)}},oe=F=>(z==null?void 0:z.toLocaleDateString())===F.toLocaleDateString(),te=F=>{if(b&&x){const re=F.getTime();return re>=b&&re<=x}return!1},ae={viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a,locale:i,weekDays:y.current,monthMatrix:P,selectableDate:s,isValidDate:u,onDateClicked:B,isSelectedDate:oe,isInSelectedDateRange:te},Y=X||((F,re)=>m.jsx("div",{className:"bsc-w-full bc-dt-calendar",children:re}));return m.jsx(Gr,{props:ae,template:Y,children:m.jsxs("div",{className:"bsc-grid bsc-grid-cols-7 bsc-gap-3 bc-dt-day-row bsc-min-w-[329px]",children:[(q=y.current)==null?void 0:q.map((F,re)=>m.jsx("div",{className:"bsc-text-center bsc-font-bold bc-dt-day-cell",children:F},re)),P==null?void 0:P.map((F,re)=>F.map((L,he)=>{var H,d;const v=L.dayValue!==null&&(s===void 0||s(L.dayValue)),E=Ge("bsc-text-center bsc-py-1",{"bsc-text-gray-3":!L.isCurrent,"bsc-bg-primary-3 dark:bsc-bg-mono-light-1 dark:bsc-text-mono-dark-1":L&&L.dayValue&&(z&&oe(L.dayValue)||b&&!x&&fa(b,L.dayValue)||b&&x&&te(L.dayValue)),"bsc-cursor-pointer":v,"bsc-text-error bsc-cursor-not-allowed":!v,"bsc-bg-primary-5 dark:bsc-bg-mono-light-3 dark:bsc-text-mono-dark-1":L.dayValue&&td(L.dayValue)&&!(oe(L.dayValue)||te(L.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:E,onClick:()=>L&&L.dayValue&&v&&(u===void 0||u(L.dayValue))&&B(L.dayValue),children:(d=L.dayValue)==null?void 0:d.getDate().toLocaleString((H=W.current)==null?void 0:H.code)},re.toString()+he.toString())}))]})})},mr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a})=>{const o=p.useContext(un).dateScrollerTemplate,s={title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a},l=o||((f,h)=>m.jsx("div",{className:"bc-dt-scroller bsc-flex bsc-w-full bsc-flex-row bsc-items-center bsc-px-2 bsc-py-1",children:h}));return m.jsxs(Gr,{props:s,template:l,children:[m.jsx("div",{className:"bc-dt-scroller-left bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:n,children:m.jsx(Rd,{size:24})})}),m.jsx("div",{className:"bc-dt-scroller-title bsc-flex-grow bsc-cursor-pointer bsc-text-center",onClick:r,children:e}),m.jsx("div",{className:"bc-dt-scroller-right bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:a,children:m.jsx(Hd,{size:24})})})]})},Gh=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:a,isValidDate:i,onChange:o,dispatcher:s})=>{const u=()=>{t&&s({type:Z.SetViewDate,viewDate:Oa(t,1)})},l=()=>{t&&s({type:Z.SetViewDate,viewDate:st(t,1)})},f=()=>{s({type:Z.MonthSelector})},h=()=>{s({type:Z.TimeSelector})},b=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bsc-p-2 bc-dt-day-selector",children:[m.jsx(mr,{title:b(),scrollerType:Vt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:l}),m.jsx(pr,{viewDate:t,selectedDate:e,locale:r,selectableDate:a,isValidDate:i,onDateSelected:o,dispatcher:s}),n&&m.jsx("div",{className:"bsc-w-full bsc-flex bsc-flex-row bsc-p-2 bsc-justify-center bc-dt-time-value-wrapper",children:m.jsx("div",{className:"bsc-p-2 bsc-cursor-pointer hover:bsc-bg-gray-4 dark:hover:bsc-bg-mono-light-2 dark:hover:bsc-text-mono-dark-2 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bc-dt-time-value",onClick:h,children:(e==null?void 0:e.toLocaleTimeString(r.code))||Wh(r)})})]})},Qh=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const a=p.useRef(Uh(t)),i=()=>{const f=Ia(e,1);n({type:Z.SetViewDate,viewDate:f})},o=()=>{const f=Xt(e,1);n({type:Z.SetViewDate,viewDate:f})},s=f=>{n({type:r!==we.DateRange?Z.DaySelector:Z.DateRangeSelector,viewDate:wd(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),l=()=>{n({type:Z.YearSelector})};return m.jsxs("div",{className:"bsc-p-2 bc-dt-month-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:u(),scrollerType:Vt.Month,onTitleClicked:l,onMovePrevious:i,onMoveNext:o}),m.jsx("div",{className:"bsc-w-full bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-month-grid",children:a.current.map((f,h)=>f.map((b,T)=>m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-month-cell",onClick:()=>s(b.monthNumber),children:b.monthName},h.toString()+T.toString())))})]})};function Kh(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((i,o)=>i!==n[o]))return!0;const a=Object.keys(e);return Object.keys(t).some((i,o)=>i!==a[o])}function Zh(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function go(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Zh,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const a=window.matchMedia(e[n]);return r.mediaQueries[n]=a,r.matches[n]=a.matches,r},{mediaQueries:{},matches:{}})}function Xh(e,t){function r(n,a){return n[a]=e.mediaQueries[a].matches,n}switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(r,{}),mediaQueries:e.mediaQueries};case"setQueries":return go(t.queries)}}function Jh(e){const t=Nt.useRef(e),[r,n]=Nt.useReducer(Xh,e,go);Nt.useEffect(()=>{Kh(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function a(){return n({type:"updateMatches"})}function i(u){const l=a;return typeof u.addListener<"u"?u.addListener(l):u.addEventListener("change",l),l}Nt.useEffect(()=>{const u=Object.values(r.mediaQueries),l=u.map(i);function f(h,b){typeof h.addListener<"u"?h.removeListener(l[b]):h.removeEventListener("change",l[b])}return()=>{u.forEach(f)}},[r.mediaQueries]);const{matches:o}=r,s=Nt.useMemo(()=>Object.values(o),[o]);return{matches:o,matchesAny:s.some(Boolean),matchesAll:s.length>0&&s.every(Boolean)}}function yo(e){return Jh(ep(e)).matchesAll}const cn={};function ep(e){return cn[e]===void 0&&(cn[e]={default:e}),cn[e]}const tp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:a,dispatcher:i})=>{const o=yo("not all and (min-width: 640px)"),s=st(e,1),u=(T,x)=>{!x||!x.setEndDate?i({type:Z.SetSelectedStartDate,selectedStartDate:T}):(i({type:Z.SetSelectedEndDate,selectedEndDate:T}),t&&(a==null||a([t,T])))},l=()=>{i({type:Z.MonthSelector})},f=()=>o?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${s.toLocaleDateString(n.code,{month:"long"})} ${s.toLocaleDateString(n.code,{year:"numeric"})}`,h=()=>{e&&i({type:Z.SetViewDate,viewDate:Oa(e,1)})},b=()=>{e&&i({type:Z.SetViewDate,viewDate:st(e,1)})};return m.jsxs("div",{className:"bsc-flex bsc-flex-col bc-dt-range-selector",children:[m.jsx("div",{className:"bsc-flex-shrink bc-dt-range-scroller-wrapper",children:m.jsx(mr,{title:f(),scrollerType:Vt.Range,onTitleClicked:l,onMovePrevious:h,onMoveNext:b})}),m.jsx("div",{className:"bsc-flex-grow",children:o?m.jsx("div",{className:"bsc-py-1 bsc-px-2 bc-dt-range-calendar",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}):m.jsxs("div",{className:"bsc-flex bsc-flex-row bsc-py-1 bsc-px-2 bc-dt-range-wrapper",children:[m.jsx("div",{className:"bsc-border-r bsc-border-solid bsc-border-gray-3 bsc-pr-4 bc-dt-range-calendar-1",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}),m.jsx("div",{className:"bsc-pl-4 bc-dt-range-calendar-2",children:m.jsx(pr,{viewDate:s,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})})]})})]})},rp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=De.TwelveHour,timeConstraints:a,onChange:i,dispatcher:o})=>{const s=p.useRef(n===De.TwelveHour?11:23),u=p.useRef(n===De.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),l=p.useRef(xd(0,59,g=>g.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),h=p.useRef(Uc(e)),b=g=>g>11?g-12:g,[T,x]=p.useState(b(e.getHours())),[D,P]=p.useState(e.getMinutes()),[_,z]=p.useState(e.getHours()<=12?0:1),K=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const g=e.getHours(),Y=e.getMinutes();if(g!==T&&x(n===De.TwelveHour?b(g):g),Y!==D&&P(Y),n===De.TwelveHour){const q=g<=11?0:1;q!==_&&z(q)}},[e]);const W=()=>{var q;const g=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,Y=T<s.current?T+g:0;x(Y),B(Y,D,_)},y=()=>{var q;const g=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,Y=T>0?T-g:s.current;x(Y),B(Y,D,_)},$=()=>{var q,F,re;const g=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,Y=D+g<(((F=a==null?void 0:a.minutes)==null?void 0:F.max)||59)?D+g:((re=a==null?void 0:a.minutes)==null?void 0:re.min)||0;P(Y),B(T,Y,_)},X=()=>{var q,F,re;const g=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,Y=D-g>=(((F=a==null?void 0:a.minutes)==null?void 0:F.min)||0)?D-g:(((re=a==null?void 0:a.minutes)==null?void 0:re.max)||60)-g;P(Y),B(T,Y,_)},ee=()=>{const g=_===0?1:0;z(g),B(T,D,g)},B=(g,Y,q)=>{const F=n===De.TwelveHour&&q===1?g+12:g;h.current.setHours(F,Y),o({type:Z.SetSelectedDate,selectedDate:h.current,viewDate:h.current}),i==null||i(h.current)},oe=()=>{o({type:Z.DaySelector})},te=Ge("bsc-w-full bsc-grid bsc-grid-rows-3 bsc-gap-4 bc-dt-time-grid",{"bsc-grid-cols-4":n===De.TwelveHour,"bsc-grid-cols-3":n===De.TwentyFourHour}),ae=Ge("bsc-text-center bsc-cursor-pointer hover:bsc-bg-gray-4 dark:bsc-text-mono-light-1 dark:hover:bsc-bg-mono-light-1 dark:hover:bsc-text-mono-dark-1 bc-dt-time-date-value",{"bsc-col-span-4":n===De.TwelveHour,"bsc-col-span-3":n===De.TwentyFourHour});return m.jsx("div",{className:"bc-dt-time-selector bsc-flex bsc-flex-row bsc-justify-center bsc-p-2",style:{minWidth:n===De.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:te,children:[t&&m.jsx("div",{className:ae,onClick:oe,children:K.current}),m.jsx("div",{className:"bc-dt-time-hour-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:W,children:m.jsx(Qr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bc-dt-time-minute-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:$,children:m.jsx(Qr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:ee,children:m.jsx(Qr,{})})}),m.jsx("div",{className:"bc-dt-time-hour-value bsc-text-center",children:u.current[T]}),m.jsx("div",{className:"bc-dt-time-separator bsc-text-center",children:":"}),m.jsx("div",{className:"bc-dt-time-minute-value bsc-text-center",children:l.current[D]}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-value bsc-text-center",children:f.current[_]}),m.jsx("div",{className:"bc-dt-time-hour-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:y,children:m.jsx(Kr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bc-dt-time-minute-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:X,children:m.jsx(Kr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:ee,children:m.jsx(Kr,{})})})]})})},np=({viewDate:e,locale:t,dispatcher:r})=>{const n=Hh(e,t),a=()=>{const u=Ia(e,10);r({type:Z.SetViewDate,viewDate:u})},i=()=>{const u=Xt(e,10);r({type:Z.SetViewDate,viewDate:u})},o=u=>{const l=parseInt(u);r({type:Z.MonthSelector,viewDate:Td(e,l)})},s=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return m.jsxs("div",{className:"bc-dt-year-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:s(),scrollerType:Vt.Year,onMovePrevious:a,onMoveNext:i}),m.jsx("div",{className:"bsc-w-full bc-dt-year-wrapper",children:m.jsx("div",{className:"bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-year-grid",children:n.map((u,l)=>u.map((f,h)=>f.length>0?m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-year-cell",onClick:()=>o(f),children:f},l.toString()+h.toString()):m.jsx("div",{},l.toString()+h.toString())))})})]})};class ap{constructor(t,r){U(this,"dateFormat");U(this,"timeFormat");U(this,"use24HourTime");U(this,"monthPart");U(this,"dayPart");U(this,"yearPart");U(this,"twelveHourPart");U(this,"twentyFourHourPart");U(this,"minutePart");U(this,"meridianPart");this.dateSelection=t;const n=2023,a=12,i=20,s=new Date(n,a-1,i).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=s.replace(`${n}`,"YYYY").replace(`${a}`,"MM").replace(`${i}`,"DD");const u=new Date,l=18,f=24,h=37,b=317;u.setHours(l,f,h,b);const T=u.toLocaleTimeString(r);this.use24HourTime=T.startsWith("18"),this.timeFormat=T.replace(`${this.use24HourTime?l:"6"}`,"HH").replace(`${f}`,"MM").replace(`${h}`,"SS").replace(`${b}`,"LLL"),this.createDateParts()}get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case we.DateOnly:return this.createDateFormat(t);case we.TimeOnly:return this.createTimeFormat(t);case we.DateRange:return this.createDateRangeFormat(t);case we.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const r=[];this.dateFormat.startsWith("MM")?r.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?r.push(...this.createDayMonthYearFormatParts()):r.push(...this.createYearMonthDayFormatParts());const n={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...r,n,...r),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(r),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),r=t.indexOf("DD"),n=t.substring(0,r);t=t.replace(n,"").replace("DD","");const a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,a,this.dayPart,i,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,a,this.monthPart,i,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,a,this.monthPart,i,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,a,this.minutePart,i,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,a,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:qe.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:qe.Text,possibleValues:["AM","PM"]}}}const op=(e,t)=>{var i;const[r,n]=p.useState(),a=p.useRef();return p.useEffect(()=>{t&&!r&&(a.current=new ap(e,t),n(a.current.createInputFormat()))},[t]),[r,(i=a.current)==null?void 0:i.is24HourTime]},ip=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:a=!1,allowClear:i=!1,locale:o,className:s,dateSelection:u=we.DateTime,dateFormat:l,timeConstraints:f,icon:h,iconPosition:b=hr.Right,inputElement:T,selectableDate:x,isValidDate:D,onChange:P,calendarTemplate:_,dateScrollerTemplate:z,inputTemplate:K})=>{const[W,y]=p.useState(!1),[$,X]=p.useState(),[ee,B]=p.useState(),oe=p.useRef(),te=p.useRef(!1),ae=p.useRef(o||Na()),g=p.useRef(),Y=p.useRef(),q=p.useRef(),[F,re]=op(u,$),L=yo("not all and (min-width: 640px)"),he=p.useRef({calendarTemplate:_,dateScrollerTemplate:z});p.useEffect(()=>{ae.current&&v(ae.current)},[ae]),p.useEffect(()=>{o&&v(o)},[o]),p.useEffect(()=>{if(e){const G=E();S({type:Z.InitializeDates,initialDate:G})}else S({type:Z.ClearDates})},[e,g.current]),p.useEffect(()=>{re&&S({type:Z.SetTimeFormat,timeFormat:re?De.TwentyFourHour:De.TwelveHour})},[re]),p.useEffect(()=>{T&&(Y.current=T)},[T]);const v=G=>{mo(G).then(be=>{X(be.code),g.current=be;const Ye=E();S(e||n?{type:Z.InitializeDates,initialDate:Array.isArray(Ye)?Ye[0]:Ye}:{type:Z.SetViewDate,viewDate:Array.isArray(Ye)?Ye[0]:Ye})}).catch(be=>console.error(be))},E=()=>{const G=new Date;return G.setHours(0,0,0,0),e?typeof e=="string"?u!==we.DateRange?Wt(e,g.current):vo(e,g.current):e:G},H={currentSelector:u===we.TimeOnly?Z.TimeSelector:u===we.DateTime||u===we.DateOnly?Z.DaySelector:Z.DateRangeSelector,currentViewDate:new Date,timeFormat:De.TwelveHour,dateInitialized:!1},[d,S]=p.useReducer(Bh,H),O=()=>{Fe(),y(!0)},M=p.useMemo(()=>At(()=>{y(!1)},250),[]),A=p.useMemo(()=>At(()=>{M.cancel()},5),[M]),j=G=>{const be=G.target.innerText;Ee(be)},k=G=>{if(G){const be=Wt(G,g.current);return be?D?D(be):!0:!1}else return!0},V=G=>{Ee(G||"")},Ee=G=>{const be=u!==we.DateRange?Wt(G,g.current):vo(G,g.current);be?(Array.isArray(be)?(Vh(be[0],da(d.currentViewDate),Jc(st(d.currentViewDate,1)))||S({type:Z.SetViewDate,viewDate:be[0]}),S({type:Z.SetSelectedDateRange,selectedStartDate:be[0],selectedEndDate:be[1]})):S({type:Z.SetSelectedDate,selectedDate:be,viewDate:be}),P==null||P(be)):G===""&&(S({type:Z.ClearDates}),P==null||P())},C=()=>{Fe(),y(!W)},ke=()=>{S({type:Z.ClearDates}),y(!1),P==null||P()},Ae=(G,be)=>{(!Y.current||oe.current!==be)&&(Y.current=G,oe.current=be,te.current=!0)},Fe=()=>{(!q.current||te.current)&&Y.current&&(q.current=Y.current,B(Y.current),te.current=!1)},ft=()=>{y(!1),S({type:u===we.TimeOnly?Z.TimeSelector:u===we.DateTime||u===we.DateOnly?Z.DaySelector:Z.DateRangeSelector})},vr=()=>{switch(l){case dr.Short:return"short";case dr.Medium:return"medium";case dr.Long:return"long";default:return}},dt=()=>{var be,Ye,zt,Ct,yr,br,wr,Tr,xr,Pr,Er,Dt;const G=vr();switch(u){case we.DateTime:return d.selectedDate?G?d.selectedDate.toLocaleString((be=g.current)==null?void 0:be.code,{dateStyle:G,timeStyle:G}):d.selectedDate.toLocaleString((Ye=g.current)==null?void 0:Ye.code):"";case we.DateOnly:return d.selectedDate?G?d.selectedDate.toLocaleDateString((zt=g.current)==null?void 0:zt.code,{dateStyle:G}):d.selectedDate.toLocaleDateString((Ct=g.current)==null?void 0:Ct.code):"";case we.TimeOnly:return d.selectedDate?G?d.selectedDate.toLocaleTimeString((yr=g.current)==null?void 0:yr.code,{timeStyle:G,hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):d.selectedDate.toLocaleTimeString((br=g.current)==null?void 0:br.code,{hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return d.selectedStartDate&&d.selectedEndDate?G?`${d.selectedStartDate.toLocaleDateString((wr=g.current)==null?void 0:wr.code,{dateStyle:G})} - ${d.selectedEndDate.toLocaleDateString((Tr=g.current)==null?void 0:Tr.code,{dateStyle:G})}`:`${d.selectedStartDate.toLocaleDateString((xr=g.current)==null?void 0:xr.code)} - ${d.selectedEndDate.toLocaleDateString((Pr=g.current)==null?void 0:Pr.code)}`:"";default:return d.selectedDate?G?d.selectedDate.toLocaleString((Er=g.current)==null?void 0:Er.code,{dateStyle:G,timeStyle:G}):d.selectedDate.toLocaleString((Dt=g.current)==null?void 0:Dt.code):""}},Xe=u===we.DateTime||u===we.DateOnly||u===we.DateRange,ln=u===we.DateTime||u===we.TimeOnly,ht=b===hr.None?{}:b===hr.Right?{rightElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})}),m.jsx("div",{className:"bsc-ml-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})})]}),rightElementClassName:"bsc-justify-center"}:{leftElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[m.jsx("div",{className:"bsc-mr-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})}),i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})})]}),leftElementClassName:"bsc-justify-center"},Et=()=>m.jsxs(m.Fragment,{children:[d.currentSelector===Z.DaySelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(Gh,{selectedDate:d.selectedDate,viewDate:d.currentViewDate,locale:g.current,showTimeSelector:u===we.DateTime,selectableDate:x,isValidDate:D,dispatcher:S,onChange:P}),d.currentSelector===Z.MonthSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(Qh,{viewDate:d.currentViewDate,locale:g.current,dateSelection:u,dispatcher:S}),d.currentSelector===Z.YearSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(np,{viewDate:d.currentViewDate,locale:g.current,dispatcher:S}),d.currentSelector===Z.TimeSelector&&ln&&d.dateInitialized&&g.current&&m.jsx(rp,{viewDate:d.currentViewDate,showDateSelector:u===we.DateTime,locale:g.current,timeFormat:d.timeFormat,timeConstraints:f,onChange:P,dispatcher:S}),d.currentSelector===Z.DateRangeSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(tp,{viewDate:d.currentViewDate,selectedStartDate:d.selectedStartDate,selectedEndDate:d.selectedEndDate,locale:g.current,onChange:P,dispatcher:S})]}),fn={label:r,readOnly:t,allowClear:i,getValue:dt,onFocus:O,onInput:j,iconPosition:b,iconElement:ht.rightElement||ht.leftElement},gr=K||((G,be)=>m.jsx(m.Fragment,{children:be})),St=Ge("bsc-text-left",{"bsc-bg-gray-2":t,"bsc-bg-white":!t},"dark:bsc-bg-mono-dark-1 bc-dt-input",s);return m.jsx(un.Provider,{value:he.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx("label",{className:"bc-dt-label dark:bsc-text-mono-light-1",children:r}),L?m.jsxs(m.Fragment,{children:[m.jsx(Kt,{value:dt(),readOnly:t,inputMode:"none",className:St,onFocus:O,onElementCreate:G=>Ae(G,!1),...ht}),m.jsx(ao,{visible:W,target:ee,hidden:ft,unmountWhenHidden:!0,children:Et()})]}):m.jsxs(m.Fragment,{children:[m.jsx(Gr,{props:fn,template:gr,children:a===!1?m.jsx(Kt,{value:dt(),readOnly:t,className:St,onFocus:O,onBlur:M,onInput:j,onElementCreate:G=>Ae(G,!1),...ht}):m.jsx(fo,{value:dt(),readOnly:t,className:St,format:F,isInputValid:k,onFocus:O,onBlur:M,onChange:V,onElementCreate:G=>Ae(G,!0),...ht})}),m.jsx(so,{visible:W,target:ee,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:ft,isClickedWithin:A,unmountWhenHidden:!0,children:Et()})]})]})})},wp="";le.Button=We,le.ContentEditableInput=Kt,le.DateTime=ip,le.FormattedInput=fo,le.MobileOverlayPanel=ao,le.OverlayPanel=so,le.applyBeeSoftTheme=Dd,le.createBeeSoftTheme=Od,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});